@bolt/core
Advanced tools
Comparing version 1.1.2 to 1.1.4
25
index.js
@@ -1,2 +0,1 @@ | ||
// Export non-Bolt dependencies shared across virtually all components | ||
export { | ||
@@ -13,19 +12,17 @@ define, | ||
// Export Utilties + Helpers | ||
export * from './utils/css'; | ||
export * from './utils/sanitize-classes'; | ||
export * from './utils/supports-css-vars'; | ||
export * from './utils/color-contrast'; | ||
export * from './utils/rgb2hex'; | ||
export * from './utils/supports-passive-event-listener'; | ||
export { css } from './utils/css'; | ||
export { sanitizeBoltClasses } from './utils/sanitize-classes'; | ||
export { supportsCSSVars } from './utils/supports-css-vars'; | ||
export { colorContrast } from './utils/color-contrast'; | ||
export { rgb2hex } from './utils/rgb2hex'; | ||
export { passiveSupported } from './utils/supports-passive-event-listener'; | ||
export { declarativeClickHandler } from './utils/declarative-click-handler'; | ||
export * from './utils/environment'; | ||
export * from './utils/find-parent-tag'; | ||
export { hasNativeShadowDomSupport } from './utils/environment'; | ||
export { findParentTag } from './utils/find-parent-tag'; | ||
export { withPreact, wrapPreact } from './renderers/renderer-preact'; | ||
export * from './renderers/renderer-hyperhtml'; | ||
export { BoltComponent } from './renderers/renderer-hyperhtml'; | ||
export { spacingSizes } from './data/spacing-sizes'; | ||
// Export Bolt data shared | ||
export * from './data/spacing-sizes'; | ||
// Export polyfill loader | ||
export * from './polyfills/polyfill-loader'; | ||
export { polyfillLoader } from './polyfills/polyfill-loader'; |
{ | ||
"name": "@bolt/core", | ||
"description": "Core dependencies, utils, etc.", | ||
"version": "1.1.2", | ||
"version": "1.1.4", | ||
"license": "MIT", | ||
@@ -12,3 +12,3 @@ "main": "index.js", | ||
"@webcomponents/shadycss": "^1.1.1", | ||
"@webcomponents/shadydom": "^1.0.13", | ||
"@webcomponents/shadydom": "^1.0.14", | ||
"@webcomponents/template": "^1.2.2", | ||
@@ -15,0 +15,0 @@ "@webcomponents/webcomponents-platform": "^1.0.0", |
@@ -9,3 +9,2 @@ require('es6-promise').polyfill(); | ||
require('core-js/modules/es6.object.assign'); | ||
require('core-js/library/es6/reflect'); | ||
@@ -12,0 +11,0 @@ let polyfills = []; |
@@ -37,7 +37,9 @@ // HyperHTML Renderer ported to SkateJS | ||
this._checkSlots(); | ||
super.connectedCallback && super.connectedCallback(); | ||
this.connecting && this.connecting(); | ||
this.connected && this.connected(); | ||
} | ||
disconnectedCallback() { | ||
super.disconnectedCallback && super.disconnectedCallback(); | ||
this.disconnecting && this.disconnecting(); | ||
this.disconnected && this.disconnected(); | ||
} | ||
@@ -50,3 +52,3 @@ | ||
if (this.useShadow) { | ||
return hyper.wire() ` | ||
return hyper.wire(this) ` | ||
<style>${ styles} </style> | ||
@@ -60,7 +62,7 @@ `; | ||
if (name === 'default') { | ||
return hyper.wire() ` | ||
return hyper.wire(this) ` | ||
<slot /> | ||
`; | ||
} else { | ||
return hyper.wire() ` | ||
return hyper.wire(this) ` | ||
<slot name="${name}" /> | ||
@@ -71,3 +73,3 @@ `; | ||
if (this.slots[name]) { | ||
return hyper.wire() ` | ||
return hyper.wire(this) ` | ||
${this.slots.default} | ||
@@ -93,11 +95,11 @@ `; | ||
this.childNodes.forEach(function (child, index, nodelist) { | ||
const slotName = child.getAttribute ? child.getAttribute("slot") : null; | ||
const slotName = child.getAttribute ? child.getAttribute("slot") : null; | ||
if (!slotName) { | ||
if (!slotName) { | ||
elem.slots.default.push(child); | ||
} else { | ||
} else { | ||
elem.slots[slotName] = child; | ||
} | ||
}); | ||
} | ||
} | ||
}); | ||
} | ||
@@ -104,0 +106,0 @@ get renderRoot() { |
@@ -6,4 +6,12 @@ // Helper util to check the current node environment + check if the browser supports shadow DOM for shimming purposes | ||
const { attachShadow } = HTMLElement.prototype; | ||
export const hasNativeShadowDomSupport = (window.ShadyDOM) || (attachShadow && attachShadow.toString().indexOf('native code') > -1); | ||
function supportsShadowDom(){ | ||
if (('attachShadow' in Element.prototype && 'getRootNode' in Element.prototype) || (window.ShadyDOM)) { | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
export const hasNativeShadowDomSupport = supportsShadowDom(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
140596
0
1483