@salty-css/vite 0.0.1-alpha.60 → 0.0.1-alpha.62

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.
Files changed (3) hide show
  1. package/index.cjs +13 -13
  2. package/index.js +161 -153
  3. package/package.json +2 -2
package/index.cjs CHANGED
@@ -1,18 +1,18 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const G=require("esbuild"),X=require("child_process"),p=require("path"),h=require("fs"),Y=require("fs/promises");var _=typeof document<"u"?document.currentScript:null;function Q(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const W=Q(G),I=t=>String.fromCharCode(t+(t>25?39:97)),v=(t,e)=>{let s="",n;for(n=Math.abs(t);n>52;n=n/52|0)s=I(n%52)+s;return s=I(n%52)+s,s.length<e?s=s.padStart(e,"a"):s.length>e&&(s=s.slice(-e)),s},tt=(t,e)=>{let s=e.length;for(;s;)t=t*33^e.charCodeAt(--s);return t},M=(t,e=3)=>{const s=tt(5381,JSON.stringify(t))>>>0;return v(s,e)};function P(t){return t?typeof t!="string"?P(String(t)):t.replace(/\s/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(e,s)=>(s>0?"-":"")+e.toLowerCase()):""}const et=(t,e)=>{if(typeof t!="string")return{result:t};if(!e)return{result:t};const s=[];return Object.values(e).forEach(n=>{const{pattern:o,transform:y}=n;t=t.replace(o,d=>{const{value:u,css:c}=y(d);return c&&s.push(c),u})}),{result:t,additionalCss:s}},B=t=>typeof t!="string"?{result:t}:/\{[^{}]+\}/g.test(t)?{result:t.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${P(n[1].replaceAll(".","-"))})`)}:{result:t},D=(t,e,s,n)=>{if(!t)return"";const o=[],y=Object.entries(t).reduce((u,[c,r])=>{const l=c.trim();if(typeof r=="function"&&(r=r()),typeof r=="object"){if(!r)return u;if(l==="variants")return Object.entries(r).forEach(([i,f])=>{f&&Object.entries(f).forEach(([$,m])=>{if(!m)return;const F=`${e}.${i}-${$}`,b=D(m,F);o.push(b)})}),u;if(l==="defaultVariants")return u;if(l==="compoundVariants")return r.forEach(i=>{const{css:f,...$}=i,m=Object.entries($).reduce((b,[w,O])=>`${b}.${w}-${O}`,e),F=D(f,m);o.push(F)}),u;if(l.startsWith("@")){const i=D(r,e),f=`${l} {
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const Y=require("esbuild"),Q=require("child_process"),y=require("path"),g=require("fs"),v=require("fs/promises");var V=typeof document<"u"?document.currentScript:null;function tt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const B=tt(Y),W=t=>String.fromCharCode(t+(t>25?39:97)),et=(t,e)=>{let s="",n;for(n=Math.abs(t);n>52;n=n/52|0)s=W(n%52)+s;return s=W(n%52)+s,s.length<e?s=s.padStart(e,"a"):s.length>e&&(s=s.slice(-e)),s},st=(t,e)=>{let s=e.length;for(;s;)t=t*33^e.charCodeAt(--s);return t},R=(t,e=3)=>{const s=st(5381,JSON.stringify(t))>>>0;return et(s,e)};function D(t){return t?typeof t!="string"?D(String(t)):t.replace(/\s/g,"-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(e,s)=>(s>0?"-":"")+e.toLowerCase()):""}const nt=(t,e)=>{if(typeof t!="string")return{result:t};if(!e)return{result:t};const s=[];return Object.values(e).forEach(n=>{const{pattern:o,transform:p}=n;t=t.replace(o,d=>{const{value:a,css:c}=p(d);return c&&s.push(c),a})}),{result:t,additionalCss:s}},Z=t=>typeof t!="string"?{result:t}:/\{[^{}]+\}/g.test(t)?{result:t.replace(/\{([^{}]+)\}/g,(...n)=>`var(--${D(n[1].replaceAll(".","-"))})`)}:{result:t},P=(t,e,s,n)=>{if(!t)return"";const o=[],p=Object.entries(t).reduce((a,[c,r])=>{const u=c.trim();if(typeof r=="function"&&(r=r()),typeof r=="object"){if(!r)return a;if(u==="variants")return Object.entries(r).forEach(([i,f])=>{f&&Object.entries(f).forEach(([$,h])=>{if(!h)return;const F=`${e}.${i}-${$}`,j=P(h,F);o.push(j)})}),a;if(u==="defaultVariants")return a;if(u==="compoundVariants")return r.forEach(i=>{const{css:f,...$}=i,h=Object.entries($).reduce((j,[w,O])=>`${j}.${w}-${O}`,e),F=P(f,h);o.push(F)}),a;if(u.startsWith("@")){const i=P(r,e),f=`${u} {
2
2
  ${i.replace(`
3
3
  `,`
4
4
  `)}
5
- }`;return o.push(f),u}const g=c.includes("&")?l.replace("&",e):l.startsWith(":")?`${e}${l}`:`${e} ${l}`,k=D(r,g);return o.push(k),u}const T=l.startsWith("-")?l:P(l),j=(g,k=";")=>u=`${u}${g}${k}`,a=g=>j(`${T}:${g}`);if(typeof r=="number")return a(r);if(typeof r!="string")if("toString"in r)r=r.toString();else return u;const{modifiers:S}={},C=function*(){yield B(r),yield et(r,S)}();for(const{result:g,additionalCss:k=[]}of C)r=g,k.forEach(i=>{const f=D(i,"");j(f,"")});return a(r)},"");if(!y)return o.join(`
6
- `);if(!e)return y;let d="";return d=`${e} { ${y} }`,[d,...o].join(`
7
- `)},Z=(t,e=[])=>{if(!t)return"";const s=[],n={};if(Object.entries(t).forEach(([o,y])=>{if(typeof y=="object"){if(!y)return;const d=o.trim(),u=Z(y,[...e,d]);s.push(u)}else n[o]=y}),Object.keys(n).length){const o=e.map(P).join("-"),y=D(n,`.${o}`);s.push(y)}return s.join(`
8
- `)},z=()=>(typeof document>"u"?require("url").pathToFileURL(__filename).href:_&&_.tagName.toUpperCase()==="SCRIPT"&&_.src||new URL("index.cjs",document.baseURI).href).endsWith(".cjs")?"cjs":"esm",V=t=>p.join(t,"./saltygen"),st=["salty","css","styles","styled"],nt=(t=[])=>new RegExp(`\\.(${[...st,...t].join("|")})\\.`),E=(t,e=[])=>nt(e).test(t),ot=async t=>{const e=V(t),s=p.join(t,"salty.config.ts"),n=p.join(e,"salty.config.js"),o=z();console.log("Module type:",o),await W.build({entryPoints:[s],minify:!0,treeShaking:!0,bundle:!0,outfile:n,format:o,external:["react"]});const y=Date.now(),{config:d}=await import(`${n}?t=${y}`);return d},U=async t=>{const e=await ot(t),s=new Set,n=(i,f=[])=>i?Object.entries(i).flatMap(([$,m])=>{if(!m)return;if(typeof m=="object")return n(m,[...f,$]);const F=[...f,$].join(".");s.add(`"${F}"`);const b=[...f.map(P),P($)].join("-"),{result:w}=B(m);return`--${b}: ${w};`}):[],o=i=>i?Object.entries(i).flatMap(([f,$])=>{const m=n($);return f==="base"?m.join(""):`${f} { ${m.join("")} }`}):[],y=i=>i?Object.entries(i).flatMap(([f,$])=>Object.entries($).flatMap(([m,F])=>{const b=n(F,[f]),w=`.${f}-${m}, [data-${f}="${m}"]`,O=b.join("");return`${w} { ${O} }`})):[],d=n(e.variables),u=o(e.responsiveVariables),c=y(e.conditionalVariables),r=V(t),l=p.join(r,"css/variables.css"),T=`:root { ${d.join("")} ${u.join("")} } ${c.join("")}`;h.writeFileSync(l,T);const j=p.join(r,"types/css-tokens.d.ts"),S=`type VariableTokens = ${[...s].join("|")||'""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;h.writeFileSync(j,S);const x=p.join(r,"css/global.css"),C=D(e.global,"");h.writeFileSync(x,C);const g=p.join(r,"css/templates.css"),k=Z(e.templates);h.writeFileSync(g,k)},R=async(t,e)=>{const s=M(t),n=p.join(e,"js",s+".js"),o=z();console.log("Module type:",o),await W.build({entryPoints:[t],minify:!0,treeShaking:!0,bundle:!0,outfile:n,format:o,target:["es2022"],keepNames:!0,external:["react"]});const y=Date.now();return await import(`${n}?t=${y}`)},A=async t=>{const e=V(t),s=p.join(e,"salty.config.js"),{config:n}=await import(s);return n},rt=async t=>{try{const e=[],s=[],n=V(t),o=p.join(n,"index.css");(()=>{h.existsSync(n)&&X.execSync("rm -rf "+n),h.mkdirSync(n),h.mkdirSync(p.join(n,"css")),h.mkdirSync(p.join(n,"types"))})(),await U(t);const d=await A(t);async function u(a,S){const x=["node_modules","saltygen"],C=h.statSync(a);if(C.isDirectory()){const g=h.readdirSync(a);if(x.some(i=>a.includes(i)))return;await Promise.all(g.map(i=>u(p.join(a,i),p.join(S,i))))}else if(C.isFile()&&E(a)){const k=await R(a,n),i=[];Object.entries(k).forEach(([F,b])=>{if(b.isKeyframes&&b.css){const q=`${b.animationName}.css`,J=`css/${q}`,K=p.join(n,J);e.push(q),h.writeFileSync(K,b.css);return}if(!b.generator)return;const w=b.generator._withBuildContext({name:F,config:d}),O=`${w.hash}-${w.priority}.css`;s[w.priority]||(s[w.priority]=[]),s[w.priority].push(O),i.push(O);const N=`css/${O}`,L=p.join(n,N);h.writeFileSync(L,w.css)});const f=i.map(F=>`@import url('./${F}');`).join(`
9
- `),$=M(a,6),m=p.join(n,`css/${$}.css`);h.writeFileSync(m,f)}}await u(t,n);const c=e.map(a=>`@import url('./css/${a}');`).join(`
10
- `);let j=`@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
5
+ }`;return o.push(f),a}const m=c.includes("&")?u.replace("&",e):u.startsWith(":")?`${e}${u}`:`${e} ${u}`,C=P(r,m);return o.push(C),a}const k=u.startsWith("-")?u:D(u),b=(m,C=";")=>a=`${a}${m}${C}`,l=m=>b(`${k}:${m}`);if(typeof r=="number")return l(r);if(typeof r!="string")if("toString"in r)r=r.toString();else return a;const{modifiers:S}={},x=function*(){yield Z(r),yield nt(r,S)}();for(const{result:m,additionalCss:C=[]}of x)r=m,C.forEach(i=>{const f=P(i,"");b(f,"")});return l(r)},"");if(!p)return o.join(`
6
+ `);if(!e)return p;let d="";return d=`${e} { ${p} }`,[d,...o].join(`
7
+ `)},z=(t,e=[])=>{if(!t)return"";const s=[],n={};if(Object.entries(t).forEach(([o,p])=>{if(typeof p=="object"){if(!p)return;const d=o.trim(),a=z(p,[...e,d]);s.push(a)}else n[o]=p}),Object.keys(n).length){const o=e.map(D).join("-"),p=P(n,`.${o}`);s.push(p)}return s.join(`
8
+ `)},U=()=>(typeof document>"u"?require("url").pathToFileURL(__filename).href:V&&V.tagName.toUpperCase()==="SCRIPT"&&V.src||new URL("index.cjs",document.baseURI).href).endsWith(".cjs")?"cjs":"esm",_={externalModules:[]},H=t=>{if(_.externalModules.length>0)return _.externalModules;const e=y.join(t,"salty.config.ts"),n=g.readFileSync(e,"utf8").match(/externalModules:\s?\[(.*)\]/);if(!n)return[];const o=n[1].split(",").map(p=>p.replace(/['"`]/g,"").trim());return _.externalModules=o,o},E=t=>y.join(t,"./saltygen"),ot=["salty","css","styles","styled"],rt=(t=[])=>new RegExp(`\\.(${[...ot,...t].join("|")})\\.`),N=(t,e=[])=>rt(e).test(t),it=async t=>{const e=E(t),s=y.join(t,"salty.config.ts"),n=y.join(e,"salty.config.js"),o=U(),p=H(t);await B.build({entryPoints:[s],minify:!0,treeShaking:!0,bundle:!0,outfile:n,format:o,external:p});const d=Date.now(),{config:a}=await import(`${n}?t=${d}`);return a},L=async t=>{const e=await it(t),s=new Set,n=(i,f=[])=>i?Object.entries(i).flatMap(([$,h])=>{if(!h)return;if(typeof h=="object")return n(h,[...f,$]);const F=[...f,$].join(".");s.add(`"${F}"`);const j=[...f.map(D),D($)].join("-"),{result:w}=Z(h);return`--${j}: ${w};`}):[],o=i=>i?Object.entries(i).flatMap(([f,$])=>{const h=n($);return f==="base"?h.join(""):`${f} { ${h.join("")} }`}):[],p=i=>i?Object.entries(i).flatMap(([f,$])=>Object.entries($).flatMap(([h,F])=>{const j=n(F,[f]),w=`.${f}-${h}, [data-${f}="${h}"]`,O=j.join("");return`${w} { ${O} }`})):[],d=n(e.variables),a=o(e.responsiveVariables),c=p(e.conditionalVariables),r=E(t),u=y.join(r,"css/variables.css"),k=`:root { ${d.join("")} ${a.join("")} } ${c.join("")}`;g.writeFileSync(u,k);const b=y.join(r,"types/css-tokens.d.ts"),S=`type VariableTokens = ${[...s].join("|")||'""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;g.writeFileSync(b,S);const T=y.join(r,"css/global.css"),x=P(e.global,"");g.writeFileSync(T,x);const m=y.join(r,"css/templates.css"),C=z(e.templates);g.writeFileSync(m,C)},A=async(t,e,s)=>{const n=R(e),o=y.join(s,"js",n+".js"),p=U(),d=H(t);await B.build({entryPoints:[e],minify:!0,treeShaking:!0,bundle:!0,outfile:o,format:p,target:["es2022"],keepNames:!0,external:d});const a=Date.now();return await import(`${o}?t=${a}`)},q=async t=>{const e=E(t),s=y.join(e,"salty.config.js"),{config:n}=await import(s);return n},ct=async t=>{try{const e=[],s=[],n=E(t),o=y.join(n,"index.css");(()=>{g.existsSync(n)&&Q.execSync("rm -rf "+n),g.mkdirSync(n),g.mkdirSync(y.join(n,"css")),g.mkdirSync(y.join(n,"types"))})(),await L(t);const d=await q(t);async function a(l,S){const T=["node_modules","saltygen"],x=g.statSync(l);if(x.isDirectory()){const m=g.readdirSync(l);if(T.some(i=>l.includes(i)))return;await Promise.all(m.map(i=>a(y.join(l,i),y.join(S,i))))}else if(x.isFile()&&N(l)){const C=await A(t,l,n),i=[];Object.entries(C).forEach(([F,j])=>{if(j.isKeyframes&&j.css){const I=`${j.animationName}.css`,G=`css/${I}`,X=y.join(n,G);e.push(I),g.writeFileSync(X,j.css);return}if(!j.generator)return;const w=j.generator._withBuildContext({name:F,config:d}),O=`${w.hash}-${w.priority}.css`;s[w.priority]||(s[w.priority]=[]),s[w.priority].push(O),i.push(O);const M=`css/${O}`,K=y.join(n,M);g.writeFileSync(K,w.css)});const f=i.map(F=>`@import url('./${F}');`).join(`
9
+ `),$=R(l,6),h=y.join(n,`css/${$}.css`);g.writeFileSync(h,f)}}await a(t,n);const c=e.map(l=>`@import url('./css/${l}');`).join(`
10
+ `);let b=`@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
11
11
 
12
- ${["variables.css","global.css","templates.css"].filter(a=>{try{return h.readFileSync(p.join(n,"css",a),"utf8").length>0}catch{return!1}}).map(a=>`@import url('./css/${a}');`).join(`
12
+ ${["variables.css","global.css","templates.css"].filter(l=>{try{return g.readFileSync(y.join(n,"css",l),"utf8").length>0}catch{return!1}}).map(l=>`@import url('./css/${l}');`).join(`
13
13
  `)}
14
- ${c}`;if(d.importStrategy!=="component"){const a=s.flat().map(S=>`@import url('./css/${S}');`).join(`
15
- `);j+=a}h.writeFileSync(o,j)}catch(e){console.error(e)}},it=async(t,e)=>{try{const s=[],n=p.join(t,"./saltygen"),o=p.join(n,"index.css");if(E(e)){const d=await A(t),u=await R(e,n);Object.entries(u).forEach(([j,a])=>{if(!a.generator)return;const S=a.generator._withBuildContext({name:j,config:d}),x=`${S.hash}-${S.priority}.css`,C=`css/${x}`,g=p.join(n,C);s.push(x),h.writeFileSync(g,S.css)});const c=h.readFileSync(o,"utf8").split(`
16
- `),r=s.map(j=>`@import url('../saltygen/css/${j}');`),T=[...new Set([...c,...r])].join(`
17
- `);h.writeFileSync(o,T)}}catch(s){console.error(s)}},ct=async(t,e)=>{try{const s=p.join(t,"./saltygen");if(E(e)){const o=h.readFileSync(e,"utf8");o.replace(/^(?!export\s)const\s.*/gm,l=>`export ${l}`)!==o&&await Y.writeFile(e,o);const d=await A(t),u=await R(e,s);let c=o;Object.entries(u).forEach(([l,T])=>{var O;if(T.isKeyframes||!T.generator)return;const j=T.generator._withBuildContext({name:l,config:d}),a=new RegExp(`\\s${l}[=\\s]+[^()]+styled\\(([^,]+),`,"g").exec(o);if(!a)return console.error("Could not find the original declaration");const S=(O=a.at(1))==null?void 0:O.trim(),x=new RegExp(`\\s${l}[=\\s]+styled\\(`,"g").exec(c);if(!x)return console.error("Could not find the original declaration");const{index:C}=x;let g=!1;const k=setTimeout(()=>g=!0,5e3);let i=0,f=!1,$=0;for(;!f&&!g;){const N=c[C+i];N==="("&&$++,N===")"&&$--,$===0&&N===")"&&(f=!0),i>c.length&&(g=!0),i++}if(!g)clearTimeout(k);else throw new Error("Failed to find the end of the styled call and timed out");const m=C+i,F=c.slice(C,m),b=c,w=` ${l} = styled(${S}, "${j.classNames}", "${j._callerName}", ${JSON.stringify(j.props)});`;c=c.replace(F,w),b===c&&console.error("Minimize file failed to change content",{name:l,tagName:S})});const r=M(e,6);return d.importStrategy==="component"&&(c=`import '../../saltygen/css/${r}.css';
18
- ${c}`),c=c.replace("{ styled }","{ styledClient as styled }"),c=c.replace("@salty-css/react/styled","@salty-css/react/styled-client"),c}}catch(s){console.error("Error in minimizeFile:",s)}},H=t=>({name:"stylegen",buildStart:()=>rt(t),load:async e=>{if(E(e))return await ct(t,e)},watchChange:{handler:async e=>{E(e)&&await it(t,e),e.includes("salty.config")&&await U(t)}}});exports.default=H;exports.saltyPlugin=H;
14
+ ${c}`;if(d.importStrategy!=="component"){const l=s.flat().map(S=>`@import url('./css/${S}');`).join(`
15
+ `);b+=l}g.writeFileSync(o,b)}catch(e){console.error(e)}},at=async(t,e)=>{try{const s=[],n=y.join(t,"./saltygen"),o=y.join(n,"index.css");if(N(e)){const d=await q(t),a=await A(t,e,n);Object.entries(a).forEach(([b,l])=>{if(!l.generator)return;const S=l.generator._withBuildContext({name:b,config:d}),T=`${S.hash}-${S.priority}.css`,x=`css/${T}`,m=y.join(n,x);s.push(T),g.writeFileSync(m,S.css)});const c=g.readFileSync(o,"utf8").split(`
16
+ `),r=s.map(b=>`@import url('../saltygen/css/${b}');`),k=[...new Set([...c,...r])].join(`
17
+ `);g.writeFileSync(o,k)}}catch(s){console.error(s)}},lt=async(t,e)=>{try{const s=y.join(t,"./saltygen");if(N(e)){const o=g.readFileSync(e,"utf8");o.replace(/^(?!export\s)const\s.*/gm,u=>`export ${u}`)!==o&&await v.writeFile(e,o);const d=await q(t),a=await A(t,e,s);let c=o;Object.entries(a).forEach(([u,k])=>{var O;if(k.isKeyframes||!k.generator)return;const b=k.generator._withBuildContext({name:u,config:d}),l=new RegExp(`\\s${u}[=\\s]+[^()]+styled\\(([^,]+),`,"g").exec(o);if(!l)return console.error("Could not find the original declaration");const S=(O=l.at(1))==null?void 0:O.trim(),T=new RegExp(`\\s${u}[=\\s]+styled\\(`,"g").exec(c);if(!T)return console.error("Could not find the original declaration");const{index:x}=T;let m=!1;const C=setTimeout(()=>m=!0,5e3);let i=0,f=!1,$=0;for(;!f&&!m;){const M=c[x+i];M==="("&&$++,M===")"&&$--,$===0&&M===")"&&(f=!0),i>c.length&&(m=!0),i++}if(!m)clearTimeout(C);else throw new Error("Failed to find the end of the styled call and timed out");const h=x+i,F=c.slice(x,h),j=c,w=` ${u} = styled(${S}, "${b.classNames}", "${b._callerName}", ${JSON.stringify(b.props)});`;c=c.replace(F,w),j===c&&console.error("Minimize file failed to change content",{name:u,tagName:S})});const r=R(e,6);return d.importStrategy==="component"&&(c=`import '../../saltygen/css/${r}.css';
18
+ ${c}`),c=c.replace("{ styled }","{ styledClient as styled }"),c=c.replace("@salty-css/react/styled","@salty-css/react/styled-client"),c}}catch(s){console.error("Error in minimizeFile:",s)}},J=t=>({name:"stylegen",buildStart:()=>ct(t),load:async e=>{if(N(e))return await lt(t,e)},watchChange:{handler:async e=>{N(e)&&await at(t,e),e.includes("salty.config")&&await L(t)}}});exports.default=J;exports.saltyPlugin=J;
package/index.js CHANGED
@@ -1,175 +1,183 @@
1
- import * as Z from "esbuild";
2
- import { execSync as U } from "child_process";
3
- import { join as u } from "path";
4
- import { writeFileSync as T, existsSync as X, mkdirSync as M, statSync as Y, readdirSync as Q, readFileSync as A } from "fs";
5
- import { writeFile as v } from "fs/promises";
6
- const I = (t) => String.fromCharCode(t + (t > 25 ? 39 : 97)), tt = (t, s) => {
1
+ import * as z from "esbuild";
2
+ import { execSync as Y } from "child_process";
3
+ import { join as y } from "path";
4
+ import { writeFileSync as T, existsSync as Q, mkdirSync as A, statSync as v, readdirSync as tt, readFileSync as O } from "fs";
5
+ import { writeFile as st } from "fs/promises";
6
+ const Z = (t) => String.fromCharCode(t + (t > 25 ? 39 : 97)), et = (t, s) => {
7
7
  let e = "", n;
8
- for (n = Math.abs(t); n > 52; n = n / 52 | 0) e = I(n % 52) + e;
9
- return e = I(n % 52) + e, e.length < s ? e = e.padStart(s, "a") : e.length > s && (e = e.slice(-s)), e;
10
- }, st = (t, s) => {
8
+ for (n = Math.abs(t); n > 52; n = n / 52 | 0) e = Z(n % 52) + e;
9
+ return e = Z(n % 52) + e, e.length < s ? e = e.padStart(s, "a") : e.length > s && (e = e.slice(-s)), e;
10
+ }, nt = (t, s) => {
11
11
  let e = s.length;
12
12
  for (; e; ) t = t * 33 ^ s.charCodeAt(--e);
13
13
  return t;
14
- }, R = (t, s = 3) => {
15
- const e = st(5381, JSON.stringify(t)) >>> 0;
16
- return tt(e, s);
14
+ }, _ = (t, s = 3) => {
15
+ const e = nt(5381, JSON.stringify(t)) >>> 0;
16
+ return et(e, s);
17
17
  };
18
- function N(t) {
19
- return t ? typeof t != "string" ? N(String(t)) : t.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (s, e) => (e > 0 ? "-" : "") + s.toLowerCase()) : "";
18
+ function M(t) {
19
+ return t ? typeof t != "string" ? M(String(t)) : t.replace(/\s/g, "-").replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g, (s, e) => (e > 0 ? "-" : "") + s.toLowerCase()) : "";
20
20
  }
21
- const et = (t, s) => {
21
+ const ot = (t, s) => {
22
22
  if (typeof t != "string") return { result: t };
23
23
  if (!s) return { result: t };
24
24
  const e = [];
25
25
  return Object.values(s).forEach((n) => {
26
- const { pattern: o, transform: y } = n;
26
+ const { pattern: o, transform: p } = n;
27
27
  t = t.replace(o, (g) => {
28
- const { value: p, css: c } = y(g);
29
- return c && e.push(c), p;
28
+ const { value: a, css: c } = p(g);
29
+ return c && e.push(c), a;
30
30
  });
31
31
  }), { result: t, additionalCss: e };
32
- }, z = (t) => typeof t != "string" ? { result: t } : /\{[^{}]+\}/g.test(t) ? { result: t.replace(/\{([^{}]+)\}/g, (...n) => `var(--${N(n[1].replaceAll(".", "-"))})`) } : { result: t }, E = (t, s, e, n) => {
32
+ }, H = (t) => typeof t != "string" ? { result: t } : /\{[^{}]+\}/g.test(t) ? { result: t.replace(/\{([^{}]+)\}/g, (...n) => `var(--${M(n[1].replaceAll(".", "-"))})`) } : { result: t }, E = (t, s, e, n) => {
33
33
  if (!t) return "";
34
- const o = [], y = Object.entries(t).reduce((p, [c, r]) => {
35
- const l = c.trim();
34
+ const o = [], p = Object.entries(t).reduce((a, [c, r]) => {
35
+ const f = c.trim();
36
36
  if (typeof r == "function" && (r = r()), typeof r == "object") {
37
- if (!r) return p;
38
- if (l === "variants")
39
- return Object.entries(r).forEach(([i, f]) => {
40
- f && Object.entries(f).forEach(([h, m]) => {
37
+ if (!r) return a;
38
+ if (f === "variants")
39
+ return Object.entries(r).forEach(([i, u]) => {
40
+ u && Object.entries(u).forEach(([h, m]) => {
41
41
  if (!m) return;
42
42
  const S = `${s}.${i}-${h}`, $ = E(m, S);
43
43
  o.push($);
44
44
  });
45
- }), p;
46
- if (l === "defaultVariants")
47
- return p;
48
- if (l === "compoundVariants")
45
+ }), a;
46
+ if (f === "defaultVariants")
47
+ return a;
48
+ if (f === "compoundVariants")
49
49
  return r.forEach((i) => {
50
- const { css: f, ...h } = i, m = Object.entries(h).reduce(($, [w, D]) => `${$}.${w}-${D}`, s), S = E(f, m);
50
+ const { css: u, ...h } = i, m = Object.entries(h).reduce(($, [w, D]) => `${$}.${w}-${D}`, s), S = E(u, m);
51
51
  o.push(S);
52
- }), p;
53
- if (l.startsWith("@")) {
54
- const i = E(r, s), f = `${l} {
52
+ }), a;
53
+ if (f.startsWith("@")) {
54
+ const i = E(r, s), u = `${f} {
55
55
  ${i.replace(`
56
56
  `, `
57
57
  `)}
58
58
  }`;
59
- return o.push(f), p;
59
+ return o.push(u), a;
60
60
  }
61
- const d = c.includes("&") ? l.replace("&", s) : l.startsWith(":") ? `${s}${l}` : `${s} ${l}`, C = E(r, d);
62
- return o.push(C), p;
61
+ const d = c.includes("&") ? f.replace("&", s) : f.startsWith(":") ? `${s}${f}` : `${s} ${f}`, x = E(r, d);
62
+ return o.push(x), a;
63
63
  }
64
- const x = l.startsWith("-") ? l : N(l), b = (d, C = ";") => p = `${p}${d}${C}`, a = (d) => b(`${x}:${d}`);
65
- if (typeof r == "number") return a(r);
64
+ const C = f.startsWith("-") ? f : M(f), b = (d, x = ";") => a = `${a}${d}${x}`, l = (d) => b(`${C}:${d}`);
65
+ if (typeof r == "number") return l(r);
66
66
  if (typeof r != "string")
67
67
  if ("toString" in r) r = r.toString();
68
- else return p;
68
+ else return a;
69
69
  const { modifiers: j } = {}, F = function* () {
70
- yield z(r), yield et(r, j);
70
+ yield H(r), yield ot(r, j);
71
71
  }();
72
- for (const { result: d, additionalCss: C = [] } of F)
73
- r = d, C.forEach((i) => {
74
- const f = E(i, "");
75
- b(f, "");
72
+ for (const { result: d, additionalCss: x = [] } of F)
73
+ r = d, x.forEach((i) => {
74
+ const u = E(i, "");
75
+ b(u, "");
76
76
  });
77
- return a(r);
77
+ return l(r);
78
78
  }, "");
79
- if (!y) return o.join(`
79
+ if (!p) return o.join(`
80
80
  `);
81
- if (!s) return y;
81
+ if (!s) return p;
82
82
  let g = "";
83
- return g = `${s} { ${y} }`, [g, ...o].join(`
83
+ return g = `${s} { ${p} }`, [g, ...o].join(`
84
84
  `);
85
- }, H = (t, s = []) => {
85
+ }, J = (t, s = []) => {
86
86
  if (!t) return "";
87
87
  const e = [], n = {};
88
- if (Object.entries(t).forEach(([o, y]) => {
89
- if (typeof y == "object") {
90
- if (!y) return;
91
- const g = o.trim(), p = H(y, [...s, g]);
92
- e.push(p);
88
+ if (Object.entries(t).forEach(([o, p]) => {
89
+ if (typeof p == "object") {
90
+ if (!p) return;
91
+ const g = o.trim(), a = J(p, [...s, g]);
92
+ e.push(a);
93
93
  } else
94
- n[o] = y;
94
+ n[o] = p;
95
95
  }), Object.keys(n).length) {
96
- const o = s.map(N).join("-"), y = E(n, `.${o}`);
97
- e.push(y);
96
+ const o = s.map(M).join("-"), p = E(n, `.${o}`);
97
+ e.push(p);
98
98
  }
99
99
  return e.join(`
100
100
  `);
101
- }, J = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = (t) => u(t, "./saltygen"), nt = ["salty", "css", "styles", "styled"], ot = (t = []) => new RegExp(`\\.(${[...nt, ...t].join("|")})\\.`), P = (t, s = []) => ot(s).test(t), rt = async (t) => {
102
- const s = V(t), e = u(t, "salty.config.ts"), n = u(s, "salty.config.js"), o = J();
103
- console.log("Module type:", o), await Z.build({
101
+ }, K = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", R = {
102
+ externalModules: []
103
+ }, q = (t) => {
104
+ if (R.externalModules.length > 0) return R.externalModules;
105
+ const s = y(t, "salty.config.ts"), n = O(s, "utf8").match(/externalModules:\s?\[(.*)\]/);
106
+ if (!n) return [];
107
+ const o = n[1].split(",").map((p) => p.replace(/['"`]/g, "").trim());
108
+ return R.externalModules = o, o;
109
+ }, V = (t) => y(t, "./saltygen"), rt = ["salty", "css", "styles", "styled"], it = (t = []) => new RegExp(`\\.(${[...rt, ...t].join("|")})\\.`), P = (t, s = []) => it(s).test(t), ct = async (t) => {
110
+ const s = V(t), e = y(t, "salty.config.ts"), n = y(s, "salty.config.js"), o = K(), p = q(t);
111
+ await z.build({
104
112
  entryPoints: [e],
105
113
  minify: !0,
106
114
  treeShaking: !0,
107
115
  bundle: !0,
108
116
  outfile: n,
109
117
  format: o,
110
- external: ["react"]
118
+ external: p
111
119
  });
112
- const y = Date.now(), { config: g } = await import(`${n}?t=${y}`);
113
- return g;
114
- }, K = async (t) => {
115
- const s = await rt(t), e = /* @__PURE__ */ new Set(), n = (i, f = []) => i ? Object.entries(i).flatMap(([h, m]) => {
120
+ const g = Date.now(), { config: a } = await import(`${n}?t=${g}`);
121
+ return a;
122
+ }, G = async (t) => {
123
+ const s = await ct(t), e = /* @__PURE__ */ new Set(), n = (i, u = []) => i ? Object.entries(i).flatMap(([h, m]) => {
116
124
  if (!m) return;
117
- if (typeof m == "object") return n(m, [...f, h]);
118
- const S = [...f, h].join(".");
125
+ if (typeof m == "object") return n(m, [...u, h]);
126
+ const S = [...u, h].join(".");
119
127
  e.add(`"${S}"`);
120
- const $ = [...f.map(N), N(h)].join("-"), { result: w } = z(m);
128
+ const $ = [...u.map(M), M(h)].join("-"), { result: w } = H(m);
121
129
  return `--${$}: ${w};`;
122
- }) : [], o = (i) => i ? Object.entries(i).flatMap(([f, h]) => {
130
+ }) : [], o = (i) => i ? Object.entries(i).flatMap(([u, h]) => {
123
131
  const m = n(h);
124
- return f === "base" ? m.join("") : `${f} { ${m.join("")} }`;
125
- }) : [], y = (i) => i ? Object.entries(i).flatMap(([f, h]) => Object.entries(h).flatMap(([m, S]) => {
126
- const $ = n(S, [f]), w = `.${f}-${m}, [data-${f}="${m}"]`, D = $.join("");
132
+ return u === "base" ? m.join("") : `${u} { ${m.join("")} }`;
133
+ }) : [], p = (i) => i ? Object.entries(i).flatMap(([u, h]) => Object.entries(h).flatMap(([m, S]) => {
134
+ const $ = n(S, [u]), w = `.${u}-${m}, [data-${u}="${m}"]`, D = $.join("");
127
135
  return `${w} { ${D} }`;
128
- })) : [], g = n(s.variables), p = o(s.responsiveVariables), c = y(s.conditionalVariables), r = V(t), l = u(r, "css/variables.css"), x = `:root { ${g.join("")} ${p.join("")} } ${c.join("")}`;
129
- T(l, x);
130
- const b = u(r, "types/css-tokens.d.ts"), j = `type VariableTokens = ${[...e].join("|") || '""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;
136
+ })) : [], g = n(s.variables), a = o(s.responsiveVariables), c = p(s.conditionalVariables), r = V(t), f = y(r, "css/variables.css"), C = `:root { ${g.join("")} ${a.join("")} } ${c.join("")}`;
137
+ T(f, C);
138
+ const b = y(r, "types/css-tokens.d.ts"), j = `type VariableTokens = ${[...e].join("|") || '""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;
131
139
  T(b, j);
132
- const k = u(r, "css/global.css"), F = E(s.global, "");
140
+ const k = y(r, "css/global.css"), F = E(s.global, "");
133
141
  T(k, F);
134
- const d = u(r, "css/templates.css"), C = H(s.templates);
135
- T(d, C);
136
- }, _ = async (t, s) => {
137
- const e = R(t), n = u(s, "js", e + ".js"), o = J();
138
- console.log("Module type:", o), await Z.build({
139
- entryPoints: [t],
142
+ const d = y(r, "css/templates.css"), x = J(s.templates);
143
+ T(d, x);
144
+ }, W = async (t, s, e) => {
145
+ const n = _(s), o = y(e, "js", n + ".js"), p = K(), g = q(t);
146
+ await z.build({
147
+ entryPoints: [s],
140
148
  minify: !0,
141
149
  treeShaking: !0,
142
150
  bundle: !0,
143
- outfile: n,
144
- format: o,
151
+ outfile: o,
152
+ format: p,
145
153
  target: ["es2022"],
146
154
  keepNames: !0,
147
- external: ["react"]
155
+ external: g
148
156
  });
149
- const y = Date.now();
150
- return await import(`${n}?t=${y}`);
151
- }, W = async (t) => {
152
- const s = V(t), e = u(s, "salty.config.js"), { config: n } = await import(e);
157
+ const a = Date.now();
158
+ return await import(`${o}?t=${a}`);
159
+ }, B = async (t) => {
160
+ const s = V(t), e = y(s, "salty.config.js"), { config: n } = await import(e);
153
161
  return n;
154
- }, it = async (t) => {
162
+ }, at = async (t) => {
155
163
  try {
156
- const s = [], e = [], n = V(t), o = u(n, "index.css");
164
+ const s = [], e = [], n = V(t), o = y(n, "index.css");
157
165
  (() => {
158
- X(n) && U("rm -rf " + n), M(n), M(u(n, "css")), M(u(n, "types"));
159
- })(), await K(t);
160
- const g = await W(t);
161
- async function p(a, j) {
162
- const k = ["node_modules", "saltygen"], F = Y(a);
166
+ Q(n) && Y("rm -rf " + n), A(n), A(y(n, "css")), A(y(n, "types"));
167
+ })(), await G(t);
168
+ const g = await B(t);
169
+ async function a(l, j) {
170
+ const k = ["node_modules", "saltygen"], F = v(l);
163
171
  if (F.isDirectory()) {
164
- const d = Q(a);
165
- if (k.some((i) => a.includes(i))) return;
166
- await Promise.all(d.map((i) => p(u(a, i), u(j, i))));
167
- } else if (F.isFile() && P(a)) {
168
- const C = await _(a, n), i = [];
169
- Object.entries(C).forEach(([S, $]) => {
172
+ const d = tt(l);
173
+ if (k.some((i) => l.includes(i))) return;
174
+ await Promise.all(d.map((i) => a(y(l, i), y(j, i))));
175
+ } else if (F.isFile() && P(l)) {
176
+ const x = await W(t, l, n), i = [];
177
+ Object.entries(x).forEach(([S, $]) => {
170
178
  if ($.isKeyframes && $.css) {
171
- const B = `${$.animationName}.css`, G = `css/${B}`, L = u(n, G);
172
- s.push(B), T(L, $.css);
179
+ const I = `${$.animationName}.css`, U = `css/${I}`, X = y(n, U);
180
+ s.push(I), T(X, $.css);
173
181
  return;
174
182
  }
175
183
  if (!$.generator) return;
@@ -178,110 +186,110 @@ const et = (t, s) => {
178
186
  config: g
179
187
  }), D = `${w.hash}-${w.priority}.css`;
180
188
  e[w.priority] || (e[w.priority] = []), e[w.priority].push(D), i.push(D);
181
- const O = `css/${D}`, q = u(n, O);
182
- T(q, w.css);
189
+ const N = `css/${D}`, L = y(n, N);
190
+ T(L, w.css);
183
191
  });
184
- const f = i.map((S) => `@import url('./${S}');`).join(`
185
- `), h = R(a, 6), m = u(n, `css/${h}.css`);
186
- T(m, f);
192
+ const u = i.map((S) => `@import url('./${S}');`).join(`
193
+ `), h = _(l, 6), m = y(n, `css/${h}.css`);
194
+ T(m, u);
187
195
  }
188
196
  }
189
- await p(t, n);
190
- const c = s.map((a) => `@import url('./css/${a}');`).join(`
197
+ await a(t, n);
198
+ const c = s.map((l) => `@import url('./css/${l}');`).join(`
191
199
  `);
192
200
  let b = `@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
193
201
 
194
- ${["variables.css", "global.css", "templates.css"].filter((a) => {
202
+ ${["variables.css", "global.css", "templates.css"].filter((l) => {
195
203
  try {
196
- return A(u(n, "css", a), "utf8").length > 0;
204
+ return O(y(n, "css", l), "utf8").length > 0;
197
205
  } catch {
198
206
  return !1;
199
207
  }
200
- }).map((a) => `@import url('./css/${a}');`).join(`
208
+ }).map((l) => `@import url('./css/${l}');`).join(`
201
209
  `)}
202
210
  ${c}`;
203
211
  if (g.importStrategy !== "component") {
204
- const a = e.flat().map((j) => `@import url('./css/${j}');`).join(`
212
+ const l = e.flat().map((j) => `@import url('./css/${j}');`).join(`
205
213
  `);
206
- b += a;
214
+ b += l;
207
215
  }
208
216
  T(o, b);
209
217
  } catch (s) {
210
218
  console.error(s);
211
219
  }
212
- }, ct = async (t, s) => {
220
+ }, lt = async (t, s) => {
213
221
  try {
214
- const e = [], n = u(t, "./saltygen"), o = u(n, "index.css");
222
+ const e = [], n = y(t, "./saltygen"), o = y(n, "index.css");
215
223
  if (P(s)) {
216
- const g = await W(t), p = await _(s, n);
217
- Object.entries(p).forEach(([b, a]) => {
218
- if (!a.generator) return;
219
- const j = a.generator._withBuildContext({
224
+ const g = await B(t), a = await W(t, s, n);
225
+ Object.entries(a).forEach(([b, l]) => {
226
+ if (!l.generator) return;
227
+ const j = l.generator._withBuildContext({
220
228
  name: b,
221
229
  config: g
222
- }), k = `${j.hash}-${j.priority}.css`, F = `css/${k}`, d = u(n, F);
230
+ }), k = `${j.hash}-${j.priority}.css`, F = `css/${k}`, d = y(n, F);
223
231
  e.push(k), T(d, j.css);
224
232
  });
225
- const c = A(o, "utf8").split(`
226
- `), r = e.map((b) => `@import url('../saltygen/css/${b}');`), x = [.../* @__PURE__ */ new Set([...c, ...r])].join(`
233
+ const c = O(o, "utf8").split(`
234
+ `), r = e.map((b) => `@import url('../saltygen/css/${b}');`), C = [.../* @__PURE__ */ new Set([...c, ...r])].join(`
227
235
  `);
228
- T(o, x);
236
+ T(o, C);
229
237
  }
230
238
  } catch (e) {
231
239
  console.error(e);
232
240
  }
233
- }, at = async (t, s) => {
241
+ }, ft = async (t, s) => {
234
242
  try {
235
- const e = u(t, "./saltygen");
243
+ const e = y(t, "./saltygen");
236
244
  if (P(s)) {
237
- const o = A(s, "utf8");
238
- o.replace(/^(?!export\s)const\s.*/gm, (l) => `export ${l}`) !== o && await v(s, o);
239
- const g = await W(t), p = await _(s, e);
245
+ const o = O(s, "utf8");
246
+ o.replace(/^(?!export\s)const\s.*/gm, (f) => `export ${f}`) !== o && await st(s, o);
247
+ const g = await B(t), a = await W(t, s, e);
240
248
  let c = o;
241
- Object.entries(p).forEach(([l, x]) => {
249
+ Object.entries(a).forEach(([f, C]) => {
242
250
  var D;
243
- if (x.isKeyframes || !x.generator) return;
244
- const b = x.generator._withBuildContext({
245
- name: l,
251
+ if (C.isKeyframes || !C.generator) return;
252
+ const b = C.generator._withBuildContext({
253
+ name: f,
246
254
  config: g
247
- }), a = new RegExp(`\\s${l}[=\\s]+[^()]+styled\\(([^,]+),`, "g").exec(o);
248
- if (!a) return console.error("Could not find the original declaration");
249
- const j = (D = a.at(1)) == null ? void 0 : D.trim(), k = new RegExp(`\\s${l}[=\\s]+styled\\(`, "g").exec(c);
255
+ }), l = new RegExp(`\\s${f}[=\\s]+[^()]+styled\\(([^,]+),`, "g").exec(o);
256
+ if (!l) return console.error("Could not find the original declaration");
257
+ const j = (D = l.at(1)) == null ? void 0 : D.trim(), k = new RegExp(`\\s${f}[=\\s]+styled\\(`, "g").exec(c);
250
258
  if (!k) return console.error("Could not find the original declaration");
251
259
  const { index: F } = k;
252
260
  let d = !1;
253
- const C = setTimeout(() => d = !0, 5e3);
254
- let i = 0, f = !1, h = 0;
255
- for (; !f && !d; ) {
256
- const O = c[F + i];
257
- O === "(" && h++, O === ")" && h--, h === 0 && O === ")" && (f = !0), i > c.length && (d = !0), i++;
261
+ const x = setTimeout(() => d = !0, 5e3);
262
+ let i = 0, u = !1, h = 0;
263
+ for (; !u && !d; ) {
264
+ const N = c[F + i];
265
+ N === "(" && h++, N === ")" && h--, h === 0 && N === ")" && (u = !0), i > c.length && (d = !0), i++;
258
266
  }
259
- if (!d) clearTimeout(C);
267
+ if (!d) clearTimeout(x);
260
268
  else throw new Error("Failed to find the end of the styled call and timed out");
261
- const m = F + i, S = c.slice(F, m), $ = c, w = ` ${l} = styled(${j}, "${b.classNames}", "${b._callerName}", ${JSON.stringify(b.props)});`;
262
- c = c.replace(S, w), $ === c && console.error("Minimize file failed to change content", { name: l, tagName: j });
269
+ const m = F + i, S = c.slice(F, m), $ = c, w = ` ${f} = styled(${j}, "${b.classNames}", "${b._callerName}", ${JSON.stringify(b.props)});`;
270
+ c = c.replace(S, w), $ === c && console.error("Minimize file failed to change content", { name: f, tagName: j });
263
271
  });
264
- const r = R(s, 6);
272
+ const r = _(s, 6);
265
273
  return g.importStrategy === "component" && (c = `import '../../saltygen/css/${r}.css';
266
274
  ${c}`), c = c.replace("{ styled }", "{ styledClient as styled }"), c = c.replace("@salty-css/react/styled", "@salty-css/react/styled-client"), c;
267
275
  }
268
276
  } catch (e) {
269
277
  console.error("Error in minimizeFile:", e);
270
278
  }
271
- }, yt = (t) => ({
279
+ }, dt = (t) => ({
272
280
  name: "stylegen",
273
- buildStart: () => it(t),
281
+ buildStart: () => at(t),
274
282
  load: async (s) => {
275
283
  if (P(s))
276
- return await at(t, s);
284
+ return await ft(t, s);
277
285
  },
278
286
  watchChange: {
279
287
  handler: async (s) => {
280
- P(s) && await ct(t, s), s.includes("salty.config") && await K(t);
288
+ P(s) && await lt(t, s), s.includes("salty.config") && await G(t);
281
289
  }
282
290
  }
283
291
  });
284
292
  export {
285
- yt as default,
286
- yt as saltyPlugin
293
+ dt as default,
294
+ dt as saltyPlugin
287
295
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/vite",
3
- "version": "0.0.1-alpha.60",
3
+ "version": "0.0.1-alpha.62",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -29,6 +29,6 @@
29
29
  }
30
30
  },
31
31
  "dependencies": {
32
- "@salty-css/core": "^0.0.1-alpha.60"
32
+ "@salty-css/core": "^0.0.1-alpha.62"
33
33
  }
34
34
  }