@salty-css/webpack 0.0.1-alpha.232 → 0.0.1-alpha.234

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.
@@ -0,0 +1,42 @@
1
+ "use strict";var Vt=Object.defineProperty;var Mt=(e,t,s)=>t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var st=(e,t,s)=>Mt(e,typeof t!="symbol"?t+"":t,s);const vt=require("esbuild"),Rt=require("child_process"),c=require("path"),f=require("fs"),bt=require("fs/promises"),Q=require("winston"),lt=require("typescript");var ft=typeof document<"u"?document.currentScript:null;function zt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,n.get?n:{enumerable:!0,get:()=>e[s]})}}return t.default=e,Object.freeze(t)}const St=zt(vt),wt=e=>String.fromCharCode(e+(e>25?39:97)),At=(e,t)=>{let s="",n;for(n=Math.abs(e);n>52;n=n/52|0)s=wt(n%52)+s;return s=wt(n%52)+s,s.length<t?s=s.padStart(t,"a"):s.length>t&&(s=s.slice(-t)),s},Jt=(e,t)=>{let s=t.length;for(;s;)e=e*33^t.charCodeAt(--s);return e},J=(e,t=5)=>{const s=Jt(5381,JSON.stringify(e))>>>0;return At(s,t)};function R(e){return e?typeof e!="string"?R(String(e)):e.replace(/[\s.]/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(t,s)=>(s>0?"-":"")+t.toLowerCase()):""}const Wt=e=>t=>{if(typeof t!="string"||!e)return;let s=t;const n=[];return Object.values(e).forEach(o=>{const{pattern:i,transform:r}=o;s=s.replace(i,y=>{const{value:g,css:h}=r(y);return h&&n.push(h),g})}),{transformed:s,additionalCss:n}},jt=e=>t=>typeof t!="string"||!/\{[^{}]+\}/g.test(t)?void 0:{transformed:t.replace(/\{([^{}]+)\}/g,(...o)=>`var(--${R(o[1].replaceAll(".","-"))})`)},qt=jt(),It=["top","right","bottom","left","min-width",/.*width.*/,/^[^line]*height.*/,/padding.*/,/margin.*/,/border.*/,/inset.*/,/.*radius.*/,/.*spacing.*/,/.*gap.*/,/.*indent.*/,/.*offset.*/,/.*size.*/,/.*thickness.*/,/.*font-size.*/],Zt=(e,t,s)=>It.some(o=>typeof o=="string"?o===e:o.test(e))?`${t}px`:`${t}`,Lt=["Webkit","Moz","ms","O"],Ht=e=>e.startsWith("-")?e:Lt.some(t=>e.startsWith(t))?`-${R(e)}`:R(e),nt=async(e,t="",s,n=!1)=>{if(!e)throw new Error("No styles provided to parseStyles function!");const o=new Set,i=Object.entries(e),r=async([d,p])=>{const b=d.trim(),P=Ht(b),x=(M,k=";")=>`${P}:${M}${k}`,O={scope:t,config:s};if(typeof p=="function")return r([d,p(O)]);if(p instanceof Promise)return r([d,await p]);if(typeof p=="object"){if(!p)return;if(p.isColor)return x(p.toString());if(b==="defaultVariants")return;if(b==="variants"){const D=Object.entries(p);for(const[a,$]of D){if(!$)return;const C=Object.entries($);for(const[l,j]of C){if(!j)return;const N=`${t}.${a}-${l}`;(await nt(j,N,s)).forEach(A=>o.add(A))}}return}if(b==="compoundVariants"){for(const D of p){const{css:a,...$}=D,C=Object.entries($).reduce((j,[N,E])=>`${j}.${N}-${E}`,t);(await nt(a,C,s)).forEach(j=>o.add(j))}return}if(b.startsWith("@")){const D=b,a=await U(p,t,s),$=`${D} { ${a} }`;o.add($);return}const M=d.includes("&")?b.replace("&",t):b.startsWith(":")?`${t}${b}`:`${t} ${b}`;(await nt(p,M,s)).forEach(D=>o.add(D));return}if(typeof p=="number"){const M=Zt(P,p);return x(M)}if(typeof p!="string")if("toString"in p)p=p.toString();else throw new Error(`Invalid value type for property ${P}`);return x(p)},y=i.map(r),{modifiers:g}={},h=[jt(),Wt(g)],w=(await Promise.all(y).then(d=>Promise.all(d.map(p=>h.reduce(async(b,P)=>{const x=await b;if(!x)return x;const O=await P(x);if(!O)return x;const{transformed:M,additionalCss:k}=O;let D="";if(k)for(const a of k)D+=await U(a,"");return`${D}${M}`},Promise.resolve(p)))))).filter(d=>d!==void 0).join(`
2
+ `);if(!w.trim())return Array.from(o);const m=t?`${t} {
3
+ ${w}
4
+ }`:w;return o.has(m)?Array.from(o):[m,...o]},U=async(e,t,s,n=!1)=>(await nt(e,t,s,n)).join(`
5
+ `),Ft=async(e,t=[])=>{if(!e)return"";const s=[],n={};for(const[o,i]of Object.entries(e))if(typeof i!="function")if(i&&typeof i=="object"){const r=o.trim(),y=await Ft(i,[...t,r]);s.push(y)}else n[o]=i;if(Object.keys(n).length){const o=t.map(R).join("-"),i="t_"+J(o,4),r=await U(n,`.${o}, .${i}`);s.push(r)}return s.join(`
6
+ `)},Gt=e=>e?Object.entries(e).reduce((t,[s,n])=>(typeof n=="function"?t[s]="any":typeof n=="object"&&(t[s]=Ct(n).map(o=>`"${o}"`).join(" | ")),t),{}):{},Ct=(e,t="",s=new Set)=>e?(Object.entries(e).forEach(([n,o])=>{const i=t?`${t}.${n}`:n;return typeof o=="object"?Ct(o,i,s):s.add(t)}),[...s]):[],Pt=e=>{if(!e||e==="/")throw new Error("Could not find package.json file");const t=c.join(e,"package.json");return f.existsSync(t)?t:Pt(c.join(e,".."))},Kt=async e=>{const t=Pt(e);return await bt.readFile(t,"utf-8").then(JSON.parse).catch(()=>{})},Qt=async e=>{const t=await Kt(e);if(t)return t.type};let I;const Nt=async e=>{if(I)return I;const t=await Qt(e);return t==="module"?I="esm":(t==="commonjs"||(typeof document>"u"?require("url").pathToFileURL(__filename).href:ft&&ft.tagName.toUpperCase()==="SCRIPT"&&ft.src||new URL("index-BD4dXHnv.cjs",document.baseURI).href).endsWith(".cjs"))&&(I="cjs"),I||"esm"},ut=Q.createLogger({level:"debug",format:Q.format.combine(Q.format.colorize(),Q.format.cli()),transports:[new Q.transports.Console({})]});function _t(e){return e?typeof e!="string"?_t(String(e)):e.replace(/[\s-]/g,".").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(t,s)=>(s>0?".":"")+t.toLowerCase()):""}const Ut={"*, *::before, *::after":{boxSizing:"border-box"},"*":{margin:0},html:{lineHeight:1.15,textSizeAdjust:"100%",WebkitFontSmoothing:"antialiased"},"img, picture, video, canvas, svg":{display:"block",maxWidth:"100%"},"p, h1, h2, h3, h4, h5, h6":{overflowWrap:"break-word"},p:{textWrap:"pretty"},"h1, h2, h3, h4, h5, h6":{textWrap:"balance"},a:{color:"currentColor"},button:{lineHeight:"1em",color:"currentColor"},"input, optgroup, select, textarea":{fontFamily:"inherit",fontSize:"100%",lineHeight:"1.15em"}},Z=(...e)=>e.flat().reduce((t,s)=>s!=null&&s._current?{...t,...s._current}:{...t,...s},{}),Bt=(...e)=>e.flat().reduce((t,s)=>({...t,...s._children}),{});class Xt{constructor(t){st(this,"_path");this.params=t}get _current(){return this.params.template}get isDefineTemplate(){return!0}_setPath(t){return this._path=t,this}}class Yt{constructor(t){st(this,"_path");st(this,"templates",[]);this.params=t,Object.entries(t).forEach(([s,n])=>{this.templates.push(new Xt({name:s,template:n}))})}get _current(){return this.params}get _children(){return Object.fromEntries(this.templates.map(t=>[t.params.name,t]))}get isDefineTemplates(){return!0}_setPath(t){return this._path=t,this.templates.forEach(s=>s._setPath(t)),this}}const te=e=>new Yt(e),ee=(e,t)=>new Promise((s,n)=>{const o=setTimeout(()=>{n(new Error("Timeout"))},100),i=lt.createSourceFile("temp.ts",e,lt.ScriptTarget.Latest,!0);function r(y){if(lt.isVariableDeclaration(y)&&y.name.getText()===t){const g=y.getStart(),h=y.getEnd();clearTimeout(o),s([g,h])}y.forEachChild(r)}r(i)}),z={externalModules:[],rcFile:void 0,destDir:void 0},xt=e=>{if(z.externalModules.length>0)return z.externalModules;const s=f.readFileSync(e,"utf8").match(/externalModules:\s?\[(.*)\]/);if(!s)return[];const n=s[1].split(",").map(o=>o.replace(/['"`]/g,"").trim());return z.externalModules=n,n},W=async e=>{if(z.destDir)return z.destDir;const t=await pt(e),s=c.join(e,(t==null?void 0:t.saltygenDir)||"saltygen");return z.destDir=s,s},Tt=["salty","css","styles","styled"],kt=(e=[])=>new RegExp(`\\.(${[...Tt,...e].join("|")})\\.`),ot=(e,t=[])=>kt(t).test(e),Dt=async e=>{if(z.rcFile)return z.rcFile;if(e==="/")throw new Error("Could not find .saltyrc.json file");const t=c.join(e,".saltyrc.json"),s=await bt.readFile(t,"utf-8").then(JSON.parse).catch(()=>{});return s?(z.rcFile=s,s):Dt(c.join(e,".."))},pt=async e=>{var n,o;const t=await Dt(e),s=(n=t.projects)==null?void 0:n.find(i=>e.endsWith(i.dir||""));return s||((o=t.projects)==null?void 0:o.find(i=>i.dir===t.defaultProject))},se=async e=>{const t=await pt(e),s=await W(e),n=c.join(e,(t==null?void 0:t.configDir)||"","salty.config.ts"),o=c.join(s,"salty.config.js"),i=await Nt(e),r=xt(n);await St.build({entryPoints:[n],minify:!0,treeShaking:!0,bundle:!0,outfile:o,format:i,external:r});const y=Date.now(),{config:g}=await import(`${o}?t=${y}`);return{config:g,path:o}},ne=async(e,t)=>{var yt,ht;const s=await W(e),n={mediaQueries:[],globalStyles:[],variables:[],templates:[]};await Promise.all([...t].map(async F=>{const{contents:_,outputFilePath:K}=await it(e,F,s);Object.entries(_).forEach(([v,T])=>{T.isMedia?n.mediaQueries.push([v,T]):T.isGlobalDefine?n.globalStyles.push(T):T.isDefineVariables?n.variables.push(T):T.isDefineTemplates&&n.templates.push(T._setPath(`${v};;${K}`))})}));const{config:o,path:i}=await se(e),r={...o},y=new Set,g=async(F,_=[])=>{if(!F)return[];const K=Object.entries(F).map(async([T,q])=>{const tt=async V=>{if(!V)return;if(V instanceof Promise)return await tt(await V);if(typeof V=="function")return await tt(await V());if(typeof V=="object")return await g(V,[..._,T]);const rt=_t(T),at=R(T),ct=[..._,rt].join(".");y.add(`"${ct}"`);const et=[..._.map(R),at].join("-"),gt=qt(V);return gt?`--${et}: ${gt.transformed};`:`--${et}: ${V};`};return await tt(q)});return(await Promise.all(K)).flat()},h=async F=>{if(!F)return[];const _=Object.entries(F).map(async([v,T])=>{const q=await g(T);return v==="base"?q.join(""):`${v} { ${q.join("")} }`});return(await Promise.all(_)).flat()},u=async F=>{if(!F)return[];const _=Object.entries(F).map(async([v,T])=>{const q=Object.entries(T).map(async([V,rt])=>{const at=await g(rt,[v]),ct=`.${v}-${V}, [data-${v}="${V}"]`,et=at.join("");return`${ct} { ${et} }`});return(await Promise.all(q)).flat()});return(await Promise.all(_)).flat()},w=F=>({...F,responsive:void 0,conditional:void 0}),m=F=>n.variables.map(_=>F==="static"?w(_._current):_._current[F]),S=Z(w(o.variables),m("static")),d=await g(S),p=Z((yt=o.variables)==null?void 0:yt.responsive,m("responsive")),b=await h(p),P=Z((ht=o.variables)==null?void 0:ht.conditional,m("conditional")),x=await u(P),O=c.join(s,"css/_variables.css"),M=`:root { ${d.join("")} ${b.join("")} } ${x.join("")}`;f.writeFileSync(O,M),r.staticVariables=S;const k=c.join(s,"css/_global.css"),D=Z(o.global,n.globalStyles),a=await U(D,"");f.writeFileSync(k,`@layer global { ${a} }`);const $=c.join(s,"css/_reset.css"),l=o.reset==="none"?{}:typeof o.reset=="object"?o.reset:Ut,j=await U(l,"");f.writeFileSync($,`@layer reset { ${j} }`);const N=c.join(s,"css/_templates.css"),E=Z(o.templates,n.templates),A=await Ft(E),L=Gt(E);f.writeFileSync(N,`@layer templates { ${A} }`),r.templates=E;const H=o.templates?[te(o.templates)._setPath(`config;;${i}`)]:[],B=Bt(n.templates,H);r.templatePaths=Object.fromEntries(Object.entries(B).map(([F,_])=>[F,_._path]));const{mediaQueries:X}=n;r.mediaQueries=Object.fromEntries(X.map(([F,_])=>[`@${F}`,_]));const G=X.map(([F])=>`'@${F}'`).join(" | "),Y=c.join(s,"types/css-tokens.d.ts"),Et=`
7
+ // Variable types
8
+ type VariableTokens = ${[...y].join("|")};
9
+ type PropertyValueToken = \`{\${VariableTokens}}\`;
10
+
11
+ // Template types
12
+ type TemplateTokens = {
13
+ ${Object.entries(L).map(([F,_])=>`${F}?: ${_}`).join(`
14
+ `)}
15
+ }
16
+
17
+ // Media query types
18
+ type MediaQueryKeys = ${G||"''"};
19
+ `;f.writeFileSync(Y,Et);const Ot=c.join(s,"cache/config-cache.json");f.writeFileSync(Ot,JSON.stringify(r,null,2))},$t=e=>e.replace(/styled\(([^"'`{,]+),/g,(t,s)=>{if(/^['"`]/.test(s))return t;const o=new RegExp(`import[^;]*${s}[,\\s{][^;]*from\\s?([^{};]+);`);if(!o.test(e))return t;const r=o.exec(e);if(r){const y=r.at(1);if(Tt.some(h=>y==null?void 0:y.includes(h)))return t}return"styled('div',"}),oe=(e,t)=>{try{const s=f.readFileSync(c.join(t,"saltygen/cache/config-cache.json"),"utf8");return s?`globalThis.saltyConfig = ${s};
20
+
21
+ ${e}`:`globalThis.saltyConfig = {};
22
+
23
+ ${e}`}catch{return e}},it=async(e,t,s)=>{const n=J(t),o=c.join(s,"./temp");f.existsSync(o)||f.mkdirSync(o);const i=c.parse(t);let r=f.readFileSync(t,"utf8");r=$t(r),r=oe(r,e);const y=c.join(s,"js",n+".js"),g=await pt(e),h=c.join(e,(g==null?void 0:g.configDir)||"","salty.config.ts"),u=xt(h),w=await Nt(e);await St.build({stdin:{contents:r,sourcefile:i.base,resolveDir:i.dir,loader:"tsx"},minify:!1,treeShaking:!0,bundle:!0,outfile:y,format:w,target:["node20"],keepNames:!0,external:u,packages:"external",plugins:[{name:"test",setup:d=>{d.onLoad({filter:/.*\.css|salty|styles|styled\.ts/},p=>{const b=f.readFileSync(p.path,"utf8");return{contents:$t(b),loader:"ts"}})}}]});const m=Date.now();return{contents:await import(`${y}?t=${m}`),outputFilePath:y}},ie=async e=>{const t=await W(e),s=c.join(t,"cache/config-cache.json"),n=f.readFileSync(s,"utf8");if(!n)throw new Error("Could not find config cache file");return JSON.parse(n)},dt=async e=>{const t=await ie(e),s=await W(e),n=c.join(s,"salty.config.js"),o=Date.now(),{config:i}=await import(`${n}?t=${o}`);return Z(i,t)},mt=()=>{try{return process.env.NODE_ENV==="production"}catch{return!1}},re=async(e,t=mt(),s=!0)=>{try{const n=Date.now();t?ut.info("Generating CSS in production mode! 🔥"):ut.info("Generating CSS in development mode! 🚀");const o=[],i=[],r=await W(e),y=c.join(r,"index.css");s&&(()=>{f.existsSync(r)&&Rt.execSync("rm -rf "+r),f.mkdirSync(r,{recursive:!0}),f.mkdirSync(c.join(r,"css")),f.mkdirSync(c.join(r,"types")),f.mkdirSync(c.join(r,"js")),f.mkdirSync(c.join(r,"cache"))})();const h=new Set,u=new Set;async function w(a){const $=["node_modules","saltygen"],C=f.statSync(a);if(C.isDirectory()){const l=f.readdirSync(a);if($.some(N=>a.includes(N)))return;await Promise.all(l.map(N=>w(c.join(a,N))))}else if(C.isFile()&&ot(a)){h.add(a);const j=f.readFileSync(a,"utf8");/define[\w\d]+\(/.test(j)&&u.add(a)}}await w(e),await ne(e,u);const m={keyframes:[],components:[],classNames:[]};await Promise.all([...h].map(async a=>{const{contents:$}=await it(e,a,r);for(let[C,l]of Object.entries($))l instanceof Promise&&(l=await l),l.isKeyframes?m.keyframes.push({value:l,src:a,name:C}):l.isClassName?m.classNames.push({...l,src:a,name:C}):l.generator&&m.components.push({...l,src:a,name:C})}));const S=await dt(e);for(const a of m.keyframes){const{value:$}=a,C=`a_${$.animationName}.css`,l=`css/${C}`,j=c.join(r,l);o.push(C),f.writeFileSync(j,$.css)}const d={};for(const a of m.components){const{src:$,name:C}=a;d[$]||(d[$]=[]);const l=a.generator._withBuildContext({callerName:C,isProduction:t,config:S});i[l.priority]||(i[l.priority]=[]);const j=await l.css;if(!j)continue;i[l.priority].push(l.cssFileName);const N=`css/${l.cssFileName}`,E=c.join(r,N);f.writeFileSync(E,j),S.importStrategy==="component"&&d[$].push(l.cssFileName)}for(const a of m.classNames){const{src:$,name:C}=a;d[$]||(d[$]=[]);const l=a.generator._withBuildContext({callerName:C,isProduction:t,config:S}),j=await l.css;if(!j)continue;i[l.priority]||(i[l.priority]=[]),i[l.priority].push(l.cssFileName);const N=`css/${l.cssFileName}`,E=c.join(r,N);f.writeFileSync(E,j),S.importStrategy==="component"&&d[$].push(l.cssFileName)}S.importStrategy==="component"&&Object.entries(d).forEach(([a,$])=>{const C=$.map(A=>`@import url('./${A}');`).join(`
24
+ `),l=J(a,6),j=c.parse(a),N=R(j.name),E=c.join(r,`css/f_${N}-${l}.css`);f.writeFileSync(E,C||"/* Empty file */")});const p=o.map(a=>`@import url('./css/${a}');`).join(`
25
+ `);let O=`@layer reset, global, templates, l0, l1, l2, l3, l4, l5, l6, l7, l8;
26
+
27
+ ${["_variables.css","_reset.css","_global.css","_templates.css"].filter(a=>{try{return f.readFileSync(c.join(r,"css",a),"utf8").length>0}catch{return!1}}).map(a=>`@import url('./css/${a}');`).join(`
28
+ `)}
29
+ ${p}`;if(S.importStrategy!=="component"){const a=i.reduce(($,C,l)=>{const j=C.reduce((L,H)=>{var Y;const B=c.join(r,"css",H),X=f.readFileSync(B,"utf8"),G=((Y=/.*-([^-]+)-\d+.css/.exec(H))==null?void 0:Y.at(1))||J(B,6);return L.includes(G)?L:`${L}
30
+ /*start:${G}-${H}*/
31
+ ${X}
32
+ /*end:${G}*/
33
+ `},""),N=`l_${l}.css`,E=c.join(r,"css",N),A=`@layer l${l} { ${j}
34
+ }`;return f.writeFileSync(E,A),`${$}
35
+ @import url('./css/${N}');`},"");O+=a}f.writeFileSync(y,O);const k=Date.now()-n,D=k<200?"🔥":k<500?"🚀":k<1e3?"🎉":k<2e3?"🚗":k<5e3?"🤔":"🥴";ut.info(`Generated CSS in ${k}ms! ${D}`)}catch(n){console.error(n)}},ae=async(e,t,s=mt())=>{try{const n=await W(e);if(ot(t)){const i=[],r=await dt(e),{contents:y}=await it(e,t,n);for(const[g,h]of Object.entries(y)){if(h.isKeyframes&&h.css){const p=`css/${`a_${h.animationName}.css`}`,b=c.join(n,p);f.writeFileSync(b,await h.css);return}if(h.isClassName){const d=h.generator._withBuildContext({callerName:g,isProduction:s,config:r}),p=await d.css;if(!p)continue;i[d.priority]||(i[d.priority]=[]),i[d.priority].push(d.cssFileName);const b=`css/${d.cssFileName}`,P=c.join(n,b);f.writeFileSync(P,p)}if(!h.generator)return;const u=h.generator._withBuildContext({callerName:g,isProduction:s,config:r}),w=await u.css;if(!w)continue;const m=`css/${u.cssFileName}`,S=c.join(n,m);f.writeFileSync(S,w),i[u.priority]||(i[u.priority]=[]),i[u.priority].push(u.cssFileName)}if(r.importStrategy!=="component")i.forEach((g,h)=>{const u=`l_${h}.css`,w=c.join(n,"css",u);let m=f.readFileSync(w,"utf8");g.forEach(S=>{var P;const d=c.join(n,"css",S),p=((P=/.*-([^-]+)-\d+.css/.exec(S))==null?void 0:P.at(1))||J(d,6);if(!m.includes(p)){const x=f.readFileSync(d,"utf8"),O=`/*start:${p}-${S}*/
36
+ ${x}
37
+ /*end:${p}*/
38
+ `;m=`${m.replace(/\}$/,"")}
39
+ ${O}
40
+ }`}}),f.writeFileSync(w,m)});else{const g=i.flat().map(S=>`@import url('./${S}');`).join(`
41
+ `),h=J(t,6),u=c.parse(t),w=R(u.name),m=c.join(n,`css/f_${w}-${h}.css`);f.writeFileSync(m,g||"/* Empty file */")}}}catch(n){console.error(n)}},ce=async(e,t,s=mt())=>{var n,o;try{const i=await W(e);if(ot(t)){const y=f.readFileSync(t,"utf8"),g=await dt(e),{contents:h}=await it(e,t,i);let u=y;for(const[w,m]of Object.entries(h)){if(m.isKeyframes||!m.generator)continue;const S=m.generator._withBuildContext({callerName:w,isProduction:s,config:g}),[d,p]=await ee(u,w),b=u.slice(d,p);if(m.isClassName){const P=u,x=` ${w} = className("${S.classNames}")`;u=u.replace(b,x),P===u&&console.error("Minimize file failed to change content",{name:w})}if(b.includes("styled")){const P=(o=(n=/styled\(([^,]+),/.exec(b))==null?void 0:n.at(1))==null?void 0:o.trim(),x=u,O=` ${w} = styled(${P}, "${S.classNames}", ${JSON.stringify(S.clientProps)})`;u=u.replace(b,O),x===u&&console.error("Minimize file failed to change content",{name:w,tagName:P})}}if(g.importStrategy==="component"){const w=J(t,6),m=c.parse(t);u=`import '../../saltygen/css/${`f_${R(m.name)}-${w}.css`}';
42
+ ${u}`}return u=u.replace("@salty-css/react/class-name","@salty-css/react/class-name-client"),u=u.replace("{ styled }","{ styledClient as styled }"),u=u.replace("@salty-css/react/styled","@salty-css/react/styled-client"),u}}catch(i){console.error("Error in minimizeFile:",i)}};exports.generateCss=re;exports.generateFile=ae;exports.isSaltyFile=ot;exports.minimizeFile=ce;exports.saltyFileRegExp=kt;