@styleframe/transpiler 3.0.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 +15 -0
- package/dist/transpiler.d.ts +2 -2
- package/dist/transpiler.js +395 -376
- package/dist/transpiler.umd.cjs +17 -17
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
## 3.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
package/dist/transpiler.d.ts
CHANGED
|
@@ -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
|
|
29
|
+
export { defaultUtilitySelectorFn }
|
|
30
30
|
|
|
31
31
|
export declare const defaultVariableNameFn: VariableNameFn;
|
|
32
32
|
|
package/dist/transpiler.js
CHANGED
|
@@ -1,189 +1,52 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
value: t,
|
|
4
|
-
modifiers: r
|
|
5
|
-
}) => `._${[...r, e, ...t === "default" ? [] : [t]].filter(Boolean).join("\\:").replace(/[[\].#()%,]/g, "\\$&")}`, O = ({ name: e }) => e.replace(/^\.+|\.+$/g, "").replace(/\.+/g, "--");
|
|
6
|
-
function V(e, t) {
|
|
7
|
-
return `@${e}${t ? " " : ""}${t}`;
|
|
8
|
-
}
|
|
9
|
-
const K = /\d/, q = ["-", "_", "/", "."];
|
|
10
|
-
function z(e = "") {
|
|
11
|
-
if (!K.test(e))
|
|
12
|
-
return e !== e.toLowerCase();
|
|
13
|
-
}
|
|
14
|
-
function _(e, t) {
|
|
15
|
-
const r = q, o = [];
|
|
16
|
-
if (!e || typeof e != "string")
|
|
17
|
-
return o;
|
|
18
|
-
let n = "", s, u;
|
|
19
|
-
for (const a of e) {
|
|
20
|
-
const c = r.includes(a);
|
|
21
|
-
if (c === !0) {
|
|
22
|
-
o.push(n), n = "", s = void 0;
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
const i = z(a);
|
|
26
|
-
if (u === !1) {
|
|
27
|
-
if (s === !1 && i === !0) {
|
|
28
|
-
o.push(n), n = a, s = i;
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
if (s === !0 && i === !1 && n.length > 1) {
|
|
32
|
-
const f = n.at(-1);
|
|
33
|
-
o.push(n.slice(0, Math.max(0, n.length - 1))), n = f + a, s = i;
|
|
34
|
-
continue;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
n += a, s = i, u = c;
|
|
38
|
-
}
|
|
39
|
-
return o.push(n), o;
|
|
40
|
-
}
|
|
41
|
-
function H(e) {
|
|
42
|
-
return e ? e[0].toUpperCase() + e.slice(1) : "";
|
|
43
|
-
}
|
|
44
|
-
function Q(e) {
|
|
45
|
-
return e ? e[0].toLowerCase() + e.slice(1) : "";
|
|
46
|
-
}
|
|
47
|
-
function J(e, t) {
|
|
48
|
-
return e ? (Array.isArray(e) ? e : _(e)).map((r) => H(r)).join("") : "";
|
|
49
|
-
}
|
|
50
|
-
function Z(e, t) {
|
|
51
|
-
return Q(J(e || ""));
|
|
52
|
-
}
|
|
53
|
-
function W(e, t) {
|
|
54
|
-
return e ? (Array.isArray(e) ? e : _(e)).map((r) => r.toLowerCase()).join("-") : "";
|
|
55
|
-
}
|
|
56
|
-
function G(e) {
|
|
57
|
-
return ` ${e}`;
|
|
58
|
-
}
|
|
59
|
-
function Y(e) {
|
|
60
|
-
return e.split(`
|
|
61
|
-
`).map((t) => G(t)).join(`
|
|
62
|
-
`);
|
|
63
|
-
}
|
|
64
|
-
function x(e) {
|
|
65
|
-
return e === e.toUpperCase();
|
|
66
|
-
}
|
|
67
|
-
function T(e) {
|
|
68
|
-
return Z(e);
|
|
69
|
-
}
|
|
70
|
-
function X(e) {
|
|
71
|
-
return W(e);
|
|
72
|
-
}
|
|
73
|
-
function ee(e) {
|
|
74
|
-
return X(e);
|
|
75
|
-
}
|
|
76
|
-
function B(e, t) {
|
|
77
|
-
return `${e.startsWith("--") ? e : ee(e)}: ${t};`;
|
|
78
|
-
}
|
|
79
|
-
function te(e) {
|
|
80
|
-
return `{${e.length > 0 ? `
|
|
81
|
-
` : ""}${e.map((t) => `${Y(`${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 re(e, t) {
|
|
88
|
-
return B(E(e), t);
|
|
89
|
-
}
|
|
90
|
-
function ne(e, t) {
|
|
91
|
-
return `var(${E(e)}${t ? `, ${t}` : ""})`;
|
|
92
|
-
}
|
|
93
|
-
function w(e, t) {
|
|
94
|
-
return `${e} ${te(t)}`;
|
|
95
|
-
}
|
|
96
|
-
function oe(e) {
|
|
97
|
-
return function(r, o) {
|
|
98
|
-
return Object.entries(r).map(([n, s]) => B(n, e(s, o)));
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
function F(e) {
|
|
102
|
-
return function(r, o) {
|
|
103
|
-
const s = (o.variables?.name ?? O)({ name: r.name });
|
|
104
|
-
return re(s, e(r.value, o));
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
function S(e) {
|
|
108
|
-
const t = F(e), r = oe(e);
|
|
109
|
-
return function(n, s, u) {
|
|
110
|
-
const { variables: a, declarations: c, children: i } = s, f = n === ":root", l = (a ?? []).map(
|
|
111
|
-
(g) => t(g, u)
|
|
112
|
-
), m = r(
|
|
113
|
-
c ?? {},
|
|
114
|
-
u
|
|
115
|
-
), y = (i ?? []).map(
|
|
116
|
-
(g) => e(g, u)
|
|
117
|
-
), p = l.length > 0, b = m.length > 0, j = y.length > 0;
|
|
118
|
-
return f ? `${p || b ? w(n, [
|
|
119
|
-
...l,
|
|
120
|
-
...p && b ? [""] : [],
|
|
121
|
-
...m
|
|
122
|
-
]) : ""}${j && (p || b) ? `
|
|
123
|
-
|
|
124
|
-
` : ""}${y.join(`
|
|
125
|
-
|
|
126
|
-
`)}` : w(n, [
|
|
127
|
-
...l,
|
|
128
|
-
...p && (j || b) ? [""] : [],
|
|
129
|
-
...m,
|
|
130
|
-
...b && j ? [""] : [],
|
|
131
|
-
...y.flatMap(
|
|
132
|
-
(g, I) => I === y.length - 1 ? [g] : [g, ""]
|
|
133
|
-
)
|
|
134
|
-
]);
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function ce(e) {
|
|
138
|
-
const t = S(e);
|
|
139
|
-
return function(o, n) {
|
|
140
|
-
const s = P.includes(o.identifier), u = U.includes(
|
|
141
|
-
o.identifier
|
|
142
|
-
), a = Object.keys(o.declarations).length > 0, c = o.variables.length > 0, i = o.children.length > 0, f = V(o.identifier, o.rule);
|
|
143
|
-
return s || u && !(a || c || i) ? `${f};` : t(f, o, n);
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function ue(e) {
|
|
147
|
-
return function(r, o) {
|
|
148
|
-
return r.value.map((n) => e(n, o)).join("").trim();
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
function se(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
|
|
6
|
+
return M(e) && "type" in e && e.type === t;
|
|
156
7
|
}
|
|
157
|
-
function
|
|
8
|
+
function k(e) {
|
|
158
9
|
return h(e, "variable");
|
|
159
10
|
}
|
|
160
|
-
function
|
|
11
|
+
function V(e) {
|
|
161
12
|
return h(e, "reference");
|
|
162
13
|
}
|
|
163
|
-
function
|
|
14
|
+
function S(e) {
|
|
164
15
|
return h(e, "selector");
|
|
165
16
|
}
|
|
166
|
-
function
|
|
17
|
+
function K(e) {
|
|
167
18
|
return h(e, "at-rule");
|
|
168
19
|
}
|
|
169
|
-
function
|
|
20
|
+
function q(e) {
|
|
170
21
|
return h(e, "utility");
|
|
171
22
|
}
|
|
172
|
-
function
|
|
23
|
+
function z(e) {
|
|
173
24
|
return h(e, "css");
|
|
174
25
|
}
|
|
175
|
-
function
|
|
26
|
+
function H(e) {
|
|
176
27
|
return h(e, "theme");
|
|
177
28
|
}
|
|
178
29
|
function N(e) {
|
|
179
30
|
return h(e, "root");
|
|
180
31
|
}
|
|
181
|
-
function
|
|
32
|
+
function _(e) {
|
|
182
33
|
return h(e, "recipe");
|
|
183
34
|
}
|
|
184
|
-
|
|
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
|
}
|
|
47
|
+
function J(e) {
|
|
48
|
+
return `.${e.replace(/[[\].#()%,:/]/g, "\\$&")}`;
|
|
49
|
+
}
|
|
187
50
|
function A(e) {
|
|
188
51
|
if (e instanceof Buffer)
|
|
189
52
|
return Buffer.from(e);
|
|
@@ -194,121 +57,121 @@ function A(e) {
|
|
|
194
57
|
e.byteLength / e.BYTES_PER_ELEMENT || 1
|
|
195
58
|
);
|
|
196
59
|
}
|
|
197
|
-
function
|
|
60
|
+
function Z(e) {
|
|
198
61
|
if (e = e || {}, e.circular)
|
|
199
|
-
return
|
|
62
|
+
return W(e);
|
|
200
63
|
const t = /* @__PURE__ */ new Map();
|
|
201
|
-
if (t.set(Date, (
|
|
64
|
+
if (t.set(Date, (s) => new Date(s)), t.set(
|
|
202
65
|
Map,
|
|
203
|
-
(
|
|
66
|
+
(s, a) => new Map(n(Array.from(s), a))
|
|
204
67
|
), t.set(
|
|
205
68
|
Set,
|
|
206
|
-
(
|
|
69
|
+
(s, a) => new Set(n(Array.from(s), a))
|
|
207
70
|
), e.constructorHandlers)
|
|
208
|
-
for (const
|
|
209
|
-
t.set(
|
|
71
|
+
for (const s of e.constructorHandlers)
|
|
72
|
+
t.set(s[0], s[1]);
|
|
210
73
|
let r;
|
|
211
|
-
return e.proto ?
|
|
212
|
-
function
|
|
213
|
-
const
|
|
214
|
-
for (let f = 0; f <
|
|
215
|
-
const l =
|
|
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];
|
|
216
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
|
|
221
|
-
if (typeof
|
|
222
|
-
if (Array.isArray(
|
|
223
|
-
if (
|
|
224
|
-
return r(
|
|
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
|
|
227
|
-
if (Object.hasOwnProperty.call(
|
|
228
|
-
const i = u
|
|
229
|
-
typeof i != "object" || i === null ? a[
|
|
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
|
|
234
|
-
if (typeof
|
|
235
|
-
if (Array.isArray(
|
|
236
|
-
if (
|
|
237
|
-
return r(
|
|
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
|
|
240
|
-
const i = u
|
|
241
|
-
typeof i != "object" || i === null ? a[
|
|
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
|
|
247
|
-
const t = [], r = [],
|
|
248
|
-
if (
|
|
109
|
+
function W(e) {
|
|
110
|
+
const t = [], r = [], n = /* @__PURE__ */ new Map();
|
|
111
|
+
if (n.set(Date, (u) => new Date(u)), n.set(
|
|
249
112
|
Map,
|
|
250
|
-
(
|
|
251
|
-
),
|
|
113
|
+
(u, i) => new Map(c(Array.from(u), i))
|
|
114
|
+
), n.set(
|
|
252
115
|
Set,
|
|
253
|
-
(
|
|
116
|
+
(u, i) => new Set(c(Array.from(u), i))
|
|
254
117
|
), e.constructorHandlers)
|
|
255
|
-
for (const
|
|
256
|
-
|
|
257
|
-
let
|
|
258
|
-
return e.proto ? a :
|
|
259
|
-
function
|
|
260
|
-
const f = Object.keys(
|
|
118
|
+
for (const u of e.constructorHandlers)
|
|
119
|
+
n.set(u[0], u[1]);
|
|
120
|
+
let o;
|
|
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
|
|
125
|
+
const d = f[m], p = u[d];
|
|
263
126
|
if (typeof p != "object" || p === null)
|
|
264
|
-
l[
|
|
265
|
-
else if (p.constructor !== Object && (
|
|
266
|
-
l[
|
|
127
|
+
l[d] = p;
|
|
128
|
+
else if (p.constructor !== Object && (o = n.get(p.constructor)))
|
|
129
|
+
l[d] = o(p, i);
|
|
267
130
|
else if (ArrayBuffer.isView(p))
|
|
268
|
-
l[
|
|
131
|
+
l[d] = A(p);
|
|
269
132
|
else {
|
|
270
133
|
const b = t.indexOf(p);
|
|
271
|
-
b !== -1 ? l[
|
|
134
|
+
b !== -1 ? l[d] = r[b] : l[d] = i(p);
|
|
272
135
|
}
|
|
273
136
|
}
|
|
274
137
|
return l;
|
|
275
138
|
}
|
|
276
|
-
function u
|
|
277
|
-
if (typeof
|
|
278
|
-
if (Array.isArray(
|
|
279
|
-
if (
|
|
280
|
-
return
|
|
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(
|
|
283
|
-
for (const f in
|
|
284
|
-
if (Object.hasOwnProperty.call(
|
|
285
|
-
const l =
|
|
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
|
-
else if (l.constructor !== Object && (
|
|
289
|
-
i[f] =
|
|
151
|
+
else if (l.constructor !== Object && (o = n.get(l.constructor)))
|
|
152
|
+
i[f] = o(l, s);
|
|
290
153
|
else if (ArrayBuffer.isView(l))
|
|
291
154
|
i[f] = A(l);
|
|
292
155
|
else {
|
|
293
156
|
const m = t.indexOf(l);
|
|
294
|
-
m !== -1 ? i[f] = r[m] : i[f] =
|
|
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(
|
|
300
|
-
if (typeof
|
|
301
|
-
if (Array.isArray(
|
|
302
|
-
if (
|
|
303
|
-
return
|
|
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(
|
|
306
|
-
for (const f in
|
|
307
|
-
const l =
|
|
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
|
-
else if (l.constructor !== Object && (
|
|
311
|
-
i[f] =
|
|
173
|
+
else if (l.constructor !== Object && (o = n.get(l.constructor)))
|
|
174
|
+
i[f] = o(l, a);
|
|
312
175
|
else if (ArrayBuffer.isView(l))
|
|
313
176
|
i[f] = A(l);
|
|
314
177
|
else {
|
|
@@ -319,137 +182,292 @@ function de(e) {
|
|
|
319
182
|
return t.pop(), r.pop(), i;
|
|
320
183
|
}
|
|
321
184
|
}
|
|
322
|
-
|
|
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) {
|
|
287
|
+
return function(r, n) {
|
|
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
|
+
]);
|
|
325
|
+
};
|
|
326
|
+
}
|
|
323
327
|
function he(e) {
|
|
324
|
-
|
|
325
|
-
|
|
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);
|
|
326
334
|
};
|
|
327
335
|
}
|
|
328
336
|
function be(e) {
|
|
329
|
-
return function(r,
|
|
330
|
-
|
|
331
|
-
return ne(
|
|
332
|
-
s,
|
|
333
|
-
r.fallback ? e(r.fallback, o) : void 0
|
|
334
|
-
);
|
|
337
|
+
return function(r, n) {
|
|
338
|
+
return r.value.map((o) => e(o, n)).join("").trim();
|
|
335
339
|
};
|
|
336
340
|
}
|
|
337
341
|
function ge(e) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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,
|
|
351
|
+
r.fallback ? e(r.fallback, n) : void 0
|
|
352
|
+
);
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
function Se(e) {
|
|
356
|
+
const t = C(e);
|
|
357
|
+
return function(n, o) {
|
|
358
|
+
return n.themes.reduce(
|
|
359
|
+
(c, s) => (c.push(e(s, o)), c),
|
|
360
|
+
[t(":root", n, o)]
|
|
343
361
|
// Default theme (root)
|
|
344
362
|
).join(`
|
|
345
363
|
|
|
346
364
|
`);
|
|
347
365
|
};
|
|
348
366
|
}
|
|
349
|
-
function
|
|
350
|
-
const t =
|
|
351
|
-
return function(
|
|
352
|
-
return t(
|
|
367
|
+
function Ce(e) {
|
|
368
|
+
const t = C(e);
|
|
369
|
+
return function(n, o) {
|
|
370
|
+
return t(n.query, n, o);
|
|
353
371
|
};
|
|
354
372
|
}
|
|
355
|
-
function
|
|
356
|
-
const t =
|
|
357
|
-
return function(
|
|
358
|
-
const
|
|
359
|
-
return t(
|
|
373
|
+
function ve(e) {
|
|
374
|
+
const t = C(e);
|
|
375
|
+
return function(n, o) {
|
|
376
|
+
const s = (o.themes?.selector ?? Y)({ name: n.name });
|
|
377
|
+
return t(s, n, o);
|
|
360
378
|
};
|
|
361
379
|
}
|
|
362
|
-
function
|
|
363
|
-
const t =
|
|
364
|
-
return function(
|
|
365
|
-
const
|
|
366
|
-
name:
|
|
367
|
-
value:
|
|
368
|
-
modifiers:
|
|
369
|
-
});
|
|
370
|
-
return
|
|
380
|
+
function je(e) {
|
|
381
|
+
const t = C(e);
|
|
382
|
+
return function(n, o) {
|
|
383
|
+
const c = [], a = (o.utilities?.selector ?? Q)({
|
|
384
|
+
name: n.name,
|
|
385
|
+
value: n.value,
|
|
386
|
+
modifiers: n.modifiers
|
|
387
|
+
}), u = J(a);
|
|
388
|
+
return c.push(t(u, n, o)), c.join(`
|
|
371
389
|
|
|
372
390
|
`);
|
|
373
391
|
};
|
|
374
392
|
}
|
|
375
|
-
function
|
|
376
|
-
const r =
|
|
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
|
|
379
|
-
return o(e, t);
|
|
380
|
-
case fe(e):
|
|
396
|
+
case S(e):
|
|
381
397
|
return n(e, t);
|
|
382
|
-
case
|
|
383
|
-
return
|
|
398
|
+
case q(e):
|
|
399
|
+
return o(e, t);
|
|
400
|
+
case K(e):
|
|
401
|
+
return c(e, t);
|
|
384
402
|
case N(e):
|
|
385
403
|
return r(e, t);
|
|
386
|
-
case
|
|
387
|
-
return
|
|
388
|
-
case
|
|
404
|
+
case H(e):
|
|
405
|
+
return s(e, t);
|
|
406
|
+
case k(e):
|
|
389
407
|
return a(e, t);
|
|
390
|
-
case
|
|
391
|
-
return
|
|
392
|
-
case
|
|
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
|
|
399
|
-
return function(r,
|
|
400
|
-
let
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
return `const ${
|
|
404
|
-
|
|
416
|
+
function $e(e) {
|
|
417
|
+
return function(r, n) {
|
|
418
|
+
let o = r._exportName;
|
|
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 ${
|
|
427
|
+
export const ${o} = createRecipe("${r.name}", ${c});
|
|
410
428
|
`;
|
|
411
429
|
};
|
|
412
430
|
}
|
|
413
|
-
function
|
|
431
|
+
function Re(e) {
|
|
414
432
|
return e.filter(
|
|
415
|
-
(t) =>
|
|
433
|
+
(t) => S(t) && !!t._exportName
|
|
416
434
|
);
|
|
417
435
|
}
|
|
418
|
-
function
|
|
419
|
-
return function(r,
|
|
420
|
-
const
|
|
421
|
-
if (!
|
|
436
|
+
function Ne(e) {
|
|
437
|
+
return function(r, n) {
|
|
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
|
|
442
|
+
return c && (a.push(`import { createRecipe } from '@styleframe/runtime';
|
|
425
443
|
import type { RecipeRuntime } from '@styleframe/runtime';
|
|
426
|
-
`), a.push(e(r.recipes,
|
|
444
|
+
`), a.push(e(r.recipes, n))), s && a.push(e(o, n)), a.join(`
|
|
427
445
|
`);
|
|
428
446
|
};
|
|
429
447
|
}
|
|
430
|
-
function
|
|
431
|
-
return function(r,
|
|
448
|
+
function Oe(e) {
|
|
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
|
|
437
|
-
const r =
|
|
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((
|
|
458
|
+
return e.map((c) => $(c, t)).join(`
|
|
441
459
|
`);
|
|
442
460
|
case N(e):
|
|
443
461
|
return r(e, t);
|
|
444
|
-
case
|
|
445
|
-
return o(e, t);
|
|
446
|
-
case C(e):
|
|
462
|
+
case _(e):
|
|
447
463
|
return n(e, t);
|
|
464
|
+
case S(e):
|
|
465
|
+
return o(e, t);
|
|
448
466
|
default:
|
|
449
467
|
return "";
|
|
450
468
|
}
|
|
451
469
|
}
|
|
452
|
-
const
|
|
470
|
+
const _e = `-----BEGIN PUBLIC KEY-----
|
|
453
471
|
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs7zAFssgxOMPeo80iig4
|
|
454
472
|
qSSshgNOLnW1gd4tPUrsezndaUrAKlsAys6XD8kuF+bBEIR0uFNSgKlqINLjWM1n
|
|
455
473
|
BiTUzCctodyRaq6/tyFSoPLD35iblkwtfxKPM42lAJZsyTu9qoBr8MJyXmhDLuqA
|
|
@@ -457,9 +475,9 @@ dQ8di7mQHz+mCy96jQR4lFSDfHMgl27qaAh5VboTBRxgZliN8D5Fl590QkS94wAj
|
|
|
457
475
|
hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
|
|
458
476
|
4bWT2K9CpWbbhsKFTecCHuxlmPkFJNMuvAb/LdP08BSnpntlyAJcQeBrna2qBen+
|
|
459
477
|
GwIDAQAB
|
|
460
|
-
-----END PUBLIC KEY-----`, we = "__licenseRequired",
|
|
461
|
-
async function
|
|
462
|
-
const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), r = Uint8Array.from(atob(t), (
|
|
478
|
+
-----END PUBLIC KEY-----`, we = "__licenseRequired", xe = "__licenseValidated";
|
|
479
|
+
async function Te(e) {
|
|
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",
|
|
465
483
|
r,
|
|
@@ -471,18 +489,18 @@ async function _e(e) {
|
|
|
471
489
|
["verify"]
|
|
472
490
|
);
|
|
473
491
|
}
|
|
474
|
-
async function
|
|
492
|
+
async function Be({
|
|
475
493
|
payload: e,
|
|
476
494
|
signature: t
|
|
477
495
|
}) {
|
|
478
|
-
const r = new TextEncoder().encode(e),
|
|
496
|
+
const r = new TextEncoder().encode(e), n = Uint8Array.from(
|
|
479
497
|
atob(t),
|
|
480
|
-
(
|
|
481
|
-
),
|
|
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
|
-
n,
|
|
485
502
|
o,
|
|
503
|
+
n,
|
|
486
504
|
r
|
|
487
505
|
))
|
|
488
506
|
throw new Error(
|
|
@@ -490,13 +508,13 @@ async function xe({
|
|
|
490
508
|
);
|
|
491
509
|
return JSON.parse(e);
|
|
492
510
|
}
|
|
493
|
-
function
|
|
511
|
+
function Ee(e) {
|
|
494
512
|
return Object.prototype.hasOwnProperty.call(e, we);
|
|
495
513
|
}
|
|
496
|
-
async function
|
|
514
|
+
async function Fe(e) {
|
|
497
515
|
const t = Object.getOwnPropertyDescriptor(
|
|
498
516
|
e,
|
|
499
|
-
|
|
517
|
+
xe
|
|
500
518
|
);
|
|
501
519
|
if (!t?.value)
|
|
502
520
|
return {
|
|
@@ -514,7 +532,7 @@ async function Be(e) {
|
|
|
514
532
|
valid: !1
|
|
515
533
|
};
|
|
516
534
|
try {
|
|
517
|
-
return await
|
|
535
|
+
return await Be(
|
|
518
536
|
r
|
|
519
537
|
);
|
|
520
538
|
} catch {
|
|
@@ -526,37 +544,37 @@ async function Be(e) {
|
|
|
526
544
|
};
|
|
527
545
|
}
|
|
528
546
|
}
|
|
529
|
-
function
|
|
547
|
+
function De(e) {
|
|
530
548
|
const t = e?.variants;
|
|
531
549
|
if (!t || Object.keys(t).length === 0)
|
|
532
550
|
return "Record<string, never>";
|
|
533
551
|
const r = [];
|
|
534
|
-
for (const [
|
|
535
|
-
if (!
|
|
536
|
-
const
|
|
537
|
-
if (
|
|
538
|
-
const
|
|
539
|
-
r.push(`${
|
|
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}`);
|
|
540
558
|
}
|
|
541
559
|
}
|
|
542
560
|
return r.length === 0 ? "Record<string, never>" : `{ ${r.join("; ")} }`;
|
|
543
561
|
}
|
|
544
|
-
function
|
|
545
|
-
return function(r,
|
|
546
|
-
let
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
return ` export const ${
|
|
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;`;
|
|
550
568
|
};
|
|
551
569
|
}
|
|
552
|
-
function
|
|
570
|
+
function Pe(e) {
|
|
553
571
|
return e.filter(
|
|
554
|
-
(t) =>
|
|
572
|
+
(t) => S(t) && !!t._exportName
|
|
555
573
|
);
|
|
556
574
|
}
|
|
557
|
-
function
|
|
558
|
-
return function(r,
|
|
559
|
-
const
|
|
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 = [
|
|
560
578
|
"// Auto-generated by @styleframe/plugin - DO NOT EDIT",
|
|
561
579
|
"",
|
|
562
580
|
'declare module "virtual:styleframe" {',
|
|
@@ -565,45 +583,46 @@ function Le(e) {
|
|
|
565
583
|
" /** Returns the global styleframe instance from styleframe.config.ts */",
|
|
566
584
|
" export function styleframe(): Styleframe;"
|
|
567
585
|
];
|
|
568
|
-
if (
|
|
586
|
+
if (c) {
|
|
569
587
|
a.push("");
|
|
570
|
-
const
|
|
571
|
-
a.push(...
|
|
588
|
+
const u = r.recipes.map((i) => e(i, n)).filter(Boolean);
|
|
589
|
+
a.push(...u);
|
|
572
590
|
}
|
|
573
|
-
if (
|
|
591
|
+
if (s) {
|
|
574
592
|
a.push("");
|
|
575
|
-
const
|
|
576
|
-
a.push(...
|
|
593
|
+
const u = o.map((i) => e(i, n)).filter(Boolean);
|
|
594
|
+
a.push(...u);
|
|
577
595
|
}
|
|
578
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(`
|
|
579
597
|
`);
|
|
580
598
|
};
|
|
581
599
|
}
|
|
582
|
-
function
|
|
583
|
-
return function(r,
|
|
600
|
+
function Ue(e) {
|
|
601
|
+
return function(r, n) {
|
|
584
602
|
return r._exportName ? ` export const ${r._exportName}: string;` : "";
|
|
585
603
|
};
|
|
586
604
|
}
|
|
587
|
-
function
|
|
588
|
-
const r =
|
|
605
|
+
function R(e, t) {
|
|
606
|
+
const r = Ie(R), n = Le(), o = Ue();
|
|
589
607
|
switch (!0) {
|
|
590
608
|
case Array.isArray(e):
|
|
591
|
-
return e.map((
|
|
609
|
+
return e.map((c) => R(c, t)).join(`
|
|
592
610
|
`);
|
|
593
611
|
case N(e):
|
|
594
612
|
return r(e, t);
|
|
595
|
-
case
|
|
596
|
-
return o(e, t);
|
|
597
|
-
case C(e):
|
|
613
|
+
case _(e):
|
|
598
614
|
return n(e, t);
|
|
615
|
+
case S(e):
|
|
616
|
+
return o(e, t);
|
|
599
617
|
default:
|
|
600
618
|
return "";
|
|
601
619
|
}
|
|
602
620
|
}
|
|
603
|
-
function
|
|
621
|
+
function Me(e) {
|
|
604
622
|
const t = Math.floor(Math.random() * 100);
|
|
605
623
|
e.root.children.push({
|
|
606
624
|
type: "selector",
|
|
625
|
+
id: G("sel-"),
|
|
607
626
|
query: `html:nth-of-type(${t}n+1)::after`,
|
|
608
627
|
variables: [],
|
|
609
628
|
children: [],
|
|
@@ -624,58 +643,58 @@ function Pe(e) {
|
|
|
624
643
|
}
|
|
625
644
|
});
|
|
626
645
|
}
|
|
627
|
-
function
|
|
646
|
+
function j(e, t = "") {
|
|
628
647
|
return {
|
|
629
648
|
name: e,
|
|
630
649
|
content: t
|
|
631
650
|
};
|
|
632
651
|
}
|
|
633
|
-
async function
|
|
652
|
+
async function Ve(e, {
|
|
634
653
|
type: t = "all",
|
|
635
|
-
consumers: r = { css:
|
|
654
|
+
consumers: r = { css: y, ts: $, dts: R }
|
|
636
655
|
} = {}) {
|
|
637
|
-
const
|
|
638
|
-
if (
|
|
639
|
-
const
|
|
640
|
-
(!
|
|
656
|
+
const n = { files: [] }, o = e.options;
|
|
657
|
+
if (Ee(e)) {
|
|
658
|
+
const c = await Fe(e);
|
|
659
|
+
(!c.valid || c.instanceId !== e.id) && Me(e);
|
|
641
660
|
}
|
|
642
661
|
if (t === "all" || t === "css") {
|
|
643
|
-
const
|
|
662
|
+
const c = j(
|
|
644
663
|
"index.css",
|
|
645
|
-
r.css(e.root,
|
|
664
|
+
r.css(e.root, o)
|
|
646
665
|
);
|
|
647
|
-
|
|
666
|
+
n.files.push(c);
|
|
648
667
|
}
|
|
649
668
|
if (t === "all" || t === "ts") {
|
|
650
|
-
const
|
|
669
|
+
const c = j(
|
|
651
670
|
"index.ts",
|
|
652
|
-
r.ts(e.root,
|
|
671
|
+
r.ts(e.root, o)
|
|
653
672
|
);
|
|
654
|
-
|
|
673
|
+
n.files.push(c);
|
|
655
674
|
}
|
|
656
675
|
if (t === "dts") {
|
|
657
|
-
const
|
|
676
|
+
const c = j(
|
|
658
677
|
"index.d.ts",
|
|
659
|
-
r.dts(e.root,
|
|
678
|
+
r.dts(e.root, o)
|
|
660
679
|
);
|
|
661
|
-
|
|
680
|
+
n.files.push(c);
|
|
662
681
|
}
|
|
663
|
-
return
|
|
682
|
+
return n;
|
|
664
683
|
}
|
|
665
684
|
export {
|
|
666
|
-
|
|
667
|
-
|
|
685
|
+
ke as DEFAULT_INDENT,
|
|
686
|
+
I as STATEMENT_AT_RULES,
|
|
668
687
|
U as STATEMENT_OR_BLOCK_AT_RULES,
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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
|
|
681
700
|
};
|
package/dist/transpiler.umd.cjs
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(p,
|
|
2
|
-
`).map(t=>
|
|
3
|
-
`)}function
|
|
4
|
-
`:""}${e.map(t=>`${
|
|
5
|
-
`).join("")}}`}function
|
|
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
|
-
`)}`:
|
|
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
|
|
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 r=
|
|
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 ${
|
|
16
|
-
`}}function
|
|
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
|
-
`),a.push(e(r.recipes,
|
|
19
|
-
`)}}function
|
|
20
|
-
`:""}}function R(e,t){const r=
|
|
21
|
-
`);case
|
|
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,6 +26,6 @@ dQ8di7mQHz+mCy96jQR4lFSDfHMgl27qaAh5VboTBRxgZliN8D5Fl590QkS94wAj
|
|
|
26
26
|
hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
|
|
27
27
|
4bWT2K9CpWbbhsKFTecCHuxlmPkFJNMuvAb/LdP08BSnpntlyAJcQeBrna2qBen+
|
|
28
28
|
GwIDAQAB
|
|
29
|
-
-----END PUBLIC KEY-----`,
|
|
30
|
-
`)}}function
|
|
31
|
-
`);case
|
|
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": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/transpiler.d.ts",
|
|
6
6
|
"module": "./dist/transpiler.js",
|
|
@@ -22,13 +22,13 @@
|
|
|
22
22
|
"scule": "^1.3.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@styleframe/core": "^3.
|
|
25
|
+
"@styleframe/core": "^3.1.0",
|
|
26
26
|
"@styleframe/license": "^2.0.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@styleframe/config-typescript": "^3.0.0",
|
|
30
30
|
"@styleframe/config-vite": "^3.0.0",
|
|
31
|
-
"@styleframe/core": "^3.
|
|
31
|
+
"@styleframe/core": "^3.1.0",
|
|
32
32
|
"@styleframe/license": "^2.0.2",
|
|
33
33
|
"@vitest/coverage-v8": "^3.2.4",
|
|
34
34
|
"typescript": "^5.8.3",
|