@master/css 2.0.0-beta.142 → 2.0.0-beta.144
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/bin/index.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/semantics.d.ts +5 -0
- package/dist/esm/bin/index.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 +1 -1
- package/dist/index.mjs +2 -2
- package/dist/rule.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/bin/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var
|
|
2
|
+
var I=Object.create;var C=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var b=(t,o,i,e)=>{if(o&&typeof o=="object"||typeof o=="function")for(let s of P(o))!M.call(t,s)&&s!==i&&C(t,s,{get:()=>o[s],enumerable:!(e=j(o,s))||e.enumerable});return t};var m=(t,o,i)=>(i=t!=null?I(x(t)):{},b(o||!t||!t.__esModule?C(i,"default",{value:t,enumerable:!0}):i,t));var f=require("commander"),F=m(require("path")),S=m(require("chokidar")),a=m(require("fs")),h=require("../constants"),c=m(require("@techor/log")),y=require("@techor/fs"),O=m(require("fast-glob")),_=require("../methods/render-into-html"),k=require("../methods/render-from-html"),v=m(require("techor"));f.program.command("init").description("Initialize definition files for Master CSS").option("-c, --compiler","Comes with a `./master.css-compiler.*` for compiler options").option("-o, --override","Override existing definition file").option("-f, --format <esm,cjs,ts>","With ES Module / CommonJS / TypeScript").action(async function(t){let{format:o}=t;if(!o)if(a.default.existsSync("tsconfig.json"))o="ts";else{let{type:e}=(0,y.readFileAsJSON)("./package.json")||{};o=e==="module"?"esm":"cjs"}let i=(e,s)=>{let n=a.default.existsSync(F.default.join(process.cwd(),e));n?n&&t.override?(a.default.writeFileSync(e,s),c.default.ok`**${e}** file is overridden`):c.default.x`**${e}** file already exists`:(a.default.writeFileSync(e,s),c.default.ok`**${e}** file is created`)};switch(o){case"esm":i("master.css.mjs",h.CONFIG_ESM_TEXT);break;case"ts":i("master.css.ts",h.CONFIG_TS_TEXT);break;default:i("master.css.js",h.CONFIG_TEXT)}if(t.compiler){let{OPTIONS_TEXT:e,OPTIONS_ESM_TEXT:s,OPTIONS_TS_TEXT:n}=await import("@master/css-compiler");switch(o){case"esm":i("master.css-compiler.mjs",s);break;case"ts":i("master.css-compiler.ts",n);break;default:i("master.css-compiler.js",e)}}});f.program.command("build",{isDefault:!0}).option("-w, --watch","Watch file changed and generate CSS rules.").option("-o, --output <path>","Specify your master CSS file output path","master.css").action(async function({watch:t,output:o}){let{MasterCSSCompiler:i}=await import("@master/css-compiler"),e=await new i().compile(),s=async r=>await e.insert(r,a.default.readFileSync(r,{encoding:"utf-8"})),n=()=>a.default.writeFileSync(o,e.css.text);if(t){let r=[],p=async()=>{let{include:l,exclude:E,sources:T}=e.options;l?.length&&w(S.default.watch(l,{ignored:E,ignoreInitial:!0})),T?.length&&w(S.default.watch(T,{ignoreInitial:!0})),n(),console.log(""),c.default`[sources] ${e.sources}`,c.default.tree(e.options)},d=async l=>{await s(l),n()},w=l=>{r.push(l.on("add",d).on("change",d))},u=async()=>{await Promise.all(r.map(l=>l.close())),r.length=0,await e.refresh(),await p()},g=[];e.resolvedConfigPath&&g.push(e.resolvedConfigPath),e.resolvedOptionsPath&&g.push(e.resolvedOptionsPath),g.length&&S.default.watch(g,{ignoreInitial:!0}).on("add",u).on("change",u).on("unlink",u),await p(),console.log(""),c.default.t`Start watching source changes`}else n(),console.log(""),c.default`[sources] ${e.sources}`,c.default.tree(e.options)});f.program.command("render").description("Manual to generate CSS rules").argument("<file path>","file path").option("-c --config").action(async function(t,o){let i=O.default.sync(t);if(i.length){let s=new v.default({config:o.config}).readConfig();await Promise.all(i.map(async n=>{let r=!1,p=a.default.readFileSync(n,{encoding:"utf-8"}),d=p.replace(/(<style id="master">).*?(<\/style>)/,(w,u,g)=>(r=!0,u+(0,k.renderFromHTML)(p,s)+g));r||(d=(0,_.renderIntoHTML)(p,s)),p!==d&&a.default.writeFileSync(n,d)}))}});var{version:X,name:$,description:W}=(0,y.readFileAsJSON)("../../../package.json",{cwd:__dirname})||{};f.program.name($);f.program.description(W);f.program.version(X);f.program.parse();
|
package/dist/cjs/config/rules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var i in t)g(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of k(t))!C.call(e,n)&&n!==i&&g(e,n,{get:()=>t[n],enumerable:!(c=$(t,n))||c.enumerable});return e};var R=e=>S(g({},"__esModule",{value:!0}),e);var I={};w(I,{rules:()=>T});module.exports=R(I);var v=require("../constants/start-symbol"),x=require("../utils/css-escape"),B={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=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let u=t[o],h=r.slice(0,a);h in u||(u[h]=r.slice(a+1))}},c=o=>{let r=(a,u)=>{let h=u.slice((0,x.cssEscape)(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let y of h)i(a,y)};if(this.theme){let a=o.natives.find(u=>u.theme===this.theme)??o.natives.find(u=>!u.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},n=[],l="",d=()=>{l&&(n.push(l.replace(/ /g,"")),l="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){d();continue}if(a==="}")break}if(l+=a,r===a){if(r==="'"||r==='"'){let u=0;for(let h=l.length-2;l[h]==="\\";h--)u++;if(u%2)continue}break}else a in v.START_SYMBOLS&&r!=="'"&&r!=='"'&&(m++,o(v.START_SYMBOLS[a]))}})(void 0),d();for(let o of n){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)c(a);else r?c(r):i(this.theme??"",o)}let s={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in s?s[r][o]=a:s[r]={[o]:a};return s}},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},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",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}}}},T=B;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 c=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(c),e.natives.splice(c,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:c}=this.css,n=i?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let d={text:`@keyframes ${l}{`+Object.entries(e.keyframes[l]).map(([s,o])=>`${s}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=c[0]).natives.push(d):c.splice(0,0,m={natives:[d],get text(){return this.natives.map(s=>s.text).join("")}}),n){let s;for(let o=0;o<n.cssRules.length;o++){let r=n.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===l){s=r;break}}if(s)d.cssRule=s;else{let o=m.natives.length-1;n.insertRule(d.text,o),d.cssRule=n.cssRules[o]}}t[l]={native:d,count:1}}}}0&&(module.exports={rules});
|
|
1
|
+
var g=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var k=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var w=(e,t)=>{for(var i in t)g(e,i,{get:t[i],enumerable:!0})},S=(e,t,i,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of k(t))!C.call(e,n)&&n!==i&&g(e,n,{get:()=>t[n],enumerable:!(s=$(t,n))||s.enumerable});return e};var R=e=>S(g({},"__esModule",{value:!0}),e);var I={};w(I,{rules:()=>T});module.exports=R(I);var v=require("../constants/start-symbol"),x=require("../utils/css-escape"),B={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=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let u=t[o],h=r.slice(0,a);h in u||(u[h]=r.slice(a+1))}},s=o=>{let r=(a,u)=>{let h=u.slice((0,x.cssEscape)(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let y of h)i(a,y)};if(this.theme){let a=o.natives.find(u=>u.theme===this.theme)??o.natives.find(u=>!u.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},n=[],l="",d=()=>{l&&(n.push(l.replace(/ /g,"")),l="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){d();continue}if(a==="}")break}if(l+=a,r===a){if(r==="'"||r==='"'){let u=0;for(let h=l.length-2;l[h]==="\\";h--)u++;if(u%2)continue}break}else a in v.START_SYMBOLS&&r!=="'"&&r!=='"'&&(m++,o(v.START_SYMBOLS[a]))}})(void 0),d();for(let o of n){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)s(a);else r?s(r):i(this.theme??"",o)}let c={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in c?c[r][o]=a:c[r]={[o]:a};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,declare(e,t){return e==="overlay"?{"overflow-x":["auto",e]}:{"overflow-x":e}}},overflowY:{native:!0,declare(e,t){return e==="overlay"?{"overflow-y":["auto",e]}:{"overflow-y":e}}},overflow:{native:!0,order:-1,declare(e,t){return e==="overlay"?{overflow:["auto",e]}:{overflow:e}}},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)|gradient\\(.*\\))(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"},analyze(e){if(e.startsWith("gradient"))return["linear-"+e];let t=e.indexOf(":");return this.prefix=e.slice(0,t+1),[e.slice(t+1)]}},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:{match:"^grid-rows:.",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},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",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}}}},T=B;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 s=e.natives.indexOf(i.native);this.css.style.sheet.deleteRule(s),e.natives.splice(s,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:s}=this.css,n=i?.sheet;for(let l of this.keyframeNames)if(l in t)t[l].count++;else{let d={text:`@keyframes ${l}{`+Object.entries(e.keyframes[l]).map(([c,o])=>`${c}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=s[0]).natives.push(d):s.splice(0,0,m={natives:[d],get text(){return this.natives.map(c=>c.text).join("")}}),n){let c;for(let o=0;o<n.cssRules.length;o++){let r=n.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===l){c=r;break}}if(c)d.cssRule=c;else{let o=m.natives.length-1;n.insertRule(d.text,o),d.cssRule=n.cssRules[o]}}t[l]={native:d,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 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});
|
|
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"},"gradient-text":{"-webkit-text-fill-color":"transparent","-webkit-background-clip":"text","background-clip":"text"}};0&&(module.exports={semantics});
|
package/dist/cjs/css.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var U=(y,t,i)=>t in y?N(y,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[t]=i;var Y=(y,t)=>{for(var i in t)N(y,i,{get:t[i],enumerable:!0})},G=(y,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Z(t))!q.call(y,u)&&u!==i&&N(y,u,{get:()=>t[u],enumerable:!(n=_(t,u))||n.enumerable});return y};var J=y=>G(N({},"__esModule",{value:!0}),y);var T=(y,t,i)=>(U(y,typeof t!="symbol"?t+"":t,i),i);var P={};Y(P,{MasterCSS:()=>M});module.exports=J(P);function I(y){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&y instanceof t||y instanceof Date||y instanceof RegExp)}function $(y){if(typeof Buffer<"u"&&Buffer&&y instanceof Buffer){let t=Buffer.alloc(y.length);return y.copy(t),t}else{if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp)return new RegExp(y);throw new Error("Unexpected situation")}}function F(y){let t=[];return y.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=F(i):I(i)?t[n]=$(i):t[n]=O({},i):t[n]=i}),t}function W(y,t){return t==="__proto__"?void 0:y[t]}function O(...y){let t={},i,n;return y.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(v){if(n=W(t,v),i=W(u,v),i!==t)if(typeof i!="object"||i===null){t[v]=i;return}else if(Array.isArray(i)){t[v]=F(i);return}else if(I(i)){t[v]=$(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[v]=O({},i);return}else{t[v]=O(n,i);return}})}),t}var D=require("./rule"),j=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var L=typeof window<"u",V=()=>{let y=document.createElement("style");return y.id="master",y},S=class{constructor(t=j.config){this.config=t;t?.override||(this.config=O(j.config,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),L&&this.config.observe&&this.observe(document),S.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:t,classes:i,selectors:n,themes:u,colors:v,values:E,breakpoints:R,mediaQueries:p,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let m=x=>x?(l?l+"-":"")+x:l,b=Object.entries(e),w=[],A=[];for(let x of b){let k=x[1];(typeof k=="object"&&!Array.isArray(k)?w:A).push(x)}for(let[x,k]of w)a(k,s,m(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[k,z])=>(x[k]=z,x),{}));else for(let[x,k]of A)c[m(x)]=k;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let m=c.match(/^::-[a-z]+-/m)?.[0]??"",b=this.selectors[m];b||(b=this.selectors[m]=[]);let w=b.find(([A])=>A===l);w||(w=[l,[]],b.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),p&&(this.mediaQueries=a(p,!1));let d=i?a(i,!1):{},g=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(d),...Object.entries(g).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,m)=>{if(!m)return;let b=Array.isArray(m)?m:m.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of b){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",d?.[e]);for(let[c,m]of Object.entries(g))l(c,m?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,m]of Object.entries(l)){let b=typeof m=="string"?{"":m}:m;for(let[w,A]of Object.entries(b)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",v),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let e in u){let s=u[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,m]of Object.entries(l))m.startsWith("#")||e(s,l,c,m)};if(r((e,s,l,c)=>{let m=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(m){let b="#"+(0,H.rgbToHex)(+m[1],+m[2],+m[3]);m[4]&&(b+=Math.round(255*+m[4]).toString(16)),s[l]=b}}),r((e,s,l,c)=>{let[m,b]=c.split("/"),w=this.colorThemesMap[m];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=b?A.slice(0,7)+Math.round(255*+b).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:m}=s,b=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),b){let w=Object.keys(this.values[e]??{});b.includes("$values")&&(b=w.length?b.replace(/\$values/,w.join("|")):b.replace(/(?:\|)?\$values/,"")),m&&b.includes("$colors")&&(b=this.colorNames.length?b.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):b.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(b)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(L&&t){this.root=t;let n=t===document;n&&(S.root=this),this.host=n?document.documentElement:root.host;let u=n?document.head:t,v=n?document.styleSheets:t.styleSheets;for(let R of v){let{ownerNode:p}=R;if(p.id==="master"){this.style=p;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let p=this.style.sheet.cssRules[R];if(p.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let g=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<g.length;h++){let f=g[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let d=0;d<a.cssRules.length;d++){let g=C(a.cssRules[d]);if(g)return g}},B=C(p);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=V(),u.append(this.style);let E=R=>{R.forEach(p=>{p in this.countBy?this.countBy[p]++:(this.countBy[p]=1,this.insert(p))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let p={},C=[],B=[],a=[],d=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(g);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),d(l,r))}},g=o=>{o in p?p[o]++:p[o]=1},h=o=>{o in p?p[o]--:o in this.countBy&&(p[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),d(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(m=>m.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(p).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||g(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in p){let r=p[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,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 t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:v,native:E}=n;if(u&&u.test(t))return{origin:"match",config:n};if(v&&t.startsWith(v))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new D.Rule(n,u,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=O(j.config,t),this.cache(),!this.style)return;let i=V();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=S.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=u=>{let v=this.ruleBy[u];if(!(!v||u in this.classesBy&&this.classesBy[u].some(E=>E in this.countBy))){if(i&&v.natives.length){let E=v.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<v.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(v),1),delete this.ruleBy[u],v.config.delete&&v.config.delete.call(v,u)}};if(t in this.classes){for(let u of this.classes[t])u in this.countBy||n(u);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,v=this.rules.length-1,{media:E,order:R,priority:p,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=v;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},d,g;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=v+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=v+1;else if(f&&o){if(p===-1?(d=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.priority!==-1)):(d=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=v),d!==-1){let e=f.value-o.value,s=g,l=d;for(d=void 0;s>=l;s--){let{"max-width":c,"min-width":m}=this.rules[s].media.features,b=c.value-m.value;if(b<e)g=s-1;else if(b===e)d=s;else break}}if(d!==-1){let e=f.value-o.value;for(let s=g;s>=d;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,m=l.value-c.value;if(m<e)g=s-1;else if(m>e){d=s+1;break}}}}else if(o){if(p===-1?(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)g=e-1;else if(s<o.value){d=e+1;break}}}else if(p===-1?(d=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),g=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)g=e-1;else if(s>f.value){d=e+1;break}}}else p===-1?(d=h,g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(d=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=u?1:0;p===-1?(d=h,g=a(h,f=>f.media||f.priority!==-1)):(d=a(h,f=>f.media,f=>f.priority!==-1),g=a(h,f=>f.media))}if(n===void 0)if(d===-1)n=g+1;else{if(p===-1)for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<p){n=h;break}else if(f.priority===p){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=g+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},M=S;T(M,"root"),T(M,"config",j.config),T(M,"instances",[]),T(M,"refresh",t=>{for(let i of S.instances)i.refresh(t)});L&&(window.MasterCSS=M);0&&(module.exports={MasterCSS});
|
|
1
|
+
var N=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var Z=Object.getOwnPropertyNames;var q=Object.prototype.hasOwnProperty;var U=(y,t,i)=>t in y?N(y,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):y[t]=i;var Y=(y,t)=>{for(var i in t)N(y,i,{get:t[i],enumerable:!0})},G=(y,t,i,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let u of Z(t))!q.call(y,u)&&u!==i&&N(y,u,{get:()=>t[u],enumerable:!(n=_(t,u))||n.enumerable});return y};var J=y=>G(N({},"__esModule",{value:!0}),y);var T=(y,t,i)=>(U(y,typeof t!="symbol"?t+"":t,i),i);var P={};Y(P,{MasterCSS:()=>M});module.exports=J(P);function I(y){let t=typeof Buffer<"u"?Buffer:null;return!!(t&&y instanceof t||y instanceof Date||y instanceof RegExp)}function $(y){if(typeof Buffer<"u"&&Buffer&&y instanceof Buffer){let t=Buffer.alloc(y.length);return y.copy(t),t}else{if(y instanceof Date)return new Date(y.getTime());if(y instanceof RegExp)return new RegExp(y);throw new Error("Unexpected situation")}}function F(y){let t=[];return y.forEach(function(i,n){typeof i=="object"&&i!==null?Array.isArray(i)?t[n]=F(i):I(i)?t[n]=$(i):t[n]=O({},i):t[n]=i}),t}function W(y,t){return t==="__proto__"?void 0:y[t]}function O(...y){let t={},i,n;return y.forEach(function(u){typeof u!="object"||u===null||Array.isArray(u)||Object.keys(u).forEach(function(v){if(n=W(t,v),i=W(u,v),i!==t)if(typeof i!="object"||i===null){t[v]=i;return}else if(Array.isArray(i)){t[v]=F(i);return}else if(I(i)){t[v]=$(i);return}else if(typeof n!="object"||n===null||Array.isArray(n)){t[v]=O({},i);return}else{t[v]=O(n,i);return}})}),t}var D=require("./rule"),j=require("./config"),H=require("./utils/rgb-to-hex"),Q=require("./constants/selector-symbols");var L=typeof window<"u",V=()=>{let y=document.createElement("style");return y.id="master",y},S=class{constructor(t=j.config){this.config=t;t?.override||(this.config=O(j.config,t),"keyframes"in t&&Object.assign(this.config.keyframes,t.keyframes)),this.cache(),L&&this.config.observe&&this.observe(document),S.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:t,classes:i,selectors:n,themes:u,colors:v,values:E,breakpoints:R,mediaQueries:p,rules:C}=this.config;function B(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function a(e,s,l="",c={}){let m=x=>x?(l?l+"-":"")+x:l,b=Object.entries(e),w=[],A=[];for(let x of b){let k=x[1];(typeof k=="object"&&!Array.isArray(k)?w:A).push(x)}for(let[x,k]of w)a(k,s,m(x),c);if(s&&l)A.length&&(c[l]=A.reduce((x,[k,z])=>(x[k]=z,x),{}));else for(let[x,k]of A)c[m(x)]=k;return c}if(t)for(let[e,s]of Object.entries(a(t,!0)))this.semantics.push([new RegExp("^"+B(e)+"(?=!|\\*|>|\\+|~|:|\\[|@|_|\\.|$)","m"),[e,s]]);if(n)for(let[e,s]of Object.entries(a(n,!1))){let l=new RegExp(B(e)+"(?![a-z-])");for(let c of Array.isArray(s)?s:[s]){let m=c.match(/^::-[a-z]+-/m)?.[0]??"",b=this.selectors[m];b||(b=this.selectors[m]=[]);let w=b.find(([A])=>A===l);w||(w=[l,[]],b.push(w)),w[1].push(c)}}E&&(this.globalValues=a(E,!1)),R&&(this.breakpoints=a(R,!1)),p&&(this.mediaQueries=a(p,!1));let d=i?a(i,!1):{},g=u&&!Array.isArray(u)?Object.entries(u).filter(([,{classes:e}])=>e).reduce((e,[s,{classes:l}])=>(e[s]=a(l,!1),e),{}):{},h=[...Object.keys(d),...Object.entries(g).flatMap(([e,s])=>Object.keys(s))],f=e=>{if(e in this.classes)return;let s=this.classes[e]=[],l=(c,m)=>{if(!m)return;let b=Array.isArray(m)?m:m.replace(/(?:\n(?:\s*))+/g," ").trim().split(" ");for(let w of b){let A=x=>{x in this.themeAffectedClassesBy?c in this.themeAffectedClassesBy[x]?this.themeAffectedClassesBy[x][c].push(e):this.themeAffectedClassesBy[x][c]=[e]:this.themeAffectedClassesBy[x]={[c]:[e]},s.includes(x)||s.push(x)};if(h.includes(w)){f(w);for(let x of this.classes[w])A(x)}else A(w)}};l("",d?.[e]);for(let[c,m]of Object.entries(g))l(c,m?.[e])};for(let e of h)f(e);for(let e in this.themeAffectedClassesBy){let s=this.classesBy[e]=[];for(let l of Object.values(this.themeAffectedClassesBy[e]))for(let c of l)s.includes(c)||s.push(c)}let o=(e,s)=>{if(!s)return;let l=a(s,!0);for(let[c,m]of Object.entries(l)){let b=typeof m=="string"?{"":m}:m;for(let[w,A]of Object.entries(b)){let x=c+(w?"-"+w:"");x in this.colorThemesMap?this.colorThemesMap[x][e]=A:this.colorThemesMap[x]={[e]:A}}}for(let c in s)this.colorNames.includes(c)||this.colorNames.push(c)};if(o("",v),u)if(Array.isArray(u))this.themeNames.push(...u);else for(let e in u){let s=u[e];o(e,s.colors),this.themeNames.push(e)}let r=e=>{for(let[s,l]of Object.entries(this.colorThemesMap))for(let[c,m]of Object.entries(l))m.startsWith("#")||e(s,l,c,m)};if(r((e,s,l,c)=>{let m=/^rgba?\( *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?: |,) *([0-9]{1,3}) *(?:(?:\/|,) *0?(\.[0-9]))?\)$/.exec(c);if(m){let b="#"+(0,H.rgbToHex)(+m[1],+m[2],+m[3]);m[4]&&(b+=Math.round(255*+m[4]).toString(16)),s[l]=b}}),r((e,s,l,c)=>{let[m,b]=c.split("/"),w=this.colorThemesMap[m];if(w){let A=(l?w[l]:void 0)??w[""];s[l]=b?A.slice(0,7)+Math.round(255*+b).toString(16):A}else console.warn(`\`${c}\` doesn't exist in the extended config \`.colors\``),delete s[l],Object.keys(s).length||delete this.colorThemesMap[e]}),C)for(let e in C){let s=C[e],{native:l,values:c,colored:m}=s,b=s.match;if(s.id=e,s.native=l===!0?e.replace(/(?!^)[A-Z]/g,w=>"-"+w).toLowerCase():void 0,c&&(this.values[e]=a(c,!1)),b){let w=Object.keys(this.values[e]??{});b.includes("$values")&&(b=w.length?b.replace(/\$values/,w.join("|")):b.replace(/(?:\|)?\$values/,"")),m&&b.includes("$colors")&&(b=this.colorNames.length?b.replace(/\$colors/,"(?:"+this.colorNames.join("|")+")(?![0-9A-Za-z])"):b.replace(/(?:\|)?\$colors/,"")),this.matches[e]=new RegExp(b)}}}observe(t,i={subtree:!0,childList:!0}){if(this.root!==t){if(L&&t){this.root=t;let n=t===document;n&&(S.root=this),this.host=n?document.documentElement:this.root.host;let u=n?document.head:t,v=n?document.styleSheets:t.styleSheets;for(let R of v){let{ownerNode:p}=R;if(p.id==="master"){this.style=p;break}}if(this.style)for(let R=0;R<this.style.sheet.cssRules.length;R++){let p=this.style.sheet.cssRules[R];if(p.constructor.name==="CSSKeyframesRule")continue;let C=a=>{if(a.selectorText){let g=a.selectorText.split(", ")[0].split(" ");for(let h=0;h<g.length;h++){let f=g[h];if(f[0]==="."){let o=f.slice(1),r="";for(let e=0;e<o.length;e++){let s=o[e],l=o[e+1];if(s==="\\"){if(e++,l!=="\\"){r+=l;continue}}else if(Q.SELECTOR_SYMBOLS.includes(s))break;r+=s}if(!(r in this.ruleBy)&&!(r in this.classes)){let e=this.create(r)[0];if(e)return e}}}}else if(a.cssRules)for(let d=0;d<a.cssRules.length;d++){let g=C(a.cssRules[d]);if(g)return g}},B=C(p);if(B){this.rules.push(B),this.ruleBy[B.className]=B;for(let a=0;a<B.natives.length;a++)B.natives[a].cssRule=this.style.sheet.cssRules[R+a];R+=B.natives.length-1,B.config.insert?.call(B)}}else this.style=V(),u.append(this.style);let E=R=>{R.forEach(p=>{p in this.countBy?this.countBy[p]++:(this.countBy[p]=1,this.insert(p))})};E(this.host.classList),i.subtree&&this.host.querySelectorAll("[class]").forEach(R=>E(R.classList)),this.observer=new MutationObserver(R=>{let p={},C=[],B=[],a=[],d=(o,r)=>{r?o.classList.forEach(h):o.classList.forEach(g);let e=o.children;for(let s=0;s<e.length;s++){let l=e[s];l.classList&&(B.push(l),d(l,r))}},g=o=>{o in p?p[o]++:p[o]=1},h=o=>{o in p?p[o]--:o in this.countBy&&(p[o]=-1)},f=(o,r)=>{for(let e=0;e<o.length;e++){let s=o[e];s.classList&&!B.includes(s)&&!a.includes(s)&&(s.isConnected!==r?(B.push(s),d(s,r)):a.push(s))}};for(let o=0;o<R.length;o++){let r=R[o],{addedNodes:e,removedNodes:s,type:l,target:c}=r;if(l==="attributes"){if(C.find(m=>m.target===c))continue;C.push(r)}else f(e,!1),(!c.isConnected||!B.includes(c))&&f(s,!0)}if(!(!C.length&&!Object.keys(p).length)){for(let{oldValue:o,target:r}of C){let e=B.includes(r),s=r.classList,l=o?o.split(" "):[];if(e){if(r.isConnected)continue;for(let c of l)s.contains(c)||h(c)}else if(r.isConnected){s.forEach(c=>{l.includes(c)||g(c)});for(let c of l)s.contains(c)||h(c)}}for(let o in p){let r=p[o],e=(this.countBy[o]||0)+r;e===0?(delete this.countBy[o],this.delete(o)):(o in this.countBy||this.insert(o),this.countBy[o]=e)}}}),this.observer.observe(t,{...i,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 t=this.style?.sheet;if(t?.cssRules)for(let i=t.cssRules.length-1;i>=0;i--)t.deleteRule(i);this.style?.remove(),this.style=null,this.root=null}match(t){for(let i in this.config.rules){let n=this.config.rules[i],u=this.matches[i],{symbol:v,native:E}=n;if(u&&u.test(t))return{origin:"match",config:n};if(v&&t.startsWith(v))return{origin:"symbol",config:n};if(E&&t.startsWith(E+":"))return{origin:"match",config:n}}for(let i of this.semantics)if(t.match(i[0]))return{origin:"semantics",value:i[1]}}create(t){let i=n=>{if(n in this.ruleBy)return this.ruleBy[n];let u=this.match(n);if(u)return new D.Rule(n,u,this)};return(t in this.classes?this.classes[t].map(n=>i(n)):[i(t)]).filter(n=>n&&n.text)}refresh(t){if(t?.override?this.config=t:this.config=O(j.config,t),this.cache(),!this.style)return;let i=V();this.style.replaceWith(i),this.style=i,this.rules.length=0,this.ruleBy={};for(let n in this.countBy)this.insert(n)}destroy(){let t=S.instances;this.disconnect(),t.splice(t.indexOf(this),1)}delete(t){let i=this.style?.sheet,n=u=>{let v=this.ruleBy[u];if(!(!v||u in this.classesBy&&this.classesBy[u].some(E=>E in this.countBy))){if(i&&v.natives.length){let E=v.natives[0];for(let R=0;R<i.cssRules.length;R++)if(i.cssRules[R]===E.cssRule){for(let C=0;C<v.natives.length;C++)i.deleteRule(R);break}}this.rules.splice(this.rules.indexOf(v),1),delete this.ruleBy[u],v.config.delete&&v.config.delete.call(v,u)}};if(t in this.classes){for(let u of this.classes[t])u in this.countBy||n(u);delete this.ruleBy[t]}else n(t)}insert(t){let i=this.create(t);return i.length?(this.insertRules(i),!0):!1}insertRules(t){for(let i of t){if(this.ruleBy[i.className])continue;let n,u=Object.keys(this.keyframes).length,v=this.rules.length-1,{media:E,order:R,priority:p,hasWhere:C,className:B}=i,a=(h,f,o)=>{let r=h;for(;r<=v;r++){let e=this.rules[r];if(f?.(e))return o?-1:r-1;if(o?.(e))return r}return o?-1:r-1},d,g;if(E){let h=this.rules.findIndex(f=>f.media);if(h===-1)n=v+1;else{let{"max-width":f,"min-width":o}=E.features;if(f||o){let r=this.rules.findIndex(e=>e.media?.features["max-width"]||e.media?.features["min-width"]);if(r===-1)n=v+1;else if(f&&o){if(p===-1?(d=a(r,e=>e.priority!==-1,e=>e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.priority!==-1)):(d=a(r,void 0,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=v),d!==-1){let e=f.value-o.value,s=g,l=d;for(d=void 0;s>=l;s--){let{"max-width":c,"min-width":m}=this.rules[s].media.features,b=c.value-m.value;if(b<e)g=s-1;else if(b===e)d=s;else break}}if(d!==-1){let e=f.value-o.value;for(let s=g;s>=d;s--){let{"max-width":l,"min-width":c}=this.rules[s].media.features,m=l.value-c.value;if(m<e)g=s-1;else if(m>e){d=s+1;break}}}}else if(o){if(p===-1?(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1,e=>!e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["max-width"]&&e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["min-width"].value;if(s>o.value)g=e-1;else if(s<o.value){d=e+1;break}}}else if(p===-1?(d=a(r,e=>e.media.features["min-width"]||e.priority!==-1,e=>e.media.features["max-width"]),g=a(r,e=>e.media.features["min-width"]||e.priority!==-1)):(d=a(r,e=>e.media.features["min-width"]&&e.priority!==-1,e=>e.media.features["max-width"]&&e.priority!==-1),g=a(r,e=>e.media.features["min-width"]&&e.priority!==-1)),d!==-1)for(let e=g;e>=d;e--){let s=this.rules[e].media.features["max-width"].value;if(s<f.value)g=e-1;else if(s>f.value){d=e+1;break}}}else p===-1?(d=h,g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]||r.priority!==-1)):(d=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"],r=>r.priority!==-1),g=a(h,r=>r.media?.features["max-width"]||r.media?.features["min-width"]))}}else{let h=u?1:0;p===-1?(d=h,g=a(h,f=>f.media||f.priority!==-1)):(d=a(h,f=>f.media,f=>f.priority!==-1),g=a(h,f=>f.media))}if(n===void 0)if(d===-1)n=g+1;else{if(p===-1)for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)&&(C&&!f.hasWhere||f.order>=R)){n=h;break}}else for(let h=d;h<=g;h++){let f=this.rules[h];if(!(!C&&f.hasWhere)){if(C&&!f.hasWhere){n=h;break}if(f.priority<p){n=h;break}else if(f.priority===p){if(f.order>=R){n=h;break}}else n=h+1}}n===void 0&&(n=g+1)}if(this.rules.splice(n,0,i),this.ruleBy[B]=i,this.style){let h=this.style.sheet,f=0,o=r=>{let e=this.rules[r];if(e){if(!e.natives.length)return o(r-1);let s=e.natives[e.natives.length-1].cssRule;for(let l=0;l<h.cssRules.length;l++)if(h.cssRules[l]===s){f=l+1;break}}};o(n-1);for(let r=0;r<i.natives.length;)try{let e=i.natives[r];h.insertRule(e.text,f),e.cssRule=h.cssRules[f++],r++}catch(e){console.error(e),i.natives.splice(r,1)}}i.config.insert?.call(i)}}get text(){return this.rules.map(t=>t.text).join("")}},M=S;T(M,"root"),T(M,"config",j.config),T(M,"instances",[]),T(M,"refresh",t=>{for(let i of S.instances)i.refresh(t)});L&&(window.MasterCSS=M);0&&(module.exports={MasterCSS});
|
package/dist/cjs/rule.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var Q=Object.defineProperty;var
|
|
1
|
+
var Q=Object.defineProperty;var ge=Object.getOwnPropertyDescriptor;var he=Object.getOwnPropertyNames;var de=Object.prototype.hasOwnProperty;var pe=(u,i)=>{for(var r in i)Q(u,r,{get:i[r],enumerable:!0})},me=(u,i,r,S)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of he(i))!de.call(u,v)&&v!==r&&Q(u,v,{get:()=>i[v],enumerable:!(S=ge(i,v))||S.enumerable});return u};var xe=u=>me(Q({},"__esModule",{value:!0}),u);var Se={};pe(Se,{Rule:()=>$});module.exports=xe(Se);var q=require("./constants/start-symbol"),fe=require("./utils/css-escape");function re(u){let i=typeof Buffer<"u"?Buffer:null;return!!(i&&u instanceof i||u instanceof Date||u instanceof RegExp)}function oe(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 le(u){let i=[];return u.forEach(function(r,S){typeof r=="object"&&r!==null?Array.isArray(r)?i[S]=le(r):re(r)?i[S]=oe(r):i[S]=_({},r):i[S]=r}),i}function se(u,i){return i==="__proto__"?void 0:u[i]}function _(...u){let i={},r,S;return u.forEach(function(v){typeof v!="object"||v===null||Array.isArray(v)||Object.keys(v).forEach(function(k){if(S=se(i,k),r=se(v,k),r!==i)if(typeof r!="object"||r===null){i[k]=r;return}else if(Array.isArray(r)){i[k]=le(r);return}else if(re(r)){i[k]=oe(r);return}else if(typeof S!="object"||S===null||Array.isArray(S)){i[k]=_({},r);return}else{i[k]=_(S,r);return}})}),i}var ye={unit:"",order:0,separators:[","]},$=class{constructor(i,r={},S){this.className=i;this.meta=r;this.css=S;this.config=_(ye,r.config);let{unit:v,order:k,colored:C,native:N,analyze:F,transform:Y,declare:Z,create:H}=this.config,{scope:J,important:ce,functions:ae}=S.config,{themeNames:K,colorNames:X,colorThemesMap:G,selectors:P,breakpoints:ee,mediaQueries:W,themeAffectedClassesBy:ue,globalValues:z}=S,te=ue[i];H&&H.call(this,i);let B,ie,D,A,w;if(r.origin==="semantics"){let[h,c]=r.value;A=i.slice(h.length),B=c}else{let h;if(F)[h,D]=F.call(this,i);else if(r.origin==="match"){let l=i.indexOf(":");this.prefix=i.slice(0,l+1),h=i.slice(l+1)}else r.origin==="symbol"&&(this.symbol=i[0],h=i.slice(1));w=[];let c=this,a=this.values,m=[","];this.config.separators.length&&m.push(...this.config.separators);let n="",t=0;(function l(e,f,o,s=void 0,g=[],b=[],d){let T=s===void 0,x,E=p=>p==="'"||p==='"',V=()=>x=n.length,M=()=>{if(n){let p=n,y=T?p:n.slice(x);if(n="",j="",a&&y in a&&!g.includes(y)){let R=t;t=0,l(a[y].toString(),f,void 0,s,[...g,y],b,d),t=R,T||(n=n.slice(0,x)+n)}else if(z&&y in z&&!b.includes(y)){let R=t;t=0,l(z[y].toString(),f,void 0,s,g,[...b,y],d),t=R,T||(n=n.slice(0,x)+n)}else if(T){let R=!d&&c.analyzeUnitValue(y,f);w.push({value:R?.value??y,unit:R?.unit})}else{let R=!d&&c.analyzeUnitValue(y,f);n=R?p.slice(0,x)+R.value+R.unit:p}V()}},O=E(o);V();let j="";for(;t<e.length;t++){let p=e[t];if(p===o){if(O){n+=p;let y=0;for(let R=n.length-2;n[R]==="\\";R--)y++;if(y%2)continue}else M(),n+=p;return}else if(!O&&p in q.START_SYMBOLS){let y=p==="("&&j&&ae?.[j];y?.name&&(n=n.slice(0,n.length-j.length)+y.name,j=y.name),n+=p,t++;let R=q.START_SYMBOLS[p];l(e,y?.unit??f,R,j||s||"",g,b,d||!!y?.transform),y?.transform&&(n=n.slice(0,x+j.length+1)+y.transform.call(c,n.slice(x+j.length+1,-1))+n.slice(-1)),T&&(E(R)?(w.push(n),n=""):M()),j=""}else if((p==="|"||p===" ")&&o!=="}"&&(!O||s==="path"))M(),T||(n+=" ",x++);else{if(!O){if(p==="."){if(isNaN(+e[t+1]))break;e[t-1]==="-"&&(n+="0")}else if(m.includes(p)){M(),T?w.push(p):(n+=p,x++);continue}else if(T&&(p==="#"&&(n||w.length&&e[t-1]!=="|"&&w[t-1]!==" ")||["!","*",">","+","~",":","[","@","_"].includes(p)))break;j+=p}n+=p}}s===void 0&&M()})(h,v),A=h.slice(t)}this.order=typeof k=="function"?k.call(this,this.prefix):k,A[0]==="!"&&(this.important=!0,A=A.slice(1));let ne=h=>{let c=h.split(/(\\'(?:.*?)[^\\]\\')(?=[*_>~+,)])|(\[[^=]+='(?:.*?)[^\\]'\])/).map((t,l)=>l%3?t:t.replace(/_/g," ")).join(""),a=[],m="",n=0;for(let t=0;t<c.length;t++){let l=c[t];if(l==="\\"){m+=l+c[++t];continue}!n&&l===","?(a.push(m),m=""):(m+=l,n&&l===")"?n--:l==="("&&n++)}return m&&a.push(m),a};this.prefixSelectors=D?ne(D):[""];let I=A.split("@"),U=I[0];if(U){this.vendorSuffixSelectors={};let h=(t,l,e,f)=>{for(let[o,s]of l)if(o.test(t)){for(let g of s)h(t.replace(o,g),l,e,!0);return}f&&e.push(t)},c=[];""in P?h(U,P[""],c,!0):c.push(U);let a={};for(let[t,l]of Object.entries(P)){if(!t)continue;let e=[];for(let f of c)h(f,l,e,!1);e.length&&(a[t]=e)}let m=(t,l)=>{let e=l.reduce((f,o)=>(f.push(...ne(o)),f),[]);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("",c);for(let t of Object.values(this.vendorSuffixSelectors))for(let l of t){this.hasWhere!==!1&&(this.hasWhere=l.includes(":where("));let e=[":disabled",":active",":focus",":hover"];for(let f=0;f<e.length;f++)if(l.includes(e[f])){(this.priority===-1||this.priority>f)&&(this.priority=f);break}}}else this.vendorSuffixSelectors={"":[""]};for(let h=1;h<I.length;h++){let c=I[h];if(c)if(K.includes(c))this.theme=c;else if(c==="rtl"||c==="ltr")this.direction=c;else{let a,m,n=c.indexOf("_");if(n!==-1)a=c.slice(0,n),m=c.slice(n);else{let t=c.indexOf("(");t!==-1&&(a=c.slice(0,t),m=c.slice(t))}if(!a){a="media";let t=[];this.media={token:c,features:{}};let l=c.split("&");for(let e of l)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(W&&e in W)t.push(W[e]);else{let f={token:e},o="",s="",g=0;e.startsWith("<=")?(s="<=",o="max-width"):e.startsWith(">=")||ee[e]?(s=">=",o="min-width"):e.startsWith(">")?(s=">",o="min-width",g=.02):e.startsWith("<")&&(s="<",o="max-width",g=-.02);let b=s?e.replace(s,""):e,d=ee[b];switch(o){case"max-width":case"min-width":d?Object.assign(f,this.analyzeUnitValue(d.toString(),"px")):Object.assign(f,this.analyzeUnitValue(b,"px")),f.unit==="px"&&(f.value+=g),this.media.features[o]=f,t.push("("+o+":"+(f.value+f.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=(h,c)=>{let a,m=(l,e,f)=>{let o="";this.direction&&(o+="[dir="+this.direction+"] ");let s=this.prefixSelectors.map(d=>d+o),g=(d,T)=>s.map(x=>(d?"."+d+" ":"")+(J?J+" ":"")+x).reduce((x,E)=>(x.push(f.reduce((V,M)=>(V.push(E+"."+(0,fe.cssEscape)(T)+M),V),[]).join(",")),x),[]).join(","),b=g(e,i)+(te?Object.entries(te).filter(([d])=>this.theme||!C||!e||!d||d===e).map(([d,T])=>T.reduce((x,E)=>x+","+g(this.theme??((C||ie)&&e||d),E),"")).join(""):"")+"{"+l+"}";for(let d of Object.keys(this.at).sort((T,x)=>x==="supports"?-1:1))b="@"+d+" "+this.at[d]+"{"+b+"}";return b},n=[];if(w){let l=[this.theme??h,""],e,f=!1;for(let o of w)if(typeof o=="string")n.push(o);else{let s=o.value;if(o.unit)s+=o.unit;else if(C&&G&&X){let g=!1;s=s.replace(new RegExp(`(^|,| |\\()((?:${X.join("|")})(?:-(?:[0-9A-Za-z-]+))?)(?:\\/(\\.?[0-9]+%?))?(?=(\\)|\\}|,| |$))`,"gm"),(b,d,T,x)=>{let E=G[T];if(E){let V,M;for(let O of l)if(V=E[O]){M=O;break}if(V){g=!c||M===h,e||(e=g);let O=V;if(x){let j=x.endsWith("%")?parseFloat(x)/100:+x;j=isNaN(j)?1:Math.min(Math.max(j,0),1),O+=Math.round(j*255).toString(16).toUpperCase().padStart(2,"0")}return d+O}else f=!0}return b})}n.push(s)}if(c&&(f||(e===void 0?h:!e)))return;if(a=n.reduce((o,s,g)=>o+s+(s===","||w[g+1]===","||g===w.length-1?"":" "),""),Y&&(a=Y.call(this,a,this.css.config)),C&&a==="current"&&(a="currentColor"),Z){let o,s;if(w.length===1){let g=w[0];typeof g=="object"&&(o=g.value,s=g.unit)}B=Z.call(this,s?o:a,s||"")}else B={[N]:a}}let t={};for(let l in B){let e=(s,g)=>{let b=g+((this.important||ce)&&!g.endsWith("!important")?"!important":"");s in t?t[s].push(b):t[s]=[b]},f=l+":",o=B[l];if(typeof o=="object")if(Array.isArray(o))for(let s of o)e(h,f+s.toString());else{ie=!0;for(let s in o)e(s,f+o[s])}else e(h,f+o.toString())}for(let l of Object.values(this.vendorSuffixSelectors))for(let e in t)this.natives.push({text:m(t[e].join(";"),e,l),theme:e})};if(this.theme)L(this.theme,!1);else if(C)for(let h of K)L(h,!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,r){return Number.isNaN(+i)?i:i/(r==="rem"||r==="em"?this.css.config.rootSize:1)+r}analyzeUnitValue(i,r){let S=r??this.config.unit;if(S){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||((S==="rem"||S==="em")&&(C=C/this.css.config.rootSize),v=S||""),{value:C,unit:v}}}}};0&&(module.exports={Rule});
|
package/dist/esm/bin/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{program as
|
|
2
|
+
import{program as f}from"commander";import T from"path";import u from"chokidar";import a from"fs";import{CONFIG_TS_TEXT as C,CONFIG_ESM_TEXT as F,CONFIG_TEXT as O}from"../constants/index.mjs";import c from"@techor/log";import{readFileAsJSON as w}from"@techor/fs";import _ from"fast-glob";import{renderIntoHTML as k}from"../methods/render-into-html.mjs";import{renderFromHTML as v}from"../methods/render-from-html.mjs";import E from"techor";f.command("init").description("Initialize definition files for Master CSS").option("-c, --compiler","Comes with a `./master.css-compiler.*` for compiler options").option("-o, --override","Override existing definition file").option("-f, --format <esm,cjs,ts>","With ES Module / CommonJS / TypeScript").action(async function(l){let{format:i}=l;if(!i)if(a.existsSync("tsconfig.json"))i="ts";else{let{type:e}=w("./package.json")||{};i=e==="module"?"esm":"cjs"}let t=(e,s)=>{let o=a.existsSync(T.join(process.cwd(),e));o?o&&l.override?(a.writeFileSync(e,s),c.ok`**${e}** file is overridden`):c.x`**${e}** file already exists`:(a.writeFileSync(e,s),c.ok`**${e}** file is created`)};switch(i){case"esm":t("master.css.mjs",F);break;case"ts":t("master.css.ts",C);break;default:t("master.css.js",O)}if(l.compiler){let{OPTIONS_TEXT:e,OPTIONS_ESM_TEXT:s,OPTIONS_TS_TEXT:o}=await import("@master/css-compiler");switch(i){case"esm":t("master.css-compiler.mjs",s);break;case"ts":t("master.css-compiler.ts",o);break;default:t("master.css-compiler.js",e)}}});f.command("build",{isDefault:!0}).option("-w, --watch","Watch file changed and generate CSS rules.").option("-o, --output <path>","Specify your master CSS file output path","master.css").action(async function({watch:l,output:i}){let{MasterCSSCompiler:t}=await import("@master/css-compiler"),e=await new t().compile(),s=async n=>await e.insert(n,a.readFileSync(n,{encoding:"utf-8"})),o=()=>a.writeFileSync(i,e.css.text);if(l){let n=[],m=async()=>{let{include:r,exclude:y,sources:S}=e.options;r?.length&&h(u.watch(r,{ignored:y,ignoreInitial:!0})),S?.length&&h(u.watch(S,{ignoreInitial:!0})),o(),console.log(""),c`[sources] ${e.sources}`,c.tree(e.options)},p=async r=>{await s(r),o()},h=r=>{n.push(r.on("add",p).on("change",p))},g=async()=>{await Promise.all(n.map(r=>r.close())),n.length=0,await e.refresh(),await m()},d=[];e.resolvedConfigPath&&d.push(e.resolvedConfigPath),e.resolvedOptionsPath&&d.push(e.resolvedOptionsPath),d.length&&u.watch(d,{ignoreInitial:!0}).on("add",g).on("change",g).on("unlink",g),await m(),console.log(""),c.t`Start watching source changes`}else o(),console.log(""),c`[sources] ${e.sources}`,c.tree(e.options)});f.command("render").description("Manual to generate CSS rules").argument("<file path>","file path").option("-c --config").action(async function(l,i){let t=_.sync(l);if(t.length){let s=new E({config:i.config}).readConfig();await Promise.all(t.map(async o=>{let n=!1,m=a.readFileSync(o,{encoding:"utf-8"}),p=m.replace(/(<style id="master">).*?(<\/style>)/,(h,g,d)=>(n=!0,g+v(m,s)+d));n||(p=k(m,s)),m!==p&&a.writeFileSync(o,p)}))}});var{version:I,name:j,description:P}=w("../../../package.json",{cwd:__dirname})||{};f.name(j);f.description(P);f.version(I);f.parse();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{START_SYMBOLS as g}from"../constants/start-symbol.mjs";import{cssEscape as x}from"../utils/css-escape.mjs";var y={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=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let s=t[o],h=r.slice(0,a);h in s||(s[h]=r.slice(a+1))}},u=o=>{let r=(a,s)=>{let h=s.slice(x(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let f of h)i(a,f)};if(this.theme){let a=o.natives.find(s=>s.theme===this.theme)??o.natives.find(s=>!s.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},d=[],n="",c=()=>{n&&(d.push(n.replace(/ /g,"")),n="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){c();continue}if(a==="}")break}if(n+=a,r===a){if(r==="'"||r==='"'){let s=0;for(let h=n.length-2;n[h]==="\\";h--)s++;if(s%2)continue}break}else a in g&&r!=="'"&&r!=='"'&&(m++,o(g[a]))}})(void 0),c();for(let o of d){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)u(a);else r?u(r):i(this.theme??"",o)}let l={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in l?l[r][o]=a:l[r]={[o]:a};return l}},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 v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.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},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",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}}}},C=y;function v(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 b(){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 p(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:u}=this.css,d=i?.sheet;for(let n of this.keyframeNames)if(n in t)t[n].count++;else{let c={text:`@keyframes ${n}{`+Object.entries(e.keyframes[n]).map(([l,o])=>`${l}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=u[0]).natives.push(c):u.splice(0,0,m={natives:[c],get text(){return this.natives.map(l=>l.text).join("")}}),d){let l;for(let o=0;o<d.cssRules.length;o++){let r=d.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===n){l=r;break}}if(l)c.cssRule=l;else{let o=m.natives.length-1;d.insertRule(c.text,o),c.cssRule=d.cssRules[o]}}t[n]={native:c,count:1}}}}export{C as rules};
|
|
1
|
+
import{START_SYMBOLS as g}from"../constants/start-symbol.mjs";import{cssEscape as x}from"../utils/css-escape.mjs";var y={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=(o,r)=>{let a=r.indexOf(":");if(a!==-1){o in t||(t[o]={});let c=t[o],h=r.slice(0,a);h in c||(c[h]=r.slice(a+1))}},u=o=>{let r=(a,c)=>{let h=c.slice(x(o.className).length).match(/\{(.*)\}/)[1].split(";");for(let f of h)i(a,f)};if(this.theme){let a=o.natives.find(c=>c.theme===this.theme)??o.natives.find(c=>!c.theme);a&&r(this.theme,a.text)}else for(let a of o.natives)r(a.theme,a.text)},d=[],n="",s=()=>{n&&(d.push(n.replace(/ /g,"")),n="")},m=1;(function o(r){for(;m<e.length;m++){let a=e[m];if(!r){if(a===";"){s();continue}if(a==="}")break}if(n+=a,r===a){if(r==="'"||r==='"'){let c=0;for(let h=n.length-2;n[h]==="\\";h--)c++;if(c%2)continue}break}else a in g&&r!=="'"&&r!=='"'&&(m++,o(g[a]))}})(void 0),s();for(let o of d){let r=this.css.create(o);if(Array.isArray(r))for(let a of r)u(a);else r?u(r):i(this.theme??"",o)}let l={};for(let o in t)for(let[r,a]of Object.entries(t[o]))r in l?l[r][o]=a:l[r]={[o]:a};return l}},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,declare(e,t){return e==="overlay"?{"overflow-x":["auto",e]}:{"overflow-x":e}}},overflowY:{native:!0,declare(e,t){return e==="overlay"?{"overflow-y":["auto",e]}:{"overflow-y":e}}},overflow:{native:!0,order:-1,declare(e,t){return e==="overlay"?{overflow:["auto",e]}:{overflow:e}}},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 v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.call(this)}},animationPlayState:{match:"^@play-state:.",native:!0},animationTimingFunction:{match:"^@easing:.",native:!0},animation:{symbol:"@",native:!0,order:-1,create(e){return v.call(this,e)},delete(e){return b.call(this,e)},insert(){return p.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)|gradient\\(.*\\))(?!\\|)",native:!0,colored:!0,values:{current:"currentColor"},analyze(e){if(e.startsWith("gradient"))return["linear-"+e];let t=e.indexOf(":");return this.prefix=e.slice(0,t+1),[e.slice(t+1)]}},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:{match:"^grid-rows:.",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},columnGap:{match:"^gap-x:.",unit:"rem",native:!0},rowGap:{match:"^gap-y:.",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}}}},C=y;function v(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 b(){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 p(){if(this.keyframeNames){let{config:e,keyframes:t,style:i,rules:u}=this.css,d=i?.sheet;for(let n of this.keyframeNames)if(n in t)t[n].count++;else{let s={text:`@keyframes ${n}{`+Object.entries(e.keyframes[n]).map(([l,o])=>`${l}{${Object.entries(o).map(([r,a])=>r+":"+a).join(";")}}`).join("")+"}",theme:""},m;if(Object.keys(t).length?(m=u[0]).natives.push(s):u.splice(0,0,m={natives:[s],get text(){return this.natives.map(l=>l.text).join("")}}),d){let l;for(let o=0;o<d.cssRules.length;o++){let r=d.cssRules[o];if(r.constructor.name!=="CSSKeyframesRule")break;if(r.name===n){l=r;break}}if(l)s.cssRule=l;else{let o=m.natives.length-1;d.insertRule(s.text,o),s.cssRule=d.cssRules[o]}}t[n]={native:s,count:1}}}}export{C as rules};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i={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"}};export{i as semantics};
|
|
1
|
+
var i={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"},"gradient-text":{"-webkit-text-fill-color":"transparent","-webkit-background-clip":"text","background-clip":"text"}};export{i as semantics};
|