@styleframe/cli 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global2, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("citty"), require("consola"), require("fs/promises"), require("path"), require("node:fs/promises"), require("node:fs"), require("magicast"), require("magicast/helpers"), require("node:path"), require("node:url"), require("node:os"), require("node:assert"), require("node:process"), require("node:v8"), require("node:util"), require("node:module"), require("node:crypto"), require("node:tty"), require("node:perf_hooks"), require("node:vm"), require("fs"), require("os"), require("crypto"), require("assert"), require("events"), require("stream"), require("string_decoder"), require("buffer"), require("zlib"), require("process"), require("util"), require("node:stream"), require("node:http"), require("node:https"), require("node:net"), require("node:buffer"), require("node:querystring"), require("node:events"), require("node:diagnostics_channel"), require("node:tls"), require("node:zlib"), require("node:util/types"), require("node:worker_threads"), require("node:async_hooks"), require("node:console"), require("node:dns"), require("net"), require("http"), require("https"), require("tls"), require("tty"), require("url"), require("child_process"), require("readline")) : typeof define === "function" && define.amd ? define(["citty", "consola", "fs/promises", "path", "node:fs/promises", "node:fs", "magicast", "magicast/helpers", "node:path", "node:url", "node:os", "node:assert", "node:process", "node:v8", "node:util", "node:module", "node:crypto", "node:tty", "node:perf_hooks", "node:vm", "fs", "os", "crypto", "assert", "events", "stream", "string_decoder", "buffer", "zlib", "process", "util", "node:stream", "node:http", "node:https", "node:net", "node:buffer", "node:querystring", "node:events", "node:diagnostics_channel", "node:tls", "node:zlib", "node:util/types", "node:worker_threads", "node:async_hooks", "node:console", "node:dns", "net", "http", "https", "tls", "tty", "url", "child_process", "readline"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.cli = factory(global2.citty, global2.consola, global2.promises$1, global2.sysPath, global2.promises, global2.fs, global2.magicast, global2.helpers, global2.path, global2.require$$9, global2.require$$0, global2.assert, global2.process$1, global2.v8, global2.require$$6, global2.require$$1, global2.require$$9$1, global2.require$$10, global2.require$$11, global2.require$$12, global2.V$3, global2.require$$2, global2.require$$3, global2.j$1$1, global2.nt, global2.ot, global2.ht$1, global2.P$3, global2.O$2$1, global2.nt$1, global2.require$$33, global2.require$$4$1, global2.require$$1$1, global2.require$$2$1, global2.require$$9$2, global2.require$$5, global2.require$$15, global2.require$$16, global2.require$$17, global2.require$$19, global2.require$$3$1, global2.require$$22, global2.require$$23, global2.require$$24, global2.require$$25, global2.require$$26, global2.require$$28, global2.require$$29, global2.require$$30, global2.require$$31, global2.require$$32, global2.require$$36, global2.child_process, global2.me$2));
3
- })(this, (function(citty, consola, promises$1, sysPath, promises, fs, magicast, helpers, path, require$$9, require$$0, assert, process$1, v8, require$$6, require$$1, require$$9$1, require$$10, require$$11, require$$12, V$3, require$$2, require$$3, j$1$1, nt, ot, ht$1, P$3, O$2$1, nt$1, require$$33, require$$4$1, require$$1$1, require$$2$1, require$$9$2, require$$5, require$$15, require$$16, require$$17, require$$19, require$$3$1, require$$22, require$$23, require$$24, require$$25, require$$26, require$$28, require$$29, require$$30, require$$31, require$$32, require$$36, child_process, me$2) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? module.exports = factory(require("citty"), require("consola"), require("fs/promises"), require("path"), require("node:fs/promises"), require("node:fs"), require("magicast"), require("magicast/helpers"), require("node:path"), require("@styleframe/license"), require("node:url"), require("node:os"), require("node:assert"), require("node:process"), require("node:v8"), require("node:util"), require("node:module"), require("node:crypto"), require("node:tty"), require("node:perf_hooks"), require("node:vm"), require("fs"), require("os"), require("crypto"), require("assert"), require("events"), require("stream"), require("string_decoder"), require("buffer"), require("zlib"), require("process"), require("util"), require("node:stream"), require("node:http"), require("node:https"), require("node:net"), require("node:buffer"), require("node:querystring"), require("node:events"), require("node:diagnostics_channel"), require("node:tls"), require("node:zlib"), require("node:util/types"), require("node:worker_threads"), require("node:async_hooks"), require("node:console"), require("node:dns"), require("net"), require("http"), require("https"), require("tls"), require("tty"), require("url"), require("child_process"), require("readline")) : typeof define === "function" && define.amd ? define(["citty", "consola", "fs/promises", "path", "node:fs/promises", "node:fs", "magicast", "magicast/helpers", "node:path", "@styleframe/license", "node:url", "node:os", "node:assert", "node:process", "node:v8", "node:util", "node:module", "node:crypto", "node:tty", "node:perf_hooks", "node:vm", "fs", "os", "crypto", "assert", "events", "stream", "string_decoder", "buffer", "zlib", "process", "util", "node:stream", "node:http", "node:https", "node:net", "node:buffer", "node:querystring", "node:events", "node:diagnostics_channel", "node:tls", "node:zlib", "node:util/types", "node:worker_threads", "node:async_hooks", "node:console", "node:dns", "net", "http", "https", "tls", "tty", "url", "child_process", "readline"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, global2.cli = factory(global2.citty, global2.consola, global2.promises$1, global2.sysPath, global2.promises, global2.fs, global2.magicast, global2.helpers, global2.path, global2.license, global2.require$$9, global2.require$$0, global2.assert, global2.process$1, global2.v8, global2.require$$6, global2.require$$1, global2.require$$9$1, global2.require$$10, global2.require$$11, global2.require$$12, global2.V$3, global2.require$$2, global2.require$$3, global2.j$1$1, global2.nt, global2.ot, global2.ht$1, global2.P$3, global2.O$2$1, global2.nt$1, global2.require$$33, global2.require$$4$1, global2.require$$1$1, global2.require$$2$1, global2.require$$9$2, global2.require$$5, global2.require$$15, global2.require$$16, global2.require$$17, global2.require$$19, global2.require$$3$1, global2.require$$22, global2.require$$23, global2.require$$24, global2.require$$25, global2.require$$26, global2.require$$28, global2.require$$29, global2.require$$30, global2.require$$31, global2.require$$32, global2.require$$36, global2.child_process, global2.me$2));
3
+ })(this, (function(citty, consola, promises$1, sysPath, promises, fs, magicast, helpers, path, license, require$$9, require$$0, assert, process$1, v8, require$$6, require$$1, require$$9$1, require$$10, require$$11, require$$12, V$3, require$$2, require$$3, j$1$1, nt, ot, ht$1, P$3, O$2$1, nt$1, require$$33, require$$4$1, require$$1$1, require$$2$1, require$$9$2, require$$5, require$$15, require$$16, require$$17, require$$19, require$$3$1, require$$22, require$$23, require$$24, require$$25, require$$26, require$$28, require$$29, require$$30, require$$31, require$$32, require$$36, child_process, me$2) {
4
4
  "use strict";
5
5
  var _documentCurrentScript = typeof document !== "undefined" ? document.currentScript : null;
6
6
  function _mergeNamespaces(n2, m2) {
@@ -22,7 +22,7 @@
22
22
  }
23
23
  return Object.freeze(Object.defineProperty(n2, Symbol.toStringTag, { value: "Module" }));
24
24
  }
25
- const version$1 = "1.0.5";
25
+ const version$1 = "2.1.0";
26
26
  const description = "A command-line interface for styleframe.";
27
27
  const main$1 = citty.defineCommand({
28
28
  meta: {
@@ -115,9 +115,15 @@ 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"] = "^1.0.0";
119
- packageJson.devDependencies["@styleframe/theme"] = "^1.0.0";
120
- packageJson.devDependencies["@styleframe/pro"] = "^1.0.0";
118
+ packageJson.devDependencies["styleframe"] = "^2.0.0";
119
+ packageJson.devDependencies["@styleframe/cli"] = "^2.0.0";
120
+ packageJson.devDependencies["@styleframe/core"] = "^2.0.0";
121
+ packageJson.devDependencies["@styleframe/license"] = "^2.0.0";
122
+ packageJson.devDependencies["@styleframe/loader"] = "^2.0.0";
123
+ packageJson.devDependencies["@styleframe/plugin"] = "^2.0.0";
124
+ packageJson.devDependencies["@styleframe/pro"] = "^2.0.0";
125
+ packageJson.devDependencies["@styleframe/theme"] = "^2.0.0";
126
+ packageJson.devDependencies["@styleframe/transpiler"] = "^2.0.0";
121
127
  await promises$1.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));
122
128
  consola.success(`Added dependencies to "package.json".`);
123
129
  } else {
@@ -168,54 +174,6 @@ export default s;
168
174
  initializeConfigFile,
169
175
  initializeFrameworkFile
170
176
  }, Symbol.toStringTag, { value: "Module" }));
171
- const a$a = "__licenseRequired", o$5 = "__licenseValidated", f$4 = "zkbxuglymolesrtagncn", s$9 = `https://${f$4}.supabase.co`, y$5 = {};
172
- function I$4() {
173
- return process.env?.STYLEFRAME_KEY || y$5?.STYLEFRAME_KEY;
174
- }
175
- async function p$4(e2) {
176
- return await (await fetch(
177
- `${s$9}/functions/v1/validate-license`,
178
- {
179
- method: "POST",
180
- body: JSON.stringify(e2)
181
- }
182
- )).json();
183
- }
184
- function c$6(e2) {
185
- return Object.prototype.hasOwnProperty.call(e2, a$a);
186
- }
187
- function b$3(e2, n2) {
188
- Object.defineProperty(e2, o$5, {
189
- value: n2,
190
- writable: false,
191
- configurable: false,
192
- enumerable: false
193
- });
194
- }
195
- async function L$4(e2, {
196
- licenseKey: n2,
197
- environment: t2,
198
- isBuild: r2 = false
199
- }) {
200
- if (c$6(e2)) {
201
- if (n2) {
202
- const i2 = await p$4({
203
- key: n2,
204
- instanceId: e2.id,
205
- environment: t2
206
- });
207
- if ("payload" in i2 && "signature" in i2)
208
- b$3(e2, i2);
209
- else
210
- throw new Error(`License validation failed with ${i2.error}`);
211
- } else if (t2 !== "production")
212
- console.warn("[styleframe] No styleframe Pro license key provided.");
213
- else if (r2)
214
- throw new Error(
215
- "A valid styleframe Pro license key is required to build in production mode."
216
- );
217
- }
218
- }
219
177
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
220
178
  function normalizeWindowsPath(input = "") {
221
179
  if (!input) {
@@ -8313,8 +8271,8 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8313
8271
  const N = ["charset", "import", "namespace"], R$1$1 = ["layer"], D$1 = ({ name: e2 }) => `[data-theme="${e2}"]`, I$1 = ({
8314
8272
  name: e2,
8315
8273
  value: t2,
8316
- modifiers: r2
8317
- }) => `._${[...r2, e2, t2].filter(Boolean).join("\\:")}`, w$2 = ({ name: e2 }) => e2;
8274
+ modifiers: n2
8275
+ }) => `._${[...n2, e2, t2].filter(Boolean).join("\\:")}`, w$2 = ({ name: e2 }) => e2;
8318
8276
  function L$1(e2, t2) {
8319
8277
  return `@${e2}${t2 ? " " : ""}${t2}`;
8320
8278
  }
@@ -8324,34 +8282,34 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8324
8282
  return e2 !== e2.toLowerCase();
8325
8283
  }
