@master/css 2.0.0-beta.136 → 2.0.0-beta.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/config/keyframes.js +1 -1
- package/dist/cjs/config/rules.js +1 -1
- package/dist/cjs/config/semantics.js +1 -1
- package/dist/cjs/css.js +1 -1
- package/dist/cjs/rule.js +1 -1
- package/dist/config/keyframes.d.ts +4 -4
- package/dist/config/rules.d.ts +68 -2
- package/dist/config/semantics.d.ts +1 -1
- package/dist/css.d.ts +1 -1
- package/dist/esm/config/keyframes.mjs +1 -1
- package/dist/esm/config/rules.mjs +1 -1
- package/dist/esm/config/semantics.mjs +1 -1
- package/dist/esm/css.mjs +1 -1
- package/dist/esm/rule.mjs +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +10 -10
- package/dist/rule.d.ts +1 -1
- package/package.json +1 -1
- package/dist/cjs/constants/box-underneath.js +0 -1
- package/dist/cjs/constants/content-extrema.js +0 -1
- package/dist/constants/box-underneath.d.ts +0 -5
- package/dist/constants/content-extrema.d.ts +0 -4
- package/dist/esm/constants/box-underneath.mjs +0 -1
- package/dist/esm/constants/content-extrema.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(t
|
|
1
|
+
var o=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var c=(a,t)=>{for(var n in t)o(a,n,{get:t[n],enumerable:!0})},i=(a,t,n,e)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of m(t))!f.call(a,r)&&r!==n&&o(a,r,{get:()=>t[r],enumerable:!(e=s(t,r))||e.enumerable});return a};var l=a=>i(o({},"__esModule",{value:!0}),a);var g={};c(g,{keyframes:()=>p});module.exports=l(g);var p={fade:{"0%":{opacity:0},to:{opacity:0}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},"100%":{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8, 0, 1, 1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0, 0, 0.2, 1)"}},ping:{"75%,100%":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},"100%":{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},"100%":{transform:"none"}}};0&&(module.exports={keyframes});
|
package/dist/cjs/config/rules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var b=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var I=Object.getOwnPropertyNames;var T=Object.prototype.hasOwnProperty;var O=(e,t)=>{for(var r in t)b(e,r,{get:t[r],enumerable:!0})},A=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of I(t))!T.call(e,s)&&s!==r&&b(e,s,{get:()=>t[s],enumerable:!(o=R(t,s))||o.enumerable});return e};var z=e=>A(b({},"__esModule",{value:!0}),e);var j={};O(j,{rules:()=>D});module.exports=z(j);var x=require("../constants/start-symbol"),v=require("../constants/box-underneath"),f=require("../constants/content-extrema"),h=require("../constants/sizing-values"),C=require("../utils/css-escape"),N={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},r=(i,a)=>{let n=a.indexOf(":");if(n!==-1){i in t||(t[i]={});let d=t[i],g=a.slice(0,n);g in d||(d[g]=a.slice(n+1))}},o=i=>{let a=(n,d)=>{let g=d.slice((0,C.cssEscape)(i.className).length).match(/\{(.*)\}/)[1].split(";");for(let S of g)r(n,S)};if(this.theme){let n=i.natives.find(d=>d.theme===this.theme)??i.natives.find(d=>!d.theme);n&&a(this.theme,n.text)}else for(let n of i.natives)a(n.theme,n.text)},s=[],l="",c=()=>{l&&(s.push(l.replace(/ /g,"")),l="")},m=1;(function i(a){for(;m<e.length;m++){let n=e[m];if(!a){if(n===";"){c();continue}if(n==="}")break}if(l+=n,a===n){if(a==="'"||a==='"'){let d=0;for(let g=l.length-2;l[g]==="\\";g--)d++;if(d%2)continue}break}else n in x.START_SYMBOL&&a!=="'"&&a!=='"'&&(m++,i(x.START_SYMBOL[n]))}})(void 0),c();for(let i of s){let a=this.css.create(i);if(Array.isArray(a))for(let n of a)o(n);else a?o(a):r(this.theme??"",i)}let u={};for(let i in t)for(let[a,n]of Object.entries(t[i]))a in u?u[a][i]=n:u[a]={[i]:n};return u}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){let t={};switch(e){case"subpixel-antialiased":t["-webkit-font-smoothing"]=t["-moz-osx-font-smoothing"]="auto";break;case"antialiased":t["-webkit-font-smoothing"]="antialiased",t["-moz-osx-font-smoothing"]="grayscale";break}return t}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},margin:{match:"^m(?:argin(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return w.call(this,e+t)},get order(){return this.prefix==="margin:"||this.prefix==="m:"?-1:0}},padding:{match:"^p(?:adding(?:-(?:left|right|top|bottom))?|[xytblr]?):.",unit:"rem",declare(e,t){return w.call(this,e+t)},get order(){return this.prefix==="padding:"||this.prefix==="p:"?-1:0}},flexBasis:{values:h.SIZING_VALUES,unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:h.SIZING_VALUES},height:{match:"^h:.",unit:"rem",native:!0,values:h.SIZING_VALUES},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:h.SIZING_VALUES},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:h.SIZING_VALUES},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,r]=e.split(" x ");return{width:t,height:r}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"min-width":t,"min-height":r}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,r]=e.split(" x ");return{"max-width":t,"max-height":r}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},inset:{match:"^(?:top|bottom|left|right):.",unit:"rem",native:!0,declare(e,t){return{[this.prefix.slice(0,-1)]:e+t}}},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:h.SIZING_VALUES},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:h.SIZING_VALUES},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflow:{match:"^overflow(?:-x|-y)?:(?:visible|overlay|hidden|scroll|auto|clip|inherit|initial|revert|revert-layer|unset|\\$|var|$values)",declare(e,t){if(this.prefix)switch(this.prefix.slice(-2,-1)){case"x":return{"overflow-x":e+t};case"y":return{"overflow-y":e+t}}return{overflow:e+t}},get order(){return-1}},overscrollBehavior:{match:"^overscroll-behavior(?:-[xy])?:",declare(e,t){switch(this.prefix.slice(-2,-1)){case"x":return{"overscroll-behavior-x":e+t};case"y":return{"overscroll-behavior-y":e+t};default:return{"overscroll-behavior":e+t}}}},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{...v.BOX_UNDERNEATH,fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return y.call(this,e)},delete(e){return k.call(this,e)},insert(){return $.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return y.call(this,e)},delete(e){return k.call(this,e)},insert(){return $.call(this)}},borderColor:{match:"^b(?:[xytblr]|(?:order(?:-(?:left|right|top|bottom))?))?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t,"color")},get order(){return this.prefix==="border-color:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderRadius:{match:"^(?:r[tblr]?[tblr]?|border(?:-(?:top|bottom)-(?:left|right))?-radius):.",unit:"rem",declare(e,t){if(this.prefix){let o="",s=this.prefix.split("-");if(s.length>1)for(let l=1;l<s.length-1;l++)o+=s[l][0];else o=this.prefix.slice(1,-1);switch(o){case"t":return{"border-top-left-radius":e+t,"border-top-right-radius":e+t};case"tl":case"lt":return{"border-top-left-radius":e+t};case"rt":case"tr":return{"border-top-right-radius":e+t};case"b":return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t};case"bl":case"lb":return{"border-bottom-left-radius":e+t};case"br":case"rb":return{"border-bottom-right-radius":e+t};case"l":return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t};case"r":return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t};default:return{"border-radius":e+t}}}let r=this.prefix?.slice(0,-1);return{[["border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius"].includes(r)?r:"border-radius"]:e+t}},get order(){return this.prefix==="border-radius:"||this.prefix==="r:"?-1:0}},borderStyle:{match:"^(?:border(?:-(?:left|right|top|bottom))?-style:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|))",declare(e,t){return p(this.prefix,e+t,"style")},get order(){return this.prefix==="border-style:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderWidth:{match:"^(?:border(?:-(?:left|right|top|bottom))?-width:.|b(?:[xytblr]|order(?:-(?:left|right|top|bottom))?)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$)",unit:"rem",declare(e,t){return p(this.prefix,e+t,"width")},get order(){return this.prefix==="border-width:"||this.prefix==="b:"||this.prefix==="border:"?-1:0}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0},border:{match:"^b(?:[xytblr]?|order(?:-(?:left|right|top|bottom))?):.",unit:"rem",colored:!0,values:{current:"currentColor"},declare(e,t){return p(this.prefix,e+t)},get order(){return this.prefix==="border:"||this.prefix==="b:"?-2:-1}},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:v.BOX_UNDERNEATH},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:v.BOX_UNDERNEATH},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:f.CONTENT_EXTREMA},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:f.CONTENT_EXTREMA,native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:f.CONTENT_EXTREMA},gridTemplateRows:{native:!0,unit:"rem",values:f.CONTENT_EXTREMA},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gap:{match:"^gap(?:-x|-y)?:.",unit:"rem",order:-1,declare(e,t){switch(this.prefix[4]){case"x":return{"column-gap":e+t};case"y":return{"row-gap":e+t};default:return{gap:e+t}}}},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMargin:{match:"^scroll-m(?:[xytblr]|argin(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="m")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-margin-left":e+t,"scroll-margin-right":e+t};case"y":return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t};case"l":return{"scroll-margin-left":e+t};case"r":return{"scroll-margin-right":e+t};case"t":return{"scroll-margin-top":e+t};case"b":return{"scroll-margin-bottom":e+t}}else return{[this.prefix.replace(/-m(?!argin)/,"-margin").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-margin:"||this.prefix==="scroll-m:"?-1:0}},scrollPadding:{match:"^scroll-p(?:[xytblr]|adding(?:-(?:top|bottom|left|right))?)?:.",unit:"rem",declare(e,t){if(this.prefix.slice(-3,-2)==="p")switch(this.prefix.slice(-2,-1)){case"x":return{"scroll-padding-left":e+t,"scroll-padding-right":e+t};case"y":return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t};case"l":return{"scroll-padding-left":e+t};case"r":return{"scroll-padding-right":e+t};case"t":return{"scroll-padding-top":e+t};case"b":return{"scroll-padding-bottom":e+t}}else return{[this.prefix.replace(/-p(?!adding)/,"-padding").slice(0,-1)]:e+t}},get order(){return this.prefix==="scroll-padding:"||this.prefix==="scroll-p:"?-1:0}},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{...v.BOX_UNDERNEATH,margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{...v.BOX_UNDERNEATH,margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},D=N;function y(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(r=>r in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function k(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let r=this.css.keyframes[t];if(!--r.count){let o=e.natives.indexOf(r.native);this.css.style.sheet.deleteRule(o),e.natives.splice(o,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function $(){if(this.keyframeNames){let{config:e,keyframes:t,style:r,rules:o}=this.css,s=r?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let c={text:`@keyframes ${l} {`+Object.entries(e.keyframes[l]).map(([u,i])=>`${u} {${Object.entries(i).map(([a,n])=>a+": "+n).join(";")}}`).join(",")+"}",theme:""},m;if(Object.keys(t).length?(m=o[0]).natives.push(c):o.splice(0,0,m={natives:[c],get text(){return this.natives.map(u=>u.text).join("")}}),s){let u;for(let i=0;i<s.cssRules.length;i++){let a=s.cssRules[i];if(a.constructor.name!=="CSSKeyframesRule")break;if(a.name===l){u=a;break}}if(u)c.cssRule=u;else{let i=m.natives.length-1;s.insertRule(c.text,i),c.cssRule=s.cssRules[i]}}t[l]={native:c,count:1}}}}function w(e){if(this.prefix.includes("-"))return{[this.prefix.slice(0,-1)]:e};let r=this.prefix[0]==="m"?"margin":"padding",o=r+"-left",s=r+"-right",l=r+"-top",c=r+"-bottom";switch(this.prefix[1]){case"x":return{[o]:e,[s]:e};case"y":return{[l]:e,[c]:e};case"l":return{[o]:e};case"r":return{[s]:e};case"t":return{[l]:e};case"b":return{[c]:e};default:return{[r]:e}}}function p(e,t,r=""){let o="border-";r&&(r="-"+r);let s=/^b(order)?-?(.)?/.exec(e)[2],l=o+"left"+r,c=o+"right"+r,m=o+"top"+r,u=o+"bottom"+r;switch(s){case"x":return{[l]:t,[c]:t};case"y":return{[m]:t,[u]:t};case"l":return{[l]:t};case"r":return{[c]:t};case"t":return{[m]:t};case"b":return{[u]:t};default:return{["border"+r]:t}}}0&&(module.exports={rules});
|
|
1
|
+
var v=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var i in t)v(e,i,{get:t[i],enumerable:!0})},R=(e,t,i,u)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of k(t))!C.call(e,o)&&o!==i&&v(e,o,{get:()=>t[o],enumerable:!(u=y(t,o))||u.enumerable});return e};var S=e=>R(v({},"__esModule",{value:!0}),e);var z={};w(z,{rules:()=>B});module.exports=S(z);var g=require("../constants/start-symbol"),x=require("../utils/css-escape"),T={group:{match:"^(?:.+?[*_>~+])?\\{.+?\\}",analyze(e){let t=0;for(;t<e.length&&!(e[t]==="{"&&e[t-1]!=="\\");t++);return[e.slice(t),e.slice(0,t)]},declare(e){let t={},i=(a,r)=>{let n=r.indexOf(":");if(n!==-1){a in t||(t[a]={});let s=t[a],h=r.slice(0,n);h in s||(s[h]=r.slice(n+1))}},u=a=>{let r=(n,s)=>{let h=s.slice((0,x.cssEscape)(a.className).length).match(/\{(.*)\}/)[1].split(";");for(let $ of h)i(n,$)};if(this.theme){let n=a.natives.find(s=>s.theme===this.theme)??a.natives.find(s=>!s.theme);n&&r(this.theme,n.text)}else for(let n of a.natives)r(n.theme,n.text)},o=[],l="",m=()=>{l&&(o.push(l.replace(/ /g,"")),l="")},d=1;(function a(r){for(;d<e.length;d++){let n=e[d];if(!r){if(n===";"){m();continue}if(n==="}")break}if(l+=n,r===n){if(r==="'"||r==='"'){let s=0;for(let h=l.length-2;l[h]==="\\";h--)s++;if(s%2)continue}break}else n in g.START_SYMBOL&&r!=="'"&&r!=='"'&&(d++,a(g.START_SYMBOL[n]))}})(void 0),m();for(let a of o){let r=this.css.create(a);if(Array.isArray(r))for(let n of r)u(n);else r?u(r):i(this.theme??"",a)}let c={};for(let a in t)for(let[r,n]of Object.entries(t[a]))r in c?c[r][a]=n:c[r]={[a]:n};return c}},variable:{match:"^\\$[^ (){}A-Z]+:[^ ]",declare(e){return{["--"+this.prefix.slice(1,-1)]:e}}},fontSize:{match:"^f(?:ont)?:(?:[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},fontWeight:{match:"^f(?:ont)?:(?:bolder|$values)(?!\\|)",native:!0,values:{thin:100,extralight:200,light:300,regular:400,medium:500,semibold:600,bold:700,extrabold:800,heavy:900}},fontFamily:{match:"^f(?:ont)?:(?:$values)(?!\\|)",native:!0,values:{mono:"ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace",sans:"ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji",serif:"ui-serif,Georgia,Cambria,Times New Roman,Times,serif"}},fontSmoothing:{match:"^f(?:ont)?:(?:antialiased|subpixel-antialiased|$values)(?!\\|)",declare(e){switch(e){case"subpixel-antialiased":return{"-webkit-font-smoothing":"auto","-moz-osx-font-smoothing":"auto"};case"antialiased":return{"-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale"}}}},fontStyle:{match:"^f(?:ont)?:(?:normal|italic|oblique|$values)(?!\\|)",native:!0,unit:"deg"},fontVariantNumeric:{match:"^f(?:ont)?:(?:ordinal|slashed-zero|lining-nums|oldstyle-nums|proportional-nums|tabular-nums|diagonal-fractions|stacked-fractions|$values)(?!\\|)",native:!0},fontFeatureSettings:{match:"^font-feature:.",native:!0},font:{match:"^f:.",native:!0,order:-1},color:{match:"^(?:color|fg|foreground):.",native:!0,colored:!0,values:{current:"currentColor"}},marginLeft:{match:"^ml:.",native:!0,unit:"rem"},marginRight:{match:"^mr:.",native:!0,unit:"rem"},marginTop:{match:"^mt:.",native:!0,unit:"rem"},marginBottom:{match:"^mb:.",native:!0,unit:"rem"},marginX:{match:"^(?:mx|margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"margin-left":e+t,"margin-right":e+t}}},marginY:{match:"^(?:my|margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"margin-top":e+t,"margin-bottom":e+t}}},margin:{match:"^m:.",native:!0,unit:"rem",order:-1},paddingLeft:{match:"^pl:.",native:!0,unit:"rem"},paddingRight:{match:"^pr:.",native:!0,unit:"rem"},paddingTop:{match:"^pt:.",native:!0,unit:"rem"},paddingBottom:{match:"^pb:.",native:!0,unit:"rem"},paddingX:{match:"^(?:px|padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"padding-left":e+t,"padding-right":e+t}}},paddingY:{match:"^(?:py|padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"padding-top":e+t,"padding-bottom":e+t}}},padding:{match:"^p:.",native:!0,unit:"rem",order:-1},flexBasis:{values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560},unit:"rem",native:!0},flexWrap:{match:"^flex:(?:wrap(?:-reverse)?|nowrap|$values)(?!\\|)",native:!0},flexGrow:{native:!0},flexShrink:{native:!0},flexDirection:{match:"^flex:(?:(?:row|column)(?:-reverse)?|$values)(?!\\|)",native:!0,values:{col:"column","col-reverse":"column-reverse"}},flex:{native:!0,order:-1},display:{match:"^d:.",native:!0},width:{match:"^w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},height:{match:"^h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minWidth:{match:"^min-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},minHeight:{match:"^min-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},box:{match:"^(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e]},declare(e){let[t,i]=e.split(" x ");return{width:t,height:i}}},minBox:{match:"^min:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"min-width":t,"min-height":i}}},maxBox:{match:"^max:(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)x(?:(?:max|min|clamp|calc)\\(.+\\)|[0-9]+[a-z]*?)",unit:"rem",separators:["x"],analyze(e){return[e.slice(4)]},declare(e){let[t,i]=e.split(" x ");return{"max-width":t,"max-height":i}}},contain:{native:!0},content:{native:!0},counterIncrement:{native:!0},counterReset:{native:!0},letterSpacing:{match:"^ls:.",native:!0,unit:"em"},lineHeight:{match:"^lh:.",native:!0},objectFit:{match:"^(?:object|obj):(?:contain|cover|fill|scale-down|$values)",native:!0},objectPosition:{match:"^(?:object|obj):(?:top|bottom|right|left|center|$values)",native:!0},textAlign:{match:"^t(?:ext)?:(?:justify|center|left|right|start|end|$values)(?!\\|)",native:!0},textDecorationColor:{match:"^text-decoration:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},textDecorationStyle:{match:"^t(?:ext)?:(?:solid|double|dotted|dashed|wavy|$values)(?!\\|)",native:!0},textDecorationThickness:{match:"^text-decoration:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|from-font|$values)[^|]*$",native:!0,unit:"em"},textDecorationLine:{match:"^t(?:ext)?:(?:none|underline|overline|line-through|$values)(?!\\|)",native:!0},textDecoration:{match:"^t(?:ext)?:(?:underline|line-through|overline)",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"},order:-1},textUnderlineOffset:{unit:"rem",native:!0},textOverflow:{match:"^(?:text-(?:overflow|ovf):.|t(?:ext)?:(?:ellipsis|clip|$values)(?!\\|))",native:!0},textOrientation:{match:"^t(?:ext)?:(?:mixed|upright|sideways-right|sideways|use-glyph-orientation|$values)(?!\\|)",native:!0},textTransform:{match:"^t(?:ext)?:(?:uppercase|lowercase|capitalize|$values)(?!\\|)",native:!0},textRendering:{match:"^t(?:ext)?:(?:optimizeSpeed|optimizeLegibility|geometricPrecision|$values)(?!\\|)",native:!0},textIndent:{unit:"rem",native:!0},verticalAlign:{match:"^(?:v|vertical):.",native:!0},columns:{match:"^(?:columns|cols):.",native:!0,order:-1},whiteSpace:{native:!0},top:{native:!0,unit:"rem"},bottom:{native:!0,unit:"rem"},left:{native:!0,unit:"rem"},right:{native:!0,unit:"rem"},inset:{native:!0,unit:"rem",order:-1},lines:{match:"^lines:.",declare(e,t){return{overflow:"hidden",display:"-webkit-box","overflow-wrap":"break-word","text-overflow":"ellipsis","-webkit-box-orient":"vertical","-webkit-line-clamp":e+t}}},maxHeight:{match:"^max-h:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},maxWidth:{match:"^max-w:.",unit:"rem",native:!0,values:{full:"100%",fit:"fit-content",max:"max-content",min:"min-content","3xs":360,"2xs":480,xs:600,sm:768,md:1024,lg:1280,xl:1440,"2xl":1600,"3xl":1920,"4xl":2560}},boxSizing:{match:"^box:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box"}},opacity:{native:!0},visibility:{native:!0},clear:{native:!0},float:{native:!0},isolation:{native:!0},overflowX:{native:!0},overflowY:{native:!0},overflow:{native:!0,order:-1},overscrollBehaviorX:{native:!0},overscrollBehaviorY:{native:!0},overscrollBehavior:{native:!0,order:-1},zIndex:{match:"^z:.",native:!0},position:{native:!0,values:{abs:"absolute",rel:"relative"}},cursor:{native:!0},pointerEvents:{native:!0},resize:{native:!0},touchAction:{native:!0},wordBreak:{native:!0},wordSpacing:{native:!0,unit:"em"},userDrag:{declare(e,t){return{"user-drag":e+t,"-webkit-user-drag":e+t}}},userSelect:{native:!0,declare(e,t){return{"user-select":e+t,"-webkit-user-select":e+t}}},textShadow:{unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},textSize:{match:"^t(?:ext)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",declare(e,t){return{"font-size":e+t,"line-height":t==="em"?e+.875+t:`calc(${e}${t} + ${.875}em)`}}},textFillColor:{native:!0,match:"^(?:text-fill|text|t):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-fill-color":e+t}}},textStrokeWidth:{match:"^text-stroke(:(thin|medium|thick|\\.?[0-9]+|$values)(?!\\|)|-width:.)",unit:"rem",declare(e,t){return{"-webkit-text-stroke-width":e+t}}},textStrokeColor:{match:"^text-stroke:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"-webkit-text-stroke-color":e+t}}},textStroke:{unit:"rem",native:!0,declare(e,t){return{"-webkit-text-stroke":e+t}}},boxShadow:{match:"^s(?:hadow)?:.",unit:"rem",native:!0,colored:!0,values:{current:"currentColor"}},tableLayout:{native:!0},transformBox:{match:"^transform:(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},transformStyle:{match:"^transform:(?:flat|preserve-3d|$values)(?!\\|)",native:!0},transformOrigin:{match:"^transform:(?:top|bottom|right|left|center|[0-9]|$values)",native:!0,unit:"px"},transform:{match:"^(?:translate|scale|skew|rotate|perspective|matrix)(?:3d|[XYZ])?\\(",native:!0},transitionProperty:{match:"^~property:.",native:!0},transitionTimingFunction:{match:"^~easing:.",native:!0},transitionDuration:{match:"^~duration:.",native:!0,unit:"ms"},transitionDelay:{match:"^~delay:.",native:!0,unit:"ms"},transition:{symbol:"~",native:!0,order:-1},animationDelay:{match:"^@delay:.",native:!0,unit:"ms"},animationDirection:{match:"^@direction:.",native:!0},animationDuration:{match:"^@duration:.",native:!0,unit:"ms"},animationFillMode:{match:"^@fill-mode:.",native:!0},animationIterationCount:{match:"^@iteration-count:.",native:!0},animationName:{match:"^@name:.",native:!0,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return b.call(this,e)},delete(e){return p.call(this,e)},insert(){return f.call(this)}},borderCollapse:{match:"^b(?:order)?:(?:collapse|separate|$values)(?!\\|)",native:!0},borderSpacing:{unit:"rem",native:!0},borderTopColor:{match:"^b(?:t|order-top(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderBottomColor:{match:"^b(?:b|order-bottom(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderLeftColor:{match:"^b(?:l|order-left(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderRightColor:{match:"^b(?:r|order-right(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,colored:!0,values:{current:"currentColor"}},borderXColor:{match:"^b(?:x|order-x(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-left-color":e+t,"border-right-color":e+t}}},borderYColor:{match:"^b(?:y|order-y(?:-color)?):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",order:-.5,colored:!0,values:{current:"currentColor"},declare(e,t){return{"border-top-color":e+t,"border-bottom-color":e+t}}},borderColor:{match:"^b(?:order)?(?:-color)?:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))[^|]*$",native:!0,order:-1,colored:!0,values:{current:"currentColor"}},borderTopLeftRadius:{match:"^r(?:tl|lt):.",unit:"rem",native:!0},borderTopRightRadius:{match:"^r(?:tr|rt):.",unit:"rem",native:!0},borderBottomLeftRadius:{match:"^r(?:bl|lb):.",unit:"rem",native:!0},borderBottomRightRadius:{match:"^r(?:br|rb):.",unit:"rem",native:!0},borderTopRadius:{match:"^rt:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-top-right-radius":e+t}}},borderBottomRadius:{match:"^rb:.",unit:"rem",order:-.5,declare(e,t){return{"border-bottom-left-radius":e+t,"border-bottom-right-radius":e+t}}},borderLeftRadius:{match:"^rl:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-left-radius":e+t,"border-bottom-left-radius":e+t}}},borderRightRadius:{match:"^rr:.",unit:"rem",order:-.5,declare(e,t){return{"border-top-right-radius":e+t,"border-bottom-right-radius":e+t}}},borderRadius:{match:"^r:.",unit:"rem",native:!0,order:-1},borderTopStyle:{match:"^b(?:t|order-top(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderBottomStyle:{match:"^b(?:b|order-bottom(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderLeftStyle:{match:"^b(?:l|order-left(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderRightStyle:{match:"^b(?:r|order-right(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},borderXStyle:{match:"^b(?:x|order-x(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-left-style":e+t,"border-right-style":e+t}}},borderYStyle:{match:"^b(?:y|order-y(?:-style)?):(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",order:-.5,declare(e,t){return{"border-top-style":e+t,"border-bottom-style":e+t}}},borderStyle:{match:"^b(?:order)?(?:-style)?:(?:none|hidden|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0,order:-1},borderTopWidth:{match:"^b(?:t|order-top(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderBottomWidth:{match:"^b(?:b|order-bottom(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderLeftWidth:{match:"^b(?:l|order-left(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderRightWidth:{match:"^b(?:r|order-right(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderXWidth:{match:"^b(?:x|order-x(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-left-width":e+t,"border-right-width":e+t}}},borderYWidth:{match:"^b(?:y|order-y(?:-width)?):(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",order:-.5,declare(e,t){return{"border-top-width":e+t,"border-bottom-width":e+t}}},borderWidth:{match:"^b(?:order)?(?:-width)?:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0,order:-1},borderImageOutset:{unit:"rem",native:!0},borderImageRepeat:{match:"^border-image:(?:stretch|repeat|round|space|$values)(?!\\|)",native:!0},borderImageSlice:{native:!0},borderImageSource:{match:"^border-image:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},borderImageWidth:{match:"^border-image:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},borderImage:{native:!0,order:-1},borderTop:{match:"^bt:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderBottom:{match:"^bb:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderLeft:{match:"^bl:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderRight:{match:"^br:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"}},borderX:{match:"^(?:bx|border-x):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-left":e,"border-right":e}}},borderY:{match:"^(?:by|border-y):.",unit:"rem",colored:!0,order:-.5,values:{current:"currentColor"},declare(e){return{"border-top":e,"border-bottom":e}}},border:{match:"^b:.",native:!0,unit:"rem",colored:!0,values:{current:"currentColor"},order:-2},backgroundAttachment:{match:"^(?:bg|background):(?:fixed|local|scroll|$values)(?!\\|)",native:!0},backgroundBlendMode:{native:!0},backgroundColor:{match:"^(?:bg|background):(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},backgroundClip:{match:"^(?:bg|background):(?:text|$values)(?!\\|)",native:!0,declare(e,t){return{"-webkit-background-clip":e+t,"background-clip":e+t}},values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundOrigin:{match:"^(?:bg|background):(?:$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box"}},backgroundPosition:{match:"^(?:bg|background):(?:top|bottom|right|left|center|$values)(?!\\|)",native:!0,unit:"px"},backgroundRepeat:{match:"^(?:bg|background):(?:space|round|repeat|no-repeat|repeat-x|repeat-y|$values)(?![|a-zA-Z])",native:!0},backgroundSize:{match:"^(?:bg|background):(?:\\.?\\[0-9]+|auto|cover|contain|$values)(?!\\|)",unit:"rem",native:!0},backgroundImage:{match:"^(?:bg|background):(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"}},background:{match:"^bg:.",native:!0,colored:!0,values:{current:"currentColor"},order:-1},mixBlendMode:{match:"^blend:.",native:!0},backdropFilter:{match:"^bd:.",native:!0,colored:!0,values:{current:"currentColor"},declare(e,t){return{"backdrop-filter":e+t,"-webkit-backdrop-filter":e+t}}},filter:{match:"^(?:blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|opacity|saturate|sepia)\\(",native:!0,colored:!0,values:{current:"currentColor"}},fill:{match:"^fill:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},strokeDasharray:{native:!0},strokeDashoffset:{native:!0},strokeWidth:{match:"^stroke:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",native:!0},stroke:{native:!0,colored:!0,values:{current:"currentColor"}},x:{native:!0},y:{native:!0},cx:{native:!0},cy:{native:!0},rx:{native:!0},ry:{native:!0},gridColumnStart:{match:"^grid-col-start:.",native:!0},gridColumnEnd:{match:"^grid-col-end:.",native:!0},gridColumn:{match:"^grid-col(?:umn)?(?:-span)?:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridColumns:{match:"^grid-cols:.",declare(e,t){return{display:"grid","grid-template-columns":"repeat("+e+t+",minmax(0,1fr))"}}},gridRowStart:{native:!0},gridRowEnd:{native:!0},gridRow:{match:"^grid-row-span:.",native:!0,order:-1,transform(e){return this.prefix.slice(-5,-1)==="span"&&e!=="auto"?"span "+e+"/span "+e:e}},gridRows:{declare(e,t){return{display:"grid","grid-auto-flow":"column","grid-template-rows":"repeat("+e+t+",minmax(0,1fr))"}}},gridAutoColumns:{match:"^grid-auto-cols:.",native:!0,values:{min:"min-content",max:"max-content"}},gridAutoFlow:{match:"^grid-flow:.",native:!0},gridAutoRows:{values:{min:"min-content",max:"max-content"},native:!0},gridTemplateAreas:{native:!0},gridTemplateColumns:{match:"^grid-template-cols:.",native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplateRows:{native:!0,unit:"rem",values:{min:"min-content",max:"max-content"}},gridTemplate:{native:!0,order:-1},gridArea:{native:!0,order:-1},grid:{native:!0,order:-1},gapX:{unit:"rem",native:!0},gapY:{unit:"rem",native:!0},gap:{unit:"rem",native:!0,order:-1},order:{match:"^o:.",native:!0,values:{first:-999999,last:999999}},breakInside:{native:!0},breakBefore:{native:!0},breakAfter:{native:!0},boxDecorationBreak:{match:"^box:(?:slice|clone|$values)(?!\\|)",native:!0,declare(e,t){return{"box-decoration-break":e+t,"-webkit-box-decoration-break":e+t}}},aspectRatio:{match:"^aspect:.",native:!0},columnSpan:{match:"^col-span:.",native:!0},alignContent:{match:"^ac:.",native:!0},alignItems:{match:"^ai:.",native:!0},alignSelf:{match:"^as:",native:!0},justifyContent:{match:"^jc:.",native:!0},justifyItems:{match:"^ji:.",native:!0},justifySelf:{match:"^js:.",native:!0},placeContent:{native:!0,order:-1},placeItems:{native:!0,order:-1},placeSelf:{native:!0,order:-1},listStylePosition:{match:"^list-style:(?:inside|outside|$values)(?!\\|)",native:!0},listStyleType:{match:"^list-style:(?:disc|decimal|$values)(?!\\|)",native:!0},listStyleImage:{match:"^list-style:(?:(?:url|linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient|conic-gradient)\\(.*\\)|$values)(?!\\|)",native:!0},listStyle:{native:!0,order:-1},outlineColor:{match:"^outline:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},outlineOffset:{unit:"rem",native:!0},outlineStyle:{match:"^outline:(?:none|dotted|dashed|solid|double|groove|ridge|inset|outset|$values)(?!\\|)",native:!0},outlineWidth:{match:"^outline:(?:\\.?[0-9]|medium|thick|thin|(max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},outline:{native:!0,unit:"rem",order:-1,colored:!0,values:{current:"currentColor"}},accentColor:{match:"^accent:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},appearance:{native:!0},caretColor:{match:"^caret:(?:(?:#|(rgb|hsl)\\(.*\\))((?!\\|).)*$|(?:transparent|currentColor|inherit|$values|$colors))",native:!0,colored:!0,values:{current:"currentColor"}},scrollBehavior:{native:!0},scrollMarginLeft:{match:"^sml:.",native:!0,unit:"rem"},scrollMarginRight:{match:"^smr:.",native:!0,unit:"rem"},scrollMarginTop:{match:"^smt:.",native:!0,unit:"rem"},scrollMarginBottom:{match:"^smb:.",native:!0,unit:"rem"},scrollMarginX:{match:"^(?:smx|scroll-margin-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-left":e+t,"scroll-margin-right":e+t}}},scrollMarginY:{match:"^(?:smy|scroll-margin-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-margin-top":e+t,"scroll-margin-bottom":e+t}}},scrollMargin:{match:"^sm:.",native:!0,unit:"rem",order:-1},scrollPaddingLeft:{match:"^spl:.",native:!0,unit:"rem"},scrollPaddingRight:{match:"^spr:.",native:!0,unit:"rem"},scrollPaddingTop:{match:"^spt:.",native:!0,unit:"rem"},scrollPaddingBottom:{match:"^spb:.",native:!0,unit:"rem"},scrollPaddingX:{match:"^(?:spx|scroll-padding-x):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-left":e+t,"scroll-padding-right":e+t}}},scrollPaddingY:{match:"^(?:spy|scroll-padding-y):.",unit:"rem",order:-.5,declare(e,t){return{"scroll-padding-top":e+t,"scroll-padding-bottom":e+t}}},scrollPadding:{match:"^sp:.",native:!0,unit:"rem",order:-1},scrollSnapAlign:{match:"^scroll-snap:(?:start|end|center|$values)",native:!0},scrollSnapStop:{match:"^scroll-snap:(?:normal|always|$values)(?!\\|)",native:!0},scrollSnapType:{match:"^scroll-snap:(?:(?:[xy]|block|inline|both)(?:\\|(?:proximity|mandatory))?|$values)(?!\\|)",native:!0},willChange:{native:!0},writingMode:{match:"^writing:.",native:!0},direction:{native:!0},shapeOutside:{match:"^shape:(?:(?:inset|circle|ellipse|polygon|url|linear-gradient)\\(.*\\)|$values)(?!\\|)",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box"}},shapeMargin:{match:"^shape:(?:\\.?[0-9]|(?:max|min|calc|clamp)\\(.*\\)|$values)[^|]*$",unit:"rem",native:!0},shapeImageThreshold:{native:!0},clipPath:{match:"^clip:.",native:!0,values:{content:"content-box",border:"border-box",padding:"padding-box",margin:"margin-box",fill:"fill-box",stroke:"stroke-box",view:"view-box"}},quotes:{native:!0},maskImage:{native:!0,declare(e,t){return{"mask-image":e+t,"-webkit-mask-image":e+t}}}},B=T;function b(e){if(!this.css.config.keyframes)return;let t=(this.meta.origin==="symbol"?e.slice(this.meta.config.symbol.length):e.slice(e.indexOf(":")+1)).split("|").filter(i=>i in this.css.config.keyframes);t?.length&&(this.keyframeNames=t)}function p(){if(this.keyframeNames?.length){let e=this.css.rules[0];for(let t of this.keyframeNames){let i=this.css.keyframes[t];if(!--i.count){let u=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(u),e.natives.splice(u,1),delete this.css.keyframes[t]}}e.natives.length||this.css.rules.splice(0,1)}}function f(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:u}=this.css,o=i?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let m={text:`@keyframes ${l} {`+Object.entries(e.keyframes[l]).map(([c,a])=>`${c} {${Object.entries(a).map(([r,n])=>r+": "+n).join(";")}}`).join(",")+"}",theme:""},d;if(Object.keys(t).length?(d=u[0]).natives.push(m):u.splice(0,0,d={natives:[m],get text(){return this.natives.map(c=>c.text).join("")}}),o){let c;for(let a=0;a<o.cssRules.length;a++){let r=o.cssRules[a];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===l){c=r;break}}if(c)m.cssRule=c;else{let a=d.natives.length-1;o.insertRule(m.text,a),m.cssRule=o.cssRules[a]}}t[l]={native:m,count:1}}}}0&&(module.exports={rules});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var
|
|
1
|
+
var a=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var d=(e,i)=>{for(var l in i)a(e,l,{get:i[l],enumerable:!0})},p=(e,i,l,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of r(i))!s.call(e,t)&&t!==l&&a(e,t,{get:()=>i[t],enumerable:!(o=n(i,t))||o.enumerable});return e};var b=e=>p(a({},"__esModule",{value:!0}),e);var h={};d(h,{semantics:()=>c});module.exports=b(h);var c={square:{"aspect-ratio":"1/1"},video:{"aspect-ratio":"16/9"},rounded:{"border-radius":"1e9em"},round:{"border-radius":"50%"},hidden:{display:"none"},hide:{display:"none"},block:{display:"block"},table:{display:"table"},flex:{display:"flex"},grid:{display:"grid"},contents:{display:"contents"},inline:{display:"inline"},"inline-block":{display:"inline-block"},"inline-flex":{display:"inline-flex"},"inline-grid":{display:"inline-grid"},"inline-table":{display:"inline-table"},"table-cell":{display:"table-cell"},"table-caption":{display:"table-caption"},"flow-root":{display:"flow-root"},"list-item":{display:"list-item"},"table-row":{display:"table-row"},"table-column":{display:"table-column"},"table-row-group":{display:"table-row-group"},"table-column-group":{display:"table-column-group"},"table-header-group":{display:"table-header-group"},"table-footer-group":{display:"table-footer-group"},italic:{"font-style":"italic"},oblique:{"font-style":"oblique"},isolate:{isolation:"isolate"},overflowed:{overflow:"visible"},untouchable:{"pointer-events":"none"},static:{position:"static"},fixed:{position:"fixed"},abs:{position:"absolute"},rel:{position:"relative"},sticky:{position:"sticky"},uppercase:{"text-transform":"uppercase"},lowercase:{"text-transform":"lowercase"},capitalize:{"text-transform":"capitalize"},visible:{visibility:"visible"},invisible:{visibility:"hidden"},vw:{width:"100vw"},vh:{height:"100vh"},"max-vw":{"max-width":"100vw"},"max-vh":{"max-height":"100vh"},"min-vw":{"min-width":"100vw"},"min-vh":{"min-height":"100vh"},"center-content":{"justify-content":"center","align-items":"center"},"sr-only":{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0,0,0,0)","white-space":"nowrap","border-width":"0"},full:{width:"100%",height:"100%"},center:{left:0,right:0,"margin-left":"auto","margin-right":"auto"},middle:{top:0,bottom:0,"margin-top":"auto","margin-bottom":"auto"},"break-spaces":{"white-space":"break-spaces"},"break-word":{"overflow-wrap":"break-word",overflow:"hidden"}};0&&(module.exports={semantics});
|
package/dist/cjs/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var O=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var P=(p,e,n)=>e in p?O(p,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):p[e]=n;var U=(p,e)=>{for(var n in e)O(p,n,{get:e[n],enumerable:!0})},Y=(p,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let h of Z(e))!q.call(p,h)&&h!==n&&O(p,h,{get:()=>e[h],enumerable:!(r=_(e,h))||r.enumerable});return p};var G=p=>Y(O({},"__esModule",{value:!0}),p);var T=(p,e,n)=>(P(p,typeof e!="symbol"?e+"":e,n),n);var J={};U(J,{MasterCSS:()=>W});module.exports=G(J);function F(p){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&p instanceof e||p instanceof Date||p instanceof RegExp)}function I(p){if(typeof Buffer<"u"&&Buffer&&p instanceof Buffer){let e=Buffer.alloc(p.length);return p.copy(e),e}else{if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp)return new RegExp(p);throw new Error("Unexpected situation")}}function $(p){let e=[];return p.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?e[r]=$(n):F(n)?e[r]=I(n):e[r]=j({},n):e[r]=n}),e}function L(p,e){return e==="__proto__"?void 0:p[e]}function j(...p){let e={},n,r;return p.forEach(function(h){typeof h!="object"||h===null||Array.isArray(h)||Object.keys(h).forEach(function(M){if(r=L(e,M),n=L(h,M),n!==e)if(typeof n!="object"||n===null){e[M]=n;return}else if(Array.isArray(n)){e[M]=$(n);return}else if(F(n)){e[M]=I(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){e[M]=j({},n);return}else{e[M]=j(r,n);return}})}),e}var D=require("./rule"),S=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var N=typeof window<"u",V=()=>{let p=document.createElement("style");return p.id="master",p},A=class{constructor(e){this.config=e;this.config?.override||(this.config=j(S.config,e)),this.cache(),N&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:n,selectors:r,themes:h,colors:M,values:B,breakpoints:R,mediaQueries:g,rules:k}=this.config;function w(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(t,s,i="",c={}){let a=x=>x?(i?i+"-":"")+x:i,y=Object.entries(t),v=[],C=[];for(let x of y){let E=x[1];(typeof E=="object"&&!Array.isArray(E)?v:C).push(x)}for(let[x,E]of v)o(E,s,a(x),c);if(s&&i)C.length&&(c[i]=C.reduce((x,[E,z])=>(x[E]=z,x),{}));else for(let[x,E]of C)c[a(x)]=E;return c}if(e)for(let[t,s]of Object.entries(o(e,!0)))this.semantics.push([new RegExp("^"+w(t)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[t,s]]);if(r)for(let[t,s]of Object.entries(o(r,!1))){let i=new RegExp(w(t)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let a=c.match(/^::-[a-z]+-/m)?.[0]??"",y=this.selectors[a];y||(y=this.selectors[a]=[]);let v=y.find(([C])=>C===i);v||(v=[i,[]],y.push(v)),v[1].push(c)}}B&&(this.globalValues=o(B,!1)),R&&(this.breakpoints=o(R,!1)),g&&(this.mediaQueries=o(g,!1));let f=n?o(n,!1):{},b=h&&!Array.isArray(h)?Object.entries(h).filter(([,{classes:t}])=>t).reduce((t,[s,{classes:i}])=>(t[s]=o(i,!1),t),{}):{},u=[...Object.keys(f),...Object.entries(b).flatMap(([t,s])=>Object.keys(s))],m=t=>{if(t in this.classes)return;let s=this.classes[t]=[],i=(c,a)=>{if(!a)return;let y=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let v of y){let C=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(t):this.themeAffectedClassesBy[x][c]=[t]:this.themeAffectedClassesBy[x]={[c]:[t]},s.includes(x)||s.push(x)};if(u.includes(v)){m(v);for(let x of this.classes[v])C(x)}else C(v)}};i("",f?.[t]);for(let[c,a]of Object.entries(b))i(c,a?.[t])};for(let t of u)m(t);for(let t in this.themeAffectedClassesBy){let s=this.classesBy[t]=[];for(let i of Object.values(this.themeAffectedClassesBy[t]))for(let c of i)s.includes(c)||s.push(c)}let l=(t,s)=>{if(!s)return;let i=o(s,!0);for(let[c,a]of Object.entries(i)){let y=typeof a=="string"?{"":a}:a;for(let[v,C]of Object.entries(y)){let x=c+(v?"-"+v:"");x in this.colorThemesMap?this.colorThemesMap[x][t]=C:this.colorThemesMap[x]={[t]:C}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(l("",M),h)if(Array.isArray(h))this.themeNames.push(...h);else for(let t in h){let s=h[t];l(t,s.colors),this.themeNames.push(t)}let d=t=>{for(let[s,i]of Object.entries(this.colorThemesMap))for(let[c,a]of Object.entries(i))a.startsWith("#")||t(s,i,c,a)};if(d((t,s,i,c)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(a){let y="#"+(0,H.rgbToHex)(+a[1],+a[2],+a[3]);a[4]&&(y+=Math.round(255*+a[4]).toString(16)),s[i]=y}}),d((t,s,i,c)=>{let[a,y]=c.split("/"),v=this.colorThemesMap[a];if(v){let C=(i?v[i]:void 0)??v[""];s[i]=y?C.slice(0,7)+Math.round(255*+y).toString(16):C}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[i],Object.keys(s).length||delete this.colorThemesMap[t]}),k)for(let t in k){let s=k[t],{native:i,values:c,colored:a}=s,y=s.match;if(s.id=t,s.native=i===!0?t.replace(/(?!^)[A-Z]/g,v=>"-"+v).toLowerCase():void 0,c&&(this.values[t]=o(c,!1)),y){let v=Object.keys(this.values[t]??{});y.includes("$values")&&(y=v.length?y.replace(/\$values/,v.join("|")):y.replace(/(?:\|)?\$values/,"")),a&&y.includes("$colors")&&(y=this.colorNames.length?y.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):y.replace(/(?:\|)?\$colors/,"")),this.matches[t]=new RegExp(y)}}}observe(e,n={subtree:!0,childList:!0}){if(this.root!==e){if(N&&e){this.root=e;let r=e===document;r&&(A.root=this),this.host=r?document.documentElement:root.host;let h=r?document.head:e,M=r?document.styleSheets:e.styleSheets;for(let R of M){let{href:g,ownerNode:k}=R;if(k.id==="master"||g&&g.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(g)){this.style=k;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let g=this.style.sheet.cssRules[R];if(g.constructor.name==="CSSKeyframesRule")continue;let k=o=>{if(o.selectorText){let b=o.selectorText.split(", ")[0].split(" ");for(let u=0;u<b.length;u++){let m=b[u];if(m[0]==="."){let l=m.slice(1),d="";for(let t=0;t<l.length;t++){let s=l[t],i=l[t+1];if(s==="\\"){if(t++,i!=="\\"){d+=i;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;d+=s}if(!(d in this.ruleBy)&&!(d in this.classes)){let t=this.create(d)[0];if(t)return t}}}}else if(o.cssRules)for(let f=0;f<o.cssRules.length;f++){let b=k(o.cssRules[f]);if(b)return b}},w=k(g);if(w){this.rules.push(w),this.ruleBy[w.className]=w;for(let o=0;o<w.natives.length;o++)w.natives[o].cssRule=this.style.sheet.cssRules[R+o];R+=w.natives.length-1,w.config.insert?.call(w)}}else this.style=V(),h.append(this.style);let B=R=>{R.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};B(this.host.classList),n.subtree&&this.host.querySelectorAll("[class]").forEach(R=>B(R.classList)),this.observer=new MutationObserver(R=>{let g={},k=[],w=[],o=[],f=(l,d)=>{d?l.classList.forEach(u):l.classList.forEach(b);let t=l.children;for(let s=0;s<t.length;s++){let i=t[s];i.classList&&(w.push(i),f(i,d))}},b=l=>{l in g?g[l]++:g[l]=1},u=l=>{l in g?g[l]--:l in this.countBy&&(g[l]=-1)},m=(l,d)=>{for(let t=0;t<l.length;t++){let s=l[t];s.classList&&!w.includes(s)&&!o.includes(s)&&(s.isConnected!==d?(w.push(s),f(s,d)):o.push(s))}};for(let l=0;l<R.length;l++){let d=R[l],{addedNodes:t,removedNodes:s,type:i,target:c}=d;if(i==="attributes"){if(k.find(a=>a.target===c))continue;k.push(d)}else m(t,!1),(!c.isConnected||!w.includes(c))&&m(s,!0)}if(!(!k.length&&!Object.keys(g).length)){for(let{oldValue:l,target:d}of k){let t=w.includes(d),s=d.classList,i=l?l.split(" "):[];if(t){if(d.isConnected)continue;for(let c of i)s.contains(c)||u(c)}else if(d.isConnected){s.forEach(c=>{i.includes(c)||b(c)});for(let c of i)s.contains(c)||u(c)}}for(let l in g){let d=g[l],t=(this.countBy[l]||0)+d;t===0?(delete this.countBy[l],this.delete(l)):(l in this.countBy||this.insert(l),this.countBy[l]=t)}}}),this.observer.observe(e,{...n,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let n=e.cssRules.length-1;n>=0;n--)e.deleteRule(n);this.style?.remove(),this.style=null,this.root=null}match(e){for(let n in this.config.rules){let r=this.config.rules[n],h=this.matches[n],{symbol:M,native:B}=r;if(h&&h.test(e))return{origin:"match",config:r};if(M&&e.startsWith(M))return{origin:"symbol",config:r};if(B&&e.startsWith(B+":"))return{origin:"match",config:r}}for(let n of this.semantics)if(e.match(n[0]))return{origin:"semantics",value:n[1]}}create(e){let n=r=>{if(r in this.ruleBy)return this.ruleBy[r];let h=this.match(r);if(h)return new D.Rule(r,h,this)};return(e in this.classes?this.classes[e].map(r=>n(r)):[n(e)]).filter(r=>r&&r.text)}refresh(e){if(e?.override?this.config=e:this.config=j(S.config,e),this.cache(),!this.style)return;let n=V();this.style.replaceWith(n),this.style=n,this.rules.length=0,this.ruleBy={};for(let r in this.countBy)this.insert(r)}destroy(){let e=A.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let n=this.style?.sheet,r=h=>{let M=this.ruleBy[h];if(!(!M||h in this.classesBy&&this.classesBy[h].some(B=>B in this.countBy))){if(n&&M.natives.length){let B=M.natives[0];for(let R=0;R<n.cssRules.length;R++)if(n.cssRules[R]===B.cssRule){for(let k=0;k<M.natives.length;k++)n.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(M),1),delete this.ruleBy[h],M.config.delete&&M.config.delete.call(M,h)}};if(e in this.classes){for(let h of this.classes[e])h in this.countBy||r(h);delete this.ruleBy[e]}else r(e)}insert(e){let n=this.create(e);return n.length?(this.insertRules(n),!0):!1}insertRules(e){for(let n of e){if(this.ruleBy[n.className])continue;let r,h=this.rules.length-1,{media:M,order:B,priority:R,hasWhere:g,className:k}=n,w=(o,f,b,u)=>{let m=0,l;f&&(m=o.findIndex(f)),b&&(l=o.findIndex(b)),m===-1&&(m=o.length),(l===void 0||l===-1)&&(l=o.length);let d=o.slice(m,l);for(let t=0;t<d.length;t++){let s=d[t];if(!(s.priority===-1||u&&u(s))&&(s.priority<R||s.priority===R&&(g&&!s.hasWhere||s.order>=B)))return m+t}return m+d.length};if(M){let o=this.rules.findIndex(f=>f.media);if(o!==-1){let f=M.features["max-width"],b=M.features["min-width"];if(f&&b){let u=f.value-b.value;for(let m=h;m>=o;m--){r=m;let l=this.rules[m],d=l.media,t=d.features["max-width"],s=d.features["min-width"];if(!t||!s){r++;break}let i=t.value-s.value;if(i===u){if(g!==l.hasWhere)continue;if(R!==-1){let c=[this.rules[m]];for(let a=m-1;a>=o;a--){let y=this.rules[a];if(y.hasWhere!==g)break;let v=y.media,C=v.features["max-width"],x=v.features["min-width"];if(!C||!x||C.value-x.value!==i)break;c.unshift(this.rules[a])}r=w(this.rules,a=>a.media&&a.priority!==-1&&a.media.features["min-width"]&&a.media.features["max-width"])}break}else if(i>u)break}}else if(b)for(let u=o;u<=h;u++){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"],t=l.features["min-width"];if(d){if(t)break;continue}let s=t?.value;if(s===b.value){if(!g&&m.hasWhere){r++;continue}if(R!==-1)r=w(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else for(let i=u;i<=h;i++){let c=this.rules[i],a=c.media,y=a.features["min-width"];if(!a.features["max-width"]){if(c.hasWhere!==g||y.value!==s||c.order>=B)break;r=i+1}}break}else{if(s>b.value)break;r++}}else if(f)for(let u=h;u>=o;u--){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"];if(l.features["min-width"])continue;let s=d?.value;if(!s||s>f.value){r++;break}else if(s===f.value){if(g&&!m.hasWhere)continue;if(R!==-1)r=w(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else{let i=[this.rules[u]];for(let c=u-1;c>=o;c--){let a=this.rules[c],y=a.media,v=y.features["min-width"],C=y.features["max-width"];if(!v&&(!C||C.value!==s||a.hasWhere!==g))break;i.unshift(a)}for(let c=0;c<i.length;c++){let a=i[c];if(!a.media.features["min-width"]){if(a.order>=B)break;r=u-i.length+2+c}}}break}}}if(r===void 0)if(o===-1)r=h+1;else if(R!==-1)r=o+w(this.rules.slice(o),void 0,f=>f.media.features["max-width"]||f.media.features["min-width"]);else if(g){let f=o;for(;f<this.rules.length;f++){let b=this.rules[f];if(b.priority!==-1||!b.hasWhere||b.order>=B){r=f;break}}r===void 0&&(r=f)}else for(let f=o;f<=h;f++){r=f;let b=this.rules[f],u=b.media;if(b.priority!==-1||u.features["max-width"]||u.features["min-width"])break;if(b.hasWhere)r++;else if(b.order>=B)break}}else if(R===-1){if(g)r=this.rules.findIndex(o=>!o.hasWhere||o.media||o.priority!==-1||o.order>=B),r===-1&&(r=h+1);else{let o=0;for(;o<this.rules.length;o++){let f=this.rules[o];if(f.media||!f.hasWhere&&(f.order>=B||f.priority!==-1)){r=o;break}}r===void 0&&(r=o)}!r&&Object.keys(this.keyframes).length&&r++}else r=w(this.rules,void 0,o=>o.media);if(this.rules.splice(r,0,n),this.ruleBy[k]=n,this.style){let o=this.style.sheet,f=0,b=u=>{let m=this.rules[u];if(m){if(!m.natives.length)return b(u-1);let l=m.natives[m.natives.length-1].cssRule;for(let d=0;d<o.cssRules.length;d++)if(o.cssRules[d]===l){f=d+1;break}}};b(r-1);for(let u=0;u<n.natives.length;)try{let m=n.natives[u];o.insertRule(m.text,f),m.cssRule=o.cssRules[f++],u++}catch(m){console.error(m),n.natives.splice(u,1)}}n.config.insert?.call(n)}}get text(){return this.rules.map(e=>e.text).join("")}},W=A;T(W,"root"),T(W,"config",S.config),T(W,"instances",[]),T(W,"refresh",e=>{for(let n of A.instances)n.refresh(e)});N&&(window.MasterCSS=W);0&&(module.exports={MasterCSS});
|
|
1
|
+
var S=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var P=(p,e,n)=>e in p?S(p,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):p[e]=n;var U=(p,e)=>{for(var n in e)S(p,n,{get:e[n],enumerable:!0})},Y=(p,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let h of Z(e))!q.call(p,h)&&h!==n&&S(p,h,{get:()=>e[h],enumerable:!(r=_(e,h))||r.enumerable});return p};var G=p=>Y(S({},"__esModule",{value:!0}),p);var O=(p,e,n)=>(P(p,typeof e!="symbol"?e+"":e,n),n);var J={};U(J,{MasterCSS:()=>W});module.exports=G(J);function F(p){let e=typeof Buffer<"u"?Buffer:null;return!!(e&&p instanceof e||p instanceof Date||p instanceof RegExp)}function I(p){if(typeof Buffer<"u"&&Buffer&&p instanceof Buffer){let e=Buffer.alloc(p.length);return p.copy(e),e}else{if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp)return new RegExp(p);throw new Error("Unexpected situation")}}function $(p){let e=[];return p.forEach(function(n,r){typeof n=="object"&&n!==null?Array.isArray(n)?e[r]=$(n):F(n)?e[r]=I(n):e[r]=j({},n):e[r]=n}),e}function L(p,e){return e==="__proto__"?void 0:p[e]}function j(...p){let e={},n,r;return p.forEach(function(h){typeof h!="object"||h===null||Array.isArray(h)||Object.keys(h).forEach(function(M){if(r=L(e,M),n=L(h,M),n!==e)if(typeof n!="object"||n===null){e[M]=n;return}else if(Array.isArray(n)){e[M]=$(n);return}else if(F(n)){e[M]=I(n);return}else if(typeof r!="object"||r===null||Array.isArray(r)){e[M]=j({},n);return}else{e[M]=j(r,n);return}})}),e}var D=require("./rule"),T=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var N=typeof window<"u",V=()=>{let p=document.createElement("style");return p.id="master",p},A=class{constructor(e=T.config){this.config=e;e?.override||(this.config=j(T.config,e),"keyframes"in e&&Object.assign(this.config.keyframes,e.keyframes)),this.cache(),N&&this.config.observe&&this.observe(document),A.instances.push(this)}rules=[];ruleBy={};countBy={};observing=!1;observer;cache(){this.semantics=[],this.classes={},this.colorThemesMap={},this.themeAffectedClassesBy={},this.classesBy={},this.colorNames=[],this.themeNames=[""],this.selectors={},this.values={},this.globalValues={},this.breakpoints={},this.mediaQueries={},this.matches={},this.keyframes={};let{semantics:e,classes:n,selectors:r,themes:h,colors:M,values:B,breakpoints:R,mediaQueries:g,rules:k}=this.config;function w(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function o(t,s,i="",c={}){let a=x=>x?(i?i+"-":"")+x:i,y=Object.entries(t),v=[],C=[];for(let x of y){let E=x[1];(typeof E=="object"&&!Array.isArray(E)?v:C).push(x)}for(let[x,E]of v)o(E,s,a(x),c);if(s&&i)C.length&&(c[i]=C.reduce((x,[E,z])=>(x[E]=z,x),{}));else for(let[x,E]of C)c[a(x)]=E;return c}if(e)for(let[t,s]of Object.entries(o(e,!0)))this.semantics.push([new RegExp("^"+w(t)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[t,s]]);if(r)for(let[t,s]of Object.entries(o(r,!1))){let i=new RegExp(w(t)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let a=c.match(/^::-[a-z]+-/m)?.[0]??"",y=this.selectors[a];y||(y=this.selectors[a]=[]);let v=y.find(([C])=>C===i);v||(v=[i,[]],y.push(v)),v[1].push(c)}}B&&(this.globalValues=o(B,!1)),R&&(this.breakpoints=o(R,!1)),g&&(this.mediaQueries=o(g,!1));let f=n?o(n,!1):{},b=h&&!Array.isArray(h)?Object.entries(h).filter(([,{classes:t}])=>t).reduce((t,[s,{classes:i}])=>(t[s]=o(i,!1),t),{}):{},u=[...Object.keys(f),...Object.entries(b).flatMap(([t,s])=>Object.keys(s))],m=t=>{if(t in this.classes)return;let s=this.classes[t]=[],i=(c,a)=>{if(!a)return;let y=Array.isArray(a)?a:a.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let v of y){let C=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(t):this.themeAffectedClassesBy[x][c]=[t]:this.themeAffectedClassesBy[x]={[c]:[t]},s.includes(x)||s.push(x)};if(u.includes(v)){m(v);for(let x of this.classes[v])C(x)}else C(v)}};i("",f?.[t]);for(let[c,a]of Object.entries(b))i(c,a?.[t])};for(let t of u)m(t);for(let t in this.themeAffectedClassesBy){let s=this.classesBy[t]=[];for(let i of Object.values(this.themeAffectedClassesBy[t]))for(let c of i)s.includes(c)||s.push(c)}let l=(t,s)=>{if(!s)return;let i=o(s,!0);for(let[c,a]of Object.entries(i)){let y=typeof a=="string"?{"":a}:a;for(let[v,C]of Object.entries(y)){let x=c+(v?"-"+v:"");x in this.colorThemesMap?this.colorThemesMap[x][t]=C:this.colorThemesMap[x]={[t]:C}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(l("",M),h)if(Array.isArray(h))this.themeNames.push(...h);else for(let t in h){let s=h[t];l(t,s.colors),this.themeNames.push(t)}let d=t=>{for(let[s,i]of Object.entries(this.colorThemesMap))for(let[c,a]of Object.entries(i))a.startsWith("#")||t(s,i,c,a)};if(d((t,s,i,c)=>{let a=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(a){let y="#"+(0,H.rgbToHex)(+a[1],+a[2],+a[3]);a[4]&&(y+=Math.round(255*+a[4]).toString(16)),s[i]=y}}),d((t,s,i,c)=>{let[a,y]=c.split("/"),v=this.colorThemesMap[a];if(v){let C=(i?v[i]:void 0)??v[""];s[i]=y?C.slice(0,7)+Math.round(255*+y).toString(16):C}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[i],Object.keys(s).length||delete this.colorThemesMap[t]}),k)for(let t in k){let s=k[t],{native:i,values:c,colored:a}=s,y=s.match;if(s.id=t,s.native=i===!0?t.replace(/(?!^)[A-Z]/g,v=>"-"+v).toLowerCase():void 0,c&&(this.values[t]=o(c,!1)),y){let v=Object.keys(this.values[t]??{});y.includes("$values")&&(y=v.length?y.replace(/\$values/,v.join("|")):y.replace(/(?:\|)?\$values/,"")),a&&y.includes("$colors")&&(y=this.colorNames.length?y.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):y.replace(/(?:\|)?\$colors/,"")),this.matches[t]=new RegExp(y)}}}observe(e,n={subtree:!0,childList:!0}){if(this.root!==e){if(N&&e){this.root=e;let r=e===document;r&&(A.root=this),this.host=r?document.documentElement:root.host;let h=r?document.head:e,M=r?document.styleSheets:e.styleSheets;for(let R of M){let{href:g,ownerNode:k}=R;if(k.id==="master"||g&&g.startsWith(window.location.origin)&&/master(?:\..+)?\.css/.test(g)){this.style=k;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let g=this.style.sheet.cssRules[R];if(g.constructor.name==="CSSKeyframesRule")continue;let k=o=>{if(o.selectorText){let b=o.selectorText.split(", ")[0].split(" ");for(let u=0;u<b.length;u++){let m=b[u];if(m[0]==="."){let l=m.slice(1),d="";for(let t=0;t<l.length;t++){let s=l[t],i=l[t+1];if(s==="\\"){if(t++,i!=="\\"){d+=i;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;d+=s}if(!(d in this.ruleBy)&&!(d in this.classes)){let t=this.create(d)[0];if(t)return t}}}}else if(o.cssRules)for(let f=0;f<o.cssRules.length;f++){let b=k(o.cssRules[f]);if(b)return b}},w=k(g);if(w){this.rules.push(w),this.ruleBy[w.className]=w;for(let o=0;o<w.natives.length;o++)w.natives[o].cssRule=this.style.sheet.cssRules[R+o];R+=w.natives.length-1,w.config.insert?.call(w)}}else this.style=V(),h.append(this.style);let B=R=>{R.forEach(g=>{g in this.countBy?this.countBy[g]++:(this.countBy[g]=1,this.insert(g))})};B(this.host.classList),n.subtree&&this.host.querySelectorAll("[class]").forEach(R=>B(R.classList)),this.observer=new MutationObserver(R=>{let g={},k=[],w=[],o=[],f=(l,d)=>{d?l.classList.forEach(u):l.classList.forEach(b);let t=l.children;for(let s=0;s<t.length;s++){let i=t[s];i.classList&&(w.push(i),f(i,d))}},b=l=>{l in g?g[l]++:g[l]=1},u=l=>{l in g?g[l]--:l in this.countBy&&(g[l]=-1)},m=(l,d)=>{for(let t=0;t<l.length;t++){let s=l[t];s.classList&&!w.includes(s)&&!o.includes(s)&&(s.isConnected!==d?(w.push(s),f(s,d)):o.push(s))}};for(let l=0;l<R.length;l++){let d=R[l],{addedNodes:t,removedNodes:s,type:i,target:c}=d;if(i==="attributes"){if(k.find(a=>a.target===c))continue;k.push(d)}else m(t,!1),(!c.isConnected||!w.includes(c))&&m(s,!0)}if(!(!k.length&&!Object.keys(g).length)){for(let{oldValue:l,target:d}of k){let t=w.includes(d),s=d.classList,i=l?l.split(" "):[];if(t){if(d.isConnected)continue;for(let c of i)s.contains(c)||u(c)}else if(d.isConnected){s.forEach(c=>{i.includes(c)||b(c)});for(let c of i)s.contains(c)||u(c)}}for(let l in g){let d=g[l],t=(this.countBy[l]||0)+d;t===0?(delete this.countBy[l],this.delete(l)):(l in this.countBy||this.insert(l),this.countBy[l]=t)}}}),this.observer.observe(e,{...n,attributes:!0,attributeOldValue:!0,attributeFilter:["class"]}),this.host.style.display=null,this.observing=!0}return this}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observing=!1,this.ruleBy={},this.countBy={},this.rules.length=0;let e=this.style?.sheet;if(e?.cssRules)for(let n=e.cssRules.length-1;n>=0;n--)e.deleteRule(n);this.style?.remove(),this.style=null,this.root=null}match(e){for(let n in this.config.rules){let r=this.config.rules[n],h=this.matches[n],{symbol:M,native:B}=r;if(h&&h.test(e))return{origin:"match",config:r};if(M&&e.startsWith(M))return{origin:"symbol",config:r};if(B&&e.startsWith(B+":"))return{origin:"match",config:r}}for(let n of this.semantics)if(e.match(n[0]))return{origin:"semantics",value:n[1]}}create(e){let n=r=>{if(r in this.ruleBy)return this.ruleBy[r];let h=this.match(r);if(h)return new D.Rule(r,h,this)};return(e in this.classes?this.classes[e].map(r=>n(r)):[n(e)]).filter(r=>r&&r.text)}refresh(e){if(e?.override?this.config=e:this.config=j(T.config,e),this.cache(),!this.style)return;let n=V();this.style.replaceWith(n),this.style=n,this.rules.length=0,this.ruleBy={};for(let r in this.countBy)this.insert(r)}destroy(){let e=A.instances;this.disconnect(),e.splice(e.indexOf(this),1)}delete(e){let n=this.style?.sheet,r=h=>{let M=this.ruleBy[h];if(!(!M||h in this.classesBy&&this.classesBy[h].some(B=>B in this.countBy))){if(n&&M.natives.length){let B=M.natives[0];for(let R=0;R<n.cssRules.length;R++)if(n.cssRules[R]===B.cssRule){for(let k=0;k<M.natives.length;k++)n.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(M),1),delete this.ruleBy[h],M.config.delete&&M.config.delete.call(M,h)}};if(e in this.classes){for(let h of this.classes[e])h in this.countBy||r(h);delete this.ruleBy[e]}else r(e)}insert(e){let n=this.create(e);return n.length?(this.insertRules(n),!0):!1}insertRules(e){for(let n of e){if(this.ruleBy[n.className])continue;let r,h=this.rules.length-1,{media:M,order:B,priority:R,hasWhere:g,className:k}=n,w=(o,f,b,u)=>{let m=0,l;f&&(m=o.findIndex(f)),b&&(l=o.findIndex(b)),m===-1&&(m=o.length),(l===void 0||l===-1)&&(l=o.length);let d=o.slice(m,l);for(let t=0;t<d.length;t++){let s=d[t];if(!(s.priority===-1||u&&u(s))&&(s.priority<R||s.priority===R&&(g&&!s.hasWhere||s.order>=B)))return m+t}return m+d.length};if(M){let o=this.rules.findIndex(f=>f.media);if(o!==-1){let f=M.features["max-width"],b=M.features["min-width"];if(f&&b){let u=f.value-b.value;for(let m=h;m>=o;m--){r=m;let l=this.rules[m],d=l.media,t=d.features["max-width"],s=d.features["min-width"];if(!t||!s){r++;break}let i=t.value-s.value;if(i===u){if(g!==l.hasWhere)continue;if(R!==-1){let c=[this.rules[m]];for(let a=m-1;a>=o;a--){let y=this.rules[a];if(y.hasWhere!==g)break;let v=y.media,C=v.features["max-width"],x=v.features["min-width"];if(!C||!x||C.value-x.value!==i)break;c.unshift(this.rules[a])}r=w(this.rules,a=>a.media&&a.priority!==-1&&a.media.features["min-width"]&&a.media.features["max-width"])}break}else if(i>u)break}}else if(b)for(let u=o;u<=h;u++){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"],t=l.features["min-width"];if(d){if(t)break;continue}let s=t?.value;if(s===b.value){if(!g&&m.hasWhere){r++;continue}if(R!==-1)r=w(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else for(let i=u;i<=h;i++){let c=this.rules[i],a=c.media,y=a.features["min-width"];if(!a.features["max-width"]){if(c.hasWhere!==g||y.value!==s||c.order>=B)break;r=i+1}}break}else{if(s>b.value)break;r++}}else if(f)for(let u=h;u>=o;u--){r=u;let m=this.rules[u],l=m.media,d=l.features["max-width"];if(l.features["min-width"])continue;let s=d?.value;if(!s||s>f.value){r++;break}else if(s===f.value){if(g&&!m.hasWhere)continue;if(R!==-1)r=w(this.rules,i=>i.media,i=>i.media&&i.priority!==-1&&i.media.features["min-width"]&&i.media.features["max-width"],i=>!i.media.features["min-width"]&&!i.media.features["max-width"]);else{let i=[this.rules[u]];for(let c=u-1;c>=o;c--){let a=this.rules[c],y=a.media,v=y.features["min-width"],C=y.features["max-width"];if(!v&&(!C||C.value!==s||a.hasWhere!==g))break;i.unshift(a)}for(let c=0;c<i.length;c++){let a=i[c];if(!a.media.features["min-width"]){if(a.order>=B)break;r=u-i.length+2+c}}}break}}}if(r===void 0)if(o===-1)r=h+1;else if(R!==-1)r=o+w(this.rules.slice(o),void 0,f=>f.media.features["max-width"]||f.media.features["min-width"]);else if(g){let f=o;for(;f<this.rules.length;f++){let b=this.rules[f];if(b.priority!==-1||!b.hasWhere||b.order>=B){r=f;break}}r===void 0&&(r=f)}else for(let f=o;f<=h;f++){r=f;let b=this.rules[f],u=b.media;if(b.priority!==-1||u.features["max-width"]||u.features["min-width"])break;if(b.hasWhere)r++;else if(b.order>=B)break}}else if(R===-1){if(g)r=this.rules.findIndex(o=>!o.hasWhere||o.media||o.priority!==-1||o.order>=B),r===-1&&(r=h+1);else{let o=0;for(;o<this.rules.length;o++){let f=this.rules[o];if(f.media||!f.hasWhere&&(f.order>=B||f.priority!==-1)){r=o;break}}r===void 0&&(r=o)}!r&&Object.keys(this.keyframes).length&&r++}else r=w(this.rules,void 0,o=>o.media);if(this.rules.splice(r,0,n),this.ruleBy[k]=n,this.style){let o=this.style.sheet,f=0,b=u=>{let m=this.rules[u];if(m){if(!m.natives.length)return b(u-1);let l=m.natives[m.natives.length-1].cssRule;for(let d=0;d<o.cssRules.length;d++)if(o.cssRules[d]===l){f=d+1;break}}};b(r-1);for(let u=0;u<n.natives.length;)try{let m=n.natives[u];o.insertRule(m.text,f),m.cssRule=o.cssRules[f++],u++}catch(m){console.error(m),n.natives.splice(u,1)}}n.config.insert?.call(n)}}get text(){return this.rules.map(e=>e.text).join("")}},W=A;O(W,"root"),O(W,"config",T.config),O(W,"instances",[]),O(W,"refresh",e=>{for(let n of A.instances)n.refresh(e)});N&&(window.MasterCSS=W);0&&(module.exports={MasterCSS});
|
package/dist/cjs/rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var pe=Object.prototype.hasOwnProperty;var me=(u,i)=>{for(var s in i)Q(u,s,{get:i[s],enumerable:!0})},xe=(u,i,s,y)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of de(i))!pe.call(u,v)&&v!==s&&Q(u,v,{get:()=>i[v],enumerable:!(y=ge(i,v))||y.enumerable});return u};var ye=u=>xe(Q({},"__esModule",{value:!0}),u);var ve={};me(ve,{Rule:()=>F});module.exports=ye(ve);var q=require("./constants/sorted-selectors"),$=require("./constants/start-symbol"),ce=require("./utils/css-escape");function oe(u){let i=typeof Buffer<"u"?Buffer:null;return!!(i&&u instanceof i||u instanceof Date||u instanceof RegExp)}function le(u){if(typeof Buffer<"u"&&Buffer&&u instanceof Buffer){let i=Buffer.alloc(u.length);return u.copy(i),i}else{if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp)return new RegExp(u);throw new Error("Unexpected situation")}}function fe(u){let i=[];return u.forEach(function(s,y){typeof s=="object"&&s!==null?Array.isArray(s)?i[y]=fe(s):oe(s)?i[y]=le(s):i[y]=A({},s):i[y]=s}),i}function re(u,i){return i==="__proto__"?void 0:u[i]}function A(...u){let i={},s,y;return u.forEach(function(v){typeof v!="object"||v===null||Array.isArray(v)||Object.keys(v).forEach(function(
|
|
1
|
+
var Q=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var pe=Object.prototype.hasOwnProperty;var me=(u,i)=>{for(var s in i)Q(u,s,{get:i[s],enumerable:!0})},xe=(u,i,s,y)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of de(i))!pe.call(u,v)&&v!==s&&Q(u,v,{get:()=>i[v],enumerable:!(y=ge(i,v))||y.enumerable});return u};var ye=u=>xe(Q({},"__esModule",{value:!0}),u);var ve={};me(ve,{Rule:()=>F});module.exports=ye(ve);var q=require("./constants/sorted-selectors"),$=require("./constants/start-symbol"),ce=require("./utils/css-escape");function oe(u){let i=typeof Buffer<"u"?Buffer:null;return!!(i&&u instanceof i||u instanceof Date||u instanceof RegExp)}function le(u){if(typeof Buffer<"u"&&Buffer&&u instanceof Buffer){let i=Buffer.alloc(u.length);return u.copy(i),i}else{if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp)return new RegExp(u);throw new Error("Unexpected situation")}}function fe(u){let i=[];return u.forEach(function(s,y){typeof s=="object"&&s!==null?Array.isArray(s)?i[y]=fe(s):oe(s)?i[y]=le(s):i[y]=A({},s):i[y]=s}),i}function re(u,i){return i==="__proto__"?void 0:u[i]}function A(...u){let i={},s,y;return u.forEach(function(v){typeof v!="object"||v===null||Array.isArray(v)||Object.keys(v).forEach(function(k){if(y=re(i,k),s=re(v,k),s!==i)if(typeof s!="object"||s===null){i[k]=s;return}else if(Array.isArray(s)){i[k]=fe(s);return}else if(oe(s)){i[k]=le(s);return}else if(typeof y!="object"||y===null||Array.isArray(y)){i[k]=A({},s);return}else{i[k]=A(y,s);return}})}),i}var Se={unit:"",order:0,separators:[","]},F=class{constructor(i,s={},y){this.className=i;this.meta=s;this.css=y;this.config=A(Se,s.config);let{unit:v,order:k,colored:C,native:N,analyze:Y,transform:Z,declare:H,create:J}=this.config,{scope:K,important:ae,functions:ue}=y.config,{themeNames:X,colorNames:G,colorThemesMap:ee,selectors:W,breakpoints:te,mediaQueries:z,themeAffectedClassesBy:he,globalValues:D}=y,ie=he[i];J&&J.call(this,i);let _,ne,I,B,w;if(s.origin==="semantics"){let[g,f]=s.value;B=i.slice(g.length),_=f}else{let g;if(Y)[g,I]=Y.call(this,i);else if(s.origin==="match"){let r=i.indexOf(":");this.prefix=i.slice(0,r+1),this.prefix.includes("(")?(this.prefix=void 0,g=i):g=i.slice(r+1)}else s.origin==="symbol"&&(this.symbol=i[0],g=i.slice(1));w=[];let f=this,a=this.values,m=[","];this.config.separators.length&&m.push(...this.config.separators);let n="",t=0;(function r(e,c,l,o=void 0,h=[],b=[],d){let T=o===void 0,S,M=p=>p==="'"||p==='"',V=()=>S=n.length,O=()=>{if(n){let p=n,x=T?p:n.slice(S);if(n="",j="",a&&x in a&&!h.includes(x)){let R=t;t=0,r(a[x].toString(),c,void 0,o,[...h,x],b,d),t=R,T||(n=n.slice(0,S)+n)}else if(D&&x in D&&!b.includes(x)){let R=t;t=0,r(D[x].toString(),c,void 0,o,h,[...b,x],d),t=R,T||(n=n.slice(0,S)+n)}else if(T){let R=!d&&f.analyzeUnitValue(x,c);w.push({value:R?.value??x,unit:R?.unit})}else{let R=!d&&f.analyzeUnitValue(x,c);n=R?p.slice(0,S)+R.value+R.unit:p}V()}},E=M(l);V();let j="";for(;t<e.length;t++){let p=e[t];if(p===l){if(E){n+=p;let x=0;for(let R=n.length-2;n[R]==="\\";R--)x++;if(x%2)continue}else O(),n+=p;return}else if(!E&&p in $.START_SYMBOL){let x=p==="("&&j&&ue?.[j];x?.name&&(n=n.slice(0,n.length-j.length)+x.name,j=x.name),n+=p,t++;let R=$.START_SYMBOL[p];r(e,x?.unit??c,R,j||o||"",h,b,d||!!x?.transform),x?.transform&&(n=n.slice(0,S+j.length+1)+x.transform.call(f,n.slice(S+j.length+1,-1))+n.slice(-1)),T&&(M(R)?(w.push(n),n=""):O()),j=""}else if((p==="|"||p===" ")&&l!=="}"&&(!E||o==="path"))O(),T||(n+=" ",S++);else{if(!E){if(p==="."){if(isNaN(+e[t+1]))break;e[t-1]==="-"&&(n+="0")}else if(m.includes(p)){O(),T?w.push(p):(n+=p,S++);continue}else if(T&&(p==="#"&&(n||w.length&&e[t-1]!=="|"&&w[t-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(p)))break;j+=p}n+=p}}o===void 0&&O()})(g,v),B=g.slice(t)}this.order=typeof k=="function"?k.call(this,this.prefix):k,B[0]==="!"&&(this.important=!0,B=B.slice(1));let se=g=>{let f=g.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((t,r)=>r%3?t:t.replace(/_/g," ")).join(""),a=[],m="",n=0;for(let t=0;t<f.length;t++){let r=f[t];if(r==="\\"){m+=r+f[++t];continue}!n&&r===","?(a.push(m),m=""):(m+=r,n&&r===")"?n--:r==="("&&n++)}return m&&a.push(m),a};this.prefixSelectors=I?se(I):[""];let P=B.split("@"),U=P[0];if(U){this.vendorSuffixSelectors={};let g=(t,r,e,c)=>{for(let[l,o]of r)if(l.test(t)){for(let h of o)g(t.replace(l,h),r,e,!0);return}c&&e.push(t)},f=[];""in W?g(U,W[""],f,!0):f.push(U);let a={};for(let[t,r]of Object.entries(W)){if(!t)continue;let e=[];for(let c of f)g(c,r,e,!1);e.length&&(a[t]=e)}let m=(t,r)=>{let e=r.reduce((c,l)=>(c.push(...se(l)),c),[]);t in this.vendorSuffixSelectors?this.vendorSuffixSelectors[t].push(...e):this.vendorSuffixSelectors[t]=e},n=Object.keys(a);if(n.length)for(let t of n)m(t,a[t]);else m("",f);for(let t of Object.values(this.vendorSuffixSelectors))for(let r of t){this.hasWhere!==!1&&(this.hasWhere=r.includes(":where("));for(let e=0;e<q.SORTED_SELECTORS.length;e++)if(r.includes(q.SORTED_SELECTORS[e])){(this.priority===-1||this.priority>e)&&(this.priority=e);break}}}else this.vendorSuffixSelectors={"":[""]};for(let g=1;g<P.length;g++){let f=P[g];if(f)if(X.includes(f))this.theme=f;else if(f==="rtl"||f==="ltr")this.direction=f;else{let a,m,n=f.indexOf("_");if(n!==-1)a=f.slice(0,n),m=f.slice(n);else{let t=f.indexOf("(");t!==-1&&(a=f.slice(0,t),m=f.slice(t))}if(!a){a="media";let t=[];this.media={token:f,features:{}};let r=f.split("&");for(let e of r)if(e==="all"||e==="print"||e==="screen"||e==="speech")this.media.type=e;else if(e==="\u{1F5A8}")this.media.type="print";else if(e==="landscape"||e==="portrait")t.push("(orientation:"+e+")");else if(e==="motion"||e==="reduced-motion")t.push("(prefers-reduced-motion:"+(e==="motion"?"no-preference":"reduce")+")");else if(z&&e in z)t.push(z[e]);else{let c={token:e},l="",o="",h=0;e.startsWith("<=")?(o="<=",l="max-width"):e.startsWith(">=")||te[e]?(o=">=",l="min-width"):e.startsWith(">")?(o=">",l="min-width",h=.02):e.startsWith("<")&&(o="<",l="max-width",h=-.02);let b=o?e.replace(o,""):e,d=te[b];switch(l){case"max-width":case"min-width":d?Object.assign(c,this.analyzeUnitValue(d.toString(),"px")):Object.assign(c,this.analyzeUnitValue(b,"px")),c.unit==="px"&&(c.value+=h),this.media.features[l]=c,t.push("("+l+":"+(c.value+c.unit)+")");break}}m="",this.media.type&&(m=this.media.type),t.length&&(m+=(m?" and ":"")+t.join(" and "))}m&&(this.at[a]=(a in this.at?this.at[a]+" and ":"")+m.replace(/_/g," "))}}let L=(g,f)=>{let a,m=(r,e,c)=>{let l="";this.direction&&(l+="[dir="+this.direction+"] ");let o=this.prefixSelectors.map(d=>d+l),h=(d,T)=>o.map(S=>(d?"."+d+" ":"")+(K?K+" ":"")+S).reduce((S,M)=>(S.push(c.reduce((V,O)=>(V.push(M+"."+(0,ce.cssEscape)(T)+O),V),[]).join(",")),S),[]).join(","),b=h(e,i)+(ie?Object.entries(ie).filter(([d])=>this.theme||!C||!e||!d||d===e).map(([d,T])=>T.reduce((S,M)=>S+","+h(this.theme??((C||ne)&&e||d),M),"")).join(""):"")+"{"+r+"}";for(let d of Object.keys(this.at).sort((T,S)=>S==="supports"?-1:1))b="@"+d+" "+this.at[d]+"{"+b+"}";return b},n=[];if(w){let r=this.theme?[this.theme,""]:[g],e,c;for(let l of w)if(typeof l=="string")n.push(l);else{let o=l.value;if(l.unit)o+=l.unit;else if(C&&ee&&G){let h=!1,b=!1;o=o.replace(new RegExp(`(^|,| |\\()((?:${G.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(d,T,S,M)=>{b=!0;let V=ee[S];if(V){let O;for(let E of r)if(O=V[E])break;if(O){h=!0;let E=O;if(M){let j=M.endsWith("%")?parseFloat(M)/100:+M;j=isNaN(j)?1:Math.min(Math.max(j,0),1),E+=Math.round(j*255).toString(16).toUpperCase().padStart(2,"0")}return T+E}}return d}),b&&(c=h)}c!==void 0&&!e&&(e=c),n.push(o)}if(f&&(e===void 0?g:!e))return;if(a=n.reduce((l,o,h)=>l+o+(o===","||w[h+1]===","||h===w.length-1?"":" "),""),Z&&(a=Z.call(this,a,this.css.config)),C&&a==="current"&&(a="currentColor"),H){let l,o;if(w.length===1){let h=w[0];typeof h=="object"&&(l=h.value,o=h.unit)}_=H.call(this,o?l:a,o||"")}else _={[N]:a}}let t={};for(let r in _){let e=(o,h)=>{let b=h+((this.important||ae)&&!h.endsWith("!important")?"!important":"");o in t?t[o].push(b):t[o]=[b]},c=r+":",l=_[r];if(typeof l=="object"){ne=!0;for(let o in l)e(o,c+l[o])}else e(g,c+l.toString())}for(let r of Object.values(this.vendorSuffixSelectors))for(let e in t)this.natives.push({text:m(t[e].join(";"),e,r),theme:e})};if(this.theme)L(this.theme,!1);else if(C)for(let g of X)L(g,!0);else L("",!1)}at={};priority=-1;natives=[];keyframeNames;config;get values(){return this.css.values[this.config.id]}get text(){return this.natives.map(i=>i.text).join("")}resolveValue(i,s){return Number.isNaN(+i)?i:i/(s==="rem"||s==="em"?this.css.config.rootSize:1)+s}analyzeUnitValue(i,s){let y=s??this.config.unit;if(y){let v="",k=i.match(/^([+-.]?\d+(\.?\d+)?)(.*)?/);if(k)if(i.includes("/")){let[C,N]=i.split("/");return{value:+C/+N*100+"%",unit:v}}else{let C=+k[1];return v=k[3]||"",v||((y==="rem"||y==="em")&&(C=C/this.css.config.rootSize),v=y||""),{value:C,unit:v}}}}};0&&(module.exports={Rule});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const keyframes: {
|
|
2
2
|
fade: {
|
|
3
|
-
|
|
3
|
+
'0%': {
|
|
4
4
|
opacity: number;
|
|
5
5
|
};
|
|
6
6
|
to: {
|
|
@@ -8,7 +8,7 @@ export declare const keyframes: {
|
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
flash: {
|
|
11
|
-
'
|
|
11
|
+
'0%,50%,to': {
|
|
12
12
|
opacity: number;
|
|
13
13
|
};
|
|
14
14
|
'25%,75%': {
|
|
@@ -71,7 +71,7 @@ export declare const keyframes: {
|
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
rotate: {
|
|
74
|
-
|
|
74
|
+
'0%': {
|
|
75
75
|
transform: string;
|
|
76
76
|
};
|
|
77
77
|
to: {
|
|
@@ -99,7 +99,7 @@ export declare const keyframes: {
|
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
zoom: {
|
|
102
|
-
|
|
102
|
+
'0%': {
|
|
103
103
|
transform: string;
|
|
104
104
|
};
|
|
105
105
|
'100%': {
|
package/dist/config/rules.d.ts
CHANGED
|
@@ -11,7 +11,19 @@ export declare const rules: {
|
|
|
11
11
|
fontFeatureSettings: RuleConfig;
|
|
12
12
|
font: RuleConfig;
|
|
13
13
|
color: RuleConfig;
|
|
14
|
+
marginLeft: RuleConfig;
|
|
15
|
+
marginRight: RuleConfig;
|
|
16
|
+
marginTop: RuleConfig;
|
|
17
|
+
marginBottom: RuleConfig;
|
|
18
|
+
marginX: RuleConfig;
|
|
19
|
+
marginY: RuleConfig;
|
|
14
20
|
margin: RuleConfig;
|
|
21
|
+
paddingLeft: RuleConfig;
|
|
22
|
+
paddingRight: RuleConfig;
|
|
23
|
+
paddingTop: RuleConfig;
|
|
24
|
+
paddingBottom: RuleConfig;
|
|
25
|
+
paddingX: RuleConfig;
|
|
26
|
+
paddingY: RuleConfig;
|
|
15
27
|
padding: RuleConfig;
|
|
16
28
|
flexBasis: RuleConfig;
|
|
17
29
|
flexWrap: RuleConfig;
|
|
@@ -50,6 +62,10 @@ export declare const rules: {
|
|
|
50
62
|
verticalAlign: RuleConfig;
|
|
51
63
|
columns: RuleConfig;
|
|
52
64
|
whiteSpace: RuleConfig;
|
|
65
|
+
top: RuleConfig;
|
|
66
|
+
bottom: RuleConfig;
|
|
67
|
+
left: RuleConfig;
|
|
68
|
+
right: RuleConfig;
|
|
53
69
|
inset: RuleConfig;
|
|
54
70
|
lines: RuleConfig;
|
|
55
71
|
maxHeight: RuleConfig;
|
|
@@ -60,7 +76,11 @@ export declare const rules: {
|
|
|
60
76
|
clear: RuleConfig;
|
|
61
77
|
float: RuleConfig;
|
|
62
78
|
isolation: RuleConfig;
|
|
79
|
+
overflowX: RuleConfig;
|
|
80
|
+
overflowY: RuleConfig;
|
|
63
81
|
overflow: RuleConfig;
|
|
82
|
+
overscrollBehaviorX: RuleConfig;
|
|
83
|
+
overscrollBehaviorY: RuleConfig;
|
|
64
84
|
overscrollBehavior: RuleConfig;
|
|
65
85
|
zIndex: RuleConfig;
|
|
66
86
|
position: RuleConfig;
|
|
@@ -98,18 +118,50 @@ export declare const rules: {
|
|
|
98
118
|
animationPlayState: RuleConfig;
|
|
99
119
|
animationTimingFunction: RuleConfig;
|
|
100
120
|
animation: RuleConfig;
|
|
121
|
+
borderCollapse: RuleConfig;
|
|
122
|
+
borderSpacing: RuleConfig;
|
|
123
|
+
borderTopColor: RuleConfig;
|
|
124
|
+
borderBottomColor: RuleConfig;
|
|
125
|
+
borderLeftColor: RuleConfig;
|
|
126
|
+
borderRightColor: RuleConfig;
|
|
127
|
+
borderXColor: RuleConfig;
|
|
128
|
+
borderYColor: RuleConfig;
|
|
101
129
|
borderColor: RuleConfig;
|
|
130
|
+
borderTopLeftRadius: RuleConfig;
|
|
131
|
+
borderTopRightRadius: RuleConfig;
|
|
132
|
+
borderBottomLeftRadius: RuleConfig;
|
|
133
|
+
borderBottomRightRadius: RuleConfig;
|
|
134
|
+
borderTopRadius: RuleConfig;
|
|
135
|
+
borderBottomRadius: RuleConfig;
|
|
136
|
+
borderLeftRadius: RuleConfig;
|
|
137
|
+
borderRightRadius: RuleConfig;
|
|
102
138
|
borderRadius: RuleConfig;
|
|
139
|
+
borderTopStyle: RuleConfig;
|
|
140
|
+
borderBottomStyle: RuleConfig;
|
|
141
|
+
borderLeftStyle: RuleConfig;
|
|
142
|
+
borderRightStyle: RuleConfig;
|
|
143
|
+
borderXStyle: RuleConfig;
|
|
144
|
+
borderYStyle: RuleConfig;
|
|
103
145
|
borderStyle: RuleConfig;
|
|
146
|
+
borderTopWidth: RuleConfig;
|
|
147
|
+
borderBottomWidth: RuleConfig;
|
|
148
|
+
borderLeftWidth: RuleConfig;
|
|
149
|
+
borderRightWidth: RuleConfig;
|
|
150
|
+
borderXWidth: RuleConfig;
|
|
151
|
+
borderYWidth: RuleConfig;
|
|
104
152
|
borderWidth: RuleConfig;
|
|
105
|
-
borderCollapse: RuleConfig;
|
|
106
|
-
borderSpacing: RuleConfig;
|
|
107
153
|
borderImageOutset: RuleConfig;
|
|
108
154
|
borderImageRepeat: RuleConfig;
|
|
109
155
|
borderImageSlice: RuleConfig;
|
|
110
156
|
borderImageSource: RuleConfig;
|
|
111
157
|
borderImageWidth: RuleConfig;
|
|
112
158
|
borderImage: RuleConfig;
|
|
159
|
+
borderTop: RuleConfig;
|
|
160
|
+
borderBottom: RuleConfig;
|
|
161
|
+
borderLeft: RuleConfig;
|
|
162
|
+
borderRight: RuleConfig;
|
|
163
|
+
borderX: RuleConfig;
|
|
164
|
+
borderY: RuleConfig;
|
|
113
165
|
border: RuleConfig;
|
|
114
166
|
backgroundAttachment: RuleConfig;
|
|
115
167
|
backgroundBlendMode: RuleConfig;
|
|
@@ -152,6 +204,8 @@ export declare const rules: {
|
|
|
152
204
|
gridTemplate: RuleConfig;
|
|
153
205
|
gridArea: RuleConfig;
|
|
154
206
|
grid: RuleConfig;
|
|
207
|
+
gapX: RuleConfig;
|
|
208
|
+
gapY: RuleConfig;
|
|
155
209
|
gap: RuleConfig;
|
|
156
210
|
order: RuleConfig;
|
|
157
211
|
breakInside: RuleConfig;
|
|
@@ -182,7 +236,19 @@ export declare const rules: {
|
|
|
182
236
|
appearance: RuleConfig;
|
|
183
237
|
caretColor: RuleConfig;
|
|
184
238
|
scrollBehavior: RuleConfig;
|
|
239
|
+
scrollMarginLeft: RuleConfig;
|
|
240
|
+
scrollMarginRight: RuleConfig;
|
|
241
|
+
scrollMarginTop: RuleConfig;
|
|
242
|
+
scrollMarginBottom: RuleConfig;
|
|
243
|
+
scrollMarginX: RuleConfig;
|
|
244
|
+
scrollMarginY: RuleConfig;
|
|
185
245
|
scrollMargin: RuleConfig;
|
|
246
|
+
scrollPaddingLeft: RuleConfig;
|
|
247
|
+
scrollPaddingRight: RuleConfig;
|
|
248
|
+
scrollPaddingTop: RuleConfig;
|
|
249
|
+
scrollPaddingBottom: RuleConfig;
|
|
250
|
+
scrollPaddingX: RuleConfig;
|
|
251
|
+
scrollPaddingY: RuleConfig;
|
|
186
252
|
scrollPadding: RuleConfig;
|
|
187
253
|
scrollSnapAlign: RuleConfig;
|
|
188
254
|
scrollSnapStop: RuleConfig;
|
package/dist/css.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var t={fade:{"0%":{opacity:0},to:{opacity:0}},flash:{"0%,50%,to":{opacity:1},"25%,75%":{opacity:0}},float:{"0%":{transform:"none"},"50%":{transform:"translateY(-1.25rem)"},"100%":{transform:"none"}},heart:{"0%":{transform:"scale(1)"},"14%":{transform:"scale(1.3)"},"28%":{transform:"scale(1)"},"42%":{transform:"scale(1.3)"},"70%":{transform:"scale(1)"}},jump:{"0%,100%":{transform:"translateY(-25%)","animation-timing-function":"cubic-bezier(0.8, 0, 1, 1)"},"50%":{transform:"translateY(0)","animation-timing-function":"cubic-bezier(0, 0, 0.2, 1)"}},ping:{"75%,100%":{transform:"scale(2)",opacity:0}},pulse:{"0%":{transform:"none"},"50%":{transform:"scale(1.05)"},"100%":{transform:"none"}},rotate:{"0%":{transform:"rotate(-360deg)"},to:{transform:"none"}},shake:{"0%":{transform:"none"},"6.5%":{transform:"translateX(-6px) rotateY(-9deg)"},"18.5%":{transform:"translateX(5px) rotateY(7deg)"},"31.5%":{transform:"translateX(-3px) rotateY(-5deg)"},"43.5%":{transform:"translateX(2px) rotateY(3deg)"},"50%":{transform:"none"}},zoom:{"0%":{transform:"scale(0)"},"100%":{transform:"none"}}};export{t as keyframes};
|