Socket
Socket
Sign inDemoInstall

@emotion/sheet

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/sheet - npm Package Compare versions

Comparing version 0.7.1 to 0.7.2

dist/sheet.browser.cjs.js

2

dist/index.min.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc