@salty-css/core 0.0.1-alpha.70 → 0.0.1-alpha.72

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.
@@ -1,11 +1,11 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("esbuild"),A=require("child_process"),M=require("../dash-case-DKzpenwY.cjs"),o=require("path"),l=require("fs"),X=require("fs/promises"),v=require("../parse-templates-DVK3iZIl.cjs");var R=typeof document<"u"?document.currentScript:null;function Y(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const e=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(s,n,e.get?e:{enumerable:!0,get:()=>t[n]})}}return s.default=t,Object.freeze(s)}const I=Y(J),z=()=>(typeof document>"u"?require("url").pathToFileURL(__filename).href:R&&R.tagName.toUpperCase()==="SCRIPT"&&R.src||new URL("compiler/index.cjs",document.baseURI).href).endsWith(".cjs")?"cjs":"esm",V={externalModules:[]},B=t=>{if(V.externalModules.length>0)return V.externalModules;const s=o.join(t,"salty.config.ts"),e=l.readFileSync(s,"utf8").match(/externalModules:\s?\[(.*)\]/);if(!e)return[];const a=e[1].split(",").map(F=>F.replace(/['"`]/g,"").trim());return V.externalModules=a,a},N=t=>o.join(t,"./saltygen"),H=["salty","css","styles","styled"],U=(t=[])=>new RegExp(`\\.(${[...H,...t].join("|")})\\.`),E=(t,s=[])=>U(s).test(t),Z=async t=>{const s=N(t),n=o.join(t,"salty.config.ts"),e=o.join(s,"salty.config.js"),a=z(),F=B(t);await I.build({entryPoints:[n],minify:!0,treeShaking:!0,bundle:!0,outfile:e,format:a,external:F});const f=Date.now(),{config:g}=await import(`${e}?t=${f}`);return g},W=async t=>{const s=await Z(t),n=new Set,e=(c,u=[])=>c?Object.entries(c).flatMap(([d,p])=>{if(!p)return;if(typeof p=="object")return e(p,[...u,d]);const C=[...u,d].join(".");n.add(`"${C}"`);const h=[...u.map(M.dashCase),M.dashCase(d)].join("-"),{result:j}=v.parseValueTokens(p);return`--${h}: ${j};`}):[],a=c=>c?Object.entries(c).flatMap(([u,d])=>{const p=e(d);return u==="base"?p.join(""):`${u} { ${p.join("")} }`}):[],F=c=>c?Object.entries(c).flatMap(([u,d])=>Object.entries(d).flatMap(([p,C])=>{const h=e(C,[u]),j=`.${u}-${p}, [data-${u}="${p}"]`,D=h.join("");return`${j} { ${D} }`})):[],f=e(s.variables),g=a(s.responsiveVariables),i=F(s.conditionalVariables),w=N(t),S=o.join(w,"css/variables.css"),T=`:root { ${f.join("")} ${g.join("")} } ${i.join("")}`;l.writeFileSync(S,T);const m=o.join(w,"types/css-tokens.d.ts"),y=`type VariableTokens = ${[...n].join("|")||'""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;l.writeFileSync(m,y);const x=o.join(w,"css/global.css"),$=v.parseStyles(s.global,"");l.writeFileSync(x,$);const b=o.join(w,"css/templates.css"),k=v.parseTemplates(s.templates);l.writeFileSync(b,k)},O=async(t,s,n)=>{const e=M.toHash(s),a=o.join(n,"js",e+".js"),F=z(),f=B(t);await I.build({entryPoints:[s],minify:!0,treeShaking:!0,bundle:!0,outfile:a,format:F,target:["es2022"],keepNames:!0,external:f});const g=Date.now();return await import(`${a}?t=${g}`)},_=async t=>{const s=N(t),n=o.join(s,"salty.config.js"),{config:e}=await import(n);return e},Q=async t=>{try{const s=[],n=[],e=N(t),a=o.join(e,"index.css");(()=>{l.existsSync(e)&&A.execSync("rm -rf "+e),l.mkdirSync(e),l.mkdirSync(o.join(e,"css")),l.mkdirSync(o.join(e,"types"))})(),await W(t);const f=await _(t);async function g(r,y){const x=["node_modules","saltygen"],$=l.statSync(r);if($.isDirectory()){const b=l.readdirSync(r);if(x.some(c=>r.includes(c)))return;await Promise.all(b.map(c=>g(o.join(r,c),o.join(y,c))))}else if($.isFile()&&E(r)){const k=await O(t,r,e),c=[];Object.entries(k).forEach(([C,h])=>{if(h.isKeyframes&&h.css){const q=`${h.animationName}.css`,L=`css/${q}`,G=o.join(e,L);s.push(q),l.writeFileSync(G,h.css);return}if(!h.generator)return;const j=h.generator._withBuildContext({name:C,config:f}),D=`${j.hash}-${j.priority}.css`;n[j.priority]||(n[j.priority]=[]),n[j.priority].push(D),c.push(D);const P=`css/${D}`,K=o.join(e,P);l.writeFileSync(K,j.css)});const u=c.map(C=>`@import url('./${C}');`).join(`
2
- `),d=M.toHash(r,6),p=o.join(e,`css/${d}.css`);l.writeFileSync(p,u)}}await g(t,e);const i=s.map(r=>`@import url('./css/${r}');`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("esbuild"),A=require("child_process"),N=require("../dash-case-DKzpenwY.cjs"),o=require("path"),l=require("fs"),X=require("fs/promises"),_=require("../parse-templates-DVK3iZIl.cjs");var k=typeof document<"u"?document.currentScript:null;function Y(e){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const t=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(s,n,t.get?t:{enumerable:!0,get:()=>e[n]})}}return s.default=e,Object.freeze(s)}const I=Y(J),U=()=>(console.log("current meta url:",typeof document>"u"?require("url").pathToFileURL(__filename).href:k&&k.tagName.toUpperCase()==="SCRIPT"&&k.src||new URL("compiler/index.cjs",document.baseURI).href),(typeof document>"u"?require("url").pathToFileURL(__filename).href:k&&k.tagName.toUpperCase()==="SCRIPT"&&k.src||new URL("compiler/index.cjs",document.baseURI).href).endsWith(".cjs")?"cjs":"esm"),v={externalModules:[]},z=e=>{if(v.externalModules.length>0)return v.externalModules;const s=o.join(e,"salty.config.ts"),t=l.readFileSync(s,"utf8").match(/externalModules:\s?\[(.*)\]/);if(!t)return[];const a=t[1].split(",").map(F=>F.replace(/['"`]/g,"").trim());return v.externalModules=a,a},R=e=>o.join(e,"./saltygen"),B=["salty","css","styles","styled"],H=(e=[])=>new RegExp(`\\.(${[...B,...e].join("|")})\\.`),E=(e,s=[])=>H(s).test(e),Z=async e=>{const s=R(e),n=o.join(e,"salty.config.ts"),t=o.join(s,"salty.config.js"),a=U(),F=z(e);await I.build({entryPoints:[n],minify:!0,treeShaking:!0,bundle:!0,outfile:t,format:a,external:F});const f=Date.now(),{config:g}=await import(`${t}?t=${f}`);return g},L=async e=>{const s=await Z(e),n=new Set,t=(c,u=[])=>c?Object.entries(c).flatMap(([y,p])=>{if(!p)return;if(typeof p=="object")return t(p,[...u,y]);const x=[...u,y].join(".");n.add(`"${x}"`);const h=[...u.map(N.dashCase),N.dashCase(y)].join("-"),{result:j}=_.parseValueTokens(p);return`--${h}: ${j};`}):[],a=c=>c?Object.entries(c).flatMap(([u,y])=>{const p=t(y);return u==="base"?p.join(""):`${u} { ${p.join("")} }`}):[],F=c=>c?Object.entries(c).flatMap(([u,y])=>Object.entries(y).flatMap(([p,x])=>{const h=t(x,[u]),j=`.${u}-${p}, [data-${u}="${p}"]`,D=h.join("");return`${j} { ${D} }`})):[],f=t(s.variables),g=a(s.responsiveVariables),i=F(s.conditionalVariables),w=R(e),S=o.join(w,"css/variables.css"),T=`:root { ${f.join("")} ${g.join("")} } ${i.join("")}`;l.writeFileSync(S,T);const m=o.join(w,"types/css-tokens.d.ts"),d=`type VariableTokens = ${[...n].join("|")||'""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;l.writeFileSync(m,d);const C=o.join(w,"css/global.css"),$=_.parseStyles(s.global,"");l.writeFileSync(C,$);const b=o.join(w,"css/templates.css"),P=_.parseTemplates(s.templates);l.writeFileSync(b,P)},O=async(e,s,n)=>{const t=N.toHash(s),a=o.join(n,"js",t+".js"),F=U(),f=z(e);await I.build({entryPoints:[s],minify:!0,treeShaking:!0,bundle:!0,outfile:a,format:F,target:["es2022"],keepNames:!0,external:f});const g=Date.now();return await import(`${a}?t=${g}`)},V=async e=>{const s=R(e),n=o.join(s,"salty.config.js"),{config:t}=await import(n);return t},Q=async e=>{try{const s=[],n=[],t=R(e),a=o.join(t,"index.css");(()=>{l.existsSync(t)&&A.execSync("rm -rf "+t),l.mkdirSync(t),l.mkdirSync(o.join(t,"css")),l.mkdirSync(o.join(t,"types"))})(),await L(e);const f=await V(e);async function g(r,d){const C=["node_modules","saltygen"],$=l.statSync(r);if($.isDirectory()){const b=l.readdirSync(r);if(C.some(c=>r.includes(c)))return;await Promise.all(b.map(c=>g(o.join(r,c),o.join(d,c))))}else if($.isFile()&&E(r)){const P=await O(e,r,t),c=[];Object.entries(P).forEach(([x,h])=>{if(h.isKeyframes&&h.css){const q=`${h.animationName}.css`,K=`css/${q}`,G=o.join(t,K);s.push(q),l.writeFileSync(G,h.css);return}if(!h.generator)return;const j=h.generator._withBuildContext({name:x,config:f}),D=`${j.hash}-${j.priority}.css`;n[j.priority]||(n[j.priority]=[]),n[j.priority].push(D),c.push(D);const M=`css/${D}`,W=o.join(t,M);l.writeFileSync(W,j.css)});const u=c.map(x=>`@import url('./${x}');`).join(`
2
+ `),y=N.toHash(r,6),p=o.join(t,`css/${y}.css`);l.writeFileSync(p,u)}}await g(e,t);const i=s.map(r=>`@import url('./css/${r}');`).join(`
3
3
  `);let m=`@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
4
4
 
5
- ${["variables.css","global.css","templates.css"].filter(r=>{try{return l.readFileSync(o.join(e,"css",r),"utf8").length>0}catch{return!1}}).map(r=>`@import url('./css/${r}');`).join(`
5
+ ${["variables.css","global.css","templates.css"].filter(r=>{try{return l.readFileSync(o.join(t,"css",r),"utf8").length>0}catch{return!1}}).map(r=>`@import url('./css/${r}');`).join(`
6
6
  `)}
7
- ${i}`;if(f.importStrategy!=="component"){const r=n.flat().map(y=>`@import url('./css/${y}');`).join(`
8
- `);m+=r}l.writeFileSync(a,m)}catch(s){console.error(s)}},tt=async(t,s)=>{try{const n=[],e=o.join(t,"./saltygen"),a=o.join(e,"index.css");if(E(s)){const f=await _(t),g=await O(t,s,e);Object.entries(g).forEach(([m,r])=>{if(!r.generator)return;const y=r.generator._withBuildContext({name:m,config:f}),x=`${y.hash}-${y.priority}.css`,$=`css/${x}`,b=o.join(e,$);n.push(x),l.writeFileSync(b,y.css)});const i=l.readFileSync(a,"utf8").split(`
7
+ ${i}`;if(f.importStrategy!=="component"){const r=n.flat().map(d=>`@import url('./css/${d}');`).join(`
8
+ `);m+=r}l.writeFileSync(a,m)}catch(s){console.error(s)}},ee=async(e,s)=>{try{const n=[],t=o.join(e,"./saltygen"),a=o.join(t,"index.css");if(E(s)){const f=await V(e),g=await O(e,s,t);Object.entries(g).forEach(([m,r])=>{if(!r.generator)return;const d=r.generator._withBuildContext({name:m,config:f}),C=`${d.hash}-${d.priority}.css`,$=`css/${C}`,b=o.join(t,$);n.push(C),l.writeFileSync(b,d.css)});const i=l.readFileSync(a,"utf8").split(`
9
9
  `),w=n.map(m=>`@import url('../saltygen/css/${m}');`),T=[...new Set([...i,...w])].join(`
10
- `);l.writeFileSync(a,T)}}catch(n){console.error(n)}},et=async(t,s)=>{try{const n=o.join(t,"./saltygen");if(E(s)){const a=l.readFileSync(s,"utf8");a.replace(/^(?!export\s)const\s.*/gm,S=>`export ${S}`)!==a&&await X.writeFile(s,a);const f=await _(t),g=await O(t,s,n);let i=a;Object.entries(g).forEach(([S,T])=>{var D;if(T.isKeyframes||!T.generator)return;const m=T.generator._withBuildContext({name:S,config:f}),r=new RegExp(`\\s${S}[=\\s]+[^()]+styled\\(([^,]+),`,"g").exec(a);if(!r)return console.error("Could not find the original declaration");const y=(D=r.at(1))==null?void 0:D.trim(),x=new RegExp(`\\s${S}[=\\s]+styled\\(`,"g").exec(i);if(!x)return console.error("Could not find the original declaration");const{index:$}=x;let b=!1;const k=setTimeout(()=>b=!0,5e3);let c=0,u=!1,d=0;for(;!u&&!b;){const P=i[$+c];P==="("&&d++,P===")"&&d--,d===0&&P===")"&&(u=!0),c>i.length&&(b=!0),c++}if(!b)clearTimeout(k);else throw new Error("Failed to find the end of the styled call and timed out");const p=$+c,C=i.slice($,p),h=i,j=` ${S} = styled(${y}, "${m.classNames}", "${m._callerName}", ${JSON.stringify(m.props)});`;i=i.replace(C,j),h===i&&console.error("Minimize file failed to change content",{name:S,tagName:y})});const w=M.toHash(s,6);return f.importStrategy==="component"&&(i=`import '../../saltygen/css/${w}.css';
11
- ${i}`),i=i.replace("{ styled }","{ styledClient as styled }"),i=i.replace("@salty-css/react/styled","@salty-css/react/styled-client"),i}}catch(n){console.error("Error in minimizeFile:",n)}};exports.compileSaltyFile=O;exports.generateConfigStyles=W;exports.generateCss=Q;exports.generateFile=tt;exports.isSaltyFile=E;exports.minimizeFile=et;exports.saltyFileExtensions=H;exports.saltyFileRegExp=U;
10
+ `);l.writeFileSync(a,T)}}catch(n){console.error(n)}},te=async(e,s)=>{try{const n=o.join(e,"./saltygen");if(E(s)){const a=l.readFileSync(s,"utf8");a.replace(/^(?!export\s)const\s.*/gm,S=>`export ${S}`)!==a&&await X.writeFile(s,a);const f=await V(e),g=await O(e,s,n);let i=a;Object.entries(g).forEach(([S,T])=>{var D;if(T.isKeyframes||!T.generator)return;const m=T.generator._withBuildContext({name:S,config:f}),r=new RegExp(`\\s${S}[=\\s]+[^()]+styled\\(([^,]+),`,"g").exec(a);if(!r)return console.error("Could not find the original declaration");const d=(D=r.at(1))==null?void 0:D.trim(),C=new RegExp(`\\s${S}[=\\s]+styled\\(`,"g").exec(i);if(!C)return console.error("Could not find the original declaration");const{index:$}=C;let b=!1;const P=setTimeout(()=>b=!0,5e3);let c=0,u=!1,y=0;for(;!u&&!b;){const M=i[$+c];M==="("&&y++,M===")"&&y--,y===0&&M===")"&&(u=!0),c>i.length&&(b=!0),c++}if(!b)clearTimeout(P);else throw new Error("Failed to find the end of the styled call and timed out");const p=$+c,x=i.slice($,p),h=i,j=` ${S} = styled(${d}, "${m.classNames}", "${m._callerName}", ${JSON.stringify(m.props)});`;i=i.replace(x,j),h===i&&console.error("Minimize file failed to change content",{name:S,tagName:d})});const w=N.toHash(s,6);return f.importStrategy==="component"&&(i=`import '../../saltygen/css/${w}.css';
11
+ ${i}`),i=i.replace("{ styled }","{ styledClient as styled }"),i=i.replace("@salty-css/react/styled","@salty-css/react/styled-client"),i}}catch(n){console.error("Error in minimizeFile:",n)}};exports.compileSaltyFile=O;exports.generateConfigStyles=L;exports.generateCss=Q;exports.generateFile=ee;exports.isSaltyFile=E;exports.minimizeFile=te;exports.saltyFileExtensions=B;exports.saltyFileRegExp=H;
package/compiler/index.js CHANGED
@@ -5,7 +5,7 @@ import { join as o } from "path";
5
5
  import { writeFileSync as F, existsSync as A, mkdirSync as E, statSync as L, readdirSync as U, readFileSync as M } from "fs";
6
6
  import { writeFile as X } from "fs/promises";
7
7
  import { p as Y, a as Z, b as Q } from "../parse-templates-DUUSaubj.js";
8
- const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
8
+ const W = () => (console.log("current meta url:", import.meta.url), import.meta.url.endsWith(".cjs") ? "cjs" : "esm"), V = {
9
9
  externalModules: []
10
10
  }, H = (t) => {
11
11
  if (V.externalModules.length > 0) return V.externalModules;
@@ -24,8 +24,8 @@ const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
24
24
  format: a,
25
25
  external: w
26
26
  });
27
- const f = Date.now(), { config: y } = await import(`${s}?t=${f}`);
28
- return y;
27
+ const f = Date.now(), { config: g } = await import(`${s}?t=${f}`);
28
+ return g;
29
29
  }, nt = async (t) => {
30
30
  const e = await et(t), n = /* @__PURE__ */ new Set(), s = (i, l = []) => i ? Object.entries(i).flatMap(([m, p]) => {
31
31
  if (!p) return;
@@ -40,10 +40,10 @@ const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
40
40
  }) : [], w = (i) => i ? Object.entries(i).flatMap(([l, m]) => Object.entries(m).flatMap(([p, C]) => {
41
41
  const d = s(C, [l]), h = `.${l}-${p}, [data-${l}="${p}"]`, k = d.join("");
42
42
  return `${h} { ${k} }`;
43
- })) : [], f = s(e.variables), y = a(e.responsiveVariables), r = w(e.conditionalVariables), S = N(t), $ = o(S, "css/variables.css"), D = `:root { ${f.join("")} ${y.join("")} } ${r.join("")}`;
43
+ })) : [], f = s(e.variables), g = a(e.responsiveVariables), r = w(e.conditionalVariables), S = N(t), $ = o(S, "css/variables.css"), D = `:root { ${f.join("")} ${g.join("")} } ${r.join("")}`;
44
44
  F($, D);
45
- const g = o(S, "types/css-tokens.d.ts"), u = `type VariableTokens = ${[...n].join("|") || '""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;
46
- F(g, u);
45
+ const y = o(S, "types/css-tokens.d.ts"), u = `type VariableTokens = ${[...n].join("|") || '""'}; type PropertyValueToken = \`{\${VariableTokens}}\``;
46
+ F(y, u);
47
47
  const j = o(S, "css/global.css"), x = Y(e.global, "");
48
48
  F(j, x);
49
49
  const b = o(S, "css/templates.css"), T = Z(e.templates);
@@ -61,8 +61,8 @@ const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
61
61
  keepNames: !0,
62
62
  external: f
63
63
  });
64
- const y = Date.now();
65
- return await import(`${a}?t=${y}`);
64
+ const g = Date.now();
65
+ return await import(`${a}?t=${g}`);
66
66
  }, B = async (t) => {
67
67
  const e = N(t), n = o(e, "salty.config.js"), { config: s } = await import(n);
68
68
  return s;
@@ -73,12 +73,12 @@ const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
73
73
  A(s) && q("rm -rf " + s), E(s), E(o(s, "css")), E(o(s, "types"));
74
74
  })(), await nt(t);
