@styleframe/transpiler 2.6.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # @styleframe/transpiler
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#133](https://github.com/styleframe-dev/styleframe/pull/133) [`ce62d31`](https://github.com/styleframe-dev/styleframe/commit/ce62d318275deed277d828fdd8d2500c1a9d767f) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Add unique id and parent-child traversal to token types, validate @ references, and resolve utility sibling keys
8
+ - Add unique `id` field to Root, Selector, AtRule, Theme, Utility, Modifier, and Variable token types for stable identity tracking
9
+ - Add `parentId` to track parent-child relationships across the token tree
10
+ - Add `root._registry` for efficient id-based lookups and tree traversal
11
+ - Validate `@`-prefixed string references against root-level variables in `parseDeclarationsBlock`, throwing descriptive errors for undefined variables
12
+ - Add null/undefined guard to `ref()` with clear error messages
13
+ - Support `@`-prefixed values in utility entries that resolve to sibling keys (e.g., `{ default: "@solid", solid: "solid" }`)
14
+
15
+ - Updated dependencies [[`295f04e`](https://github.com/styleframe-dev/styleframe/commit/295f04e6fdd011df6437986cc179e17efd8cd1be), [`71009c2`](https://github.com/styleframe-dev/styleframe/commit/71009c2c0a07a0bfd240e70e61020c8b7e923edb), [`2610041`](https://github.com/styleframe-dev/styleframe/commit/2610041beb03a8afc8de17af8857b9931f3359b0), [`7a61df0`](https://github.com/styleframe-dev/styleframe/commit/7a61df083bc534caa9271a1ef4535f7be979d7c2), [`ce62d31`](https://github.com/styleframe-dev/styleframe/commit/ce62d318275deed277d828fdd8d2500c1a9d767f)]:
16
+ - @styleframe/core@3.1.0
17
+
18
+ ## 3.0.0
19
+
20
+ ### Major Changes
21
+
22
+ - [#117](https://github.com/styleframe-dev/styleframe/pull/117) [`ffe6764`](https://github.com/styleframe-dev/styleframe/commit/ffe6764a2e6c84d5b3cfdf431bf11f17a3f3f118) Thanks [@alexgrozav](https://github.com/alexgrozav)! - Introduce global Styleframe single-instance architecture. Extension files (`*.styleframe.ts`) now share the same instance created in `styleframe.config.ts` instead of creating independent instances. This is a breaking change that affects how styles are imported and composed across files.
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies [[`266f961`](https://github.com/styleframe-dev/styleframe/commit/266f96143e9ffb47e0e6326d0e5e7cc9d974ab83), [`ffe6764`](https://github.com/styleframe-dev/styleframe/commit/ffe6764a2e6c84d5b3cfdf431bf11f17a3f3f118)]:
27
+ - @styleframe/core@3.0.0
28
+
3
29
  ## 2.6.0
4
30
 
5
31
  ### Minor Changes
@@ -1,9 +1,9 @@
1
1
  import { CamelCase } from 'scule';
2
+ import { defaultUtilitySelectorFn } from '@styleframe/core';
2
3
  import { KebabCase } from 'scule';
3
4
  import { Styleframe } from '@styleframe/core';
4
5
  import { StyleframeOptions } from '@styleframe/core';
5
6
  import { ThemeSelectorFn } from '@styleframe/core';
6
- import { UtilitySelectorFn } from '@styleframe/core';
7
7
  import { VariableNameFn } from '@styleframe/core';
8
8
 
9
9
  export declare function addIndentToLine(line: string): string;
@@ -26,7 +26,7 @@ export declare const DEFAULT_INDENT = "\t";
26
26
 
27
27
  export declare const defaultThemeSelectorFn: ThemeSelectorFn;
28
28
 
29
- export declare const defaultUtilitySelectorFn: UtilitySelectorFn;
29
+ export { defaultUtilitySelectorFn }
30
30
 
31
31
  export declare const defaultVariableNameFn: VariableNameFn;
32
32
 
@@ -54,10 +54,11 @@ export declare function toKebabCase<S extends string>(str: S): KebabCase<S>;
54
54
  export declare function transpile(instance: Styleframe, { type, consumers, }?: TranspileOptions): Promise<Output>;
55
55
 
56
56
  export declare type TranspileOptions = {
57
- type?: "css" | "ts" | "all";
57
+ type?: "css" | "ts" | "dts" | "all";
58
58
  consumers?: {
59
59
  css: ConsumeFunction;
60
60
  ts: ConsumeFunction;
61
+ dts: ConsumeFunction;
61
62
  };
62
63
  };
63
64
 
@@ -1,190 +1,53 @@
1
- const Fe = " ", F = ["charset", "import", "namespace"], L = ["layer"], D = ({ name: e }) => `[data-theme="${e}"]`, x = ({
2
- name: e,
3
- value: t,
4
- modifiers: r
5
- }) => `._${[...r, e, ...t === "default" ? [] : [t]].filter(Boolean).join("\\:").replace(/[[\].#()%,]/g, "\\$&")}`, w = ({ name: e }) => e.replace(/^\.+|\.+$/g, "").replace(/\.+/g, "--");
6
- function I(e, t) {
7
- return `@${e}${t ? " " : ""}${t}`;
8
- }
9
- const U = /\d/, P = ["-", "_", "/", "."];
10
- function M(e = "") {
11
- if (!U.test(e))
12
- return e !== e.toLowerCase();
13
- }
14
- function N(e, t) {
15
- const r = P, n = [];
16
- if (!e || typeof e != "string")
17
- return n;
18
- let o = "", s, u;
19
- for (const a of e) {
20
- const c = r.includes(a);
21
- if (c === !0) {
22
- n.push(o), o = "", s = void 0;
23
- continue;
24
- }
25
- const i = M(a);
26
- if (u === !1) {
27
- if (s === !1 && i === !0) {
28
- n.push(o), o = a, s = i;
29
- continue;
30
- }
31
- if (s === !0 && i === !1 && o.length > 1) {
32
- const f = o.at(-1);
33
- n.push(o.slice(0, Math.max(0, o.length - 1))), o = f + a, s = i;
34
- continue;
35
- }
36
- }
37
- o += a, s = i, u = c;
38
- }
39
- return n.push(o), n;
40
- }
41
- function k(e) {
42
- return e ? e[0].toUpperCase() + e.slice(1) : "";
43
- }
44
- function V(e) {
45
- return e ? e[0].toLowerCase() + e.slice(1) : "";
46
- }
47
- function q(e, t) {
48
- return e ? (Array.isArray(e) ? e : N(e)).map((r) => k(r)).join("") : "";
49
- }
50
- function K(e, t) {
51
- return V(q(e || ""));
52
- }
53
- function z(e, t) {
54
- return e ? (Array.isArray(e) ? e : N(e)).map((r) => r.toLowerCase()).join("-") : "";
55
- }
56
- function H(e) {
57
- return ` ${e}`;
58
- }
59
- function Q(e) {
60
- return e.split(`
61
- `).map((t) => H(t)).join(`
62
- `);
63
- }
64
- function J(e) {
65
- return e === e.toUpperCase();
66
- }
67
- function Z(e) {
68
- return K(e);
69
- }
70
- function W(e) {
71
- return z(e);
72
- }
73
- function G(e) {
74
- return W(e);
75
- }
76
- function O(e, t) {
77
- return `${e.startsWith("--") ? e : G(e)}: ${t};`;
78
- }
79
- function Y(e) {
80
- return `{${e.length > 0 ? `
81
- ` : ""}${e.map((t) => `${Q(`${t}`)}
82
- `).join("")}}`;
83
- }
84
- function E(e) {
85
- return `--${(e.startsWith("--") ? e.slice(2) : e).replace(/[^a-zA-Z0-9_\-\u0080-\uFFFF]/g, "-") || "unknown-variable"}`;
86
- }
87
- function X(e, t) {
88
- return O(E(e), t);
89
- }
90
- function ee(e, t) {
91
- return `var(${E(e)}${t ? `, ${t}` : ""})`;
92
- }
93
- function R(e, t) {
94
- return `${e} ${Y(t)}`;
95
- }
96
- function te(e) {
97
- return function(r, n) {
98
- return Object.entries(r).map(([o, s]) => O(o, e(s, n)));
99
- };
100
- }
101
- function B(e) {
102
- return function(r, n) {
103
- const s = (n.variables?.name ?? w)({ name: r.name });
104
- return X(s, e(r.value, n));
105
- };
106
- }
107
- function S(e) {
108
- const t = B(e), r = te(e);
109
- return function(o, s, u) {
110
- const { variables: a, declarations: c, children: i } = s, f = o === ":root", l = (a ?? []).map(
111
- (A) => t(A, u)
112
- ), m = r(
113
- c ?? {},
114
- u
115
- ), y = (i ?? []).map(
116
- (A) => e(A, u)
117
- ), p = l.length > 0, b = m.length > 0, C = y.length > 0;
118
- return f ? `${p || b ? R(o, [
119
- ...l,
120
- ...p && b ? [""] : [],
121
- ...m
122
- ]) : ""}${C && (p || b) ? `
123
-
124
- ` : ""}${y.join(`
125
-
126
- `)}` : R(o, [
127
- ...l,
128
- ...p && (C || b) ? [""] : [],
129
- ...m,
130
- ...b && C ? [""] : [],
131
- ...y.flatMap(
132
- (A, _) => _ === y.length - 1 ? [A] : [A, ""]
133
- )
134
- ]);
135
- };
136
- }
137
- function re(e) {
138
- const t = S(e);
139
- return function(n, o) {
140
- const s = F.includes(n.identifier), u = L.includes(
141
- n.identifier
142
- ), a = Object.keys(n.declarations).length > 0, c = n.variables.length > 0, i = n.children.length > 0, f = I(n.identifier, n.rule);
143
- return s || u && !(a || c || i) ? `${f};` : t(f, n, o);
144
- };
145
- }
146
- function ne(e) {
147
- return function(r, n) {
148
- return r.value.map((o) => e(o, n)).join("").trim();
149
- };
150
- }
151
- function oe(e) {
1
+ const ke = " ", I = ["charset", "import", "namespace"], U = ["layer"];
2
+ function M(e) {
152
3
  return typeof e == "object" && e !== null;
153
4
  }
154
5
  function h(e, t) {
155
- return oe(e) && "type" in e && e.type === t;
6
+ return M(e) && "type" in e && e.type === t;
156
7
  }
157
- function ce(e) {
8
+ function k(e) {
158
9
  return h(e, "variable");
159
10
  }
160
- function ue(e) {
11
+ function V(e) {
161
12
  return h(e, "reference");
162
13
  }
163
- function v(e) {
14
+ function S(e) {
164
15
  return h(e, "selector");
165
16
  }
166
- function ie(e) {
17
+ function K(e) {
167
18
  return h(e, "at-rule");
168
19
  }
169
- function se(e) {
20
+ function q(e) {
170
21
  return h(e, "utility");
171
22
  }
172
- function ae(e) {
23
+ function z(e) {
173
24
  return h(e, "css");
174
25
  }
175
- function le(e) {
26
+ function H(e) {
176
27
  return h(e, "theme");
177
28
  }
178
- function T(e) {
29
+ function N(e) {
179
30
  return h(e, "root");
180
31
  }
181
- function fe(e) {
32
+ function _(e) {
182
33
  return h(e, "recipe");
183
34
  }
184
- function me(e) {
35
+ const Q = ({
36
+ name: e,
37
+ value: t,
38
+ modifiers: r
39
+ }) => `_${[
40
+ ...r,
41
+ e,
42
+ ...t === "default" ? [] : [t]
43
+ ].filter(Boolean).join(":")}`;
44
+ function w(e) {
185
45
  return e.charAt(0).toUpperCase() + e.slice(1);
186
46
  }
187
- function g(e) {
47
+ function J(e) {
48
+ return `.${e.replace(/[[\].#()%,:/]/g, "\\$&")}`;
49
+ }
50
+ function A(e) {
188
51
  if (e instanceof Buffer)
189
52
  return Buffer.from(e);
190
53
  const t = e.constructor;
@@ -194,123 +57,123 @@ function g(e) {
194
57
  e.byteLength / e.BYTES_PER_ELEMENT || 1
195
58
  );
196
59
  }
197
- function pe(e) {
60
+ function Z(e) {
198
61
  if (e = e || {}, e.circular)
199
- return ye(e);
62
+ return W(e);
200
63
  const t = /* @__PURE__ */ new Map();
201
- if (t.set(Date, (u) => new Date(u)), t.set(
64
+ if (t.set(Date, (s) => new Date(s)), t.set(
202
65
  Map,
203
- (u, a) => new Map(n(Array.from(u), a))
66
+ (s, a) => new Map(n(Array.from(s), a))
204
67
  ), t.set(
205
68
  Set,
206
- (u, a) => new Set(n(Array.from(u), a))
69
+ (s, a) => new Set(n(Array.from(s), a))
207
70
  ), e.constructorHandlers)
208
- for (const u of e.constructorHandlers)
209
- t.set(u[0], u[1]);
71
+ for (const s of e.constructorHandlers)
72
+ t.set(s[0], s[1]);
210
73
  let r;
211
- return e.proto ? s : o;
212
- function n(u, a) {
213
- const c = Object.keys(u), i = Array.from({ length: c.length });
214
- for (let f = 0; f < c.length; f++) {
215
- const l = c[f], m = u[l];
216
- typeof m != "object" || m === null ? i[l] = m : m.constructor !== Object && (r = t.get(m.constructor)) ? i[l] = r(m, a) : ArrayBuffer.isView(m) ? i[l] = g(m) : i[l] = a(m);
74
+ return e.proto ? c : o;
75
+ function n(s, a) {
76
+ const u = Object.keys(s), i = Array.from({ length: u.length });
77
+ for (let f = 0; f < u.length; f++) {
78
+ const l = u[f], m = s[l];
79
+ typeof m != "object" || m === null ? i[l] = m : m.constructor !== Object && (r = t.get(m.constructor)) ? i[l] = r(m, a) : ArrayBuffer.isView(m) ? i[l] = A(m) : i[l] = a(m);
217
80
  }
218
81
  return i;
219
82
  }
220
- function o(u) {
221
- if (typeof u != "object" || u === null) return u;
222
- if (Array.isArray(u)) return n(u, o);
223
- if (u.constructor !== Object && (r = t.get(u.constructor)))
224
- return r(u, o);
83
+ function o(s) {
84
+ if (typeof s != "object" || s === null) return s;
85
+ if (Array.isArray(s)) return n(s, o);
86
+ if (s.constructor !== Object && (r = t.get(s.constructor)))
87
+ return r(s, o);
225
88
  const a = {};
226
- for (const c in u) {
227
- if (Object.hasOwnProperty.call(u, c) === !1) continue;
228
- const i = u[c];
229
- typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i, o) : ArrayBuffer.isView(i) ? a[c] = g(i) : a[c] = o(i);
89
+ for (const u in s) {
90
+ if (Object.hasOwnProperty.call(s, u) === !1) continue;
91
+ const i = s[u];
92
+ typeof i != "object" || i === null ? a[u] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[u] = r(i, o) : ArrayBuffer.isView(i) ? a[u] = A(i) : a[u] = o(i);
230
93
  }
231
94
  return a;
232
95
  }
233
- function s(u) {
234
- if (typeof u != "object" || u === null) return u;
235
- if (Array.isArray(u)) return n(u, s);
236
- if (u.constructor !== Object && (r = t.get(u.constructor)))
237
- return r(u, s);
96
+ function c(s) {
97
+ if (typeof s != "object" || s === null) return s;
98
+ if (Array.isArray(s)) return n(s, c);
99
+ if (s.constructor !== Object && (r = t.get(s.constructor)))
100
+ return r(s, c);
238
101
  const a = {};
239
- for (const c in u) {
240
- const i = u[c];
241
- typeof i != "object" || i === null ? a[c] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[c] = r(i, s) : ArrayBuffer.isView(i) ? a[c] = g(i) : a[c] = s(i);
102
+ for (const u in s) {
103
+ const i = s[u];
104
+ typeof i != "object" || i === null ? a[u] = i : i.constructor !== Object && (r = t.get(i.constructor)) ? a[u] = r(i, c) : ArrayBuffer.isView(i) ? a[u] = A(i) : a[u] = c(i);
242
105
  }
243
106
  return a;
244
107
  }
245
108
  }
246
- function ye(e) {
109
+ function W(e) {
247
110
  const t = [], r = [], n = /* @__PURE__ */ new Map();
248
- if (n.set(Date, (c) => new Date(c)), n.set(
111
+ if (n.set(Date, (u) => new Date(u)), n.set(
249
112
  Map,
250
- (c, i) => new Map(s(Array.from(c), i))
113
+ (u, i) => new Map(c(Array.from(u), i))
251
114
  ), n.set(
252
115
  Set,
253
- (c, i) => new Set(s(Array.from(c), i))
116
+ (u, i) => new Set(c(Array.from(u), i))
254
117
  ), e.constructorHandlers)
255
- for (const c of e.constructorHandlers)
256
- n.set(c[0], c[1]);
118
+ for (const u of e.constructorHandlers)
119
+ n.set(u[0], u[1]);
257
120
  let o;
258
- return e.proto ? a : u;
259
- function s(c, i) {
260
- const f = Object.keys(c), l = Array.from({ length: f.length });
121
+ return e.proto ? a : s;
122
+ function c(u, i) {
123
+ const f = Object.keys(u), l = Array.from({ length: f.length });
261
124
  for (let m = 0; m < f.length; m++) {
262
- const y = f[m], p = c[y];
125
+ const d = f[m], p = u[d];
263
126
  if (typeof p != "object" || p === null)
264
- l[y] = p;
127
+ l[d] = p;
265
128
  else if (p.constructor !== Object && (o = n.get(p.constructor)))
266
- l[y] = o(p, i);
129
+ l[d] = o(p, i);
267
130
  else if (ArrayBuffer.isView(p))
268
- l[y] = g(p);
131
+ l[d] = A(p);
269
132
  else {
270
133
  const b = t.indexOf(p);
271
- b !== -1 ? l[y] = r[b] : l[y] = i(p);
134
+ b !== -1 ? l[d] = r[b] : l[d] = i(p);
272
135
  }
273
136
  }
274
137
  return l;
275
138
  }
276
- function u(c) {
277
- if (typeof c != "object" || c === null) return c;
278
- if (Array.isArray(c)) return s(c, u);
279
- if (c.constructor !== Object && (o = n.get(c.constructor)))
280
- return o(c, u);
139
+ function s(u) {
140
+ if (typeof u != "object" || u === null) return u;
141
+ if (Array.isArray(u)) return c(u, s);
142
+ if (u.constructor !== Object && (o = n.get(u.constructor)))
143
+ return o(u, s);
281
144
  const i = {};
282
- t.push(c), r.push(i);
283
- for (const f in c) {
284
- if (Object.hasOwnProperty.call(c, f) === !1) continue;
285
- const l = c[f];
145
+ t.push(u), r.push(i);
146
+ for (const f in u) {
147
+ if (Object.hasOwnProperty.call(u, f) === !1) continue;
148
+ const l = u[f];
286
149
  if (typeof l != "object" || l === null)
287
150
  i[f] = l;
288
151
  else if (l.constructor !== Object && (o = n.get(l.constructor)))
289
- i[f] = o(l, u);
152
+ i[f] = o(l, s);
290
153
  else if (ArrayBuffer.isView(l))
291
- i[f] = g(l);
154
+ i[f] = A(l);
292
155
  else {
293
156
  const m = t.indexOf(l);
294
- m !== -1 ? i[f] = r[m] : i[f] = u(l);
157
+ m !== -1 ? i[f] = r[m] : i[f] = s(l);
295
158
  }
296
159
  }
297
160
  return t.pop(), r.pop(), i;
298
161
  }
299
- function a(c) {
300
- if (typeof c != "object" || c === null) return c;
301
- if (Array.isArray(c)) return s(c, a);
302
- if (c.constructor !== Object && (o = n.get(c.constructor)))
303
- return o(c, a);
162
+ function a(u) {
163
+ if (typeof u != "object" || u === null) return u;
164
+ if (Array.isArray(u)) return c(u, a);
165
+ if (u.constructor !== Object && (o = n.get(u.constructor)))
166
+ return o(u, a);
304
167
  const i = {};
305
- t.push(c), r.push(i);
306
- for (const f in c) {
307
- const l = c[f];
168
+ t.push(u), r.push(i);
169
+ for (const f in u) {
170
+ const l = u[f];
308
171
  if (typeof l != "object" || l === null)
309
172
  i[f] = l;
310
173
  else if (l.constructor !== Object && (o = n.get(l.constructor)))
311
174
  i[f] = o(l, a);
312
175
  else if (ArrayBuffer.isView(l))
313
- i[f] = g(l);
176
+ i[f] = A(l);
314
177
  else {
315
178
  const m = t.indexOf(l);
316
179
  m !== -1 ? i[f] = r[m] : i[f] = a(l);
@@ -319,26 +182,181 @@ function ye(e) {
319
182
  return t.pop(), r.pop(), i;
320
183
  }
321
184
  }
322
- pe();
323
- function de(e) {
185
+ Z();
186
+ function G(e, t = 8) {
187
+ const r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
188
+ let n = "";
189
+ for (let o = 0; o < t; o++) {
190
+ const c = Math.floor(Math.random() * r.length);
191
+ n += r[c];
192
+ }
193
+ return e ? `${e}${n}` : n;
194
+ }
195
+ const Y = ({ name: e }) => `[data-theme="${e}"]`, x = ({ name: e }) => e.replace(/^\.+|\.+$/g, "").replace(/\.+/g, "--");
196
+ function X(e, t) {
197
+ return `@${e}${t ? " " : ""}${t}`;
198
+ }
199
+ const ee = /\d/, te = ["-", "_", "/", "."];
200
+ function re(e = "") {
201
+ if (!ee.test(e))
202
+ return e !== e.toLowerCase();
203
+ }
204
+ function T(e, t) {
205
+ const r = te, n = [];
206
+ if (!e || typeof e != "string")
207
+ return n;
208
+ let o = "", c, s;
209
+ for (const a of e) {
210
+ const u = r.includes(a);
211
+ if (u === !0) {
212
+ n.push(o), o = "", c = void 0;
213
+ continue;
214
+ }
215
+ const i = re(a);
216
+ if (s === !1) {
217
+ if (c === !1 && i === !0) {
218
+ n.push(o), o = a, c = i;
219
+ continue;
220
+ }
221
+ if (c === !0 && i === !1 && o.length > 1) {
222
+ const f = o.at(-1);
223
+ n.push(o.slice(0, Math.max(0, o.length - 1))), o = f + a, c = i;
224
+ continue;
225
+ }
226
+ }
227
+ o += a, c = i, s = u;
228
+ }
229
+ return n.push(o), n;
230
+ }
231
+ function ne(e) {
232
+ return e ? e[0].toUpperCase() + e.slice(1) : "";
233
+ }
234
+ function oe(e) {
235
+ return e ? e[0].toLowerCase() + e.slice(1) : "";
236
+ }
237
+ function ue(e, t) {
238
+ return e ? (Array.isArray(e) ? e : T(e)).map((r) => ne(r)).join("") : "";
239
+ }
240
+ function ce(e, t) {
241
+ return oe(ue(e || ""));
242
+ }
243
+ function se(e, t) {
244
+ return e ? (Array.isArray(e) ? e : T(e)).map((r) => r.toLowerCase()).join("-") : "";
245
+ }
246
+ function ie(e) {
247
+ return ` ${e}`;
248
+ }
249
+ function ae(e) {
250
+ return e.split(`
251
+ `).map((t) => ie(t)).join(`
252
+ `);
253
+ }
254
+ function B(e) {
255
+ return e === e.toUpperCase();
256
+ }
257
+ function E(e) {
258
+ return ce(e);
259
+ }
260
+ function le(e) {
261
+ return se(e);
262
+ }
263
+ function fe(e) {
264
+ return le(e);
265
+ }
266
+ function F(e, t) {
267
+ return `${e.startsWith("--") ? e : fe(e)}: ${t};`;
268
+ }
269
+ function me(e) {
270
+ return `{${e.length > 0 ? `
271
+ ` : ""}${e.map((t) => `${ae(`${t}`)}
272
+ `).join("")}}`;
273
+ }
274
+ function D(e) {
275
+ return `--${(e.startsWith("--") ? e.slice(2) : e).replace(/[^a-zA-Z0-9_\-\u0080-\uFFFF]/g, "-") || "unknown-variable"}`;
276
+ }
277
+ function pe(e, t) {
278
+ return F(D(e), t);
279
+ }
280
+ function de(e, t) {
281
+ return `var(${D(e)}${t ? `, ${t}` : ""})`;
282
+ }
283
+ function O(e, t) {
284
+ return `${e} ${me(t)}`;
285
+ }
286
+ function ye(e) {
324
287
  return function(r, n) {
325
- return r != null ? `${r}` : "";
288
+ return Object.entries(r).map(([o, c]) => F(o, e(c, n)));
289
+ };
290
+ }
291
+ function L(e) {
292
+ return function(r, n) {
293
+ const c = (n.variables?.name ?? x)({ name: r.name });
294
+ return pe(c, e(r.value, n));
295
+ };
296
+ }
297
+ function C(e) {
298
+ const t = L(e), r = ye(e);
299
+ return function(o, c, s) {
300
+ const { variables: a, declarations: u, children: i } = c, f = o === ":root", l = (a ?? []).map(
301
+ (g) => t(g, s)
302
+ ), m = r(
303
+ u ?? {},
304
+ s
305
+ ), d = (i ?? []).map(
306
+ (g) => e(g, s)
307
+ ), p = l.length > 0, b = m.length > 0, v = d.length > 0;
308
+ return f ? `${p || b ? O(o, [
309
+ ...l,
310
+ ...p && b ? [""] : [],
311
+ ...m
312
+ ]) : ""}${v && (p || b) ? `
313
+
314
+ ` : ""}${d.join(`
315
+
316
+ `)}` : O(o, [
317
+ ...l,
318
+ ...p && (v || b) ? [""] : [],
319
+ ...m,
320
+ ...b && v ? [""] : [],
321
+ ...d.flatMap(
322
+ (g, P) => P === d.length - 1 ? [g] : [g, ""]
323
+ )
324
+ ]);
326
325
  };
327
326
  }
328
327
  function he(e) {
328
+ const t = C(e);
329
+ return function(n, o) {
330
+ const c = I.includes(n.identifier), s = U.includes(
331
+ n.identifier
332
+ ), a = Object.keys(n.declarations).length > 0, u = n.variables.length > 0, i = n.children.length > 0, f = X(n.identifier, n.rule);
333
+ return c || s && !(a || u || i) ? `${f};` : t(f, n, o);
334
+ };
335
+ }
336
+ function be(e) {
329
337
  return function(r, n) {
330
- const s = (n.variables?.name ?? w)({ name: r.name });
331
- return ee(
332
- s,
338
+ return r.value.map((o) => e(o, n)).join("").trim();
339
+ };
340
+ }
341
+ function ge(e) {
342
+ return function(r, n) {
343
+ return r != null ? `${r}` : "";
344
+ };
345
+ }
346
+ function Ae(e) {
347
+ return function(r, n) {
348
+ const c = (n.variables?.name ?? x)({ name: r.name });
349
+ return de(
350
+ c,
333
351
  r.fallback ? e(r.fallback, n) : void 0
334
352
  );
335
353
  };
336
354
  }
337
- function be(e) {
338
- const t = S(e);
355
+ function Se(e) {
356
+ const t = C(e);
339
357
  return function(n, o) {
340
358
  return n.themes.reduce(
341
- (s, u) => (s.push(e(u, o)), s),
359
+ (c, s) => (c.push(e(s, o)), c),
342
360
  [t(":root", n, o)]
343
361
  // Default theme (root)
344
362
  ).join(`
@@ -346,110 +364,110 @@ function be(e) {
346
364
  `);
347
365
  };
348
366
  }
349
- function Ae(e) {
350
- const t = S(e);
367
+ function Ce(e) {
368
+ const t = C(e);
351
369
  return function(n, o) {
352
370
  return t(n.query, n, o);
353
371
  };
354
372
  }
355
- function ge(e) {
356
- const t = S(e);
373
+ function ve(e) {
374
+ const t = C(e);
357
375
  return function(n, o) {
358
- const u = (o.themes?.selector ?? D)({ name: n.name });
359
- return t(u, n, o);
376
+ const s = (o.themes?.selector ?? Y)({ name: n.name });
377
+ return t(s, n, o);
360
378
  };
361
379
  }
362
- function Se(e) {
363
- const t = S(e);
380
+ function je(e) {
381
+ const t = C(e);
364
382
  return function(n, o) {
365
- const s = [], a = (o.utilities?.selector ?? x)({
383
+ const c = [], a = (o.utilities?.selector ?? Q)({
366
384
  name: n.name,
367
385
  value: n.value,
368
386
  modifiers: n.modifiers
369
- });
370
- return s.push(t(a, n, o)), s.join(`
387
+ }), u = J(a);
388
+ return c.push(t(u, n, o)), c.join(`
371
389
 
372
390
  `);
373
391
  };
374
392
  }
375
- function d(e, t) {
376
- const r = be(d), n = Ae(d), o = Se(d), s = re(d), u = ge(d), a = B(d), c = he(d), i = ne(d), f = de();
393
+ function y(e, t) {
394
+ const r = Se(y), n = Ce(y), o = je(y), c = he(y), s = ve(y), a = L(y), u = Ae(y), i = be(y), f = ge();
377
395
  switch (!0) {
378
- case v(e):
396
+ case S(e):
379
397
  return n(e, t);
380
- case se(e):
398
+ case q(e):
381
399
  return o(e, t);
382
- case ie(e):
383
- return s(e, t);
384
- case T(e):
400
+ case K(e):
401
+ return c(e, t);
402
+ case N(e):
385
403
  return r(e, t);
386
- case le(e):
387
- return u(e, t);
388
- case ce(e):
404
+ case H(e):
405
+ return s(e, t);
406
+ case k(e):
389
407
  return a(e, t);
390
- case ue(e):
391
- return c(e, t);
392
- case ae(e):
408
+ case V(e):
409
+ return u(e, t);
410
+ case z(e):
393
411
  return i(e, t);
394
412
  default:
395
413
  return f(e, t);
396
414
  }
397
415
  }
398
- function Ce(e) {
416
+ function $e(e) {
399
417
  return function(r, n) {
400
418
  let o = r._exportName;
401
- o || (o = Z(r.name), r.name[0] && J(r.name[0]) && (o = me(o)));
402
- const s = `${o}Recipe`, u = r._runtime ?? {};
403
- return `const ${s} = ${JSON.stringify(
404
- u,
419
+ o || (o = E(r.name), r.name[0] && B(r.name[0]) && (o = w(o)));
420
+ const c = `${o}Recipe`, s = r._runtime ?? {};
421
+ return `const ${c} = ${JSON.stringify(
422
+ s,
405
423
  null,
406
424
  4
407
425
  )} as const satisfies RecipeRuntime;
408
426
 
409
- export const ${o} = createRecipe("${r.name}", ${s});
427
+ export const ${o} = createRecipe("${r.name}", ${c});
410
428
  `;
411
429
  };
412
430
  }
413
- function je(e) {
431
+ function Re(e) {
414
432
  return e.filter(
415
- (t) => v(t) && !!t._exportName
433
+ (t) => S(t) && !!t._exportName
416
434
  );
417
435
  }
418
- function ve(e) {
436
+ function Ne(e) {
419
437
  return function(r, n) {
420
- const o = je(r.children), s = r.recipes.length > 0, u = o.length > 0;
421
- if (!s && !u)
438
+ const o = Re(r.children), c = r.recipes.length > 0, s = o.length > 0;
439
+ if (!c && !s)
422
440
  return "";
423
441
  const a = [];
424
- return s && (a.push(`import { createRecipe } from '@styleframe/runtime';
442
+ return c && (a.push(`import { createRecipe } from '@styleframe/runtime';
425
443
  import type { RecipeRuntime } from '@styleframe/runtime';
426
- `), a.push(e(r.recipes, n))), u && a.push(e(o, n)), a.join(`
444
+ `), a.push(e(r.recipes, n))), s && a.push(e(o, n)), a.join(`
427
445
  `);
428
446
  };
429
447
  }
430
- function Re(e) {
448
+ function Oe(e) {
431
449
  return function(r, n) {
432
450
  return r._exportName ? `export const ${r._exportName} = ${JSON.stringify(r.query)};
433
451
  ` : "";
434
452
  };
435
453
  }
436
- function j(e, t) {
437
- const r = ve(j), n = Ce(), o = Re();
454
+ function $(e, t) {
455
+ const r = Ne($), n = $e(), o = Oe();
438
456
  switch (!0) {
439
457
  case Array.isArray(e):
440
- return e.map((s) => j(s, t)).join(`
458
+ return e.map((c) => $(c, t)).join(`
441
459
  `);
442
- case T(e):
460
+ case N(e):
443
461
  return r(e, t);
444
- case fe(e):
462
+ case _(e):
445
463
  return n(e, t);
446
- case v(e):
464
+ case S(e):
447
465
  return o(e, t);
448
466
  default:
449
467
  return "";
450
468
  }
451
469
  }
452
- const $e = `-----BEGIN PUBLIC KEY-----
470
+ const _e = `-----BEGIN PUBLIC KEY-----
453
471
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs7zAFssgxOMPeo80iig4
454
472
  qSSshgNOLnW1gd4tPUrsezndaUrAKlsAys6XD8kuF+bBEIR0uFNSgKlqINLjWM1n
455
473
  BiTUzCctodyRaq6/tyFSoPLD35iblkwtfxKPM42lAJZsyTu9qoBr8MJyXmhDLuqA
@@ -457,8 +475,8 @@ dQ8di7mQHz+mCy96jQR4lFSDfHMgl27qaAh5VboTBRxgZliN8D5Fl590QkS94wAj
457
475
  hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
458
476
  4bWT2K9CpWbbhsKFTecCHuxlmPkFJNMuvAb/LdP08BSnpntlyAJcQeBrna2qBen+
459
477
  GwIDAQAB
460
- -----END PUBLIC KEY-----`, we = "__licenseRequired", Ne = "__licenseValidated";
461
- async function Oe(e) {
478
+ -----END PUBLIC KEY-----`, we = "__licenseRequired", xe = "__licenseValidated";
479
+ async function Te(e) {
462
480
  const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), r = Uint8Array.from(atob(t), (n) => n.charCodeAt(0));
463
481
  return await crypto.subtle.importKey(
464
482
  "spki",
@@ -471,14 +489,14 @@ async function Oe(e) {
471
489
  ["verify"]
472
490
  );
473
491
  }
474
- async function Ee({
492
+ async function Be({
475
493
  payload: e,
476
494
  signature: t
477
495
  }) {
478
496
  const r = new TextEncoder().encode(e), n = Uint8Array.from(
479
497
  atob(t),
480
- (s) => s.charCodeAt(0)
481
- ), o = await Oe($e);
498
+ (c) => c.charCodeAt(0)
499
+ ), o = await Te(_e);
482
500
  if (!await crypto.subtle.verify(
483
501
  { name: "RSASSA-PKCS1-v1_5" },
484
502
  o,
@@ -490,13 +508,13 @@ async function Ee({
490
508
  );
491
509
  return JSON.parse(e);
492
510
  }
493
- function Be(e) {
511
+ function Ee(e) {
494
512
  return Object.prototype.hasOwnProperty.call(e, we);
495
513
  }
496
- async function Te(e) {
514
+ async function Fe(e) {
497
515
  const t = Object.getOwnPropertyDescriptor(
498
516
  e,
499
- Ne
517
+ xe
500
518
  );
501
519
  if (!t?.value)
502
520
  return {
@@ -514,7 +532,7 @@ async function Te(e) {
514
532
  valid: !1
515
533
  };
516
534
  try {
517
- return await Ee(
535
+ return await Be(
518
536
  r
519
537
  );
520
538
  } catch {
@@ -526,10 +544,85 @@ async function Te(e) {
526
544
  };
527
545
  }
528
546
  }
529
- function _e(e) {
547
+ function De(e) {
548
+ const t = e?.variants;
549
+ if (!t || Object.keys(t).length === 0)
550
+ return "Record<string, never>";
551
+ const r = [];
552
+ for (const [n, o] of Object.entries(t)) {
553
+ if (!o) continue;
554
+ const c = Object.keys(o);
555
+ if (c.length > 0) {
556
+ const s = c.map((a) => `"${a}"`).join(" | ");
557
+ r.push(`${n}?: ${s}`);
558
+ }
559
+ }
560
+ return r.length === 0 ? "Record<string, never>" : `{ ${r.join("; ")} }`;
561
+ }
562
+ function Le(e) {
563
+ return function(r, n) {
564
+ let o = r._exportName;
565
+ o || (o = E(r.name), r.name[0] && B(r.name[0]) && (o = w(o)));
566
+ const c = De(r._runtime);
567
+ return ` export const ${o}: (props?: ${c}) => string;`;
568
+ };
569
+ }
570
+ function Pe(e) {
571
+ return e.filter(
572
+ (t) => S(t) && !!t._exportName
573
+ );
574
+ }
575
+ function Ie(e) {
576
+ return function(r, n) {
577
+ const o = Pe(r.children), c = r.recipes.length > 0, s = o.length > 0, a = [
578
+ "// Auto-generated by @styleframe/plugin - DO NOT EDIT",
579
+ "",
580
+ 'declare module "virtual:styleframe" {',
581
+ ' import type { Styleframe } from "@styleframe/core";',
582
+ "",
583
+ " /** Returns the global styleframe instance from styleframe.config.ts */",
584
+ " export function styleframe(): Styleframe;"
585
+ ];
586
+ if (c) {
587
+ a.push("");
588
+ const u = r.recipes.map((i) => e(i, n)).filter(Boolean);
589
+ a.push(...u);
590
+ }
591
+ if (s) {
592
+ a.push("");
593
+ const u = o.map((i) => e(i, n)).filter(Boolean);
594
+ a.push(...u);
595
+ }
596
+ return a.push("}"), a.push(""), a.push('declare module "virtual:styleframe.css" {'), a.push(" const css: string;"), a.push(" export default css;"), a.push("}"), a.push(""), a.join(`
597
+ `);
598
+ };
599
+ }
600
+ function Ue(e) {
601
+ return function(r, n) {
602
+ return r._exportName ? ` export const ${r._exportName}: string;` : "";
603
+ };
604
+ }
605
+ function R(e, t) {
606
+ const r = Ie(R), n = Le(), o = Ue();
607
+ switch (!0) {
608
+ case Array.isArray(e):
609
+ return e.map((c) => R(c, t)).join(`
610
+ `);
611
+ case N(e):
612
+ return r(e, t);
613
+ case _(e):
614
+ return n(e, t);
615
+ case S(e):
616
+ return o(e, t);
617
+ default:
618
+ return "";
619
+ }
620
+ }
621
+ function Me(e) {
530
622
  const t = Math.floor(Math.random() * 100);
531
623
  e.root.children.push({
532
624
  type: "selector",
625
+ id: G("sel-"),
533
626
  query: `html:nth-of-type(${t}n+1)::after`,
534
627
  variables: [],
535
628
  children: [],
@@ -550,51 +643,58 @@ function _e(e) {
550
643
  }
551
644
  });
552
645
  }
553
- function $(e, t = "") {
646
+ function j(e, t = "") {
554
647
  return {
555
648
  name: e,
556
649
  content: t
557
650
  };
558
651
  }
559
- async function Le(e, {
652
+ async function Ve(e, {
560
653
  type: t = "all",
561
- consumers: r = { css: d, ts: j }
654
+ consumers: r = { css: y, ts: $, dts: R }
562
655
  } = {}) {
563
656
  const n = { files: [] }, o = e.options;
564
- if (Be(e)) {
565
- const s = await Te(e);
566
- (!s.valid || s.instanceId !== e.id) && _e(e);
657
+ if (Ee(e)) {
658
+ const c = await Fe(e);
659
+ (!c.valid || c.instanceId !== e.id) && Me(e);
567
660
  }
568
661
  if (t === "all" || t === "css") {
569
- const s = $(
662
+ const c = j(
570
663
  "index.css",
571
664
  r.css(e.root, o)
572
665
  );
573
- n.files.push(s);
666
+ n.files.push(c);
574
667
  }
575
668
  if (t === "all" || t === "ts") {
576
- const s = $(
669
+ const c = j(
577
670
  "index.ts",
578
671
  r.ts(e.root, o)
579
672
  );
580
- n.files.push(s);
673
+ n.files.push(c);
674
+ }
675
+ if (t === "dts") {
676
+ const c = j(
677
+ "index.d.ts",
678
+ r.dts(e.root, o)
679
+ );
680
+ n.files.push(c);
581
681
  }
582
682
  return n;
583
683
  }
584
684
  export {
585
- Fe as DEFAULT_INDENT,
586
- F as STATEMENT_AT_RULES,
587
- L as STATEMENT_OR_BLOCK_AT_RULES,
588
- H as addIndentToLine,
589
- d as consumeCSS,
590
- j as consumeTS,
591
- $ as createFile,
592
- D as defaultThemeSelectorFn,
593
- x as defaultUtilitySelectorFn,
594
- w as defaultVariableNameFn,
595
- Q as indentLines,
596
- J as isUppercase,
597
- Z as toCamelCase,
598
- W as toKebabCase,
599
- Le as transpile
685
+ ke as DEFAULT_INDENT,
686
+ I as STATEMENT_AT_RULES,
687
+ U as STATEMENT_OR_BLOCK_AT_RULES,
688
+ ie as addIndentToLine,
689
+ y as consumeCSS,
690
+ $ as consumeTS,
691
+ j as createFile,
692
+ Y as defaultThemeSelectorFn,
693
+ Q as defaultUtilitySelectorFn,
694
+ x as defaultVariableNameFn,
695
+ ae as indentLines,
696
+ B as isUppercase,
697
+ E as toCamelCase,
698
+ le as toKebabCase,
699
+ Ve as transpile
600
700
  };
@@ -1,24 +1,24 @@
1
- (function(p,j){typeof exports=="object"&&typeof module<"u"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(p=typeof globalThis<"u"?globalThis:p||self,j(p.transpiler={}))})(this,(function(p){"use strict";const _=["charset","import","namespace"],$=["layer"],w=({name:e})=>`[data-theme="${e}"]`,O=({name:e,value:t,modifiers:n})=>`._${[...n,e,...t==="default"?[]:[t]].filter(Boolean).join("\\:").replace(/[[\].#()%,]/g,"\\$&")}`,v=({name:e})=>e.replace(/^\.+|\.+$/g,"").replace(/\.+/g,"--");function q(e,t){return`@${e}${t?" ":""}${t}`}const x=/\d/,z=["-","_","/","."];function H(e=""){if(!x.test(e))return e!==e.toLowerCase()}function F(e,t){const n=z,r=[];if(!e||typeof e!="string")return r;let o="",a,u;for(const s of e){const c=n.includes(s);if(c===!0){r.push(o),o="",a=void 0;continue}const i=H(s);if(u===!1){if(a===!1&&i===!0){r.push(o),o=s,a=i;continue}if(a===!0&&i===!1&&o.length>1){const f=o.at(-1);r.push(o.slice(0,Math.max(0,o.length-1))),o=f+s,a=i;continue}}o+=s,a=i,u=c}return r.push(o),r}function Q(e){return e?e[0].toUpperCase()+e.slice(1):""}function J(e){return e?e[0].toLowerCase()+e.slice(1):""}function Z(e,t){return e?(Array.isArray(e)?e:F(e)).map(n=>Q(n)).join(""):""}function W(e,t){return J(Z(e||""))}function G(e,t){return e?(Array.isArray(e)?e:F(e)).map(n=>n.toLowerCase()).join("-"):""}function L(e){return` ${e}`}function B(e){return e.split(`
2
- `).map(t=>L(t)).join(`
3
- `)}function U(e){return e===e.toUpperCase()}function D(e){return W(e)}function I(e){return G(e)}function Y(e){return I(e)}function M(e,t){return`${e.startsWith("--")?e:Y(e)}: ${t};`}function X(e){return`{${e.length>0?`
4
- `:""}${e.map(t=>`${B(`${t}`)}
5
- `).join("")}}`}function P(e){return`--${(e.startsWith("--")?e.slice(2):e).replace(/[^a-zA-Z0-9_\-\u0080-\uFFFF]/g,"-")||"unknown-variable"}`}function ee(e,t){return M(P(e),t)}function te(e,t){return`var(${P(e)}${t?`, ${t}`:""})`}function k(e,t){return`${e} ${X(t)}`}function ne(e){return function(n,r){return Object.entries(n).map(([o,a])=>M(o,e(a,r)))}}function V(e){return function(n,r){const a=(r.variables?.name??v)({name:n.name});return ee(a,e(n.value,r))}}function C(e){const t=V(e),n=ne(e);return function(o,a,u){const{variables:s,declarations:c,children:i}=a,f=o===":root",l=(s??[]).map(g=>t(g,u)),m=n(c??{},u),y=(i??[]).map(g=>e(g,u)),d=l.length>0,A=m.length>0,N=y.length>0;return f?`${d||A?k(o,[...l,...d&&A?[""]:[],...m]):""}${N&&(d||A)?`
1
+ (function(p,j){typeof exports=="object"&&typeof module<"u"?j(exports):typeof define=="function"&&define.amd?define(["exports"],j):(p=typeof globalThis<"u"?globalThis:p||self,j(p.transpiler={}))})(this,(function(p){"use strict";const F=["charset","import","namespace"],B=["layer"];function H(e){return typeof e=="object"&&e!==null}function b(e,t){return H(e)&&"type"in e&&e.type===t}function Q(e){return b(e,"variable")}function J(e){return b(e,"reference")}function C(e){return b(e,"selector")}function Z(e){return b(e,"at-rule")}function W(e){return b(e,"utility")}function G(e){return b(e,"css")}function Y(e){return b(e,"theme")}function $(e){return b(e,"root")}function D(e){return b(e,"recipe")}const L=({name:e,value:t,modifiers:r})=>`_${[...r,e,...t==="default"?[]:[t]].filter(Boolean).join(":")}`;function U(e){return e.charAt(0).toUpperCase()+e.slice(1)}function X(e){return`.${e.replace(/[[\].#()%,:/]/g,"\\$&")}`}function S(e){if(e instanceof Buffer)return Buffer.from(e);const t=e.constructor;return new t(e.buffer.slice(0),e.byteOffset,e.byteLength/e.BYTES_PER_ELEMENT||1)}function ee(e){if(e=e||{},e.circular)return te(e);const t=new Map;if(t.set(Date,s=>new Date(s)),t.set(Map,(s,a)=>new Map(n(Array.from(s),a))),t.set(Set,(s,a)=>new Set(n(Array.from(s),a))),e.constructorHandlers)for(const s of e.constructorHandlers)t.set(s[0],s[1]);let r;return e.proto?c:o;function n(s,a){const u=Object.keys(s),i=Array.from({length:u.length});for(let f=0;f<u.length;f++){const l=u[f],m=s[l];typeof m!="object"||m===null?i[l]=m:m.constructor!==Object&&(r=t.get(m.constructor))?i[l]=r(m,a):ArrayBuffer.isView(m)?i[l]=S(m):i[l]=a(m)}return i}function o(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,o);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,o);const a={};for(const u in s){if(Object.hasOwnProperty.call(s,u)===!1)continue;const i=s[u];typeof i!="object"||i===null?a[u]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[u]=r(i,o):ArrayBuffer.isView(i)?a[u]=S(i):a[u]=o(i)}return a}function c(s){if(typeof s!="object"||s===null)return s;if(Array.isArray(s))return n(s,c);if(s.constructor!==Object&&(r=t.get(s.constructor)))return r(s,c);const a={};for(const u in s){const i=s[u];typeof i!="object"||i===null?a[u]=i:i.constructor!==Object&&(r=t.get(i.constructor))?a[u]=r(i,c):ArrayBuffer.isView(i)?a[u]=S(i):a[u]=c(i)}return a}}function te(e){const t=[],r=[],n=new Map;if(n.set(Date,u=>new Date(u)),n.set(Map,(u,i)=>new Map(c(Array.from(u),i))),n.set(Set,(u,i)=>new Set(c(Array.from(u),i))),e.constructorHandlers)for(const u of e.constructorHandlers)n.set(u[0],u[1]);let o;return e.proto?a:s;function c(u,i){const f=Object.keys(u),l=Array.from({length:f.length});for(let m=0;m<f.length;m++){const y=f[m],d=u[y];if(typeof d!="object"||d===null)l[y]=d;else if(d.constructor!==Object&&(o=n.get(d.constructor)))l[y]=o(d,i);else if(ArrayBuffer.isView(d))l[y]=S(d);else{const g=t.indexOf(d);g!==-1?l[y]=r[g]:l[y]=i(d)}}return l}function s(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return c(u,s);if(u.constructor!==Object&&(o=n.get(u.constructor)))return o(u,s);const i={};t.push(u),r.push(i);for(const f in u){if(Object.hasOwnProperty.call(u,f)===!1)continue;const l=u[f];if(typeof l!="object"||l===null)i[f]=l;else if(l.constructor!==Object&&(o=n.get(l.constructor)))i[f]=o(l,s);else if(ArrayBuffer.isView(l))i[f]=S(l);else{const m=t.indexOf(l);m!==-1?i[f]=r[m]:i[f]=s(l)}}return t.pop(),r.pop(),i}function a(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return c(u,a);if(u.constructor!==Object&&(o=n.get(u.constructor)))return o(u,a);const i={};t.push(u),r.push(i);for(const f in u){const l=u[f];if(typeof l!="object"||l===null)i[f]=l;else if(l.constructor!==Object&&(o=n.get(l.constructor)))i[f]=o(l,a);else if(ArrayBuffer.isView(l))i[f]=S(l);else{const m=t.indexOf(l);m!==-1?i[f]=r[m]:i[f]=a(l)}}return t.pop(),r.pop(),i}}ee();function re(e,t=8){const r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let n="";for(let o=0;o<t;o++){const c=Math.floor(Math.random()*r.length);n+=r[c]}return e?`${e}${n}`:n}const I=({name:e})=>`[data-theme="${e}"]`,N=({name:e})=>e.replace(/^\.+|\.+$/g,"").replace(/\.+/g,"--");function ne(e,t){return`@${e}${t?" ":""}${t}`}const oe=/\d/,ue=["-","_","/","."];function ce(e=""){if(!oe.test(e))return e!==e.toLowerCase()}function M(e,t){const r=ue,n=[];if(!e||typeof e!="string")return n;let o="",c,s;for(const a of e){const u=r.includes(a);if(u===!0){n.push(o),o="",c=void 0;continue}const i=ce(a);if(s===!1){if(c===!1&&i===!0){n.push(o),o=a,c=i;continue}if(c===!0&&i===!1&&o.length>1){const f=o.at(-1);n.push(o.slice(0,Math.max(0,o.length-1))),o=f+a,c=i;continue}}o+=a,c=i,s=u}return n.push(o),n}function se(e){return e?e[0].toUpperCase()+e.slice(1):""}function ie(e){return e?e[0].toLowerCase()+e.slice(1):""}function ae(e,t){return e?(Array.isArray(e)?e:M(e)).map(r=>se(r)).join(""):""}function le(e,t){return ie(ae(e||""))}function fe(e,t){return e?(Array.isArray(e)?e:M(e)).map(r=>r.toLowerCase()).join("-"):""}function P(e){return` ${e}`}function x(e){return e.split(`
2
+ `).map(t=>P(t)).join(`
3
+ `)}function _(e){return e===e.toUpperCase()}function E(e){return le(e)}function k(e){return fe(e)}function me(e){return k(e)}function V(e,t){return`${e.startsWith("--")?e:me(e)}: ${t};`}function pe(e){return`{${e.length>0?`
4
+ `:""}${e.map(t=>`${x(`${t}`)}
5
+ `).join("")}}`}function K(e){return`--${(e.startsWith("--")?e.slice(2):e).replace(/[^a-zA-Z0-9_\-\u0080-\uFFFF]/g,"-")||"unknown-variable"}`}function de(e,t){return V(K(e),t)}function ye(e,t){return`var(${K(e)}${t?`, ${t}`:""})`}function q(e,t){return`${e} ${pe(t)}`}function he(e){return function(r,n){return Object.entries(r).map(([o,c])=>V(o,e(c,n)))}}function z(e){return function(r,n){const c=(n.variables?.name??N)({name:r.name});return de(c,e(r.value,n))}}function v(e){const t=z(e),r=he(e);return function(o,c,s){const{variables:a,declarations:u,children:i}=c,f=o===":root",l=(a??[]).map(A=>t(A,s)),m=r(u??{},s),y=(i??[]).map(A=>e(A,s)),d=l.length>0,g=m.length>0,w=y.length>0;return f?`${d||g?q(o,[...l,...d&&g?[""]:[],...m]):""}${w&&(d||g)?`
6
6
 
7
7
  `:""}${y.join(`
8
8
 
9
- `)}`:k(o,[...l,...d&&(N||A)?[""]:[],...m,...A&&N?[""]:[],...y.flatMap((g,Ue)=>Ue===y.length-1?[g]:[g,""])])}}function re(e){const t=C(e);return function(r,o){const a=_.includes(r.identifier),u=$.includes(r.identifier),s=Object.keys(r.declarations).length>0,c=r.variables.length>0,i=r.children.length>0,f=q(r.identifier,r.rule);return a||u&&!(s||c||i)?`${f};`:t(f,r,o)}}function oe(e){return function(n,r){return n.value.map(o=>e(o,r)).join("").trim()}}function ce(e){return typeof e=="object"&&e!==null}function b(e,t){return ce(e)&&"type"in e&&e.type===t}function ue(e){return b(e,"variable")}function ie(e){return b(e,"reference")}function R(e){return b(e,"selector")}function ae(e){return b(e,"at-rule")}function se(e){return b(e,"utility")}function le(e){return b(e,"css")}function fe(e){return b(e,"theme")}function K(e){return b(e,"root")}function me(e){return b(e,"recipe")}function pe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function S(e){if(e instanceof Buffer)return Buffer.from(e);const t=e.constructor;return new t(e.buffer.slice(0),e.byteOffset,e.byteLength/e.BYTES_PER_ELEMENT||1)}function de(e){if(e=e||{},e.circular)return ye(e);const t=new Map;if(t.set(Date,u=>new Date(u)),t.set(Map,(u,s)=>new Map(r(Array.from(u),s))),t.set(Set,(u,s)=>new Set(r(Array.from(u),s))),e.constructorHandlers)for(const u of e.constructorHandlers)t.set(u[0],u[1]);let n;return e.proto?a:o;function r(u,s){const c=Object.keys(u),i=Array.from({length:c.length});for(let f=0;f<c.length;f++){const l=c[f],m=u[l];typeof m!="object"||m===null?i[l]=m:m.constructor!==Object&&(n=t.get(m.constructor))?i[l]=n(m,s):ArrayBuffer.isView(m)?i[l]=S(m):i[l]=s(m)}return i}function o(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return r(u,o);if(u.constructor!==Object&&(n=t.get(u.constructor)))return n(u,o);const s={};for(const c in u){if(Object.hasOwnProperty.call(u,c)===!1)continue;const i=u[c];typeof i!="object"||i===null?s[c]=i:i.constructor!==Object&&(n=t.get(i.constructor))?s[c]=n(i,o):ArrayBuffer.isView(i)?s[c]=S(i):s[c]=o(i)}return s}function a(u){if(typeof u!="object"||u===null)return u;if(Array.isArray(u))return r(u,a);if(u.constructor!==Object&&(n=t.get(u.constructor)))return n(u,a);const s={};for(const c in u){const i=u[c];typeof i!="object"||i===null?s[c]=i:i.constructor!==Object&&(n=t.get(i.constructor))?s[c]=n(i,a):ArrayBuffer.isView(i)?s[c]=S(i):s[c]=a(i)}return s}}function ye(e){const t=[],n=[],r=new Map;if(r.set(Date,c=>new Date(c)),r.set(Map,(c,i)=>new Map(a(Array.from(c),i))),r.set(Set,(c,i)=>new Set(a(Array.from(c),i))),e.constructorHandlers)for(const c of e.constructorHandlers)r.set(c[0],c[1]);let o;return e.proto?s:u;function a(c,i){const f=Object.keys(c),l=Array.from({length:f.length});for(let m=0;m<f.length;m++){const y=f[m],d=c[y];if(typeof d!="object"||d===null)l[y]=d;else if(d.constructor!==Object&&(o=r.get(d.constructor)))l[y]=o(d,i);else if(ArrayBuffer.isView(d))l[y]=S(d);else{const A=t.indexOf(d);A!==-1?l[y]=n[A]:l[y]=i(d)}}return l}function u(c){if(typeof c!="object"||c===null)return c;if(Array.isArray(c))return a(c,u);if(c.constructor!==Object&&(o=r.get(c.constructor)))return o(c,u);const i={};t.push(c),n.push(i);for(const f in c){if(Object.hasOwnProperty.call(c,f)===!1)continue;const l=c[f];if(typeof l!="object"||l===null)i[f]=l;else if(l.constructor!==Object&&(o=r.get(l.constructor)))i[f]=o(l,u);else if(ArrayBuffer.isView(l))i[f]=S(l);else{const m=t.indexOf(l);m!==-1?i[f]=n[m]:i[f]=u(l)}}return t.pop(),n.pop(),i}function s(c){if(typeof c!="object"||c===null)return c;if(Array.isArray(c))return a(c,s);if(c.constructor!==Object&&(o=r.get(c.constructor)))return o(c,s);const i={};t.push(c),n.push(i);for(const f in c){const l=c[f];if(typeof l!="object"||l===null)i[f]=l;else if(l.constructor!==Object&&(o=r.get(l.constructor)))i[f]=o(l,s);else if(ArrayBuffer.isView(l))i[f]=S(l);else{const m=t.indexOf(l);m!==-1?i[f]=n[m]:i[f]=s(l)}}return t.pop(),n.pop(),i}}de();function he(e){return function(n,r){return n!=null?`${n}`:""}}function be(e){return function(n,r){const a=(r.variables?.name??v)({name:n.name});return te(a,n.fallback?e(n.fallback,r):void 0)}}function Ae(e){const t=C(e);return function(r,o){return r.themes.reduce((a,u)=>(a.push(e(u,o)),a),[t(":root",r,o)]).join(`
9
+ `)}`:q(o,[...l,...d&&(w||g)?[""]:[],...m,...g&&w?[""]:[],...y.flatMap((A,Ke)=>Ke===y.length-1?[A]:[A,""])])}}function be(e){const t=v(e);return function(n,o){const c=F.includes(n.identifier),s=B.includes(n.identifier),a=Object.keys(n.declarations).length>0,u=n.variables.length>0,i=n.children.length>0,f=ne(n.identifier,n.rule);return c||s&&!(a||u||i)?`${f};`:t(f,n,o)}}function ge(e){return function(r,n){return r.value.map(o=>e(o,n)).join("").trim()}}function Se(e){return function(r,n){return r!=null?`${r}`:""}}function Ae(e){return function(r,n){const c=(n.variables?.name??N)({name:r.name});return ye(c,r.fallback?e(r.fallback,n):void 0)}}function Ce(e){const t=v(e);return function(n,o){return n.themes.reduce((c,s)=>(c.push(e(s,o)),c),[t(":root",n,o)]).join(`
10
10
 
11
- `)}}function Se(e){const t=C(e);return function(r,o){return t(r.query,r,o)}}function ge(e){const t=C(e);return function(r,o){const u=(o.themes?.selector??w)({name:r.name});return t(u,r,o)}}function Ce(e){const t=C(e);return function(r,o){const a=[],s=(o.utilities?.selector??O)({name:r.name,value:r.value,modifiers:r.modifiers});return a.push(t(s,r,o)),a.join(`
11
+ `)}}function ve(e){const t=v(e);return function(n,o){return t(n.query,n,o)}}function je(e){const t=v(e);return function(n,o){const s=(o.themes?.selector??I)({name:n.name});return t(s,n,o)}}function Re(e){const t=v(e);return function(n,o){const c=[],a=(o.utilities?.selector??L)({name:n.name,value:n.value,modifiers:n.modifiers}),u=X(a);return c.push(t(u,n,o)),c.join(`
12
12
 
13
- `)}}function h(e,t){const n=Ae(h),r=Se(h),o=Ce(h),a=re(h),u=ge(h),s=V(h),c=be(h),i=oe(h),f=he();switch(!0){case R(e):return r(e,t);case se(e):return o(e,t);case ae(e):return a(e,t);case K(e):return n(e,t);case fe(e):return u(e,t);case ue(e):return s(e,t);case ie(e):return c(e,t);case le(e):return i(e,t);default:return f(e,t)}}function je(e){return function(n,r){let o=n._exportName;o||(o=D(n.name),n.name[0]&&U(n.name[0])&&(o=pe(o)));const a=`${o}Recipe`,u=n._runtime??{};return`const ${a} = ${JSON.stringify(u,null,4)} as const satisfies RecipeRuntime;
13
+ `)}}function h(e,t){const r=Ce(h),n=ve(h),o=Re(h),c=be(h),s=je(h),a=z(h),u=Ae(h),i=ge(h),f=Se();switch(!0){case C(e):return n(e,t);case W(e):return o(e,t);case Z(e):return c(e,t);case $(e):return r(e,t);case Y(e):return s(e,t);case Q(e):return a(e,t);case J(e):return u(e,t);case G(e):return i(e,t);default:return f(e,t)}}function Te(e){return function(r,n){let o=r._exportName;o||(o=E(r.name),r.name[0]&&_(r.name[0])&&(o=U(o)));const c=`${o}Recipe`,s=r._runtime??{};return`const ${c} = ${JSON.stringify(s,null,4)} as const satisfies RecipeRuntime;
14
14
 
15
- export const ${o} = createRecipe("${n.name}", ${a});
16
- `}}function Te(e){return e.filter(t=>R(t)&&!!t._exportName)}function ve(e){return function(n,r){const o=Te(n.children),a=n.recipes.length>0,u=o.length>0;if(!a&&!u)return"";const s=[];return a&&(s.push(`import { createRecipe } from '@styleframe/runtime';
15
+ export const ${o} = createRecipe("${r.name}", ${c});
16
+ `}}function $e(e){return e.filter(t=>C(t)&&!!t._exportName)}function Ne(e){return function(r,n){const o=$e(r.children),c=r.recipes.length>0,s=o.length>0;if(!c&&!s)return"";const a=[];return c&&(a.push(`import { createRecipe } from '@styleframe/runtime';
17
17
  import type { RecipeRuntime } from '@styleframe/runtime';
18
- `),s.push(e(n.recipes,r))),u&&s.push(e(o,r)),s.join(`
19
- `)}}function Re(e){return function(n,r){return n._exportName?`export const ${n._exportName} = ${JSON.stringify(n.query)};
20
- `:""}}function T(e,t){const n=ve(T),r=je(),o=Re();switch(!0){case Array.isArray(e):return e.map(a=>T(a,t)).join(`
21
- `);case K(e):return n(e,t);case me(e):return r(e,t);case R(e):return o(e,t);default:return""}}const Ee=`-----BEGIN PUBLIC KEY-----
18
+ `),a.push(e(r.recipes,n))),s&&a.push(e(o,n)),a.join(`
19
+ `)}}function _e(e){return function(r,n){return r._exportName?`export const ${r._exportName} = ${JSON.stringify(r.query)};
20
+ `:""}}function R(e,t){const r=Ne(R),n=Te(),o=_e();switch(!0){case Array.isArray(e):return e.map(c=>R(c,t)).join(`
21
+ `);case $(e):return r(e,t);case D(e):return n(e,t);case C(e):return o(e,t);default:return""}}const Ee=`-----BEGIN PUBLIC KEY-----
22
22
  MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs7zAFssgxOMPeo80iig4
23
23
  qSSshgNOLnW1gd4tPUrsezndaUrAKlsAys6XD8kuF+bBEIR0uFNSgKlqINLjWM1n
24
24
  BiTUzCctodyRaq6/tyFSoPLD35iblkwtfxKPM42lAJZsyTu9qoBr8MJyXmhDLuqA
@@ -26,4 +26,6 @@ dQ8di7mQHz+mCy96jQR4lFSDfHMgl27qaAh5VboTBRxgZliN8D5Fl590QkS94wAj
26
26
  hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
27
27
  4bWT2K9CpWbbhsKFTecCHuxlmPkFJNMuvAb/LdP08BSnpntlyAJcQeBrna2qBen+
28
28
  GwIDAQAB
29
- -----END PUBLIC KEY-----`,Ne="__licenseRequired",_e="__licenseValidated";async function $e(e){const t=e.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s/g,""),n=Uint8Array.from(atob(t),r=>r.charCodeAt(0));return await crypto.subtle.importKey("spki",n,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"])}async function we({payload:e,signature:t}){const n=new TextEncoder().encode(e),r=Uint8Array.from(atob(t),a=>a.charCodeAt(0)),o=await $e(Ee);if(!await crypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},o,r,n))throw new Error("License validation failed: Invalid signature detected. The license may have been modified or corrupted.");return JSON.parse(e)}function Oe(e){return Object.prototype.hasOwnProperty.call(e,Ne)}async function Fe(e){const t=Object.getOwnPropertyDescriptor(e,_e);if(!t?.value)return{key:"",instanceId:"",environment:"",valid:!1};const n=t.value;if(typeof n!="object"||n===null||!("payload"in n)||!("signature"in n)||typeof n.payload!="string"||typeof n.signature!="string")return{key:"",instanceId:"",environment:"",valid:!1};try{return await we(n)}catch{return{key:"",instanceId:"",environment:"",valid:!1}}}function Le(e){const t=Math.floor(Math.random()*100);e.root.children.push({type:"selector",query:`html:nth-of-type(${t}n+1)::after`,variables:[],children:[],declarations:{content:'"Styleframe Pro: Development Mode License required for production use"',zIndex:99999,position:"fixed",display:"block !important",opacity:"1 !important",bottom:0,left:0,background:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:"12px",lineHeight:"1",padding:"0.5rem",fontFamily:"sans-serif"}})}function E(e,t=""){return{name:e,content:t}}async function Be(e,{type:t="all",consumers:n={css:h,ts:T}}={}){const r={files:[]},o=e.options;if(Oe(e)){const a=await Fe(e);(!a.valid||a.instanceId!==e.id)&&Le(e)}if(t==="all"||t==="css"){const a=E("index.css",n.css(e.root,o));r.files.push(a)}if(t==="all"||t==="ts"){const a=E("index.ts",n.ts(e.root,o));r.files.push(a)}return r}p.DEFAULT_INDENT=" ",p.STATEMENT_AT_RULES=_,p.STATEMENT_OR_BLOCK_AT_RULES=$,p.addIndentToLine=L,p.consumeCSS=h,p.consumeTS=T,p.createFile=E,p.defaultThemeSelectorFn=w,p.defaultUtilitySelectorFn=O,p.defaultVariableNameFn=v,p.indentLines=B,p.isUppercase=U,p.toCamelCase=D,p.toKebabCase=I,p.transpile=Be,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
29
+ -----END PUBLIC KEY-----`,Oe="__licenseRequired",we="__licenseValidated";async function Fe(e){const t=e.replace(/-----BEGIN PUBLIC KEY-----/,"").replace(/-----END PUBLIC KEY-----/,"").replace(/\s/g,""),r=Uint8Array.from(atob(t),n=>n.charCodeAt(0));return await crypto.subtle.importKey("spki",r,{name:"RSASSA-PKCS1-v1_5",hash:"SHA-256"},!0,["verify"])}async function Be({payload:e,signature:t}){const r=new TextEncoder().encode(e),n=Uint8Array.from(atob(t),c=>c.charCodeAt(0)),o=await Fe(Ee);if(!await crypto.subtle.verify({name:"RSASSA-PKCS1-v1_5"},o,n,r))throw new Error("License validation failed: Invalid signature detected. The license may have been modified or corrupted.");return JSON.parse(e)}function De(e){return Object.prototype.hasOwnProperty.call(e,Oe)}async function Le(e){const t=Object.getOwnPropertyDescriptor(e,we);if(!t?.value)return{key:"",instanceId:"",environment:"",valid:!1};const r=t.value;if(typeof r!="object"||r===null||!("payload"in r)||!("signature"in r)||typeof r.payload!="string"||typeof r.signature!="string")return{key:"",instanceId:"",environment:"",valid:!1};try{return await Be(r)}catch{return{key:"",instanceId:"",environment:"",valid:!1}}}function Ue(e){const t=e?.variants;if(!t||Object.keys(t).length===0)return"Record<string, never>";const r=[];for(const[n,o]of Object.entries(t)){if(!o)continue;const c=Object.keys(o);if(c.length>0){const s=c.map(a=>`"${a}"`).join(" | ");r.push(`${n}?: ${s}`)}}return r.length===0?"Record<string, never>":`{ ${r.join("; ")} }`}function Ie(e){return function(r,n){let o=r._exportName;o||(o=E(r.name),r.name[0]&&_(r.name[0])&&(o=U(o)));const c=Ue(r._runtime);return` export const ${o}: (props?: ${c}) => string;`}}function Me(e){return e.filter(t=>C(t)&&!!t._exportName)}function Pe(e){return function(r,n){const o=Me(r.children),c=r.recipes.length>0,s=o.length>0,a=["// Auto-generated by @styleframe/plugin - DO NOT EDIT","",'declare module "virtual:styleframe" {',' import type { Styleframe } from "@styleframe/core";',""," /** Returns the global styleframe instance from styleframe.config.ts */"," export function styleframe(): Styleframe;"];if(c){a.push("");const u=r.recipes.map(i=>e(i,n)).filter(Boolean);a.push(...u)}if(s){a.push("");const u=o.map(i=>e(i,n)).filter(Boolean);a.push(...u)}return a.push("}"),a.push(""),a.push('declare module "virtual:styleframe.css" {'),a.push(" const css: string;"),a.push(" export default css;"),a.push("}"),a.push(""),a.join(`
30
+ `)}}function xe(e){return function(r,n){return r._exportName?` export const ${r._exportName}: string;`:""}}function O(e,t){const r=Pe(O),n=Ie(),o=xe();switch(!0){case Array.isArray(e):return e.map(c=>O(c,t)).join(`
31
+ `);case $(e):return r(e,t);case D(e):return n(e,t);case C(e):return o(e,t);default:return""}}function ke(e){const t=Math.floor(Math.random()*100);e.root.children.push({type:"selector",id:re("sel-"),query:`html:nth-of-type(${t}n+1)::after`,variables:[],children:[],declarations:{content:'"Styleframe Pro: Development Mode – License required for production use"',zIndex:99999,position:"fixed",display:"block !important",opacity:"1 !important",bottom:0,left:0,background:"rgba(0, 0, 0, 0.5)",color:"white",fontSize:"12px",lineHeight:"1",padding:"0.5rem",fontFamily:"sans-serif"}})}function T(e,t=""){return{name:e,content:t}}async function Ve(e,{type:t="all",consumers:r={css:h,ts:R,dts:O}}={}){const n={files:[]},o=e.options;if(De(e)){const c=await Le(e);(!c.valid||c.instanceId!==e.id)&&ke(e)}if(t==="all"||t==="css"){const c=T("index.css",r.css(e.root,o));n.files.push(c)}if(t==="all"||t==="ts"){const c=T("index.ts",r.ts(e.root,o));n.files.push(c)}if(t==="dts"){const c=T("index.d.ts",r.dts(e.root,o));n.files.push(c)}return n}p.DEFAULT_INDENT=" ",p.STATEMENT_AT_RULES=F,p.STATEMENT_OR_BLOCK_AT_RULES=B,p.addIndentToLine=P,p.consumeCSS=h,p.consumeTS=R,p.createFile=T,p.defaultThemeSelectorFn=I,p.defaultUtilitySelectorFn=L,p.defaultVariableNameFn=N,p.indentLines=x,p.isUppercase=_,p.toCamelCase=E,p.toKebabCase=k,p.transpile=Ve,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@styleframe/transpiler",
3
- "version": "2.6.0",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "types": "./dist/transpiler.d.ts",
6
6
  "module": "./dist/transpiler.js",
@@ -22,14 +22,14 @@
22
22
  "scule": "^1.3.0"
23
23
  },
24
24
  "peerDependencies": {
25
- "@styleframe/core": "^2.6.0",
26
- "@styleframe/license": "^2.0.0"
25
+ "@styleframe/core": "^3.1.0",
26
+ "@styleframe/license": "^2.0.2"
27
27
  },
28
28
  "devDependencies": {
29
- "@styleframe/config-typescript": "^2",
30
- "@styleframe/config-vite": "^2",
31
- "@styleframe/core": "^2.6.0",
32
- "@styleframe/license": "^2.0.0",
29
+ "@styleframe/config-typescript": "^3.0.0",
30
+ "@styleframe/config-vite": "^3.0.0",
31
+ "@styleframe/core": "^3.1.0",
32
+ "@styleframe/license": "^2.0.2",
33
33
  "@vitest/coverage-v8": "^3.2.4",
34
34
  "typescript": "^5.8.3",
35
35
  "vite": "^7.0.6",