@styleframe/cli 2.0.1 → 2.0.3
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 +11 -0
- package/dist/{build-DXu94ro9.js → build-D2raUd8_.js} +137 -137
- package/dist/{index-0jlofXE2.js → index-hNSlMmId.js} +2 -2
- package/dist/index.cjs +135 -135
- package/dist/index.js +3 -3
- package/dist/{init-8BBfDuR2.js → init-CdbN2rGk.js} +3 -3
- package/dist/{json5-hbqDzlWE.js → json5-BBa2N_QR.js} +1 -1
- package/dist/jsonc-DlUWLSWt.js +4 -0
- package/dist/{multipart-parser-FLfAVvRn.js → multipart-parser-C7t4XZXl.js} +1 -1
- package/dist/{toml-BMNopPQi.js → toml-DstbNVEm.js} +1 -1
- package/dist/{yaml-5x2bPSRD.js → yaml-7uQ9Qi-A.js} +1 -1
- package/package.json +5 -5
- package/dist/jsonc-DGYhwGmL.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @styleframe/cli
|
|
2
2
|
|
|
3
|
+
## 2.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`1ead424`](https://github.com/styleframe-dev/styleframe/commit/1ead424825a6696969294d3127ac79298da03182) Thanks [@alexgrozav](https://github.com/alexgrozav)! - feat: update license package version
|
|
8
|
+
|
|
9
|
+
- [`a08c996`](https://github.com/styleframe-dev/styleframe/commit/a08c996b3b781ead2000b087b3b16906821ba5e3) Thanks [@alexgrozav](https://github.com/alexgrozav)! - fix: update package dependencies
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`1ead424`](https://github.com/styleframe-dev/styleframe/commit/1ead424825a6696969294d3127ac79298da03182), [`a08c996`](https://github.com/styleframe-dev/styleframe/commit/a08c996b3b781ead2000b087b3b16906821ba5e3)]:
|
|
12
|
+
- @styleframe/loader@2.0.2
|
|
13
|
+
|
|
3
14
|
## 2.0.1
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -5916,11 +5916,11 @@ function getDotEnvVars(targetEnvironment) {
|
|
|
5916
5916
|
}
|
|
5917
5917
|
const _normalize = (p2) => p2?.replace(/\\/g, "/");
|
|
5918
5918
|
const ASYNC_LOADERS = {
|
|
5919
|
-
".yaml": () => import("./yaml-
|
|
5920
|
-
".yml": () => import("./yaml-
|
|
5921
|
-
".jsonc": () => import("./jsonc-
|
|
5922
|
-
".json5": () => import("./json5-
|
|
5923
|
-
".toml": () => import("./toml-
|
|
5919
|
+
".yaml": () => import("./yaml-7uQ9Qi-A.js").then((r2) => r2.parseYAML),
|
|
5920
|
+
".yml": () => import("./yaml-7uQ9Qi-A.js").then((r2) => r2.parseYAML),
|
|
5921
|
+
".jsonc": () => import("./jsonc-DlUWLSWt.js").then((r2) => r2.parseJSONC),
|
|
5922
|
+
".json5": () => import("./json5-BBa2N_QR.js").then((r2) => r2.parseJSON5),
|
|
5923
|
+
".toml": () => import("./toml-DstbNVEm.js").then((r2) => r2.parseTOML)
|
|
5924
5924
|
};
|
|
5925
5925
|
const SUPPORTED_EXTENSIONS = Object.freeze([
|
|
5926
5926
|
// with jiti
|
|
@@ -6134,7 +6134,7 @@ async function resolveConfig(source, options, sourceOptions = {}) {
|
|
|
6134
6134
|
).map((key) => `${key}:`);
|
|
6135
6135
|
const gigetPrefixes = customProviderKeys.length > 0 ? [.../* @__PURE__ */ new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
|
|
6136
6136
|
if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
|
|
6137
|
-
const { downloadTemplate } = await import("./index-
|
|
6137
|
+
const { downloadTemplate } = await import("./index-hNSlMmId.js").then((n) => n.i);
|
|
6138
6138
|
const { digest } = await import("./index-B2xSBfiT.js");
|
|
6139
6139
|
const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
|
|
6140
6140
|
let cloneDir;
|
|
@@ -6228,8 +6228,8 @@ function tryResolve(id, options) {
|
|
|
6228
6228
|
const N = ["charset", "import", "namespace"], R$1 = ["layer"], D$1 = ({ name: e }) => `[data-theme="${e}"]`, I = ({
|
|
6229
6229
|
name: e,
|
|
6230
6230
|
value: t,
|
|
6231
|
-
modifiers:
|
|
6232
|
-
}) => `._${[...
|
|
6231
|
+
modifiers: n
|
|
6232
|
+
}) => `._${[...n, e, t].filter(Boolean).join("\\:")}`, w = ({ name: e }) => e;
|
|
6233
6233
|
function L(e, t) {
|
|
6234
6234
|
return `@${e}${t ? " " : ""}${t}`;
|
|
6235
6235
|
}
|
|
@@ -6239,34 +6239,34 @@ function $$1(e = "") {
|
|
|
6239
6239
|
return e !== e.toLowerCase();
|
|
6240
6240
|
}
|
|
6241
6241
|
function U$1(e, t) {
|
|
6242
|
-
const
|
|
6242
|
+
const n = M$1, r2 = [];
|
|
6243
6243
|
if (!e || typeof e != "string")
|
|
6244
|
-
return
|
|
6245
|
-
let
|
|
6244
|
+
return r2;
|
|
6245
|
+
let c2 = "", a2, i;
|
|
6246
6246
|
for (const s2 of e) {
|
|
6247
|
-
const o2 =
|
|
6247
|
+
const o2 = n.includes(s2);
|
|
6248
6248
|
if (o2 === true) {
|
|
6249
|
-
|
|
6249
|
+
r2.push(c2), c2 = "", a2 = void 0;
|
|
6250
6250
|
continue;
|
|
6251
6251
|
}
|
|
6252
|
-
const
|
|
6252
|
+
const u = $$1(s2);
|
|
6253
6253
|
if (i === false) {
|
|
6254
|
-
if (a2 === false &&
|
|
6255
|
-
|
|
6254
|
+
if (a2 === false && u === true) {
|
|
6255
|
+
r2.push(c2), c2 = s2, a2 = u;
|
|
6256
6256
|
continue;
|
|
6257
6257
|
}
|
|
6258
|
-
if (a2 === true &&
|
|
6259
|
-
const f2 =
|
|
6260
|
-
|
|
6258
|
+
if (a2 === true && u === false && c2.length > 1) {
|
|
6259
|
+
const f2 = c2.at(-1);
|
|
6260
|
+
r2.push(c2.slice(0, Math.max(0, c2.length - 1))), c2 = f2 + s2, a2 = u;
|
|
6261
6261
|
continue;
|
|
6262
6262
|
}
|
|
6263
6263
|
}
|
|
6264
|
-
|
|
6264
|
+
c2 += s2, a2 = u, i = o2;
|
|
6265
6265
|
}
|
|
6266
|
-
return
|
|
6266
|
+
return r2.push(c2), r2;
|
|
6267
6267
|
}
|
|
6268
6268
|
function _$1(e, t) {
|
|
6269
|
-
return e ? (Array.isArray(e) ? e : U$1(e)).map((
|
|
6269
|
+
return e ? (Array.isArray(e) ? e : U$1(e)).map((n) => n.toLowerCase()).join("-") : "";
|
|
6270
6270
|
}
|
|
6271
6271
|
function k$1(e) {
|
|
6272
6272
|
return ` ${e}`;
|
|
@@ -6303,28 +6303,28 @@ function C$1(e, t) {
|
|
|
6303
6303
|
return `${e} ${q$1(t)}`;
|
|
6304
6304
|
}
|
|
6305
6305
|
function Q$1(e) {
|
|
6306
|
-
return function(
|
|
6307
|
-
return Object.entries(
|
|
6306
|
+
return function(n, r2) {
|
|
6307
|
+
return Object.entries(n).map(([c2, a2]) => B$1(c2, e(a2, r2)));
|
|
6308
6308
|
};
|
|
6309
6309
|
}
|
|
6310
6310
|
function E$1(e) {
|
|
6311
|
-
return function(
|
|
6312
|
-
const a2 = (
|
|
6313
|
-
return z$1(a2, e(
|
|
6311
|
+
return function(n, r2) {
|
|
6312
|
+
const a2 = (r2.variables?.name ?? w)({ name: n.name });
|
|
6313
|
+
return z$1(a2, e(n.value, r2));
|
|
6314
6314
|
};
|
|
6315
6315
|
}
|
|
6316
6316
|
function S$1(e) {
|
|
6317
|
-
const t = E$1(e),
|
|
6318
|
-
return function(
|
|
6319
|
-
const { variables: s2, declarations: o2, children:
|
|
6317
|
+
const t = E$1(e), n = Q$1(e);
|
|
6318
|
+
return function(c2, a2, i) {
|
|
6319
|
+
const { variables: s2, declarations: o2, children: u } = a2, f2 = c2 === ":root", l = (s2 ?? []).map(
|
|
6320
6320
|
(A2) => t(A2, i)
|
|
6321
|
-
), m2 =
|
|
6321
|
+
), m2 = n(
|
|
6322
6322
|
o2 ?? {},
|
|
6323
6323
|
i
|
|
6324
|
-
), y2 = (
|
|
6324
|
+
), y2 = (u ?? []).map(
|
|
6325
6325
|
(A2) => e(A2, i)
|
|
6326
6326
|
), d = l.length > 0, h2 = m2.length > 0, v2 = y2.length > 0;
|
|
6327
|
-
return f2 ? `${d || h2 ? C$1(
|
|
6327
|
+
return f2 ? `${d || h2 ? C$1(c2, [
|
|
6328
6328
|
...l,
|
|
6329
6329
|
...d && h2 ? [""] : [],
|
|
6330
6330
|
...m2
|
|
@@ -6332,7 +6332,7 @@ function S$1(e) {
|
|
|
6332
6332
|
|
|
6333
6333
|
` : ""}${y2.join(`
|
|
6334
6334
|
|
|
6335
|
-
`)}` : C$1(
|
|
6335
|
+
`)}` : C$1(c2, [
|
|
6336
6336
|
...l,
|
|
6337
6337
|
...d && (v2 || h2) ? [""] : [],
|
|
6338
6338
|
...m2,
|
|
@@ -6345,11 +6345,11 @@ function S$1(e) {
|
|
|
6345
6345
|
}
|
|
6346
6346
|
function Z(e) {
|
|
6347
6347
|
const t = S$1(e);
|
|
6348
|
-
return function(
|
|
6349
|
-
const a2 = N.includes(
|
|
6350
|
-
|
|
6351
|
-
), s2 = Object.keys(
|
|
6352
|
-
return a2 || i && !(s2 || o2 ||
|
|
6348
|
+
return function(r2, c2) {
|
|
6349
|
+
const a2 = N.includes(r2.identifier), i = R$1.includes(
|
|
6350
|
+
r2.identifier
|
|
6351
|
+
), s2 = Object.keys(r2.declarations).length > 0, o2 = r2.variables.length > 0, u = r2.children.length > 0, f2 = L(r2.identifier, r2.rule);
|
|
6352
|
+
return a2 || i && !(s2 || o2 || u) ? `${f2};` : t(f2, r2, c2);
|
|
6353
6353
|
};
|
|
6354
6354
|
}
|
|
6355
6355
|
function W$1(e) {
|
|
@@ -6394,79 +6394,79 @@ function g$1(e) {
|
|
|
6394
6394
|
}
|
|
6395
6395
|
function oe(e) {
|
|
6396
6396
|
if (e = e || {}, e.circular)
|
|
6397
|
-
return
|
|
6397
|
+
return ue$1(e);
|
|
6398
6398
|
const t = /* @__PURE__ */ new Map();
|
|
6399
6399
|
if (t.set(Date, (i) => new Date(i)), t.set(
|
|
6400
6400
|
Map,
|
|
6401
|
-
(i, s2) => new Map(
|
|
6401
|
+
(i, s2) => new Map(r2(Array.from(i), s2))
|
|
6402
6402
|
), t.set(
|
|
6403
6403
|
Set,
|
|
6404
|
-
(i, s2) => new Set(
|
|
6404
|
+
(i, s2) => new Set(r2(Array.from(i), s2))
|
|
6405
6405
|
), e.constructorHandlers)
|
|
6406
6406
|
for (const i of e.constructorHandlers)
|
|
6407
6407
|
t.set(i[0], i[1]);
|
|
6408
|
-
let
|
|
6409
|
-
return e.proto ? a2 :
|
|
6410
|
-
function
|
|
6411
|
-
const o2 = Object.keys(i),
|
|
6408
|
+
let n;
|
|
6409
|
+
return e.proto ? a2 : c2;
|
|
6410
|
+
function r2(i, s2) {
|
|
6411
|
+
const o2 = Object.keys(i), u = Array.from({ length: o2.length });
|
|
6412
6412
|
for (let f2 = 0; f2 < o2.length; f2++) {
|
|
6413
6413
|
const l = o2[f2], m2 = i[l];
|
|
6414
|
-
typeof m2 != "object" || m2 === null ?
|
|
6414
|
+
typeof m2 != "object" || m2 === null ? u[l] = m2 : m2.constructor !== Object && (n = t.get(m2.constructor)) ? u[l] = n(m2, s2) : ArrayBuffer.isView(m2) ? u[l] = g$1(m2) : u[l] = s2(m2);
|
|
6415
6415
|
}
|
|
6416
|
-
return
|
|
6416
|
+
return u;
|
|
6417
6417
|
}
|
|
6418
|
-
function
|
|
6418
|
+
function c2(i) {
|
|
6419
6419
|
if (typeof i != "object" || i === null) return i;
|
|
6420
|
-
if (Array.isArray(i)) return
|
|
6421
|
-
if (i.constructor !== Object && (
|
|
6422
|
-
return
|
|
6420
|
+
if (Array.isArray(i)) return r2(i, c2);
|
|
6421
|
+
if (i.constructor !== Object && (n = t.get(i.constructor)))
|
|
6422
|
+
return n(i, c2);
|
|
6423
6423
|
const s2 = {};
|
|
6424
6424
|
for (const o2 in i) {
|
|
6425
6425
|
if (Object.hasOwnProperty.call(i, o2) === false) continue;
|
|
6426
|
-
const
|
|
6427
|
-
typeof
|
|
6426
|
+
const u = i[o2];
|
|
6427
|
+
typeof u != "object" || u === null ? s2[o2] = u : u.constructor !== Object && (n = t.get(u.constructor)) ? s2[o2] = n(u, c2) : ArrayBuffer.isView(u) ? s2[o2] = g$1(u) : s2[o2] = c2(u);
|
|
6428
6428
|
}
|
|
6429
6429
|
return s2;
|
|
6430
6430
|
}
|
|
6431
6431
|
function a2(i) {
|
|
6432
6432
|
if (typeof i != "object" || i === null) return i;
|
|
6433
|
-
if (Array.isArray(i)) return
|
|
6434
|
-
if (i.constructor !== Object && (
|
|
6435
|
-
return
|
|
6433
|
+
if (Array.isArray(i)) return r2(i, a2);
|
|
6434
|
+
if (i.constructor !== Object && (n = t.get(i.constructor)))
|
|
6435
|
+
return n(i, a2);
|
|
6436
6436
|
const s2 = {};
|
|
6437
6437
|
for (const o2 in i) {
|
|
6438
|
-
const
|
|
6439
|
-
typeof
|
|
6438
|
+
const u = i[o2];
|
|
6439
|
+
typeof u != "object" || u === null ? s2[o2] = u : u.constructor !== Object && (n = t.get(u.constructor)) ? s2[o2] = n(u, a2) : ArrayBuffer.isView(u) ? s2[o2] = g$1(u) : s2[o2] = a2(u);
|
|
6440
6440
|
}
|
|
6441
6441
|
return s2;
|
|
6442
6442
|
}
|
|
6443
6443
|
}
|
|
6444
|
-
function
|
|
6445
|
-
const t = [],
|
|
6446
|
-
if (
|
|
6444
|
+
function ue$1(e) {
|
|
6445
|
+
const t = [], n = [], r2 = /* @__PURE__ */ new Map();
|
|
6446
|
+
if (r2.set(Date, (o2) => new Date(o2)), r2.set(
|
|
6447
6447
|
Map,
|
|
6448
|
-
(o2,
|
|
6449
|
-
),
|
|
6448
|
+
(o2, u) => new Map(a2(Array.from(o2), u))
|
|
6449
|
+
), r2.set(
|
|
6450
6450
|
Set,
|
|
6451
|
-
(o2,
|
|
6451
|
+
(o2, u) => new Set(a2(Array.from(o2), u))
|
|
6452
6452
|
), e.constructorHandlers)
|
|
6453
6453
|
for (const o2 of e.constructorHandlers)
|
|
6454
|
-
|
|
6455
|
-
let
|
|
6454
|
+
r2.set(o2[0], o2[1]);
|
|
6455
|
+
let c2;
|
|
6456
6456
|
return e.proto ? s2 : i;
|
|
6457
|
-
function a2(o2,
|
|
6457
|
+
function a2(o2, u) {
|
|
6458
6458
|
const f2 = Object.keys(o2), l = Array.from({ length: f2.length });
|
|
6459
6459
|
for (let m2 = 0; m2 < f2.length; m2++) {
|
|
6460
6460
|
const y2 = f2[m2], d = o2[y2];
|
|
6461
6461
|
if (typeof d != "object" || d === null)
|
|
6462
6462
|
l[y2] = d;
|
|
6463
|
-
else if (d.constructor !== Object && (
|
|
6464
|
-
l[y2] =
|
|
6463
|
+
else if (d.constructor !== Object && (c2 = r2.get(d.constructor)))
|
|
6464
|
+
l[y2] = c2(d, u);
|
|
6465
6465
|
else if (ArrayBuffer.isView(d))
|
|
6466
6466
|
l[y2] = g$1(d);
|
|
6467
6467
|
else {
|
|
6468
6468
|
const h2 = t.indexOf(d);
|
|
6469
|
-
h2 !== -1 ? l[y2] =
|
|
6469
|
+
h2 !== -1 ? l[y2] = n[h2] : l[y2] = u(d);
|
|
6470
6470
|
}
|
|
6471
6471
|
}
|
|
6472
6472
|
return l;
|
|
@@ -6474,75 +6474,75 @@ function ce(e) {
|
|
|
6474
6474
|
function i(o2) {
|
|
6475
6475
|
if (typeof o2 != "object" || o2 === null) return o2;
|
|
6476
6476
|
if (Array.isArray(o2)) return a2(o2, i);
|
|
6477
|
-
if (o2.constructor !== Object && (
|
|
6478
|
-
return
|
|
6479
|
-
const
|
|
6480
|
-
t.push(o2),
|
|
6477
|
+
if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
|
|
6478
|
+
return c2(o2, i);
|
|
6479
|
+
const u = {};
|
|
6480
|
+
t.push(o2), n.push(u);
|
|
6481
6481
|
for (const f2 in o2) {
|
|
6482
6482
|
if (Object.hasOwnProperty.call(o2, f2) === false) continue;
|
|
6483
6483
|
const l = o2[f2];
|
|
6484
6484
|
if (typeof l != "object" || l === null)
|
|
6485
|
-
|
|
6486
|
-
else if (l.constructor !== Object && (
|
|
6487
|
-
|
|
6485
|
+
u[f2] = l;
|
|
6486
|
+
else if (l.constructor !== Object && (c2 = r2.get(l.constructor)))
|
|
6487
|
+
u[f2] = c2(l, i);
|
|
6488
6488
|
else if (ArrayBuffer.isView(l))
|
|
6489
|
-
|
|
6489
|
+
u[f2] = g$1(l);
|
|
6490
6490
|
else {
|
|
6491
6491
|
const m2 = t.indexOf(l);
|
|
6492
|
-
m2 !== -1 ?
|
|
6492
|
+
m2 !== -1 ? u[f2] = n[m2] : u[f2] = i(l);
|
|
6493
6493
|
}
|
|
6494
6494
|
}
|
|
6495
|
-
return t.pop(),
|
|
6495
|
+
return t.pop(), n.pop(), u;
|
|
6496
6496
|
}
|
|
6497
6497
|
function s2(o2) {
|
|
6498
6498
|
if (typeof o2 != "object" || o2 === null) return o2;
|
|
6499
6499
|
if (Array.isArray(o2)) return a2(o2, s2);
|
|
6500
|
-
if (o2.constructor !== Object && (
|
|
6501
|
-
return
|
|
6502
|
-
const
|
|
6503
|
-
t.push(o2),
|
|
6500
|
+
if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
|
|
6501
|
+
return c2(o2, s2);
|
|
6502
|
+
const u = {};
|
|
6503
|
+
t.push(o2), n.push(u);
|
|
6504
6504
|
for (const f2 in o2) {
|
|
6505
6505
|
const l = o2[f2];
|
|
6506
6506
|
if (typeof l != "object" || l === null)
|
|
6507
|
-
|
|
6508
|
-
else if (l.constructor !== Object && (
|
|
6509
|
-
|
|
6507
|
+
u[f2] = l;
|
|
6508
|
+
else if (l.constructor !== Object && (c2 = r2.get(l.constructor)))
|
|
6509
|
+
u[f2] = c2(l, s2);
|
|
6510
6510
|
else if (ArrayBuffer.isView(l))
|
|
6511
|
-
|
|
6511
|
+
u[f2] = g$1(l);
|
|
6512
6512
|
else {
|
|
6513
6513
|
const m2 = t.indexOf(l);
|
|
6514
|
-
m2 !== -1 ?
|
|
6514
|
+
m2 !== -1 ? u[f2] = n[m2] : u[f2] = s2(l);
|
|
6515
6515
|
}
|
|
6516
6516
|
}
|
|
6517
|
-
return t.pop(),
|
|
6517
|
+
return t.pop(), n.pop(), u;
|
|
6518
6518
|
}
|
|
6519
6519
|
}
|
|
6520
6520
|
oe();
|
|
6521
|
-
function
|
|
6522
|
-
return function(
|
|
6523
|
-
return
|
|
6521
|
+
function ce(e) {
|
|
6522
|
+
return function(n, r2) {
|
|
6523
|
+
return n.value.map((c2) => e(c2, r2)).join("").trim();
|
|
6524
6524
|
};
|
|
6525
6525
|
}
|
|
6526
6526
|
function ie(e) {
|
|
6527
|
-
return function(
|
|
6528
|
-
return
|
|
6527
|
+
return function(n, r2) {
|
|
6528
|
+
return n != null ? `${n}` : "";
|
|
6529
6529
|
};
|
|
6530
6530
|
}
|
|
6531
6531
|
function se(e) {
|
|
6532
|
-
return function(
|
|
6533
|
-
const a2 = (
|
|
6532
|
+
return function(n, r2) {
|
|
6533
|
+
const a2 = (r2.variables?.name ?? w)({ name: n.name });
|
|
6534
6534
|
return H$1(
|
|
6535
6535
|
a2,
|
|
6536
|
-
|
|
6536
|
+
n.fallback ? e(n.fallback, r2) : void 0
|
|
6537
6537
|
);
|
|
6538
6538
|
};
|
|
6539
6539
|
}
|
|
6540
6540
|
function ae(e) {
|
|
6541
6541
|
const t = S$1(e);
|
|
6542
|
-
return function(
|
|
6543
|
-
return
|
|
6544
|
-
(a2, i) => (a2.push(e(i,
|
|
6545
|
-
[t(":root",
|
|
6542
|
+
return function(r2, c2) {
|
|
6543
|
+
return r2.themes.reduce(
|
|
6544
|
+
(a2, i) => (a2.push(e(i, c2)), a2),
|
|
6545
|
+
[t(":root", r2, c2)]
|
|
6546
6546
|
// Default theme (root)
|
|
6547
6547
|
).join(`
|
|
6548
6548
|
|
|
@@ -6551,41 +6551,41 @@ function ae(e) {
|
|
|
6551
6551
|
}
|
|
6552
6552
|
function le(e) {
|
|
6553
6553
|
const t = S$1(e);
|
|
6554
|
-
return function(
|
|
6555
|
-
return t(
|
|
6554
|
+
return function(r2, c2) {
|
|
6555
|
+
return t(r2.query, r2, c2);
|
|
6556
6556
|
};
|
|
6557
6557
|
}
|
|
6558
6558
|
function fe(e) {
|
|
6559
6559
|
const t = S$1(e);
|
|
6560
|
-
return function(
|
|
6561
|
-
const i = (
|
|
6562
|
-
return t(i,
|
|
6560
|
+
return function(r2, c2) {
|
|
6561
|
+
const i = (c2.theme?.selector ?? D$1)({ name: r2.name });
|
|
6562
|
+
return t(i, r2, c2);
|
|
6563
6563
|
};
|
|
6564
6564
|
}
|
|
6565
6565
|
function me(e) {
|
|
6566
6566
|
const t = S$1(e);
|
|
6567
|
-
return function(
|
|
6568
|
-
const a2 = [], s2 = (
|
|
6569
|
-
name:
|
|
6570
|
-
value:
|
|
6571
|
-
modifiers:
|
|
6567
|
+
return function(r2, c2) {
|
|
6568
|
+
const a2 = [], s2 = (c2.utilities?.selector ?? I)({
|
|
6569
|
+
name: r2.name,
|
|
6570
|
+
value: r2.value,
|
|
6571
|
+
modifiers: r2.modifiers
|
|
6572
6572
|
});
|
|
6573
|
-
return a2.push(t(s2,
|
|
6573
|
+
return a2.push(t(s2, r2, c2)), a2.join(`
|
|
6574
6574
|
|
|
6575
6575
|
`);
|
|
6576
6576
|
};
|
|
6577
6577
|
}
|
|
6578
6578
|
function p$1(e, t) {
|
|
6579
|
-
const
|
|
6579
|
+
const n = ae(p$1), r2 = le(p$1), c2 = me(p$1), a2 = Z(p$1), i = fe(p$1), s2 = E$1(p$1), o2 = se(p$1), u = ce(p$1), f2 = ie();
|
|
6580
6580
|
switch (true) {
|
|
6581
6581
|
case Y$1(e):
|
|
6582
|
-
return
|
|
6582
|
+
return r2(e, t);
|
|
6583
6583
|
case ee(e):
|
|
6584
|
-
return
|
|
6584
|
+
return c2(e, t);
|
|
6585
6585
|
case X$1(e):
|
|
6586
6586
|
return a2(e, t);
|
|
6587
6587
|
case re(e):
|
|
6588
|
-
return
|
|
6588
|
+
return n(e, t);
|
|
6589
6589
|
case ne(e):
|
|
6590
6590
|
return i(e, t);
|
|
6591
6591
|
case J$1(e):
|
|
@@ -6593,7 +6593,7 @@ function p$1(e, t) {
|
|
|
6593
6593
|
case G$1(e):
|
|
6594
6594
|
return o2(e, t);
|
|
6595
6595
|
case te(e):
|
|
6596
|
-
return
|
|
6596
|
+
return u(e, t);
|
|
6597
6597
|
default:
|
|
6598
6598
|
return f2(e, t);
|
|
6599
6599
|
}
|
|
@@ -6601,7 +6601,7 @@ function p$1(e, t) {
|
|
|
6601
6601
|
function T$1(e, t) {
|
|
6602
6602
|
switch (true) {
|
|
6603
6603
|
case Array.isArray(e):
|
|
6604
|
-
return e.map((
|
|
6604
|
+
return e.map((n) => T$1(n)).join(`
|
|
6605
6605
|
`);
|
|
6606
6606
|
// case isRecipe(instance):
|
|
6607
6607
|
// return consumeRecipe(instance, options);
|
|
@@ -6620,10 +6620,10 @@ hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
|
|
|
6620
6620
|
GwIDAQAB
|
|
6621
6621
|
-----END PUBLIC KEY-----`, ye = "__licenseRequired", pe = "__licenseValidated";
|
|
6622
6622
|
async function he(e) {
|
|
6623
|
-
const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""),
|
|
6623
|
+
const t = e.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), n = Uint8Array.from(atob(t), (r2) => r2.charCodeAt(0));
|
|
6624
6624
|
return await crypto.subtle.importKey(
|
|
6625
6625
|
"spki",
|
|
6626
|
-
|
|
6626
|
+
n,
|
|
6627
6627
|
{
|
|
6628
6628
|
name: "RSASSA-PKCS1-v1_5",
|
|
6629
6629
|
hash: "SHA-256"
|
|
@@ -6636,15 +6636,15 @@ async function be({
|
|
|
6636
6636
|
payload: e,
|
|
6637
6637
|
signature: t
|
|
6638
6638
|
}) {
|
|
6639
|
-
const
|
|
6639
|
+
const n = new TextEncoder().encode(e), r2 = Uint8Array.from(
|
|
6640
6640
|
atob(t),
|
|
6641
6641
|
(a2) => a2.charCodeAt(0)
|
|
6642
|
-
),
|
|
6642
|
+
), c2 = await he(de);
|
|
6643
6643
|
if (!await crypto.subtle.verify(
|
|
6644
6644
|
{ name: "RSASSA-PKCS1-v1_5" },
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
|
|
6645
|
+
c2,
|
|
6646
|
+
r2,
|
|
6647
|
+
n
|
|
6648
6648
|
))
|
|
6649
6649
|
throw new Error(
|
|
6650
6650
|
"License validation failed: Invalid signature detected. The license may have been modified or corrupted."
|
|
@@ -6666,8 +6666,8 @@ async function ge(e) {
|
|
|
6666
6666
|
environment: "",
|
|
6667
6667
|
valid: false
|
|
6668
6668
|
};
|
|
6669
|
-
const
|
|
6670
|
-
if (typeof
|
|
6669
|
+
const n = t.value;
|
|
6670
|
+
if (typeof n != "object" || n === null || !("payload" in n) || !("signature" in n) || typeof n.payload != "string" || typeof n.signature != "string")
|
|
6671
6671
|
return {
|
|
6672
6672
|
key: "",
|
|
6673
6673
|
instanceId: "",
|
|
@@ -6676,7 +6676,7 @@ async function ge(e) {
|
|
|
6676
6676
|
};
|
|
6677
6677
|
try {
|
|
6678
6678
|
return await be(
|
|
6679
|
-
|
|
6679
|
+
n
|
|
6680
6680
|
);
|
|
6681
6681
|
} catch {
|
|
6682
6682
|
return {
|
|
@@ -6719,23 +6719,23 @@ function j(e, t = "") {
|
|
|
6719
6719
|
}
|
|
6720
6720
|
async function Ce(e, {
|
|
6721
6721
|
type: t = "all",
|
|
6722
|
-
consumers:
|
|
6722
|
+
consumers: n = { css: p$1, ts: T$1 }
|
|
6723
6723
|
} = {}) {
|
|
6724
|
-
const
|
|
6724
|
+
const r2 = { files: [] }, c2 = e.options;
|
|
6725
6725
|
if (Ae(e)) {
|
|
6726
6726
|
const s2 = await ge(e);
|
|
6727
6727
|
(!s2.valid || s2.instanceId !== e.id) && Se(e);
|
|
6728
6728
|
}
|
|
6729
6729
|
const { recipes: a2, ...i } = e.root;
|
|
6730
6730
|
if (t === "all" || t === "css") {
|
|
6731
|
-
const s2 = j("index.css",
|
|
6732
|
-
|
|
6731
|
+
const s2 = j("index.css", n.css(i, c2));
|
|
6732
|
+
r2.files.push(s2);
|
|
6733
6733
|
}
|
|
6734
6734
|
if (t === "all" || t === "ts") {
|
|
6735
|
-
const s2 = j("index.ts",
|
|
6736
|
-
|
|
6735
|
+
const s2 = j("index.ts", n.ts([], c2));
|
|
6736
|
+
r2.files.push(s2);
|
|
6737
6737
|
}
|
|
6738
|
-
return
|
|
6738
|
+
return r2;
|
|
6739
6739
|
}
|
|
6740
6740
|
async function directoryExists(path2) {
|
|
6741
6741
|
try {
|
|
@@ -11,7 +11,7 @@ import nt$1, { cwd } from "process";
|
|
|
11
11
|
import V from "fs";
|
|
12
12
|
import require$$33 from "util";
|
|
13
13
|
import require$$3$1 from "crypto";
|
|
14
|
-
import { r as resolve$1, j as join, n as normalize$1, c as commonjsGlobal$1, d as defu, a as dirname$1, b as basename } from "./build-
|
|
14
|
+
import { r as resolve$1, j as join, n as normalize$1, c as commonjsGlobal$1, d as defu, a as dirname$1, b as basename } from "./build-D2raUd8_.js";
|
|
15
15
|
import require$$4, { pipeline } from "node:stream";
|
|
16
16
|
import { homedir, tmpdir } from "node:os";
|
|
17
17
|
import require$$6, { promisify } from "node:util";
|
|
@@ -3470,7 +3470,7 @@ Content-Type: ${R3.type || "application/octet-stream"}\r
|
|
|
3470
3470
|
for (const [R3, w2] of b) g.append(R3, w2);
|
|
3471
3471
|
return g;
|
|
3472
3472
|
}
|
|
3473
|
-
const { toFormData: d } = await import("./multipart-parser-
|
|
3473
|
+
const { toFormData: d } = await import("./multipart-parser-C7t4XZXl.js").then((n2) => n2.m);
|
|
3474
3474
|
return d(this.body, l2);
|
|
3475
3475
|
}
|
|
3476
3476
|
async blob() {
|
package/dist/index.cjs
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
}
|
|
23
23
|
return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
|
|
24
24
|
}
|
|
25
|
-
const version$1 = "
|
|
25
|
+
const version$1 = "2.0.3";
|
|
26
26
|
const description = "A command-line interface for styleframe.";
|
|
27
27
|
const main$1 = citty.defineCommand({
|
|
28
28
|
meta: {
|
|
@@ -115,9 +115,9 @@ export default s;
|
|
|
115
115
|
if (await fileExists$1(packageJsonPath)) {
|
|
116
116
|
const packageJson = JSON.parse(await promises$1.readFile(packageJsonPath, "utf8"));
|
|
117
117
|
if (!packageJson.devDependencies) packageJson.devDependencies = {};
|
|
118
|
-
packageJson.devDependencies["styleframe"] = "^
|
|
119
|
-
packageJson.devDependencies["@styleframe/theme"] = "^
|
|
120
|
-
packageJson.devDependencies["@styleframe/pro"] = "^
|
|
118
|
+
packageJson.devDependencies["styleframe"] = "^2.0.0";
|
|
119
|
+
packageJson.devDependencies["@styleframe/theme"] = "^2.0.0";
|
|
120
|
+
packageJson.devDependencies["@styleframe/pro"] = "^2.0.0";
|
|
121
121
|
await promises$1.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
122
122
|
consola.success(`Added dependencies to "package.json".`);
|
|
123
123
|
} else {
|
|
@@ -8313,8 +8313,8 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8313
8313
|
const N = ["charset", "import", "namespace"], R$1$1 = ["layer"], D$1 = ({ name: e2 }) => `[data-theme="${e2}"]`, I$1 = ({
|
|
8314
8314
|
name: e2,
|
|
8315
8315
|
value: t2,
|
|
8316
|
-
modifiers:
|
|
8317
|
-
}) => `._${[...
|
|
8316
|
+
modifiers: n2
|
|
8317
|
+
}) => `._${[...n2, e2, t2].filter(Boolean).join("\\:")}`, w$2 = ({ name: e2 }) => e2;
|
|
8318
8318
|
function L$1(e2, t2) {
|
|
8319
8319
|
return `@${e2}${t2 ? " " : ""}${t2}`;
|
|
8320
8320
|
}
|
|
@@ -8324,34 +8324,34 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8324
8324
|
return e2 !== e2.toLowerCase();
|
|
8325
8325
|
}
|
|
8326
8326
|
function U$1(e2, t2) {
|
|
8327
|
-
const
|
|
8327
|
+
const n2 = M$1, r2 = [];
|
|
8328
8328
|
if (!e2 || typeof e2 != "string")
|
|
8329
|
-
return
|
|
8330
|
-
let
|
|
8329
|
+
return r2;
|
|
8330
|
+
let c2 = "", a2, i2;
|
|
8331
8331
|
for (const s2 of e2) {
|
|
8332
|
-
const o2 =
|
|
8332
|
+
const o2 = n2.includes(s2);
|
|
8333
8333
|
if (o2 === true) {
|
|
8334
|
-
|
|
8334
|
+
r2.push(c2), c2 = "", a2 = void 0;
|
|
8335
8335
|
continue;
|
|
8336
8336
|
}
|
|
8337
|
-
const
|
|
8337
|
+
const u2 = $$1(s2);
|
|
8338
8338
|
if (i2 === false) {
|
|
8339
|
-
if (a2 === false &&
|
|
8340
|
-
|
|
8339
|
+
if (a2 === false && u2 === true) {
|
|
8340
|
+
r2.push(c2), c2 = s2, a2 = u2;
|
|
8341
8341
|
continue;
|
|
8342
8342
|
}
|
|
8343
|
-
if (a2 === true &&
|
|
8344
|
-
const f2 =
|
|
8345
|
-
|
|
8343
|
+
if (a2 === true && u2 === false && c2.length > 1) {
|
|
8344
|
+
const f2 = c2.at(-1);
|
|
8345
|
+
r2.push(c2.slice(0, Math.max(0, c2.length - 1))), c2 = f2 + s2, a2 = u2;
|
|
8346
8346
|
continue;
|
|
8347
8347
|
}
|
|
8348
8348
|
}
|
|
8349
|
-
|
|
8349
|
+
c2 += s2, a2 = u2, i2 = o2;
|
|
8350
8350
|
}
|
|
8351
|
-
return
|
|
8351
|
+
return r2.push(c2), r2;
|
|
8352
8352
|
}
|
|
8353
8353
|
function _$1(e2, t2) {
|
|
8354
|
-
return e2 ? (Array.isArray(e2) ? e2 : U$1(e2)).map((
|
|
8354
|
+
return e2 ? (Array.isArray(e2) ? e2 : U$1(e2)).map((n2) => n2.toLowerCase()).join("-") : "";
|
|
8355
8355
|
}
|
|
8356
8356
|
function k$1(e2) {
|
|
8357
8357
|
return ` ${e2}`;
|
|
@@ -8388,28 +8388,28 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8388
8388
|
return `${e2} ${q$1$1(t2)}`;
|
|
8389
8389
|
}
|
|
8390
8390
|
function Q$1(e2) {
|
|
8391
|
-
return function(
|
|
8392
|
-
return Object.entries(
|
|
8391
|
+
return function(n2, r2) {
|
|
8392
|
+
return Object.entries(n2).map(([c2, a2]) => B$1(c2, e2(a2, r2)));
|
|
8393
8393
|
};
|
|
8394
8394
|
}
|
|
8395
8395
|
function E$1(e2) {
|
|
8396
|
-
return function(
|
|
8397
|
-
const a2 = (
|
|
8398
|
-
return z$1(a2, e2(
|
|
8396
|
+
return function(n2, r2) {
|
|
8397
|
+
const a2 = (r2.variables?.name ?? w$2)({ name: n2.name });
|
|
8398
|
+
return z$1(a2, e2(n2.value, r2));
|
|
8399
8399
|
};
|
|
8400
8400
|
}
|
|
8401
8401
|
function S$1(e2) {
|
|
8402
|
-
const t2 = E$1(e2),
|
|
8403
|
-
return function(
|
|
8404
|
-
const { variables: s2, declarations: o2, children:
|
|
8402
|
+
const t2 = E$1(e2), n2 = Q$1(e2);
|
|
8403
|
+
return function(c2, a2, i2) {
|
|
8404
|
+
const { variables: s2, declarations: o2, children: u2 } = a2, f2 = c2 === ":root", l2 = (s2 ?? []).map(
|
|
8405
8405
|
(A2) => t2(A2, i2)
|
|
8406
|
-
), m2 =
|
|
8406
|
+
), m2 = n2(
|
|
8407
8407
|
o2 ?? {},
|
|
8408
8408
|
i2
|
|
8409
|
-
), y2 = (
|
|
8409
|
+
), y2 = (u2 ?? []).map(
|
|
8410
8410
|
(A2) => e2(A2, i2)
|
|
8411
8411
|
), d = l2.length > 0, h2 = m2.length > 0, v2 = y2.length > 0;
|
|
8412
|
-
return f2 ? `${d || h2 ? C$1(
|
|
8412
|
+
return f2 ? `${d || h2 ? C$1(c2, [
|
|
8413
8413
|
...l2,
|
|
8414
8414
|
...d && h2 ? [""] : [],
|
|
8415
8415
|
...m2
|
|
@@ -8417,7 +8417,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8417
8417
|
|
|
8418
8418
|
` : ""}${y2.join(`
|
|
8419
8419
|
|
|
8420
|
-
`)}` : C$1(
|
|
8420
|
+
`)}` : C$1(c2, [
|
|
8421
8421
|
...l2,
|
|
8422
8422
|
...d && (v2 || h2) ? [""] : [],
|
|
8423
8423
|
...m2,
|
|
@@ -8430,11 +8430,11 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8430
8430
|
}
|
|
8431
8431
|
function Z(e2) {
|
|
8432
8432
|
const t2 = S$1(e2);
|
|
8433
|
-
return function(
|
|
8434
|
-
const a2 = N.includes(
|
|
8435
|
-
|
|
8436
|
-
), s2 = Object.keys(
|
|
8437
|
-
return a2 || i2 && !(s2 || o2 ||
|
|
8433
|
+
return function(r2, c2) {
|
|
8434
|
+
const a2 = N.includes(r2.identifier), i2 = R$1$1.includes(
|
|
8435
|
+
r2.identifier
|
|
8436
|
+
), s2 = Object.keys(r2.declarations).length > 0, o2 = r2.variables.length > 0, u2 = r2.children.length > 0, f2 = L$1(r2.identifier, r2.rule);
|
|
8437
|
+
return a2 || i2 && !(s2 || o2 || u2) ? `${f2};` : t2(f2, r2, c2);
|
|
8438
8438
|
};
|
|
8439
8439
|
}
|
|
8440
8440
|
function W$1(e2) {
|
|
@@ -8479,79 +8479,79 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8479
8479
|
}
|
|
8480
8480
|
function oe(e2) {
|
|
8481
8481
|
if (e2 = e2 || {}, e2.circular)
|
|
8482
|
-
return
|
|
8482
|
+
return ue$1(e2);
|
|
8483
8483
|
const t2 = /* @__PURE__ */ new Map();
|
|
8484
8484
|
if (t2.set(Date, (i2) => new Date(i2)), t2.set(
|
|
8485
8485
|
Map,
|
|
8486
|
-
(i2, s2) => new Map(
|
|
8486
|
+
(i2, s2) => new Map(r2(Array.from(i2), s2))
|
|
8487
8487
|
), t2.set(
|
|
8488
8488
|
Set,
|
|
8489
|
-
(i2, s2) => new Set(
|
|
8489
|
+
(i2, s2) => new Set(r2(Array.from(i2), s2))
|
|
8490
8490
|
), e2.constructorHandlers)
|
|
8491
8491
|
for (const i2 of e2.constructorHandlers)
|
|
8492
8492
|
t2.set(i2[0], i2[1]);
|
|
8493
|
-
let
|
|
8494
|
-
return e2.proto ? a2 :
|
|
8495
|
-
function
|
|
8496
|
-
const o2 = Object.keys(i2),
|
|
8493
|
+
let n2;
|
|
8494
|
+
return e2.proto ? a2 : c2;
|
|
8495
|
+
function r2(i2, s2) {
|
|
8496
|
+
const o2 = Object.keys(i2), u2 = Array.from({ length: o2.length });
|
|
8497
8497
|
for (let f2 = 0; f2 < o2.length; f2++) {
|
|
8498
8498
|
const l2 = o2[f2], m2 = i2[l2];
|
|
8499
|
-
typeof m2 != "object" || m2 === null ?
|
|
8499
|
+
typeof m2 != "object" || m2 === null ? u2[l2] = m2 : m2.constructor !== Object && (n2 = t2.get(m2.constructor)) ? u2[l2] = n2(m2, s2) : ArrayBuffer.isView(m2) ? u2[l2] = g$1(m2) : u2[l2] = s2(m2);
|
|
8500
8500
|
}
|
|
8501
|
-
return
|
|
8501
|
+
return u2;
|
|
8502
8502
|
}
|
|
8503
|
-
function
|
|
8503
|
+
function c2(i2) {
|
|
8504
8504
|
if (typeof i2 != "object" || i2 === null) return i2;
|
|
8505
|
-
if (Array.isArray(i2)) return
|
|
8506
|
-
if (i2.constructor !== Object && (
|
|
8507
|
-
return
|
|
8505
|
+
if (Array.isArray(i2)) return r2(i2, c2);
|
|
8506
|
+
if (i2.constructor !== Object && (n2 = t2.get(i2.constructor)))
|
|
8507
|
+
return n2(i2, c2);
|
|
8508
8508
|
const s2 = {};
|
|
8509
8509
|
for (const o2 in i2) {
|
|
8510
8510
|
if (Object.hasOwnProperty.call(i2, o2) === false) continue;
|
|
8511
|
-
const
|
|
8512
|
-
typeof
|
|
8511
|
+
const u2 = i2[o2];
|
|
8512
|
+
typeof u2 != "object" || u2 === null ? s2[o2] = u2 : u2.constructor !== Object && (n2 = t2.get(u2.constructor)) ? s2[o2] = n2(u2, c2) : ArrayBuffer.isView(u2) ? s2[o2] = g$1(u2) : s2[o2] = c2(u2);
|
|
8513
8513
|
}
|
|
8514
8514
|
return s2;
|
|
8515
8515
|
}
|
|
8516
8516
|
function a2(i2) {
|
|
8517
8517
|
if (typeof i2 != "object" || i2 === null) return i2;
|
|
8518
|
-
if (Array.isArray(i2)) return
|
|
8519
|
-
if (i2.constructor !== Object && (
|
|
8520
|
-
return
|
|
8518
|
+
if (Array.isArray(i2)) return r2(i2, a2);
|
|
8519
|
+
if (i2.constructor !== Object && (n2 = t2.get(i2.constructor)))
|
|
8520
|
+
return n2(i2, a2);
|
|
8521
8521
|
const s2 = {};
|
|
8522
8522
|
for (const o2 in i2) {
|
|
8523
|
-
const
|
|
8524
|
-
typeof
|
|
8523
|
+
const u2 = i2[o2];
|
|
8524
|
+
typeof u2 != "object" || u2 === null ? s2[o2] = u2 : u2.constructor !== Object && (n2 = t2.get(u2.constructor)) ? s2[o2] = n2(u2, a2) : ArrayBuffer.isView(u2) ? s2[o2] = g$1(u2) : s2[o2] = a2(u2);
|
|
8525
8525
|
}
|
|
8526
8526
|
return s2;
|
|
8527
8527
|
}
|
|
8528
8528
|
}
|
|
8529
|
-
function
|
|
8530
|
-
const t2 = [],
|
|
8531
|
-
if (
|
|
8529
|
+
function ue$1(e2) {
|
|
8530
|
+
const t2 = [], n2 = [], r2 = /* @__PURE__ */ new Map();
|
|
8531
|
+
if (r2.set(Date, (o2) => new Date(o2)), r2.set(
|
|
8532
8532
|
Map,
|
|
8533
|
-
(o2,
|
|
8534
|
-
),
|
|
8533
|
+
(o2, u2) => new Map(a2(Array.from(o2), u2))
|
|
8534
|
+
), r2.set(
|
|
8535
8535
|
Set,
|
|
8536
|
-
(o2,
|
|
8536
|
+
(o2, u2) => new Set(a2(Array.from(o2), u2))
|
|
8537
8537
|
), e2.constructorHandlers)
|
|
8538
8538
|
for (const o2 of e2.constructorHandlers)
|
|
8539
|
-
|
|
8540
|
-
let
|
|
8539
|
+
r2.set(o2[0], o2[1]);
|
|
8540
|
+
let c2;
|
|
8541
8541
|
return e2.proto ? s2 : i2;
|
|
8542
|
-
function a2(o2,
|
|
8542
|
+
function a2(o2, u2) {
|
|
8543
8543
|
const f2 = Object.keys(o2), l2 = Array.from({ length: f2.length });
|
|
8544
8544
|
for (let m2 = 0; m2 < f2.length; m2++) {
|
|
8545
8545
|
const y2 = f2[m2], d = o2[y2];
|
|
8546
8546
|
if (typeof d != "object" || d === null)
|
|
8547
8547
|
l2[y2] = d;
|
|
8548
|
-
else if (d.constructor !== Object && (
|
|
8549
|
-
l2[y2] =
|
|
8548
|
+
else if (d.constructor !== Object && (c2 = r2.get(d.constructor)))
|
|
8549
|
+
l2[y2] = c2(d, u2);
|
|
8550
8550
|
else if (ArrayBuffer.isView(d))
|
|
8551
8551
|
l2[y2] = g$1(d);
|
|
8552
8552
|
else {
|
|
8553
8553
|
const h2 = t2.indexOf(d);
|
|
8554
|
-
h2 !== -1 ? l2[y2] =
|
|
8554
|
+
h2 !== -1 ? l2[y2] = n2[h2] : l2[y2] = u2(d);
|
|
8555
8555
|
}
|
|
8556
8556
|
}
|
|
8557
8557
|
return l2;
|
|
@@ -8559,75 +8559,75 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8559
8559
|
function i2(o2) {
|
|
8560
8560
|
if (typeof o2 != "object" || o2 === null) return o2;
|
|
8561
8561
|
if (Array.isArray(o2)) return a2(o2, i2);
|
|
8562
|
-
if (o2.constructor !== Object && (
|
|
8563
|
-
return
|
|
8564
|
-
const
|
|
8565
|
-
t2.push(o2),
|
|
8562
|
+
if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
|
|
8563
|
+
return c2(o2, i2);
|
|
8564
|
+
const u2 = {};
|
|
8565
|
+
t2.push(o2), n2.push(u2);
|
|
8566
8566
|
for (const f2 in o2) {
|
|
8567
8567
|
if (Object.hasOwnProperty.call(o2, f2) === false) continue;
|
|
8568
8568
|
const l2 = o2[f2];
|
|
8569
8569
|
if (typeof l2 != "object" || l2 === null)
|
|
8570
|
-
|
|
8571
|
-
else if (l2.constructor !== Object && (
|
|
8572
|
-
|
|
8570
|
+
u2[f2] = l2;
|
|
8571
|
+
else if (l2.constructor !== Object && (c2 = r2.get(l2.constructor)))
|
|
8572
|
+
u2[f2] = c2(l2, i2);
|
|
8573
8573
|
else if (ArrayBuffer.isView(l2))
|
|
8574
|
-
|
|
8574
|
+
u2[f2] = g$1(l2);
|
|
8575
8575
|
else {
|
|
8576
8576
|
const m2 = t2.indexOf(l2);
|
|
8577
|
-
m2 !== -1 ?
|
|
8577
|
+
m2 !== -1 ? u2[f2] = n2[m2] : u2[f2] = i2(l2);
|
|
8578
8578
|
}
|
|
8579
8579
|
}
|
|
8580
|
-
return t2.pop(),
|
|
8580
|
+
return t2.pop(), n2.pop(), u2;
|
|
8581
8581
|
}
|
|
8582
8582
|
function s2(o2) {
|
|
8583
8583
|
if (typeof o2 != "object" || o2 === null) return o2;
|
|
8584
8584
|
if (Array.isArray(o2)) return a2(o2, s2);
|
|
8585
|
-
if (o2.constructor !== Object && (
|
|
8586
|
-
return
|
|
8587
|
-
const
|
|
8588
|
-
t2.push(o2),
|
|
8585
|
+
if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
|
|
8586
|
+
return c2(o2, s2);
|
|
8587
|
+
const u2 = {};
|
|
8588
|
+
t2.push(o2), n2.push(u2);
|
|
8589
8589
|
for (const f2 in o2) {
|
|
8590
8590
|
const l2 = o2[f2];
|
|
8591
8591
|
if (typeof l2 != "object" || l2 === null)
|
|
8592
|
-
|
|
8593
|
-
else if (l2.constructor !== Object && (
|
|
8594
|
-
|
|
8592
|
+
u2[f2] = l2;
|
|
8593
|
+
else if (l2.constructor !== Object && (c2 = r2.get(l2.constructor)))
|
|
8594
|
+
u2[f2] = c2(l2, s2);
|
|
8595
8595
|
else if (ArrayBuffer.isView(l2))
|
|
8596
|
-
|
|
8596
|
+
u2[f2] = g$1(l2);
|
|
8597
8597
|
else {
|
|
8598
8598
|
const m2 = t2.indexOf(l2);
|
|
8599
|
-
m2 !== -1 ?
|
|
8599
|
+
m2 !== -1 ? u2[f2] = n2[m2] : u2[f2] = s2(l2);
|
|
8600
8600
|
}
|
|
8601
8601
|
}
|
|
8602
|
-
return t2.pop(),
|
|
8602
|
+
return t2.pop(), n2.pop(), u2;
|
|
8603
8603
|
}
|
|
8604
8604
|
}
|
|
8605
8605
|
oe();
|
|
8606
|
-
function
|
|
8607
|
-
return function(
|
|
8608
|
-
return
|
|
8606
|
+
function ce(e2) {
|
|
8607
|
+
return function(n2, r2) {
|
|
8608
|
+
return n2.value.map((c2) => e2(c2, r2)).join("").trim();
|
|
8609
8609
|
};
|
|
8610
8610
|
}
|
|
8611
8611
|
function ie(e2) {
|
|
8612
|
-
return function(
|
|
8613
|
-
return
|
|
8612
|
+
return function(n2, r2) {
|
|
8613
|
+
return n2 != null ? `${n2}` : "";
|
|
8614
8614
|
};
|
|
8615
8615
|
}
|
|
8616
8616
|
function se(e2) {
|
|
8617
|
-
return function(
|
|
8618
|
-
const a2 = (
|
|
8617
|
+
return function(n2, r2) {
|
|
8618
|
+
const a2 = (r2.variables?.name ?? w$2)({ name: n2.name });
|
|
8619
8619
|
return H$1$1(
|
|
8620
8620
|
a2,
|
|
8621
|
-
|
|
8621
|
+
n2.fallback ? e2(n2.fallback, r2) : void 0
|
|
8622
8622
|
);
|
|
8623
8623
|
};
|
|
8624
8624
|
}
|
|
8625
8625
|
function ae(e2) {
|
|
8626
8626
|
const t2 = S$1(e2);
|
|
8627
|
-
return function(
|
|
8628
|
-
return
|
|
8629
|
-
(a2, i2) => (a2.push(e2(i2,
|
|
8630
|
-
[t2(":root",
|
|
8627
|
+
return function(r2, c2) {
|
|
8628
|
+
return r2.themes.reduce(
|
|
8629
|
+
(a2, i2) => (a2.push(e2(i2, c2)), a2),
|
|
8630
|
+
[t2(":root", r2, c2)]
|
|
8631
8631
|
// Default theme (root)
|
|
8632
8632
|
).join(`
|
|
8633
8633
|
|
|
@@ -8636,41 +8636,41 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8636
8636
|
}
|
|
8637
8637
|
function le(e2) {
|
|
8638
8638
|
const t2 = S$1(e2);
|
|
8639
|
-
return function(
|
|
8640
|
-
return t2(
|
|
8639
|
+
return function(r2, c2) {
|
|
8640
|
+
return t2(r2.query, r2, c2);
|
|
8641
8641
|
};
|
|
8642
8642
|
}
|
|
8643
8643
|
function fe(e2) {
|
|
8644
8644
|
const t2 = S$1(e2);
|
|
8645
|
-
return function(
|
|
8646
|
-
const i2 = (
|
|
8647
|
-
return t2(i2,
|
|
8645
|
+
return function(r2, c2) {
|
|
8646
|
+
const i2 = (c2.theme?.selector ?? D$1)({ name: r2.name });
|
|
8647
|
+
return t2(i2, r2, c2);
|
|
8648
8648
|
};
|
|
8649
8649
|
}
|
|
8650
8650
|
function me(e2) {
|
|
8651
8651
|
const t2 = S$1(e2);
|
|
8652
|
-
return function(
|
|
8653
|
-
const a2 = [], s2 = (
|
|
8654
|
-
name:
|
|
8655
|
-
value:
|
|
8656
|
-
modifiers:
|
|
8652
|
+
return function(r2, c2) {
|
|
8653
|
+
const a2 = [], s2 = (c2.utilities?.selector ?? I$1)({
|
|
8654
|
+
name: r2.name,
|
|
8655
|
+
value: r2.value,
|
|
8656
|
+
modifiers: r2.modifiers
|
|
8657
8657
|
});
|
|
8658
|
-
return a2.push(t2(s2,
|
|
8658
|
+
return a2.push(t2(s2, r2, c2)), a2.join(`
|
|
8659
8659
|
|
|
8660
8660
|
`);
|
|
8661
8661
|
};
|
|
8662
8662
|
}
|
|
8663
8663
|
function p$1(e2, t2) {
|
|
8664
|
-
const
|
|
8664
|
+
const n2 = ae(p$1), r2 = le(p$1), c2 = me(p$1), a2 = Z(p$1), i2 = fe(p$1), s2 = E$1(p$1), o2 = se(p$1), u2 = ce(p$1), f2 = ie();
|
|
8665
8665
|
switch (true) {
|
|
8666
8666
|
case Y$1(e2):
|
|
8667
|
-
return
|
|
8667
|
+
return r2(e2, t2);
|
|
8668
8668
|
case ee(e2):
|
|
8669
|
-
return
|
|
8669
|
+
return c2(e2, t2);
|
|
8670
8670
|
case X$1$1(e2):
|
|
8671
8671
|
return a2(e2, t2);
|
|
8672
8672
|
case re(e2):
|
|
8673
|
-
return
|
|
8673
|
+
return n2(e2, t2);
|
|
8674
8674
|
case ne(e2):
|
|
8675
8675
|
return i2(e2, t2);
|
|
8676
8676
|
case J$1(e2):
|
|
@@ -8678,7 +8678,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8678
8678
|
case G$1(e2):
|
|
8679
8679
|
return o2(e2, t2);
|
|
8680
8680
|
case te(e2):
|
|
8681
|
-
return
|
|
8681
|
+
return u2(e2, t2);
|
|
8682
8682
|
default:
|
|
8683
8683
|
return f2(e2, t2);
|
|
8684
8684
|
}
|
|
@@ -8686,7 +8686,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
|
|
|
8686
8686
|
function T$1(e2, t2) {
|
|
8687
8687
|
switch (true) {
|
|
8688
8688
|
case Array.isArray(e2):
|
|
8689
|
-
return e2.map((
|
|
8689
|
+
return e2.map((n2) => T$1(n2)).join(`
|
|
8690
8690
|
`);
|
|
8691
8691
|
// case isRecipe(instance):
|
|
8692
8692
|
// return consumeRecipe(instance, options);
|
|
@@ -8705,10 +8705,10 @@ hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
|
|
|
8705
8705
|
GwIDAQAB
|
|
8706
8706
|
-----END PUBLIC KEY-----`, ye = "__licenseRequired", pe = "__licenseValidated";
|
|
8707
8707
|
async function he(e2) {
|
|
8708
|
-
const t2 = e2.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""),
|
|
8708
|
+
const t2 = e2.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), n2 = Uint8Array.from(atob(t2), (r2) => r2.charCodeAt(0));
|
|
8709
8709
|
return await crypto.subtle.importKey(
|
|
8710
8710
|
"spki",
|
|
8711
|
-
|
|
8711
|
+
n2,
|
|
8712
8712
|
{
|
|
8713
8713
|
name: "RSASSA-PKCS1-v1_5",
|
|
8714
8714
|
hash: "SHA-256"
|
|
@@ -8721,15 +8721,15 @@ GwIDAQAB
|
|
|
8721
8721
|
payload: e2,
|
|
8722
8722
|
signature: t2
|
|
8723
8723
|
}) {
|
|
8724
|
-
const
|
|
8724
|
+
const n2 = new TextEncoder().encode(e2), r2 = Uint8Array.from(
|
|
8725
8725
|
atob(t2),
|
|
8726
8726
|
(a2) => a2.charCodeAt(0)
|
|
8727
|
-
),
|
|
8727
|
+
), c2 = await he(de);
|
|
8728
8728
|
if (!await crypto.subtle.verify(
|
|
8729
8729
|
{ name: "RSASSA-PKCS1-v1_5" },
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8730
|
+
c2,
|
|
8731
|
+
r2,
|
|
8732
|
+
n2
|
|
8733
8733
|
))
|
|
8734
8734
|
throw new Error(
|
|
8735
8735
|
"License validation failed: Invalid signature detected. The license may have been modified or corrupted."
|
|
@@ -8751,8 +8751,8 @@ GwIDAQAB
|
|
|
8751
8751
|
environment: "",
|
|
8752
8752
|
valid: false
|
|
8753
8753
|
};
|
|
8754
|
-
const
|
|
8755
|
-
if (typeof
|
|
8754
|
+
const n2 = t2.value;
|
|
8755
|
+
if (typeof n2 != "object" || n2 === null || !("payload" in n2) || !("signature" in n2) || typeof n2.payload != "string" || typeof n2.signature != "string")
|
|
8756
8756
|
return {
|
|
8757
8757
|
key: "",
|
|
8758
8758
|
instanceId: "",
|
|
@@ -8761,7 +8761,7 @@ GwIDAQAB
|
|
|
8761
8761
|
};
|
|
8762
8762
|
try {
|
|
8763
8763
|
return await be$1(
|
|
8764
|
-
|
|
8764
|
+
n2
|
|
8765
8765
|
);
|
|
8766
8766
|
} catch {
|
|
8767
8767
|
return {
|
|
@@ -8804,23 +8804,23 @@ GwIDAQAB
|
|
|
8804
8804
|
}
|
|
8805
8805
|
async function Ce(e2, {
|
|
8806
8806
|
type: t2 = "all",
|
|
8807
|
-
consumers:
|
|
8807
|
+
consumers: n2 = { css: p$1, ts: T$1 }
|
|
8808
8808
|
} = {}) {
|
|
8809
|
-
const
|
|
8809
|
+
const r2 = { files: [] }, c2 = e2.options;
|
|
8810
8810
|
if (Ae(e2)) {
|
|
8811
8811
|
const s2 = await ge$1(e2);
|
|
8812
8812
|
(!s2.valid || s2.instanceId !== e2.id) && Se(e2);
|
|
8813
8813
|
}
|
|
8814
8814
|
const { recipes: a2, ...i2 } = e2.root;
|
|
8815
8815
|
if (t2 === "all" || t2 === "css") {
|
|
8816
|
-
const s2 = j$1("index.css",
|
|
8817
|
-
|
|
8816
|
+
const s2 = j$1("index.css", n2.css(i2, c2));
|
|
8817
|
+
r2.files.push(s2);
|
|
8818
8818
|
}
|
|
8819
8819
|
if (t2 === "all" || t2 === "ts") {
|
|
8820
|
-
const s2 = j$1("index.ts",
|
|
8821
|
-
|
|
8820
|
+
const s2 = j$1("index.ts", n2.ts([], c2));
|
|
8821
|
+
r2.files.push(s2);
|
|
8822
8822
|
}
|
|
8823
|
-
return
|
|
8823
|
+
return r2;
|
|
8824
8824
|
}
|
|
8825
8825
|
async function directoryExists(path2) {
|
|
8826
8826
|
try {
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { defineCommand, runMain } from "citty";
|
|
3
|
-
const version = "
|
|
3
|
+
const version = "2.0.3";
|
|
4
4
|
const description = "A command-line interface for styleframe.";
|
|
5
5
|
const main = defineCommand({
|
|
6
6
|
meta: {
|
|
@@ -9,8 +9,8 @@ const main = defineCommand({
|
|
|
9
9
|
description
|
|
10
10
|
},
|
|
11
11
|
subCommands: {
|
|
12
|
-
init: () => import("./init-
|
|
13
|
-
build: () => import("./build-
|
|
12
|
+
init: () => import("./init-CdbN2rGk.js").then((m) => m.default),
|
|
13
|
+
build: () => import("./build-D2raUd8_.js").then((n) => n.e).then((m) => m.default)
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
function run() {
|
|
@@ -83,9 +83,9 @@ async function addPackageJsonDependencies(cwd) {
|
|
|
83
83
|
if (await fileExists(packageJsonPath)) {
|
|
84
84
|
const packageJson = JSON.parse(await readFile(packageJsonPath, "utf8"));
|
|
85
85
|
if (!packageJson.devDependencies) packageJson.devDependencies = {};
|
|
86
|
-
packageJson.devDependencies["styleframe"] = "^
|
|
87
|
-
packageJson.devDependencies["@styleframe/theme"] = "^
|
|
88
|
-
packageJson.devDependencies["@styleframe/pro"] = "^
|
|
86
|
+
packageJson.devDependencies["styleframe"] = "^2.0.0";
|
|
87
|
+
packageJson.devDependencies["@styleframe/theme"] = "^2.0.0";
|
|
88
|
+
packageJson.devDependencies["@styleframe/pro"] = "^2.0.0";
|
|
89
89
|
await writeFile$1(packageJsonPath, JSON.stringify(packageJson, null, 2));
|
|
90
90
|
consola.success(`Added dependencies to "package.json".`);
|
|
91
91
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@styleframe/cli",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A command-line interface for styleframe.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"citty": "^0.1.6",
|
|
24
24
|
"consola": "^3.0.0-2",
|
|
25
25
|
"magicast": "^0.5.0",
|
|
26
|
-
"@styleframe/loader": "
|
|
26
|
+
"@styleframe/loader": "2.0.3"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@vitest/coverage-v8": "^3.2.4",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"vite-plugin-dts": "^4.5.4",
|
|
34
34
|
"vite-plugin-node": "^7.0.0",
|
|
35
35
|
"vitest": "^3.2.4",
|
|
36
|
-
"@styleframe/config-
|
|
37
|
-
"@styleframe/
|
|
38
|
-
"@styleframe/
|
|
36
|
+
"@styleframe/config-typescript": "2.0.3",
|
|
37
|
+
"@styleframe/config-vite": "2.0.3",
|
|
38
|
+
"@styleframe/core": "2.0.3"
|
|
39
39
|
},
|
|
40
40
|
"homepage": "https://github.com/styleframe-dev/styleframe#readme",
|
|
41
41
|
"bugs": {
|
package/dist/jsonc-DGYhwGmL.js
DELETED