New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@glitz/core

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@glitz/core - npm Package Compare versions

Comparing version 3.0.0-alpha.12 to 3.0.0-alpha.13

4

cjs/index.development.js

@@ -26,3 +26,3 @@ 'use strict';

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -620,3 +620,2 @@ };

// tslint:disable no-conditional-assignment
var BLOCK_START_CODE = '{'.charCodeAt(0);

@@ -634,3 +633,2 @@ var BLOCK_END_CODE = '}'.charCodeAt(0);

var body = '';
// tslint:disable-next-line: prefer-for-of
for (var i = 0; i < css.length; i++) {

@@ -637,0 +635,0 @@ var character = css[i];

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function t(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(e){var t,r="";for(t in e){var n=e[t];if("object"==typeof n)for(var o=0,a=n;o<a.length;o++){r&&(r+=";"),r+=i(t,a[o])}else r&&(r+=";"),r+=i(t,n)}return r}function i(e,t){return f(e)+":"+t}var o=/(?:^(ms|moz|webkit))|[A-Z]/g,a={};function f(e){return e in a?a[e]:a[e]=e.replace(o,"-$&").toLowerCase()}function u(e){for(var t={},r=Object.keys(e),n=r.length;n>0;n--)t[r[n-1]]=e[r[n-1]];return t}function c(e,t){return e+"{"+t+"}"}function l(e,t,r){return void 0===r&&(r=""),"."+c(e+r,t)}function v(e,t){return"@keyframes "+c(e,t)}function s(e){return c("@font-face",e)}function d(e,t){return"@media "+c(e,t)}var y=function(e,t,r){this.injectClassName=function(t,r){var i=n(t);return e(i,r)},this.injectKeyframes=function(e){var r="";for(var i in e)r+=c(i,n(e[i]));return t(r)},this.injectFontFace=function(e){var t={};for(var i in e)"fontFamily"!==i&&(t[i]=e[i]);var o=e.fontFamily;t.fontFamily=o;var a=n(t);return r(a),o}},h="@".charCodeAt(0),p=":".charCodeAt(0),m="[".charCodeAt(0);function g(e,t){var r={},n=function(n){var o=function(a,f,c,l,v){var s,d,y;void 0===c&&(c={});for(var g="",O=Object.keys(a),w=j(r,l,v),b=O.length;b>0;b--){var S=O[b-1],x=a[S];if("function"==typeof x&&(x=x(f)),null===x&&(x=void 0),"@keyframes"===S&&(S="animationName"),"@font-face"===S&&(S="fontFamily"),"animationName"===S||"fontFamily"===S||"object"!=typeof x||Array.isArray(x)){var C=j(c,l,v);if(!(S in C)){if("object"==typeof x){if("animationName"===S){for(var F=[].concat(x),A=[],k=0;k<F.length;k++){var R=F[k];if("object"==typeof R){var N={};for(var _ in R){var z=u(i(R[_],f));N[_]=t?t(z):z}A[k]=e().injectKeyframes(N)}}x=1===A.length?A[0]:A}if("fontFamily"===S){A=[];for(var E=0,K=[].concat(x);E<K.length;E++){var M=K[E];if("object"==typeof M){var T=u(i(M,f)),D=e().injectFontFace(t?t(T):T);-1===A.indexOf(D)&&A.push(D)}else A.push(M)}x=A.join(",")}}var G={};if(C[S]=G[S]=x,void 0!==x&&n)if("string"==typeof x||"number"==typeof x){var I=w[S]=w[S]||{};if(x in I){g+=" "+I[x];continue}g+=" "+(I[x]=e(l).injectClassName(t?t(G):G,v))}else g+=" "+e(l).injectClassName(t?t(G):G,v)}}else{var L=S.charCodeAt(0);if(L!==h&&L!==p&&L!==m){var P=Object.keys(x);for(k=P.length;k>0;k--){var q=P[k-1],H=x[q],U=!1;if("y"===q||"xy"===q){U=!0;B=o(((s={})[S+"Top"]=H,s[S+"Bottom"]=H,s),f,c,l,v);n&&(g+=B)}if("x"===q||"xy"===q){U=!0;B=o(((d={})[S+"Left"]=H,d[S+"Right"]=H,d),f,c,l,v);n&&(g+=B)}if(!U){B=o(((y={})[S+q[0].toUpperCase()+q.slice(1)]=H,y),f,c,l,v);n&&(g+=B)}}}else{var B=o(x,f,c,L===h?S.slice(7):l,L===p||L===m?(null!=v?v:"")+S:v);n&&(g+=B)}}}return n?g:c};return o},i=n(!1),o=n(!0);return function(e,t){void 0===t&&(t={});for(var r={},n="",i=(e=Array.isArray(e)?e:[e]).length-1;i>=0;i--)n+=o(e[i],t,r);return n.slice(1)}}function j(e,t,r){var n=e;return t&&(n=n[t]=n[t]||{}),r?n[r]=n[r]||{}:n}function O(e,t){var r=e.cssRules.length;try{e.insertRule(t,r)}catch(e){}}function w(e,t){var r=document.createElement("style");return e&&(r.media=e),r.dataset[t]="",r}function b(e,t){return document.head.insertBefore(e,t),e}function S(e,t,r,n,i){return void 0===e&&(e=""),void 0===t&&(t=0),void 0===r&&(r=10),void 0===n&&(n=35),void 0===i&&(i=1),Object.assign((function o(){var a=t+r;return a===n&&(r+=9*(n+1),n=Math.pow(36,++i)-1),t++,373===a?o():e+a.toString(36)}),{clone:function(){return S(e,t,r,n,i)}})}var x=function(e){function r(t,r,n){var i=this,o={},a={},f={},u=[],c=t.sheet;if(!function(e){return!!e&&"cssRules"in e}(c))throw new Error("HTMLStyleElement was not inserted properly into DOM");return(i=e.call(this,(function(e,t){var n,i=t?a[t]=null!==(n=a[t])&&void 0!==n?n:{}:o;if(i[e])return i[e];var f=r();return i[e]=f,O(c,l(f,e,t)),f}),(function(e){if(f[e])return f[e];var t=n();return f[e]=t,O(c,v(t,e)),t}),(function(e){-1===u.indexOf(e)&&(u.push(e),O(c,s(e)))}))||this).injectRaw=function(e){O(c,e)},i.hydrateClassName=function(e,t,n){var i;r(),(n?a[n]=null!==(i=a[n])&&void 0!==i?i:{}:o)[e]=t},i.hydrateKeyframes=function(e,t){n(),f[e]=t},i.hydrateFontFace=function(e){u.push(e)},i}return t(r,e),r}(y),C="{".charCodeAt(0),F="}".charCodeAt(0),A=/\.([\w]+)((?::.+)|(\[.+\]))?/,k=/@keyframes (.+)/,R=/@media (.+)/;function N(e){return function(t,r,n){for(var i=0,o="",a="",f="",u="",c=0;c<t.length;c++){var l=t[c],v=l.charCodeAt(0);if(o+=l,v!==C||(i++,a?2!==i:1!==i)){if(v===F){if(i--,a&&0===i){a="";continue}if(a?1===i:0===i){var s=null!=r?r:e(a);d=void 0;if(d=A.exec(f))s.hydrateClassName(u,d[1],d[2]);else if(d=k.exec(f))s.hydrateKeyframes(u,d[1]);else{if("@font-face"!==f)throw new Error("Unsupported CSS selector when hydrating in Glitz");s.hydrateFontFace(u)}n&&n(s,o),o="",f="",u="";continue}}(a?i>1:i>0)?u+=l:f+=l}else{var d;(d=R.exec(f))&&(a=d[1],o="",f="")}}}}var _=function(e){void 0===e&&(e={});var t,r=e.prefix,n=S(r),i=S(r),o=e.mediaOrder,a={},f=null,u={},c=e.identifier||"glitz",l=function(e){if(e){if(u[e])return u[e];var r=a[e]=w(e,c),l=null;if(o){var v=Object.keys(a).sort(o);f=a[v[0]],l=a[v[v.indexOf(e)+1]]||null}return b(r,l),u[e]=new x(r,n,i)}return t||(r=b(w(e,c),f),t=new x(r,n,i))};this.injectStyle=g(l,e.transformer);var v=this.hydrate=N(l),s=document.head.querySelectorAll("style[data-"+c+"]");if(s)for(var d=0,y=s;d<y.length;d++){var h=(C=y[d]).media,p=void 0;h?(f||(f=C),a[h]=C,p=u[h]=new x(C,n,i)):p=t=new x(C,n,i),v(C.textContent,p)}var m=document.body.querySelectorAll("style[data-"+c+"]");if(m)for(var j=0,O=m;j<O.length;j++){var C;v((C=O[j]).textContent,void 0,(function(e,t){return e.injectRaw(t)})),C.parentNode.removeChild(C)}},z=function(e){function r(t,n,i,o,a,f,u,c,d,y,h){void 0===i&&(i=!1),void 0===o&&(o={}),void 0===a&&(a={}),void 0===f&&(f={}),void 0===u&&(u=[]),void 0===c&&(c={}),void 0===d&&(d={}),void 0===y&&(y={}),void 0===h&&(h=[]);var p=this,m={},g={},j={},O=[],w={},b={},S={},x=[];function C(e){return function(){if(i)throw new Error(e+" is prohibited after injections")}}(p=e.call(this,(function(e,r){var n,f,u;i=!0;var c=r?a[r]=null!==(n=a[r])&&void 0!==n?n:{}:o;if(c[e])return c[e];var l=t(),v=r?g[r]=null!==(f=g[r])&&void 0!==f?f:{}:m,s=r?b[r]=null!==(u=b[r])&&void 0!==u?u:{}:w;return c[e]=v[e]=s[e]=l,l}),(function(e){if(i=!0,f[e])return f[e];var t=n();return f[e]=j[e]=S[e]=t,t}),(function(e){i=!0,-1===u.indexOf(e)&&(u.push(e),O.push(e),x.push(e))}))||this).getStyleResult=function(){for(var e="",t=0,r=O;t<r.length;t++){e+=s(i=r[t])}for(var n in j)e+=v(j[n],n);for(var i in m)e+=l(m[i],i);for(var o in g){var a=g[o];for(var i in a)e+=l(a[i],i,o)}return e},p.getStyleStream=function(){var e="";if(x.length>0){for(var t=0,r=x;t<r.length;t++){e+=s(i=r[t])}x.splice(0,x.length)}for(var n in S)e+=v(S[n],n),delete S[n];for(var i in w)e+=l(w[i],i),delete w[i];for(var o in b){var a=b[o];for(var i in a)e+=l(a[i],i,o);delete b[o]}return e};var F=C("Hydration");p.hydrateClassName=function(e,r,n){var i,f;F(),t();var u=n?a[n]=null!==(i=a[n])&&void 0!==i?i:{}:o,l=n?d[n]=null!==(f=d[n])&&void 0!==f?f:{}:c;u[e]=l[e]=r},p.hydrateKeyframes=function(e,t){F(),n(),f[e]=t,y[e]=t},p.hydrateFontFace=function(e){F(),u.push(e),h.push(e)};var A=C("Cloning");return p.clone=function(e,t){return A(),new r(e,t,i,E(c),E(d),E(y),h.slice(0),E(c),E(d),E(y),h.slice(0))},p}return t(r,e),r}(y);function E(e){var t={};for(var r in e){var n=e[r];t[r]="string"==typeof n?n:E(n)}return t}var K=function e(t,r,n,i,o){void 0===t&&(t={}),void 0===r&&(r=S(t.prefix)),void 0===n&&(n=S(t.prefix)),void 0===o&&(o={});var a=function(e){return e?o[e]=o[e]||new z(r,n):i=i||new z(r,n)};this.injectStyle=g(a,t.transformer),this.hydrate=N(a);var f=t.identifier||"glitz";this.getStyleMarkup=function(){var e="";i&&(e+="<style data-"+f+">"+i.getStyleResult()+"</style>");for(var r=0,n=t.mediaOrder?Object.keys(o).sort(t.mediaOrder):Object.keys(o);r<n.length;r++){var a=n[r];e+="<style data-"+f+' media="'+a+'">'+o[a].getStyleResult()+"</style>"}return e},this.getStyleStream=function(){var e,r="";i&&(r+=i.getStyleStream());for(var n=0,a=t.mediaOrder?Object.keys(o).sort(t.mediaOrder):Object.keys(o);n<a.length;n++){var u=a[n];r+=d(u,o[u].getStyleStream())}if(r)return["style",(e={},e["data-"+f]="",e),r]},this.clone=function(){var a=r.clone(),f=n.clone(),u={};for(var c in o)u[c]=o[c].clone(a,f);return new e(t,a,f,null==i?void 0:i.clone(a,f),u)}},M=function(e){void 0===e&&(e={}),this.diagnostics=[];var t,r=e.prefix,n=S(r),i=S(r),o={};this.injectStyle=g((function(e){return e?o[e]=o[e]||new z(n,i):t=t||new z(n,i)}),e.transformer),this.getStyle=function(){var r="";t&&(r+=t.getStyleResult());for(var n=0,i=e.mediaOrder?Object.keys(o).sort(e.mediaOrder):Object.keys(o);n<i.length;n++){var a=i[n];r+=d(a,o[a].getStyleResult())}return r}};function T(e){var t,r="";for(t in e){r&&(r+=" and ");var n=e[t];r+=!0===n?"("+f(t)+")":"("+f(t)+": "+n+")"}return r}exports.DEFAULT_HYDRATION_IDENTIFIER="glitz",exports.GlitzClient=_,exports.GlitzServer=K,exports.GlitzStatic=M,exports.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduceRight((function(e,t){return function(r){return t(e(r))}}))},exports.media=function(e,t){var r;return(r={})["@media "+("string"==typeof e?e:T(e))]=t,r},exports.query=T,exports.selector=function(e,t){var n;return"string"==typeof e?((n={})[e]=t,n):e.reduce((function(e,n){var i;return r(r({},e),((i={})[n]=t,i))}),{})};
***************************************************************************** */function t(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var r=function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function n(e){var t,r="";for(t in e){var n=e[t];if("object"==typeof n)for(var o=0,a=n;o<a.length;o++){r&&(r+=";"),r+=i(t,a[o])}else r&&(r+=";"),r+=i(t,n)}return r}function i(e,t){return f(e)+":"+t}var o=/(?:^(ms|moz|webkit))|[A-Z]/g,a={};function f(e){return e in a?a[e]:a[e]=e.replace(o,"-$&").toLowerCase()}function u(e){for(var t={},r=Object.keys(e),n=r.length;n>0;n--)t[r[n-1]]=e[r[n-1]];return t}function c(e,t){return e+"{"+t+"}"}function l(e,t,r){return void 0===r&&(r=""),"."+c(e+r,t)}function v(e,t){return"@keyframes "+c(e,t)}function s(e){return c("@font-face",e)}function d(e,t){return"@media "+c(e,t)}var y=function(e,t,r){this.injectClassName=function(t,r){var i=n(t);return e(i,r)},this.injectKeyframes=function(e){var r="";for(var i in e)r+=c(i,n(e[i]));return t(r)},this.injectFontFace=function(e){var t={};for(var i in e)"fontFamily"!==i&&(t[i]=e[i]);var o=e.fontFamily;t.fontFamily=o;var a=n(t);return r(a),o}},h="@".charCodeAt(0),p=":".charCodeAt(0),m="[".charCodeAt(0);function g(e,t){var r={},n=function(n){var o=function(a,f,c,l,v){var s,d,y;void 0===c&&(c={});for(var g="",O=Object.keys(a),w=j(r,l,v),S=O.length;S>0;S--){var b=O[S-1],x=a[b];if("function"==typeof x&&(x=x(f)),null===x&&(x=void 0),"@keyframes"===b&&(b="animationName"),"@font-face"===b&&(b="fontFamily"),"animationName"===b||"fontFamily"===b||"object"!=typeof x||Array.isArray(x)){var C=j(c,l,v);if(!(b in C)){if("object"==typeof x){if("animationName"===b){for(var F=[].concat(x),A=[],k=0;k<F.length;k++){var R=F[k];if("object"==typeof R){var N={};for(var _ in R){var z=u(i(R[_],f));N[_]=t?t(z):z}A[k]=e().injectKeyframes(N)}}x=1===A.length?A[0]:A}if("fontFamily"===b){A=[];for(var E=0,K=[].concat(x);E<K.length;E++){var M=K[E];if("object"==typeof M){var T=u(i(M,f)),D=e().injectFontFace(t?t(T):T);-1===A.indexOf(D)&&A.push(D)}else A.push(M)}x=A.join(",")}}var G={};if(C[b]=G[b]=x,void 0!==x&&n)if("string"==typeof x||"number"==typeof x){var I=w[b]=w[b]||{};if(x in I){g+=" "+I[x];continue}g+=" "+(I[x]=e(l).injectClassName(t?t(G):G,v))}else g+=" "+e(l).injectClassName(t?t(G):G,v)}}else{var L=b.charCodeAt(0);if(L!==h&&L!==p&&L!==m){var P=Object.keys(x);for(k=P.length;k>0;k--){var q=P[k-1],H=x[q],U=!1;if("y"===q||"xy"===q){U=!0;B=o(((s={})[b+"Top"]=H,s[b+"Bottom"]=H,s),f,c,l,v);n&&(g+=B)}if("x"===q||"xy"===q){U=!0;B=o(((d={})[b+"Left"]=H,d[b+"Right"]=H,d),f,c,l,v);n&&(g+=B)}if(!U){B=o(((y={})[b+q[0].toUpperCase()+q.slice(1)]=H,y),f,c,l,v);n&&(g+=B)}}}else{var B=o(x,f,c,L===h?b.slice(7):l,L===p||L===m?(null!=v?v:"")+b:v);n&&(g+=B)}}}return n?g:c};return o},i=n(!1),o=n(!0);return function(e,t){void 0===t&&(t={});for(var r={},n="",i=(e=Array.isArray(e)?e:[e]).length-1;i>=0;i--)n+=o(e[i],t,r);return n.slice(1)}}function j(e,t,r){var n=e;return t&&(n=n[t]=n[t]||{}),r?n[r]=n[r]||{}:n}function O(e,t){var r=e.cssRules.length;try{e.insertRule(t,r)}catch(e){}}function w(e,t){var r=document.createElement("style");return e&&(r.media=e),r.dataset[t]="",r}function S(e,t){return document.head.insertBefore(e,t),e}function b(e,t,r,n,i){return void 0===e&&(e=""),void 0===t&&(t=0),void 0===r&&(r=10),void 0===n&&(n=35),void 0===i&&(i=1),Object.assign((function o(){var a=t+r;return a===n&&(r+=9*(n+1),n=Math.pow(36,++i)-1),t++,373===a?o():e+a.toString(36)}),{clone:function(){return b(e,t,r,n,i)}})}var x=function(e){function r(t,r,n){var i=this,o={},a={},f={},u=[],c=t.sheet;if(!function(e){return!!e&&"cssRules"in e}(c))throw new Error("HTMLStyleElement was not inserted properly into DOM");return(i=e.call(this,(function(e,t){var n,i=t?a[t]=null!==(n=a[t])&&void 0!==n?n:{}:o;if(i[e])return i[e];var f=r();return i[e]=f,O(c,l(f,e,t)),f}),(function(e){if(f[e])return f[e];var t=n();return f[e]=t,O(c,v(t,e)),t}),(function(e){-1===u.indexOf(e)&&(u.push(e),O(c,s(e)))}))||this).injectRaw=function(e){O(c,e)},i.hydrateClassName=function(e,t,n){var i;r(),(n?a[n]=null!==(i=a[n])&&void 0!==i?i:{}:o)[e]=t},i.hydrateKeyframes=function(e,t){n(),f[e]=t},i.hydrateFontFace=function(e){u.push(e)},i}return t(r,e),r}(y),C="{".charCodeAt(0),F="}".charCodeAt(0),A=/\.([\w]+)((?::.+)|(\[.+\]))?/,k=/@keyframes (.+)/,R=/@media (.+)/;function N(e){return function(t,r,n){for(var i=0,o="",a="",f="",u="",c=0;c<t.length;c++){var l=t[c],v=l.charCodeAt(0);if(o+=l,v!==C||(i++,a?2!==i:1!==i)){if(v===F){if(i--,a&&0===i){a="";continue}if(a?1===i:0===i){var s=null!=r?r:e(a);d=void 0;if(d=A.exec(f))s.hydrateClassName(u,d[1],d[2]);else if(d=k.exec(f))s.hydrateKeyframes(u,d[1]);else{if("@font-face"!==f)throw new Error("Unsupported CSS selector when hydrating in Glitz");s.hydrateFontFace(u)}n&&n(s,o),o="",f="",u="";continue}}(a?i>1:i>0)?u+=l:f+=l}else{var d;(d=R.exec(f))&&(a=d[1],o="",f="")}}}}var _=function(e){void 0===e&&(e={});var t,r=e.prefix,n=b(r),i=b(r),o=e.mediaOrder,a={},f=null,u={},c=e.identifier||"glitz",l=function(e){if(e){if(u[e])return u[e];var r=a[e]=w(e,c),l=null;if(o){var v=Object.keys(a).sort(o);f=a[v[0]],l=a[v[v.indexOf(e)+1]]||null}return S(r,l),u[e]=new x(r,n,i)}return t||(r=S(w(e,c),f),t=new x(r,n,i))};this.injectStyle=g(l,e.transformer);var v=this.hydrate=N(l),s=document.head.querySelectorAll("style[data-"+c+"]");if(s)for(var d=0,y=s;d<y.length;d++){var h=(C=y[d]).media,p=void 0;h?(f||(f=C),a[h]=C,p=u[h]=new x(C,n,i)):p=t=new x(C,n,i),v(C.textContent,p)}var m=document.body.querySelectorAll("style[data-"+c+"]");if(m)for(var j=0,O=m;j<O.length;j++){var C;v((C=O[j]).textContent,void 0,(function(e,t){return e.injectRaw(t)})),C.parentNode.removeChild(C)}},z=function(e){function r(t,n,i,o,a,f,u,c,d,y,h){void 0===i&&(i=!1),void 0===o&&(o={}),void 0===a&&(a={}),void 0===f&&(f={}),void 0===u&&(u=[]),void 0===c&&(c={}),void 0===d&&(d={}),void 0===y&&(y={}),void 0===h&&(h=[]);var p=this,m={},g={},j={},O=[],w={},S={},b={},x=[];function C(e){return function(){if(i)throw new Error(e+" is prohibited after injections")}}(p=e.call(this,(function(e,r){var n,f,u;i=!0;var c=r?a[r]=null!==(n=a[r])&&void 0!==n?n:{}:o;if(c[e])return c[e];var l=t(),v=r?g[r]=null!==(f=g[r])&&void 0!==f?f:{}:m,s=r?S[r]=null!==(u=S[r])&&void 0!==u?u:{}:w;return c[e]=v[e]=s[e]=l,l}),(function(e){if(i=!0,f[e])return f[e];var t=n();return f[e]=j[e]=b[e]=t,t}),(function(e){i=!0,-1===u.indexOf(e)&&(u.push(e),O.push(e),x.push(e))}))||this).getStyleResult=function(){for(var e="",t=0,r=O;t<r.length;t++){e+=s(i=r[t])}for(var n in j)e+=v(j[n],n);for(var i in m)e+=l(m[i],i);for(var o in g){var a=g[o];for(var i in a)e+=l(a[i],i,o)}return e},p.getStyleStream=function(){var e="";if(x.length>0){for(var t=0,r=x;t<r.length;t++){e+=s(i=r[t])}x.splice(0,x.length)}for(var n in b)e+=v(b[n],n),delete b[n];for(var i in w)e+=l(w[i],i),delete w[i];for(var o in S){var a=S[o];for(var i in a)e+=l(a[i],i,o);delete S[o]}return e};var F=C("Hydration");p.hydrateClassName=function(e,r,n){var i,f;F(),t();var u=n?a[n]=null!==(i=a[n])&&void 0!==i?i:{}:o,l=n?d[n]=null!==(f=d[n])&&void 0!==f?f:{}:c;u[e]=l[e]=r},p.hydrateKeyframes=function(e,t){F(),n(),f[e]=t,y[e]=t},p.hydrateFontFace=function(e){F(),u.push(e),h.push(e)};var A=C("Cloning");return p.clone=function(e,t){return A(),new r(e,t,i,E(c),E(d),E(y),h.slice(0),E(c),E(d),E(y),h.slice(0))},p}return t(r,e),r}(y);function E(e){var t={};for(var r in e){var n=e[r];t[r]="string"==typeof n?n:E(n)}return t}var K=function e(t,r,n,i,o){void 0===t&&(t={}),void 0===r&&(r=b(t.prefix)),void 0===n&&(n=b(t.prefix)),void 0===o&&(o={});var a=function(e){return e?o[e]=o[e]||new z(r,n):i=i||new z(r,n)};this.injectStyle=g(a,t.transformer),this.hydrate=N(a);var f=t.identifier||"glitz";this.getStyleMarkup=function(){var e="";i&&(e+="<style data-"+f+">"+i.getStyleResult()+"</style>");for(var r=0,n=t.mediaOrder?Object.keys(o).sort(t.mediaOrder):Object.keys(o);r<n.length;r++){var a=n[r];e+="<style data-"+f+' media="'+a+'">'+o[a].getStyleResult()+"</style>"}return e},this.getStyleStream=function(){var e,r="";i&&(r+=i.getStyleStream());for(var n=0,a=t.mediaOrder?Object.keys(o).sort(t.mediaOrder):Object.keys(o);n<a.length;n++){var u=a[n];r+=d(u,o[u].getStyleStream())}if(r)return["style",(e={},e["data-"+f]="",e),r]},this.clone=function(){var a=r.clone(),f=n.clone(),u={};for(var c in o)u[c]=o[c].clone(a,f);return new e(t,a,f,null==i?void 0:i.clone(a,f),u)}},M=function(e){void 0===e&&(e={}),this.diagnostics=[];var t,r=e.prefix,n=b(r),i=b(r),o={};this.injectStyle=g((function(e){return e?o[e]=o[e]||new z(n,i):t=t||new z(n,i)}),e.transformer),this.getStyle=function(){var r="";t&&(r+=t.getStyleResult());for(var n=0,i=e.mediaOrder?Object.keys(o).sort(e.mediaOrder):Object.keys(o);n<i.length;n++){var a=i[n];r+=d(a,o[a].getStyleResult())}return r}};function T(e){var t,r="";for(t in e){r&&(r+=" and ");var n=e[t];r+=!0===n?"("+f(t)+")":"("+f(t)+": "+n+")"}return r}exports.DEFAULT_HYDRATION_IDENTIFIER="glitz",exports.GlitzClient=_,exports.GlitzServer=K,exports.GlitzStatic=M,exports.compose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduceRight((function(e,t){return function(r){return t(e(r))}}))},exports.media=function(e,t){var r;return(r={})["@media "+("string"==typeof e?e:T(e))]=t,r},exports.query=T,exports.selector=function(e,t){var n;return"string"==typeof e?((n={})[e]=t,n):e.reduce((function(e,n){var i;return r(r({},e),((i={})[n]=t,i))}),{})};

@@ -542,3 +542,2 @@ const DEFAULT_HYDRATION_IDENTIFIER = 'glitz';

// tslint:disable no-conditional-assignment
const BLOCK_START_CODE = '{'.charCodeAt(0);

@@ -556,3 +555,2 @@ const BLOCK_END_CODE = '}'.charCodeAt(0);

let body = '';
// tslint:disable-next-line: prefer-for-of
for (let i = 0; i < css.length; i++) {

@@ -559,0 +557,0 @@ const character = css[i];

@@ -22,3 +22,3 @@ var DEFAULT_HYDRATION_IDENTIFIER = 'glitz';

({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);

@@ -616,3 +616,2 @@ };

// tslint:disable no-conditional-assignment
var BLOCK_START_CODE = '{'.charCodeAt(0);

@@ -630,3 +629,2 @@ var BLOCK_END_CODE = '}'.charCodeAt(0);

var body = '';
// tslint:disable-next-line: prefer-for-of
for (var i = 0; i < css.length; i++) {

@@ -633,0 +631,0 @@ var character = css[i];

{
"name": "@glitz/core",
"version": "3.0.0-alpha.12",
"version": "3.0.0-alpha.13",
"main": "./cjs/index.js",

@@ -15,3 +15,3 @@ "module": "./mjs/index.js",

"dependencies": {
"@glitz/type": "^3.0.0-alpha.6"
"@glitz/type": "^3.0.0-alpha.7"
},

@@ -29,3 +29,3 @@ "scripts": {

],
"gitHead": "ed8f3828fbd9d4d541ff90b65d3466cfbee14575"
"gitHead": "fa5ca3c6db980d5489c3190b1a431d79a188e44d"
}
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