styletron-engine-atomic
Advanced tools
Comparing version 1.0.9 to 1.0.10
@@ -384,3 +384,12 @@ import prefixAll from 'inline-style-prefixer/static'; | ||
const sheet = this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
const rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -398,3 +407,12 @@ | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
const rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -404,3 +422,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), (cache, id, value) => { | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
const rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -407,0 +434,0 @@ |
@@ -384,3 +384,12 @@ import prefixAll from 'inline-style-prefixer/static'; | ||
const sheet = this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
const rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -398,3 +407,12 @@ | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
const rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -404,3 +422,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), (cache, id, value) => { | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
const rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -407,0 +434,0 @@ |
@@ -430,3 +430,12 @@ import prefixAll from 'inline-style-prefixer/static'; | ||
var sheet = _this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
var rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -447,3 +456,12 @@ | ||
var sheet = _this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
var rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}); | ||
@@ -454,3 +472,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), function (cache, id, value) { | ||
var sheet = _this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
var rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}); | ||
@@ -457,0 +484,0 @@ |
@@ -436,3 +436,12 @@ 'use strict'; | ||
var sheet = _this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
var rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -453,3 +462,12 @@ | ||
var sheet = _this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
var rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}); | ||
@@ -460,3 +478,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), function (cache, id, value) { | ||
var sheet = _this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
var rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn("Failed to inject CSS: \"" + rule + "\". Perhaps this has invalid or un-prefixed properties?"); | ||
} | ||
} | ||
}); | ||
@@ -463,0 +490,0 @@ |
@@ -384,3 +384,12 @@ import prefixAll from 'inline-style-prefixer/static'; | ||
const sheet = this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
const rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -398,3 +407,12 @@ | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
const rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -404,3 +422,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), (cache, id, value) => { | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
const rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -407,0 +434,0 @@ |
@@ -390,3 +390,12 @@ 'use strict'; | ||
const sheet = this.styleElements[cache.key].sheet; | ||
sheet.insertRule(styleBlockToRule(atomicSelector(id, pseudo), block), sheet.cssRules.length); | ||
const rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}; // Setup style cache | ||
@@ -404,3 +413,12 @@ | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(keyframesBlockToRule(id, keyframesToBlock(value)), sheet.cssRules.length); | ||
const rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -410,3 +428,12 @@ this.fontFaceCache = new Cache(new SequentialIDGenerator(opts.prefix), (cache, id, value) => { | ||
const sheet = this.styleElements[""].sheet; | ||
sheet.insertRule(fontFaceBlockToRule(id, declarationsToBlock(value)), sheet.cssRules.length); | ||
const rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (process.env.NODE_ENV !== "production") { | ||
// eslint-disable-next-line no-console | ||
console.warn(`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`); | ||
} | ||
} | ||
}); | ||
@@ -413,0 +440,0 @@ |
{ | ||
"name": "styletron-engine-atomic", | ||
"version": "1.0.9", | ||
"version": "1.0.10", | ||
"description": "Universal, high-performance JavaScript styles", | ||
@@ -5,0 +5,0 @@ "author": "Ryan Tsao <ryan.j.tsao@gmail.com>", |
@@ -81,6 +81,13 @@ /* eslint-env browser */ | ||
const sheet: CSSStyleSheet = (this.styleElements[cache.key].sheet: any); | ||
sheet.insertRule( | ||
styleBlockToRule(atomicSelector(id, pseudo), block), | ||
sheet.cssRules.length, | ||
); | ||
const rule = styleBlockToRule(atomicSelector(id, pseudo), block); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (__DEV__) { | ||
// eslint-disable-next-line no-console | ||
console.warn( | ||
`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`, | ||
); | ||
} | ||
} | ||
}; | ||
@@ -105,6 +112,13 @@ | ||
const sheet: CSSStyleSheet = (this.styleElements[""].sheet: any); | ||
sheet.insertRule( | ||
keyframesBlockToRule(id, keyframesToBlock(value)), | ||
sheet.cssRules.length, | ||
); | ||
const rule = keyframesBlockToRule(id, keyframesToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (__DEV__) { | ||
// eslint-disable-next-line no-console | ||
console.warn( | ||
`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`, | ||
); | ||
} | ||
} | ||
}, | ||
@@ -118,6 +132,13 @@ ); | ||
const sheet: CSSStyleSheet = (this.styleElements[""].sheet: any); | ||
sheet.insertRule( | ||
fontFaceBlockToRule(id, declarationsToBlock(value)), | ||
sheet.cssRules.length, | ||
); | ||
const rule = fontFaceBlockToRule(id, declarationsToBlock(value)); | ||
try { | ||
sheet.insertRule(rule, sheet.cssRules.length); | ||
} catch (e) { | ||
if (__DEV__) { | ||
// eslint-disable-next-line no-console | ||
console.warn( | ||
`Failed to inject CSS: "${rule}". Perhaps this has invalid or un-prefixed properties?`, | ||
); | ||
} | ||
} | ||
}, | ||
@@ -124,0 +145,0 @@ ); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1008772
24488
8
40