Comparing version 11.5.0 to 11.5.1
@@ -209,3 +209,5 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
renderer._renderStyleToCache(cacheReference, processed.property, processed.value, processed.pseudo, processed.media, processed.support); | ||
if (!renderer.cache.hasOwnProperty(cacheReference)) { | ||
renderer._renderStyleToCache(cacheReference, processed.property, processed.value, processed.pseudo, processed.media, processed.support); | ||
} | ||
@@ -212,0 +214,0 @@ renderer.cacheMap[declarationReference] = cacheReference; |
@@ -268,3 +268,5 @@ 'use strict'; | ||
renderer._renderStyleToCache(cacheReference, processed.property, processed.value, processed.pseudo, processed.media, processed.support); | ||
if (!renderer.cache.hasOwnProperty(cacheReference)) { | ||
renderer._renderStyleToCache(cacheReference, processed.property, processed.value, processed.pseudo, processed.media, processed.support); | ||
} | ||
@@ -271,0 +273,0 @@ renderer.cacheMap[declarationReference] = cacheReference; |
{ | ||
"name": "fela", | ||
"version": "11.5.0", | ||
"version": "11.5.1", | ||
"description": "State-Driven Styling in JavaScript", | ||
@@ -42,6 +42,6 @@ "typings": "index.d.ts", | ||
"fast-loops": "^1.0.0", | ||
"fela-utils": "^11.5.0", | ||
"fela-utils": "^11.5.1", | ||
"isobject": "^3.0.1" | ||
}, | ||
"gitHead": "dc183b4df113206c2d7b6f28901e63fef16c7b8c" | ||
"gitHead": "a830cf6358d33bd27b1389e826e59ad8ce6981c6" | ||
} |
@@ -7,2 +7,2 @@ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Fela",[],t):"object"==typeof exports?exports.Fela=t():e.Fela=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r=0,o=e.length;r<o;++r)n=t(n,e[r],r,o,e);return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t="";for(var n in e){var r=e[n];"string"!=typeof r&&"number"!=typeof r||(t&&(t+=";"),t+=(0,i.default)(n,r))}return t};var r,o=n(2),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,i.default)(e)+":"+t};var r,o=n(8),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){for(var n=0,r=e.length;n<r;++n)t(e[n],n,r,e)}},function(e,t,n){"use strict"; | ||
* Released under the MIT License. | ||
*/e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r in e)n=t(n,e[r],r,e);return n}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e.filter((function(t,n){return e.lastIndexOf(t)===n}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){for(var n=0,i=arguments.length<=1?0:arguments.length-1;n<i;++n){var u=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];for(var f in u){var s=u[f],c=t[f];if(c&&s){if(Array.isArray(c)){t[f]=a(c.concat(s));continue}if(Array.isArray(s)){t[f]=a([c].concat(o(s)));continue}if("object"===r(s)){t[f]=e({},c,s);continue}}t[f]=s}}return t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e)};var r,o=n(9),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,o=/^ms-/,i={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(i.hasOwnProperty(e))return i[e];var t=e.replace(r,a);return i[e]=o.test(t)?"-"+t:t}},function(e,t,n){"use strict";n.r(t),n.d(t,"createRenderer",(function(){return z})),n.d(t,"combineRules",(function(){return q})),n.d(t,"enhance",(function(){return Q}));var r=n(2),o=n.n(r),i=n(3),a=n.n(i),u=n(0),f=n.n(u),s=n(4),c=n.n(s);function l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.plugins.length>0?f()(e.plugins,(function(t,o){return o(t,n,e,r)}),t):t}var d=/^(:|\[|>|&)/;function p(e){return d.test(e)}function y(e){return"@media"===e.substr(0,6)}function m(e,t){return 0===e.length?t:e+" and "+t}function h(e){return"@supports"===e.substr(0,9)}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+r+n+e+t}var v=/undefined|null/,b=/url/;var _=n(1),x=n.n(_);var O=n(5),w=n.n(O);function P(e){return w()(e,(e,t,n)=>`${e}${n}{${x()(t)}}`,"")}const A="abcdefghijklmnopqrstuvwxyz",j=A.length;function S(e,t=(()=>!0)){const n=function e(t,n=""){return t<=j?A[t-1]+n:e(t/j|0,A[t%j]+n)}(e());return t(n)?n:S(e,t)}function N(e){return"data:"===e.substr(0,5)}function C(e){return N(e)?e:`'${e}'`}const M={".woff":"woff",".woff2":"woff2",".eot":"embedded-opentype",".ttf":"truetype",".otf":"opentype",".svg":"svg",".svgz":"svg"},$={"image/svg+xml":"svg","application/x-font-woff":"woff","application/font-woff":"woff","application/x-font-woff2":"woff2","application/font-woff2":"woff2","font/woff2":"woff2","application/octet-stream":"truetype","application/x-font-ttf":"truetype","application/x-font-truetype":"truetype","application/x-font-opentype":"opentype","application/vnd.ms-fontobject":"embedded-opentype","application/font-sfnt":"sfnt"};function I(e=[],t=[]){const n=f()(t,(e,t,n)=>`${e}${n>0?",":""}local(${C(t)})`,""),r=f()(e,(e,t,n)=>{const r=n>0?",":"",o=function(e){if(N(e)){let t="";for(let n=5;;n++){const r=e.charAt(n);if(";"===r||","===r)break;t+=r}const n=$[t];if(n)return n;console.warn(`A invalid base64 font was used. Please use one of the following mime type: ${Object.keys($).join(", ")}.`)}else{let t="";for(let n=e.length-1;;n--){if("."===e.charAt(n)){const r=e.slice(n,e.length);t=r.includes("?")?r.split("?",1)[0]:r;break}}const n=M[t];if(n)return n;console.warn(`A invalid font-format was used in "${e}". Use one of these: ${Object.keys(M).join(", ")}.`)}return""}(t);return`${e}${r}url(${C(t)}) format('${o}')`},"");return`${n}${n.length>0&&r.length>0?",":""}${r}`}function k(e){return-1===e.indexOf("ad")}const T=/^[a-z_][a-z0-9-_]*$/gi;function R(e=""){return e.length>0&&null===e.match(T)&&console.error(`An invalid selectorPrefix (${e}) has been used to create a new Fela renderer.\nIt must only contain a-Z, 0-9, - and _ while it must start with either _ or a-Z.\nSee http://fela.js.org/docs/advanced/RendererConfiguration.html`),e}function F(e=[]){return function(t,n){return-1===e.indexOf(n)?-1===e.indexOf(t)?0:-1:-1===e.indexOf(t)?1:e.indexOf(t)-e.indexOf(n)}}function z(e={}){let t={listeners:[],keyframePrefixes:e.keyframePrefixes||["-webkit-","-moz-"],plugins:e.plugins||[],sortMediaQuery:e.sortMediaQuery||F(e.mediaQueryOrder),supportQueryOrder:e.supportQueryOrder||[],styleNodeAttributes:e.styleNodeAttributes||{},propertyPriority:e.propertyPriority||{},ruleOrder:[/^:link/,/^:visited/,/^:hover/,/^:focus-within/,/^:focus/,/^:active/],selectorPrefix:R(e.selectorPrefix),specificityPrefix:e.specificityPrefix||"",filterClassName:e.filterClassName||k,devMode:e.devMode||!1,uniqueRuleIdentifier:0,uniqueKeyframeIdentifier:0,nodes:{},scoreIndex:{},cache:{},getNextRuleIdentifier:()=>++t.uniqueRuleIdentifier,getNextKeyframeIdentifier:()=>++t.uniqueKeyframeIdentifier,renderRule:(e,n={})=>t._renderStyle(e(n,t),n),renderKeyframe(e,n={}){const r=e(n,t),o=l(t,r,"KEYFRAME",n),i=P(o);if(!t.cache.hasOwnProperty(i)){const e=t.selectorPrefix+t.generateAnimationName(n),r={type:"KEYFRAME",keyframe:function(e,t,n=[""],r){const o=r||P(e);return f()(n,(e,n)=>`${e}@${n}keyframes ${t}{${o}}`,"")}(o,e,t.keyframePrefixes,i),name:e};t.cache[i]=r,t._emitChange(r)}return t.cache[i].name},generateAnimationName:e=>"k"+t.getNextKeyframeIdentifier(),renderFont(e,n,r={}){const{localAlias:o,...i}=r,a=e+JSON.stringify(r),u=function(e){return"string"==typeof e?[e]:Array.isArray(e)?e.slice():[]}(o);if(!t.cache.hasOwnProperty(a)){const r='"'===(f=e).charAt(0)?f:`"${f}"`,o={type:"FONT",fontFace:function(e){return`@font-face{${x()(e)}}`}({...i,src:I(n,u),fontFamily:r}),fontFamily:r};t.cache[a]=o,t._emitChange(o)}var f;return t.cache[a].fontFamily},renderStatic(e,n){const r=function(e,t){return"string"==typeof e?e:t?t+JSON.stringify(e):""}(e,n);if(!t.cache.hasOwnProperty(r)){const o={type:"STATIC",css:function(e,t){if("string"==typeof e)return e.replace(/\s{2,}/g,"");const n=l(t,e,"STATIC");return x()(n)}(e,t),selector:n};t.cache[r]=o,t._emitChange(o)}},subscribe:e=>(t.listeners.push(e),{unsubscribe:()=>t.listeners.splice(t.listeners.indexOf(e),1)}),clear(){t.uniqueRuleIdentifier=0,t.uniqueKeyframeIdentifier=0,t.cache={},t._emitChange({type:"CLEAR"})},_renderStyle(e={},n={}){const r=l(t,e,"RULE",n);return t._renderStyleToClassNames(r).slice(1)},_renderStyleToClassNames({_className:e,...n},r="",o="",i=""){let a=e?" "+e:"";for(const e in n){const s=n[e];if(c()(s))if(p(e))a+=t._renderStyleToClassNames(s,r+("&"===(u=e).charAt(0)?u.slice(1):u),o,i);else if(y(e)){const n=m(o,e.slice(6).trim());a+=t._renderStyleToClassNames(s,r,n,i)}else if(h(e)){const n=m(i,e.slice(9).trim());a+=t._renderStyleToClassNames(s,r,o,n)}else console.warn(`The object key "${e}" is not a valid nested key in Fela.\nMaybe you forgot to add a plugin to resolve it?\nCheck http://fela.js.org/docs/basics/Rules.html#styleobject for more information.`);else{let n=g(e,s,r,o,i);if(t.cacheMap){if(!t.cacheMap.hasOwnProperty(n)){const a={property:e,value:s,pseudo:r,media:o,support:i},u=f()(t.optimizedPlugins,(e,n)=>n(e,t),a),c=g(u.property,u.value,u.pseudo,u.media,u.support);t._renderStyleToCache(c,u.property,u.value,u.pseudo,u.media,u.support),t.cacheMap[n]=c}n=t.cacheMap[n]}t.cache.hasOwnProperty(n)||t._renderStyleToCache(n,e,s,r,o,i);const u=t.cache[n].className;u&&(a+=" "+u)}}var u;return a},_renderStyleToCache(n,r,i,a,u,f){if(function(e){return null==e||"string"==typeof e&&v.test(e)&&!b.test(e)}(i))return void(t.cache[n]={className:""});const s=t.selectorPrefix+t.generateClassName(r,i,a,u,f),c=o()(r,i),l={type:"RULE",className:s,selector:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=("."+e).repeat(r);return""+n+o+t}(s,a,e.specificityPrefix,t.propertyPriority[r]),declaration:c,pseudo:a,media:u,support:f};t.cache[n]=l,t._emitChange(l)},generateClassName:(e,n,r,o,i)=>S(t.getNextRuleIdentifier,t.filterClassName),_emitChange(e){a()(t.listeners,t=>t(e))}};return t.keyframePrefixes.push(""),e.optimizeCaching&&(t.optimizedPlugins=t.plugins.filter(e=>e.optimized).map(e=>e.optimized),t.optimizedPlugins.length>0&&(t.plugins=t.plugins.filter(e=>!e.optimized),t.cacheMap={})),e.enhancers&&a()(e.enhancers,e=>{t=e(t)}),t}var E=n(6),K=n.n(E);function q(...e){return(t,n)=>f()(e,(e,r)=>{const o=function e(t,n,r){return Array.isArray(t)?e(q(...t),n,r):"function"==typeof t?t(n,r):t}(r,t,n);return o&&e._className&&(o._className=e._className+(o._className?" "+o._className:"")),K()(e,o)},{})}function Q(...e){return t=>n=>f()(e,(e,t)=>e=t(e),t(n))}}])})); | ||
*/e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n){for(var r in e)n=t(n,e[r],r,e);return n}},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){return e.filter((function(t,n){return e.lastIndexOf(t)===n}))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){for(var n=0,i=arguments.length<=1?0:arguments.length-1;n<i;++n){var u=n+1<1||arguments.length<=n+1?void 0:arguments[n+1];for(var f in u){var s=u[f],c=t[f];if(c&&s){if(Array.isArray(c)){t[f]=a(c.concat(s));continue}if(Array.isArray(s)){t[f]=a([c].concat(o(s)));continue}if("object"===r(s)){t[f]=e({},c,s);continue}}t[f]=s}}return t}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.default)(e)};var r,o=n(9),i=(r=o)&&r.__esModule?r:{default:r}},function(e,t,n){"use strict";n.r(t);var r=/[A-Z]/g,o=/^ms-/,i={};function a(e){return"-"+e.toLowerCase()}t.default=function(e){if(i.hasOwnProperty(e))return i[e];var t=e.replace(r,a);return i[e]=o.test(t)?"-"+t:t}},function(e,t,n){"use strict";n.r(t),n.d(t,"createRenderer",(function(){return z})),n.d(t,"combineRules",(function(){return q})),n.d(t,"enhance",(function(){return Q}));var r=n(2),o=n.n(r),i=n(3),a=n.n(i),u=n(0),f=n.n(u),s=n(4),c=n.n(s);function l(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.plugins.length>0?f()(e.plugins,(function(t,o){return o(t,n,e,r)}),t):t}var d=/^(:|\[|>|&)/;function p(e){return d.test(e)}function y(e){return"@media"===e.substr(0,6)}function m(e,t){return 0===e.length?t:e+" and "+t}function h(e){return"@supports"===e.substr(0,9)}function g(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"";return o+r+n+e+t}var v=/undefined|null/,b=/url/;var _=n(1),x=n.n(_);var O=n(5),w=n.n(O);function P(e){return w()(e,(e,t,n)=>`${e}${n}{${x()(t)}}`,"")}const A="abcdefghijklmnopqrstuvwxyz",j=A.length;function S(e,t=(()=>!0)){const n=function e(t,n=""){return t<=j?A[t-1]+n:e(t/j|0,A[t%j]+n)}(e());return t(n)?n:S(e,t)}function N(e){return"data:"===e.substr(0,5)}function C(e){return N(e)?e:`'${e}'`}const M={".woff":"woff",".woff2":"woff2",".eot":"embedded-opentype",".ttf":"truetype",".otf":"opentype",".svg":"svg",".svgz":"svg"},$={"image/svg+xml":"svg","application/x-font-woff":"woff","application/font-woff":"woff","application/x-font-woff2":"woff2","application/font-woff2":"woff2","font/woff2":"woff2","application/octet-stream":"truetype","application/x-font-ttf":"truetype","application/x-font-truetype":"truetype","application/x-font-opentype":"opentype","application/vnd.ms-fontobject":"embedded-opentype","application/font-sfnt":"sfnt"};function I(e=[],t=[]){const n=f()(t,(e,t,n)=>`${e}${n>0?",":""}local(${C(t)})`,""),r=f()(e,(e,t,n)=>{const r=n>0?",":"",o=function(e){if(N(e)){let t="";for(let n=5;;n++){const r=e.charAt(n);if(";"===r||","===r)break;t+=r}const n=$[t];if(n)return n;console.warn(`A invalid base64 font was used. Please use one of the following mime type: ${Object.keys($).join(", ")}.`)}else{let t="";for(let n=e.length-1;;n--){if("."===e.charAt(n)){const r=e.slice(n,e.length);t=r.includes("?")?r.split("?",1)[0]:r;break}}const n=M[t];if(n)return n;console.warn(`A invalid font-format was used in "${e}". Use one of these: ${Object.keys(M).join(", ")}.`)}return""}(t);return`${e}${r}url(${C(t)}) format('${o}')`},"");return`${n}${n.length>0&&r.length>0?",":""}${r}`}function k(e){return-1===e.indexOf("ad")}const T=/^[a-z_][a-z0-9-_]*$/gi;function R(e=""){return e.length>0&&null===e.match(T)&&console.error(`An invalid selectorPrefix (${e}) has been used to create a new Fela renderer.\nIt must only contain a-Z, 0-9, - and _ while it must start with either _ or a-Z.\nSee http://fela.js.org/docs/advanced/RendererConfiguration.html`),e}function F(e=[]){return function(t,n){return-1===e.indexOf(n)?-1===e.indexOf(t)?0:-1:-1===e.indexOf(t)?1:e.indexOf(t)-e.indexOf(n)}}function z(e={}){let t={listeners:[],keyframePrefixes:e.keyframePrefixes||["-webkit-","-moz-"],plugins:e.plugins||[],sortMediaQuery:e.sortMediaQuery||F(e.mediaQueryOrder),supportQueryOrder:e.supportQueryOrder||[],styleNodeAttributes:e.styleNodeAttributes||{},propertyPriority:e.propertyPriority||{},ruleOrder:[/^:link/,/^:visited/,/^:hover/,/^:focus-within/,/^:focus/,/^:active/],selectorPrefix:R(e.selectorPrefix),specificityPrefix:e.specificityPrefix||"",filterClassName:e.filterClassName||k,devMode:e.devMode||!1,uniqueRuleIdentifier:0,uniqueKeyframeIdentifier:0,nodes:{},scoreIndex:{},cache:{},getNextRuleIdentifier:()=>++t.uniqueRuleIdentifier,getNextKeyframeIdentifier:()=>++t.uniqueKeyframeIdentifier,renderRule:(e,n={})=>t._renderStyle(e(n,t),n),renderKeyframe(e,n={}){const r=e(n,t),o=l(t,r,"KEYFRAME",n),i=P(o);if(!t.cache.hasOwnProperty(i)){const e=t.selectorPrefix+t.generateAnimationName(n),r={type:"KEYFRAME",keyframe:function(e,t,n=[""],r){const o=r||P(e);return f()(n,(e,n)=>`${e}@${n}keyframes ${t}{${o}}`,"")}(o,e,t.keyframePrefixes,i),name:e};t.cache[i]=r,t._emitChange(r)}return t.cache[i].name},generateAnimationName:e=>"k"+t.getNextKeyframeIdentifier(),renderFont(e,n,r={}){const{localAlias:o,...i}=r,a=e+JSON.stringify(r),u=function(e){return"string"==typeof e?[e]:Array.isArray(e)?e.slice():[]}(o);if(!t.cache.hasOwnProperty(a)){const r='"'===(f=e).charAt(0)?f:`"${f}"`,o={type:"FONT",fontFace:function(e){return`@font-face{${x()(e)}}`}({...i,src:I(n,u),fontFamily:r}),fontFamily:r};t.cache[a]=o,t._emitChange(o)}var f;return t.cache[a].fontFamily},renderStatic(e,n){const r=function(e,t){return"string"==typeof e?e:t?t+JSON.stringify(e):""}(e,n);if(!t.cache.hasOwnProperty(r)){const o={type:"STATIC",css:function(e,t){if("string"==typeof e)return e.replace(/\s{2,}/g,"");const n=l(t,e,"STATIC");return x()(n)}(e,t),selector:n};t.cache[r]=o,t._emitChange(o)}},subscribe:e=>(t.listeners.push(e),{unsubscribe:()=>t.listeners.splice(t.listeners.indexOf(e),1)}),clear(){t.uniqueRuleIdentifier=0,t.uniqueKeyframeIdentifier=0,t.cache={},t._emitChange({type:"CLEAR"})},_renderStyle(e={},n={}){const r=l(t,e,"RULE",n);return t._renderStyleToClassNames(r).slice(1)},_renderStyleToClassNames({_className:e,...n},r="",o="",i=""){let a=e?" "+e:"";for(const e in n){const s=n[e];if(c()(s))if(p(e))a+=t._renderStyleToClassNames(s,r+("&"===(u=e).charAt(0)?u.slice(1):u),o,i);else if(y(e)){const n=m(o,e.slice(6).trim());a+=t._renderStyleToClassNames(s,r,n,i)}else if(h(e)){const n=m(i,e.slice(9).trim());a+=t._renderStyleToClassNames(s,r,o,n)}else console.warn(`The object key "${e}" is not a valid nested key in Fela.\nMaybe you forgot to add a plugin to resolve it?\nCheck http://fela.js.org/docs/basics/Rules.html#styleobject for more information.`);else{let n=g(e,s,r,o,i);if(t.cacheMap){if(!t.cacheMap.hasOwnProperty(n)){const a={property:e,value:s,pseudo:r,media:o,support:i},u=f()(t.optimizedPlugins,(e,n)=>n(e,t),a),c=g(u.property,u.value,u.pseudo,u.media,u.support);t.cache.hasOwnProperty(c)||t._renderStyleToCache(c,u.property,u.value,u.pseudo,u.media,u.support),t.cacheMap[n]=c}n=t.cacheMap[n]}t.cache.hasOwnProperty(n)||t._renderStyleToCache(n,e,s,r,o,i);const u=t.cache[n].className;u&&(a+=" "+u)}}var u;return a},_renderStyleToCache(n,r,i,a,u,f){if(function(e){return null==e||"string"==typeof e&&v.test(e)&&!b.test(e)}(i))return void(t.cache[n]={className:""});const s=t.selectorPrefix+t.generateClassName(r,i,a,u,f),c=o()(r,i),l={type:"RULE",className:s,selector:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=("."+e).repeat(r);return""+n+o+t}(s,a,e.specificityPrefix,t.propertyPriority[r]),declaration:c,pseudo:a,media:u,support:f};t.cache[n]=l,t._emitChange(l)},generateClassName:(e,n,r,o,i)=>S(t.getNextRuleIdentifier,t.filterClassName),_emitChange(e){a()(t.listeners,t=>t(e))}};return t.keyframePrefixes.push(""),e.optimizeCaching&&(t.optimizedPlugins=t.plugins.filter(e=>e.optimized).map(e=>e.optimized),t.optimizedPlugins.length>0&&(t.plugins=t.plugins.filter(e=>!e.optimized),t.cacheMap={})),e.enhancers&&a()(e.enhancers,e=>{t=e(t)}),t}var E=n(6),K=n.n(E);function q(...e){return(t,n)=>f()(e,(e,r)=>{const o=function e(t,n,r){return Array.isArray(t)?e(q(...t),n,r):"function"==typeof t?t(n,r):t}(r,t,n);return o&&e._className&&(o._className=e._className+(o._className?" "+o._className:"")),K()(e,o)},{})}function Q(...e){return t=>n=>f()(e,(e,t)=>e=t(e),t(n))}}])})); |
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
87413
1435
Updatedfela-utils@^11.5.1