Comparing version 4.1.0 to 4.1.1
@@ -283,2 +283,7 @@ (function (global, factory) { | ||
/* weak */ | ||
function isChildSelector(property) { | ||
return property.charAt(0) === '>'; | ||
} | ||
/* weak */ | ||
function isMediaQuery(property) { | ||
@@ -288,2 +293,6 @@ return property.substr(0, 6) === '@media'; | ||
function isUndefinedValue(value) { | ||
return value === undefined || typeof value === 'string' && value.indexOf('undefined') > -1; | ||
} | ||
/* weak */ | ||
@@ -374,3 +383,3 @@ function applyMediaRulesInOrder(order) { | ||
if (value instanceof Object) { | ||
if (isPseudoSelector(property) || isAttributeSelector(property)) { | ||
if (isPseudoSelector(property) || isAttributeSelector(property) || isChildSelector(property)) { | ||
classNames += renderer._renderStyleToClassNames(value, pseudo + property, media); | ||
@@ -384,7 +393,14 @@ } else if (isMediaQuery(property)) { | ||
} else { | ||
var delcarationReference = media + pseudo + property + value; | ||
if (!renderer.cache[delcarationReference]) { | ||
var declarationReference = media + pseudo + property + value; | ||
if (!renderer.cache[declarationReference]) { | ||
// we remove undefined values to enable | ||
// usage of optional props without side-effects | ||
if (isUndefinedValue(value)) { | ||
renderer.cache[declarationReference] = ''; | ||
continue; | ||
} | ||
var className = generateClassName(++renderer.uniqueRuleIdentifier); | ||
renderer.cache[delcarationReference] = className; | ||
renderer.cache[declarationReference] = className; | ||
@@ -412,3 +428,3 @@ var cssDeclaration = generateCSSDeclaration(property, value); | ||
classNames += ' ' + renderer.cache[delcarationReference]; | ||
classNames += ' ' + renderer.cache[declarationReference]; | ||
} | ||
@@ -415,0 +431,0 @@ } |
@@ -1,1 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.Fela=r()}(this,function(){"use strict";function e(e,r){return r={exports:{}},e(r,r.exports),r.exports}function r(e,r){return T(e)+":"+r}function n(e){var n="";for(var t in e)n&&(n+=";"),n+=r(t,e[t]);return n}function t(e){return"@font-face{"+n(e)+"}"}function o(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],o=Object.keys(e).reduce(function(r,t){return r+t+"{"+n(e[t])+"}"},"");return t.reduce(function(e,n){return e+"@"+n+"keyframes "+r+"{"+o+"}"},"")}function i(e,r){return"@media "+e+"{"+r+"}"}function a(e){return"k"+e}function u(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e<=52?F[e-1]+r:u(e/52|0,F[e%52]+r)}function f(e,r){return 0===e.length?r:e+" and "+r}function c(e,r){return e+"{"+r+"}"}function s(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"."+e+r}function l(e){return e.replace(/\s{2,}/g,"")}function y(e,r,n){for(var t=0;t<r.length;++t)e=r[t](e,n);return e}function d(e,r){if("string"==typeof e)return l(e);var t=y(e,r,E);return n(t)}function p(e,r){return"string"==typeof e?e:r+JSON.stringify(e)}function h(e){return"["===e.charAt(0)}function m(e){return":"===e.charAt(0)}function v(e){return"@media"===e.substr(0,6)}function g(e){for(var r={},n=0,t=e.length;n<t;++n)r[e[n]]="";return r}function b(e){return'"'===e.charAt(0)?e:'"'+e+'"'}function O(e){for(var r=0,n=Q.length;r<n;++r){var t=Q[r];if(e.indexOf(t)!==-1)return K[t]}}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={listeners:[],keyframePrefixes:e.keyframePrefixes||["-webkit-","-moz-"],plugins:e.plugins||[],mediaQueryOrder:e.mediaQueryOrder||[],clear:function(){n.fontFaces="",n.keyframes="",n.statics="",n.rules="",n.mediaRules=g(n.mediaQueryOrder),n.rendered=[],n.uniqueRuleIdentifier=0,n.uniqueKeyframeIdentifier=0,n.cache={},n._emitChange({type:J})},renderRule:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=y(e(r),n.plugins,N);return n._renderStyleToClassNames(t).slice(1)},_renderStyleToClassNames:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i="";for(var a in e){var l=e[a];if(l instanceof Object){if(m(a)||h(a))i+=n._renderStyleToClassNames(l,t+a,o);else if(v(a)){var y=f(o,a.slice(6).trim());i+=n._renderStyleToClassNames(l,t,y)}}else{var d=o+t+a+l;if(!n.cache[d]){var p=u(++n.uniqueRuleIdentifier);n.cache[d]=p;var g=r(a,l),b=s(p,t),O=c(b,g);o?(n.mediaRules.hasOwnProperty(o)||(n.mediaRules[o]=""),n.mediaRules[o]+=O):n.rules+=O,n._emitChange({selector:b,declaration:g,media:o,type:N})}i+=" "+n.cache[d]}}return i},renderKeyframe:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e(r),i=JSON.stringify(t);if(!n.cache[i]){var u=a(++n.uniqueKeyframeIdentifier),f=y(t,n.plugins,I),c=o(f,u,n.keyframePrefixes);n.cache[i]=u,n.keyframes+=c,n._emitChange({name:u,keyframe:c,type:I})}return n.cache[i]},renderFont:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e+JSON.stringify(o);if(!n.cache[i]){var a=b(e),u=A.extends({},o,{src:r.map(function(e){return"url('"+e+"') format('"+O(e)+"')"}).join(","),fontFamily:a}),f=t(u);n.cache[i]=a,n.fontFaces+=f,n._emitChange({fontFamily:a,fontFace:f,type:q})}return n.cache[i]},renderStatic:function(e,r){var t=p(e,r);if(!n.cache[t]){var o=d(e,n.plugins);n.cache[t]=!0,"string"==typeof e?(n.statics+=o,n._emitChange({type:E,css:o})):(n.statics+=c(r,o),n._emitChange({selector:r,declaration:o,type:N,media:""}))}},renderToString:function(){var e=n.fontFaces+n.statics+n.keyframes+n.rules;for(var r in n.mediaRules)e+=i(r,n.mediaRules[r]);return e},subscribe:function(e){return n.listeners.push(e),{unsubscribe:function(){return n.listeners.splice(n.listeners.indexOf(e),1)}}},_emitChange:function(e){for(var r=0,t=n.listeners.length;r<t;++r)n.listeners[r](e)}};if(n.keyframePrefixes.push(""),n.clear(),e.enhancers)for(var l=0,C=e.enhancers.length;l<C;++l)n=e.enhancers[l](n);return n}function w(e){for(var r=arguments.length,n=Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];for(var o=0,i=n.length;o<i;++o){var a=n[o];for(var u in a){var f=a[u];e[u]instanceof Object&&f instanceof Object?e[u]=w({},e[u],f):e[u]=f}}return e}function x(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return function(e){for(var n={},t=0,o=r.length;t<o;++t)w(n,r[t](e));return n}}function j(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return function(e){return function(n){for(var t=e(n),o=0,i=r.length;o<i;++o)t=r[o](t);return t}}}function S(e,r){return function(n){n.type!==N||n.media?r.textContent=e.renderToString():r.sheet.insertRule(n.selector+"{"+n.declaration+"}",r.sheet.cssRules.length)}}function k(e){return e&&1===e.nodeType}function R(e,r){if(!k(r))throw new Error("You need to specify a valid element node (nodeType = 1) to render into.");r.setAttribute("data-fela-stylesheet","");var n=S(e,r);e.subscribe(n);var t=e.renderToString();r.textContent!==t&&(r.textContent=t)}function _(e,r){return console.warn("Importing `render` from `fela` is deprecated. Use `fela-dom` to import `render` instead."),R(e,r)}var A={};A.typeof="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},A.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},A.createClass=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),A.defineProperty=function(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e},A.extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},A.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},A.objectWithoutProperties=function(e,r){var n={};for(var t in e)r.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n},A.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},A.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r<e.length;r++)n[r]=e[r];return n}return Array.from(e)};var P=e(function(e){function r(e){return e in o?o[e]:o[e]=e.replace(n,"-$&").toLowerCase().replace(t,"-ms-")}var n=/[A-Z]/g,t=/^ms-/,o={};e.exports=r}),T=P&&"object"==typeof P&&"default"in P?P.default:P,F="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",N=1,I=2,q=3,E=4,J=5,K={".woff":"woff",".eot":"eot",".ttf":"truetype",".svg":"svg"},Q=Object.keys(K),z={createRenderer:C,combineRules:x,enhance:j,render:_};return z}); | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.Fela=r()}(this,function(){"use strict";function e(e,r){return r={exports:{}},e(r,r.exports),r.exports}function r(e,r){return N(e)+":"+r}function n(e){var n="";for(var t in e)n&&(n+=";"),n+=r(t,e[t]);return n}function t(e){return"@font-face{"+n(e)+"}"}function o(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],o=Object.keys(e).reduce(function(r,t){return r+t+"{"+n(e[t])+"}"},"");return t.reduce(function(e,n){return e+"@"+n+"keyframes "+r+"{"+o+"}"},"")}function i(e,r){return"@media "+e+"{"+r+"}"}function a(e){return"k"+e}function u(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e<=52?I[e-1]+r:u(e/52|0,I[e%52]+r)}function f(e,r){return 0===e.length?r:e+" and "+r}function c(e,r){return e+"{"+r+"}"}function s(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"."+e+r}function l(e){return e.replace(/\s{2,}/g,"")}function d(e,r,n){for(var t=0;t<r.length;++t)e=r[t](e,n);return e}function y(e,r){if("string"==typeof e)return l(e);var t=d(e,r,K);return n(t)}function p(e,r){return"string"==typeof e?e:r+JSON.stringify(e)}function h(e){return"["===e.charAt(0)}function m(e){return":"===e.charAt(0)}function v(e){return">"===e.charAt(0)}function g(e){return"@media"===e.substr(0,6)}function b(e){return void 0===e||"string"==typeof e&&e.indexOf("undefined")>-1}function O(e){for(var r={},n=0,t=e.length;n<t;++n)r[e[n]]="";return r}function C(e){return'"'===e.charAt(0)?e:'"'+e+'"'}function x(e){for(var r=0,n=L.length;r<n;++r){var t=L[r];if(e.indexOf(t)!==-1)return z[t]}}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={listeners:[],keyframePrefixes:e.keyframePrefixes||["-webkit-","-moz-"],plugins:e.plugins||[],mediaQueryOrder:e.mediaQueryOrder||[],clear:function(){n.fontFaces="",n.keyframes="",n.statics="",n.rules="",n.mediaRules=O(n.mediaQueryOrder),n.rendered=[],n.uniqueRuleIdentifier=0,n.uniqueKeyframeIdentifier=0,n.cache={},n._emitChange({type:Q})},renderRule:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=d(e(r),n.plugins,q);return n._renderStyleToClassNames(t).slice(1)},_renderStyleToClassNames:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",i="";for(var a in e){var l=e[a];if(l instanceof Object){if(m(a)||h(a)||v(a))i+=n._renderStyleToClassNames(l,t+a,o);else if(g(a)){var d=f(o,a.slice(6).trim());i+=n._renderStyleToClassNames(l,t,d)}}else{var y=o+t+a+l;if(!n.cache[y]){if(b(l)){n.cache[y]="";continue}var p=u(++n.uniqueRuleIdentifier);n.cache[y]=p;var O=r(a,l),C=s(p,t),x=c(C,O);o?(n.mediaRules.hasOwnProperty(o)||(n.mediaRules[o]=""),n.mediaRules[o]+=x):n.rules+=x,n._emitChange({selector:C,declaration:O,media:o,type:q})}i+=" "+n.cache[y]}}return i},renderKeyframe:function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=e(r),i=JSON.stringify(t);if(!n.cache[i]){var u=a(++n.uniqueKeyframeIdentifier),f=d(t,n.plugins,E),c=o(f,u,n.keyframePrefixes);n.cache[i]=u,n.keyframes+=c,n._emitChange({name:u,keyframe:c,type:E})}return n.cache[i]},renderFont:function(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e+JSON.stringify(o);if(!n.cache[i]){var a=C(e),u=T.extends({},o,{src:r.map(function(e){return"url('"+e+"') format('"+x(e)+"')"}).join(","),fontFamily:a}),f=t(u);n.cache[i]=a,n.fontFaces+=f,n._emitChange({fontFamily:a,fontFace:f,type:J})}return n.cache[i]},renderStatic:function(e,r){var t=p(e,r);if(!n.cache[t]){var o=y(e,n.plugins);n.cache[t]=!0,"string"==typeof e?(n.statics+=o,n._emitChange({type:K,css:o})):(n.statics+=c(r,o),n._emitChange({selector:r,declaration:o,type:q,media:""}))}},renderToString:function(){var e=n.fontFaces+n.statics+n.keyframes+n.rules;for(var r in n.mediaRules)e+=i(r,n.mediaRules[r]);return e},subscribe:function(e){return n.listeners.push(e),{unsubscribe:function(){return n.listeners.splice(n.listeners.indexOf(e),1)}}},_emitChange:function(e){for(var r=0,t=n.listeners.length;r<t;++r)n.listeners[r](e)}};if(n.keyframePrefixes.push(""),n.clear(),e.enhancers)for(var l=0,w=e.enhancers.length;l<w;++l)n=e.enhancers[l](n);return n}function j(e){for(var r=arguments.length,n=Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];for(var o=0,i=n.length;o<i;++o){var a=n[o];for(var u in a){var f=a[u];e[u]instanceof Object&&f instanceof Object?e[u]=j({},e[u],f):e[u]=f}}return e}function S(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return function(e){for(var n={},t=0,o=r.length;t<o;++t)j(n,r[t](e));return n}}function k(){for(var e=arguments.length,r=Array(e),n=0;n<e;n++)r[n]=arguments[n];return function(e){return function(n){for(var t=e(n),o=0,i=r.length;o<i;++o)t=r[o](t);return t}}}function R(e,r){return function(n){n.type!==q||n.media?r.textContent=e.renderToString():r.sheet.insertRule(n.selector+"{"+n.declaration+"}",r.sheet.cssRules.length)}}function A(e){return e&&1===e.nodeType}function _(e,r){if(!A(r))throw new Error("You need to specify a valid element node (nodeType = 1) to render into.");r.setAttribute("data-fela-stylesheet","");var n=R(e,r);e.subscribe(n);var t=e.renderToString();r.textContent!==t&&(r.textContent=t)}function P(e,r){return console.warn("Importing `render` from `fela` is deprecated. Use `fela-dom` to import `render` instead."),_(e,r)}var T={};T.typeof="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},T.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},T.createClass=function(){function e(e,r){for(var n=0;n<r.length;n++){var t=r[n];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(r,n,t){return n&&e(r.prototype,n),t&&e(r,t),r}}(),T.defineProperty=function(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e},T.extends=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t])}return e},T.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},T.objectWithoutProperties=function(e,r){var n={};for(var t in e)r.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n},T.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r},T.toConsumableArray=function(e){if(Array.isArray(e)){for(var r=0,n=Array(e.length);r<e.length;r++)n[r]=e[r];return n}return Array.from(e)};var F=e(function(e){function r(e){return e in o?o[e]:o[e]=e.replace(n,"-$&").toLowerCase().replace(t,"-ms-")}var n=/[A-Z]/g,t=/^ms-/,o={};e.exports=r}),N=F&&"object"==typeof F&&"default"in F?F.default:F,I="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",q=1,E=2,J=3,K=4,Q=5,z={".woff":"woff",".eot":"eot",".ttf":"truetype",".svg":"svg"},L=Object.keys(z),U={createRenderer:w,combineRules:S,enhance:k,render:P};return U}); |
@@ -25,6 +25,7 @@ 'use strict'; | ||
className = _ref.className, | ||
id = _ref.id, | ||
style = _ref.style, | ||
_ref$passThrough = _ref.passThrough, | ||
passThrough = _ref$passThrough === undefined ? [] : _ref$passThrough, | ||
ruleProps = _objectWithoutProperties(_ref, ['children', 'className', 'style', 'passThrough']); | ||
ruleProps = _objectWithoutProperties(_ref, ['children', 'className', 'id', 'style', 'passThrough']); | ||
@@ -38,2 +39,3 @@ // filter props to extract props to pass through | ||
componentProps.style = style; | ||
componentProps.id = id; | ||
@@ -40,0 +42,0 @@ var cls = className ? className + ' ' : ''; |
@@ -64,2 +64,6 @@ 'use strict'; | ||
var _isChildSelector = require('./utils/isChildSelector'); | ||
var _isChildSelector2 = _interopRequireDefault(_isChildSelector); | ||
var _isMediaQuery = require('./utils/isMediaQuery'); | ||
@@ -69,2 +73,6 @@ | ||
var _isUndefinedValue = require('./utils/isUndefinedValue'); | ||
var _isUndefinedValue2 = _interopRequireDefault(_isUndefinedValue); | ||
var _applyMediaRulesInOrder = require('./utils/applyMediaRulesInOrder'); | ||
@@ -135,3 +143,3 @@ | ||
if (value instanceof Object) { | ||
if ((0, _isPseudoSelector2.default)(property) || (0, _isAttributeSelector2.default)(property)) { | ||
if ((0, _isPseudoSelector2.default)(property) || (0, _isAttributeSelector2.default)(property) || (0, _isChildSelector2.default)(property)) { | ||
classNames += renderer._renderStyleToClassNames(value, pseudo + property, media); | ||
@@ -145,7 +153,14 @@ } else if ((0, _isMediaQuery2.default)(property)) { | ||
} else { | ||
var delcarationReference = media + pseudo + property + value; | ||
if (!renderer.cache[delcarationReference]) { | ||
var declarationReference = media + pseudo + property + value; | ||
if (!renderer.cache[declarationReference]) { | ||
// we remove undefined values to enable | ||
// usage of optional props without side-effects | ||
if ((0, _isUndefinedValue2.default)(value)) { | ||
renderer.cache[declarationReference] = ''; | ||
continue; | ||
} | ||
var className = (0, _generateClassName2.default)(++renderer.uniqueRuleIdentifier); | ||
renderer.cache[delcarationReference] = className; | ||
renderer.cache[declarationReference] = className; | ||
@@ -173,3 +188,3 @@ var cssDeclaration = (0, _generateCSSDeclaration2.default)(property, value); | ||
classNames += ' ' + renderer.cache[delcarationReference]; | ||
classNames += ' ' + renderer.cache[declarationReference]; | ||
} | ||
@@ -176,0 +191,0 @@ } |
@@ -27,3 +27,3 @@ 'use strict'; | ||
var selector = change.selector || change.fontFamily || change.name; | ||
var css = change.cssDeclaration || change.keyframe || change.fontFace || change.css; | ||
var css = change.declaration || change.keyframe || change.fontFace || change.css; | ||
var formattedCSS = options.format ? (0, _cssbeautify2.default)(css) : css; | ||
@@ -30,0 +30,0 @@ var isMedia = change.media && change.media.length > 0; |
@@ -6,3 +6,2 @@ 'use strict'; | ||
}); | ||
exports.resolveFallbackValues = resolveFallbackValues; | ||
@@ -30,2 +29,4 @@ var _hyphenateStyleName = require('hyphenate-style-name'); | ||
return resolveFallbackValues; | ||
}; | ||
}; | ||
module.exports = exports['default']; |
@@ -6,3 +6,2 @@ 'use strict'; | ||
}); | ||
exports.addVendorPrefixes = addVendorPrefixes; | ||
@@ -15,2 +14,4 @@ var _static = require('inline-style-prefixer/static'); | ||
var _fallbackValue2 = _interopRequireDefault(_fallbackValue); | ||
var _cssifyObject = require('../utils/cssifyObject'); | ||
@@ -25,2 +26,4 @@ | ||
var resolveFallbackValues = (0, _fallbackValue2.default)(); | ||
// TODO: refactor this messy piece of code | ||
@@ -37,3 +40,3 @@ // into clean, performant equivalent | ||
var declaration = _defineProperty({}, property, style[property]); | ||
var prefixedDeclaration = (0, _fallbackValue.resolveFallbackValues)((0, _static2.default)(declaration)); | ||
var prefixedDeclaration = resolveFallbackValues((0, _static2.default)(declaration)); | ||
@@ -53,2 +56,4 @@ var referenceProperty = Object.keys(prefixedDeclaration)[0]; | ||
return addVendorPrefixes; | ||
}; | ||
}; | ||
module.exports = exports['default']; |
{ | ||
"name": "fela", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Fast & Dynamic Styling in JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
133652
71
2121