@salty-css/react 0.0.1-alpha.243 → 0.0.1-alpha.245

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/class-name.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./styles-generator-8NpkIaYx.cjs");class a extends r.StylesGenerator{constructor(e){super(e),this._params=e}}const n=s=>{const e=new a(s),t=new String(e.cssClassName);return Object.assign(t,{get isClassName(){return!0},generator:e}),t};exports.className=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./styles-generator-BvW5rzpp.cjs");class a extends r.StylesGenerator{constructor(e){super(e),this._params=e}}const n=s=>{const e=new a(s),t=new String(e.cssClassName);return Object.assign(t,{get isClassName(){return!0},generator:e}),t};exports.className=n;
package/class-name.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as r } from "./styles-generator-DFuecG24.js";
1
+ import { S as r } from "./styles-generator-Bn-B7D2c.js";
2
2
  class a extends r {
3
3
  constructor(s) {
4
4
  super(s), this._params = s;
package/keyframes.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./parse-styles-E95SeoXv.cjs"),w=async({animationName:l,params:u,appendInitialStyles:y,...t})=>{const e=l||i.toHash(t),r=async(n={})=>{const{duration:s="500ms",easing:o="ease-in-out",delay:c="0s",iterationCount:S="1",direction:p="normal",fillMode:g="forwards",playState:b="running"}={...u,...n},a=`${e} ${s} ${o} ${c} ${S} ${p} ${g} ${b}`;if(!y)return a;const m=t.from||t["0%"];if(!m)return a;const j=await i.parseAndJoinStyles(m,"");return`${a};${j}`},$=Object.entries(t).map(async([n,s])=>{if(!s)return"";const o=await i.parseAndJoinStyles(s,"");return`${typeof n=="number"?`${n}%`:n}{${o}}`}),d=(await Promise.all($)).join(""),f=`@keyframes ${e} {${d}}`;return Object.assign(r,{toString:r,isKeyframes:!0,animationName:e,css:f,keyframes:t}),r};exports.keyframes=w;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./parse-styles-Dbs9sKzP.cjs"),w=async({animationName:l,params:u,appendInitialStyles:y,...t})=>{const e=l||i.toHash(t),r=async(n={})=>{const{duration:s="500ms",easing:o="ease-in-out",delay:c="0s",iterationCount:S="1",direction:p="normal",fillMode:g="forwards",playState:b="running"}={...u,...n},a=`${e} ${s} ${o} ${c} ${S} ${p} ${g} ${b}`;if(!y)return a;const m=t.from||t["0%"];if(!m)return a;const j=await i.parseAndJoinStyles(m,"");return`${a};${j}`},$=Object.entries(t).map(async([n,s])=>{if(!s)return"";const o=await i.parseAndJoinStyles(s,"");return`${typeof n=="number"?`${n}%`:n}{${o}}`}),d=(await Promise.all($)).join(""),f=`@keyframes ${e} {${d}}`;return Object.assign(r,{toString:r,isKeyframes:!0,animationName:e,css:f,keyframes:t}),r};exports.keyframes=w;
package/keyframes.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as j, p as m } from "./parse-styles-WRUkAmCD.js";
1
+ import { t as j, p as m } from "./parse-styles-BmW7IL0U.js";
2
2
  const h = async ({ animationName: $, params: l, appendInitialStyles: u, ...t }) => {
3
3
  const r = $ || j(t), e = async (n = {}) => {
4
4
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/react",
3
- "version": "0.0.1-alpha.243",
3
+ "version": "0.0.1-alpha.245",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -66,7 +66,7 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "@salty-css/core": "^0.0.1-alpha.243",
69
+ "@salty-css/core": "^0.0.1-alpha.245",
70
70
  "clsx": ">=2.x",
71
71
  "react": ">=19.x || >=18.3.x"
72
72
  }
@@ -52,25 +52,25 @@ const J = (e) => (s) => {
52
52
  if (!e) throw new Error("No styles provided to parseStyles function!");
53
53
  const o = /* @__PURE__ */ new Set(), j = Object.entries(e), y = async ([u, r]) => {
54
54
  var E;
55
- const n = u.trim(), w = I(n), l = (d, c = ";") => `${w}:${d}${c}`, P = { scope: s, config: t };
55
+ const n = u.trim(), w = I(n), l = (c, d = ";") => `${w}:${c}${d}`, P = { scope: s, config: t };
56
56
  if (typeof r == "function") return y([u, r(P)]);
57
57
  if (r instanceof Promise) return y([u, await r]);
58
58
  if (t != null && t.templates && t.templatePaths[n])
59
59
  try {
60
- const [d, c] = t.templatePaths[n].split(";;"), a = await import(c), f = c.includes("salty.config"), p = f ? a[d].templates : a[d], h = f ? p[n] : p.params[n];
60
+ const [c, d] = t.templatePaths[n].split(";;"), a = await import(d), f = d.includes("salty.config"), p = f ? a[c].templates : a[c], h = f ? p[n] : p.params[n];
61
61
  if (p && typeof h == "function") {
62
62
  const C = await h(r), [m] = await $(C, "");
63
63
  return m;
64
64
  }
65
- } catch (d) {
66
- console.error(`Error loading template "${n}" from path "${t.templatePaths[n]}"`, d);
65
+ } catch (c) {
66
+ console.error(`Error loading template "${n}" from path "${t.templatePaths[n]}"`, c);
67
67
  return;
68
68
  }
69
69
  if (t != null && t.templates && t.templates[n]) {
70
70
  if (i) return;
71
- const c = r.split(".").reduce((a, f) => a[f], t.templates[n]);
72
- if (c) {
73
- const [a] = await $(c, "");
71
+ const d = r.split(".").reduce((a, f) => a[f], t.templates[n]);
72
+ if (d) {
73
+ const [a] = await $(d, "");
74
74
  return a;
75
75
  }
76
76
  console.warn(`Template "${n}" with path of "${r}" was not found in config!`);
@@ -83,10 +83,10 @@ const J = (e) => (s) => {
83
83
  if (n === "variants") {
84
84
  const a = Object.entries(r);
85
85
  for (const [f, p] of a) {
86
- if (!p) return;
86
+ if (!p) continue;
87
87
  const h = Object.entries(p);
88
88
  for (const [C, m] of h) {
89
- if (!m) return;
89
+ if (!m) continue;
90
90
  const A = `${s}.${f}-${C}`;
91
91
  (await $(m, A, t)).forEach((U) => o.add(U));
92
92
  }
@@ -105,13 +105,13 @@ const J = (e) => (s) => {
105
105
  o.add(p);
106
106
  return;
107
107
  }
108
- const d = u.includes("&") ? n.replace("&", s) : n.startsWith(":") ? `${s}${n}` : `${s} ${n}`;
109
- (await $(r, d, t)).forEach((a) => o.add(a));
108
+ const c = u.includes("&") ? n.replace("&", s) : n.startsWith(":") ? `${s}${n}` : `${s} ${n}`;
109
+ (await $(r, c, t)).forEach((a) => o.add(a));
110
110
  return;
111
111
  }
112
112
  if (typeof r == "number") {
113
- const d = q(w, r, t);
114
- return l(d);
113
+ const c = q(w, r, t);
114
+ return l(c);
115
115
  }
116
116
  if (typeof r != "string")
117
117
  if ("toString" in r) r = r.toString();
@@ -123,12 +123,12 @@ const J = (e) => (s) => {
123
123
  if (!l) return l;
124
124
  const P = await w(l);
125
125
  if (!P) return l;
126
- const { transformed: E, additionalCss: d } = P;
127
- let c = "";
128
- if (d)
129
- for (const a of d)
130
- c += await M(a, "");
131
- return `${c}${E}`;
126
+ const { transformed: E, additionalCss: c } = P;
127
+ let d = "";
128
+ if (c)
129
+ for (const a of c)
130
+ d += await M(a, "");
131
+ return `${d}${E}`;
132
132
  }, Promise.resolve(r)))
133
133
  ))).filter((u) => u !== void 0).join(`
134
134
  `);
@@ -0,0 +1,5 @@
1
+ "use strict";const N=require("./parse-tokens-DfRKmjt1.cjs"),M=e=>s=>{if(typeof s!="string"||!e)return;let t=s;const a=[];return Object.values(e).forEach(o=>{const{pattern:S,transform:$}=o;t=t.replace(S,j=>{const{value:A,css:b}=$(j);return b&&a.push(b),A})}),{transformed:t,additionalCss:a}},H=e=>String.fromCharCode(e+(e>25?39:97)),T=(e,s)=>{let t="",a;for(a=Math.abs(e);a>52;a=a/52|0)t=H(a%52)+t;return t=H(a%52)+t,t.length<s?t=t.padStart(s,"a"):t.length>s&&(t=t.slice(-s)),t},U=(e,s)=>{let t=s.length;for(;t;)e=e*33^s.charCodeAt(--t);return e},q=(e,s=5)=>{const t=U(5381,JSON.stringify(e))>>>0;return T(t,s)},Q=["top","right","bottom","left","min-width",/.*width.*/,/^[^line]*height.*/,/padding.*/,/margin.*/,/border.*/,/inset.*/,/.*radius.*/,/.*spacing.*/,/.*gap.*/,/.*indent.*/,/.*offset.*/,/.*size.*/,/.*thickness.*/,/.*font-size.*/],_=(e,s,t)=>{if(Q.some(o=>typeof o=="string"?o===e:o.test(e))){const o=(t==null?void 0:t.defaultUnit)||"px";return`${s}${o}`}return`${s}`},F=["Webkit","Moz","ms","O"],I=e=>e.startsWith("-")?e:F.some(s=>e.startsWith(s))?`-${N.dashCase(e)}`:N.dashCase(e),y=async(e,s="",t,a=!1)=>{if(!e)throw new Error("No styles provided to parseStyles function!");const o=new Set,S=Object.entries(e),$=async([p,r])=>{var C;const n=p.trim(),w=I(n),l=(c,d=";")=>`${w}:${c}${d}`,P={scope:s,config:t};if(typeof r=="function")return $([p,r(P)]);if(r instanceof Promise)return $([p,await r]);if(t!=null&&t.templates&&t.templatePaths[n])try{const[c,d]=t.templatePaths[n].split(";;"),i=await import(d),f=d.includes("salty.config"),u=f?i[c].templates:i[c],h=f?u[n]:u.params[n];if(u&&typeof h=="function"){const E=await h(r),[m]=await y(E,"");return m}}catch(c){console.error(`Error loading template "${n}" from path "${t.templatePaths[n]}"`,c);return}if(t!=null&&t.templates&&t.templates[n]){if(a)return;const d=r.split(".").reduce((i,f)=>i[f],t.templates[n]);if(d){const[i]=await y(d,"");return i}console.warn(`Template "${n}" with path of "${r}" was not found in config!`);return}if(typeof r=="object"){if(!r)return;if(r.isColor)return l(r.toString());if(n==="defaultVariants")return;if(n==="variants"){const i=Object.entries(r);for(const[f,u]of i){if(!u)continue;const h=Object.entries(u);for(const[E,m]of h){if(!m)continue;const x=`${s}.${f}-${E}`;(await y(m,x,t)).forEach(J=>o.add(J))}}return}if(n==="compoundVariants"){for(const i of r){const{css:f,...u}=i,h=Object.entries(u).reduce((m,[x,z])=>`${m}.${x}-${z}`,s);(await y(f,h,t)).forEach(m=>o.add(m))}return}if(n.startsWith("@")){const i=((C=t==null?void 0:t.mediaQueries)==null?void 0:C[n])||n,f=await W(r,s,t),u=`${i} { ${f} }`;o.add(u);return}const c=p.includes("&")?n.replace("&",s):n.startsWith(":")?`${s}${n}`:`${s} ${n}`;(await y(r,c,t)).forEach(i=>o.add(i));return}if(typeof r=="number"){const c=_(w,r,t);return l(c)}if(typeof r!="string")if("toString"in r)r=r.toString();else throw new Error(`Invalid value type for property ${w}`);return l(r)},j=S.map($),{modifiers:A}=t||{},b=[N.parseValueTokens(),M(A)],O=(await Promise.all(j).then(p=>Promise.all(p.map(r=>b.reduce(async(n,w)=>{const l=await n;if(!l)return l;const P=await w(l);if(!P)return l;const{transformed:C,additionalCss:c}=P;let d="";if(c)for(const i of c)d+=await W(i,"");return`${d}${C}`},Promise.resolve(r)))))).filter(p=>p!==void 0).join(`
2
+ `);if(!O.trim())return Array.from(o);const V=s?`${s} {
3
+ ${O}
4
+ }`:O;return o.has(V)?Array.from(o):[V,...o]},W=async(e,s,t,a=!1)=>(await y(e,s,t,a)).join(`
5
+ `);exports.parseAndJoinStyles=W;exports.toHash=q;
package/styled.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./styles-generator-8NpkIaYx.cjs"),h=require("./element-factory-DjYdX8Jd.cjs");class g extends m.StylesGenerator{constructor(e,t){super(t),this.tagName=e,this._params=t}get priority(){var e;return this.params.priority?this.params.priority:typeof this.tagName=="function"||typeof this.tagName=="object"?(((e=this.tagName.generator)==null?void 0:e.priority)||0)+1:0}get clientProps(){const{element:e,variants:t={},compoundVariants:s=[],defaultVariants:d={},defaultProps:l={},passProps:u}=this.params,{callerName:y,isProduction:f}=this.buildContext,o=new Set([]),i=r=>{const a=d[r];a!==void 0?o.add(`${r}=${String(a)}`):o.add(r)};Object.keys(t).forEach(i),s.map(r=>Object.keys(r).forEach(i));const c=new Set([]);if(this.params.base){const r=JSON.stringify(this.params.base).match(/\{props\.([\w\d]+)\}/gi);r&&r.forEach(a=>{const p=a.replace(/\{props\.([\w\d]+)\}/gi,"$1");p&&c.add(p)})}return{element:e,variantKeys:[...o],propValueKeys:[...c],passProps:u,defaultProps:l,attr:{"data-component-name":f?void 0:y}}}}const b=(n,e)=>{const t=new g(n,e),s=h.elementFactory(n,t.cssClassName,t.clientProps,{"data-unoptimized-client-component":!0});return Object.assign(s,{generator:t}),s};exports.styled=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./styles-generator-BvW5rzpp.cjs"),h=require("./element-factory-DjYdX8Jd.cjs");class g extends m.StylesGenerator{constructor(e,t){super(t),this.tagName=e,this._params=t}get priority(){var e;return this.params.priority?this.params.priority:typeof this.tagName=="function"||typeof this.tagName=="object"?(((e=this.tagName.generator)==null?void 0:e.priority)||0)+1:0}get clientProps(){const{element:e,variants:t={},compoundVariants:s=[],defaultVariants:d={},defaultProps:l={},passProps:u}=this.params,{callerName:y,isProduction:f}=this.buildContext,o=new Set([]),i=r=>{const a=d[r];a!==void 0?o.add(`${r}=${String(a)}`):o.add(r)};Object.keys(t).forEach(i),s.map(r=>Object.keys(r).forEach(i));const c=new Set([]);if(this.params.base){const r=JSON.stringify(this.params.base).match(/\{props\.([\w\d]+)\}/gi);r&&r.forEach(a=>{const p=a.replace(/\{props\.([\w\d]+)\}/gi,"$1");p&&c.add(p)})}return{element:e,variantKeys:[...o],propValueKeys:[...c],passProps:u,defaultProps:l,attr:{"data-component-name":f?void 0:y}}}}const b=(n,e)=>{const t=new g(n,e),s=h.elementFactory(n,t.cssClassName,t.clientProps,{"data-unoptimized-client-component":!0});return Object.assign(s,{generator:t}),s};exports.styled=b;
package/styled.js CHANGED
@@ -1,4 +1,4 @@
1
- import { S as y } from "./styles-generator-DFuecG24.js";
1
+ import { S as y } from "./styles-generator-Bn-B7D2c.js";
2
2
  import { e as h } from "./element-factory-B1PSIJV4.js";
3
3
  class g extends y {
4
4
  constructor(e, t) {
@@ -1,7 +1,7 @@
1
1
  var c = Object.defineProperty;
2
2
  var l = (a, s, t) => s in a ? c(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
3
3
  var o = (a, s, t) => l(a, typeof s != "symbol" ? s + "" : s, t);
4
- import { t as n, p as d } from "./parse-styles-WRUkAmCD.js";
4
+ import { t as n, p as d } from "./parse-styles-BmW7IL0U.js";
5
5
  import { d as h } from "./parse-tokens-CssTiO78.js";
6
6
  class C {
7
7
  constructor(s) {
@@ -1 +1 @@
1
- "use strict";var c=Object.defineProperty;var l=(a,s,t)=>s in a?c(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var o=(a,s,t)=>l(a,typeof s!="symbol"?s+"":s,t);const n=require("./parse-styles-E95SeoXv.cjs"),h=require("./parse-tokens-DfRKmjt1.cjs");class u{constructor(s){o(this,"buildContext",{});this.params=s}get priority(){return 0}get isRoot(){return this.priority===0}get hash(){const{base:s,variants:t,compoundVariants:e}=this.params;return n.toHash({base:s,variants:t,compoundVariants:e})}get cssClassName(){return this.hash}get classNames(){const s=new Set([this.cssClassName]),{className:t}=this.params;return typeof t=="string"&&s.add(t),typeof t=="object"&&t.forEach(e=>s.add(e)),this.getTemplateClasses().forEach(e=>s.add(e)),this.buildContext.classNames&&this.buildContext.classNames.forEach(e=>s.add(e)),[...s].join(" ")}get cssFileName(){const{callerName:s}=this.buildContext;return s?`cl_${h.dashCase(s)}-${this.hash}.css`:`${this.hash}.css`}get css(){const{base:s={},variants:t={},compoundVariants:e=[]}=this.params,{config:r}=this.buildContext,i={...s,variants:t,compoundVariants:e};return n.parseAndJoinStyles(i,`.${this.cssClassName}`,r,this.isRoot)}getTemplateClasses(s=this.buildContext.config){if(!(s!=null&&s.templates)||!this.params.base||this.priority>0)return[];const t=Object.keys(s.templates);return Object.entries(this.params.base).reduce((e,[r,i])=>(t.includes(r)&&e.push("t_"+n.toHash(h.dashCase(`${r}-${i}`),4)),e),[])}_withBuildContext(s){return this.buildContext=s,this}}exports.StylesGenerator=u;
1
+ "use strict";var c=Object.defineProperty;var l=(a,s,t)=>s in a?c(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var o=(a,s,t)=>l(a,typeof s!="symbol"?s+"":s,t);const n=require("./parse-styles-Dbs9sKzP.cjs"),h=require("./parse-tokens-DfRKmjt1.cjs");class u{constructor(s){o(this,"buildContext",{});this.params=s}get priority(){return 0}get isRoot(){return this.priority===0}get hash(){const{base:s,variants:t,compoundVariants:e}=this.params;return n.toHash({base:s,variants:t,compoundVariants:e})}get cssClassName(){return this.hash}get classNames(){const s=new Set([this.cssClassName]),{className:t}=this.params;return typeof t=="string"&&s.add(t),typeof t=="object"&&t.forEach(e=>s.add(e)),this.getTemplateClasses().forEach(e=>s.add(e)),this.buildContext.classNames&&this.buildContext.classNames.forEach(e=>s.add(e)),[...s].join(" ")}get cssFileName(){const{callerName:s}=this.buildContext;return s?`cl_${h.dashCase(s)}-${this.hash}.css`:`${this.hash}.css`}get css(){const{base:s={},variants:t={},compoundVariants:e=[]}=this.params,{config:r}=this.buildContext,i={...s,variants:t,compoundVariants:e};return n.parseAndJoinStyles(i,`.${this.cssClassName}`,r,this.isRoot)}getTemplateClasses(s=this.buildContext.config){if(!(s!=null&&s.templates)||!this.params.base||this.priority>0)return[];const t=Object.keys(s.templates);return Object.entries(this.params.base).reduce((e,[r,i])=>(t.includes(r)&&e.push("t_"+n.toHash(h.dashCase(`${r}-${i}`),4)),e),[])}_withBuildContext(s){return this.buildContext=s,this}}exports.StylesGenerator=u;
@@ -1,5 +0,0 @@
1
- "use strict";const N=require("./parse-tokens-DfRKmjt1.cjs"),M=e=>s=>{if(typeof s!="string"||!e)return;let t=s;const i=[];return Object.values(e).forEach(o=>{const{pattern:S,transform:$}=o;t=t.replace(S,j=>{const{value:A,css:b}=$(j);return b&&i.push(b),A})}),{transformed:t,additionalCss:i}},H=e=>String.fromCharCode(e+(e>25?39:97)),T=(e,s)=>{let t="",i;for(i=Math.abs(e);i>52;i=i/52|0)t=H(i%52)+t;return t=H(i%52)+t,t.length<s?t=t.padStart(s,"a"):t.length>s&&(t=t.slice(-s)),t},U=(e,s)=>{let t=s.length;for(;t;)e=e*33^s.charCodeAt(--t);return e},q=(e,s=5)=>{const t=U(5381,JSON.stringify(e))>>>0;return T(t,s)},Q=["top","right","bottom","left","min-width",/.*width.*/,/^[^line]*height.*/,/padding.*/,/margin.*/,/border.*/,/inset.*/,/.*radius.*/,/.*spacing.*/,/.*gap.*/,/.*indent.*/,/.*offset.*/,/.*size.*/,/.*thickness.*/,/.*font-size.*/],_=(e,s,t)=>{if(Q.some(o=>typeof o=="string"?o===e:o.test(e))){const o=(t==null?void 0:t.defaultUnit)||"px";return`${s}${o}`}return`${s}`},F=["Webkit","Moz","ms","O"],I=e=>e.startsWith("-")?e:F.some(s=>e.startsWith(s))?`-${N.dashCase(e)}`:N.dashCase(e),y=async(e,s="",t,i=!1)=>{if(!e)throw new Error("No styles provided to parseStyles function!");const o=new Set,S=Object.entries(e),$=async([p,r])=>{var C;const n=p.trim(),w=I(n),l=(d,c=";")=>`${w}:${d}${c}`,P={scope:s,config:t};if(typeof r=="function")return $([p,r(P)]);if(r instanceof Promise)return $([p,await r]);if(t!=null&&t.templates&&t.templatePaths[n])try{const[d,c]=t.templatePaths[n].split(";;"),a=await import(c),f=c.includes("salty.config"),u=f?a[d].templates:a[d],h=f?u[n]:u.params[n];if(u&&typeof h=="function"){const E=await h(r),[m]=await y(E,"");return m}}catch(d){console.error(`Error loading template "${n}" from path "${t.templatePaths[n]}"`,d);return}if(t!=null&&t.templates&&t.templates[n]){if(i)return;const c=r.split(".").reduce((a,f)=>a[f],t.templates[n]);if(c){const[a]=await y(c,"");return a}console.warn(`Template "${n}" with path of "${r}" was not found in config!`);return}if(typeof r=="object"){if(!r)return;if(r.isColor)return l(r.toString());if(n==="defaultVariants")return;if(n==="variants"){const a=Object.entries(r);for(const[f,u]of a){if(!u)return;const h=Object.entries(u);for(const[E,m]of h){if(!m)return;const x=`${s}.${f}-${E}`;(await y(m,x,t)).forEach(J=>o.add(J))}}return}if(n==="compoundVariants"){for(const a of r){const{css:f,...u}=a,h=Object.entries(u).reduce((m,[x,z])=>`${m}.${x}-${z}`,s);(await y(f,h,t)).forEach(m=>o.add(m))}return}if(n.startsWith("@")){const a=((C=t==null?void 0:t.mediaQueries)==null?void 0:C[n])||n,f=await W(r,s,t),u=`${a} { ${f} }`;o.add(u);return}const d=p.includes("&")?n.replace("&",s):n.startsWith(":")?`${s}${n}`:`${s} ${n}`;(await y(r,d,t)).forEach(a=>o.add(a));return}if(typeof r=="number"){const d=_(w,r,t);return l(d)}if(typeof r!="string")if("toString"in r)r=r.toString();else throw new Error(`Invalid value type for property ${w}`);return l(r)},j=S.map($),{modifiers:A}=t||{},b=[N.parseValueTokens(),M(A)],O=(await Promise.all(j).then(p=>Promise.all(p.map(r=>b.reduce(async(n,w)=>{const l=await n;if(!l)return l;const P=await w(l);if(!P)return l;const{transformed:C,additionalCss:d}=P;let c="";if(d)for(const a of d)c+=await W(a,"");return`${c}${C}`},Promise.resolve(r)))))).filter(p=>p!==void 0).join(`
2
- `);if(!O.trim())return Array.from(o);const V=s?`${s} {
3
- ${O}
4
- }`:O;return o.has(V)?Array.from(o):[V,...o]},W=async(e,s,t,i=!1)=>(await y(e,s,t,i)).join(`
5
- `);exports.parseAndJoinStyles=W;exports.toHash=q;