8326
8284
  function U$1(e2, t2) {
8327
- const r2 = M$1, n2 = [];
8285
+ const n2 = M$1, r2 = [];
8328
8286
  if (!e2 || typeof e2 != "string")
8329
- return n2;
8330
- let u2 = "", a2, i2;
8287
+ return r2;
8288
+ let c2 = "", a2, i2;
8331
8289
  for (const s2 of e2) {
8332
- const o2 = r2.includes(s2);
8290
+ const o2 = n2.includes(s2);
8333
8291
  if (o2 === true) {
8334
- n2.push(u2), u2 = "", a2 = void 0;
8292
+ r2.push(c2), c2 = "", a2 = void 0;
8335
8293
  continue;
8336
8294
  }
8337
- const c2 = $$1(s2);
8295
+ const u2 = $$1(s2);
8338
8296
  if (i2 === false) {
8339
- if (a2 === false && c2 === true) {
8340
- n2.push(u2), u2 = s2, a2 = c2;
8297
+ if (a2 === false && u2 === true) {
8298
+ r2.push(c2), c2 = s2, a2 = u2;
8341
8299
  continue;
8342
8300
  }
8343
- if (a2 === true && c2 === false && u2.length > 1) {
8344
- const f2 = u2.at(-1);
8345
- n2.push(u2.slice(0, Math.max(0, u2.length - 1))), u2 = f2 + s2, a2 = c2;
8301
+ if (a2 === true && u2 === false && c2.length > 1) {
8302
+ const f2 = c2.at(-1);
8303
+ r2.push(c2.slice(0, Math.max(0, c2.length - 1))), c2 = f2 + s2, a2 = u2;
8346
8304
  continue;
8347
8305
  }
8348
8306
  }
8349
- u2 += s2, a2 = c2, i2 = o2;
8307
+ c2 += s2, a2 = u2, i2 = o2;
8350
8308
  }
8351
- return n2.push(u2), n2;
8309
+ return r2.push(c2), r2;
8352
8310
  }
8353
8311
  function _$1(e2, t2) {
8354
- return e2 ? (Array.isArray(e2) ? e2 : U$1(e2)).map((r2) => r2.toLowerCase()).join("-") : "";
8312
+ return e2 ? (Array.isArray(e2) ? e2 : U$1(e2)).map((n2) => n2.toLowerCase()).join("-") : "";
8355
8313
  }
8356
8314
  function k$1(e2) {
8357
8315
  return ` ${e2}`;
@@ -8388,28 +8346,28 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8388
8346
  return `${e2} ${q$1$1(t2)}`;
8389
8347
  }
8390
8348
  function Q$1(e2) {
8391
- return function(r2, n2) {
8392
- return Object.entries(r2).map(([u2, a2]) => B$1(u2, e2(a2, n2)));
8349
+ return function(n2, r2) {
8350
+ return Object.entries(n2).map(([c2, a2]) => B$1(c2, e2(a2, r2)));
8393
8351
  };
8394
8352
  }
8395
8353
  function E$1(e2) {
8396
- return function(r2, n2) {
8397
- const a2 = (n2.variables?.name ?? w$2)({ name: r2.name });
8398
- return z$1(a2, e2(r2.value, n2));
8354
+ return function(n2, r2) {
8355
+ const a2 = (r2.variables?.name ?? w$2)({ name: n2.name });
8356
+ return z$1(a2, e2(n2.value, r2));
8399
8357
  };
8400
8358
  }
8401
8359
  function S$1(e2) {
8402
- const t2 = E$1(e2), r2 = Q$1(e2);
8403
- return function(u2, a2, i2) {
8404
- const { variables: s2, declarations: o2, children: c2 } = a2, f2 = u2 === ":root", l2 = (s2 ?? []).map(
8360
+ const t2 = E$1(e2), n2 = Q$1(e2);
8361
+ return function(c2, a2, i2) {
8362
+ const { variables: s2, declarations: o2, children: u2 } = a2, f2 = c2 === ":root", l2 = (s2 ?? []).map(
8405
8363
  (A2) => t2(A2, i2)
8406
- ), m2 = r2(
8364
+ ), m2 = n2(
8407
8365
  o2 ?? {},
8408
8366
  i2
8409
- ), y2 = (c2 ?? []).map(
8367
+ ), y2 = (u2 ?? []).map(
8410
8368
  (A2) => e2(A2, i2)
8411
8369
  ), d = l2.length > 0, h2 = m2.length > 0, v2 = y2.length > 0;
8412
- return f2 ? `${d || h2 ? C$1(u2, [
8370
+ return f2 ? `${d || h2 ? C$1(c2, [
8413
8371
  ...l2,
8414
8372
  ...d && h2 ? [""] : [],
8415
8373
  ...m2
@@ -8417,7 +8375,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8417
8375
 
8418
8376
  ` : ""}${y2.join(`
8419
8377
 
8420
- `)}` : C$1(u2, [
8378
+ `)}` : C$1(c2, [
8421
8379
  ...l2,
8422
8380
  ...d && (v2 || h2) ? [""] : [],
8423
8381
  ...m2,
@@ -8430,11 +8388,11 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8430
8388
  }
8431
8389
  function Z(e2) {
8432
8390
  const t2 = S$1(e2);
8433
- return function(n2, u2) {
8434
- const a2 = N.includes(n2.identifier), i2 = R$1$1.includes(
8435
- n2.identifier
8436
- ), s2 = Object.keys(n2.declarations).length > 0, o2 = n2.variables.length > 0, c2 = n2.children.length > 0, f2 = L$1(n2.identifier, n2.rule);
8437
- return a2 || i2 && !(s2 || o2 || c2) ? `${f2};` : t2(f2, n2, u2);
8391
+ return function(r2, c2) {
8392
+ const a2 = N.includes(r2.identifier), i2 = R$1$1.includes(
8393
+ r2.identifier
8394
+ ), s2 = Object.keys(r2.declarations).length > 0, o2 = r2.variables.length > 0, u2 = r2.children.length > 0, f2 = L$1(r2.identifier, r2.rule);
8395
+ return a2 || i2 && !(s2 || o2 || u2) ? `${f2};` : t2(f2, r2, c2);
8438
8396
  };
8439
8397
  }
8440
8398
  function W$1(e2) {
@@ -8479,79 +8437,79 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8479
8437
  }
8480
8438
  function oe(e2) {
8481
8439
  if (e2 = e2 || {}, e2.circular)
8482
- return ce(e2);
8440
+ return ue$1(e2);
8483
8441
  const t2 = /* @__PURE__ */ new Map();
8484
8442
  if (t2.set(Date, (i2) => new Date(i2)), t2.set(
8485
8443
  Map,
8486
- (i2, s2) => new Map(n2(Array.from(i2), s2))
8444
+ (i2, s2) => new Map(r2(Array.from(i2), s2))
8487
8445
  ), t2.set(
8488
8446
  Set,
8489
- (i2, s2) => new Set(n2(Array.from(i2), s2))
8447
+ (i2, s2) => new Set(r2(Array.from(i2), s2))
8490
8448
  ), e2.constructorHandlers)
8491
8449
  for (const i2 of e2.constructorHandlers)
8492
8450
  t2.set(i2[0], i2[1]);
8493
- let r2;
8494
- return e2.proto ? a2 : u2;
8495
- function n2(i2, s2) {
8496
- const o2 = Object.keys(i2), c2 = Array.from({ length: o2.length });
8451
+ let n2;
8452
+ return e2.proto ? a2 : c2;
8453
+ function r2(i2, s2) {
8454
+ const o2 = Object.keys(i2), u2 = Array.from({ length: o2.length });
8497
8455
  for (let f2 = 0; f2 < o2.length; f2++) {
8498
8456
  const l2 = o2[f2], m2 = i2[l2];
8499
- typeof m2 != "object" || m2 === null ? c2[l2] = m2 : m2.constructor !== Object && (r2 = t2.get(m2.constructor)) ? c2[l2] = r2(m2, s2) : ArrayBuffer.isView(m2) ? c2[l2] = g$1(m2) : c2[l2] = s2(m2);
8457
+ 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
8458
  }
8501
- return c2;
8459
+ return u2;
8502
8460
  }
8503
- function u2(i2) {
8461
+ function c2(i2) {
8504
8462
  if (typeof i2 != "object" || i2 === null) return i2;
8505
- if (Array.isArray(i2)) return n2(i2, u2);
8506
- if (i2.constructor !== Object && (r2 = t2.get(i2.constructor)))
8507
- return r2(i2, u2);
8463
+ if (Array.isArray(i2)) return r2(i2, c2);
8464
+ if (i2.constructor !== Object && (n2 = t2.get(i2.constructor)))
8465
+ return n2(i2, c2);
8508
8466
  const s2 = {};
8509
8467
  for (const o2 in i2) {
8510
8468
  if (Object.hasOwnProperty.call(i2, o2) === false) continue;
8511
- const c2 = i2[o2];
8512
- typeof c2 != "object" || c2 === null ? s2[o2] = c2 : c2.constructor !== Object && (r2 = t2.get(c2.constructor)) ? s2[o2] = r2(c2, u2) : ArrayBuffer.isView(c2) ? s2[o2] = g$1(c2) : s2[o2] = u2(c2);
8469
+ const u2 = i2[o2];
8470
+ 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
8471
  }
8514
8472
  return s2;
8515
8473
  }
8516
8474
  function a2(i2) {
8517
8475
  if (typeof i2 != "object" || i2 === null) return i2;
8518
- if (Array.isArray(i2)) return n2(i2, a2);
8519
- if (i2.constructor !== Object && (r2 = t2.get(i2.constructor)))
8520
- return r2(i2, a2);
8476
+ if (Array.isArray(i2)) return r2(i2, a2);
8477
+ if (i2.constructor !== Object && (n2 = t2.get(i2.constructor)))
8478
+ return n2(i2, a2);
8521
8479
  const s2 = {};
8522
8480
  for (const o2 in i2) {
8523
- const c2 = i2[o2];
8524
- typeof c2 != "object" || c2 === null ? s2[o2] = c2 : c2.constructor !== Object && (r2 = t2.get(c2.constructor)) ? s2[o2] = r2(c2, a2) : ArrayBuffer.isView(c2) ? s2[o2] = g$1(c2) : s2[o2] = a2(c2);
8481
+ const u2 = i2[o2];
8482
+ 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
8483
  }
8526
8484
  return s2;
8527
8485
  }
8528
8486
  }
8529
- function ce(e2) {
8530
- const t2 = [], r2 = [], n2 = /* @__PURE__ */ new Map();
8531
- if (n2.set(Date, (o2) => new Date(o2)), n2.set(
8487
+ function ue$1(e2) {
8488
+ const t2 = [], n2 = [], r2 = /* @__PURE__ */ new Map();
8489
+ if (r2.set(Date, (o2) => new Date(o2)), r2.set(
8532
8490
  Map,
8533
- (o2, c2) => new Map(a2(Array.from(o2), c2))
8534
- ), n2.set(
8491
+ (o2, u2) => new Map(a2(Array.from(o2), u2))
8492
+ ), r2.set(
8535
8493
  Set,
8536
- (o2, c2) => new Set(a2(Array.from(o2), c2))
8494
+ (o2, u2) => new Set(a2(Array.from(o2), u2))
8537
8495
  ), e2.constructorHandlers)
8538
8496
  for (const o2 of e2.constructorHandlers)
8539
- n2.set(o2[0], o2[1]);
8540
- let u2;
8497
+ r2.set(o2[0], o2[1]);
8498
+ let c2;
8541
8499
  return e2.proto ? s2 : i2;
8542
- function a2(o2, c2) {
8500
+ function a2(o2, u2) {
8543
8501
  const f2 = Object.keys(o2), l2 = Array.from({ length: f2.length });
8544
8502
  for (let m2 = 0; m2 < f2.length; m2++) {
8545
8503
  const y2 = f2[m2], d = o2[y2];
8546
8504
  if (typeof d != "object" || d === null)
8547
8505
  l2[y2] = d;
8548
- else if (d.constructor !== Object && (u2 = n2.get(d.constructor)))
8549
- l2[y2] = u2(d, c2);
8506
+ else if (d.constructor !== Object && (c2 = r2.get(d.constructor)))
8507
+ l2[y2] = c2(d, u2);
8550
8508
  else if (ArrayBuffer.isView(d))
8551
8509
  l2[y2] = g$1(d);
8552
8510
  else {
8553
8511
  const h2 = t2.indexOf(d);
8554
- h2 !== -1 ? l2[y2] = r2[h2] : l2[y2] = c2(d);
8512
+ h2 !== -1 ? l2[y2] = n2[h2] : l2[y2] = u2(d);
8555
8513
  }
8556
8514
  }
8557
8515
  return l2;
@@ -8559,75 +8517,75 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8559
8517
  function i2(o2) {
8560
8518
  if (typeof o2 != "object" || o2 === null) return o2;
8561
8519
  if (Array.isArray(o2)) return a2(o2, i2);
8562
- if (o2.constructor !== Object && (u2 = n2.get(o2.constructor)))
8563
- return u2(o2, i2);
8564
- const c2 = {};
8565
- t2.push(o2), r2.push(c2);
8520
+ if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
8521
+ return c2(o2, i2);
8522
+ const u2 = {};
8523
+ t2.push(o2), n2.push(u2);
8566
8524
  for (const f2 in o2) {
8567
8525
  if (Object.hasOwnProperty.call(o2, f2) === false) continue;
8568
8526
  const l2 = o2[f2];
8569
8527
  if (typeof l2 != "object" || l2 === null)
8570
- c2[f2] = l2;
8571
- else if (l2.constructor !== Object && (u2 = n2.get(l2.constructor)))
8572
- c2[f2] = u2(l2, i2);
8528
+ u2[f2] = l2;
8529
+ else if (l2.constructor !== Object && (c2 = r2.get(l2.constructor)))
8530
+ u2[f2] = c2(l2, i2);
8573
8531
  else if (ArrayBuffer.isView(l2))
8574
- c2[f2] = g$1(l2);
8532
+ u2[f2] = g$1(l2);
8575
8533
  else {
8576
8534
  const m2 = t2.indexOf(l2);
8577
- m2 !== -1 ? c2[f2] = r2[m2] : c2[f2] = i2(l2);
8535
+ m2 !== -1 ? u2[f2] = n2[m2] : u2[f2] = i2(l2);
8578
8536
  }
8579
8537
  }
8580
- return t2.pop(), r2.pop(), c2;
8538
+ return t2.pop(), n2.pop(), u2;
8581
8539
  }
8582
8540
  function s2(o2) {
8583
8541
  if (typeof o2 != "object" || o2 === null) return o2;
8584
8542
  if (Array.isArray(o2)) return a2(o2, s2);
8585
- if (o2.constructor !== Object && (u2 = n2.get(o2.constructor)))
8586
- return u2(o2, s2);
8587
- const c2 = {};
8588
- t2.push(o2), r2.push(c2);
8543
+ if (o2.constructor !== Object && (c2 = r2.get(o2.constructor)))
8544
+ return c2(o2, s2);
8545
+ const u2 = {};
8546
+ t2.push(o2), n2.push(u2);
8589
8547
  for (const f2 in o2) {
8590
8548
  const l2 = o2[f2];
8591
8549
  if (typeof l2 != "object" || l2 === null)
8592
- c2[f2] = l2;
8593
- else if (l2.constructor !== Object && (u2 = n2.get(l2.constructor)))
8594
- c2[f2] = u2(l2, s2);
8550
+ u2[f2] = l2;
8551
+ else if (l2.constructor !== Object && (c2 = r2.get(l2.constructor)))
8552
+ u2[f2] = c2(l2, s2);
8595
8553
  else if (ArrayBuffer.isView(l2))
8596
- c2[f2] = g$1(l2);
8554
+ u2[f2] = g$1(l2);
8597
8555
  else {
8598
8556
  const m2 = t2.indexOf(l2);
8599
- m2 !== -1 ? c2[f2] = r2[m2] : c2[f2] = s2(l2);
8557
+ m2 !== -1 ? u2[f2] = n2[m2] : u2[f2] = s2(l2);
8600
8558
  }
8601
8559
  }
8602
- return t2.pop(), r2.pop(), c2;
8560
+ return t2.pop(), n2.pop(), u2;
8603
8561
  }
8604
8562
  }
8605
8563
  oe();
8606
- function ue$1(e2) {
8607
- return function(r2, n2) {
8608
- return r2.value.map((u2) => e2(u2, n2)).join("").trim();
8564
+ function ce(e2) {
8565
+ return function(n2, r2) {
8566
+ return n2.value.map((c2) => e2(c2, r2)).join("").trim();
8609
8567
  };
8610
8568
  }
8611
8569
  function ie(e2) {
8612
- return function(r2, n2) {
8613
- return r2 != null ? `${r2}` : "";
8570
+ return function(n2, r2) {
8571
+ return n2 != null ? `${n2}` : "";
8614
8572
  };
8615
8573
  }
8616
8574
  function se(e2) {
8617
- return function(r2, n2) {
8618
- const a2 = (n2.variables?.name ?? w$2)({ name: r2.name });
8575
+ return function(n2, r2) {
8576
+ const a2 = (r2.variables?.name ?? w$2)({ name: n2.name });
8619
8577
  return H$1$1(
8620
8578
  a2,
8621
- r2.fallback ? e2(r2.fallback, n2) : void 0
8579
+ n2.fallback ? e2(n2.fallback, r2) : void 0
8622
8580
  );
8623
8581
  };
8624
8582
  }
8625
8583
  function ae(e2) {
8626
8584
  const t2 = S$1(e2);
8627
- return function(n2, u2) {
8628
- return n2.themes.reduce(
8629
- (a2, i2) => (a2.push(e2(i2, u2)), a2),
8630
- [t2(":root", n2, u2)]
8585
+ return function(r2, c2) {
8586
+ return r2.themes.reduce(
8587
+ (a2, i2) => (a2.push(e2(i2, c2)), a2),
8588
+ [t2(":root", r2, c2)]
8631
8589
  // Default theme (root)
8632
8590
  ).join(`
8633
8591
 
@@ -8636,41 +8594,41 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8636
8594
  }
8637
8595
  function le(e2) {
8638
8596
  const t2 = S$1(e2);
8639
- return function(n2, u2) {
8640
- return t2(n2.query, n2, u2);
8597
+ return function(r2, c2) {
8598
+ return t2(r2.query, r2, c2);
8641
8599
  };
8642
8600
  }
8643
8601
  function fe(e2) {
8644
8602
  const t2 = S$1(e2);
8645
- return function(n2, u2) {
8646
- const i2 = (u2.theme?.selector ?? D$1)({ name: n2.name });
8647
- return t2(i2, n2, u2);
8603
+ return function(r2, c2) {
8604
+ const i2 = (c2.theme?.selector ?? D$1)({ name: r2.name });
8605
+ return t2(i2, r2, c2);
8648
8606
  };
8649
8607
  }
8650
8608
  function me(e2) {
8651
8609
  const t2 = S$1(e2);
8652
- return function(n2, u2) {
8653
- const a2 = [], s2 = (u2.utilities?.selector ?? I$1)({
8654
- name: n2.name,
8655
- value: n2.value,
8656
- modifiers: n2.modifiers
8610
+ return function(r2, c2) {
8611
+ const a2 = [], s2 = (c2.utilities?.selector ?? I$1)({
8612
+ name: r2.name,
8613
+ value: r2.value,
8614
+ modifiers: r2.modifiers
8657
8615
  });
8658
- return a2.push(t2(s2, n2, u2)), a2.join(`
8616
+ return a2.push(t2(s2, r2, c2)), a2.join(`
8659
8617
 
8660
8618
  `);
8661
8619
  };
8662
8620
  }
8663
8621
  function p$1(e2, t2) {
8664
- const r2 = ae(p$1), n2 = le(p$1), u2 = me(p$1), a2 = Z(p$1), i2 = fe(p$1), s2 = E$1(p$1), o2 = se(p$1), c2 = ue$1(p$1), f2 = ie();
8622
+ 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
8623
  switch (true) {
8666
8624
  case Y$1(e2):
8667
- return n2(e2, t2);
8625
+ return r2(e2, t2);
8668
8626
  case ee(e2):
8669
- return u2(e2, t2);
8627
+ return c2(e2, t2);
8670
8628
  case X$1$1(e2):
8671
8629
  return a2(e2, t2);
8672
8630
  case re(e2):
8673
- return r2(e2, t2);
8631
+ return n2(e2, t2);
8674
8632
  case ne(e2):
8675
8633
  return i2(e2, t2);
8676
8634
  case J$1(e2):
@@ -8678,7 +8636,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8678
8636
  case G$1(e2):
8679
8637
  return o2(e2, t2);
8680
8638
  case te(e2):
8681
- return c2(e2, t2);
8639
+ return u2(e2, t2);
8682
8640
  default:
8683
8641
  return f2(e2, t2);
8684
8642
  }
@@ -8686,7 +8644,7 @@ ${i2}`, t2), this.line = l2, this.column = r2, this.codeblock = i2;
8686
8644
  function T$1(e2, t2) {
8687
8645
  switch (true) {
8688
8646
  case Array.isArray(e2):
8689
- return e2.map((r2) => T$1(r2)).join(`
8647
+ return e2.map((n2) => T$1(n2)).join(`
8690
8648
  `);
8691
8649
  // case isRecipe(instance):
8692
8650
  // return consumeRecipe(instance, options);
@@ -8705,10 +8663,10 @@ hC7NbH+hPcGc/qIaZSjZfyZeBIZS74qJkrzjEA7/pukROD8UQUrQ512HHZ6XlgMn
8705
8663
  GwIDAQAB
8706
8664
  -----END PUBLIC KEY-----`, ye = "__licenseRequired", pe = "__licenseValidated";
8707
8665
  async function he(e2) {
8708
- const t2 = e2.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), r2 = Uint8Array.from(atob(t2), (n2) => n2.charCodeAt(0));
8666
+ const t2 = e2.replace(/-----BEGIN PUBLIC KEY-----/, "").replace(/-----END PUBLIC KEY-----/, "").replace(/\s/g, ""), n2 = Uint8Array.from(atob(t2), (r2) => r2.charCodeAt(0));
8709
8667
  return await crypto.subtle.importKey(
8710
8668
  "spki",
8711
- r2,
8669
+ n2,
8712
8670
  {
8713
8671
  name: "RSASSA-PKCS1-v1_5",
8714
8672
  hash: "SHA-256"
@@ -8721,15 +8679,15 @@ GwIDAQAB
8721
8679
  payload: e2,
8722
8680
  signature: t2
8723
8681
  }) {
8724
- const r2 = new TextEncoder().encode(e2), n2 = Uint8Array.from(
8682
+ const n2 = new TextEncoder().encode(e2), r2 = Uint8Array.from(
8725
8683
  atob(t2),
8726
8684
  (a2) => a2.charCodeAt(0)
8727
- ), u2 = await he(de);
8685
+ ), c2 = await he(de);
8728
8686
  if (!await crypto.subtle.verify(
8729
8687
  { name: "RSASSA-PKCS1-v1_5" },
8730
- u2,
8731
- n2,
8732
- r2
8688
+ c2,
8689
+ r2,
8690
+ n2
8733
8691
  ))
8734
8692
  throw new Error(
8735
8693
  "License validation failed: Invalid signature detected. The license may have been modified or corrupted."
@@ -8751,8 +8709,8 @@ GwIDAQAB
8751
8709
  environment: "",
8752
8710
  valid: false
8753
8711
  };
8754
- const r2 = t2.value;
8755
- if (typeof r2 != "object" || r2 === null || !("payload" in r2) || !("signature" in r2) || typeof r2.payload != "string" || typeof r2.signature != "string")
8712
+ const n2 = t2.value;
8713
+ if (typeof n2 != "object" || n2 === null || !("payload" in n2) || !("signature" in n2) || typeof n2.payload != "string" || typeof n2.signature != "string")
8756
8714
  return {
8757
8715
  key: "",
8758
8716
  instanceId: "",
@@ -8761,7 +8719,7 @@ GwIDAQAB
8761
8719
  };
8762
8720
  try {
8763
8721
  return await be$1(
8764
- r2
8722
+ n2
8765
8723
  );
8766
8724
  } catch {
8767
8725
  return {
@@ -8804,23 +8762,23 @@ GwIDAQAB
8804
8762
  }
8805
8763
  async function Ce(e2, {
8806
8764
  type: t2 = "all",
8807
- consumers: r2 = { css: p$1, ts: T$1 }
8765
+ consumers: n2 = { css: p$1, ts: T$1 }
8808
8766
  } = {}) {
8809
- const n2 = { files: [] }, u2 = e2.options;
8767
+ const r2 = { files: [] }, c2 = e2.options;
8810
8768
  if (Ae(e2)) {
8811
8769
  const s2 = await ge$1(e2);
8812
8770
  (!s2.valid || s2.instanceId !== e2.id) && Se(e2);
8813
8771
  }
8814
8772
  const { recipes: a2, ...i2 } = e2.root;
8815
8773
  if (t2 === "all" || t2 === "css") {
8816
- const s2 = j$1("index.css", r2.css(i2, u2));
8817
- n2.files.push(s2);
8774
+ const s2 = j$1("index.css", n2.css(i2, c2));
8775
+ r2.files.push(s2);
8818
8776
  }
8819
8777
  if (t2 === "all" || t2 === "ts") {
8820
- const s2 = j$1("index.ts", r2.ts([], u2));
8821
- n2.files.push(s2);
8778
+ const s2 = j$1("index.ts", n2.ts([], c2));
8779
+ r2.files.push(s2);
8822
8780
  }
8823
- return console.log(n2.files), n2;
8781
+ return r2;
8824
8782
  }
8825
8783
  async function directoryExists(path2) {
8826
8784
  try {
@@ -8831,8 +8789,8 @@ GwIDAQAB
8831
8789
  }
8832
8790
  }
8833
8791
  async function build$2(instance, { clean = true, outputDir = "./styleframe", transpiler } = {}) {
8834
- await L$4(instance, {
8835
- licenseKey: I$4() || "",
8792
+ await license.validateInstanceLicense(instance, {
8793
+ licenseKey: license.getLicenseKeyFromEnv() || "",
8836
8794
  environment: process.env.NODE_ENV || "development",
8837
8795
  isBuild: true
8838
8796
  });
@@ -13570,12 +13528,12 @@ Content-Type: ${R2.type || "application/octet-stream"}\r
13570
13528
  }
13571
13529
  u2(getSignal, "getSignal"), Object.defineProperties(AbortController$1.prototype, { signal: { enumerable: true }, abort: { enumerable: true } }), typeof Symbol == "function" && typeof Symbol.toStringTag == "symbol" && Object.defineProperty(AbortController$1.prototype, Symbol.toStringTag, { configurable: true, value: "AbortController" });
13572
13530
  var t2 = Object.defineProperty, e2 = u2((c2, l2) => t2(c2, "name", { value: l2, configurable: true }), "e");
13573
- const fetch2 = fetch$1;
13531
+ const fetch = fetch$1;
13574
13532
  s2();
13575
13533
  function s2() {
13576
13534
  !globalThis.process?.versions?.node && !globalThis.process?.env?.DISABLE_NODE_FETCH_NATIVE_WARN && console.warn("[node-fetch-native] Node.js compatible build of `node-fetch-native` is being used in a non-Node.js environment. Please make sure you are using proper export conditions or report this issue to https://github.com/unjs/node-fetch-native. You can set `process.env.DISABLE_NODE_FETCH_NATIVE_WARN` to disable this warning.");
13577
13535
  }
13578
- u2(s2, "s"), e2(s2, "checkNodeEnvironment"), node.AbortController = AbortController$1, node.AbortError = AbortError, node.Blob = Blob2, node.FetchError = FetchError, node.File = File, node.FormData = FormData, node.Headers = Headers, node.Request = Request, node.Response = Response, node.blobFrom = blobFrom, node.blobFromSync = blobFromSync, node.default = fetch2, node.fetch = fetch2, node.fileFrom = fileFrom, node.fileFromSync = fileFromSync, node.isRedirect = isRedirect;
13536
+ u2(s2, "s"), e2(s2, "checkNodeEnvironment"), node.AbortController = AbortController$1, node.AbortError = AbortError, node.Blob = Blob2, node.FetchError = FetchError, node.File = File, node.FormData = FormData, node.Headers = Headers, node.Request = Request, node.Response = Response, node.blobFrom = blobFrom, node.blobFromSync = blobFromSync, node.default = fetch, node.fetch = fetch, node.fileFrom = fileFrom, node.fileFromSync = fileFromSync, node.isRedirect = isRedirect;
13579
13537
  return node;
13580
13538
  }
13581
13539
  var hasRequiredDist;
@@ -13585,8 +13543,8 @@ Content-Type: ${R2.type || "application/octet-stream"}\r
13585
13543
  Object.defineProperty(dist, "__esModule", { value: true });
13586
13544
  const node2 = requireNode();
13587
13545
  requireNodeFetchNative_DhEqb06g();
13588
- const o2 = !!globalThis.process?.env?.FORCE_NODE_FETCH, fetch2 = !o2 && globalThis.fetch || node2.fetch, Blob2 = !o2 && globalThis.Blob || node2.Blob, File = !o2 && globalThis.File || node2.File, FormData = !o2 && globalThis.FormData || node2.FormData, Headers = !o2 && globalThis.Headers || node2.Headers, Request = !o2 && globalThis.Request || node2.Request, Response = !o2 && globalThis.Response || node2.Response, AbortController2 = !o2 && globalThis.AbortController || node2.AbortController;
13589
- dist.AbortError = node2.AbortError, dist.FetchError = node2.FetchError, dist.blobFrom = node2.blobFrom, dist.blobFromSync = node2.blobFromSync, dist.fileFrom = node2.fileFrom, dist.fileFromSync = node2.fileFromSync, dist.isRedirect = node2.isRedirect, dist.AbortController = AbortController2, dist.Blob = Blob2, dist.File = File, dist.FormData = FormData, dist.Headers = Headers, dist.Request = Request, dist.Response = Response, dist.default = fetch2, dist.fetch = fetch2;
13546
+ const o2 = !!globalThis.process?.env?.FORCE_NODE_FETCH, fetch = !o2 && globalThis.fetch || node2.fetch, Blob2 = !o2 && globalThis.Blob || node2.Blob, File = !o2 && globalThis.File || node2.File, FormData = !o2 && globalThis.FormData || node2.FormData, Headers = !o2 && globalThis.Headers || node2.Headers, Request = !o2 && globalThis.Request || node2.Request, Response = !o2 && globalThis.Response || node2.Response, AbortController2 = !o2 && globalThis.AbortController || node2.AbortController;
13547
+ dist.AbortError = node2.AbortError, dist.FetchError = node2.FetchError, dist.blobFrom = node2.blobFrom, dist.blobFromSync = node2.blobFromSync, dist.fileFrom = node2.fileFrom, dist.fileFromSync = node2.fileFromSync, dist.isRedirect = node2.isRedirect, dist.AbortController = AbortController2, dist.Blob = Blob2, dist.File = File, dist.FormData = FormData, dist.Headers = Headers, dist.Request = Request, dist.Response = Response, dist.default = fetch, dist.fetch = fetch;
13590
13548
  return dist;
13591
13549
  }
13592
13550
  var lib;
@@ -13595,13 +13553,13 @@ Content-Type: ${R2.type || "application/octet-stream"}\r
13595
13553
  if (hasRequiredLib) return lib;
13596
13554
  hasRequiredLib = 1;
13597
13555
  const nodeFetch = requireDist();
13598
- function fetch2(input, options) {
13556
+ function fetch(input, options) {
13599
13557
  return nodeFetch.fetch(input, options);
13600
13558
  }
13601
13559
  for (const key in nodeFetch) {
13602
- fetch2[key] = nodeFetch[key];
13560
+ fetch[key] = nodeFetch[key];
13603
13561
  }
13604
- lib = fetch2;
13562
+ lib = fetch;
13605
13563
  return lib;
13606
13564
  }
13607
13565
  var hasRequiredProxy;
@@ -22529,8 +22487,8 @@ ${p2}`;
22529
22487
  return (c2, B2) => nodeFetchNative.fetch(c2, { ...k2, ...B2 });
22530
22488
  }
22531
22489
  e2(createFetch, "createFetch"), s2(createFetch, "createFetch");
22532
- const fetch2 = createFetch({});
22533
- proxy.createFetch = createFetch, proxy.createProxy = createProxy, proxy.fetch = fetch2;
22490
+ const fetch = createFetch({});
22491
+ proxy.createFetch = createFetch, proxy.createProxy = createProxy, proxy.fetch = fetch;
22534
22492
  return proxy;
22535
22493
  }
22536
22494
  var proxyExports = requireProxy();