@styleframe/core 3.4.0 → 3.5.0

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,56 +1,56 @@
1
1
  function x(e) {
2
2
  return typeof e == "object" && e !== null;
3
3
  }
4
- function g(e, t) {
4
+ function b(e, t) {
5
5
  return x(e) && "type" in e && e.type === t;
6
6
  }
7
- function L(e) {
8
- return g(e, "variable");
7
+ function H(e) {
8
+ return b(e, "variable");
9
9
  }
10
- function b(e) {
11
- return g(e, "reference");
10
+ function g(e) {
11
+ return b(e, "reference");
12
12
  }
13
- function Fe(e) {
14
- return g(e, "selector");
13
+ function Oe(e) {
14
+ return b(e, "selector");
15
15
  }
16
16
  function te(e) {
17
- return g(e, "at-rule");
17
+ return b(e, "at-rule");
18
18
  }
19
- function Ne(e) {
20
- return g(e, "utility");
19
+ function Se(e) {
20
+ return b(e, "utility");
21
21
  }
22
22
  function ne(e) {
23
- return g(e, "modifier");
23
+ return b(e, "modifier");
24
24
  }
25
- function T(e) {
26
- return g(e, "css");
25
+ function $(e) {
26
+ return b(e, "css");
27
27
  }
28
- function Se(e) {
29
- return g(e, "theme");
28
+ function Te(e) {
29
+ return b(e, "theme");
30
30
  }
31
- function $(e) {
32
- return g(e, "root");
31
+ function M(e) {
32
+ return b(e, "root");
33
33
  }
34
- function Oe(e) {
35
- return g(e, "recipe");
34
+ function Be(e) {
35
+ return b(e, "recipe");
36
36
  }
37
37
  function re(e) {
38
38
  return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null;
39
39
  }
40
40
  function B(e) {
41
- return re(e) || b(e) || T(e) || Array.isArray(e) && e.every(B);
41
+ return re(e) || g(e) || $(e) || Array.isArray(e) && e.every(B);
42
42
  }
43
- function Te(e) {
43
+ function Pe(e) {
44
44
  return x(e) && "id" in e && "children" in e && "declarations" in e && "variables" in e;
45
45
  }
46
- function G(e) {
46
+ function L(e) {
47
47
  return x(e) && "children" in e && "declarations" in e && "variables" in e;
48
48
  }
49
49
  function ie(e) {
50
50
  return typeof e == "string" && e.startsWith("@");
51
51
  }
52
- function Be(e) {
53
- return x(e) && "id" in e && "root" in e && "variable" in e && "selector" in e && "recipe" in e && typeof e.id == "string" && $(e.root);
52
+ function Ue(e) {
53
+ return x(e) && "id" in e && "root" in e && "variable" in e && "selector" in e && "recipe" in e && typeof e.id == "string" && M(e.root);
54
54
  }
55
55
  function se(e) {
56
56
  let t = 5381;
@@ -58,37 +58,37 @@ function se(e) {
58
58
  t = (t << 5) + t + e.charCodeAt(r) & 4294967295;
59
59
  return (t >>> 0).toString(16).padStart(7, "0").slice(0, 7);
60
60
  }
61
- function z(e) {
62
- const t = typeof e == "function" ? { replacer: e } : e ?? {}, { replacer: r = (o) => o, namespace: n } = t, s = Array.isArray(n) ? n : n ? [n] : [];
63
- return (o) => {
64
- let i = o, f;
61
+ function G(e) {
62
+ const t = typeof e == "function" ? { replacer: e } : e ?? {}, { replacer: r = (c) => c, namespace: n } = t, s = Array.isArray(n) ? n : n ? [n] : [];
63
+ return (c) => {
64
+ let i = c, a;
65
65
  if (typeof i == "string" && i[0] === "@") {
66
- const c = i.slice(1), a = s.find(
67
- (d) => c === d || c.startsWith(`${d}.`)
66
+ const o = i.slice(1), f = s.find(
67
+ (d) => o === d || o.startsWith(`${d}.`)
68
68
  );
69
69
  let l, u;
70
- a ? (l = c, u = c.startsWith(`${a}.`) ? c.slice(a.length + 1) : c) : s.length > 0 ? (l = `${s[0]}.${c}`, u = c) : (l = c, u = c), f = r(u), i = {
70
+ f ? (l = o, u = o.startsWith(`${f}.`) ? o.slice(f.length + 1) : o) : s.length > 0 ? (l = `${s[0]}.${o}`, u = o) : (l = o, u = o), a = r(u), i = {
71
71
  type: "reference",
72
72
  name: l
73
73
  };
74
- } else if (b(i)) {
75
- let c = i.name;
76
- for (const a of s)
77
- if (c.startsWith(`${a}.`)) {
78
- c = c.slice(a.length + 1);
74
+ } else if (g(i)) {
75
+ let o = i.name;
76
+ for (const f of s)
77
+ if (o.startsWith(`${f}.`)) {
78
+ o = o.slice(f.length + 1);
79
79
  break;
80
80
  }
81
- f = r(c);
81
+ a = r(o);
82
82
  } else {
83
- const c = String(o).trim();
84
- /\s/.test(c) ? f = se(c) : f = `[${c}]`;
83
+ const o = String(c).trim();
84
+ /\s/.test(o) ? a = se(o) : a = `[${o}]`;
85
85
  }
86
86
  return {
87
- [f]: i
87
+ [a]: i
88
88
  };
89
89
  };
90
90
  }
91
- const Pe = ({
91
+ const ce = ({
92
92
  name: e,
93
93
  value: t,
94
94
  modifiers: r
@@ -96,18 +96,28 @@ const Pe = ({
96
96
  ...r,
97
97
  e,
98
98
  ...t === "default" ? [] : [t]
99
- ].filter(Boolean).join(":")}`, F = /@([\w.-]+)/g;
100
- function P(e) {
99
+ ].filter(Boolean).join(":")}`;
100
+ function oe(e, t) {
101
+ if (g(t)) {
102
+ e._usage.variables.add(t.name);
103
+ return;
104
+ }
105
+ if ($(t))
106
+ for (const r of t.value)
107
+ g(r) && e._usage.variables.add(r.name);
108
+ }
109
+ const N = /@([\w.-]+)/g;
110
+ function z(e) {
101
111
  const t = [];
102
112
  let r = 0, n;
103
- for (F.lastIndex = 0; (n = F.exec(e)) !== null; ) {
104
- const o = e.slice(r, n.index);
105
- o !== "" && t.push(o), t.push({ type: "reference", name: n[1] }), r = F.lastIndex;
113
+ for (N.lastIndex = 0; (n = N.exec(e)) !== null; ) {
114
+ const c = e.slice(r, n.index);
115
+ c !== "" && t.push(c), t.push({ type: "reference", name: n[1] }), r = N.lastIndex;
106
116
  }
107
117
  const s = e.slice(r);
108
118
  return s !== "" && t.push(s), t;
109
119
  }
110
- function oe(e, t, r) {
120
+ function ae(e, t, r) {
111
121
  let n = t;
112
122
  for (; n; ) {
113
123
  if (n.variables.some((s) => s.name === e))
@@ -119,24 +129,24 @@ function oe(e, t, r) {
119
129
  }
120
130
  return !1;
121
131
  }
122
- function ce(e, t, r) {
123
- if (!oe(e, t, r))
132
+ function fe(e, t, r) {
133
+ if (!ae(e, t, r))
124
134
  throw new Error(
125
135
  `[styleframe] Variable "${e}" is not defined. Check that the variable exists before referencing it with "@${e}".`
126
136
  );
127
137
  }
128
- function I(e, t) {
138
+ function C(e, t) {
129
139
  return function(n) {
130
140
  if (typeof n != "string" || !n.includes("@"))
131
141
  return n;
132
142
  if (ie(n) && /^@[\w.-]+$/.test(n)) {
133
143
  const i = n.slice(1);
134
- return ce(i, e, t), t._usage.variables.add(i), { type: "reference", name: i };
144
+ return fe(i, e, t), t._usage.variables.add(i), { type: "reference", name: i };
135
145
  }
136
- const s = P(n);
137
- if (s.some((i) => b(i))) {
146
+ const s = z(n);
147
+ if (s.some((i) => g(i))) {
138
148
  for (const i of s)
139
- b(i) && t._usage.variables.add(i.name);
149
+ g(i) && t._usage.variables.add(i.name);
140
150
  return { type: "css", value: s };
141
151
  }
142
152
  return n;
@@ -144,8 +154,8 @@ function I(e, t) {
144
154
  }
145
155
  function q(e, t) {
146
156
  return function(n, s) {
147
- const o = I(e, t), i = s != null ? o(s) : s;
148
- if (L(n))
157
+ const c = C(e, t), i = s != null ? c(s) : s;
158
+ if (H(n))
149
159
  return t._usage.variables.add(n.name), {
150
160
  type: "reference",
151
161
  name: n.name,
@@ -162,25 +172,30 @@ function q(e, t) {
162
172
  };
163
173
  };
164
174
  }
165
- function fe(e, t) {
166
- const r = q(e, t);
167
- return function(s, ...o) {
175
+ function ue(e, t) {
176
+ const r = q(e, t), n = (s) => {
177
+ const c = z(s);
178
+ for (const i of c)
179
+ g(i) && t._usage.variables.add(i.name);
180
+ return c;
181
+ };
182
+ return function(c, ...i) {
168
183
  return {
169
184
  type: "css",
170
- value: s.reduce((f, c, a) => {
171
- if (f.push(...P(c)), a < o.length) {
172
- const l = o[a];
173
- L(l) ? f.push(r(l)) : te(l) ? f.push(l.rule) : typeof l == "string" && l.includes("@") ? f.push(...P(l)) : f.push(l);
185
+ value: c.reduce((o, f, l) => {
186
+ if (o.push(...n(f)), l < i.length) {
187
+ const u = i[l];
188
+ H(u) ? o.push(r(u)) : te(u) ? o.push(u.rule) : typeof u == "string" && u.includes("@") ? o.push(...n(u)) : o.push(u);
174
189
  }
175
- return f;
190
+ return o;
176
191
  }, [])
177
192
  };
178
193
  };
179
194
  }
180
- function Ue(e) {
195
+ function De(e) {
181
196
  return e.charAt(0).toUpperCase() + e.slice(1);
182
197
  }
183
- function De(e) {
198
+ function Ce(e) {
184
199
  return `.${e.replace(/[[\].#()%,:/]/g, "\\$&")}`;
185
200
  }
186
201
  function j(e) {
@@ -193,154 +208,154 @@ function j(e) {
193
208
  e.byteLength / e.BYTES_PER_ELEMENT || 1
194
209
  );
195
210
  }
196
- function ae(e) {
211
+ function le(e) {
197
212
  if (e = e || {}, e.circular)
198
- return ue(e);
213
+ return de(e);
199
214
  const t = /* @__PURE__ */ new Map();
200
215
  if (t.set(Date, (i) => new Date(i)), t.set(
201
216
  Map,
202
- (i, f) => new Map(n(Array.from(i), f))
217
+ (i, a) => new Map(n(Array.from(i), a))
203
218
  ), t.set(
204
219
  Set,
205
- (i, f) => new Set(n(Array.from(i), f))
220
+ (i, a) => new Set(n(Array.from(i), a))
206
221
  ), e.constructorHandlers)
207
222
  for (const i of e.constructorHandlers)
208
223
  t.set(i[0], i[1]);
209
224
  let r;
210
- return e.proto ? o : s;
211
- function n(i, f) {
212
- const c = Object.keys(i), a = Array.from({ length: c.length });
213
- for (let l = 0; l < c.length; l++) {
214
- const u = c[l], d = i[u];
215
- typeof d != "object" || d === null ? a[u] = d : d.constructor !== Object && (r = t.get(d.constructor)) ? a[u] = r(d, f) : ArrayBuffer.isView(d) ? a[u] = j(d) : a[u] = f(d);
225
+ return e.proto ? c : s;
226
+ function n(i, a) {
227
+ const o = Object.keys(i), f = Array.from({ length: o.length });
228
+ for (let l = 0; l < o.length; l++) {
229
+ const u = o[l], d = i[u];
230
+ typeof d != "object" || d === null ? f[u] = d : d.constructor !== Object && (r = t.get(d.constructor)) ? f[u] = r(d, a) : ArrayBuffer.isView(d) ? f[u] = j(d) : f[u] = a(d);
216
231
  }
217
- return a;
232
+ return f;
218
233
  }
219
234
  function s(i) {
220
235
  if (typeof i != "object" || i === null) return i;
221
236
  if (Array.isArray(i)) return n(i, s);
222
237
  if (i.constructor !== Object && (r = t.get(i.constructor)))
223
238
  return r(i, s);
224
- const f = {};
225
- for (const c in i) {
226
- if (Object.hasOwnProperty.call(i, c) === !1) continue;
227
- const a = i[c];
228
- typeof a != "object" || a === null ? f[c] = a : a.constructor !== Object && (r = t.get(a.constructor)) ? f[c] = r(a, s) : ArrayBuffer.isView(a) ? f[c] = j(a) : f[c] = s(a);
239
+ const a = {};
240
+ for (const o in i) {
241
+ if (Object.hasOwnProperty.call(i, o) === !1) continue;
242
+ const f = i[o];
243
+ typeof f != "object" || f === null ? a[o] = f : f.constructor !== Object && (r = t.get(f.constructor)) ? a[o] = r(f, s) : ArrayBuffer.isView(f) ? a[o] = j(f) : a[o] = s(f);
229
244
  }
230
- return f;
245
+ return a;
231
246
  }
232
- function o(i) {
247
+ function c(i) {
233
248
  if (typeof i != "object" || i === null) return i;
234
- if (Array.isArray(i)) return n(i, o);
249
+ if (Array.isArray(i)) return n(i, c);
235
250
  if (i.constructor !== Object && (r = t.get(i.constructor)))
236
- return r(i, o);
237
- const f = {};
238
- for (const c in i) {
239
- const a = i[c];
240
- typeof a != "object" || a === null ? f[c] = a : a.constructor !== Object && (r = t.get(a.constructor)) ? f[c] = r(a, o) : ArrayBuffer.isView(a) ? f[c] = j(a) : f[c] = o(a);
251
+ return r(i, c);
252
+ const a = {};
253
+ for (const o in i) {
254
+ const f = i[o];
255
+ typeof f != "object" || f === null ? a[o] = f : f.constructor !== Object && (r = t.get(f.constructor)) ? a[o] = r(f, c) : ArrayBuffer.isView(f) ? a[o] = j(f) : a[o] = c(f);
241
256
  }
242
- return f;
257
+ return a;
243
258
  }
244
259
  }
245
- function ue(e) {
260
+ function de(e) {
246
261
  const t = [], r = [], n = /* @__PURE__ */ new Map();
247
- if (n.set(Date, (c) => new Date(c)), n.set(
262
+ if (n.set(Date, (o) => new Date(o)), n.set(
248
263
  Map,
249
- (c, a) => new Map(o(Array.from(c), a))
264
+ (o, f) => new Map(c(Array.from(o), f))
250
265
  ), n.set(
251
266
  Set,
252
- (c, a) => new Set(o(Array.from(c), a))
267
+ (o, f) => new Set(c(Array.from(o), f))
253
268
  ), e.constructorHandlers)
254
- for (const c of e.constructorHandlers)
255
- n.set(c[0], c[1]);
269
+ for (const o of e.constructorHandlers)
270
+ n.set(o[0], o[1]);
256
271
  let s;
257
- return e.proto ? f : i;
258
- function o(c, a) {
259
- const l = Object.keys(c), u = Array.from({ length: l.length });
272
+ return e.proto ? a : i;
273
+ function c(o, f) {
274
+ const l = Object.keys(o), u = Array.from({ length: l.length });
260
275
  for (let d = 0; d < l.length; d++) {
261
- const y = l[d], p = c[y];
262
- if (typeof p != "object" || p === null)
263
- u[y] = p;
264
- else if (p.constructor !== Object && (s = n.get(p.constructor)))
265
- u[y] = s(p, a);
266
- else if (ArrayBuffer.isView(p))
267
- u[y] = j(p);
276
+ const y = l[d], m = o[y];
277
+ if (typeof m != "object" || m === null)
278
+ u[y] = m;
279
+ else if (m.constructor !== Object && (s = n.get(m.constructor)))
280
+ u[y] = s(m, f);
281
+ else if (ArrayBuffer.isView(m))
282
+ u[y] = j(m);
268
283
  else {
269
- const h = t.indexOf(p);
270
- h !== -1 ? u[y] = r[h] : u[y] = a(p);
284
+ const h = t.indexOf(m);
285
+ h !== -1 ? u[y] = r[h] : u[y] = f(m);
271
286
  }
272
287
  }
273
288
  return u;
274
289
  }
275
- function i(c) {
276
- if (typeof c != "object" || c === null) return c;
277
- if (Array.isArray(c)) return o(c, i);
278
- if (c.constructor !== Object && (s = n.get(c.constructor)))
279
- return s(c, i);
280
- const a = {};
281
- t.push(c), r.push(a);
282
- for (const l in c) {
283
- if (Object.hasOwnProperty.call(c, l) === !1) continue;
284
- const u = c[l];
290
+ function i(o) {
291
+ if (typeof o != "object" || o === null) return o;
292
+ if (Array.isArray(o)) return c(o, i);
293
+ if (o.constructor !== Object && (s = n.get(o.constructor)))
294
+ return s(o, i);
295
+ const f = {};
296
+ t.push(o), r.push(f);
297
+ for (const l in o) {
298
+ if (Object.hasOwnProperty.call(o, l) === !1) continue;
299
+ const u = o[l];
285
300
  if (typeof u != "object" || u === null)
286
- a[l] = u;
301
+ f[l] = u;
287
302
  else if (u.constructor !== Object && (s = n.get(u.constructor)))
288
- a[l] = s(u, i);
303
+ f[l] = s(u, i);
289
304
  else if (ArrayBuffer.isView(u))
290
- a[l] = j(u);
305
+ f[l] = j(u);
291
306
  else {
292
307
  const d = t.indexOf(u);
293
- d !== -1 ? a[l] = r[d] : a[l] = i(u);
308
+ d !== -1 ? f[l] = r[d] : f[l] = i(u);
294
309
  }
295
310
  }
296
- return t.pop(), r.pop(), a;
311
+ return t.pop(), r.pop(), f;
297
312
  }
298
- function f(c) {
299
- if (typeof c != "object" || c === null) return c;
300
- if (Array.isArray(c)) return o(c, f);
301
- if (c.constructor !== Object && (s = n.get(c.constructor)))
302
- return s(c, f);
303
- const a = {};
304
- t.push(c), r.push(a);
305
- for (const l in c) {
306
- const u = c[l];
313
+ function a(o) {
314
+ if (typeof o != "object" || o === null) return o;
315
+ if (Array.isArray(o)) return c(o, a);
316
+ if (o.constructor !== Object && (s = n.get(o.constructor)))
317
+ return s(o, a);
318
+ const f = {};
319
+ t.push(o), r.push(f);
320
+ for (const l in o) {
321
+ const u = o[l];
307
322
  if (typeof u != "object" || u === null)
308
- a[l] = u;
323
+ f[l] = u;
309
324
  else if (u.constructor !== Object && (s = n.get(u.constructor)))
310
- a[l] = s(u, f);
325
+ f[l] = s(u, a);
311
326
  else if (ArrayBuffer.isView(u))
312
- a[l] = j(u);
327
+ f[l] = j(u);
313
328
  else {
314
329
  const d = t.indexOf(u);
315
- d !== -1 ? a[l] = r[d] : a[l] = f(u);
330
+ d !== -1 ? f[l] = r[d] : f[l] = a(u);
316
331
  }
317
332
  }
318
- return t.pop(), r.pop(), a;
333
+ return t.pop(), r.pop(), f;
319
334
  }
320
335
  }
321
- const M = ae();
322
- function A(e, t = 8) {
336
+ const R = le();
337
+ function v(e, t = 8) {
323
338
  const r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
324
339
  let n = "";
325
340
  for (let s = 0; s < t; s++) {
326
- const o = Math.floor(Math.random() * r.length);
327
- n += r[o];
341
+ const c = Math.floor(Math.random() * r.length);
342
+ n += r[c];
328
343
  }
329
344
  return e ? `${e}${n}` : n;
330
345
  }
331
- function Ce(e, t) {
346
+ function Ie(e, t) {
332
347
  const r = e.variables.find((n) => n.name === t);
333
348
  if (!r)
334
349
  throw new Error(`Variable "${t}" not found`);
335
350
  return r;
336
351
  }
337
- function Ie(e, t) {
352
+ function Ke(e, t) {
338
353
  const r = e.utilities.find((n) => n.name === t);
339
354
  if (!r)
340
355
  throw new Error(`Utility "${t}" not found`);
341
356
  return r;
342
357
  }
343
- function le(e, t) {
358
+ function ye(e, t) {
344
359
  const r = e.modifiers.find(
345
360
  (n) => n.key.includes(t)
346
361
  );
@@ -348,49 +363,49 @@ function le(e, t) {
348
363
  throw new Error(`Modifier "${t}" not found`);
349
364
  return r;
350
365
  }
351
- function N(e, t) {
366
+ function O(e, t) {
352
367
  if (e === t) return !0;
353
368
  if (typeof e != typeof t) return !1;
354
369
  if (e === null || t === null) return e === t;
355
370
  if (typeof e != "object" || typeof t != "object") return !1;
356
371
  if (Array.isArray(e) && Array.isArray(t))
357
- return e.length !== t.length ? !1 : e.every((r, n) => N(r, t[n]));
372
+ return e.length !== t.length ? !1 : e.every((r, n) => O(r, t[n]));
358
373
  if ("type" in e && "type" in t) {
359
374
  if (e.type !== t.type) return !1;
360
- if (b(e) && b(t))
361
- return e.name === t.name && N(e.fallback, t.fallback);
362
- if (T(e) && T(t))
363
- return N(e.value, t.value);
375
+ if (g(e) && g(t))
376
+ return e.name === t.name && O(e.fallback, t.fallback);
377
+ if ($(e) && $(t))
378
+ return O(e.value, t.value);
364
379
  }
365
380
  return !1;
366
381
  }
367
382
  const X = "__licenseRequired";
368
- function de(e) {
369
- U(e) || Object.defineProperty(e, X, {
383
+ function me(e) {
384
+ P(e) || Object.defineProperty(e, X, {
370
385
  value: !0,
371
386
  writable: !1,
372
387
  configurable: !1,
373
388
  enumerable: !0
374
389
  });
375
390
  }
376
- function U(e) {
391
+ function P(e) {
377
392
  return Object.prototype.hasOwnProperty.call(e, X);
378
393
  }
379
- function ye(e, t) {
394
+ function pe(e, t) {
380
395
  const r = [...e];
381
396
  for (const n of t) {
382
397
  const s = r.find(
383
- (o) => o.name === n.name
398
+ (c) => c.name === n.name
384
399
  );
385
400
  s ? s.value = n.value : r.push(n);
386
401
  }
387
402
  return r;
388
403
  }
389
- function pe(e, t) {
404
+ function he(e, t) {
390
405
  const r = [...e];
391
406
  for (const n of t) {
392
407
  const s = r.find(
393
- (o) => o.name === n.name
408
+ (c) => c.name === n.name
394
409
  );
395
410
  s ? Object.assign(
396
411
  s,
@@ -401,7 +416,7 @@ function pe(e, t) {
401
416
  }
402
417
  function Y(e, t) {
403
418
  return Object.keys(e).reduce(
404
- (r, n) => (n === "variables" ? r.variables = ye(e.variables, t.variables) : n === "declarations" ? r.declarations = { ...e.declarations, ...t.declarations } : n === "themes" && $(r) && $(e) && $(t) ? r.themes = pe(e.themes, t.themes) : Array.isArray(e[n]) && (r[n] = e[n].concat(
419
+ (r, n) => (n === "variables" ? r.variables = pe(e.variables, t.variables) : n === "declarations" ? r.declarations = { ...e.declarations, ...t.declarations } : n === "themes" && M(r) && M(e) && M(t) ? r.themes = he(e.themes, t.themes) : Array.isArray(e[n]) && (r[n] = e[n].concat(
405
420
  t[n]
406
421
  )), r),
407
422
  {
@@ -410,29 +425,29 @@ function Y(e, t) {
410
425
  }
411
426
  );
412
427
  }
413
- function D(e, t) {
428
+ function U(e, t) {
414
429
  for (const r of e)
415
- "id" in r && typeof r.id == "string" && (t._registry.set(r.id, r), "children" in r && D(r.children, t));
430
+ "id" in r && typeof r.id == "string" && (t._registry.set(r.id, r), "children" in r && U(r.children, t));
416
431
  }
417
- function me(e) {
418
- e._registry = /* @__PURE__ */ new Map(), e._registry.set(e.id, e), D(e.children, e);
432
+ function ge(e) {
433
+ e._registry = /* @__PURE__ */ new Map(), e._registry.set(e.id, e), U(e.children, e);
419
434
  for (const t of e.themes)
420
- e._registry.set(t.id, t), D(t.children, e);
435
+ e._registry.set(t.id, t), U(t.children, e);
421
436
  }
422
- function Ke(e, ...t) {
437
+ function We(e, ...t) {
423
438
  return t.reduce((r, n) => {
424
439
  const s = {
425
440
  ...r,
426
441
  root: Y(r.root, n.root)
427
442
  };
428
- return me(s.root), (U(r) || U(n)) && de(s), s;
443
+ return ge(s.root), (P(r) || P(n)) && me(s), s;
429
444
  }, e);
430
445
  }
431
- function K(e, t) {
432
- return function(n, s, o) {
446
+ function I(e, t) {
447
+ return function(n, s, c) {
433
448
  const i = {
434
449
  type: "at-rule",
435
- id: A("ar-"),
450
+ id: v("ar-"),
436
451
  parentId: e.id,
437
452
  identifier: n,
438
453
  rule: s,
@@ -441,107 +456,107 @@ function K(e, t) {
441
456
  children: []
442
457
  };
443
458
  t._registry.set(i.id, i);
444
- const f = v(i, t);
445
- return typeof o == "function" ? i.declarations = o(f) ?? {} : G(o) ? (i.variables = o.variables, i.declarations = o.declarations, i.children = o.children) : o && (i.declarations = o), _(
459
+ const a = w(i, t);
460
+ return typeof c == "function" ? i.declarations = c(a) ?? {} : L(c) ? (i.variables = c.variables, i.declarations = c.declarations, i.children = c.children) : c && (i.declarations = c), E(
446
461
  i.declarations,
447
- f,
462
+ a,
448
463
  i,
449
464
  t
450
465
  ), e.children.push(i), i;
451
466
  };
452
467
  }
453
- function he(e, t) {
454
- const r = K(e, t);
455
- return function(s, o) {
456
- return r("media", s, o);
468
+ function be(e, t) {
469
+ const r = I(e, t);
470
+ return function(s, c) {
471
+ return r("media", s, c);
457
472
  };
458
473
  }
459
- function ge(e, t) {
460
- const r = K(e, t);
461
- return function(s, o) {
462
- return r("keyframes", s, o);
474
+ function ve(e, t) {
475
+ const r = I(e, t);
476
+ return function(s, c) {
477
+ return r("keyframes", s, c);
463
478
  };
464
479
  }
465
- function be(e, t) {
480
+ function Ae(e, t) {
466
481
  return function(n, s) {
467
- const o = {
482
+ const c = {
468
483
  type: "selector",
469
- id: A("sel-"),
484
+ id: v("sel-"),
470
485
  parentId: e.id,
471
486
  query: n,
472
487
  declarations: {},
473
488
  variables: [],
474
489
  children: []
475
490
  };
476
- t._registry.set(o.id, o);
477
- const i = v(o, t);
478
- return typeof s == "function" ? o.declarations = s(i) ?? {} : G(s) ? (o.variables = s.variables, o.declarations = s.declarations, o.children = s.children) : o.declarations = s, _(
479
- o.declarations,
491
+ t._registry.set(c.id, c);
492
+ const i = w(c, t);
493
+ return typeof s == "function" ? c.declarations = s(i) ?? {} : L(s) ? (c.variables = s.variables, c.declarations = s.declarations, c.children = s.children) : c.declarations = s, E(
494
+ c.declarations,
480
495
  i,
481
- o,
496
+ c,
482
497
  t
483
- ), e.children.push(o), o;
498
+ ), e.children.push(c), c;
484
499
  };
485
500
  }
486
- function Ae(e, t) {
487
- return function(n, s, o = {
501
+ function we(e, t) {
502
+ return function(n, s, c = {
488
503
  default: !1
489
504
  }) {
490
- const i = typeof n == "string" ? n : n.name, c = I(e, t)(s), a = e.variables.find(
505
+ const i = typeof n == "string" ? n : n.name, o = C(e, t)(s), f = e.variables.find(
491
506
  (u) => u.name === i
492
507
  );
493
- if (o.default && a)
494
- return a;
495
- if (a)
496
- return a.value = c, a;
508
+ if (c.default && f)
509
+ return f;
510
+ if (f)
511
+ return f.value = o, f;
497
512
  const l = {
498
513
  type: "variable",
499
- id: A("var-"),
514
+ id: v("var-"),
500
515
  parentId: e.id,
501
516
  name: i,
502
- value: c
517
+ value: o
503
518
  };
504
519
  return e.variables.push(l), l;
505
520
  };
506
521
  }
507
- function v(e, t) {
508
- const r = Ae(e, t), n = be(e, t), s = K(e, t), o = ge(t, t), i = he(e, t), f = q(t, t), c = fe(t, t);
522
+ function w(e, t) {
523
+ const r = we(e, t), n = Ae(e, t), s = I(e, t), c = ve(t, t), i = be(e, t), a = q(t, t), o = ue(t, t);
509
524
  return {
510
525
  variable: r,
511
526
  selector: n,
512
- keyframes: o,
527
+ keyframes: c,
513
528
  atRule: s,
514
529
  media: i,
515
- ref: f,
516
- css: c
530
+ ref: a,
531
+ css: o
517
532
  };
518
533
  }
519
- function _(e, t, r, n) {
520
- for (const o in e)
521
- if (o.startsWith("@")) {
522
- const i = e[o];
534
+ function E(e, t, r, n) {
535
+ for (const c in e)
536
+ if (c.startsWith("@")) {
537
+ const i = e[c];
523
538
  if (typeof i == "object" && i !== null && !B(i)) {
524
- const f = o.replace(/^@(\w+).*/, "$1"), c = o.replace(`@${f}`, "").trim();
525
- t.atRule(f, c, i), delete e[o];
539
+ const a = c.replace(/^@(\w+).*/, "$1"), o = c.replace(`@${a}`, "").trim();
540
+ t.atRule(a, o, i), delete e[c];
526
541
  }
527
- } else if (/^[.&:]/.test(o) || /^(\d+%|from|to)(\s*,\s*(\d+%|from|to))*$/.test(o)) {
528
- const i = e[o];
529
- typeof i == "object" && (t.selector(o, i), delete e[o]);
542
+ } else if (/^[.&:]/.test(c) || /^(\d+%|from|to)(\s*,\s*(\d+%|from|to))*$/.test(c)) {
543
+ const i = e[c];
544
+ typeof i == "object" && (t.selector(c, i), delete e[c]);
530
545
  }
531
- const s = I(r, n);
532
- for (const o in e) {
533
- const i = e[o];
546
+ const s = C(r, n);
547
+ for (const c in e) {
548
+ const i = e[c];
534
549
  if (B(i)) {
535
- const f = s(i);
536
- f !== i && (e[o] = f);
550
+ const a = s(i);
551
+ a !== i && (e[c] = a);
537
552
  }
538
553
  }
539
554
  return e;
540
555
  }
541
- function ve(e, t, r) {
556
+ function je(e, t, r) {
542
557
  const n = {
543
558
  ...e,
544
- id: A("ut-"),
559
+ id: v("ut-"),
545
560
  parentId: e.parentId,
546
561
  declarations: { ...e.declarations },
547
562
  variables: [...e.variables],
@@ -550,20 +565,20 @@ function ve(e, t, r) {
550
565
  };
551
566
  if (t._registry.set(n.id, n), r.size > 0) {
552
567
  const s = [...r.values()];
553
- let o = M(e.declarations);
568
+ let c = R(e.declarations);
554
569
  n.declarations = {}, n.variables = [], n.children = [];
555
- for (let f = s.length - 1; f >= 0; f--) {
556
- const c = v(n, t), a = s[f]?.factory({
557
- ...c,
558
- declarations: M(o),
559
- variables: M(e.variables),
560
- children: M(e.children)
570
+ for (let a = s.length - 1; a >= 0; a--) {
571
+ const o = w(n, t), f = s[a]?.factory({
572
+ ...o,
573
+ declarations: R(c),
574
+ variables: R(e.variables),
575
+ children: R(e.children)
561
576
  });
562
- a && (o = a);
577
+ f && (c = f);
563
578
  }
564
- n.declarations = o;
565
- const i = v(n, t);
566
- _(
579
+ n.declarations = c;
580
+ const i = w(n, t);
581
+ E(
567
582
  n.declarations,
568
583
  i,
569
584
  n,
@@ -572,20 +587,20 @@ function ve(e, t, r) {
572
587
  }
573
588
  return n;
574
589
  }
575
- function we(e, t) {
590
+ function Ve(e, t) {
576
591
  return function(n, s) {
577
- const o = {
592
+ const c = {
578
593
  type: "modifier",
579
594
  key: Array.isArray(n) ? n : [n],
580
595
  factory: s
581
596
  };
582
- return t.modifiers.push(o), o;
597
+ return t.modifiers.push(c), c;
583
598
  };
584
599
  }
585
- function je() {
600
+ function ke() {
586
601
  const e = {
587
602
  type: "root",
588
- id: A("rt-"),
603
+ id: v("rt-"),
589
604
  declarations: {},
590
605
  utilities: [],
591
606
  modifiers: [],
@@ -595,22 +610,23 @@ function je() {
595
610
  themes: [],
596
611
  _registry: /* @__PURE__ */ new Map(),
597
612
  _usage: {
598
- variables: /* @__PURE__ */ new Set()
613
+ variables: /* @__PURE__ */ new Set(),
614
+ utilities: /* @__PURE__ */ new Set()
599
615
  }
600
616
  };
601
617
  return e._registry.set(e.id, e), e;
602
618
  }
603
- function Ve(e, t) {
604
- const r = z({ namespace: e });
619
+ function _e(e, t) {
620
+ const r = G({ namespace: e });
605
621
  return (n) => {
606
622
  if (typeof n == "string" && n[0] === "@") {
607
- const s = n.slice(1), o = e.find(
623
+ const s = n.slice(1), c = e.find(
608
624
  (i) => s === i || s.startsWith(`${i}.`)
609
625
  );
610
- if (o) {
611
- const i = s.slice(o.length + 1) || s;
612
- if (t.variables.some((f) => f.name === s))
613
- return {
626
+ if (c) {
627
+ const i = s.slice(c.length + 1) || s;
628
+ if (t.variables.some((a) => a.name === s))
629
+ return t._usage.variables.add(s), {
614
630
  [i]: {
615
631
  type: "reference",
616
632
  name: s
@@ -618,17 +634,17 @@ function Ve(e, t) {
618
634
  };
619
635
  } else {
620
636
  for (const i of e) {
621
- const f = `${i}.${s}`;
622
- if (t.variables.some((c) => c.name === f))
623
- return {
637
+ const a = `${i}.${s}`;
638
+ if (t.variables.some((o) => o.name === a))
639
+ return t._usage.variables.add(a), {
624
640
  [s]: {
625
641
  type: "reference",
626
- name: f
642
+ name: a
627
643
  }
628
644
  };
629
645
  }
630
646
  if (t.variables.some((i) => i.name === s))
631
- return {
647
+ return t._usage.variables.add(s), {
632
648
  [s]: {
633
649
  type: "reference",
634
650
  name: s
@@ -646,34 +662,36 @@ function Re(e) {
646
662
  if (!ne(r)) continue;
647
663
  const n = [];
648
664
  for (const s of r.key)
649
- for (const o of t) {
650
- const i = new Map(o);
665
+ for (const c of t) {
666
+ const i = new Map(c);
651
667
  i.set(s, r), n.push(i);
652
668
  }
653
669
  t = n;
654
670
  }
655
671
  return t.filter((r) => r.size > 0);
656
672
  }
657
- function ke(e, t) {
658
- return function(n, s, o = {}) {
659
- const i = t.utilities.find((c) => c.name === n);
673
+ function Me(e, t) {
674
+ return function(n, s, c = {}) {
675
+ const i = t.utilities.find((o) => o.name === n);
660
676
  if (i)
661
677
  return i.create;
662
- const f = {
678
+ const a = {
663
679
  type: "utility",
664
680
  name: n,
665
681
  factory: s,
666
682
  values: [],
667
- autogenerate: o.autogenerate ?? (Array.isArray(o.namespace) ? Ve(o.namespace, t) : z(
668
- o.namespace ? { namespace: o.namespace } : void 0
683
+ autogenerate: c.autogenerate ?? (Array.isArray(c.namespace) ? _e(c.namespace, t) : G(
684
+ c.namespace ? { namespace: c.namespace } : void 0
669
685
  )),
670
- namespace: o.namespace,
671
- create: (c, a = []) => {
672
- let l = c;
673
- if (Array.isArray(c)) {
686
+ namespace: c.namespace,
687
+ create: (o, f = []) => {
688
+ let l = o;
689
+ if (Array.isArray(o)) {
674
690
  l = {};
675
- for (const u of c) {
676
- const d = f.autogenerate(u);
691
+ for (const u of o) {
692
+ const d = a.autogenerate(u);
693
+ for (const y of Object.values(d))
694
+ oe(t, y);
677
695
  l = {
678
696
  ...l,
679
697
  ...d
@@ -683,35 +701,35 @@ function ke(e, t) {
683
701
  for (const [u, d] of Object.entries(l)) {
684
702
  let y = d;
685
703
  if (typeof d == "string" && d[0] === "@") {
686
- const m = d.slice(1);
687
- !Array.isArray(l) && m in l && (y = l[m]);
704
+ const p = d.slice(1);
705
+ !Array.isArray(l) && p in l && (y = l[p]);
688
706
  }
689
- if (f.namespace && b(d))
690
- if (t.variables.some((m) => m.name === d.name))
691
- y = d;
707
+ if (a.namespace && g(d))
708
+ if (t.variables.some((p) => p.name === d.name))
709
+ y = d, t._usage.variables.add(d.name);
692
710
  else {
693
- const m = Array.isArray(f.namespace) ? f.namespace : [f.namespace];
694
- let k = !1;
695
- for (const V of m) {
696
- const w = `${V}.${u}`;
697
- if (w !== d.name && t.variables.some((R) => R.name === w)) {
711
+ const p = Array.isArray(a.namespace) ? a.namespace : [a.namespace];
712
+ let _ = !1;
713
+ for (const V of p) {
714
+ const A = `${V}.${u}`;
715
+ if (A !== d.name && t.variables.some((k) => k.name === A)) {
698
716
  y = {
699
717
  type: "reference",
700
- name: w
701
- }, k = !0;
718
+ name: A
719
+ }, t._usage.variables.add(A), _ = !0;
702
720
  break;
703
721
  }
704
722
  }
705
- k || (t.variables.some((V) => V.name === u) ? y = {
723
+ _ || (t.variables.some((V) => V.name === u) ? (y = {
706
724
  type: "reference",
707
725
  name: u
708
- } : y = u);
726
+ }, t._usage.variables.add(u)) : y = u);
709
727
  }
710
- const p = f.values.find(
711
- (m) => m.key === u && m.modifiers.length === 0
728
+ const m = a.values.find(
729
+ (p) => p.key === u && p.modifiers.length === 0
712
730
  ), h = {
713
731
  type: "utility",
714
- id: A("ut-"),
732
+ id: v("ut-"),
715
733
  parentId: e.id,
716
734
  name: n,
717
735
  value: u,
@@ -721,72 +739,72 @@ function ke(e, t) {
721
739
  modifiers: []
722
740
  };
723
741
  t._registry.set(h.id, h);
724
- const W = v(
742
+ const K = w(
725
743
  h,
726
744
  t
727
745
  );
728
746
  if (h.declarations = s({
729
- ...W,
747
+ ...K,
730
748
  value: y
731
- }) ?? {}, _(
749
+ }) ?? {}, E(
732
750
  h.declarations,
733
- W,
751
+ K,
734
752
  h,
735
753
  t
736
- ), p || (f.values.push({
754
+ ), m || (a.values.push({
737
755
  key: u,
738
756
  value: y,
739
757
  modifiers: []
740
- }), e.children.push(h)), a && a.length > 0)
741
- for (const m of a) {
742
- const k = Array.isArray(m) ? m : [m], V = Re(k);
743
- for (const w of V) {
744
- const R = [...w.keys()];
745
- f.values.find(
746
- (E) => E.key === u && E.modifiers.length === R.length && E.modifiers.every(
747
- (Q, ee) => Q === R[ee]
758
+ }), e.children.push(h)), f && f.length > 0)
759
+ for (const p of f) {
760
+ const _ = Array.isArray(p) ? p : [p], V = Re(_);
761
+ for (const A of V) {
762
+ const k = [...A.keys()];
763
+ a.values.find(
764
+ (F) => F.key === u && F.modifiers.length === k.length && F.modifiers.every(
765
+ (Q, ee) => Q === k[ee]
748
766
  )
749
- ) || (f.values.push({
767
+ ) || (a.values.push({
750
768
  key: u,
751
769
  value: y,
752
- modifiers: R
770
+ modifiers: k
753
771
  }), e.children.push(
754
- ve(h, t, w)
772
+ je(h, t, A)
755
773
  ));
756
774
  }
757
775
  }
758
776
  }
759
777
  }
760
778
  };
761
- return t.utilities.push(f), f.create;
779
+ return t.utilities.push(a), a.create;
762
780
  };
763
781
  }
764
- function Me(e, t) {
782
+ function $e(e, t) {
765
783
  return function(n, s) {
766
- const o = t.themes.find((c) => c.name === n), i = o ?? {
784
+ const c = t.themes.find((o) => o.name === n), i = c ?? {
767
785
  type: "theme",
768
- id: A("th-"),
786
+ id: v("th-"),
769
787
  parentId: t.id,
770
788
  name: n,
771
789
  declarations: {},
772
790
  variables: [],
773
791
  children: []
774
792
  };
775
- o || (t._registry.set(i.id, i), t.themes.push(i));
776
- const f = v(i, t);
777
- return s && s(f), i;
793
+ c || (t._registry.set(i.id, i), t.themes.push(i));
794
+ const a = w(i, t);
795
+ return s && s(a), i;
778
796
  };
779
797
  }
780
- function $e(e, t) {
798
+ function xe(e, t) {
781
799
  return function(n) {
782
800
  const s = {
783
801
  type: "recipe",
784
802
  ...n
785
803
  };
786
- return s._runtime = xe(s, t), _e(s, t), t.recipes.push(s), s;
804
+ return s._runtime = Ee(s, t), Fe(s, t), t.recipes.push(s), s;
787
805
  };
788
806
  }
789
- function H(e, t) {
807
+ function W(e, t) {
790
808
  const r = e.autogenerate(t);
791
809
  return Object.keys(r)[0] ?? "default";
792
810
  }
@@ -794,42 +812,42 @@ function S(e, t) {
794
812
  const r = {};
795
813
  for (const [n, s] of Object.entries(e))
796
814
  if (Z(s)) {
797
- const o = {};
798
- for (const [i, f] of Object.entries(s)) {
799
- const c = C(t, i);
800
- if (!c)
815
+ const c = {};
816
+ for (const [i, a] of Object.entries(s)) {
817
+ const o = D(t, i);
818
+ if (!o)
801
819
  throw new Error(
802
820
  `[styleframe] Utility "${i}" not found in registry. Make sure the utility is registered before using it in a recipe.`
803
821
  );
804
- o[i] = H(
805
- c,
806
- f
822
+ c[i] = W(
823
+ o,
824
+ a
807
825
  );
808
826
  }
809
- r[J(n)] = o;
827
+ r[J(n)] = c;
810
828
  } else if (typeof s == "boolean")
811
829
  r[n] = s;
812
830
  else {
813
- const o = C(t, n);
814
- if (!o)
831
+ const c = D(t, n);
832
+ if (!c)
815
833
  throw new Error(
816
834
  `[styleframe] Utility "${n}" not found in registry. Make sure the utility is registered before using it in a recipe.`
817
835
  );
818
- r[n] = H(o, s);
836
+ r[n] = W(c, s);
819
837
  }
820
838
  return r;
821
839
  }
822
- function xe(e, t) {
840
+ function Ee(e, t) {
823
841
  const r = {};
824
842
  if (e.base && (r.base = S(e.base, t)), e.variants) {
825
843
  const n = {};
826
- for (const [s, o] of Object.entries(e.variants)) {
844
+ for (const [s, c] of Object.entries(e.variants)) {
827
845
  const i = {};
828
- for (const [f, c] of Object.entries(
829
- o
846
+ for (const [a, o] of Object.entries(
847
+ c
830
848
  ))
831
- c == null ? i[f] = null : i[f] = S(
832
- c,
849
+ o == null ? i[a] = null : i[a] = S(
850
+ o,
833
851
  t
834
852
  );
835
853
  n[s] = i;
@@ -843,146 +861,156 @@ function xe(e, t) {
843
861
  }))), r;
844
862
  }
845
863
  function Z(e) {
846
- return !b(e) && typeof e == "object" && e !== null;
864
+ return !g(e) && typeof e == "object" && e !== null;
847
865
  }
848
866
  function J(e) {
849
867
  return e.startsWith("&::") ? e.slice(3) : e.startsWith("&:") ? e.slice(2) : e;
850
868
  }
851
- function O(e, t) {
852
- const r = (n, s, o) => {
869
+ function T(e, t) {
870
+ const r = (n, s, c) => {
853
871
  let i = t.get(n);
854
- i || (i = [], t.set(n, i)), i.push({ value: s, modifiers: o });
872
+ i || (i = [], t.set(n, i)), i.push({ value: s, modifiers: c });
855
873
  };
856
874
  for (const [n, s] of Object.entries(e))
857
875
  if (Z(s)) {
858
- const o = J(n).split(":");
859
- for (const [i, f] of Object.entries(s))
860
- r(i, f, o);
876
+ const c = J(n).split(":");
877
+ for (const [i, a] of Object.entries(s))
878
+ r(i, a, c);
861
879
  } else
862
880
  r(n, s, []);
863
881
  }
864
- function C(e, t) {
882
+ function D(e, t) {
865
883
  const r = e.utilities.find((s) => s.name === t);
866
884
  if (r)
867
885
  return r;
868
886
  const n = t.replace(/[A-Z]/g, (s) => `-${s.toLowerCase()}`);
869
887
  return e.utilities.find((s) => s.name === n);
870
888
  }
871
- function _e(e, t) {
889
+ function Fe(e, t) {
872
890
  const r = /* @__PURE__ */ new Map();
873
- if (e.base && O(e.base, r), e.variants)
891
+ if (e.base && T(e.base, r), e.variants)
874
892
  for (const s of Object.values(e.variants))
875
- for (const o of Object.values(s))
876
- O(
877
- o,
893
+ for (const c of Object.values(s))
894
+ T(
895
+ c,
878
896
  r
879
897
  );
880
898
  if (e.compoundVariants)
881
899
  for (const s of e.compoundVariants)
882
- s.css && O(s.css, r);
900
+ s.css && T(s.css, r);
883
901
  const n = /* @__PURE__ */ new Map();
884
- for (const [s, o] of r) {
885
- const i = C(t, s);
902
+ for (const [s, c] of r) {
903
+ const i = D(t, s);
886
904
  if (!i)
887
905
  throw new Error(
888
906
  `[styleframe] Utility "${s}" not found in registry. Make sure the utility is registered before using it in a recipe.`
889
907
  );
890
- for (const f of o) {
891
- const c = [];
892
- for (const a of f.modifiers) {
893
- if (!n.has(a))
908
+ for (const a of c) {
909
+ const o = [];
910
+ for (const l of a.modifiers) {
911
+ if (!n.has(l))
894
912
  try {
895
- n.set(a, le(t, a));
913
+ n.set(l, ye(t, l));
896
914
  } catch {
897
915
  throw new Error(
898
- `[styleframe] Modifier "${a}" not found in registry. Make sure the modifier is registered before using it in a recipe.`
916
+ `[styleframe] Modifier "${l}" not found in registry. Make sure the modifier is registered before using it in a recipe.`
899
917
  );
900
918
  }
901
- const l = n.get(a);
902
- l && c.push(l);
919
+ const u = n.get(l);
920
+ u && o.push(u);
903
921
  }
922
+ const f = i.autogenerate(a.value);
923
+ for (const l of Object.keys(f))
924
+ t._usage.utilities.add(
925
+ ce({
926
+ name: i.name,
927
+ value: l,
928
+ modifiers: a.modifiers
929
+ })
930
+ );
904
931
  i.create(
905
- [f.value],
906
- c.length > 0 ? c.length > 1 ? [c] : c : void 0
932
+ [a.value],
933
+ o.length > 0 ? o.length > 1 ? [o] : o : void 0
907
934
  );
908
935
  }
909
936
  }
910
937
  }
911
- function We(e) {
912
- const t = A("sf-"), r = je(), n = { ...e }, s = ke(r, r), o = we(r, r), i = $e(r, r), f = Me(r, r), { variable: c, selector: a, atRule: l, keyframes: u, media: d, ref: y, css: p } = v(r, r);
938
+ function He(e) {
939
+ const t = v("sf-"), r = ke(), n = { ...e }, s = Me(r, r), c = Ve(r, r), i = xe(r, r), a = $e(r, r), { variable: o, selector: f, atRule: l, keyframes: u, media: d, ref: y, css: m } = w(r, r);
913
940
  return {
914
941
  id: t,
915
942
  root: r,
916
- variable: c,
917
- selector: a,
943
+ variable: o,
944
+ selector: f,
918
945
  utility: s,
919
- modifier: o,
946
+ modifier: c,
920
947
  recipe: i,
921
- theme: f,
948
+ theme: a,
922
949
  atRule: l,
923
950
  keyframes: u,
924
951
  media: d,
925
952
  ref: y,
926
- css: p,
953
+ css: m,
927
954
  options: n
928
955
  };
929
956
  }
930
957
  export {
931
- ve as applyModifiers,
932
- Ue as capitalizeFirst,
933
- De as classNameToCssSelector,
934
- K as createAtRuleFunction,
935
- fe as createCssFunction,
936
- v as createDeclarationsCallbackContext,
937
- ge as createKeyframesFunction,
938
- he as createMediaFunction,
939
- we as createModifierFunction,
940
- I as createPropertyValueResolver,
941
- $e as createRecipeFunction,
958
+ je as applyModifiers,
959
+ De as capitalizeFirst,
960
+ Ce as classNameToCssSelector,
961
+ I as createAtRuleFunction,
962
+ ue as createCssFunction,
963
+ w as createDeclarationsCallbackContext,
964
+ ve as createKeyframesFunction,
965
+ be as createMediaFunction,
966
+ Ve as createModifierFunction,
967
+ C as createPropertyValueResolver,
968
+ xe as createRecipeFunction,
942
969
  q as createRefFunction,
943
- je as createRoot,
944
- be as createSelectorFunction,
945
- Me as createThemeFunction,
946
- ke as createUtilityFunction,
947
- Ae as createVariableFunction,
948
- M as deepClone,
949
- Pe as defaultUtilitySelectorFn,
950
- oe as findVariableInScope,
951
- A as generateRandomId,
952
- xe as generateRecipeRuntime,
953
- le as getModifier,
954
- Ie as getUtility,
955
- Ce as getVariable,
970
+ ke as createRoot,
971
+ Ae as createSelectorFunction,
972
+ $e as createThemeFunction,
973
+ Me as createUtilityFunction,
974
+ we as createVariableFunction,
975
+ R as deepClone,
976
+ ce as defaultUtilitySelectorFn,
977
+ ae as findVariableInScope,
978
+ v as generateRandomId,
979
+ Ee as generateRecipeRuntime,
980
+ ye as getModifier,
981
+ Ke as getUtility,
982
+ Ie as getVariable,
956
983
  se as hashValue,
957
984
  te as isAtRule,
958
- T as isCSS,
959
- Te as isContainer,
960
- G as isContainerInput,
985
+ $ as isCSS,
986
+ Pe as isContainer,
987
+ L as isContainerInput,
961
988
  ie as isKeyReferenceValue,
962
989
  ne as isModifier,
963
990
  x as isObject,
964
991
  re as isPrimitiveTokenValue,
965
- Oe as isRecipe,
966
- b as isRef,
967
- $ as isRoot,
968
- Fe as isSelector,
969
- Be as isStyleframe,
970
- Se as isTheme,
971
- g as isToken,
972
- N as isTokenEqual,
992
+ Be as isRecipe,
993
+ g as isRef,
994
+ M as isRoot,
995
+ Oe as isSelector,
996
+ Ue as isStyleframe,
997
+ Te as isTheme,
998
+ b as isToken,
999
+ O as isTokenEqual,
973
1000
  B as isTokenValue,
974
- Ne as isUtility,
975
- L as isVariable,
976
- Ke as merge,
1001
+ Se as isUtility,
1002
+ H as isVariable,
1003
+ We as merge,
977
1004
  Y as mergeContainers,
978
- pe as mergeThemesArray,
979
- ye as mergeVariablesArray,
980
- P as parseAtReferences,
981
- _ as parseDeclarationsBlock,
982
- _e as processRecipeUtilities,
983
- me as rebuildRegistry,
984
- ae as rfdc,
985
- We as styleframe,
986
- z as transformUtilityKey,
987
- ce as validateReference
1005
+ he as mergeThemesArray,
1006
+ pe as mergeVariablesArray,
1007
+ z as parseAtReferences,
1008
+ E as parseDeclarationsBlock,
1009
+ Fe as processRecipeUtilities,
1010
+ ge as rebuildRegistry,
1011
+ le as rfdc,
1012
+ He as styleframe,
1013
+ oe as trackReferenceUsage,
1014
+ G as transformUtilityKey,
1015
+ fe as validateReference
988
1016
  };