Comparing version 0.1.0 to 0.1.1
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.b=e()}(this,function(){"use strict";function t(e){return e.hasOwnProperty("width")?e:t(Object.getPrototypeOf(e))}function e(t,e){return t.indexOf(e,t.length-e.length)>-1}function n(t){return t.charAt(0).toLowerCase()+t.slice(1)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function o(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function i(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function u(t){return t.charAt(0)+(t.match(/([A-Z])/g)||[]).join("").toLowerCase()}function c(t){var e=u(t),n=L[e]&&L[e]!==t?t:e;return M[n]=t,n}function f(t){return Object.keys(t).sort().map(function(e){return e.replace(/CLASS_NAME/g,t[e])}).join("")}function a(t){var e=[],n=[],r=!1;return Object.keys(t).forEach(function(o){"@"===o.charAt(0)?(e.push([o,t[o]]),delete t[o]):" "===o.charAt(0)||":"===o.charAt(0)?(n.push([o,t[o]]),delete t[o]):r=!0}),(r?l(".CLASS_NAME",t):"")+n.map(function(t){return l(".CLASS_NAME"+t[0],t[1])}).join("")+e.map(function(t){return t[0]+"{"+l(".CLASS_NAME",t[1])+"}"}).join("")}function l(t,e){return t+"{"+s("string"==typeof e?p(e):e.style||e)+"}"}function s(t){return Object.keys(d(t)).map(function(e){return g(t,e)}).join("")}function d(t){return Object.keys(t).forEach(function(e){e in P&&(t[P[e]]=t[e],delete t[e]);var n=t[e];n||0===n||""===n?"content"===e&&'"'!==n.charAt(0)?t[e]='"'+n+'"':t[e]=b(e,n):delete t[e]}),t}function p(t){return t.indexOf(";")>-1?m(t):y(t)}function m(t){return t.split(";").reduce(function(t,e){var n=e.trim().split(":"),r=n[0],i=n[1];return r&&i&&(t[o(r.trim())]=i.trim()),t},{})}function y(t){return t.split("\n").reduce(function(t,e){var n=e.trim().split(" ");if(n.length>1){var r=o(n.shift().trim());t[M[r]||r]=n.join(" ").trim()}return t},{})}function h(t){throw new Error("not implemented")}function g(t,e){return(T.test(e)?"-":"")+i(e)+":"+b(e,t[e])+";"}function b(t,e){return e+("number"==typeof e&&N.indexOf(t)>-1?"px":"")}function v(){U=!1,_.textContent=R+f(B)}function A(t){R+=String(t)}function O(t){var e=a(t);if(e in B)return B[e];var n=q+ ++Z;return B[e]=n,j(),n}function j(){U||(U=!0,W.resolve().then(v))}function w(t){var e=arguments;if(Array.isArray(t)&&Array.isArray(t.raw))arguments[0]={raw:arguments[0]},r(D,p(String.raw.apply(null,arguments)));else for(var n=0;n<arguments.length;n++)"string"==typeof e[n]?r(D,p(e[n])):"object"==typeof e[n]&&r(D,e[n].style||e[n]);return w}function k(t,e){w[t]=w[c(t)]=x(e||t)}function x(t){return function(e){return D[t]=void 0!==e&&e,w}}function S(t,e){return D=V,D[t]=e,w}function E(t){return function(){return V=D,D={},t}}function C(t,e){Object.defineProperty(w,t,{get:e})}var L={d:"display",bc:"backgroundColor",b:"border",bt:"borderTop",bl:"borderLeft",br:"borderRight",bb:"borderBottom",h:"height",w:"width",c:"color",o:"opacity",fs:"fontSize",m:"margin",mt:"marginTop",ml:"marginLeft",mr:"marginRight",mb:"marginBottom",p:"padding",pt:"paddingTop",pl:"paddingLeft",pr:"paddingRight",pb:"paddingBottom",bs:"boxShadow",ta:"textAlign",tt:"textTransform",ff:"fontFamily",t:"transform"},M=Object.create(null),$=Object.keys(t(document.documentElement.style)).filter(function(t){return"string"==typeof document.documentElement.style[t]}),P=Object.create(null,{}),T=/^(o|O|ms|MS|Ms|moz|Moz|webkit|Webkit|WebKit)([A-Z])/,z=window.navigator.userAgent.indexOf("Edge")>-1,N=function(){var t=document.createElement("div");return $.filter(function(n){try{t.style[n]="1px",t.style.setProperty(n,"1px")}catch(t){return}return e(!z&&t.style[n]||t.style.getPropertyValue(n),"px")}).concat("gridGap")}(),_=document.createElement("style"),B=Object.create(null,{}),R="",Z=0,U=!1,W=window.Promise||{resolve:function(){return{then:function(t){return setTimeout(t,0)}}}};document.head.appendChild(_);var q="b"+("000"+(46656*Math.random()|0).toString(36)).slice(-3)+("000"+(46656*Math.random()|0).toString(36)).slice(-3),F=0,G={},K=["active","any","checked","default","disabled","empty","enabled","first","first-child","first-of-type","fullscreen","focus","hover","indeterminate","in-range","invalid","last-child","last-of-type","left","link","only-child","only-of-type","optional","out-of-range","read-only","read-write","required","right","root","scope","target","valid","visited","dir","lang","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","after","before","first-letter","first-line","selection","backdrop","placeholder","marker","spelling-error","grammar-error"],V={},D={};return w.toString=function(){return"."+w.class},w.forceUpdate=v,w.$keyframes=function(t){var e=Object.keys(t).map(function(e){return l(e,t[e])}).join("");if(e in G)return G[e];var n=q+ ++F;return G[e]=n,A("@keyframes "+n+"{"+e+"}"),n},w.prepend=A,w.helper=function(t,e){return 1===arguments.length?h(t):"function"!=typeof e?(delete w[t],void C(t,function(){return r(D,e),w})):void(w[t]=function(){return r(D,e.apply(null,arguments)),w})},w.css=function(t,e){A(l(t,e.style||e))},$.forEach(function(t){if(T.test(t)){var e=n(t.replace(T,"$2"));if(-1===$.indexOf(e))return P[e]=t,k(e,t)}k(t)}),C("style",function(){var t=d(D);return D={},t}),C("class",function(){var t=O(D);return D={},t}),C("$animate",E(function(t,e){return D=V,w.animation(w.$keyframes(e)+" "+t),w})),C("$media",E(function(t,e){return S("@media "+t,e.style||e)})),C("$nest",E(function(t,e){return S((0===t.indexOf(":")?"":" ")+t,e.style||e)})),K.forEach(function(t){return C("$"+o(t),E(function(e,n){return S(":"+t+(n?"("+e+")":""),n?n.style||n:e.style||e)}))}),w}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.b=e()}(this,function(){"use strict";function t(e){return e.hasOwnProperty("width")?e:t(Object.getPrototypeOf(e))}function e(t,e){return t.indexOf(e,t.length-e.length)>-1}function n(t){return t.charAt(0).toLowerCase()+t.slice(1)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}function o(t){return t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}function i(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function u(t){return t.charAt(0)+(t.match(/([A-Z])/g)||[]).join("").toLowerCase()}function c(t){var e=u(t),n=L[e]&&L[e]!==t?t:e;return M[n]=t,n}function f(t){return Object.keys(t).sort().map(function(e){return e.replace(/CLASS_NAME/g,t[e])}).join("")}function a(t){var e=[],n=[],r=!1;return Object.keys(t).forEach(function(o){"@"===o.charAt(0)?(e.push([o,t[o]]),delete t[o]):" "===o.charAt(0)||":"===o.charAt(0)?(n.push([o,t[o]]),delete t[o]):r=!0}),(r?l(".CLASS_NAME",t):"")+n.map(function(t){return l(".CLASS_NAME"+t[0],t[1])}).join("")+e.map(function(t){return t[0]+"{"+l(".CLASS_NAME",t[1])+"}"}).join("")}function l(t,e){return t+"{"+s("string"==typeof e?p(e):e.style||e)+"}"}function s(t){return Object.keys(d(t)).map(function(e){return g(t,e)}).join("")}function d(t){return Object.keys(t).forEach(function(e){e in P&&(t[P[e]]=t[e],delete t[e]);var n=t[e];n||0===n||""===n?"content"===e&&'"'!==n.charAt(0)?t[e]='"'+n+'"':t[e]=b(e,n):delete t[e]}),t}function p(t){return t.indexOf(";")>-1?m(t):y(t)}function m(t){return t.split(";").reduce(function(t,e){var n=e.trim().split(":"),r=n[0],i=n[1];return r&&i&&(t[o(r.trim())]=i.trim()),t},{})}function y(t){return t.split("\n").reduce(function(t,e){var n=e.trim().split(" ");if(n.length>1){var r=o(n.shift().trim());t[M[r]||r]=n.join(" ").trim()}return t},{})}function h(t){throw new Error("not implemented")}function g(t,e){return(T.test(e)?"-":"")+i(e)+":"+b(e,t[e])+";"}function b(t,e){return e+("number"==typeof e&&N.indexOf(t)>-1?"px":"")}function v(){U=!1,_.textContent=R+f(B)}function A(t){R+=String(t),j()}function O(t){var e=a(t);if(e in B)return B[e];var n=q+ ++Z;return B[e]=n,j(),n}function j(){U||(U=!0,W.resolve().then(v))}function w(t){var e=arguments;if(Array.isArray(t)&&Array.isArray(t.raw))arguments[0]={raw:arguments[0]},r(D,p(String.raw.apply(null,arguments)));else for(var n=0;n<arguments.length;n++)"string"==typeof e[n]?r(D,p(e[n])):"object"==typeof e[n]&&r(D,e[n].style||e[n]);return w}function k(t,e){w[t]=w[c(t)]=x(e||t)}function x(t){return function(e){return D[t]=void 0!==e&&e,w}}function S(t,e){return D=V,D[t]=e,w}function E(t){return function(){return V=D,D={},t}}function C(t,e){Object.defineProperty(w,t,{get:e})}var L={d:"display",bc:"backgroundColor",b:"border",bt:"borderTop",bl:"borderLeft",br:"borderRight",bb:"borderBottom",h:"height",w:"width",c:"color",o:"opacity",fs:"fontSize",m:"margin",mt:"marginTop",ml:"marginLeft",mr:"marginRight",mb:"marginBottom",p:"padding",pt:"paddingTop",pl:"paddingLeft",pr:"paddingRight",pb:"paddingBottom",bs:"boxShadow",ta:"textAlign",tt:"textTransform",ff:"fontFamily",t:"transform"},M=Object.create(null),$=Object.keys(t(document.documentElement.style)).filter(function(t){return"string"==typeof document.documentElement.style[t]}),P=Object.create(null,{}),T=/^(o|O|ms|MS|Ms|moz|Moz|webkit|Webkit|WebKit)([A-Z])/,z=window.navigator.userAgent.indexOf("Edge")>-1,N=function(){var t=document.createElement("div");return $.filter(function(n){try{t.style[n]="1px",t.style.setProperty(n,"1px")}catch(t){return}return e(!z&&t.style[n]||t.style.getPropertyValue(n),"px")}).concat("gridGap")}(),_=document.createElement("style"),B=Object.create(null,{}),R="",Z=0,U=!1,W=window.Promise||{resolve:function(){return{then:function(t){return setTimeout(t,0)}}}};document.head.appendChild(_);var q="b"+("000"+(46656*Math.random()|0).toString(36)).slice(-3)+("000"+(46656*Math.random()|0).toString(36)).slice(-3),F=0,G={},K=["active","any","checked","default","disabled","empty","enabled","first","first-child","first-of-type","fullscreen","focus","hover","indeterminate","in-range","invalid","last-child","last-of-type","left","link","only-child","only-of-type","optional","out-of-range","read-only","read-write","required","right","root","scope","target","valid","visited","dir","lang","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","after","before","first-letter","first-line","selection","backdrop","placeholder","marker","spelling-error","grammar-error"],V={},D={};return w.toString=function(){return"."+w.class},w.forceUpdate=v,w.$keyframes=function(t){var e=Object.keys(t).map(function(e){return l(e,t[e])}).join("");if(e in G)return G[e];var n=q+ ++F;return G[e]=n,A("@keyframes "+n+"{"+e+"}"),n},w.prepend=A,w.helper=function(t,e){return 1===arguments.length?h(t):"function"!=typeof e?(delete w[t],void C(t,function(){return r(D,e),w})):void(w[t]=function(){return r(D,e.apply(null,arguments)),w})},w.css=function(t,e){A(l(t,e.style||e))},$.forEach(function(t){if(T.test(t)){var e=n(t.replace(T,"$2"));if(-1===$.indexOf(e))return P[e]=t,k(e,t)}k(t)}),C("style",function(){var t=d(D);return D={},t}),C("class",function(){var t=O(D);return D={},t}),C("$animate",E(function(t,e){return D=V,w.animation(w.$keyframes(e)+" "+t),w})),C("$media",E(function(t,e){return S("@media "+t,e.style||e)})),C("$nest",E(function(t,e){return S((0===t.indexOf(":")?"":" ")+t,e.style||e)})),K.forEach(function(t){return C("$"+o(t),E(function(e,n){return S(":"+t+(n?"("+e+")":""),n?n.style||n:e.style||e)}))}),w}); | ||
//# sourceMappingURL=bss.js.map |
@@ -27,2 +27,3 @@ import { objectToCss, getStyleSheetText } from './utils' | ||
prefix += String(string) | ||
scheduleUpdate() | ||
} | ||
@@ -29,0 +30,0 @@ |
{ | ||
"name": "bss", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Better Style Sheets", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -1,2 +0,2 @@ | ||
[![version](https://img.shields.io/npm/v/bss.svg)]() [![gzipped](http://img.badgesize.io/porsager/bss/bss.js?compression=gzip&label=gzipped)]() [![license](https://img.shields.io/github/license/porsager/wright.svg)]() | ||
[![version](https://img.shields.io/npm/v/bss.svg)]() [![gzipped](http://img.badgesize.io/porsager/bss/master/bss.js.svg?compression=gzip&label=gzipped)]() [![license](https://img.shields.io/github/license/porsager/wright.svg)]() | ||
@@ -3,0 +3,0 @@ ## `bss` |
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
57140
809
0