@zuzjs/ui 1.0.2 → 1.0.3
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/bin.cjs +3 -3
- package/dist/bin.js +1 -1
- package/dist/{chunk-4GN6AE4D.js → chunk-75PWQLBY.js} +3 -3
- package/dist/{chunk-BZ4B5RMW.cjs → chunk-M2YKHQNL.cjs} +4 -4
- package/dist/css/styles.css +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -6
- package/package.json +1 -1
package/dist/bin.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';var
|
|
3
|
-
var j=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new tsMorph.Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(tsMorph.SyntaxKind.StringLiteral)||e.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(o=>{this.extractStyles(o.getExpression(),t+s);});}else e.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let i=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,i,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let l=i.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();l&&this.extractStyles(l);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(i=>i.getExpression().getText()==="css").forEach(i=>{let a=i.getArguments();a.length>0&&this.extractStyles(a[0]);}),this.stylesToGenerate.forEach(i=>{
|
|
4
|
-
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,y);}},m=new j;commander.program.opts();var h=process.cwd(),T=false,$=d__default.default.join(h,"src","app","css"),L=d__default.default.join($,"zuz.scss"),W=d__default.default.join($,"zuzmap.ts"),K=()=>{
|
|
2
|
+
'use strict';var chunkM2YKHQNL_cjs=require('./chunk-M2YKHQNL.cjs'),commander=require('commander'),Z=require('chokidar'),d=require('path'),c=require('picocolors'),u=require('fs'),tsMorph=require('ts-morph');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Z__default=/*#__PURE__*/_interopDefault(Z);var d__default=/*#__PURE__*/_interopDefault(d);var c__default=/*#__PURE__*/_interopDefault(c);var u__default=/*#__PURE__*/_interopDefault(u);/* ZuzJS UI CLI */
|
|
3
|
+
var j=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new tsMorph.Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(tsMorph.SyntaxKind.StringLiteral)||e.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(o=>{this.extractStyles(o.getExpression(),t+s);});}else e.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let i=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,i,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let l=i.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();l&&this.extractStyles(l);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(i=>i.getExpression().getText()==="css").forEach(i=>{let a=i.getArguments();a.length>0&&this.extractStyles(a[0]);}),this.stylesToGenerate.forEach(i=>{chunkM2YKHQNL_cjs.h(i).filter(Boolean).forEach(l=>{let b=l.match(/^([&@][\w-]+)\((.*)\)$/);if(b){let[x,k,A]=b;chunkM2YKHQNL_cjs.h(A).filter(Boolean).forEach(G=>{let E=`${k}(${G})`,F=chunkM2YKHQNL_cjs.i.parseAndGenerate(E,e);F.length>0&&(this.manifest[E]=F.join(" "));});let v=chunkM2YKHQNL_cjs.i.parseAndGenerate(l,e);v.length>0&&(this.manifest[l]=v.join(" "));}else {let x=chunkM2YKHQNL_cjs.i.parseAndGenerate(l,e);x.length>0&&(this.manifest[l]=x.join(" "));}});}),t&&this.project.removeSourceFile(s);}isSupportedFile(e){return this.supportedExtensions.some(t=>e.endsWith(t))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let e=process.cwd(),t=[d__default.default.join(e,"src/app/css"),d__default.default.join(e,"app/css"),d__default.default.join(e,"src/css"),d__default.default.join(e,"css")],s=t.find(o=>u__default.default.existsSync(o))||t[0];return u__default.default.existsSync(s)||u__default.default.mkdirSync(s,{recursive:true}),d__default.default.join(s,"zuzmap.ts")};saveManifest(e){let t=d__default.default.dirname(e);u__default.default.existsSync(t)||u__default.default.mkdirSync(t,{recursive:true});let s=chunkM2YKHQNL_cjs.i.getCache(),o={};for(let[i,a]of Object.entries(this.manifest))s.has(a)&&(o[i]=a);this.manifest=o;let y=`/* Zuz Generated Manifest - Do not edit */
|
|
4
|
+
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,y);}},m=new j;commander.program.opts();var h=process.cwd(),T=false,$=d__default.default.join(h,"src","app","css"),L=d__default.default.join($,"zuz.scss"),W=d__default.default.join($,"zuzmap.ts"),K=()=>{chunkM2YKHQNL_cjs.i.writeToDisk(L),m.saveManifest(W);};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let r=d__default.default.join(h,".vscode"),e=d__default.default.join(r,"zuz.code-snippets"),t=d__default.default.join(r,"settings.json"),s=Object.keys(chunkM2YKHQNL_cjs.a).join(","),o=Object.keys(chunkM2YKHQNL_cjs.b).join(","),y={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${o}|}$0"`],description:"Zuz Direct Shortcut"}},i={};if(u__default.default.existsSync(t))try{i=JSON.parse(u__default.default.readFileSync(t,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},u__default.default.existsSync(r)||u__default.default.mkdirSync(r,{recursive:true}),u__default.default.writeFileSync(e,JSON.stringify(y,null,2)),u__default.default.writeFileSync(t,JSON.stringify(i,null,2)),console.log(c__default.default.green("\u2714 Zuz VS Code configuration initialized!")),console.log(c__default.default.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(c__default.default.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});commander.program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{let r=Z__default.default.watch(".",{cwd:h,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});r.on("add",e=>{m.isSupportedFile(e)&&m.processFile(d__default.default.resolve(h,e)),T&&console.log(c__default.default.gray(`\u25CB File added: ${e}`));}),r.on("change",e=>{if(m.isSupportedFile(e)){console.log(c__default.default.gray(`\u25CB File changed: ${e}`));let t=d__default.default.resolve(h,e);chunkM2YKHQNL_cjs.i.clearFileCache(t),m.processFile(t),K(),console.log(c__default.default.blue("\u26A1 Zuz CSS updated."));}}),r.on("ready",()=>{T=true,K(),console.log(c__default.default.green(`
|
|
5
5
|
\u2713 Initial Build Complete.`)),console.log(c__default.default.cyan(`\u25CB Watching: ${d.basename(h)}
|
|
6
6
|
`));}),r.on("error",e=>console.error(c__default.default.red(`Watcher Error: ${e}`)));});commander.program.parse(process.argv);
|
package/dist/bin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {a,b,i,h as h$1}from'./chunk-
|
|
2
|
+
import {a,b,i,h as h$1}from'./chunk-75PWQLBY.js';import {program}from'commander';import D from'chokidar';import d,{basename}from'path';import c from'picocolors';import u from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';var j=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(e,t=""){if(e.asKind(SyntaxKind.JsxExpression)){let s=e.getExpression();s&&this.extractStyles(s,t);return}if(e.asKind(SyntaxKind.StringLiteral)||e.asKind(SyntaxKind.NoSubstitutionTemplateLiteral)||e.asKind(SyntaxKind.NumericLiteral))this.stylesToGenerate.add(t+e.getLiteralValue().toString());else if(e.asKind(SyntaxKind.TemplateExpression)){let s=e.getHead().getLiteralText();e.getTemplateSpans().forEach(o=>{this.extractStyles(o.getExpression(),t+s);});}else e.asKind(SyntaxKind.ConditionalExpression)?(this.extractStyles(e.getWhenTrue(),t),this.extractStyles(e.getWhenFalse(),t)):e.asKind(SyntaxKind.ArrayLiteralExpression)?e.getElements().forEach(s=>this.extractStyles(s,t)):e.asKind(SyntaxKind.BinaryExpression)&&(this.extractStyles(e.getLeft(),t),this.extractStyles(e.getRight(),t));}processFile(e){this.stylesToGenerate.clear();let t=e.endsWith(".mdx")||e.endsWith(".md"),s;if(t){let i=u.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,i,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let l=i.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();l&&this.extractStyles(l);}),s.getDescendantsOfKind(SyntaxKind.CallExpression).filter(i=>i.getExpression().getText()==="css").forEach(i=>{let a=i.getArguments();a.length>0&&this.extractStyles(a[0]);}),this.stylesToGenerate.forEach(i$1=>{h$1(i$1).filter(Boolean).forEach(l=>{let b=l.match(/^([&@][\w-]+)\((.*)\)$/);if(b){let[x,k,A]=b;h$1(A).filter(Boolean).forEach(G=>{let E=`${k}(${G})`,F=i.parseAndGenerate(E,e);F.length>0&&(this.manifest[E]=F.join(" "));});let v=i.parseAndGenerate(l,e);v.length>0&&(this.manifest[l]=v.join(" "));}else {let x=i.parseAndGenerate(l,e);x.length>0&&(this.manifest[l]=x.join(" "));}});}),t&&this.project.removeSourceFile(s);}isSupportedFile(e){return this.supportedExtensions.some(t=>e.endsWith(t))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let e=process.cwd(),t=[d.join(e,"src/app/css"),d.join(e,"app/css"),d.join(e,"src/css"),d.join(e,"css")],s=t.find(o=>u.existsSync(o))||t[0];return u.existsSync(s)||u.mkdirSync(s,{recursive:true}),d.join(s,"zuzmap.ts")};saveManifest(e){let t=d.dirname(e);u.existsSync(t)||u.mkdirSync(t,{recursive:true});let s=i.getCache(),o={};for(let[i,a]of Object.entries(this.manifest))s.has(a)&&(o[i]=a);this.manifest=o;let y=`/* Zuz Generated Manifest - Do not edit */
|
|
3
3
|
export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u.writeFileSync(e,y);}},m=new j;program.opts();var h=process.cwd(),T=false,$=d.join(h,"src","app","css"),W=d.join($,"zuz.scss"),N=d.join($,"zuzmap.ts"),K=()=>{i.writeToDisk(W),m.saveManifest(N);};program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let r=d.join(h,".vscode"),e=d.join(r,"zuz.code-snippets"),t=d.join(r,"settings.json"),s=Object.keys(a).join(","),o=Object.keys(b).join(","),y={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${o}|}$0"`],description:"Zuz Direct Shortcut"}},i={};if(u.existsSync(t))try{i=JSON.parse(u.readFileSync(t,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},u.existsSync(r)||u.mkdirSync(r,{recursive:true}),u.writeFileSync(e,JSON.stringify(y,null,2)),u.writeFileSync(t,JSON.stringify(i,null,2)),console.log(c.green("\u2714 Zuz VS Code configuration initialized!")),console.log(c.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(c.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{let r=D.watch(".",{cwd:h,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});r.on("add",e=>{m.isSupportedFile(e)&&m.processFile(d.resolve(h,e)),T&&console.log(c.gray(`\u25CB File added: ${e}`));}),r.on("change",e=>{if(m.isSupportedFile(e)){console.log(c.gray(`\u25CB File changed: ${e}`));let t=d.resolve(h,e);i.clearFileCache(t),m.processFile(t),K(),console.log(c.blue("\u26A1 Zuz CSS updated."));}}),r.on("ready",()=>{T=true,K(),console.log(c.green(`
|
|
4
4
|
\u2713 Initial Build Complete.`)),console.log(c.cyan(`\u25CB Watching: ${basename(h)}
|
|
5
5
|
`));}),r.on("error",e=>console.error(c.red(`Watcher Error: ${e}`)));});program.parse(process.argv);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import A from'hashids';import u from'fs';import {dirname}from'path';import {isColor}from'@zuzjs/core';var m={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animation:"animation",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",background:"background",bg:"background",backgroundColor:"background-color",backgroundImage:"background-image",bgi:"background-image",bgc:"background-color",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip","bg-clip":"background-clip",border:"border",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",borderRadius:"border-radius",r:"border-radius",borderTopLeftRadius:"border-top-left-radius",rtl:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",rtr:"border-top-right-radius",borderBottomLeftRadius:"border-bottom-left-radius",rbl:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",rbr:"border-bottom-right-radius",bottom:"bottom",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",shadow:"box-shadow",boxSizing:"box-sizing",captionSide:"caption-side",caretColor:"caret-color","@charset":"@charset",clear:"clear",clip:"clip-path",clipPath:"clip-path",color:"color",c:"color",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",colGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",columns:"columns",content:"content",counterIncrement:"counter-increment",counterReset:"counter-reset",cursor:"cursor",pointer:"pointer",direction:"direction",display:"display",emptyCells:"empty-cells",filter:"filter",flex:"flex",flexBasis:"flex-basis",flexDirection:"flex-direction",flexDir:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",float:"float",font:"font",fontFamily:"font-family",fontKerning:"font-kerning",s:"font-size",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",bold:"bold",fontWeight:"font-weight",b:"font-weight",gap:"gap",grid:"grid",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas","grid-areas":"grid-template-areas",gridTemplateColumns:"grid-template-columns","grid-cols":"grid-template-columns",gridTemplateRows:"grid-template-rows","grid-rows":"grid-template-rows",hangingPunctuation:"hanging-punctuation",hyphens:"hyphens",isolation:"isolation",justifyContent:"justify-content",left:"left",letterSpacing:"letter-spacing",lineHeight:"line-height",lh:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",aspectRatio:"aspect-ratio",margin:"margin",m:"margin",marginBottom:"margin-bottom",mb:"margin-bottom",marginLeft:"margin-left",ml:"margin-left",marginRight:"margin-right",mr:"margin-right",marginTop:"margin-top",mt:"margin-top",height:"height",h:"height",minHeight:"min-height",minH:"min-height",maxHeight:"max-height",maxH:"max-height",width:"width",w:"width",minWidth:"min-width",minW:"min-width",maxWidth:"max-width",maxW:"max-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",opacity:"opacity",order:"order",outline:"outline",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflow:"overflow",overflowX:"overflow-x",overflowY:"overflow-y",padding:"padding",p:"padding",paddingBottom:"padding-bottom",pb:"padding-bottom",paddingLeft:"padding-left",pl:"padding-left",paddingRight:"padding-right",pr:"padding-right",paddingTop:"padding-top",pt:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspective:"perspective",perspectiveOrigin:"perspective-origin",pointerEvents:"pointer-events",position:"position",quotes:"quotes",resize:"resize",right:"right",scrollBehavior:"scroll-behavior",tabSize:"tab-size",tableLayout:"table-layout",align:"text-align",textAlign:"text-align",textAlignLast:"text-align-last",textDecoration:"text-decoration",td:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",textStroke:"-webkit-text-stroke",top:"top",transform:"transform","transform(2D)":"transform(2D)",transformOrigin:"transform-origin",origin:"transform-origin",transformStyle:"transform-style",transition:"transition",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",visibility:"visibility",whiteSpace:"white-space",wordBreak:"word-break",wordSpacing:"word-spacing",textWrap:"textWrap",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",backdropFilter:"backdrop-filter",placeItems:"place-items",placeContent:"place-content",corner:"corner-shape",ph:"padding-left:__VALUE__;padding-right:__VALUE__;",pv:"padding-top:__VALUE__;padding-bottom:__VALUE__;",mh:"margin-left:__VALUE__;margin-right:__VALUE__;",mv:"margin-top:__VALUE__;margin-bottom:__VALUE__;",translate:"translate: __VALUE__;",translateX:"translate: __VALUE__ 0px 0px;",translateY:"translate: 0px __VALUE__ 0px;",translateZ:"translate: 0px 0px __VALUE__;",x:"translate: __VALUE__ 0px 0px;",y:"translate: 0px __VALUE__ 0px;",z:"translate: 0px 0px __VALUE__;",rotate:"rotate: __VALUE__;",rotateX:"rotate: 1 0 0 __VALUE__;",rotateY:"rotate: 0 1 0 __VALUE__;",rotateZ:"rotate: 0 0 1 __VALUE__;",rotate3d:"rotate: 1 1 1 __VALUE__;",scale:"scale: __VALUE__;",view:"perspective: __VALUE__;",anim:"transition: all __VALUE__ __CURVE__ __DELAY__;",blur:"filter: blur(__VALUE__);",saturate:"filter: saturate(__VALUE__);",brightness:"filter: brightness(__VALUE__);",ratio:"aspect-ratio: __VALUE__;",extend:"@extend __VALUE__;"},_={content:"content:'';",bold:"font-weight: bold;",grid:"display:grid;",flex:"display:flex;",wrap:"flex-wrap:wrap;",cols:"flex-direction:column;","cols-reverse":"flex-direction:column-reverse;","cols-rev":"flex-direction:column-reverse;",ass:"align-self:flex-start;",ais:"align-items:flex-start;",aib:"align-items:baseline;",aic:"align-items:center;","align-items-center":"align-items:center;",aie:"align-items:flex-end;",jcs:"justify-content:flex-start;",jcc:"justify-content:center;",jce:"justify-content:flex-end;",jcb:"justify-content:space-between;",jca:"justify-content:space-around;",pis:"place-items:start",pie:"place-items:end",pic:"place-items:center",pist:"place-items:stretch",pcs:"place-content:start",pcc:"place-content:center",pce:"place-content:end",pcst:"place-content:stretch",tal:"text-align: left;",tac:"text-align: center;",tar:"text-align: right;",tas:"text-align: justify;",fill:"top: 0px;left: 0px;right: 0px;bottom: 0px;",rel:"position:relative;",abs:"position:absolute;",fixed:"position:fixed;",sticky:"position:sticky;",abc:"top: 50%;left: 50%;translate:-50% -50%;",tdn:"text-decoration:none;",tdu:"text-decoration:underline;",nous:"user-select:none;",nope:"pointer-events:none;","3d":"transform-style: preserve-3d;",hide:"display: none;",block:"display: block;",inlineblock:"display: inline-block;","center-h":"left: 50%;translate: -50% 0px;","center-x":"left: 50%;translate: -50% 0px;","center-v":"top: 50%;translate: 0px -50%;","center-y":"top: 50%;translate: 0px -50%;","no-overflow":"overflow: hidden;","no-overflow-x":"overflow-x: hidden;","no-overflow-y":"overflow-y: hidden;","overflow-x":"overflow-x: auto;","overflow-y":"overflow-y: auto;","scroll-x":"overflow-x: auto;","scroll-y":"overflow-y: auto;","space-pre":"white-space: pre;","white-space-pre":"white-space: pre;","text-wrap":"width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;","text-clip":"color: transparent;background-clip: text;-webkit-background-clip: text;","word-break":"wordc-break: break-word;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;"},y=["color","bg","background","background-color","border","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","outline-color","text-decoration-color","text-shadow","box-shadow","fill","stroke","stop-color","caret-color","column-rule-color","text-emphasis-color","accent-color","border-block-color","border-inline-color","column-fill","marker","scrollbar-color","outline-offset-color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor","textDecorationColor","textShadow","boxShadow","fill","stroke","stopColor","caretColor","columnRuleColor","textEmphasisColor","accentColor","borderBlockColor","borderInlineColor","columnFill","marker","scrollbarColor","outlineOffsetColor"],w={ease:"ease",in:"ease-in",out:"ease-out",inout:"ease-in-out",linear:"linear",start:"step-start",end:"step-end",steps:"steps",cubic:"cubic-bezier",initial:"initial",inherit:"inherit"};var v=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"],L=["blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia"],$={w:"width",minW:"minWidth",maxW:"maxWidth",h:"height",minH:"minHeight",maxH:"maxHeight",x:"translateX",y:"translateY",z:"translateZ",r:"rotate",rx:"rotateX",ry:"rotateY",rz:"rotateZ",s:"scale",sx:"scaleX",sy:"scaleY",sz:"scaleZ"};var k={name:"@zuzjs/ui"};var R=k.name,W=(p,e=[])=>{let t=["as",...e],o={...p};return Object.keys(o).map(r=>{r in m&&delete o[r];}),"skeleton"in t&&t.skeleton.enabled==true&&delete o.children,t.map(r=>r in o&&delete o[r]),o},M=p=>{let e=[],t="",o=0;for(let r=0;r<p.length;r++){let i=p[r];(i==="["||i==="(")&&o++,(i==="]"||i===")")&&o--,/\s/.test(i)&&o===0?(t.trim()&&e.push(t.trim()),t=""):t+=i;}return t.trim()&&e.push(t.trim()),e};var h=class{propMap=m;directMap=_;colorProps=new Set(y);animationCurves=w;delimeter=",";hashids;mediaQueries={ph:"(max-width: 599px)",sm:"(min-width: 600px) and (max-width: 767px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"};__SALT="zuzjs-ui";fileMap=new Map;cache=new Map;ruleTracker=new Map;dollorToVarRegexp=/\$([a-zA-Z0-9_-]+)/g;constructor(){this.hashids=new A(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),r=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(t).add(n);}return r}tokenize(e){let t=[],o=0,r=i=>{let n="",s=0;for(;o<e.length;){let a=e[o];if(a==="["&&s++,a==="]"&&s--,a==="("&&s===0){let l=n.trim(),c={...i};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=i.selector?`${i.selector} ${l}`:l,n="",o++,r(c);}else if(a===")"&&s===0){n.trim()&&this.pushToken(t,n.trim(),i),n="";return}else (a===" "||a===`
|
|
2
|
-
`)&&
|
|
1
|
+
import z from'hashids';import u from'fs';import {dirname}from'path';import {isColor}from'@zuzjs/core';var m={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animation:"animation",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",background:"background",bg:"background",backgroundColor:"background-color",backgroundImage:"background-image",bgi:"background-image",bgc:"background-color",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip","bg-clip":"background-clip",border:"border",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",borderRadius:"border-radius",r:"border-radius",borderTopLeftRadius:"border-top-left-radius",rtl:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",rtr:"border-top-right-radius",borderBottomLeftRadius:"border-bottom-left-radius",rbl:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",rbr:"border-bottom-right-radius",bottom:"bottom",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",shadow:"box-shadow",boxSizing:"box-sizing",captionSide:"caption-side",caretColor:"caret-color","@charset":"@charset",clear:"clear",clip:"clip-path",clipPath:"clip-path",color:"color",c:"color",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",colGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",columns:"columns",content:"content",counterIncrement:"counter-increment",counterReset:"counter-reset",cursor:"cursor",pointer:"pointer",direction:"direction",display:"display",emptyCells:"empty-cells",filter:"filter",flex:"flex",flexBasis:"flex-basis",flexDirection:"flex-direction",flexDir:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",float:"float",font:"font",fontFamily:"font-family",fontKerning:"font-kerning",s:"font-size",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",bold:"bold",fontWeight:"font-weight",b:"font-weight",gap:"gap",grid:"grid",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas","grid-areas":"grid-template-areas",gridTemplateColumns:"grid-template-columns","grid-cols":"grid-template-columns",gridTemplateRows:"grid-template-rows","grid-rows":"grid-template-rows",hangingPunctuation:"hanging-punctuation",hyphens:"hyphens",isolation:"isolation",justifyContent:"justify-content",left:"left",letterSpacing:"letter-spacing",lineHeight:"line-height",lh:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",aspectRatio:"aspect-ratio",margin:"margin",m:"margin",marginBottom:"margin-bottom",mb:"margin-bottom",marginLeft:"margin-left",ml:"margin-left",marginRight:"margin-right",mr:"margin-right",marginTop:"margin-top",mt:"margin-top",height:"height",h:"height",minHeight:"min-height",minH:"min-height",maxHeight:"max-height",maxH:"max-height",width:"width",w:"width",minWidth:"min-width",minW:"min-width",maxWidth:"max-width",maxW:"max-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",opacity:"opacity",order:"order",outline:"outline",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflow:"overflow",overflowX:"overflow-x",overflowY:"overflow-y",padding:"padding",p:"padding",paddingBottom:"padding-bottom",pb:"padding-bottom",paddingLeft:"padding-left",pl:"padding-left",paddingRight:"padding-right",pr:"padding-right",paddingTop:"padding-top",pt:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspective:"perspective",perspectiveOrigin:"perspective-origin",pointerEvents:"pointer-events",position:"position",quotes:"quotes",resize:"resize",right:"right",scrollBehavior:"scroll-behavior",tabSize:"tab-size",tableLayout:"table-layout",align:"text-align",textAlign:"text-align",textAlignLast:"text-align-last",textDecoration:"text-decoration",td:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",textStroke:"-webkit-text-stroke",top:"top",transform:"transform","transform(2D)":"transform(2D)",transformOrigin:"transform-origin",origin:"transform-origin",transformStyle:"transform-style",transition:"transition",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",visibility:"visibility",whiteSpace:"white-space",wordBreak:"word-break",wordSpacing:"word-spacing",textWrap:"textWrap",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",backdropFilter:"backdrop-filter",placeItems:"place-items",placeContent:"place-content",corner:"corner-shape",ph:"padding-left:__VALUE__;padding-right:__VALUE__;",pv:"padding-top:__VALUE__;padding-bottom:__VALUE__;",mh:"margin-left:__VALUE__;margin-right:__VALUE__;",mv:"margin-top:__VALUE__;margin-bottom:__VALUE__;",translate:"translate: __VALUE__;",translateX:"translate: __VALUE__ 0px 0px;",translateY:"translate: 0px __VALUE__ 0px;",translateZ:"translate: 0px 0px __VALUE__;",x:"translate: __VALUE__ 0px 0px;",y:"translate: 0px __VALUE__ 0px;",z:"translate: 0px 0px __VALUE__;",rotate:"rotate: __VALUE__;",rotateX:"rotate: 1 0 0 __VALUE__;",rotateY:"rotate: 0 1 0 __VALUE__;",rotateZ:"rotate: 0 0 1 __VALUE__;",rotate3d:"rotate: 1 1 1 __VALUE__;",scale:"scale: __VALUE__;",view:"perspective: __VALUE__;",anim:"transition: all __VALUE__ __CURVE__ __DELAY__;",blur:"filter: blur(__VALUE__);",saturate:"filter: saturate(__VALUE__);",brightness:"filter: brightness(__VALUE__);",ratio:"aspect-ratio: __VALUE__;",extend:"@extend __VALUE__;"},_={content:"content:'';",bold:"font-weight: bold;",grid:"display:grid;",flex:"display:flex;",wrap:"flex-wrap:wrap;",cols:"flex-direction:column;","cols-reverse":"flex-direction:column-reverse;","cols-rev":"flex-direction:column-reverse;",ass:"align-self:flex-start;",ais:"align-items:flex-start;",aib:"align-items:baseline;",aic:"align-items:center;","align-items-center":"align-items:center;",aie:"align-items:flex-end;",jcs:"justify-content:flex-start;",jcc:"justify-content:center;",jce:"justify-content:flex-end;",jcb:"justify-content:space-between;",jca:"justify-content:space-around;",pis:"place-items:start",pie:"place-items:end",pic:"place-items:center",pist:"place-items:stretch",pcs:"place-content:start",pcc:"place-content:center",pce:"place-content:end",pcst:"place-content:stretch",tal:"text-align: left;",tac:"text-align: center;",tar:"text-align: right;",tas:"text-align: justify;",fill:"top: 0px;left: 0px;right: 0px;bottom: 0px;",rel:"position:relative;",abs:"position:absolute;",fixed:"position:fixed;",sticky:"position:sticky;",abc:"top:50%;left:50%;--abc-x:-50%;--abc-y:-50%;translate:calc(var(--abc-x) + var(--fx-x, 0px)) calc(var(--abc-y) + var(--fx-y, 0px));",tdn:"text-decoration:none;",tdu:"text-decoration:underline;",nous:"user-select:none;",nope:"pointer-events:none;","3d":"transform-style: preserve-3d;",hide:"display: none;",block:"display: block;",inlineblock:"display: inline-block;","center-h":"left: 50%;--abc-x: -50%;translate: calc(var(--abc-x) + var(--fx-x, 0px)) var(--fx-y, 0px);","center-x":"left: 50%;--abc-x: -50%;translate: calc(var(--abc-x) + var(--fx-x, 0px)) var(--fx-y, 0px);","center-v":"top: 50%;--abc-y: -50%;translate: var(--fx-x, 0px) calc(var(--abc-y) + var(--fx-y, 0px));","center-y":"top: 50%;--abc-y: -50%;translate: var(--fx-x, 0px) calc(var(--abc-y) + var(--fx-y, 0px));","no-overflow":"overflow: hidden;","no-overflow-x":"overflow-x: hidden;","no-overflow-y":"overflow-y: hidden;","overflow-x":"overflow-x: auto;","overflow-y":"overflow-y: auto;","scroll-x":"overflow-x: auto;","scroll-y":"overflow-y: auto;","space-pre":"white-space: pre;","white-space-pre":"white-space: pre;","text-wrap":"width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;","text-clip":"color: transparent;background-clip: text;-webkit-background-clip: text;","word-break":"word-break: break-word;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;"},y=["color","bg","background","background-color","border","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","outline-color","text-decoration-color","text-shadow","box-shadow","fill","stroke","stop-color","caret-color","column-rule-color","text-emphasis-color","accent-color","border-block-color","border-inline-color","column-fill","marker","scrollbar-color","outline-offset-color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor","textDecorationColor","textShadow","boxShadow","fill","stroke","stopColor","caretColor","columnRuleColor","textEmphasisColor","accentColor","borderBlockColor","borderInlineColor","columnFill","marker","scrollbarColor","outlineOffsetColor"],w={ease:"ease",in:"ease-in",out:"ease-out",inout:"ease-in-out",linear:"linear",start:"step-start",end:"step-end",steps:"steps",cubic:"cubic-bezier",initial:"initial",inherit:"inherit"};var S=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"],L=["blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia"],$={w:"width",minW:"minWidth",maxW:"maxWidth",h:"height",minH:"minHeight",maxH:"maxHeight",x:"translateX",y:"translateY",z:"translateZ",r:"rotate",rx:"rotateX",ry:"rotateY",rz:"rotateZ",s:"scale",sx:"scaleX",sy:"scaleY",sz:"scaleZ"};var k={name:"@zuzjs/ui"};var R=k.name,W=(p,e=[])=>{let t=["as",...e],o={...p};return Object.keys(o).map(r=>{r in m&&delete o[r];}),"skeleton"in t&&t.skeleton.enabled==true&&delete o.children,t.map(r=>r in o&&delete o[r]),o},M=p=>{let e=[],t="",o=0;for(let r=0;r<p.length;r++){let i=p[r];(i==="["||i==="(")&&o++,(i==="]"||i===")")&&o--,/\s/.test(i)&&o===0?(t.trim()&&e.push(t.trim()),t=""):t+=i;}return t.trim()&&e.push(t.trim()),e};var h=class{propMap=m;directMap=_;colorProps=new Set(y);animationCurves=w;delimeter=",";hashids;mediaQueries={ph:"(max-width: 599px)",sm:"(min-width: 600px) and (max-width: 767px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"};__SALT="zuzjs-ui";fileMap=new Map;cache=new Map;ruleTracker=new Map;dollorToVarRegexp=/\$([a-zA-Z0-9_-]+)/g;constructor(){this.hashids=new z(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),r=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(t).add(n);}return r}tokenize(e){let t=[],o=0,r=i=>{let n="",a=0;for(;o<e.length;){let s=e[o];if(s==="["&&a++,s==="]"&&a--,s==="("&&a===0){let l=n.trim(),c={...i};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=i.selector?`${i.selector} ${l}`:l,n="",o++,r(c);}else if(s===")"&&a===0){n.trim()&&this.pushToken(t,n.trim(),i),n="";return}else (s===" "||s===`
|
|
2
|
+
`)&&a===0?(n.trim()&&this.pushToken(t,n.trim(),i),n=""):n+=s;o++;}n.trim()&&this.pushToken(t,n.trim(),i);};return r({}),t}pushToken(e,t,o){let r=t.trim();if(r.includes(":")){let i=r.indexOf(":"),n=r.slice(0,i).trim(),a=r.slice(i+1).trim();e.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[r]?e.push({prop:r,value:void 0,isCustom:false,...o}):e.push({prop:t.trim(),isCustom:true,...o});}generateAtomicClass(e){let{prop:t,value:o,pseudo:r,media:i,selector:n,isCustom:a}=e;if(a)return t;let s="";if(!o&&this.directMap[t])s=this.directMap[t];else {let d=this.propMap[t]||t;s=d.includes("__")?this.resolveComplexTemplate(t,o||"",d):`${d}: ${this.processValue(t,o||"")};`;}let l=`${s}|${r||""}|${i||""}|${n||""}`;if(this.ruleTracker.has(l))return this.ruleTracker.get(l);let c=`z${l.charAt(0)}${this.generateHash(l)}`,g=`${`.${c}${r?`:${r}`:""}${n?` ${n}`:""}`} { ${s} }`;return i&&i.split(" ").forEach(d=>{d==="dark"?g=`[color-scheme="dark"] ${g}`:this.mediaQueries[d]&&(g=`@media ${this.mediaQueries[d]} { ${g} }`);}),this.cache.set(c,g),this.ruleTracker.set(l,c),c}resolveComplexTemplate(e,t,o){let r=t.split(this.delimeter),i=o;if(e==="anim"){let[n,a,s]=r;i=i.replace("__VALUE__",this.processValue("transitionDuration",n||"0s")).replace("__CURVE__",this.animationCurves[a]||"ease-in-out").replace("__DELAY__",this.processValue("transitionDelay",s||"0s"));}else if(e==="rotate3d"){let[n,a,s,l]=r;i=i.replace("__X__",n||"0").replace("__Y__",a||"0").replace("__Z__",s||"0").replace("__A__",l?isNaN(Number(l))?l:`${l}deg`:"0deg");}return i.replace(/__VALUE__/g,this.processValue(e,r[0]||""))}transformBrackets(e){return e.replace(/\[/g,"(").replace(/\]/g,")").replace(this.dollorToVarRegexp,"var(--$1)")}addUnitsSafely(e,t){return ["opacity","zIndex","flex","b","font-weight","fontWeight","lineHeight"].includes(e)?t:/^-?\d*\.?\d+$/.test(t)?`${t}${e=="rotate"?"deg":"px"}`:t.replace(/(?<=^|[\s\+\-\*\/\(\,])(-?\d*\.?\d+)(?=$|[\s\+\-\*\/\)\,])/g,(r,i,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?r:`${r}px`)}processValue(e,t){let o=false;t.endsWith("!")&&(o=true,t=t.slice(0,-1));let r="";if(t.trim()=="full")r="100%";else if(t.includes("[")||t.includes("]")){let i=this.transformBrackets(t),[n]=t.split("[");["rgba","rgb"].includes(n)?r=i:r=this.addUnitsSafely(e,i);}else t.includes(",")?r=t.split(",").map(i=>this.processValue(e,i.trim())).join(" "):/^-?\d*\.?\d+$/.test(t)?r=this.addUnitsSafely(e,t):isColor(t)?r=this.makeColor(t):t.startsWith("gradient")||t.startsWith("linear-gradient")||t.startsWith("radial-gradient")?r=this.parseGradient(t):r=t.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${r} !important`:r}addUnitsToComplexValue(e,t){if(["opacity","zIndex","flex","b","fontWeight","lineHeight"].includes(e))return t;try{return String(t).replace(/(\d+)(?![%a-zA-Z!])/g,"$1px")}catch{return t}}makeColor(e){return e.charAt(0)=="#"&&(e=e.substring(1)),e.charAt(0)=="$"?`var(--${e.replace("$","")})`:/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(`#${e}`)||/^#([0-9A-F]{3}){1,2}$/i.test(`#${e}`)?`#${e}`:e.includes("rgb")||e.includes("rgba")?e.replace(/\[/g,"(").replace(/\]/g,")"):e.trim()}parseGradient(e){e.startsWith("gradient")&&(e=`linear-${e}`);let[t,o,r,i,...n]=e.split("-"),a=e,s=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,f)=>(c.push(this.makeColor(f)),c),[]).join(", ");switch(t){case "linear":a=`linear-gradient(${s}, ${l})`;break;case "radial":break;default:a=e;break}return a}generateHash(e,t=6){let o=5381;for(let i=0;i<e.length;i++)o=(o<<5)+o+e.charCodeAt(i);return (o>>>0&1048575).toString(36).padStart(t,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
|
|
3
3
|
`)}getCache(){return this.cache}clearFileCache(e){this.fileMap.delete(e);}writeToDisk(e){let t=new Set;this.fileMap.forEach(i=>{i.forEach(n=>t.add(n));});let o=[];t.forEach(i=>{this.cache.has(i)&&o.push(this.cache.get(i));});let r=`/* Zuz Generated CSS */
|
|
4
4
|
|
|
5
5
|
${o.join(`
|
|
6
|
-
`)}`;u.existsSync(dirname(e))||u.mkdirSync(dirname(e)),u.writeFileSync(e,r);}},Y=new h;export{m as a,_ as b,
|
|
6
|
+
`)}`;u.existsSync(dirname(e))||u.mkdirSync(dirname(e)),u.writeFileSync(e,r);}},Y=new h;export{m as a,_ as b,S as c,L as d,$ as e,R as f,W as g,M as h,Y as i};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
var m={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animation:"animation",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",background:"background",bg:"background",backgroundColor:"background-color",backgroundImage:"background-image",bgi:"background-image",bgc:"background-color",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip","bg-clip":"background-clip",border:"border",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",borderRadius:"border-radius",r:"border-radius",borderTopLeftRadius:"border-top-left-radius",rtl:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",rtr:"border-top-right-radius",borderBottomLeftRadius:"border-bottom-left-radius",rbl:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",rbr:"border-bottom-right-radius",bottom:"bottom",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",shadow:"box-shadow",boxSizing:"box-sizing",captionSide:"caption-side",caretColor:"caret-color","@charset":"@charset",clear:"clear",clip:"clip-path",clipPath:"clip-path",color:"color",c:"color",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",colGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",columns:"columns",content:"content",counterIncrement:"counter-increment",counterReset:"counter-reset",cursor:"cursor",pointer:"pointer",direction:"direction",display:"display",emptyCells:"empty-cells",filter:"filter",flex:"flex",flexBasis:"flex-basis",flexDirection:"flex-direction",flexDir:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",float:"float",font:"font",fontFamily:"font-family",fontKerning:"font-kerning",s:"font-size",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",bold:"bold",fontWeight:"font-weight",b:"font-weight",gap:"gap",grid:"grid",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas","grid-areas":"grid-template-areas",gridTemplateColumns:"grid-template-columns","grid-cols":"grid-template-columns",gridTemplateRows:"grid-template-rows","grid-rows":"grid-template-rows",hangingPunctuation:"hanging-punctuation",hyphens:"hyphens",isolation:"isolation",justifyContent:"justify-content",left:"left",letterSpacing:"letter-spacing",lineHeight:"line-height",lh:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",aspectRatio:"aspect-ratio",margin:"margin",m:"margin",marginBottom:"margin-bottom",mb:"margin-bottom",marginLeft:"margin-left",ml:"margin-left",marginRight:"margin-right",mr:"margin-right",marginTop:"margin-top",mt:"margin-top",height:"height",h:"height",minHeight:"min-height",minH:"min-height",maxHeight:"max-height",maxH:"max-height",width:"width",w:"width",minWidth:"min-width",minW:"min-width",maxWidth:"max-width",maxW:"max-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",opacity:"opacity",order:"order",outline:"outline",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflow:"overflow",overflowX:"overflow-x",overflowY:"overflow-y",padding:"padding",p:"padding",paddingBottom:"padding-bottom",pb:"padding-bottom",paddingLeft:"padding-left",pl:"padding-left",paddingRight:"padding-right",pr:"padding-right",paddingTop:"padding-top",pt:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspective:"perspective",perspectiveOrigin:"perspective-origin",pointerEvents:"pointer-events",position:"position",quotes:"quotes",resize:"resize",right:"right",scrollBehavior:"scroll-behavior",tabSize:"tab-size",tableLayout:"table-layout",align:"text-align",textAlign:"text-align",textAlignLast:"text-align-last",textDecoration:"text-decoration",td:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",textStroke:"-webkit-text-stroke",top:"top",transform:"transform","transform(2D)":"transform(2D)",transformOrigin:"transform-origin",origin:"transform-origin",transformStyle:"transform-style",transition:"transition",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",visibility:"visibility",whiteSpace:"white-space",wordBreak:"word-break",wordSpacing:"word-spacing",textWrap:"textWrap",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",backdropFilter:"backdrop-filter",placeItems:"place-items",placeContent:"place-content",corner:"corner-shape",ph:"padding-left:__VALUE__;padding-right:__VALUE__;",pv:"padding-top:__VALUE__;padding-bottom:__VALUE__;",mh:"margin-left:__VALUE__;margin-right:__VALUE__;",mv:"margin-top:__VALUE__;margin-bottom:__VALUE__;",translate:"translate: __VALUE__;",translateX:"translate: __VALUE__ 0px 0px;",translateY:"translate: 0px __VALUE__ 0px;",translateZ:"translate: 0px 0px __VALUE__;",x:"translate: __VALUE__ 0px 0px;",y:"translate: 0px __VALUE__ 0px;",z:"translate: 0px 0px __VALUE__;",rotate:"rotate: __VALUE__;",rotateX:"rotate: 1 0 0 __VALUE__;",rotateY:"rotate: 0 1 0 __VALUE__;",rotateZ:"rotate: 0 0 1 __VALUE__;",rotate3d:"rotate: 1 1 1 __VALUE__;",scale:"scale: __VALUE__;",view:"perspective: __VALUE__;",anim:"transition: all __VALUE__ __CURVE__ __DELAY__;",blur:"filter: blur(__VALUE__);",saturate:"filter: saturate(__VALUE__);",brightness:"filter: brightness(__VALUE__);",ratio:"aspect-ratio: __VALUE__;",extend:"@extend __VALUE__;"},x={content:"content:'';",bold:"font-weight: bold;",grid:"display:grid;",flex:"display:flex;",wrap:"flex-wrap:wrap;",cols:"flex-direction:column;","cols-reverse":"flex-direction:column-reverse;","cols-rev":"flex-direction:column-reverse;",ass:"align-self:flex-start;",ais:"align-items:flex-start;",aib:"align-items:baseline;",aic:"align-items:center;","align-items-center":"align-items:center;",aie:"align-items:flex-end;",jcs:"justify-content:flex-start;",jcc:"justify-content:center;",jce:"justify-content:flex-end;",jcb:"justify-content:space-between;",jca:"justify-content:space-around;",pis:"place-items:start",pie:"place-items:end",pic:"place-items:center",pist:"place-items:stretch",pcs:"place-content:start",pcc:"place-content:center",pce:"place-content:end",pcst:"place-content:stretch",tal:"text-align: left;",tac:"text-align: center;",tar:"text-align: right;",tas:"text-align: justify;",fill:"top: 0px;left: 0px;right: 0px;bottom: 0px;",rel:"position:relative;",abs:"position:absolute;",fixed:"position:fixed;",sticky:"position:sticky;",abc:"top: 50%;left: 50%;translate:-50% -50%;",tdn:"text-decoration:none;",tdu:"text-decoration:underline;",nous:"user-select:none;",nope:"pointer-events:none;","3d":"transform-style: preserve-3d;",hide:"display: none;",block:"display: block;",inlineblock:"display: inline-block;","center-h":"left: 50%;translate: -50% 0px;","center-x":"left: 50%;translate: -50% 0px;","center-v":"top: 50%;translate: 0px -50%;","center-y":"top: 50%;translate: 0px -50%;","no-overflow":"overflow: hidden;","no-overflow-x":"overflow-x: hidden;","no-overflow-y":"overflow-y: hidden;","overflow-x":"overflow-x: auto;","overflow-y":"overflow-y: auto;","scroll-x":"overflow-x: auto;","scroll-y":"overflow-y: auto;","space-pre":"white-space: pre;","white-space-pre":"white-space: pre;","text-wrap":"width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;","text-clip":"color: transparent;background-clip: text;-webkit-background-clip: text;","word-break":"wordc-break: break-word;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;"},_=["color","bg","background","background-color","border","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","outline-color","text-decoration-color","text-shadow","box-shadow","fill","stroke","stop-color","caret-color","column-rule-color","text-emphasis-color","accent-color","border-block-color","border-inline-color","column-fill","marker","scrollbar-color","outline-offset-color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor","textDecorationColor","textShadow","boxShadow","fill","stroke","stopColor","caretColor","columnRuleColor","textEmphasisColor","accentColor","borderBlockColor","borderInlineColor","columnFill","marker","scrollbarColor","outlineOffsetColor"],y={ease:"ease",in:"ease-in",out:"ease-out",inout:"ease-in-out",linear:"linear",start:"step-start",end:"step-end",steps:"steps",cubic:"cubic-bezier",initial:"initial",inherit:"inherit"};var S=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"],v=["blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia"],L={w:"width",minW:"minWidth",maxW:"maxWidth",h:"height",minH:"minHeight",maxH:"maxHeight",x:"translateX",y:"translateY",z:"translateZ",r:"rotate",rx:"rotateX",ry:"rotateY",rz:"rotateZ",s:"scale",sx:"scaleX",sy:"scaleY",sz:"scaleZ"};var w={name:"@zuzjs/ui"};var U=w.name,R=(p,e=[])=>{let t=["as",...e],o={...p};return Object.keys(o).map(r=>{r in m&&delete o[r];}),"skeleton"in t&&t.skeleton.enabled==true&&delete o.children,t.map(r=>r in o&&delete o[r]),o},W=p=>{let e=[],t="",o=0;for(let r=0;r<p.length;r++){let i=p[r];(i==="["||i==="(")&&o++,(i==="]"||i===")")&&o--,/\s/.test(i)&&o===0?(t.trim()&&e.push(t.trim()),t=""):t+=i;}return t.trim()&&e.push(t.trim()),e};var h=class{propMap=m;directMap=x;colorProps=new Set(_);animationCurves=y;delimeter=",";hashids;mediaQueries={ph:"(max-width: 599px)",sm:"(min-width: 600px) and (max-width: 767px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"};__SALT="zuzjs-ui";fileMap=new Map;cache=new Map;ruleTracker=new Map;dollorToVarRegexp=/\$([a-zA-Z0-9_-]+)/g;constructor(){this.hashids=new z__default.default(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),r=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(t).add(n);}return r}tokenize(e){let t=[],o=0,r=i=>{let n="",s=0;for(;o<e.length;){let a=e[o];if(a==="["&&s++,a==="]"&&s--,a==="("&&s===0){let l=n.trim(),c={...i};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=i.selector?`${i.selector} ${l}`:l,n="",o++,r(c);}else if(a===")"&&s===0){n.trim()&&this.pushToken(t,n.trim(),i),n="";return}else (a===" "||a===`
|
|
3
|
-
`)&&
|
|
1
|
+
'use strict';var C=require('hashids'),u=require('fs'),path=require('path'),core=require('@zuzjs/core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var C__default=/*#__PURE__*/_interopDefault(C);var u__default=/*#__PURE__*/_interopDefault(u);/* ZuzJS UI CLI */
|
|
2
|
+
var m={alignContent:"align-content",alignItems:"align-items",alignSelf:"align-self",animation:"animation",animationDelay:"animation-delay",animationDirection:"animation-direction",animationDuration:"animation-duration",animationFillMode:"animation-fill-mode",animationIterationCount:"animation-iteration-count",animationName:"animation-name",animationPlayState:"animation-play-state",animationTimingFunction:"animation-timing-function",background:"background",bg:"background",backgroundColor:"background-color",backgroundImage:"background-image",bgi:"background-image",bgc:"background-color",backgroundOrigin:"background-origin",backgroundPosition:"background-position",backgroundRepeat:"background-repeat",backgroundSize:"background-size",backfaceVisibility:"backface-visibility",backgroundAttachment:"background-attachment",backgroundBlendMode:"background-blend-mode",backgroundClip:"background-clip","bg-clip":"background-clip",border:"border",borderBottom:"border-bottom",borderBottomColor:"border-bottom-color",borderBottomStyle:"border-bottom-style",borderBottomWidth:"border-bottom-width",borderCollapse:"border-collapse",borderColor:"border-color",borderImage:"border-image",borderImageOutset:"border-image-outset",borderImageRepeat:"border-image-repeat",borderImageSlice:"border-image-slice",borderImageSource:"border-image-source",borderImageWidth:"border-image-width",borderLeft:"border-left",borderLeftColor:"border-left-color",borderLeftStyle:"border-left-style",borderLeftWidth:"border-left-width",borderRight:"border-right",borderRightColor:"border-right-color",borderRightStyle:"border-right-style",borderRightWidth:"border-right-width",borderSpacing:"border-spacing",borderStyle:"border-style",borderTop:"border-top",borderTopColor:"border-top-color",borderTopStyle:"border-top-style",borderTopWidth:"border-top-width",borderWidth:"border-width",borderRadius:"border-radius",r:"border-radius",borderTopLeftRadius:"border-top-left-radius",rtl:"border-top-left-radius",borderTopRightRadius:"border-top-right-radius",rtr:"border-top-right-radius",borderBottomLeftRadius:"border-bottom-left-radius",rbl:"border-bottom-left-radius",borderBottomRightRadius:"border-bottom-right-radius",rbr:"border-bottom-right-radius",bottom:"bottom",boxDecorationBreak:"box-decoration-break",boxShadow:"box-shadow",shadow:"box-shadow",boxSizing:"box-sizing",captionSide:"caption-side",caretColor:"caret-color","@charset":"@charset",clear:"clear",clip:"clip-path",clipPath:"clip-path",color:"color",c:"color",columnCount:"column-count",columnFill:"column-fill",columnGap:"column-gap",colGap:"column-gap",columnRule:"column-rule",columnRuleColor:"column-rule-color",columnRuleStyle:"column-rule-style",columnRuleWidth:"column-rule-width",columnSpan:"column-span",columnWidth:"column-width",columns:"columns",content:"content",counterIncrement:"counter-increment",counterReset:"counter-reset",cursor:"cursor",pointer:"pointer",direction:"direction",display:"display",emptyCells:"empty-cells",filter:"filter",flex:"flex",flexBasis:"flex-basis",flexDirection:"flex-direction",flexDir:"flex-direction",flexFlow:"flex-flow",flexGrow:"flex-grow",flexShrink:"flex-shrink",flexWrap:"flex-wrap",float:"float",font:"font",fontFamily:"font-family",fontKerning:"font-kerning",s:"font-size",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",bold:"bold",fontWeight:"font-weight",b:"font-weight",gap:"gap",grid:"grid",gridArea:"grid-area",gridAutoColumns:"grid-auto-columns",gridAutoFlow:"grid-auto-flow",gridAutoRows:"grid-auto-rows",gridColumn:"grid-column",gridColumnEnd:"grid-column-end",gridColumnGap:"grid-column-gap",gridColumnStart:"grid-column-start",gridGap:"grid-gap",gridRow:"grid-row",gridRowEnd:"grid-row-end",gridRowGap:"grid-row-gap",gridRowStart:"grid-row-start",gridTemplate:"grid-template",gridTemplateAreas:"grid-template-areas","grid-areas":"grid-template-areas",gridTemplateColumns:"grid-template-columns","grid-cols":"grid-template-columns",gridTemplateRows:"grid-template-rows","grid-rows":"grid-template-rows",hangingPunctuation:"hanging-punctuation",hyphens:"hyphens",isolation:"isolation",justifyContent:"justify-content",left:"left",letterSpacing:"letter-spacing",lineHeight:"line-height",lh:"line-height",listStyle:"list-style",listStyleImage:"list-style-image",listStylePosition:"list-style-position",listStyleType:"list-style-type",aspectRatio:"aspect-ratio",margin:"margin",m:"margin",marginBottom:"margin-bottom",mb:"margin-bottom",marginLeft:"margin-left",ml:"margin-left",marginRight:"margin-right",mr:"margin-right",marginTop:"margin-top",mt:"margin-top",height:"height",h:"height",minHeight:"min-height",minH:"min-height",maxHeight:"max-height",maxH:"max-height",width:"width",w:"width",minWidth:"min-width",minW:"min-width",maxWidth:"max-width",maxW:"max-width",mixBlendMode:"mix-blend-mode",objectFit:"object-fit",objectPosition:"object-position",opacity:"opacity",order:"order",outline:"outline",outlineColor:"outline-color",outlineOffset:"outline-offset",outlineStyle:"outline-style",outlineWidth:"outline-width",overflow:"overflow",overflowX:"overflow-x",overflowY:"overflow-y",padding:"padding",p:"padding",paddingBottom:"padding-bottom",pb:"padding-bottom",paddingLeft:"padding-left",pl:"padding-left",paddingRight:"padding-right",pr:"padding-right",paddingTop:"padding-top",pt:"padding-top",pageBreakAfter:"page-break-after",pageBreakBefore:"page-break-before",pageBreakInside:"page-break-inside",perspective:"perspective",perspectiveOrigin:"perspective-origin",pointerEvents:"pointer-events",position:"position",quotes:"quotes",resize:"resize",right:"right",scrollBehavior:"scroll-behavior",tabSize:"tab-size",tableLayout:"table-layout",align:"text-align",textAlign:"text-align",textAlignLast:"text-align-last",textDecoration:"text-decoration",td:"text-decoration",textDecorationColor:"text-decoration-color",textDecorationLine:"text-decoration-line",textDecorationStyle:"text-decoration-style",textIndent:"text-indent",textJustify:"text-justify",textOverflow:"text-overflow",textShadow:"text-shadow",textTransform:"text-transform",textStroke:"-webkit-text-stroke",top:"top",transform:"transform","transform(2D)":"transform(2D)",transformOrigin:"transform-origin",origin:"transform-origin",transformStyle:"transform-style",transition:"transition",transitionDelay:"transition-delay",transitionDuration:"transition-duration",transitionProperty:"transition-property",transitionTimingFunction:"transition-timing-function",unicodeBidi:"unicode-bidi",userSelect:"user-select",verticalAlign:"vertical-align",visibility:"visibility",whiteSpace:"white-space",wordBreak:"word-break",wordSpacing:"word-spacing",textWrap:"textWrap",wordWrap:"word-wrap",writingMode:"writing-mode",zIndex:"z-index",backdropFilter:"backdrop-filter",placeItems:"place-items",placeContent:"place-content",corner:"corner-shape",ph:"padding-left:__VALUE__;padding-right:__VALUE__;",pv:"padding-top:__VALUE__;padding-bottom:__VALUE__;",mh:"margin-left:__VALUE__;margin-right:__VALUE__;",mv:"margin-top:__VALUE__;margin-bottom:__VALUE__;",translate:"translate: __VALUE__;",translateX:"translate: __VALUE__ 0px 0px;",translateY:"translate: 0px __VALUE__ 0px;",translateZ:"translate: 0px 0px __VALUE__;",x:"translate: __VALUE__ 0px 0px;",y:"translate: 0px __VALUE__ 0px;",z:"translate: 0px 0px __VALUE__;",rotate:"rotate: __VALUE__;",rotateX:"rotate: 1 0 0 __VALUE__;",rotateY:"rotate: 0 1 0 __VALUE__;",rotateZ:"rotate: 0 0 1 __VALUE__;",rotate3d:"rotate: 1 1 1 __VALUE__;",scale:"scale: __VALUE__;",view:"perspective: __VALUE__;",anim:"transition: all __VALUE__ __CURVE__ __DELAY__;",blur:"filter: blur(__VALUE__);",saturate:"filter: saturate(__VALUE__);",brightness:"filter: brightness(__VALUE__);",ratio:"aspect-ratio: __VALUE__;",extend:"@extend __VALUE__;"},x={content:"content:'';",bold:"font-weight: bold;",grid:"display:grid;",flex:"display:flex;",wrap:"flex-wrap:wrap;",cols:"flex-direction:column;","cols-reverse":"flex-direction:column-reverse;","cols-rev":"flex-direction:column-reverse;",ass:"align-self:flex-start;",ais:"align-items:flex-start;",aib:"align-items:baseline;",aic:"align-items:center;","align-items-center":"align-items:center;",aie:"align-items:flex-end;",jcs:"justify-content:flex-start;",jcc:"justify-content:center;",jce:"justify-content:flex-end;",jcb:"justify-content:space-between;",jca:"justify-content:space-around;",pis:"place-items:start",pie:"place-items:end",pic:"place-items:center",pist:"place-items:stretch",pcs:"place-content:start",pcc:"place-content:center",pce:"place-content:end",pcst:"place-content:stretch",tal:"text-align: left;",tac:"text-align: center;",tar:"text-align: right;",tas:"text-align: justify;",fill:"top: 0px;left: 0px;right: 0px;bottom: 0px;",rel:"position:relative;",abs:"position:absolute;",fixed:"position:fixed;",sticky:"position:sticky;",abc:"top:50%;left:50%;--abc-x:-50%;--abc-y:-50%;translate:calc(var(--abc-x) + var(--fx-x, 0px)) calc(var(--abc-y) + var(--fx-y, 0px));",tdn:"text-decoration:none;",tdu:"text-decoration:underline;",nous:"user-select:none;",nope:"pointer-events:none;","3d":"transform-style: preserve-3d;",hide:"display: none;",block:"display: block;",inlineblock:"display: inline-block;","center-h":"left: 50%;--abc-x: -50%;translate: calc(var(--abc-x) + var(--fx-x, 0px)) var(--fx-y, 0px);","center-x":"left: 50%;--abc-x: -50%;translate: calc(var(--abc-x) + var(--fx-x, 0px)) var(--fx-y, 0px);","center-v":"top: 50%;--abc-y: -50%;translate: var(--fx-x, 0px) calc(var(--abc-y) + var(--fx-y, 0px));","center-y":"top: 50%;--abc-y: -50%;translate: var(--fx-x, 0px) calc(var(--abc-y) + var(--fx-y, 0px));","no-overflow":"overflow: hidden;","no-overflow-x":"overflow-x: hidden;","no-overflow-y":"overflow-y: hidden;","overflow-x":"overflow-x: auto;","overflow-y":"overflow-y: auto;","scroll-x":"overflow-x: auto;","scroll-y":"overflow-y: auto;","space-pre":"white-space: pre;","white-space-pre":"white-space: pre;","text-wrap":"width: 98%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;","text-clip":"color: transparent;background-clip: text;-webkit-background-clip: text;","word-break":"word-break: break-word;",uppercase:"text-transform: uppercase;",lowercase:"text-transform: lowercase;",capitalize:"text-transform: capitalize;"},_=["color","bg","background","background-color","border","border-color","border-top-color","border-right-color","border-bottom-color","border-left-color","outline-color","text-decoration-color","text-shadow","box-shadow","fill","stroke","stop-color","caret-color","column-rule-color","text-emphasis-color","accent-color","border-block-color","border-inline-color","column-fill","marker","scrollbar-color","outline-offset-color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor","textDecorationColor","textShadow","boxShadow","fill","stroke","stopColor","caretColor","columnRuleColor","textEmphasisColor","accentColor","borderBlockColor","borderInlineColor","columnFill","marker","scrollbarColor","outlineOffsetColor"],y={ease:"ease",in:"ease-in",out:"ease-out",inout:"ease-in-out",linear:"linear",start:"step-start",end:"step-end",steps:"steps",cubic:"cubic-bezier",initial:"initial",inherit:"inherit"};var A=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"],S=["blur","brightness","contrast","drop-shadow","grayscale","hue-rotate","invert","saturate","sepia"],L={w:"width",minW:"minWidth",maxW:"maxWidth",h:"height",minH:"minHeight",maxH:"maxHeight",x:"translateX",y:"translateY",z:"translateZ",r:"rotate",rx:"rotateX",ry:"rotateY",rz:"rotateZ",s:"scale",sx:"scaleX",sy:"scaleY",sz:"scaleZ"};var w={name:"@zuzjs/ui"};var U=w.name,R=(p,e=[])=>{let t=["as",...e],o={...p};return Object.keys(o).map(r=>{r in m&&delete o[r];}),"skeleton"in t&&t.skeleton.enabled==true&&delete o.children,t.map(r=>r in o&&delete o[r]),o},W=p=>{let e=[],t="",o=0;for(let r=0;r<p.length;r++){let i=p[r];(i==="["||i==="(")&&o++,(i==="]"||i===")")&&o--,/\s/.test(i)&&o===0?(t.trim()&&e.push(t.trim()),t=""):t+=i;}return t.trim()&&e.push(t.trim()),e};var h=class{propMap=m;directMap=x;colorProps=new Set(_);animationCurves=y;delimeter=",";hashids;mediaQueries={ph:"(max-width: 599px)",sm:"(min-width: 600px) and (max-width: 767px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"};__SALT="zuzjs-ui";fileMap=new Map;cache=new Map;ruleTracker=new Map;dollorToVarRegexp=/\$([a-zA-Z0-9_-]+)/g;constructor(){this.hashids=new C__default.default(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),r=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(t).add(n);}return r}tokenize(e){let t=[],o=0,r=i=>{let n="",a=0;for(;o<e.length;){let s=e[o];if(s==="["&&a++,s==="]"&&a--,s==="("&&a===0){let l=n.trim(),c={...i};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=i.selector?`${i.selector} ${l}`:l,n="",o++,r(c);}else if(s===")"&&a===0){n.trim()&&this.pushToken(t,n.trim(),i),n="";return}else (s===" "||s===`
|
|
3
|
+
`)&&a===0?(n.trim()&&this.pushToken(t,n.trim(),i),n=""):n+=s;o++;}n.trim()&&this.pushToken(t,n.trim(),i);};return r({}),t}pushToken(e,t,o){let r=t.trim();if(r.includes(":")){let i=r.indexOf(":"),n=r.slice(0,i).trim(),a=r.slice(i+1).trim();e.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[r]?e.push({prop:r,value:void 0,isCustom:false,...o}):e.push({prop:t.trim(),isCustom:true,...o});}generateAtomicClass(e){let{prop:t,value:o,pseudo:r,media:i,selector:n,isCustom:a}=e;if(a)return t;let s="";if(!o&&this.directMap[t])s=this.directMap[t];else {let d=this.propMap[t]||t;s=d.includes("__")?this.resolveComplexTemplate(t,o||"",d):`${d}: ${this.processValue(t,o||"")};`;}let l=`${s}|${r||""}|${i||""}|${n||""}`;if(this.ruleTracker.has(l))return this.ruleTracker.get(l);let c=`z${l.charAt(0)}${this.generateHash(l)}`,g=`${`.${c}${r?`:${r}`:""}${n?` ${n}`:""}`} { ${s} }`;return i&&i.split(" ").forEach(d=>{d==="dark"?g=`[color-scheme="dark"] ${g}`:this.mediaQueries[d]&&(g=`@media ${this.mediaQueries[d]} { ${g} }`);}),this.cache.set(c,g),this.ruleTracker.set(l,c),c}resolveComplexTemplate(e,t,o){let r=t.split(this.delimeter),i=o;if(e==="anim"){let[n,a,s]=r;i=i.replace("__VALUE__",this.processValue("transitionDuration",n||"0s")).replace("__CURVE__",this.animationCurves[a]||"ease-in-out").replace("__DELAY__",this.processValue("transitionDelay",s||"0s"));}else if(e==="rotate3d"){let[n,a,s,l]=r;i=i.replace("__X__",n||"0").replace("__Y__",a||"0").replace("__Z__",s||"0").replace("__A__",l?isNaN(Number(l))?l:`${l}deg`:"0deg");}return i.replace(/__VALUE__/g,this.processValue(e,r[0]||""))}transformBrackets(e){return e.replace(/\[/g,"(").replace(/\]/g,")").replace(this.dollorToVarRegexp,"var(--$1)")}addUnitsSafely(e,t){return ["opacity","zIndex","flex","b","font-weight","fontWeight","lineHeight"].includes(e)?t:/^-?\d*\.?\d+$/.test(t)?`${t}${e=="rotate"?"deg":"px"}`:t.replace(/(?<=^|[\s\+\-\*\/\(\,])(-?\d*\.?\d+)(?=$|[\s\+\-\*\/\)\,])/g,(r,i,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?r:`${r}px`)}processValue(e,t){let o=false;t.endsWith("!")&&(o=true,t=t.slice(0,-1));let r="";if(t.trim()=="full")r="100%";else if(t.includes("[")||t.includes("]")){let i=this.transformBrackets(t),[n]=t.split("[");["rgba","rgb"].includes(n)?r=i:r=this.addUnitsSafely(e,i);}else t.includes(",")?r=t.split(",").map(i=>this.processValue(e,i.trim())).join(" "):/^-?\d*\.?\d+$/.test(t)?r=this.addUnitsSafely(e,t):core.isColor(t)?r=this.makeColor(t):t.startsWith("gradient")||t.startsWith("linear-gradient")||t.startsWith("radial-gradient")?r=this.parseGradient(t):r=t.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${r} !important`:r}addUnitsToComplexValue(e,t){if(["opacity","zIndex","flex","b","fontWeight","lineHeight"].includes(e))return t;try{return String(t).replace(/(\d+)(?![%a-zA-Z!])/g,"$1px")}catch{return t}}makeColor(e){return e.charAt(0)=="#"&&(e=e.substring(1)),e.charAt(0)=="$"?`var(--${e.replace("$","")})`:/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(`#${e}`)||/^#([0-9A-F]{3}){1,2}$/i.test(`#${e}`)?`#${e}`:e.includes("rgb")||e.includes("rgba")?e.replace(/\[/g,"(").replace(/\]/g,")"):e.trim()}parseGradient(e){e.startsWith("gradient")&&(e=`linear-${e}`);let[t,o,r,i,...n]=e.split("-"),a=e,s=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,f)=>(c.push(this.makeColor(f)),c),[]).join(", ");switch(t){case "linear":a=`linear-gradient(${s}, ${l})`;break;case "radial":break;default:a=e;break}return a}generateHash(e,t=6){let o=5381;for(let i=0;i<e.length;i++)o=(o<<5)+o+e.charCodeAt(i);return (o>>>0&1048575).toString(36).padStart(t,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
|
|
4
4
|
`)}getCache(){return this.cache}clearFileCache(e){this.fileMap.delete(e);}writeToDisk(e){let t=new Set;this.fileMap.forEach(i=>{i.forEach(n=>t.add(n));});let o=[];t.forEach(i=>{this.cache.has(i)&&o.push(this.cache.get(i));});let r=`/* Zuz Generated CSS */
|
|
5
5
|
|
|
6
6
|
${o.join(`
|
|
7
|
-
`)}`;u__default.default.existsSync(path.dirname(e))||u__default.default.mkdirSync(path.dirname(e)),u__default.default.writeFileSync(e,r);}},Z=new h;exports.a=m;exports.b=x;exports.c=
|
|
7
|
+
`)}`;u__default.default.existsSync(path.dirname(e))||u__default.default.mkdirSync(path.dirname(e)),u__default.default.writeFileSync(e,r);}},Z=new h;exports.a=m;exports.b=x;exports.c=A;exports.d=S;exports.e=L;exports.f=U;exports.g=R;exports.h=W;exports.i=Z;
|