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