emphasizer
Advanced tools
Comparing version 1.5.0 to 1.6.0
@@ -1,2 +0,2 @@ | ||
import { ColorProperty } from 'csstype'; | ||
import { ColorProperty } from "csstype"; | ||
declare function emphasizeColor(fromValue: ColorProperty, toValue: ColorProperty, rate: number): ColorProperty; | ||
@@ -3,0 +3,0 @@ declare function emphasizeColor(fromValue: ColorProperty, toValue: ColorProperty, fromRate: number, toRate: number, rate: number): ColorProperty; |
@@ -1,4 +0,4 @@ | ||
export * from './style'; | ||
export * from './style-property'; | ||
export * from './number'; | ||
export * from './color'; | ||
export * from "./style"; | ||
export * from "./style-property"; | ||
export * from "./number"; | ||
export * from "./color"; |
@@ -1,1 +0,46 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var units=require("jolor/lib/units"),jolor=require("jolor"),extendStatics=function(e,t){return(extendStatics=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])})(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function __spreadArrays(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)n[o]=i[a];return n}function emphasizeNumberBase(e,t,r,n,o){var i=e<=t,a=Math.min(e,t),s=Math.max(e,t),p=s-a,u=r<=n,m=Math.min(r,n),c=p/(Math.max(r,n)-m)*(o-m);return c=Math.round(100*c)/100,keepRange(e,t,i==u?a+c:s-c)}function keepRange(e,t,r){var n=Math.max(e,t),o=Math.min(e,t);return r<o?o:n<r?n:r}function emphasizeNumber(e,t,r,n,o){return"number"==typeof n&&"number"==typeof o?emphasizeNumberBase(e,t,r,n,o):emphasizeNumberBase(e,t,0,1,r)}var colorPattern=new units.ColorRegexPattern;function dimentionValue(){return"(-)?\\d+"}function hasDimentionUnit(){return"[a-z%]+"}function anyDimentionUnit(){return"([a-z%])*"}function semicolon(){return";"}function whiteSpace(){return"\\s*"}function wrapStartEnd(e){return"^"+whiteSpace()+e+whiteSpace()+"$"}function wrapOptional(e){return"("+e+")?"}function dimention(){return""+dimentionValue()+anyDimentionUnit()}function startDimention(){return"^"+whiteSpace()+dimentionValue()+anyDimentionUnit()}function completeDimention(e){void 0===e&&(e=1);for(var t=[],r=0;r<e;r++)t.push(dimention());return wrapStartEnd(""+t.join(whiteSpace())+whiteSpace()+wrapOptional(semicolon()))}function type(){return"[a-z]+"}function completeBorder(){return wrapStartEnd(join(dimention(),type(),colorPattern.colorPatternString,wrapOptional(semicolon())))}function join(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.join(whiteSpace())}var boxShadowInset="(inset)?";function completeBoxShadow2(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),colorPattern.colorPatternString,boxShadowInset,wrapOptional(semicolon())))}function completeBoxShadow3(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),dimention(),colorPattern.colorPatternString,boxShadowInset,wrapOptional(semicolon())))}function completeBoxShadow4(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),dimention(),dimention(),colorPattern.colorPatternString,boxShadowInset,wrapOptional(semicolon())))}var StylePropertyPatterns=function(){function e(){}return e.completeDimention1=new RegExp(completeDimention(1),"gi"),e.completeDimention2=new RegExp(completeDimention(2),"gi"),e.completeDimention3=new RegExp(completeDimention(3),"gi"),e.completeDimention4=new RegExp(completeDimention(4),"gi"),e.dimention=new RegExp(dimention(),"gi"),e.startDimention=new RegExp(startDimention(),"gi"),e.dimentionValue=new RegExp(dimentionValue(),"gi"),e.hasDimentionUnit=new RegExp(hasDimentionUnit(),"gi"),e.completeBorder=new RegExp(completeBorder(),"gi"),e.completeBoxShadow2=new RegExp(completeBoxShadow2(),"gi"),e.completeBoxShadow3=new RegExp(completeBoxShadow3(),"gi"),e.completeBoxShadow4=new RegExp(completeBoxShadow4(),"gi"),e}(),BaseParser=function(){function e(){this.parserColor=new units.ColorRegexPattern}return e.prototype.firstMatch=function(e,t){var r,n=t.match(e);return n&&(r=n[0]),r},e.prototype.match=function(e,t){return t.lastIndex=0,t.test(this.toString(e))},e.prototype.toString=function(e){var t="";return"string"==typeof e?t=e:"number"==typeof e&&(t=e.toString()),t},e.prototype.trim=function(e){return(e||"").replace(/^\s*/gi,"").replace(/\s$/gi,"")},e.prototype.parseDimention=function(e){var t,r=0,n=this.toString(e).match(StylePropertyPatterns.dimention);return n&&n.length&&(r=parseFloat(this.firstMatch(StylePropertyPatterns.dimentionValue,n[0])||"0"),t=this.firstMatch(StylePropertyPatterns.hasDimentionUnit,n[0])),{value:r,dimension:t}},e.prototype.parseDimentionSet=function(e){var t=[],r=this.toString(e).match(StylePropertyPatterns.dimention);if(r)for(var n=0,o=r;n<o.length;n++){var i=o[n];t.push(this.parseDimention(i))}return t},e.prototype.trimColor=function(e){return this.parserColor.foreachColors(this.toString(e),function(e){return e.replace(/\s+/gi,"")})},e.prototype.split=function(e){return this.trim(this.toString(e)).split(/\s+/gi)},e.prototype.fixedOptions=function(e,t){var r=e.length,n=t-r;if(n)if(1==n){if(3===r)return[e[0],e[0],e[0],e[0]];if(2===r)return[e[0],e[0],e[0]];if(1===r)return[e[0],e[0]]}else if(2==n){if(2===r)return[e[0],e[1],e[0],e[2]];if(1===r)return[e[0],e[1],e[0]]}else if(3==n&&1===r)return[e[0],e[1],e[2],e[1]];return e},e.prototype.emphasizeDimentionSet=function(e,t,r,n,o){for(var i=[],a=Math.max(e.length,t.length),s=this.fixedOptions(e,a),p=this.fixedOptions(t,a),u=__spreadArrays(s.map(function(e){return e.dimension})).find(function(e){return e}),m=0;m<s.length;m++)i.push({value:emphasizeNumber(s[m].value,p[m].value,r,n,o),dimension:u});return i.map(function(e){return""+e.value+(e.dimension||"")}).join(" ")},e}();function emphasizeColorBase(e,t,r,n,o){var i=new jolor.Color(e),a=new jolor.Color(t),s=Math.round(emphasizeNumber(i.rgbObject.r,a.rgbObject.r,r,n,o)),p=Math.round(emphasizeNumber(i.rgbObject.g,a.rgbObject.g,r,n,o)),u=Math.round(emphasizeNumber(i.rgbObject.b,a.rgbObject.b,r,n,o)),m=Math.round(emphasizeNumber(i.opacity,a.opacity,r,n,o));return jolor.toHex(s,p,u,m)||e}function emphasizeColor(e,t,r,n,o){return"number"==typeof n&&"number"==typeof o?emphasizeColorBase(e,t,r,n,o):emphasizeColorBase(e,t,0,1,r)}function splitColor(e,t,r){for(var n=[],o=1;o<=r;o++)n.push(emphasizeColorBase(e,t,1,r,o));return n}var BorderParser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return"BorderParser"},enumerable:!0,configurable:!0}),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeBorder)},t.prototype.parse=function(e){var t=this.split(this.trimColor(e)),r=this.parseDimention(t[0]);return{value:r.value,dimension:r.dimension,type:t[1],color:t[2]}},t.prototype.emphasize=function(e,t,r,n,o){var i=this.parse(e),a=this.parse(t),s=i.dimension,p=i.type;return""+emphasizeNumber(i.value,a.value,r,n,o)+(s||"")+" "+p+" "+emphasizeColor(i.color,a.color,r,n,o)},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["border"]},enumerable:!0,configurable:!0}),t}(BaseParser),DimentionBaseParser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return"DimentionParser"},enumerable:!0,configurable:!0}),t.prototype.emphasize=function(e,t,r,n,o){var i=this.parse(e),a=this.parse(t);return this.emphasizeDimentionSet(i,a,r,n,o)},t}(BaseParser),Dimention1Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeDimention1)},t.prototype.parse=function(e){return[this.parseDimention(e)]},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["width","fontSize"]},enumerable:!0,configurable:!0}),t}(DimentionBaseParser),Dimention2Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeDimention2)},t.prototype.parse=function(e){var t=this.parseDimentionSet(e);return[t[0],t[1]]},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["margin","padding"]},enumerable:!0,configurable:!0}),t}(DimentionBaseParser),Dimention3Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeDimention3)},t.prototype.parse=function(e){var t=this.parseDimentionSet(e);return[t[0],t[1],t[2]]},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["margin","padding"]},enumerable:!0,configurable:!0}),t}(DimentionBaseParser),Dimention4Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeDimention4)},t.prototype.parse=function(e){var t=this.parseDimentionSet(e);return[t[0],t[1],t[2],t[3]]},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["margin","padding"]},enumerable:!0,configurable:!0}),t}(DimentionBaseParser),ColorParser=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.colorParser=new units.ColorRegexPattern,e}return __extends(e,t),Object.defineProperty(e.prototype,"key",{get:function(){return"ColorParser"},enumerable:!0,configurable:!0}),e.prototype.isMatch=function(e){return this.colorParser.isColor(this.toString(e))},e.prototype.emphasize=function(e,t,r,n,o){return emphasizeColor(this.toString(e),this.toString(t),r,n,o)},Object.defineProperty(e.prototype,"propertyNames",{get:function(){return["color"]},enumerable:!0,configurable:!0}),e}(BaseParser),BoxShadowBaseParser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),Object.defineProperty(t.prototype,"key",{get:function(){return"BoxShadowParser"},enumerable:!0,configurable:!0}),t.prototype.parseInset=function(e){var t=this.toString(e),r=/\s*inset\s*/gi.test(t);return r&&(t=t.replace(/inset/gi,"")),{inset:r,restText:t}},t.prototype.emphasize=function(e,t,r,n,o){var i=this.parse(e),a=this.parse(t),s=this.emphasizeDimentionSet(i.dimentions,a.dimentions,r,n,o),p=emphasizeColor(i.color,a.color,r,n,o);return(i.inset&&a.inset?"inset ":"")+s+" "+p},Object.defineProperty(t.prototype,"propertyNames",{get:function(){return["boxShadow"]},enumerable:!0,configurable:!0}),t}(BaseParser),BoxShadow2Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeBoxShadow2)},t.prototype.parse=function(e){var t=this.parseInset(e),r=t.inset,n=t.restText,o=this.split(this.trimColor(n));return{inset:r,dimentions:[this.parseDimention(o[0]),this.parseDimention(o[1])],color:o[2]}},t}(BoxShadowBaseParser),BoxShadow3Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeBoxShadow3)},t.prototype.parse=function(e){var t=this.parseInset(e),r=t.inset,n=t.restText,o=this.split(this.trimColor(n));return{inset:r,dimentions:[this.parseDimention(o[0]),this.parseDimention(o[1]),this.parseDimention(o[2])],color:o[3]}},t}(BoxShadowBaseParser),BoxShadow4Parser=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.isMatch=function(e){return this.match(e,StylePropertyPatterns.completeBoxShadow4)},t.prototype.parse=function(e){var t=this.parseInset(e),r=t.inset,n=t.restText,o=this.split(this.trimColor(n));return{inset:r,dimentions:[this.parseDimention(o[0]),this.parseDimention(o[1]),this.parseDimention(o[2]),this.parseDimention(o[3])],color:o[4]}},t}(BoxShadowBaseParser),dimention1=new Dimention1Parser,dimention2=new Dimention2Parser,dimention3=new Dimention3Parser,dimention4=new Dimention4Parser,color=new ColorParser,border=new BorderParser,boxShadow2=new BoxShadow2Parser,boxShadow3=new BoxShadow3Parser,boxShadow4=new BoxShadow4Parser,d1=[dimention1],d1to4=[dimention1,dimention2,dimention3,dimention4],c1=[color],b1=[border],ParserManager={width:d1,minWidth:d1,maxWidth:d1,height:d1,minHeight:d1,maxHeight:d1,border:b1,borderColor:c1,borderBottom:b1,borderBottomColor:c1,borderBottomWidth:d1,borderLeft:b1,borderLeftColor:c1,borderLeftWidth:d1,borderRight:b1,borderRightColor:c1,borderRightWidth:d1,borderTop:b1,borderTopColor:c1,borderTopWidth:d1,borderRadius:d1to4,borderBottomLeftRadius:d1,borderBottomRightRadius:d1,borderTopLeftRadius:d1,borderTopRightRadius:d1,padding:d1to4,paddingBottom:d1,paddingLeft:d1,paddingRight:d1,paddingTop:d1,margin:d1to4,marginBottom:d1,marginLeft:d1,marginRight:d1,marginTop:d1,bottom:d1,left:d1,right:d1,top:d1,color:c1,backgroundColor:c1,caretColor:c1,outlineColor:c1,textDecorationColor:c1,fontSize:d1,boxShadow:[boxShadow2,boxShadow3,boxShadow4]};function emphasizeStylePropertyBase(e,t,r,n,o,i){if("number"==typeof t&&"number"==typeof r)return emphasizeNumber(t,r,n,o,i);var a=ParserManager[e];if(a&&a.length){for(var s=void 0,p=void 0,u=0;u<a.length;u++){var m=a[u];if(s||m.isMatch(t)&&(s=m),p||m.isMatch(r)&&(p=m),s&&p)break}if(s&&p){if(s.key===p.key)return s.emphasize(t,r,n,o,i)}else{if(s)return t;if(p)return r}}}function emphasizeStyleProperty(e,t,r,n,o,i){return"number"==typeof o&&"number"==typeof i?emphasizeStylePropertyBase(e,t,r,n,o,i):emphasizeStylePropertyBase(e,t,r,0,1,n)}function emphasizeStyleBase(e,t,r,n,o){for(var i={},a=0,s=__spreadArrays(Object.keys(e),Object.keys(t));a<s.length;a++){var p=s[a];(e.hasOwnProperty(p)||t.hasOwnProperty(p))&&(i[p]=emphasizeStyleProperty(p,e[p],t[p],r,n,o))}return i}function emphasizeStyle(e,t,r,n,o){return"number"==typeof n&&"number"==typeof o?emphasizeStyleBase(e,t,r,n,o):emphasizeStyleBase(e,t,0,1,r)}exports.emphasizeColor=emphasizeColor,exports.emphasizeNumber=emphasizeNumber,exports.emphasizeStyle=emphasizeStyle,exports.emphasizeStyleProperty=emphasizeStyleProperty,exports.splitColor=splitColor; | ||
'use strict'; | ||
var units = require('jolor/lib/units'); | ||
var jolor = require('jolor'); | ||
function emphasizeNumberBase(_0x2560ab,_0x30fa95,_0x736452,_0x3ab945,_0xb71f55){const _0x1b659f=_0x2560ab<=_0x30fa95,_0x185ba9=Math['min'](_0x2560ab,_0x30fa95),_0x3d3f82=Math['max'](_0x2560ab,_0x30fa95),_0x1c2e38=_0x3d3f82-_0x185ba9,_0x2bdea4=_0x736452<=_0x3ab945,_0x12345b=Math['min'](_0x736452,_0x3ab945),_0x167011=Math['max'](_0x736452,_0x3ab945),_0x32a964=_0x167011-_0x12345b;let _0x192aa3=0x0;return _0x32a964!==0x0&&(_0x192aa3=_0x1c2e38/_0x32a964*(_0xb71f55-_0x12345b)),_0x192aa3=Math['round'](_0x192aa3*0x64)/0x64,_0x1b659f===_0x2bdea4?keepRange(_0x2560ab,_0x30fa95,_0x185ba9+_0x192aa3):keepRange(_0x2560ab,_0x30fa95,_0x3d3f82-_0x192aa3);}function keepRange(_0xc87864,_0xeac5c6,_0x27210b){const _0x2cef3a=Math['max'](_0xc87864,_0xeac5c6),_0x4a1a44=Math['min'](_0xc87864,_0xeac5c6);if(_0x27210b<_0x4a1a44)return _0x4a1a44;else return _0x27210b>_0x2cef3a?_0x2cef3a:_0x27210b;}function emphasizeNumber(_0x391a54,_0x3cfac5,_0x11a105,_0x27d6dd,_0x29b59e){return typeof _0x27d6dd==='number'&&typeof _0x29b59e==='number'?emphasizeNumberBase(_0x391a54,_0x3cfac5,_0x11a105,_0x27d6dd,_0x29b59e):emphasizeNumberBase(_0x391a54,_0x3cfac5,0x0,0x1,_0x11a105);} | ||
const colorPattern=new units.ColorRegexPattern();function dimentionValue(){return '(-)?\x5cd+';}function hasDimentionUnit(){return '[a-z%]+';}function anyDimentionUnit(){return '([a-z%])*';}function semicolon(){return ';';}function whiteSpace(){return '\x5cs*';}function wrapStartEnd(_0x5a0c6c){return '^'+whiteSpace()+_0x5a0c6c+whiteSpace()+'$';}function wrapOptional(_0x3f1184){return '('+_0x3f1184+')?';}function dimention(){return ''+dimentionValue()+anyDimentionUnit();}function startDimention(){return '^'+whiteSpace()+dimentionValue()+anyDimentionUnit();}function completeDimention(_0x19e1b8=0x1){const _0x409890=[];for(let _0x5b85ea=0x0;_0x5b85ea<_0x19e1b8;_0x5b85ea++){_0x409890['push'](dimention());}return wrapStartEnd(''+_0x409890['join'](whiteSpace())+whiteSpace()+wrapOptional(semicolon()));}function type(){return '[a-z]+';}function completeBorder(){return wrapStartEnd(join(dimention(),type(),colorPattern['colorPatternString'],wrapOptional(semicolon())));}function join(..._0xc1c6b){return _0xc1c6b['join'](whiteSpace());}const boxShadowInset='(inset)?';function completeBoxShadow2(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),colorPattern['colorPatternString'],boxShadowInset,wrapOptional(semicolon())));}function completeBoxShadow3(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),dimention(),colorPattern['colorPatternString'],boxShadowInset,wrapOptional(semicolon())));}function completeBoxShadow4(){return wrapStartEnd(join(boxShadowInset,dimention(),dimention(),dimention(),dimention(),colorPattern['colorPatternString'],boxShadowInset,wrapOptional(semicolon())));}class StylePropertyPatterns{static ['completeDimention1']=new RegExp(completeDimention(0x1),'gi');static ['completeDimention2']=new RegExp(completeDimention(0x2),'gi');static ['completeDimention3']=new RegExp(completeDimention(0x3),'gi');static ['completeDimention4']=new RegExp(completeDimention(0x4),'gi');static ['dimention']=new RegExp(dimention(),'gi');static ['startDimention']=new RegExp(startDimention(),'gi');static ['dimentionValue']=new RegExp(dimentionValue(),'gi');static ['hasDimentionUnit']=new RegExp(hasDimentionUnit(),'gi');static ['completeBorder']=new RegExp(completeBorder(),'gi');static ['completeBoxShadow2']=new RegExp(completeBoxShadow2(),'gi');static ['completeBoxShadow3']=new RegExp(completeBoxShadow3(),'gi');static ['completeBoxShadow4']=new RegExp(completeBoxShadow4(),'gi');} | ||
class BaseParser{['parserColor']=new units.ColorRegexPattern();['firstMatch'](_0x273c48,_0x5590fc){let _0x3ac5ec;const _0x5ac213=_0x5590fc['match'](_0x273c48);return _0x5ac213&&(_0x3ac5ec=_0x5ac213[0x0]),_0x3ac5ec;}['match'](_0xd4858b,_0x476943){return _0x476943['lastIndex']=0x0,_0x476943['test'](this['toString'](_0xd4858b));}['toString'](_0x1acd66){let _0x5bb0ce='';if(typeof _0x1acd66==='string')_0x5bb0ce=_0x1acd66;else typeof _0x1acd66==='number'&&(_0x5bb0ce=_0x1acd66['toString']());return _0x5bb0ce;}['trim'](_0x1a2875){return (_0x1a2875||'')['replace'](/^\s*/gi,'')['replace'](/\s$/gi,'');}['parseDimention'](_0x197092){let _0xa0f2cd=0x0,_0xffe4f2;const _0x2d5362=this['toString'](_0x197092)['match'](StylePropertyPatterns['dimention']);return _0x2d5362&&_0x2d5362['length']&&(_0xa0f2cd=parseFloat(this['firstMatch'](StylePropertyPatterns['dimentionValue'],_0x2d5362[0x0])||'0'),_0xffe4f2=this['firstMatch'](StylePropertyPatterns['hasDimentionUnit'],_0x2d5362[0x0])),{'value':_0xa0f2cd,'dimension':_0xffe4f2};}['parseDimentionSet'](_0x14267d){const _0x330ad3=[],_0x4f2ff8=this['toString'](_0x14267d)['match'](StylePropertyPatterns['dimention']);if(_0x4f2ff8)for(const _0x4a6682 of _0x4f2ff8){_0x330ad3['push'](this['parseDimention'](_0x4a6682));}return _0x330ad3;}['trimColor'](_0xe07001){return this['parserColor']['foreachColors'](this['toString'](_0xe07001),_0x19bb7e=>_0x19bb7e['replace'](/\s+/gi,''));}['split'](_0x57c24c){return this['trim'](this['toString'](_0x57c24c))['split'](/\s+/gi);}['fixedOptions'](_0x3ace36,_0x532ad1){const _0x4cb1fd=_0x3ace36['length'],_0x178522=_0x532ad1-_0x4cb1fd;if(_0x178522){if(_0x178522===0x1){if(_0x4cb1fd===0x3)return [_0x3ace36[0x0],_0x3ace36[0x0],_0x3ace36[0x0],_0x3ace36[0x0]];else {if(_0x4cb1fd===0x2)return [_0x3ace36[0x0],_0x3ace36[0x0],_0x3ace36[0x0]];else {if(_0x4cb1fd===0x1)return [_0x3ace36[0x0],_0x3ace36[0x0]];}}}else {if(_0x178522===0x2){if(_0x4cb1fd===0x2)return [_0x3ace36[0x0],_0x3ace36[0x1],_0x3ace36[0x0],_0x3ace36[0x2]];else {if(_0x4cb1fd===0x1)return [_0x3ace36[0x0],_0x3ace36[0x1],_0x3ace36[0x0]];}}else {if(_0x178522===0x3){if(_0x4cb1fd===0x1)return [_0x3ace36[0x0],_0x3ace36[0x1],_0x3ace36[0x2],_0x3ace36[0x1]];}}}}return _0x3ace36;}['emphasizeDimentionSet'](_0x14d4c3,_0x45d254,_0x372ebb,_0x43c4be,_0x1c72fc){const _0x199380=[],_0xbed250=Math['max'](_0x14d4c3['length'],_0x45d254['length']),_0x52e7b4=this['fixedOptions'](_0x14d4c3,_0xbed250),_0x318ba1=this['fixedOptions'](_0x45d254,_0xbed250),_0xd0f2f9=[..._0x52e7b4['map'](_0x212254=>_0x212254['dimension'])]['find'](_0x38ae76=>_0x38ae76);for(let _0x2bee85=0x0;_0x2bee85<_0x52e7b4['length'];_0x2bee85++){_0x199380['push']({'value':emphasizeNumber(_0x52e7b4[_0x2bee85]['value'],_0x318ba1[_0x2bee85]['value'],_0x372ebb,_0x43c4be,_0x1c72fc),'dimension':_0xd0f2f9});}return _0x199380['map'](_0x4c468c=>''+_0x4c468c['value']+(_0x4c468c['dimension']||''))['join']('\x20');}} | ||
function emphasizeColorBase(_0x4449e1,_0x3abc96,_0x186cde,_0x1f8b29,_0x2ec4ad){const _0x13f1e8=new jolor.Color(_0x4449e1),_0x43ed57=new jolor.Color(_0x3abc96),_0x3d9793=Math['round'](emphasizeNumber(_0x13f1e8['rgbObject']['r'],_0x43ed57['rgbObject']['r'],_0x186cde,_0x1f8b29,_0x2ec4ad)),_0x419435=Math['round'](emphasizeNumber(_0x13f1e8['rgbObject']['g'],_0x43ed57['rgbObject']['g'],_0x186cde,_0x1f8b29,_0x2ec4ad)),_0x402b6a=Math['round'](emphasizeNumber(_0x13f1e8['rgbObject']['b'],_0x43ed57['rgbObject']['b'],_0x186cde,_0x1f8b29,_0x2ec4ad)),_0x27e2ac=Math['round'](emphasizeNumber(_0x13f1e8['opacity'],_0x43ed57['opacity'],_0x186cde,_0x1f8b29,_0x2ec4ad));return jolor.toHex(_0x3d9793,_0x419435,_0x402b6a,_0x27e2ac)||_0x4449e1;}function emphasizeColor(_0x5d4aa5,_0x2a3210,_0x5d0661,_0x5b177a,_0xada701){return typeof _0x5b177a==='number'&&typeof _0xada701==='number'?emphasizeColorBase(_0x5d4aa5,_0x2a3210,_0x5d0661,_0x5b177a,_0xada701):emphasizeColorBase(_0x5d4aa5,_0x2a3210,0x0,0x1,_0x5d0661);}function splitColor(_0x32bfa6,_0x2d7e08,_0x54ad8f){const _0x36d428=[];for(let _0x33d44b=0x1;_0x33d44b<=_0x54ad8f;_0x33d44b++){_0x36d428['push'](emphasizeColorBase(_0x32bfa6,_0x2d7e08,0x1,_0x54ad8f,_0x33d44b));}return _0x36d428;} | ||
class BorderParser extends BaseParser{get['key'](){return 'BorderParser';}['isMatch'](_0x5846ec){return this['match'](_0x5846ec,StylePropertyPatterns['completeBorder']);}['parse'](_0x194880){const _0x5888ab=this['split'](this['trimColor'](_0x194880)),{value:_0x5435e3,dimension:_0x56e163}=this['parseDimention'](_0x5888ab[0x0]);return {'value':_0x5435e3,'dimension':_0x56e163,'type':_0x5888ab[0x1],'color':_0x5888ab[0x2]};}['emphasize'](_0x306bcf,_0x489060,_0x120d46,_0x459935,_0x4adc9f){const _0x4a066e=this['parse'](_0x306bcf),_0x3c7079=this['parse'](_0x489060),{dimension:_0x40d71c,type:_0x31fd87}=_0x4a066e,_0xccfbb2=emphasizeNumber(_0x4a066e['value'],_0x3c7079['value'],_0x120d46,_0x459935,_0x4adc9f),_0x313541=emphasizeColor(_0x4a066e['color'],_0x3c7079['color'],_0x120d46,_0x459935,_0x4adc9f);return ''+_0xccfbb2+(_0x40d71c||'')+'\x20'+_0x31fd87+'\x20'+_0x313541;}get['propertyNames'](){return ['border'];}} | ||
class DimentionBaseParser extends BaseParser{get['key'](){return 'DimentionParser';}['emphasize'](_0x3fc66c,_0x396f99,_0x2605b3,_0x53370e,_0x1075df){const _0x2a4199=this['parse'](_0x3fc66c),_0x5bd436=this['parse'](_0x396f99);return this['emphasizeDimentionSet'](_0x2a4199,_0x5bd436,_0x2605b3,_0x53370e,_0x1075df);}} | ||
class Dimention1Parser extends DimentionBaseParser{['isMatch'](_0x5eb2bb){return this['match'](_0x5eb2bb,StylePropertyPatterns['completeDimention1']);}['parse'](_0x173e79){const _0x43ade=this['parseDimention'](_0x173e79);return [_0x43ade];}get['propertyNames'](){return ['width','fontSize'];}} | ||
class Dimention2Parser extends DimentionBaseParser{['isMatch'](_0x3965c6){return this['match'](_0x3965c6,StylePropertyPatterns['completeDimention2']);}['parse'](_0x39bde8){const _0x54fcf9=this['parseDimentionSet'](_0x39bde8);return [_0x54fcf9[0x0],_0x54fcf9[0x1]];}get['propertyNames'](){return ['margin','padding'];}} | ||
class Dimention3Parser extends DimentionBaseParser{['isMatch'](_0x2f1607){return this['match'](_0x2f1607,StylePropertyPatterns['completeDimention3']);}['parse'](_0x5a0c42){const _0x128adf=this['parseDimentionSet'](_0x5a0c42);return [_0x128adf[0x0],_0x128adf[0x1],_0x128adf[0x2]];}get['propertyNames'](){return ['margin','padding'];}} | ||
class Dimention4Parser extends DimentionBaseParser{['isMatch'](_0x31f152){return this['match'](_0x31f152,StylePropertyPatterns['completeDimention4']);}['parse'](_0x4624e9){const _0x28ffa9=this['parseDimentionSet'](_0x4624e9);return [_0x28ffa9[0x0],_0x28ffa9[0x1],_0x28ffa9[0x2],_0x28ffa9[0x3]];}get['propertyNames'](){return ['margin','padding'];}} | ||
class ColorParser extends BaseParser{['colorParser']=new units.ColorRegexPattern();get['key'](){return 'ColorParser';}['isMatch'](_0x16dddc){return this['colorParser']['isColor'](this['toString'](_0x16dddc));}['emphasize'](_0x156b0f,_0xc3059d,_0x1fe36a,_0x28a16a,_0x5df096){return emphasizeColor(this['toString'](_0x156b0f),this['toString'](_0xc3059d),_0x1fe36a,_0x28a16a,_0x5df096);}get['propertyNames'](){return ['color'];}} | ||
class BoxShadowBaseParser extends BaseParser{get['key'](){return 'BoxShadowParser';}['parseInset'](_0x261282){let _0xea39d1=this['toString'](_0x261282);const _0x20de39=/\s*inset\s*/gi['test'](_0xea39d1);return _0x20de39&&(_0xea39d1=_0xea39d1['replace'](/inset/gi,'')),{'inset':_0x20de39,'restText':_0xea39d1};}['emphasize'](_0x36084b,_0x118eaf,_0x4b8d6e,_0x1f13e1,_0x276848){const _0x154df8=this['parse'](_0x36084b),_0x3040c7=this['parse'](_0x118eaf),_0x36b802=this['emphasizeDimentionSet'](_0x154df8['dimentions'],_0x3040c7['dimentions'],_0x4b8d6e,_0x1f13e1,_0x276848),_0x521b80=emphasizeColor(_0x154df8['color'],_0x3040c7['color'],_0x4b8d6e,_0x1f13e1,_0x276848);return ''+(_0x154df8['inset']&&_0x3040c7['inset']?'inset\x20':'')+_0x36b802+'\x20'+_0x521b80;}get['propertyNames'](){return ['boxShadow'];}} | ||
class BoxShadow2Parser extends BoxShadowBaseParser{['isMatch'](_0x37151e){return this['match'](_0x37151e,StylePropertyPatterns['completeBoxShadow2']);}['parse'](_0x269f67){const {inset:_0x7fc5fb,restText:_0x40ca7d}=this['parseInset'](_0x269f67),_0x266ef7=this['split'](this['trimColor'](_0x40ca7d)),_0x170e86=this['parseDimention'](_0x266ef7[0x0]),_0x18e5f8=this['parseDimention'](_0x266ef7[0x1]);return {'inset':_0x7fc5fb,'dimentions':[_0x170e86,_0x18e5f8],'color':_0x266ef7[0x2]};}} | ||
class BoxShadow3Parser extends BoxShadowBaseParser{['isMatch'](_0x3f042e){return this['match'](_0x3f042e,StylePropertyPatterns['completeBoxShadow3']);}['parse'](_0x23bb38){const {inset:_0x3e6c53,restText:_0x2a3cb5}=this['parseInset'](_0x23bb38),_0x5151e9=this['split'](this['trimColor'](_0x2a3cb5)),_0x79008e=this['parseDimention'](_0x5151e9[0x0]),_0x4f930f=this['parseDimention'](_0x5151e9[0x1]),_0x37923d=this['parseDimention'](_0x5151e9[0x2]);return {'inset':_0x3e6c53,'dimentions':[_0x79008e,_0x4f930f,_0x37923d],'color':_0x5151e9[0x3]};}} | ||
class BoxShadow4Parser extends BoxShadowBaseParser{['isMatch'](_0x10ee45){return this['match'](_0x10ee45,StylePropertyPatterns['completeBoxShadow4']);}['parse'](_0x498542){const {inset:_0x284eb9,restText:_0xe76e84}=this['parseInset'](_0x498542),_0x32f988=this['split'](this['trimColor'](_0xe76e84)),_0x1a89e0=this['parseDimention'](_0x32f988[0x0]),_0x2820fd=this['parseDimention'](_0x32f988[0x1]),_0x42c044=this['parseDimention'](_0x32f988[0x2]),_0x486f35=this['parseDimention'](_0x32f988[0x3]);return {'inset':_0x284eb9,'dimentions':[_0x1a89e0,_0x2820fd,_0x42c044,_0x486f35],'color':_0x32f988[0x4]};}} | ||
const dimention1=new Dimention1Parser(),dimention2=new Dimention2Parser(),dimention3=new Dimention3Parser(),dimention4=new Dimention4Parser(),color=new ColorParser(),border=new BorderParser(),boxShadow2=new BoxShadow2Parser(),boxShadow3=new BoxShadow3Parser(),boxShadow4=new BoxShadow4Parser(),d1=[dimention1],d1to4=[dimention1,dimention2,dimention3,dimention4],c1=[color],b1=[border];const ParserManager={'width':d1,'minWidth':d1,'maxWidth':d1,'height':d1,'minHeight':d1,'maxHeight':d1,'border':b1,'borderColor':c1,'borderBottom':b1,'borderBottomColor':c1,'borderBottomWidth':d1,'borderLeft':b1,'borderLeftColor':c1,'borderLeftWidth':d1,'borderRight':b1,'borderRightColor':c1,'borderRightWidth':d1,'borderTop':b1,'borderTopColor':c1,'borderTopWidth':d1,'borderRadius':d1to4,'borderBottomLeftRadius':d1,'borderBottomRightRadius':d1,'borderTopLeftRadius':d1,'borderTopRightRadius':d1,'padding':d1to4,'paddingBottom':d1,'paddingLeft':d1,'paddingRight':d1,'paddingTop':d1,'margin':d1to4,'marginBottom':d1,'marginLeft':d1,'marginRight':d1,'marginTop':d1,'bottom':d1,'left':d1,'right':d1,'top':d1,'color':c1,'backgroundColor':c1,'caretColor':c1,'outlineColor':c1,'textDecorationColor':c1,'fontSize':d1,'boxShadow':[boxShadow2,boxShadow3,boxShadow4]}; | ||
function emphasizeStylePropertyBase(_0x18cc10,_0x54dc3f,_0x24b715,_0x5a4d66,_0x5348b1,_0x54febf){if(typeof _0x54dc3f==='number'&&typeof _0x24b715==='number')return emphasizeNumber(_0x54dc3f,_0x24b715,_0x5a4d66,_0x5348b1,_0x54febf);else {const _0x50220e=ParserManager[_0x18cc10];if(_0x50220e&&_0x50220e['length']){let _0x2c7e37=undefined,_0x176f01=undefined;for(let _0x16cecb=0x0;_0x16cecb<_0x50220e['length'];_0x16cecb++){const _0x3ebc2f=_0x50220e[_0x16cecb];!_0x2c7e37&&(_0x3ebc2f['isMatch'](_0x54dc3f)&&(_0x2c7e37=_0x3ebc2f));!_0x176f01&&(_0x3ebc2f['isMatch'](_0x24b715)&&(_0x176f01=_0x3ebc2f));if(_0x2c7e37&&_0x176f01)break;}if(_0x2c7e37&&_0x176f01){if(_0x2c7e37['key']===_0x176f01['key'])return _0x2c7e37['emphasize'](_0x54dc3f,_0x24b715,_0x5a4d66,_0x5348b1,_0x54febf);}else {if(_0x2c7e37)return _0x54dc3f;else {if(_0x176f01)return _0x24b715;}}}}return undefined;}function emphasizeStyleProperty(_0x21d8bd,_0x9ce411,_0x5325c2,_0x3d9874,_0x1afb46,_0x51f29b){return typeof _0x1afb46==='number'&&typeof _0x51f29b==='number'?emphasizeStylePropertyBase(_0x21d8bd,_0x9ce411,_0x5325c2,_0x3d9874,_0x1afb46,_0x51f29b):emphasizeStylePropertyBase(_0x21d8bd,_0x9ce411,_0x5325c2,0x0,0x1,_0x3d9874);} | ||
function emphasizeStyleBase(_0x531612,_0x31de3,_0x58e967,_0x3925fd,_0x4ed0d5){const _0x31e9ef={},_0x2242f4=[...Object['keys'](_0x531612),...Object['keys'](_0x31de3)];for(const _0x22ce43 of _0x2242f4){(_0x531612['hasOwnProperty'](_0x22ce43)||_0x31de3['hasOwnProperty'](_0x22ce43))&&(_0x31e9ef[_0x22ce43]=emphasizeStyleProperty(_0x22ce43,_0x531612[_0x22ce43],_0x31de3[_0x22ce43],_0x58e967,_0x3925fd,_0x4ed0d5));}return _0x31e9ef;}function emphasizeStyle(_0x5df602,_0x2ed260,_0x3e482e,_0x710f05,_0x7847c4){return typeof _0x710f05==='number'&&typeof _0x7847c4==='number'?emphasizeStyleBase(_0x5df602,_0x2ed260,_0x3e482e,_0x710f05,_0x7847c4):emphasizeStyleBase(_0x5df602,_0x2ed260,0x0,0x1,_0x3e482e);} | ||
exports.emphasizeColor = emphasizeColor; | ||
exports.emphasizeNumber = emphasizeNumber; | ||
exports.emphasizeStyle = emphasizeStyle; | ||
exports.emphasizeStyleProperty = emphasizeStyleProperty; | ||
exports.splitColor = splitColor; |
declare function emphasizeNumber(fromValue: number, toValue: number, rate: number): number; | ||
declare function emphasizeNumber(fromValue: number, toValue: number, fromRate: number, toRate: number, rate: number): number; | ||
export { emphasizeNumber }; |
declare function emphasizeStyleProperty(name: string, fromValue: string | number | undefined, toValue: string | number | undefined, rate: number): string | number | undefined; | ||
declare function emphasizeStyleProperty(name: string, fromValue: string | number | undefined, toValue: string | number | undefined, fromRate: number, toRate: number, rate: number): string | number | undefined; | ||
export { emphasizeStyleProperty }; |
@@ -0,0 +0,0 @@ export interface BorderOption { |
@@ -1,4 +0,4 @@ | ||
import { BaseParser } from './parsers'; | ||
import { BaseParser } from "./parsers"; | ||
export declare const ParserManager: { | ||
[key: string]: BaseParser[]; | ||
}; |
@@ -1,8 +0,8 @@ | ||
import { DimentionOption } from '../interfaces'; | ||
import { ColorRegexPattern } from 'jolor/lib/units'; | ||
export declare type StylePropertyType = string | number | undefined; | ||
import { ColorRegexPattern } from "jolor/lib/units"; | ||
import { DimentionOption } from "../interfaces"; | ||
export type StylePropertyType = string | number | undefined; | ||
export declare abstract class BaseParser { | ||
protected parserColor: ColorRegexPattern; | ||
abstract readonly key: string; | ||
abstract readonly propertyNames: string[]; | ||
abstract get key(): string; | ||
abstract get propertyNames(): string[]; | ||
abstract isMatch(raw: StylePropertyType): boolean; | ||
@@ -9,0 +9,0 @@ abstract emphasize(fromValue: StylePropertyType, toValue: StylePropertyType, fromRate: number, toRate: number, rate: number): string; |
@@ -1,9 +0,9 @@ | ||
import { BaseParser, StylePropertyType } from './base-parser'; | ||
import { BorderOption } from '../interfaces'; | ||
import { BaseParser, StylePropertyType } from "./base-parser"; | ||
import { BorderOption } from "../interfaces"; | ||
export declare class BorderParser extends BaseParser { | ||
readonly key: string; | ||
get key(): string; | ||
isMatch(raw: StylePropertyType): boolean; | ||
parse(text: StylePropertyType): BorderOption; | ||
emphasize(fromValue: StylePropertyType, toValue: StylePropertyType, fromRate: number, toRate: number, rate: number): string; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,6 +0,6 @@ | ||
import { BaseParser, StylePropertyType } from './base-parser'; | ||
import { BoxShadowOption } from '../interfaces'; | ||
import { BaseParser, StylePropertyType } from "./base-parser"; | ||
import { BoxShadowOption } from "../interfaces"; | ||
export declare abstract class BoxShadowBaseParser extends BaseParser { | ||
abstract parse(text: StylePropertyType): BoxShadowOption; | ||
readonly key: string; | ||
get key(): string; | ||
protected parseInset(text: StylePropertyType): { | ||
@@ -11,3 +11,3 @@ inset: boolean; | ||
emphasize(fromValue: StylePropertyType, toValue: StylePropertyType, fromRate: number, toRate: number, rate: number): string; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,4 +0,4 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { BoxShadowOption } from '../interfaces'; | ||
import { BoxShadowBaseParser } from './box-shadow-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { BoxShadowOption } from "../interfaces"; | ||
import { BoxShadowBaseParser } from "./box-shadow-base-parser"; | ||
export declare class BoxShadow2Parser extends BoxShadowBaseParser { | ||
@@ -5,0 +5,0 @@ isMatch(raw: StylePropertyType): boolean; |
@@ -1,4 +0,4 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { BoxShadowOption } from '../interfaces'; | ||
import { BoxShadowBaseParser } from './box-shadow-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { BoxShadowOption } from "../interfaces"; | ||
import { BoxShadowBaseParser } from "./box-shadow-base-parser"; | ||
export declare class BoxShadow3Parser extends BoxShadowBaseParser { | ||
@@ -5,0 +5,0 @@ isMatch(raw: StylePropertyType): boolean; |
@@ -1,4 +0,4 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { BoxShadowOption } from '../interfaces'; | ||
import { BoxShadowBaseParser } from './box-shadow-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { BoxShadowOption } from "../interfaces"; | ||
import { BoxShadowBaseParser } from "./box-shadow-base-parser"; | ||
export declare class BoxShadow4Parser extends BoxShadowBaseParser { | ||
@@ -5,0 +5,0 @@ isMatch(raw: StylePropertyType): boolean; |
@@ -1,8 +0,8 @@ | ||
import { BaseParser, StylePropertyType } from './base-parser'; | ||
import { BaseParser, StylePropertyType } from "./base-parser"; | ||
export declare class ColorParser extends BaseParser { | ||
private colorParser; | ||
readonly key: string; | ||
get key(): string; | ||
isMatch(raw: StylePropertyType): boolean; | ||
emphasize(from: StylePropertyType, to: StylePropertyType, fromRate: number, toRate: number, rate: number): string; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,7 +0,7 @@ | ||
import { BaseParser, StylePropertyType } from './base-parser'; | ||
import { DimentionOption } from '../interfaces'; | ||
import { BaseParser, StylePropertyType } from "./base-parser"; | ||
import { DimentionOption } from "../interfaces"; | ||
export declare abstract class DimentionBaseParser extends BaseParser { | ||
abstract parse(text: StylePropertyType): DimentionOption[]; | ||
readonly key: string; | ||
get key(): string; | ||
emphasize(fromValue: StylePropertyType, toValue: StylePropertyType, fromRate: number, toRate: number, rate: number): string; | ||
} |
@@ -1,8 +0,8 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { DimentionOption } from '../interfaces'; | ||
import { DimentionBaseParser } from './dimention-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { DimentionOption } from "../interfaces"; | ||
import { DimentionBaseParser } from "./dimention-base-parser"; | ||
export declare class Dimention1Parser extends DimentionBaseParser { | ||
isMatch(raw: StylePropertyType): boolean; | ||
parse(raw: StylePropertyType): DimentionOption[]; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,8 +0,8 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { DimentionOption } from '../interfaces'; | ||
import { DimentionBaseParser } from './dimention-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { DimentionOption } from "../interfaces"; | ||
import { DimentionBaseParser } from "./dimention-base-parser"; | ||
export declare class Dimention2Parser extends DimentionBaseParser { | ||
isMatch(raw: StylePropertyType): boolean; | ||
parse(raw: StylePropertyType): DimentionOption[]; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,8 +0,8 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { DimentionOption } from '../interfaces'; | ||
import { DimentionBaseParser } from './dimention-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { DimentionOption } from "../interfaces"; | ||
import { DimentionBaseParser } from "./dimention-base-parser"; | ||
export declare class Dimention3Parser extends DimentionBaseParser { | ||
isMatch(raw: StylePropertyType): boolean; | ||
parse(raw: StylePropertyType): DimentionOption[]; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,8 +0,8 @@ | ||
import { StylePropertyType } from './base-parser'; | ||
import { DimentionOption } from '../interfaces'; | ||
import { DimentionBaseParser } from './dimention-base-parser'; | ||
import { StylePropertyType } from "./base-parser"; | ||
import { DimentionOption } from "../interfaces"; | ||
import { DimentionBaseParser } from "./dimention-base-parser"; | ||
export declare class Dimention4Parser extends DimentionBaseParser { | ||
isMatch(raw: StylePropertyType): boolean; | ||
parse(raw: StylePropertyType): DimentionOption[]; | ||
readonly propertyNames: string[]; | ||
get propertyNames(): string[]; | ||
} |
@@ -1,10 +0,10 @@ | ||
export * from './border-parser'; | ||
export * from './dimention1-parser'; | ||
export * from './dimention2-parser'; | ||
export * from './dimention3-parser'; | ||
export * from './dimention4-parser'; | ||
export * from './color-parser'; | ||
export * from './base-parser'; | ||
export * from './box-shadow2-parser'; | ||
export * from './box-shadow3-parser'; | ||
export * from './box-shadow4-parser'; | ||
export * from "./border-parser"; | ||
export * from "./dimention1-parser"; | ||
export * from "./dimention2-parser"; | ||
export * from "./dimention3-parser"; | ||
export * from "./dimention4-parser"; | ||
export * from "./color-parser"; | ||
export * from "./base-parser"; | ||
export * from "./box-shadow2-parser"; | ||
export * from "./box-shadow3-parser"; | ||
export * from "./box-shadow4-parser"; |
@@ -0,0 +0,0 @@ export declare class StylePropertyPatterns { |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
{ | ||
"name": "emphasizer", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "React style emphasizer", | ||
"main": "dist/index.js", | ||
"module": "dist/index.esm.js", | ||
"types": "dist/index.d.ts", | ||
"devDependencies": { | ||
"@rollup/plugin-typescript": "^11.1.6", | ||
"@types/jest": "^24.0.20", | ||
"@types/react": "^16.8.25", | ||
"@types/react-dom": "^16.8.5", | ||
"@typescript-eslint/eslint-plugin": "^4.26.0", | ||
"@typescript-eslint/parser": "^4.26.0", | ||
"concurrently": "^4.1.1", | ||
"eslint": "^7.27.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-config-varp": "^0.1.8", | ||
"eslint-import-resolver-alias": "^1.1.2", | ||
"eslint-import-resolver-typescript": "^2.4.0", | ||
"eslint-plugin-import": "^2.23.4", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-react": "^7.24.0", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint-config-varp-common": "^1.0.2", | ||
"jest": "^24.9.0", | ||
"prepend-file": "^1.3.1", | ||
"prettier": "^2.3.1", | ||
"rollup": "^1.19.4", | ||
"rollup-plugin-typescript2": "^0.22.1", | ||
"rollup-plugin-uglify": "^6.0.3", | ||
"rollup": "^4.11.0", | ||
"rollup-obfuscator": "^4.1.1", | ||
"rollup-plugin-scss": "^4.0.0", | ||
"ts-jest": "^24.1.0", | ||
"tslib": "^1.10.0", | ||
"typescript": "^3.5.3" | ||
"tslib": "^2.6.2", | ||
"typescript": "^4.9.5" | ||
}, | ||
@@ -40,3 +28,4 @@ "peerDependencies": { | ||
"scripts": { | ||
"build": "rollup -c", | ||
"build": "rollup -c --bundleConfigAsCjs", | ||
"build:dev": "cross-env BUILD=dev rollup -c --bundleConfigAsCjs", | ||
"build-watch": "rollup -c -w", | ||
@@ -63,4 +52,4 @@ "install-all": "npm i && cd example && npm i", | ||
"react", | ||
"emphase", | ||
"emphaser", | ||
"emphasize", | ||
"emphasizer", | ||
"number" | ||
@@ -67,0 +56,0 @@ ], |
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
49552
14
26
328
1