@emotion/sheet
Advanced tools
Comparing version 0.7.1 to 0.7.2
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.emotionSheet={})}(this,function(e){"use strict";var t=function(){function e(e){void 0===e&&(e={}),this.isSpeedy=void 0===e.speedy||e.speedy,this.maxLength=e.maxLength||this.isSpeedy?65e3:1,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key||"",this.container=e.container||("undefined"!=typeof document?document.head:null)}var t=e.prototype;return t.insert=function(e){if(this.ctr%this.maxLength==0){var t,n=(i=this,(s=document.createElement("style")).setAttribute("data-emotion",i.key),void 0!==i.nonce&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var i,s,o=this.tags[this.tags.length-1];if(this.isSpeedy){var h=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(o);try{h.insertRule(e,h.cssRules.length)}catch(e){}}else o.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}();e.StyleSheet=t,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.emotionSheet={})}(this,function(e){"use strict";var t=function(){function e(e){void 0===e&&(e={}),this.isSpeedy=void 0===e.speedy||e.speedy,this.maxLength=e.maxLength||this.isSpeedy?65e3:1,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key||"",this.container=e.container||document.head}var t=e.prototype;return t.insert=function(e){if(this.ctr%this.maxLength==0){var t,n=(i=this,(s=document.createElement("style")).setAttribute("data-emotion",i.key),void 0!==i.nonce&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var i,s,o=this.tags[this.tags.length-1];if(this.isSpeedy){var h=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(o);try{h.insertRule(e,h.cssRules.length)}catch(e){}}else o.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}();e.StyleSheet=t,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=index.min.js.map |
@@ -5,2 +5,4 @@ 'use strict'; | ||
var utils = require('@emotion/utils'); | ||
/* | ||
@@ -29,3 +31,3 @@ | ||
*/ | ||
// $FlowFixMe | ||
function sheetForTag(tag) { | ||
@@ -77,3 +79,3 @@ if (tag.sheet) { | ||
this.container = options.container || ( // $FlowFixMe | ||
typeof document !== 'undefined' ? document.head : null); | ||
utils.isBrowser ? document.head : null); | ||
} | ||
@@ -133,2 +135,1 @@ | ||
exports.StyleSheet = StyleSheet; | ||
//# sourceMappingURL=sheet.cjs.js.map |
@@ -0,1 +1,3 @@ | ||
import { isBrowser } from '@emotion/utils'; | ||
/* | ||
@@ -24,3 +26,3 @@ | ||
*/ | ||
// $FlowFixMe | ||
function sheetForTag(tag) { | ||
@@ -72,3 +74,3 @@ if (tag.sheet) { | ||
this.container = options.container || ( // $FlowFixMe | ||
typeof document !== 'undefined' ? document.head : null); | ||
isBrowser ? document.head : null); | ||
} | ||
@@ -128,2 +130,1 @@ | ||
export { StyleSheet }; | ||
//# sourceMappingURL=sheet.esm.js.map |
{ | ||
"name": "@emotion/sheet", | ||
"version": "0.7.1", | ||
"version": "0.7.2", | ||
"description": "emotion's stylesheet", | ||
"main": "dist/sheet.cjs.js", | ||
"module": "dist/sheet.esm.js", | ||
"browser": { | ||
"./dist/sheet.cjs.js": "./dist/sheet.browser.cjs.js", | ||
"./dist/sheet.esm.js": "./dist/sheet.browser.esm.js" | ||
}, | ||
"types": "types/index.d.ts", | ||
@@ -12,2 +16,5 @@ "license": "MIT", | ||
}, | ||
"dependencies": { | ||
"@emotion/utils": "^0.8.0" | ||
}, | ||
"repository": "https://github.com/emotion-js/emotion/tree/master/next-packages/sheet", | ||
@@ -14,0 +21,0 @@ "publishConfig": { |
@@ -26,2 +26,4 @@ // @flow | ||
import { isBrowser } from '@emotion/utils' | ||
// $FlowFixMe | ||
@@ -93,3 +95,3 @@ function sheetForTag(tag: HTMLStyleElement): CSSStyleSheet { | ||
// $FlowFixMe | ||
(typeof document !== 'undefined' ? document.head : null) | ||
(isBrowser ? document.head : null) | ||
} | ||
@@ -96,0 +98,0 @@ insert(rule: string) { |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
515
0
27292
1
6
+ Added@emotion/utils@^0.8.0
+ Added@emotion/utils@0.8.2(transitive)