@zuzjs/ui 1.0.0 → 1.0.1

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,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';var chunk7SIIMFAD_cjs=require('./chunk-7SIIMFAD.cjs'),commander=require('commander'),k=require('chokidar'),p=require('path'),c=require('picocolors'),d=require('fs'),tsMorph=require('ts-morph');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var k__default=/*#__PURE__*/_interopDefault(k);var p__default=/*#__PURE__*/_interopDefault(p);var c__default=/*#__PURE__*/_interopDefault(c);var d__default=/*#__PURE__*/_interopDefault(d);/* ZuzJS UI CLI */
3
- var x=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(t,e=""){if(t.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=t.getExpression();s&&this.extractStyles(s,e);return}if(t.asKind(tsMorph.SyntaxKind.StringLiteral)||t.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||t.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(e+t.getLiteralValue().toString());else if(t.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=t.getHead().getLiteralText();t.getTemplateSpans().forEach(n=>{this.extractStyles(n.getExpression(),e+s);});}else t.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(t.getWhenTrue(),e),this.extractStyles(t.getWhenFalse(),e)):t.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?t.getElements().forEach(s=>this.extractStyles(s,e)):t.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(t.getLeft(),e),this.extractStyles(t.getRight(),e));}splitAtoms(t){let e=[],s="",n=0;for(let a=0;a<t.length;a++){let i=t[a];(i==="["||i==="(")&&n++,(i==="]"||i===")")&&n--,/\s/.test(i)&&n===0?(s.trim()&&e.push(s.trim()),s=""):s+=i;}return s.trim()&&e.push(s.trim()),e}processFile(t){this.stylesToGenerate.clear();let e=t.endsWith(".mdx")||t.endsWith(".md"),s;if(e){let i=d__default.default.readFileSync(t,"utf-8");s=this.project.createSourceFile(t,i,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(t),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let y=i.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();y&&this.extractStyles(y);}),s.getDescendantsOfKind(tsMorph.SyntaxKind.CallExpression).filter(i=>i.getExpression().getText()==="css").forEach(i=>{let l=i.getArguments();l.length>0&&this.extractStyles(l[0]);}),this.stylesToGenerate.forEach(i=>{this.splitAtoms(i).filter(Boolean).forEach(y=>{let z=chunk7SIIMFAD_cjs.f.parseAndGenerate(y,t);z.length>0&&(this.manifest[y]=z.join(" "));});}),e&&this.project.removeSourceFile(s);}isSupportedFile(t){return this.supportedExtensions.some(e=>t.endsWith(e))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let t=process.cwd(),e=[p__default.default.join(t,"src/app/css"),p__default.default.join(t,"app/css"),p__default.default.join(t,"src/css"),p__default.default.join(t,"css")],s=e.find(n=>d__default.default.existsSync(n))||e[0];return d__default.default.existsSync(s)||d__default.default.mkdirSync(s,{recursive:true}),p__default.default.join(s,"zuzmap.ts")};saveManifest(t){let e=p__default.default.dirname(t);d__default.default.existsSync(e)||d__default.default.mkdirSync(e,{recursive:true});let s=chunk7SIIMFAD_cjs.f.getCache(),n={};for(let[i,l]of Object.entries(this.manifest))s.has(l)&&(n[i]=l);this.manifest=n;let a=`/* Zuz Generated Manifest - Do not edit */
4
- export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;d__default.default.writeFileSync(t,a);}},m=new x;commander.program.opts();var h=process.cwd(),v=false,E=p__default.default.join(h,"src","app","css"),O=p__default.default.join(E,"zuz.scss"),$=p__default.default.join(E,"zuzmap.ts"),F=()=>{chunk7SIIMFAD_cjs.f.writeToDisk(O),m.saveManifest($);};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p__default.default.join(h,".vscode"),t=p__default.default.join(o,"zuz.code-snippets"),e=p__default.default.join(o,"settings.json"),s=Object.keys(chunk7SIIMFAD_cjs.a).join(","),n=Object.keys(chunk7SIIMFAD_cjs.b).join(","),a={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${n}|}$0"`],description:"Zuz Direct Shortcut"}},i={};if(d__default.default.existsSync(e))try{i=JSON.parse(d__default.default.readFileSync(e,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},d__default.default.existsSync(o)||d__default.default.mkdirSync(o,{recursive:true}),d__default.default.writeFileSync(t,JSON.stringify(a,null,2)),d__default.default.writeFileSync(e,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 o=k__default.default.watch(".",{cwd:h,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",t=>{m.isSupportedFile(t)&&m.processFile(p__default.default.resolve(h,t)),v&&console.log(c__default.default.gray(`\u25CB File added: ${t}`));}),o.on("change",t=>{if(m.isSupportedFile(t)){console.log(c__default.default.gray(`\u25CB File changed: ${t}`));let e=p__default.default.resolve(h,t);chunk7SIIMFAD_cjs.f.clearFileCache(e),m.processFile(e),F(),console.log(c__default.default.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{v=true,F(),console.log(c__default.default.green(`
5
- \u2713 Initial Build Complete.`)),console.log(c__default.default.cyan(`\u25CB Watching: ${p.basename(h)}
6
- `));}),o.on("error",t=>console.error(c__default.default.red(`Watcher Error: ${t}`)));});commander.program.parse(process.argv);
2
+ 'use strict';var chunkXJAW5JFY_cjs=require('./chunk-XJAW5JFY.cjs'),commander=require('commander'),K=require('chokidar'),l=require('path'),c=require('picocolors'),p=require('fs'),tsMorph=require('ts-morph');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var K__default=/*#__PURE__*/_interopDefault(K);var l__default=/*#__PURE__*/_interopDefault(l);var c__default=/*#__PURE__*/_interopDefault(c);var p__default=/*#__PURE__*/_interopDefault(p);/* ZuzJS UI CLI */
3
+ var x=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(t,e=""){if(t.asKind(tsMorph.SyntaxKind.JsxExpression)){let s=t.getExpression();s&&this.extractStyles(s,e);return}if(t.asKind(tsMorph.SyntaxKind.StringLiteral)||t.asKind(tsMorph.SyntaxKind.NoSubstitutionTemplateLiteral)||t.asKind(tsMorph.SyntaxKind.NumericLiteral))this.stylesToGenerate.add(e+t.getLiteralValue().toString());else if(t.asKind(tsMorph.SyntaxKind.TemplateExpression)){let s=t.getHead().getLiteralText();t.getTemplateSpans().forEach(o=>{this.extractStyles(o.getExpression(),e+s);});}else t.asKind(tsMorph.SyntaxKind.ConditionalExpression)?(this.extractStyles(t.getWhenTrue(),e),this.extractStyles(t.getWhenFalse(),e)):t.asKind(tsMorph.SyntaxKind.ArrayLiteralExpression)?t.getElements().forEach(s=>this.extractStyles(s,e)):t.asKind(tsMorph.SyntaxKind.BinaryExpression)&&(this.extractStyles(t.getLeft(),e),this.extractStyles(t.getRight(),e));}processFile(t){this.stylesToGenerate.clear();let e=t.endsWith(".mdx")||t.endsWith(".md"),s;if(e){let i=p__default.default.readFileSync(t,"utf-8");s=this.project.createSourceFile(t,i,{overwrite:true,scriptKind:tsMorph.ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(t),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(tsMorph.SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let y=i.getAttribute("as")?.asKind(tsMorph.SyntaxKind.JsxAttribute)?.getInitializer();y&&this.extractStyles(y);}),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=>{chunkXJAW5JFY_cjs.h(i).filter(Boolean).forEach(y=>{let z=chunkXJAW5JFY_cjs.i.parseAndGenerate(y,t);z.length>0&&(this.manifest[y]=z.join(" "));});}),e&&this.project.removeSourceFile(s);}isSupportedFile(t){return this.supportedExtensions.some(e=>t.endsWith(e))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let t=process.cwd(),e=[l__default.default.join(t,"src/app/css"),l__default.default.join(t,"app/css"),l__default.default.join(t,"src/css"),l__default.default.join(t,"css")],s=e.find(o=>p__default.default.existsSync(o))||e[0];return p__default.default.existsSync(s)||p__default.default.mkdirSync(s,{recursive:true}),l__default.default.join(s,"zuzmap.ts")};saveManifest(t){let e=l__default.default.dirname(t);p__default.default.existsSync(e)||p__default.default.mkdirSync(e,{recursive:true});let s=chunkXJAW5JFY_cjs.i.getCache(),o={};for(let[i,a]of Object.entries(this.manifest))s.has(a)&&(o[i]=a);this.manifest=o;let h=`/* Zuz Generated Manifest - Do not edit */
4
+ export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;p__default.default.writeFileSync(t,h);}},g=new x;commander.program.opts();var f=process.cwd(),F=false,w=l__default.default.join(f,"src","app","css"),$=l__default.default.join(w,"zuz.scss"),G=l__default.default.join(w,"zuzmap.ts"),E=()=>{chunkXJAW5JFY_cjs.i.writeToDisk($),g.saveManifest(G);};commander.program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let r=l__default.default.join(f,".vscode"),t=l__default.default.join(r,"zuz.code-snippets"),e=l__default.default.join(r,"settings.json"),s=Object.keys(chunkXJAW5JFY_cjs.a).join(","),o=Object.keys(chunkXJAW5JFY_cjs.b).join(","),h={"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(p__default.default.existsSync(e))try{i=JSON.parse(p__default.default.readFileSync(e,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},p__default.default.existsSync(r)||p__default.default.mkdirSync(r,{recursive:true}),p__default.default.writeFileSync(t,JSON.stringify(h,null,2)),p__default.default.writeFileSync(e,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=K__default.default.watch(".",{cwd:f,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});r.on("add",t=>{g.isSupportedFile(t)&&g.processFile(l__default.default.resolve(f,t)),F&&console.log(c__default.default.gray(`\u25CB File added: ${t}`));}),r.on("change",t=>{if(g.isSupportedFile(t)){console.log(c__default.default.gray(`\u25CB File changed: ${t}`));let e=l__default.default.resolve(f,t);chunkXJAW5JFY_cjs.i.clearFileCache(e),g.processFile(e),E(),console.log(c__default.default.blue("\u26A1 Zuz CSS updated."));}}),r.on("ready",()=>{F=true,E(),console.log(c__default.default.green(`
5
+ \u2713 Initial Build Complete.`)),console.log(c__default.default.cyan(`\u25CB Watching: ${l.basename(f)}
6
+ `));}),r.on("error",t=>console.error(c__default.default.red(`Watcher Error: ${t}`)));});commander.program.parse(process.argv);
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import {a,b,f}from'./chunk-52G34HGX.js';import {program}from'commander';import K from'chokidar';import p,{basename}from'path';import c from'picocolors';import d from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';var x=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(t,e=""){if(t.asKind(SyntaxKind.JsxExpression)){let s=t.getExpression();s&&this.extractStyles(s,e);return}if(t.asKind(SyntaxKind.StringLiteral)||t.asKind(SyntaxKind.NoSubstitutionTemplateLiteral)||t.asKind(SyntaxKind.NumericLiteral))this.stylesToGenerate.add(e+t.getLiteralValue().toString());else if(t.asKind(SyntaxKind.TemplateExpression)){let s=t.getHead().getLiteralText();t.getTemplateSpans().forEach(n=>{this.extractStyles(n.getExpression(),e+s);});}else t.asKind(SyntaxKind.ConditionalExpression)?(this.extractStyles(t.getWhenTrue(),e),this.extractStyles(t.getWhenFalse(),e)):t.asKind(SyntaxKind.ArrayLiteralExpression)?t.getElements().forEach(s=>this.extractStyles(s,e)):t.asKind(SyntaxKind.BinaryExpression)&&(this.extractStyles(t.getLeft(),e),this.extractStyles(t.getRight(),e));}splitAtoms(t){let e=[],s="",n=0;for(let a=0;a<t.length;a++){let i=t[a];(i==="["||i==="(")&&n++,(i==="]"||i===")")&&n--,/\s/.test(i)&&n===0?(s.trim()&&e.push(s.trim()),s=""):s+=i;}return s.trim()&&e.push(s.trim()),e}processFile(t){this.stylesToGenerate.clear();let e=t.endsWith(".mdx")||t.endsWith(".md"),s;if(e){let i=d.readFileSync(t,"utf-8");s=this.project.createSourceFile(t,i,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(t),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let y=i.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();y&&this.extractStyles(y);}),s.getDescendantsOfKind(SyntaxKind.CallExpression).filter(i=>i.getExpression().getText()==="css").forEach(i=>{let l=i.getArguments();l.length>0&&this.extractStyles(l[0]);}),this.stylesToGenerate.forEach(i=>{this.splitAtoms(i).filter(Boolean).forEach(y=>{let z=f.parseAndGenerate(y,t);z.length>0&&(this.manifest[y]=z.join(" "));});}),e&&this.project.removeSourceFile(s);}isSupportedFile(t){return this.supportedExtensions.some(e=>t.endsWith(e))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let t=process.cwd(),e=[p.join(t,"src/app/css"),p.join(t,"app/css"),p.join(t,"src/css"),p.join(t,"css")],s=e.find(n=>d.existsSync(n))||e[0];return d.existsSync(s)||d.mkdirSync(s,{recursive:true}),p.join(s,"zuzmap.ts")};saveManifest(t){let e=p.dirname(t);d.existsSync(e)||d.mkdirSync(e,{recursive:true});let s=f.getCache(),n={};for(let[i,l]of Object.entries(this.manifest))s.has(l)&&(n[i]=l);this.manifest=n;let a=`/* Zuz Generated Manifest - Do not edit */
3
- export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;d.writeFileSync(t,a);}},m=new x;program.opts();var h=process.cwd(),v=false,E=p.join(h,"src","app","css"),$=p.join(E,"zuz.scss"),A=p.join(E,"zuzmap.ts"),F=()=>{f.writeToDisk($),m.saveManifest(A);};program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let o=p.join(h,".vscode"),t=p.join(o,"zuz.code-snippets"),e=p.join(o,"settings.json"),s=Object.keys(a).join(","),n=Object.keys(b).join(","),a$1={"Zuz Property":{prefix:"zp",body:[`as="\${1|${s}|}:$0"`],description:"Zuz Property (adds colon)"},"Zuz Shortcut":{prefix:"zs",body:[`as="\${1|${n}|}$0"`],description:"Zuz Direct Shortcut"}},i={};if(d.existsSync(e))try{i=JSON.parse(d.readFileSync(e,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},d.existsSync(o)||d.mkdirSync(o,{recursive:true}),d.writeFileSync(t,JSON.stringify(a$1,null,2)),d.writeFileSync(e,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 o=K.watch(".",{cwd:h,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});o.on("add",t=>{m.isSupportedFile(t)&&m.processFile(p.resolve(h,t)),v&&console.log(c.gray(`\u25CB File added: ${t}`));}),o.on("change",t=>{if(m.isSupportedFile(t)){console.log(c.gray(`\u25CB File changed: ${t}`));let e=p.resolve(h,t);f.clearFileCache(e),m.processFile(e),F(),console.log(c.blue("\u26A1 Zuz CSS updated."));}}),o.on("ready",()=>{v=true,F(),console.log(c.green(`
4
- \u2713 Initial Build Complete.`)),console.log(c.cyan(`\u25CB Watching: ${basename(h)}
5
- `));}),o.on("error",t=>console.error(c.red(`Watcher Error: ${t}`)));});program.parse(process.argv);
2
+ import {a,b,i,h}from'./chunk-ZO3T3N4K.js';import {program}from'commander';import O from'chokidar';import l,{basename}from'path';import c from'picocolors';import p from'fs';import {Project,SyntaxKind,ScriptKind}from'ts-morph';var x=class{project;stylesToGenerate;manifest={};supportedExtensions=[".tsx",".jsx",".mdx",".md"];constructor(){this.project=new Project({compilerOptions:{allowJs:true,jsx:1}}),this.stylesToGenerate=new Set;}extractStyles(t,e=""){if(t.asKind(SyntaxKind.JsxExpression)){let s=t.getExpression();s&&this.extractStyles(s,e);return}if(t.asKind(SyntaxKind.StringLiteral)||t.asKind(SyntaxKind.NoSubstitutionTemplateLiteral)||t.asKind(SyntaxKind.NumericLiteral))this.stylesToGenerate.add(e+t.getLiteralValue().toString());else if(t.asKind(SyntaxKind.TemplateExpression)){let s=t.getHead().getLiteralText();t.getTemplateSpans().forEach(o=>{this.extractStyles(o.getExpression(),e+s);});}else t.asKind(SyntaxKind.ConditionalExpression)?(this.extractStyles(t.getWhenTrue(),e),this.extractStyles(t.getWhenFalse(),e)):t.asKind(SyntaxKind.ArrayLiteralExpression)?t.getElements().forEach(s=>this.extractStyles(s,e)):t.asKind(SyntaxKind.BinaryExpression)&&(this.extractStyles(t.getLeft(),e),this.extractStyles(t.getRight(),e));}processFile(t){this.stylesToGenerate.clear();let e=t.endsWith(".mdx")||t.endsWith(".md"),s;if(e){let i=p.readFileSync(t,"utf-8");s=this.project.createSourceFile(t,i,{overwrite:true,scriptKind:ScriptKind.TSX});}else s=this.project.addSourceFileAtPath(t),s.refreshFromFileSystemSync();[...s.getDescendantsOfKind(SyntaxKind.JsxOpeningElement),...s.getDescendantsOfKind(SyntaxKind.JsxSelfClosingElement)].forEach(i=>{let y=i.getAttribute("as")?.asKind(SyntaxKind.JsxAttribute)?.getInitializer();y&&this.extractStyles(y);}),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(i$1).filter(Boolean).forEach(y=>{let z=i.parseAndGenerate(y,t);z.length>0&&(this.manifest[y]=z.join(" "));});}),e&&this.project.removeSourceFile(s);}isSupportedFile(t){return this.supportedExtensions.some(e=>t.endsWith(e))}getStyleCount(){return this.stylesToGenerate.size}getManifestPath=()=>{let t=process.cwd(),e=[l.join(t,"src/app/css"),l.join(t,"app/css"),l.join(t,"src/css"),l.join(t,"css")],s=e.find(o=>p.existsSync(o))||e[0];return p.existsSync(s)||p.mkdirSync(s,{recursive:true}),l.join(s,"zuzmap.ts")};saveManifest(t){let e=l.dirname(t);p.existsSync(e)||p.mkdirSync(e,{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 h=`/* Zuz Generated Manifest - Do not edit */
3
+ export const zuzMap: Record<string, string> = ${JSON.stringify(this.manifest,null,2)};`;p.writeFileSync(t,h);}},g=new x;program.opts();var f=process.cwd(),F=false,w=l.join(f,"src","app","css"),G=l.join(w,"zuz.scss"),J=l.join(w,"zuzmap.ts"),E=()=>{i.writeToDisk(G),g.saveManifest(J);};program.command("init").description("Initialize Zuz snippets and configuration").action(()=>{let r=l.join(f,".vscode"),t=l.join(r,"zuz.code-snippets"),e=l.join(r,"settings.json"),s=Object.keys(a).join(","),o=Object.keys(b).join(","),h={"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(p.existsSync(e))try{i=JSON.parse(p.readFileSync(e,"utf-8"));}catch{i={};}i["editor.suggest.snippetsPreventQuickSuggestions"]=false,i["editor.quickSuggestions"]={...typeof i["editor.quickSuggestions"]=="object"?i["editor.quickSuggestions"]:{},strings:true},p.existsSync(r)||p.mkdirSync(r,{recursive:true}),p.writeFileSync(t,JSON.stringify(h,null,2)),p.writeFileSync(e,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=O.watch(".",{cwd:f,ignored:[/node_modules/,/dist/,/\.next/,/\.git/],persistent:true,usePolling:true,followSymlinks:false,ignoreInitial:false});r.on("add",t=>{g.isSupportedFile(t)&&g.processFile(l.resolve(f,t)),F&&console.log(c.gray(`\u25CB File added: ${t}`));}),r.on("change",t=>{if(g.isSupportedFile(t)){console.log(c.gray(`\u25CB File changed: ${t}`));let e=l.resolve(f,t);i.clearFileCache(e),g.processFile(e),E(),console.log(c.blue("\u26A1 Zuz CSS updated."));}}),r.on("ready",()=>{F=true,E(),console.log(c.green(`
4
+ \u2713 Initial Build Complete.`)),console.log(c.cyan(`\u25CB Watching: ${basename(f)}
5
+ `));}),r.on("error",t=>console.error(c.red(`Watcher Error: ${t}`)));});program.parse(process.argv);
@@ -1,7 +1,7 @@
1
- 'use strict';var y=require('hashids'),g=require('fs'),path=require('path'),core=require('@zuzjs/core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var y__default=/*#__PURE__*/_interopDefault(y);var g__default=/*#__PURE__*/_interopDefault(g);/* ZuzJS UI CLI */
2
- var h={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__;"},f={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;"},b=["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"],x={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"],v={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 m=class{propMap=h;directMap=f;colorProps=new Set(b);animationCurves=x;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 y__default.default(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),i=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let r of o){let n=this.generateAtomicClass(r);i.push(n),this.fileMap.get(t).add(n);}return i}tokenize(e){let t=[],o=0,i=r=>{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={...r};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=r.selector?`${r.selector} ${l}`:l,n="",o++,i(c);}else if(s===")"&&a===0){n.trim()&&this.pushToken(t,n.trim(),r),n="";return}else (s===" "||s===`
3
- `)&&a===0?(n.trim()&&this.pushToken(t,n.trim(),r),n=""):n+=s;o++;}n.trim()&&this.pushToken(t,n.trim(),r);};return i({}),t}pushToken(e,t,o){let i=t.trim();if(i.includes(":")){let r=i.indexOf(":"),n=i.slice(0,r).trim(),a=i.slice(r+1).trim();e.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[i]?e.push({prop:i,value:void 0,isCustom:false,...o}):e.push({prop:t.trim(),isCustom:true,...o});}generateAtomicClass(e){let{prop:t,value:o,pseudo:i,media:r,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}|${i||""}|${r||""}|${n||""}`;if(this.ruleTracker.has(l))return this.ruleTracker.get(l);let c=`z${l.charAt(0)}${this.generateHash(l)}`,p=`${`.${c}${i?`:${i}`:""}${n?` ${n}`:""}`} { ${s} }`;return r&&r.split(" ").forEach(d=>{d==="dark"?p=`[color-scheme="dark"] ${p}`:this.mediaQueries[d]&&(p=`@media ${this.mediaQueries[d]} { ${p} }`);}),this.cache.set(c,p),this.ruleTracker.set(l,c),c}resolveComplexTemplate(e,t,o){let i=t.split(this.delimeter),r=o;if(e==="anim"){let[n,a,s]=i;r=r.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]=i;r=r.replace("__X__",n||"0").replace("__Y__",a||"0").replace("__Z__",s||"0").replace("__A__",l?isNaN(Number(l))?l:`${l}deg`:"0deg");}return r.replace(/__VALUE__/g,this.processValue(e,i[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,(i,r,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?i:`${i}px`)}processValue(e,t){let o=false;t.endsWith("!")&&(o=true,t=t.slice(0,-1));let i="";if(t.trim()=="full")i="100%";else if(t.includes("[")||t.includes("]")){let r=this.transformBrackets(t);i=this.addUnitsSafely(e,r);}else t.includes(",")?i=t.split(",").map(r=>this.processValue(e,r.trim())).join(" "):/^-?\d*\.?\d+$/.test(t)?i=this.addUnitsSafely(e,t):core.isColor(t)?i=this.makeColor(t):t.startsWith("gradient")||t.startsWith("linear-gradient")||t.startsWith("radial-gradient")?i=this.parseGradient(t):i=t.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${i} !important`:i}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,i,r,...n]=e.split("-"),a=e,s=/^[+-]?\d+(\.\d+)?$/.test(r)?`${r}deg`:`to ${r}`,l=n.reduce((c,u)=>(c.push(this.makeColor(u)),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 r=0;r<e.length;r++)o=(o<<5)+o+e.charCodeAt(r);return (o>>>0&1048575).toString(36).padStart(t,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
4
- `)}getCache(){return this.cache}clearFileCache(e){this.fileMap.delete(e);}writeToDisk(e){let t=new Set;this.fileMap.forEach(r=>{r.forEach(n=>t.add(n));});let o=[];t.forEach(r=>{this.cache.has(r)&&o.push(this.cache.get(r));});let i=`/* Zuz Generated CSS */
1
+ 'use strict';var z=require('hashids'),u=require('fs'),path=require('path'),core=require('@zuzjs/core');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var z__default=/*#__PURE__*/_interopDefault(z);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%;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
+ `)&&s===0?(n.trim()&&this.pushToken(t,n.trim(),i),n=""):n+=a;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(),s=r.slice(i+1).trim();e.push({prop:n.trim(),value:s.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:s}=e;if(s)return t;let a="";if(!o&&this.directMap[t])a=this.directMap[t];else {let d=this.propMap[t]||t;a=d.includes("__")?this.resolveComplexTemplate(t,o||"",d):`${d}: ${this.processValue(t,o||"")};`;}let l=`${a}|${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}`:""}`} { ${a} }`;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,s,a]=r;i=i.replace("__VALUE__",this.processValue("transitionDuration",n||"0s")).replace("__CURVE__",this.animationCurves[s]||"ease-in-out").replace("__DELAY__",this.processValue("transitionDelay",a||"0s"));}else if(e==="rotate3d"){let[n,s,a,l]=r;i=i.replace("__X__",n||"0").replace("__Y__",s||"0").replace("__Z__",a||"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,s)=>s.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("-"),s=e,a=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,f)=>(c.push(this.makeColor(f)),c),[]).join(", ");switch(t){case "linear":s=`linear-gradient(${a}, ${l})`;break;case "radial":break;default:s=e;break}return s}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
+ `)}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
- `)}`;g__default.default.existsSync(path.dirname(e))||g__default.default.mkdirSync(path.dirname(e)),g__default.default.writeFileSync(e,i);}},W=new m;exports.a=h;exports.b=f;exports.c=A;exports.d=S;exports.e=v;exports.f=W;
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=S;exports.d=v;exports.e=L;exports.f=U;exports.g=R;exports.h=W;exports.i=Z;
@@ -1,6 +1,6 @@
1
- import k from'hashids';import g from'fs';import {dirname}from'path';import {isColor}from'@zuzjs/core';var h={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__;"},f={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;"},b=["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"],x={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"],$={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 m=class{propMap=h;directMap=f;colorProps=new Set(b);animationCurves=x;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 k(this.__SALT,5);}parseAndGenerate(e,t){let o=this.tokenize(e),i=[];this.fileMap.has(t)||this.fileMap.set(t,new Set);for(let r of o){let n=this.generateAtomicClass(r);i.push(n),this.fileMap.get(t).add(n);}return i}tokenize(e){let t=[],o=0,i=r=>{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={...r};l.startsWith("&")?c.pseudo=l.replace("&",""):l.startsWith("@")?c.media=l.replace("@",""):c.selector=r.selector?`${r.selector} ${l}`:l,n="",o++,i(c);}else if(s===")"&&a===0){n.trim()&&this.pushToken(t,n.trim(),r),n="";return}else (s===" "||s===`
2
- `)&&a===0?(n.trim()&&this.pushToken(t,n.trim(),r),n=""):n+=s;o++;}n.trim()&&this.pushToken(t,n.trim(),r);};return i({}),t}pushToken(e,t,o){let i=t.trim();if(i.includes(":")){let r=i.indexOf(":"),n=i.slice(0,r).trim(),a=i.slice(r+1).trim();e.push({prop:n.trim(),value:a.trim(),...o});}else this.directMap[i]?e.push({prop:i,value:void 0,isCustom:false,...o}):e.push({prop:t.trim(),isCustom:true,...o});}generateAtomicClass(e){let{prop:t,value:o,pseudo:i,media:r,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}|${i||""}|${r||""}|${n||""}`;if(this.ruleTracker.has(l))return this.ruleTracker.get(l);let c=`z${l.charAt(0)}${this.generateHash(l)}`,p=`${`.${c}${i?`:${i}`:""}${n?` ${n}`:""}`} { ${s} }`;return r&&r.split(" ").forEach(d=>{d==="dark"?p=`[color-scheme="dark"] ${p}`:this.mediaQueries[d]&&(p=`@media ${this.mediaQueries[d]} { ${p} }`);}),this.cache.set(c,p),this.ruleTracker.set(l,c),c}resolveComplexTemplate(e,t,o){let i=t.split(this.delimeter),r=o;if(e==="anim"){let[n,a,s]=i;r=r.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]=i;r=r.replace("__X__",n||"0").replace("__Y__",a||"0").replace("__Z__",s||"0").replace("__A__",l?isNaN(Number(l))?l:`${l}deg`:"0deg");}return r.replace(/__VALUE__/g,this.processValue(e,i[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,(i,r,n,a)=>a.substring(0,n).trim().endsWith("repeat(")?i:`${i}px`)}processValue(e,t){let o=false;t.endsWith("!")&&(o=true,t=t.slice(0,-1));let i="";if(t.trim()=="full")i="100%";else if(t.includes("[")||t.includes("]")){let r=this.transformBrackets(t);i=this.addUnitsSafely(e,r);}else t.includes(",")?i=t.split(",").map(r=>this.processValue(e,r.trim())).join(" "):/^-?\d*\.?\d+$/.test(t)?i=this.addUnitsSafely(e,t):isColor(t)?i=this.makeColor(t):t.startsWith("gradient")||t.startsWith("linear-gradient")||t.startsWith("radial-gradient")?i=this.parseGradient(t):i=t.replace(this.dollorToVarRegexp,"var(--$1)");return o?`${i} !important`:i}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,i,r,...n]=e.split("-"),a=e,s=/^[+-]?\d+(\.\d+)?$/.test(r)?`${r}deg`:`to ${r}`,l=n.reduce((c,u)=>(c.push(this.makeColor(u)),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 r=0;r<e.length;r++)o=(o<<5)+o+e.charCodeAt(r);return (o>>>0&1048575).toString(36).padStart(t,"0")}getStyleSheet(){return Array.from(this.cache.values()).join(`
3
- `)}getCache(){return this.cache}clearFileCache(e){this.fileMap.delete(e);}writeToDisk(e){let t=new Set;this.fileMap.forEach(r=>{r.forEach(n=>t.add(n));});let o=[];t.forEach(r=>{this.cache.has(r)&&o.push(this.cache.get(r));});let i=`/* Zuz Generated CSS */
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
+ `)&&s===0?(n.trim()&&this.pushToken(t,n.trim(),i),n=""):n+=a;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(),s=r.slice(i+1).trim();e.push({prop:n.trim(),value:s.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:s}=e;if(s)return t;let a="";if(!o&&this.directMap[t])a=this.directMap[t];else {let d=this.propMap[t]||t;a=d.includes("__")?this.resolveComplexTemplate(t,o||"",d):`${d}: ${this.processValue(t,o||"")};`;}let l=`${a}|${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}`:""}`} { ${a} }`;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,s,a]=r;i=i.replace("__VALUE__",this.processValue("transitionDuration",n||"0s")).replace("__CURVE__",this.animationCurves[s]||"ease-in-out").replace("__DELAY__",this.processValue("transitionDelay",a||"0s"));}else if(e==="rotate3d"){let[n,s,a,l]=r;i=i.replace("__X__",n||"0").replace("__Y__",s||"0").replace("__Z__",a||"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,s)=>s.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("-"),s=e,a=/^[+-]?\d+(\.\d+)?$/.test(i)?`${i}deg`:`to ${i}`,l=n.reduce((c,f)=>(c.push(this.makeColor(f)),c),[]).join(", ");switch(t){case "linear":s=`linear-gradient(${a}, ${l})`;break;case "radial":break;default:s=e;break}return s}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
+ `)}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
- `)}`;g.existsSync(dirname(e))||g.mkdirSync(dirname(e)),g.writeFileSync(e,i);}},z=new m;export{h as a,f as b,S as c,v as d,$ as e,z as f};
6
+ `)}`;u.existsSync(dirname(e))||u.mkdirSync(dirname(e)),u.writeFileSync(e,r);}},Y=new h;export{m as a,_ as b,v as c,L as d,$ as e,R as f,W as g,M as h,Y as i};