75
75
  const f = await B(t);
76
- async function y(c, u) {
76
+ async function g(c, u) {
77
77
  const j = ["node_modules", "saltygen"], x = L(c);
78
78
  if (x.isDirectory()) {
79
79
  const b = U(c);
80
80
  if (j.some((i) => c.includes(i))) return;
81
- await Promise.all(b.map((i) => y(o(c, i), o(u, i))));
81
+ await Promise.all(b.map((i) => g(o(c, i), o(u, i))));
82
82
  } else if (x.isFile() && O(c)) {
83
83
  const T = await R(t, c, s), i = [];
84
84
  Object.entries(T).forEach(([C, d]) => {
@@ -101,10 +101,10 @@ const W = () => import.meta.url.endsWith(".cjs") ? "cjs" : "esm", V = {
101
101
  F(p, l);
102
102
  }
103
103
  }
104
- await y(t, s);
104
+ await g(t, s);
105
105
  const r = e.map((c) => `@import url('./css/${c}');`).join(`
106
106
  `);
107
- let g = `@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
107
+ let y = `@layer l0, l1, l2, l3, l4, l5, l6, l7, l8;
108
108
 
109
109
  ${["variables.css", "global.css", "templates.css"].filter((c) => {
110
110
  try {
@@ -118,9 +118,9 @@ ${r}`;
118
118
  if (f.importStrategy !== "component") {
119
119
  const c = n.flat().map((u) => `@import url('./css/${u}');`).join(`
120
120
  `);
121
- g += c;
121
+ y += c;
122
122
  }
123
- F(a, g);
123
+ F(a, y);
124
124
  } catch (e) {
125
125
  console.error(e);
126
126
  }
@@ -128,17 +128,17 @@ ${r}`;
128
128
  try {
129
129
  const n = [], s = o(t, "./saltygen"), a = o(s, "index.css");
130
130
  if (O(e)) {
131
- const f = await B(t), y = await R(t, e, s);
132
- Object.entries(y).forEach(([g, c]) => {
131
+ const f = await B(t), g = await R(t, e, s);
132
+ Object.entries(g).forEach(([y, c]) => {
133
133
  if (!c.generator) return;
134
134
  const u = c.generator._withBuildContext({
135
- name: g,
135
+ name: y,
136
136
  config: f
137
137
  }), j = `${u.hash}-${u.priority}.css`, x = `css/${j}`, b = o(s, x);
138
138
  n.push(j), F(b, u.css);
139
139
  });
140
140
  const r = M(a, "utf8").split(`
141
- `), S = n.map((g) => `@import url('../saltygen/css/${g}');`), D = [.../* @__PURE__ */ new Set([...r, ...S])].join(`
141
+ `), S = n.map((y) => `@import url('../saltygen/css/${y}');`), D = [.../* @__PURE__ */ new Set([...r, ...S])].join(`
142
142
  `);
143
143
  F(a, D);
144
144
  }
@@ -151,12 +151,12 @@ ${r}`;
151
151
  if (O(e)) {
152
152
  const a = M(e, "utf8");
153
153
  a.replace(/^(?!export\s)const\s.*/gm, ($) => `export ${$}`) !== a && await X(e, a);
154
- const f = await B(t), y = await R(t, e, n);
154
+ const f = await B(t), g = await R(t, e, n);
155
155
  let r = a;
156
- Object.entries(y).forEach(([$, D]) => {
156
+ Object.entries(g).forEach(([$, D]) => {
157
157
  var k;
158
158
  if (D.isKeyframes || !D.generator) return;
159
- const g = D.generator._withBuildContext({
159
+ const y = D.generator._withBuildContext({
160
160
  name: $,
161
161
  config: f
162
162
  }), c = new RegExp(`\\s${$}[=\\s]+[^()]+styled\\(([^,]+),`, "g").exec(a);
@@ -173,7 +173,7 @@ ${r}`;
173
173
  }
174
174
  if (!b) clearTimeout(T);
175
175
  else throw new Error("Failed to find the end of the styled call and timed out");
176
- const p = x + i, C = r.slice(x, p), d = r, h = ` ${$} = styled(${u}, "${g.classNames}", "${g._callerName}", ${JSON.stringify(g.props)});`;
176
+ const p = x + i, C = r.slice(x, p), d = r, h = ` ${$} = styled(${u}, "${y.classNames}", "${y._callerName}", ${JSON.stringify(y.props)});`;
177
177
  r = r.replace(C, h), d === r && console.error("Minimize file failed to change content", { name: $, tagName: u });
178
178
  });
179
179
  const S = v(e, 6);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/core",
3
- "version": "0.0.1-alpha.70",
3
+ "version": "0.0.1-alpha.72",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",