css-styled
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
@@ -77,4 +77,7 @@ 'use strict'; | ||
if (firstMount) { | ||
injectElement = styleElement; | ||
} | ||
if (!shadowRoot) { | ||
injectElement = styleElement; | ||
++injectCount; | ||
@@ -89,3 +92,5 @@ } | ||
} else { | ||
--injectCount; | ||
if (injectCount > 0) { | ||
--injectCount; | ||
} | ||
@@ -92,0 +97,0 @@ if (injectCount === 0 && injectElement) { |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
@@ -75,4 +75,7 @@ import { splitComma } from '@daybrush/utils'; | ||
if (firstMount) { | ||
injectElement = styleElement; | ||
} | ||
if (!shadowRoot) { | ||
injectElement = styleElement; | ||
++injectCount; | ||
@@ -87,3 +90,5 @@ } | ||
} else { | ||
--injectCount; | ||
if (injectCount > 0) { | ||
--injectCount; | ||
} | ||
@@ -90,0 +95,0 @@ if (injectCount === 0 && injectElement) { |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
@@ -79,4 +79,7 @@ (function (global, factory) { | ||
if (firstMount) { | ||
injectElement = styleElement; | ||
} | ||
if (!shadowRoot) { | ||
injectElement = styleElement; | ||
++injectCount; | ||
@@ -91,3 +94,5 @@ } | ||
} else { | ||
--injectCount; | ||
if (injectCount > 0) { | ||
--injectCount; | ||
} | ||
@@ -94,0 +99,0 @@ if (injectCount === 0 && injectElement) { |
@@ -7,5 +7,5 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@daybrush/utils")):"function"==typeof define&&define.amd?define(["@daybrush/utils"],t):(e=e||self).styled=t(e.utils)}(this,function(a){"use strict";var e=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0};return function(d){var l,c="rCS"+e(d).toString(36),f=0;return{className:c,inject:function(e){var t,n,o,r,i,u=function(e){if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t}}(e);return(u||0===f)&&(n=c,o=d,(i=document.createElement("style")).setAttribute("type","text/css"),i.innerHTML=o.replace(/([^}{]*){/gm,function(e,t){return a.splitComma(t).map(function(e){return-1<e.indexOf(":global")?e.replace(/\:global/g,""):-1<e.indexOf(":host")?""+e.replace(/\:host/g,"."+n):"."+n+" "+e}).join(", ")+"{"}),(r||document.head||document.body).appendChild(i),t=i),u||(l=t,++f),{destroy:function(){u?(e.removeChild(t),t=null):0===--f&&l&&(l.parentNode.removeChild(l),l=null)}}}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("@daybrush/utils")):"function"==typeof define&&define.amd?define(["@daybrush/utils"],t):(e=e||self).styled=t(e.utils)}(this,function(s){"use strict";var e=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0};return function(l){var c,f="rCS"+e(l).toString(36),a=0;return{className:f,inject:function(e){var t,n,o,r,i,u=function(e){if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t}}(e),d=0===a;return(u||d)&&(n=f,o=l,(i=document.createElement("style")).setAttribute("type","text/css"),i.innerHTML=o.replace(/([^}{]*){/gm,function(e,t){return s.splitComma(t).map(function(e){return-1<e.indexOf(":global")?e.replace(/\:global/g,""):-1<e.indexOf(":host")?""+e.replace(/\:host/g,"."+n):"."+n+" "+e}).join(", ")+"{"}),(r||document.head||document.body).appendChild(i),t=i),d&&(c=t),u||++a,{destroy:function(){u?(e.removeChild(t),t=null):(0<a&&--a,0===a&&c&&(c.parentNode.removeChild(c),c=null))}}}}}}); | ||
//# sourceMappingURL=styled.min.js.map |
@@ -7,3 +7,3 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
@@ -110,4 +110,7 @@ (function (global, factory) { | ||
if (firstMount) { | ||
injectElement = styleElement; | ||
} | ||
if (!shadowRoot) { | ||
injectElement = styleElement; | ||
++injectCount; | ||
@@ -122,3 +125,5 @@ } | ||
} else { | ||
--injectCount; | ||
if (injectCount > 0) { | ||
--injectCount; | ||
} | ||
@@ -125,0 +130,0 @@ if (injectCount === 0 && injectElement) { |
@@ -7,5 +7,5 @@ /* | ||
repository: git+https://github.com/daybrush/css-styled.git | ||
version: 0.1.4 | ||
version: 0.1.5 | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).styled=t()}(this,function(){"use strict";var e=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0};function c(o,e,t){var n=document.createElement("style");return n.setAttribute("type","text/css"),n.innerHTML=e.replace(/([^}{]*){/gm,function(e,t){return((n=t.match(/("[^"]*"|'[^']*'|[^,\s()]*\((?:[^()]*|\([^()]*\))*\)[^,\s()]*|[^,])+/g))?n.map(function(e){return e.trim()}):[]).map(function(e){return-1<e.indexOf(":global")?e.replace(/\:global/g,""):-1<e.indexOf(":host")?""+e.replace(/\:host/g,"."+o):"."+o+" "+e}).join(", ")+"{";var n}),(t||document.head||document.body).appendChild(n),n}return function(o){var r,i="rCS"+e(o).toString(36),u=0;return{className:i,inject:function(e){var t,n=function(e){if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t}}(e);return(n||0===u)&&(t=c(i,o)),n||(r=t,++u),{destroy:function(){n?(e.removeChild(t),t=null):0===--u&&r&&(r.parentNode.removeChild(r),r=null)}}}}}}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).styled=t()}(this,function(){"use strict";var e=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0};function d(o,e,t){var n=document.createElement("style");return n.setAttribute("type","text/css"),n.innerHTML=e.replace(/([^}{]*){/gm,function(e,t){return((n=t.match(/("[^"]*"|'[^']*'|[^,\s()]*\((?:[^()]*|\([^()]*\))*\)[^,\s()]*|[^,])+/g))?n.map(function(e){return e.trim()}):[]).map(function(e){return-1<e.indexOf(":global")?e.replace(/\:global/g,""):-1<e.indexOf(":host")?""+e.replace(/\:host/g,"."+o):"."+o+" "+e}).join(", ")+"{";var n}),(t||document.head||document.body).appendChild(n),n}return function(r){var i,u="rCS"+e(r).toString(36),c=0;return{className:u,inject:function(e){var t,n=function(e){if(e.getRootNode){var t=e.getRootNode();if(11===t.nodeType)return t}}(e),o=0===c;return(n||o)&&(t=d(u,r)),o&&(i=t),n||++c,{destroy:function(){n?(e.removeChild(t),t=null):(0<c&&--c,0===c&&i&&(i.parentNode.removeChild(i),i=null))}}}}}}); | ||
//# sourceMappingURL=styled.pkgd.min.js.map |
{ | ||
"name": "css-styled", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "new project", | ||
@@ -5,0 +5,0 @@ "main": "./dist/styled.cjs.js", |
@@ -19,4 +19,6 @@ import { getHash, injectStyle, getShadowRoot } from "./utils"; | ||
} | ||
if (firstMount) { | ||
injectElement = styleElement; | ||
} | ||
if (!shadowRoot) { | ||
injectElement = styleElement; | ||
++injectCount; | ||
@@ -30,4 +32,5 @@ } | ||
} else { | ||
--injectCount; | ||
if (injectCount > 0) { | ||
--injectCount; | ||
} | ||
if (injectCount === 0 && injectElement) { | ||
@@ -34,0 +37,0 @@ injectElement.parentNode!.removeChild(injectElement); |
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
54641
670