@zuzjs/ui 1.0.33 → 1.0.35

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 CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var chunkLE3HEEAK_cjs=require('./chunk-LE3HEEAK.cjs'),commander=require('commander'),Z=require('chokidar'),p=require('path'),i=require('picocolors'),u=require('fs'),tsMorph=require('ts-morph'),url=require('url');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Z__default=/*#__PURE__*/_interopDefault(Z);var p__default=/*#__PURE__*/_interopDefault(p);var i__default=/*#__PURE__*/_interopDefault(i);var u__default=/*#__PURE__*/_interopDefault(u);/* ZuzJS UI CLI */
3
- var k=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(l=>{this.extractStyles(l.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 n=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{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(n=>{let a=n.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{chunkLE3HEEAK_cjs.h(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h,z,F]=x;chunkLE3HEEAK_cjs.h(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=chunkLE3HEEAK_cjs.i.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=chunkLE3HEEAK_cjs.i.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h=chunkLE3HEEAK_cjs.i.parseAndGenerate(a,e);h.length>0&&(this.manifest[a]=h.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=[p__default.default.join(e,"src/app/css"),p__default.default.join(e,"app/css"),p__default.default.join(e,"src/css"),p__default.default.join(e,"css")],s=t.find(l=>u__default.default.existsSync(l))||t[0];return u__default.default.existsSync(s)||u__default.default.mkdirSync(s,{recursive:true}),p__default.default.join(s,"zuzmap.ts")};saveManifest(e){let t=p__default.default.dirname(e);u__default.default.existsSync(t)||u__default.default.mkdirSync(t,{recursive:true});let s=chunkLE3HEEAK_cjs.i.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
4
- export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,g);}},y=new k;commander.program.opts();var S=process.cwd(),O=false,J=p__default.default.join(S,"src","app","css"),R=p__default.default.join(J,"zuz.scss"),W=p__default.default.join(J,"zuzmap.ts"),G=()=>{chunkLE3HEEAK_cjs.i.writeToDisk(R),y.saveManifest(W);},P=async()=>{try{let o=p__default.default.dirname(url.fileURLToPath(chunkLE3HEEAK_cjs.a)),e=p__default.default.resolve(o,"../package.json"),t=JSON.parse(u__default.default.readFileSync(e,"utf8")),g=(await(await fetch("https://registry.npmjs.org/@zuzjs/ui/latest")).json()).version.trim();if(g!==t.version.trim()){let n=` Update available! ${i__default.default.dim(t.version)} \u2192 ${i__default.default.green(g)} `,c=` Run: ${i__default.default.cyan(`npm i ${t.name}@latest`)} `,a=b=>b.replace(/\u001b\[[0-9;]*m/g,"").length,x=a(n),h=a(c),z=Math.max(x,h),F=i__default.default.yellow(`\u250C${"\u2500".repeat(z+2)}\u2510`),C=i__default.default.yellow(`\u2514${"\u2500".repeat(z+2)}\u2518`),j=(b,v)=>{let w=" ".repeat(z-v);return `${i__default.default.yellow("\u2502")} ${b}${w} ${i__default.default.yellow("\u2502")}`};console.log(`
2
+ 'use strict';var chunk35QXKGLH_cjs=require('./chunk-35QXKGLH.cjs'),commander=require('commander'),Z=require('chokidar'),p=require('path'),i=require('picocolors'),u=require('fs'),tsMorph=require('ts-morph'),url=require('url');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var Z__default=/*#__PURE__*/_interopDefault(Z);var p__default=/*#__PURE__*/_interopDefault(p);var i__default=/*#__PURE__*/_interopDefault(i);var u__default=/*#__PURE__*/_interopDefault(u);/* ZuzJS UI CLI */
3
+ var k=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(l=>{this.extractStyles(l.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 n=u__default.default.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{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(n=>{let a=n.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{chunk35QXKGLH_cjs.h(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h,z,F]=x;chunk35QXKGLH_cjs.h(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=chunk35QXKGLH_cjs.i.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=chunk35QXKGLH_cjs.i.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h=chunk35QXKGLH_cjs.i.parseAndGenerate(a,e);h.length>0&&(this.manifest[a]=h.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=[p__default.default.join(e,"src/app/css"),p__default.default.join(e,"app/css"),p__default.default.join(e,"src/css"),p__default.default.join(e,"css")],s=t.find(l=>u__default.default.existsSync(l))||t[0];return u__default.default.existsSync(s)||u__default.default.mkdirSync(s,{recursive:true}),p__default.default.join(s,"zuzmap.ts")};saveManifest(e){let t=p__default.default.dirname(e);u__default.default.existsSync(t)||u__default.default.mkdirSync(t,{recursive:true});let s=chunk35QXKGLH_cjs.i.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
4
+ export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u__default.default.writeFileSync(e,g);}},y=new k;commander.program.opts();var S=process.cwd(),O=false,J=p__default.default.join(S,"src","app","css"),R=p__default.default.join(J,"zuz.scss"),W=p__default.default.join(J,"zuzmap.ts"),G=()=>{chunk35QXKGLH_cjs.i.writeToDisk(R),y.saveManifest(W);},P=async()=>{try{let o=p__default.default.dirname(url.fileURLToPath(chunk35QXKGLH_cjs.a)),e=p__default.default.resolve(o,"../package.json"),t=JSON.parse(u__default.default.readFileSync(e,"utf8")),g=(await(await fetch("https://registry.npmjs.org/@zuzjs/ui/latest")).json()).version.trim();if(g!==t.version.trim()){let n=` Update available! ${i__default.default.dim(t.version)} \u2192 ${i__default.default.green(g)} `,c=` Run: ${i__default.default.cyan(`npm i ${t.name}@latest`)} `,a=b=>b.replace(/\u001b\[[0-9;]*m/g,"").length,x=a(n),h=a(c),z=Math.max(x,h),F=i__default.default.yellow(`\u250C${"\u2500".repeat(z+2)}\u2510`),C=i__default.default.yellow(`\u2514${"\u2500".repeat(z+2)}\u2518`),j=(b,v)=>{let w=" ".repeat(z-v);return `${i__default.default.yellow("\u2502")} ${b}${w} ${i__default.default.yellow("\u2502")}`};console.log(`
5
5
  ${F}`),console.log(j(n,x)),console.log(j(c,h)),console.log(`${C}
6
- `);}}catch{}};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p__default.default.join(S,".vscode"),e=p__default.default.join(o,"zuz.code-snippets"),t=p__default.default.join(o,"settings.json"),s=Object.keys(chunkLE3HEEAK_cjs.b).join(","),l=Object.keys(chunkLE3HEEAK_cjs.c).join(","),g={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${l}|}$0"`],description:"Zuz Direct Shortcut"}},n={};if(u__default.default.existsSync(t))try{n=JSON.parse(u__default.default.readFileSync(t,"utf-8"));}catch{n={};}n["editor.suggest.snippetsPreventQuickSuggestions"]=false,n["editor.quickSuggestions"]={...typeof n["editor.quickSuggestions"]=="object"?n["editor.quickSuggestions"]:{},strings:true},u__default.default.existsSync(o)||u__default.default.mkdirSync(o,{recursive:true}),u__default.default.writeFileSync(e,JSON.stringify(g,null,2)),u__default.default.writeFileSync(t,JSON.stringify(n,null,2)),console.log(i__default.default.green("\u2714 Zuz VS Code configuration initialized!")),console.log(i__default.default.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(i__default.default.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});commander.program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{P();let o=Z__default.default.watch(".",{cwd:S,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",e=>{y.isSupportedFile(e)&&y.processFile(p__default.default.resolve(S,e)),O&&console.log(i__default.default.gray(`\u25CB File added: ${e}`));}),o.on("change",e=>{if(y.isSupportedFile(e)){console.log(i__default.default.gray(`\u25CB File changed: ${e}`));let t=p__default.default.resolve(S,e);chunkLE3HEEAK_cjs.i.clearFileCache(t),y.processFile(t),G(),console.log(i__default.default.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{O=true,G(),console.log(i__default.default.green(`
6
+ `);}}catch{}};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p__default.default.join(S,".vscode"),e=p__default.default.join(o,"zuz.code-snippets"),t=p__default.default.join(o,"settings.json"),s=Object.keys(chunk35QXKGLH_cjs.b).join(","),l=Object.keys(chunk35QXKGLH_cjs.c).join(","),g={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${l}|}$0"`],description:"Zuz Direct Shortcut"}},n={};if(u__default.default.existsSync(t))try{n=JSON.parse(u__default.default.readFileSync(t,"utf-8"));}catch{n={};}n["editor.suggest.snippetsPreventQuickSuggestions"]=false,n["editor.quickSuggestions"]={...typeof n["editor.quickSuggestions"]=="object"?n["editor.quickSuggestions"]:{},strings:true},u__default.default.existsSync(o)||u__default.default.mkdirSync(o,{recursive:true}),u__default.default.writeFileSync(e,JSON.stringify(g,null,2)),u__default.default.writeFileSync(t,JSON.stringify(n,null,2)),console.log(i__default.default.green("\u2714 Zuz VS Code configuration initialized!")),console.log(i__default.default.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(i__default.default.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});commander.program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{P();let o=Z__default.default.watch(".",{cwd:S,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",e=>{y.isSupportedFile(e)&&y.processFile(p__default.default.resolve(S,e)),O&&console.log(i__default.default.gray(`\u25CB File added: ${e}`));}),o.on("change",e=>{if(y.isSupportedFile(e)){console.log(i__default.default.gray(`\u25CB File changed: ${e}`));let t=p__default.default.resolve(S,e);chunk35QXKGLH_cjs.i.clearFileCache(t),y.processFile(t),G(),console.log(i__default.default.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{O=true,G(),console.log(i__default.default.green(`
7
7
  \u2713 Initial Build Complete.`)),console.log(i__default.default.cyan(`\u25CB Watching: ${p.basename(S)}
8
8
  `));}),o.on("error",e=>console.error(i__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,h,g}from'./chunk-6RUAMBJW.js';import {program}from'commander';import D from'chokidar';import p,{basename}from'path';import i from'picocolors';import u from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';import {fileURLToPath}from'url';var T=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(l=>{this.extractStyles(l.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 n=u.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(n=>{let a=n.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{g(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h$1,z,F]=x;g(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=h.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=h.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h$1=h.parseAndGenerate(a,e);h$1.length>0&&(this.manifest[a]=h$1.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=[p.join(e,"src/app/css"),p.join(e,"app/css"),p.join(e,"src/css"),p.join(e,"css")],s=t.find(l=>u.existsSync(l))||t[0];return u.existsSync(s)||u.mkdirSync(s,{recursive:true}),p.join(s,"zuzmap.ts")};saveManifest(e){let t=p.dirname(e);u.existsSync(t)||u.mkdirSync(t,{recursive:true});let s=h.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
2
+ import {a,b,h,g}from'./chunk-ZRRWTL7H.js';import {program}from'commander';import D from'chokidar';import p,{basename}from'path';import i from'picocolors';import u from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';import {fileURLToPath}from'url';var T=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(l=>{this.extractStyles(l.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 n=u.readFileSync(e,"utf-8");s=this.project.createSourceFile(e,n,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(e),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(n=>{let a=n.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();a&&this.extractStyles(a);}),s.getDescendantsOfKind(SyntaxKind.CallExpression).filter(n=>n.getExpression().getText()==="css").forEach(n=>{let c=n.getArguments();c.length>0&&this.extractStyles(c[0]);}),this.stylesToGenerate.forEach(n=>{g(n).filter(Boolean).forEach(a=>{let x=a.match(/^([&@][\w-]+)\((.*)\)$/);if(x){let[h$1,z,F]=x;g(F).filter(Boolean).forEach(b=>{let v=`${z}(${b})`,w=h.parseAndGenerate(v,e);w.length>0&&(this.manifest[v]=w.join(" "));});let j=h.parseAndGenerate(a,e);j.length>0&&(this.manifest[a]=j.join(" "));}else {let h$1=h.parseAndGenerate(a,e);h$1.length>0&&(this.manifest[a]=h$1.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=[p.join(e,"src/app/css"),p.join(e,"app/css"),p.join(e,"src/css"),p.join(e,"css")],s=t.find(l=>u.existsSync(l))||t[0];return u.existsSync(s)||u.mkdirSync(s,{recursive:true}),p.join(s,"zuzmap.ts")};saveManifest(e){let t=p.dirname(e);u.existsSync(t)||u.mkdirSync(t,{recursive:true});let s=h.getCache(),l={};for(let[n,c]of Object.entries(this.manifest))s.has(c)&&(l[n]=c);this.manifest=l;let g=`/* Zuz Generated Manifest - Do not edit */
3
3
  export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;u.writeFileSync(e,g);}},y=new T;program.opts();var S=process.cwd(),A=false,G=p.join(S,"src","app","css"),W=p.join(G,"zuz.scss"),P=p.join(G,"zuzmap.ts"),O=()=>{h.writeToDisk(W),y.saveManifest(P);},I=async()=>{try{let o=p.dirname(fileURLToPath(import.meta.url)),e=p.resolve(o,"../package.json"),t=JSON.parse(u.readFileSync(e,"utf8")),g=(await(await fetch("https://registry.npmjs.org/@zuzjs/ui/latest")).json()).version.trim();if(g!==t.version.trim()){let n=` Update available! ${i.dim(t.version)} \u2192 ${i.green(g)} `,c=` Run: ${i.cyan(`npm i ${t.name}@latest`)} `,a=b=>b.replace(/\u001b\[[0-9;]*m/g,"").length,x=a(n),h=a(c),z=Math.max(x,h),F=i.yellow(`\u250C${"\u2500".repeat(z+2)}\u2510`),k=i.yellow(`\u2514${"\u2500".repeat(z+2)}\u2518`),j=(b,v)=>{let w=" ".repeat(z-v);return `${i.yellow("\u2502")} ${b}${w} ${i.yellow("\u2502")}`};console.log(`
4
4
  ${F}`),console.log(j(n,x)),console.log(j(c,h)),console.log(`${k}
5
5
  `);}}catch{}};program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p.join(S,".vscode"),e=p.join(o,"zuz.code-snippets"),t=p.join(o,"settings.json"),s=Object.keys(a).join(","),l=Object.keys(b).join(","),g={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${l}|}$0"`],description:"Zuz Direct Shortcut"}},n={};if(u.existsSync(t))try{n=JSON.parse(u.readFileSync(t,"utf-8"));}catch{n={};}n["editor.suggest.snippetsPreventQuickSuggestions"]=false,n["editor.quickSuggestions"]={...typeof n["editor.quickSuggestions"]=="object"?n["editor.quickSuggestions"]:{},strings:true},u.existsSync(o)||u.mkdirSync(o,{recursive:true}),u.writeFileSync(e,JSON.stringify(g,null,2)),u.writeFileSync(t,JSON.stringify(n,null,2)),console.log(i.green("\u2714 Zuz VS Code configuration initialized!")),console.log(i.cyan(" - .vscode/zuz.code-snippets (Splitted zp/zs)")),console.log(i.cyan(" - .vscode/settings.json (QuickSuggestions enabled)"));});program.command("watch").alias("w").description("Start ZuzJS watcher").action(()=>{I();let o=D.watch(".",{cwd:S,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",e=>{y.isSupportedFile(e)&&y.processFile(p.resolve(S,e)),A&&console.log(i.gray(`\u25CB File added: ${e}`));}),o.on("change",e=>{if(y.isSupportedFile(e)){console.log(i.gray(`\u25CB File changed: ${e}`));let t=p.resolve(S,e);h.clearFileCache(t),y.processFile(t),O(),console.log(i.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{A=true,O(),console.log(i.green(`
@@ -1,7 +1,7 @@
1
1
  'use strict';var core=require('@zuzjs/core'),h=require('fs'),z=require('hashids'),path=require('path');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var h__default=/*#__PURE__*/_interopDefault(h);var z__default=/*#__PURE__*/_interopDefault(z);/* ZuzJS UI CLI */
2
- var v=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?document.currentScript.src:new URL("main.js",document.baseURI).href,u=v();var g={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",radius:"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",shrink:"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 $=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"];var 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 V=w.name,W=(p,t=[])=>{let e=["as",...t],o={...p};return Object.keys(o).map(r=>{r in g&&delete o[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete o.children,e.map(r=>r in o&&delete o[r]),o},M=p=>{let t=[],e="",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?(e.trim()&&t.push(e.trim()),e=""):e+=i;}return e.trim()&&t.push(e.trim()),t};var f=class{propMap=g;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(t,e){let o=this.tokenize(t),r=[];this.fileMap.has(e)||this.fileMap.set(e,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(e).add(n);}return r}tokenize(t){let e=[],o=0,r=i=>{let n="",a=0;for(;o<t.length;){let s=t[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(e,n.trim(),i),n="";return}else (s===" "||s===`
2
+ var v=()=>typeof document>"u"?new URL(`file:${__filename}`).href:document.currentScript&&document.currentScript.tagName.toUpperCase()==="SCRIPT"?document.currentScript.src:new URL("main.js",document.baseURI).href,g=v();var u={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",radius:"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",shrink:"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;","pe-none":"pointer-events:none;","pe-auto":"pointer-events:auto;","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 $=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"];var 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 V=w.name,W=(p,t=[])=>{let e=["as",...t],o={...p};return Object.keys(o).map(r=>{r in u&&delete o[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete o.children,e.map(r=>r in o&&delete o[r]),o},M=p=>{let t=[],e="",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?(e.trim()&&t.push(e.trim()),e=""):e+=i;}return e.trim()&&t.push(e.trim()),t};var f=class{propMap=u;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(t,e){let o=this.tokenize(t),r=[];this.fileMap.has(e)||this.fileMap.set(e,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(e).add(n);}return r}tokenize(t){let e=[],o=0,r=i=>{let n="",a=0;for(;o<t.length;){let s=t[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(e,n.trim(),i),n="";return}else (s===" "||s===`
3
3
  `)&&a===0?(n.trim()&&this.pushToken(e,n.trim(),i),n=""):n+=s;o++;}n.trim()&&this.pushToken(e,n.trim(),i);};return r({}),e}pushToken(t,e,o){let r=e.trim();if(r.includes(":")){let i=r.indexOf(":"),n=r.slice(0,i).trim(),a=r.slice(i+1).trim();t.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[r]?t.push({prop:r,value:void 0,isCustom:false,...o}):t.push({prop:e.trim(),isCustom:true,...o});}generateAtomicClass(t){let{prop:e,value:o,pseudo:r,media:i,selector:n,isCustom:a}=t;if(a)return e;let s="";if(!o&&this.directMap[e])s=this.directMap[e];else {let d=this.propMap[e]||e;s=d.includes("__")?this.resolveComplexTemplate(e,o||"",d):`${d}: ${this.processValue(e,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)}`,m=`${`.${c}${r?`:${r}`:""}${n?` ${n}`:""}`} { ${s} }`;return i&&i.split(" ").forEach(d=>{d==="dark"?m=`[color-scheme="dark"] ${m}`:this.mediaQueries[d]&&(m=`@media ${this.mediaQueries[d]} { ${m} }`);}),this.cache.set(c,m),this.ruleTracker.set(l,c),c}resolveComplexTemplate(t,e,o){let r=e.split(this.delimeter),i=o;if(t==="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(t==="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(t,r[0]||""))}transformBrackets(t){return t.replace(/\[/g,"(").replace(/\]/g,")").replace(this.dollorToVarRegexp,"var(--$1)")}addUnitsSafely(t,e){return ["opacity","zIndex","flex","b","font-weight","fontWeight","lineHeight","scale","ratio","aspectRatio","aspect-ratio","shrink","flex-shrink","flexShrink"].includes(t)?e:/^-?\d*\.?\d+$/.test(e)?`${e}${t=="rotate"?"deg":"px"}`:e.replace(/(?<=^|[\s\+\-\*\/\(\,])(-?\d*\.?\d+)(?=$|[\s\+\-\*\/\)\,])/g,(r,i,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?r:`${r}px`)}processValue(t,e){let o=false;e.endsWith("!")&&(o=true,e=e.slice(0,-1));let r="";if(e.trim()=="full")r="100%";else if(e.trim()=="half")r="50%";else if(this.propMap[t]&&["xs","sm","md","lg","xl","xxl"].includes(e.trim())){let i=this.propMap[t],n={"border-radius":"radius","line-height":"lh","font-size":"text"};r=`var(--${i in n?n[i]:i}-${e.trim()})`;}else if(e.includes("[")||e.includes("]")){let i=this.transformBrackets(e),[n]=e.split("[");["rgba","rgb"].includes(n)?r=i:r=this.addUnitsSafely(t,i);}else e.includes(",")?r=e.split(",").map(i=>this.processValue(t,i.trim())).join(" "):/^-?\d*\.?\d+$/.test(e)?r=this.addUnitsSafely(t,e):core.isColor(e)?r=this.makeColor(e):e.startsWith("gradient")||e.startsWith("linear-gradient")||e.startsWith("radial-gradient")?r=this.parseGradient(e):r=e.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${r} !important`:r}addUnitsToComplexValue(t,e){if(["opacity","zIndex","flex","b","fontWeight","lineHeight","shrink","flex-shrink","flexShrink"].includes(t))return e;try{return String(e).replace(/(\d+)(?![%a-zA-Z!])/g,"$1px")}catch{return e}}makeColor(t){return t.charAt(0)=="#"&&(t=t.substring(1)),t.charAt(0)=="$"?`var(--${t.replace("$","")})`:/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(`#${t}`)||/^#([0-9A-F]{3}){1,2}$/i.test(`#${t}`)?`#${t}`:t.includes("rgb")||t.includes("rgba")?t.replace(/\[/g,"(").replace(/\]/g,")"):t.trim()}parseGradient(t){t.startsWith("gradient")&&(t=`linear-${t}`);let[e,o,r,i,...n]=t.split("-"),a=t,s=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,b)=>(c.push(this.makeColor(b)),c),[]).join(", ");switch(e){case "linear":a=`linear-gradient(${s}, ${l})`;break;case "radial":break;default:a=t;break}return a}generateHash(t,e=6){let o=5381;for(let i=0;i<t.length;i++)o=(o<<5)+o+t.charCodeAt(i);return (o>>>0&1048575).toString(36).padStart(e,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
4
4
  `)}getCache(){return this.cache}clearFileCache(t){this.fileMap.delete(t);}writeToDisk(t){let e=new Set;this.fileMap.forEach(i=>{i.forEach(n=>e.add(n));});let o=[];e.forEach(i=>{this.cache.has(i)&&o.push(this.cache.get(i));});let r=`/* Zuz Generated CSS */
5
5
 
6
6
  ${o.join(`
7
- `)}`;h__default.default.existsSync(path.dirname(t))||h__default.default.mkdirSync(path.dirname(t)),h__default.default.writeFileSync(t,r);}},X=new f;exports.a=u;exports.b=g;exports.c=x;exports.d=$;exports.e=L;exports.f=V;exports.g=W;exports.h=M;exports.i=X;
7
+ `)}`;h__default.default.existsSync(path.dirname(t))||h__default.default.mkdirSync(path.dirname(t)),h__default.default.writeFileSync(t,r);}},X=new f;exports.a=g;exports.b=u;exports.c=x;exports.d=$;exports.e=L;exports.f=V;exports.g=W;exports.h=M;exports.i=X;
@@ -1,4 +1,4 @@
1
- import {isColor}from'@zuzjs/core';import u from'fs';import S from'hashids';import {dirname}from'path';var g={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",radius:"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",shrink:"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 A=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"];var $={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 U=k.name,R=(p,t=[])=>{let e=["as",...t],o={...p};return Object.keys(o).map(r=>{r in g&&delete o[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete o.children,e.map(r=>r in o&&delete o[r]),o},W=p=>{let t=[],e="",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?(e.trim()&&t.push(e.trim()),e=""):e+=i;}return e.trim()&&t.push(e.trim()),t};var h=class{propMap=g;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 S(this.__SALT,5);}parseAndGenerate(t,e){let o=this.tokenize(t),r=[];this.fileMap.has(e)||this.fileMap.set(e,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(e).add(n);}return r}tokenize(t){let e=[],o=0,r=i=>{let n="",a=0;for(;o<t.length;){let s=t[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(e,n.trim(),i),n="";return}else (s===" "||s===`
1
+ import {isColor}from'@zuzjs/core';import u from'fs';import S from'hashids';import {dirname}from'path';var g={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",radius:"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",shrink:"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;","pe-none":"pointer-events:none;","pe-auto":"pointer-events:auto;","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 A=["translate","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY","perspective","matrix","matrix3d"];var $={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 U=k.name,R=(p,t=[])=>{let e=["as",...t],o={...p};return Object.keys(o).map(r=>{r in g&&delete o[r];}),"skeleton"in e&&e.skeleton.enabled==true&&delete o.children,e.map(r=>r in o&&delete o[r]),o},W=p=>{let t=[],e="",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?(e.trim()&&t.push(e.trim()),e=""):e+=i;}return e.trim()&&t.push(e.trim()),t};var h=class{propMap=g;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 S(this.__SALT,5);}parseAndGenerate(t,e){let o=this.tokenize(t),r=[];this.fileMap.has(e)||this.fileMap.set(e,new Set);for(let i of o){let n=this.generateAtomicClass(i);r.push(n),this.fileMap.get(e).add(n);}return r}tokenize(t){let e=[],o=0,r=i=>{let n="",a=0;for(;o<t.length;){let s=t[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(e,n.trim(),i),n="";return}else (s===" "||s===`
2
2
  `)&&a===0?(n.trim()&&this.pushToken(e,n.trim(),i),n=""):n+=s;o++;}n.trim()&&this.pushToken(e,n.trim(),i);};return r({}),e}pushToken(t,e,o){let r=e.trim();if(r.includes(":")){let i=r.indexOf(":"),n=r.slice(0,i).trim(),a=r.slice(i+1).trim();t.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[r]?t.push({prop:r,value:void 0,isCustom:false,...o}):t.push({prop:e.trim(),isCustom:true,...o});}generateAtomicClass(t){let{prop:e,value:o,pseudo:r,media:i,selector:n,isCustom:a}=t;if(a)return e;let s="";if(!o&&this.directMap[e])s=this.directMap[e];else {let d=this.propMap[e]||e;s=d.includes("__")?this.resolveComplexTemplate(e,o||"",d):`${d}: ${this.processValue(e,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)}`,m=`${`.${c}${r?`:${r}`:""}${n?` ${n}`:""}`} { ${s} }`;return i&&i.split(" ").forEach(d=>{d==="dark"?m=`[color-scheme="dark"] ${m}`:this.mediaQueries[d]&&(m=`@media ${this.mediaQueries[d]} { ${m} }`);}),this.cache.set(c,m),this.ruleTracker.set(l,c),c}resolveComplexTemplate(t,e,o){let r=e.split(this.delimeter),i=o;if(t==="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(t==="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(t,r[0]||""))}transformBrackets(t){return t.replace(/\[/g,"(").replace(/\]/g,")").replace(this.dollorToVarRegexp,"var(--$1)")}addUnitsSafely(t,e){return ["opacity","zIndex","flex","b","font-weight","fontWeight","lineHeight","scale","ratio","aspectRatio","aspect-ratio","shrink","flex-shrink","flexShrink"].includes(t)?e:/^-?\d*\.?\d+$/.test(e)?`${e}${t=="rotate"?"deg":"px"}`:e.replace(/(?<=^|[\s\+\-\*\/\(\,])(-?\d*\.?\d+)(?=$|[\s\+\-\*\/\)\,])/g,(r,i,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?r:`${r}px`)}processValue(t,e){let o=false;e.endsWith("!")&&(o=true,e=e.slice(0,-1));let r="";if(e.trim()=="full")r="100%";else if(e.trim()=="half")r="50%";else if(this.propMap[t]&&["xs","sm","md","lg","xl","xxl"].includes(e.trim())){let i=this.propMap[t],n={"border-radius":"radius","line-height":"lh","font-size":"text"};r=`var(--${i in n?n[i]:i}-${e.trim()})`;}else if(e.includes("[")||e.includes("]")){let i=this.transformBrackets(e),[n]=e.split("[");["rgba","rgb"].includes(n)?r=i:r=this.addUnitsSafely(t,i);}else e.includes(",")?r=e.split(",").map(i=>this.processValue(t,i.trim())).join(" "):/^-?\d*\.?\d+$/.test(e)?r=this.addUnitsSafely(t,e):isColor(e)?r=this.makeColor(e):e.startsWith("gradient")||e.startsWith("linear-gradient")||e.startsWith("radial-gradient")?r=this.parseGradient(e):r=e.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${r} !important`:r}addUnitsToComplexValue(t,e){if(["opacity","zIndex","flex","b","fontWeight","lineHeight","shrink","flex-shrink","flexShrink"].includes(t))return e;try{return String(e).replace(/(\d+)(?![%a-zA-Z!])/g,"$1px")}catch{return e}}makeColor(t){return t.charAt(0)=="#"&&(t=t.substring(1)),t.charAt(0)=="$"?`var(--${t.replace("$","")})`:/^#[0-9A-F]{6}[0-9a-f]{0,2}$/i.test(`#${t}`)||/^#([0-9A-F]{3}){1,2}$/i.test(`#${t}`)?`#${t}`:t.includes("rgb")||t.includes("rgba")?t.replace(/\[/g,"(").replace(/\]/g,")"):t.trim()}parseGradient(t){t.startsWith("gradient")&&(t=`linear-${t}`);let[e,o,r,i,...n]=t.split("-"),a=t,s=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,f)=>(c.push(this.makeColor(f)),c),[]).join(", ");switch(e){case "linear":a=`linear-gradient(${s}, ${l})`;break;case "radial":break;default:a=t;break}return a}generateHash(t,e=6){let o=5381;for(let i=0;i<t.length;i++)o=(o<<5)+o+t.charCodeAt(i);return (o>>>0&1048575).toString(36).padStart(e,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
3
3
  `)}getCache(){return this.cache}clearFileCache(t){this.fileMap.delete(t);}writeToDisk(t){let e=new Set;this.fileMap.forEach(i=>{i.forEach(n=>e.add(n));});let o=[];e.forEach(i=>{this.cache.has(i)&&o.push(this.cache.get(i));});let r=`/* Zuz Generated CSS */
4
4