@takazudo/zdtp 0.5.0 → 0.5.2

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.d.ts CHANGED
@@ -43,6 +43,8 @@ import { type PanelConfig } from './config/panel-config';
43
43
  * documented public API.
44
44
  */
45
45
  export declare function __mountedSpawnSlotsForTests(): ReadonlyMap<string, number>;
46
+ /** Test-only entry point for focused persistence/allocation contract tests. */
47
+ export declare function __claimSpawnSlotForTests(cfg: PanelConfig): number;
46
48
  /**
47
49
  * Test-only: drop every registered slot. Unlike the bindings reset this has
48
50
  * no listeners to drain — the registry holds plain numbers — so clearing the
package/dist/index.js CHANGED
@@ -1,40 +1,41 @@
1
1
  import "preact/jsx-runtime";
2
2
  import "preact";
3
- import { S as i, c as n, d as l, _ as d, e as _, f as p, g as m, h as g, i as P, j as A, k as C, l as S, m as u, n as T, o as c, q as f, r as K, s as M, t as v, v as w, w as x, x as E, y as F, z as h } from "./index-CHzTi0y5.js";
4
- import { Z as D, a2 as k, x as H, w as L, a5 as b } from "./tweak-state-B7ok3Ob3.js";
5
- import { c as V, s as Y } from "./panel-config-BSu6TUht.js";
6
- import "./autoload-state-DmTY6tRy.js";
3
+ import { S as i, c as n, d as l, _ as d, e as _, f as p, g as m, h as g, i as P, j as S, k as A, l as C, m as T, n as u, o as c, q as f, r as K, s as M, t as w, v as F, w as v, x, y as E, z as h, B as y } from "./index-ChsJ5u4d.js";
4
+ import { Z as k, a2 as H, x as L, w as b, a5 as O } from "./tweak-state-c53KtLHq.js";
5
+ import { c as Y, s as B } from "./panel-config-CqbuB0nh.js";
6
+ import "./autoload-state-BI4-9A58.js";
7
7
  import "./constants.js";
8
8
  export {
9
9
  i as SCHEMA_V1,
10
10
  n as SCHEMA_V2,
11
11
  l as SCHEMA_V3,
12
- D as ZDTP_LEGACY_TYPOGRAPHY_RENAME_MAP,
13
- d as __mountedSpawnSlotsForTests,
14
- _ as __panelConfigForTest,
15
- p as __reapplyFromStorageForTests,
16
- m as __resetInstanceBindingsForTests,
17
- g as __resetSpawnSlotsForTests,
18
- V as configurePanel,
19
- P as disableAutoload,
20
- k as emptyOverrides,
12
+ k as ZDTP_LEGACY_TYPOGRAPHY_RENAME_MAP,
13
+ d as __claimSpawnSlotForTests,
14
+ _ as __mountedSpawnSlotsForTests,
15
+ p as __panelConfigForTest,
16
+ m as __reapplyFromStorageForTests,
17
+ g as __resetInstanceBindingsForTests,
18
+ P as __resetSpawnSlotsForTests,
19
+ Y as configurePanel,
20
+ S as disableAutoload,
21
+ H as emptyOverrides,
21
22
  A as enableAutoload,
22
- H as getClusterDefaultMode,
23
+ L as getClusterDefaultMode,
23
24
  C as hideDesignTokenPanel,
24
- S as isColorKind,
25
+ T as isColorKind,
25
26
  u as isContentKind,
26
- T as isCursorKind,
27
- c as isLengthKind,
28
- f as isMaskImageKind,
29
- K as isNumberKind,
30
- M as isSelectKind,
31
- v as isTextKind,
32
- w as reapplyPersistedOverrides,
33
- L as resolvePerModeLiteral,
34
- b as resolveSemanticPreviewColor,
27
+ c as isCursorKind,
28
+ f as isLengthKind,
29
+ K as isMaskImageKind,
30
+ M as isNumberKind,
31
+ w as isSelectKind,
32
+ F as isTextKind,
33
+ v as reapplyPersistedOverrides,
34
+ b as resolvePerModeLiteral,
35
+ O as resolveSemanticPreviewColor,
35
36
  x as setLifecycleAdapter,
36
- Y as setPanelColorPresets,
37
+ B as setPanelColorPresets,
37
38
  E as shouldAutoload,
38
- F as showDesignTokenPanel,
39
- h as toggleDesignPanel
39
+ h as showDesignTokenPanel,
40
+ y as toggleDesignPanel
40
41
  };
@@ -1,17 +1,17 @@
1
- import { DEFAULT_STORAGE_PREFIX as K, resolveToggleEventName as N } from "./constants.js";
1
+ import { DEFAULT_STORAGE_PREFIX as N, resolveToggleEventName as M, READABLE_STATE_KEY_SUFFIXES as v } from "./constants.js";
2
2
  class k extends Error {
3
3
  constructor(t) {
4
4
  super(t), this.name = "TierResolverError", Object.setPrototypeOf(this, k.prototype);
5
5
  }
6
6
  }
7
- function A(e, t) {
7
+ function S(e, t) {
8
8
  return e.tiers.find((n) => n.id === t);
9
9
  }
10
10
  function $(e, t) {
11
11
  return e.items.find((n) => n.id === t);
12
12
  }
13
- function ee(e, t, n, i) {
14
- const u = A(e, t);
13
+ function te(e, t, n, i) {
14
+ const u = S(e, t);
15
15
  if (!u)
16
16
  throw new k(
17
17
  `Tier "${t}" not found in tab "${e.id}". Available tiers: ${e.tiers.map((f) => f.id).join(", ")}.`
@@ -23,7 +23,7 @@ function ee(e, t, n, i) {
23
23
  );
24
24
  const r = i[t]?.[n];
25
25
  if (u.referencesTier !== void 0) {
26
- const f = u.referencesTier, l = A(e, f);
26
+ const f = u.referencesTier, l = S(e, f);
27
27
  if (!l)
28
28
  throw new k(
29
29
  `Tier "${t}" declares referencesTier "${f}" but that tier does not exist in tab "${e.id}".`
@@ -41,16 +41,16 @@ function ee(e, t, n, i) {
41
41
  }
42
42
  return r !== void 0 ? d.pill && r === d.pill.value ? { kind: "literal", value: d.pill.value } : { kind: "literal", value: r } : d.pill ? { kind: "literal", value: d.pill.customDefault } : { kind: "literal", value: d.default };
43
43
  }
44
- function te(e) {
44
+ function ne(e) {
45
45
  return e.kind === "literal" ? e.value : `var(${e.targetCssVar})`;
46
46
  }
47
- function M(e, t, n = [t]) {
47
+ function D(e, t, n = [t]) {
48
48
  const i = e.tab === void 0 || e.tab === t.id ? t : n.find((s) => s.id === e.tab);
49
49
  if (!i)
50
50
  throw new k(
51
51
  `Cross-tab ref target tab "${e.tab}" not found. Available tabs: ${n.map((s) => s.id).join(", ")}.`
52
52
  );
53
- const u = A(i, e.tier);
53
+ const u = S(i, e.tier);
54
54
  if (!u)
55
55
  throw new k(
56
56
  `Cross-tab ref target tier "${e.tier}" not found in tab "${i.id}". Available tiers: ${i.tiers.map((s) => s.id).join(", ")}.`
@@ -62,10 +62,10 @@ function M(e, t, n = [t]) {
62
62
  );
63
63
  return d.cssVar;
64
64
  }
65
- function ne(e, t) {
65
+ function re(e, t) {
66
66
  return e.paletteCssVarTemplate.replace("{n}", String(t));
67
67
  }
68
- const D = /* @__PURE__ */ new Set([
68
+ const H = /* @__PURE__ */ new Set([
69
69
  "aliceblue",
70
70
  "antiquewhite",
71
71
  "aqua",
@@ -222,10 +222,10 @@ const D = /* @__PURE__ */ new Set([
222
222
  "revert",
223
223
  "revert-layer"
224
224
  ]);
225
- function H(e) {
226
- return e.startsWith("#") || e.includes("(") || D.has(e.toLowerCase());
225
+ function B(e) {
226
+ return e.startsWith("#") || e.includes("(") || H.has(e.toLowerCase());
227
227
  }
228
- function B(e, t, n, i) {
228
+ function L(e, t, n, i) {
229
229
  const u = [], d = e.indexOf(":");
230
230
  if (d !== -1) {
231
231
  const r = e.slice(0, d), f = e.slice(d + 1), l = t.find((o) => o.tier === r);
@@ -235,18 +235,18 @@ function B(e, t, n, i) {
235
235
  u.push({ tab: s.tab, tier: s.tier, item: e });
236
236
  for (const r of u)
237
237
  try {
238
- return M(r, n, i), { ref: r };
238
+ return D(r, n, i), { ref: r };
239
239
  } catch {
240
240
  }
241
241
  return { ref: u[0] };
242
242
  }
243
- function L(e, t, n, i, u, d) {
243
+ function F(e, t, n, i, u, d) {
244
244
  const s = t.get(e.default);
245
- return s !== void 0 ? s : e.default === "bg" || e.default === "fg" ? e.default : n && n.length > 0 && !H(e.default) ? B(e.default, n, i, u) : d ? (console.warn(
245
+ return s !== void 0 ? s : e.default === "bg" || e.default === "fg" ? e.default : n && n.length > 0 && !B(e.default) ? L(e.default, n, i, u) : d ? (console.warn(
246
246
  `[design-token-panel] semantic item "${e.id}" default "${e.default}" names no palette item; falling back to palette index 0`
247
247
  ), 0) : { literal: e.default };
248
248
  }
249
- function V(e, t = [e]) {
249
+ function _(e, t = [e]) {
250
250
  const n = e.colorExtras;
251
251
  if (!n) return;
252
252
  const i = e.tiers.find(
@@ -275,7 +275,7 @@ function V(e, t = [e]) {
275
275
  if (u) {
276
276
  const a = !u.semantic, g = n.semanticDefaults;
277
277
  for (const c of u.items)
278
- o[c.id] = c.cssVar, l[c.id] = g && c.id in g ? g[c.id] : L(
278
+ o[c.id] = c.cssVar, l[c.id] = g && c.id in g ? g[c.id] : F(
279
279
  c,
280
280
  f,
281
281
  u.referencesRamps,
@@ -298,22 +298,22 @@ function V(e, t = [e]) {
298
298
  panelSettings: n.panelSettings
299
299
  };
300
300
  }
301
- function re(e) {
301
+ function oe(e) {
302
302
  const t = e.find((n) => n.id === "color");
303
303
  if (t)
304
- return V(t, e);
304
+ return _(t, e);
305
305
  }
306
306
  function J(e) {
307
307
  const t = e.find((n) => n.id === "color-secondary");
308
- return t ? V(t, e) ?? null : null;
308
+ return t ? _(t, e) ?? null : null;
309
309
  }
310
- function S(e, t) {
310
+ function x(e, t) {
311
311
  if (Object.is(e, t)) return !0;
312
312
  if (e === null || t === null || typeof e != typeof t || typeof e != "object") return !1;
313
313
  if (Array.isArray(e)) {
314
314
  if (!Array.isArray(t) || e.length !== t.length) return !1;
315
315
  for (let d = 0; d < e.length; d++)
316
- if (!S(e[d], t[d])) return !1;
316
+ if (!x(e[d], t[d])) return !1;
317
317
  return !0;
318
318
  }
319
319
  if (Array.isArray(t)) return !1;
@@ -321,12 +321,12 @@ function S(e, t) {
321
321
  if (n.length !== i.length) return !1;
322
322
  const u = new Set(i);
323
323
  for (const d of n)
324
- if (!u.has(d) || !S(e[d], t[d]))
324
+ if (!u.has(d) || !x(e[d], t[d]))
325
325
  return !1;
326
326
  return !0;
327
327
  }
328
328
  const q = {
329
- storagePrefix: K,
329
+ storagePrefix: N,
330
330
  consoleNamespace: "zudo",
331
331
  modalClassPrefix: "zudo-design-token-panel-modal",
332
332
  schemaId: "zudo-design-tokens/v1",
@@ -337,10 +337,10 @@ const q = {
337
337
  // No bundled apply endpoint / routing — hosts wire their own.
338
338
  applyEndpoint: void 0,
339
339
  applyRouting: void 0
340
- }, R = /* @__PURE__ */ Symbol.for("@takazudo/zdtp:singleton");
340
+ }, V = /* @__PURE__ */ Symbol.for("@takazudo/zdtp:singleton");
341
341
  function m() {
342
342
  const e = globalThis;
343
- let t = e[R];
343
+ let t = e[V];
344
344
  return t || (t = {
345
345
  instances: /* @__PURE__ */ new Map(),
346
346
  defaultPrefix: null,
@@ -348,9 +348,9 @@ function m() {
348
348
  pendingPostConfigureHooks: [],
349
349
  lifecycleHooks: {},
350
350
  colorSchemeOwners: /* @__PURE__ */ new Set()
351
- }, e[R] = t), t;
351
+ }, e[V] = t), t;
352
352
  }
353
- function F(e) {
353
+ function G(e) {
354
354
  return {
355
355
  instanceId: e,
356
356
  open() {
@@ -372,7 +372,7 @@ function F(e) {
372
372
  }
373
373
  };
374
374
  }
375
- function oe(e) {
375
+ function ie(e) {
376
376
  m().lifecycleHooks = {
377
377
  configured: e.configured,
378
378
  open: e.open,
@@ -381,11 +381,11 @@ function oe(e) {
381
381
  destroy: e.destroy
382
382
  };
383
383
  }
384
- function ie(e) {
384
+ function se(e) {
385
385
  const t = m(), n = e.storagePrefix, i = t.instances.get(n);
386
386
  if (i) {
387
387
  const l = (o) => ({ ...o, applySink: void 0 });
388
- if (S(l(i.suppliedConfig), l(e)))
388
+ if (x(l(i.suppliedConfig), l(e)))
389
389
  return t.defaultPrefix = n, i.handle;
390
390
  throw new Error(
391
391
  `[design-token-panel] configurePanel() was already called with different values for storagePrefix "${n}". Configuration is one-shot per prefix per page lifecycle. To re-configure this prefix, call handle.destroy() first, then configurePanel() again. (Use a distinct storagePrefix for a second panel instance.)`
@@ -403,19 +403,19 @@ function ie(e) {
403
403
  suppliedConfig: { ...e },
404
404
  pendingColorPresets: null,
405
405
  postConfigureHooks: r,
406
- handle: F(n)
406
+ handle: G(n)
407
407
  };
408
408
  t.instances.set(n, f), t.defaultPrefix = n;
409
409
  for (const l of f.postConfigureHooks)
410
410
  l();
411
411
  return t.lifecycleHooks.configured?.(n), f.handle;
412
412
  }
413
- function x() {
413
+ function j() {
414
414
  const e = m();
415
415
  return e.defaultPrefix === null ? null : e.instances.get(e.defaultPrefix) ?? null;
416
416
  }
417
- function se(e) {
418
- const t = x();
417
+ function ae(e) {
418
+ const t = j();
419
419
  if (t === null) {
420
420
  const n = m();
421
421
  if (n.pendingPostConfigureHooks.includes(e)) return;
@@ -424,109 +424,112 @@ function se(e) {
424
424
  }
425
425
  t.postConfigureHooks.includes(e) || (t.postConfigureHooks.push(e), e());
426
426
  }
427
- function j() {
428
- return x()?.config ?? q;
427
+ function T() {
428
+ return j()?.config ?? q;
429
429
  }
430
- function ae() {
430
+ function le() {
431
431
  return [...m().instances.values()].map((e) => e.config);
432
432
  }
433
- function le(e) {
433
+ function fe(e) {
434
434
  return m().instances.get(e)?.config ?? null;
435
435
  }
436
- function fe() {
436
+ function ce() {
437
437
  const e = m();
438
- e.instances.clear(), e.defaultPrefix = null, e.pendingColorPresets = null, e.pendingPostConfigureHooks.length = 0, E().clear();
438
+ e.instances.clear(), e.defaultPrefix = null, e.pendingColorPresets = null, e.pendingPostConfigureHooks.length = 0, A().clear();
439
439
  }
440
- function E() {
440
+ function A() {
441
441
  const e = m();
442
442
  return e.colorSchemeOwners || (e.colorSchemeOwners = /* @__PURE__ */ new Set()), e.colorSchemeOwners;
443
443
  }
444
- function ce(e) {
445
- E().add(e);
446
- }
447
444
  function ge(e) {
448
- E().delete(e);
445
+ A().add(e);
449
446
  }
450
447
  function de(e) {
451
- return E().has(e);
448
+ A().delete(e);
452
449
  }
453
- function ue(e = j()) {
454
- return J(e.tabs);
450
+ function ue(e) {
451
+ return A().has(e);
455
452
  }
456
- function pe(e) {
457
- return `${e.storagePrefix}-state-v2`;
453
+ function pe(e = T()) {
454
+ return J(e.tabs);
458
455
  }
459
456
  function ye(e) {
460
- return `${e.storagePrefix}-state-v3`;
457
+ return e.storagePrefix + v.v2;
461
458
  }
462
459
  function me(e) {
463
- return `${e.storagePrefix}-state-v4`;
460
+ return e.storagePrefix + v.v3;
464
461
  }
465
462
  function he(e) {
466
- return `${e.storagePrefix}-state`;
463
+ return e.storagePrefix + v.v4;
467
464
  }
468
465
  function we(e) {
469
- return `${e.storagePrefix}-open`;
466
+ return e.storagePrefix + v.v1;
470
467
  }
471
468
  function be(e) {
472
- return `${e.storagePrefix}-position`;
469
+ return `${e.storagePrefix}-spawn-ordinal`;
473
470
  }
474
471
  function ke(e) {
475
- return `${e.storagePrefix}-size`;
472
+ return `${e.storagePrefix}-open`;
476
473
  }
477
474
  function $e(e) {
478
- return `${e.storagePrefix}-dock`;
475
+ return `${e.storagePrefix}-position`;
479
476
  }
480
477
  function Ce(e) {
481
- return `${e.storagePrefix}-dock-size`;
478
+ return `${e.storagePrefix}-size`;
482
479
  }
483
480
  function Pe(e) {
484
- return `${e.storagePrefix}-density`;
481
+ return `${e.storagePrefix}-dock`;
482
+ }
483
+ function Ee(e) {
484
+ return `${e.storagePrefix}-dock-size`;
485
485
  }
486
486
  function ve(e) {
487
+ return `${e.storagePrefix}-density`;
488
+ }
489
+ function Ae(e) {
487
490
  return `${e.storagePrefix}-specimen`;
488
491
  }
489
- function Ee(e, t) {
492
+ function Se(e, t) {
490
493
  return `${e.storagePrefix}-snapshot-${t}`;
491
494
  }
492
- function Ae(e) {
495
+ function xe(e) {
493
496
  return `${e.storagePrefix}-last-applied`;
494
497
  }
495
- function Se(e) {
498
+ function je(e) {
496
499
  return `${e.storagePrefix}:visible`;
497
500
  }
498
- function xe(e) {
501
+ function Te(e) {
499
502
  return `${e.storagePrefix}:autoload`;
500
503
  }
501
- function je(e) {
504
+ function Oe(e) {
502
505
  return `${e.storagePrefix}-root`;
503
506
  }
504
- function Te(e) {
505
- return N(e);
507
+ function Re(e) {
508
+ return M(e);
506
509
  }
507
- const G = "__zdtp:open-state-changed";
508
- function Oe(e) {
509
- return `${G}:${e.storagePrefix}`;
510
+ const U = "__zdtp:open-state-changed";
511
+ function Ve(e) {
512
+ return `${U}:${e.storagePrefix}`;
510
513
  }
511
- function Re(e, t) {
514
+ function _e(e, t) {
512
515
  return `${e.modalClassPrefix}${t}`;
513
516
  }
514
- function Ve(e) {
517
+ function Ke(e) {
515
518
  return `${e.exportFilenameBase}.json`;
516
519
  }
517
- const _ = /* @__PURE__ */ Symbol.for("@takazudo/zdtp:global-alias-marker");
520
+ const K = /* @__PURE__ */ Symbol.for("@takazudo/zdtp:global-alias-marker");
518
521
  function z(e) {
519
522
  return typeof e == "object" && e !== null || typeof e == "function";
520
523
  }
521
- function U(e) {
524
+ function W(e) {
522
525
  if (!z(e)) return !1;
523
526
  try {
524
- return e[_] === !0;
527
+ return e[K] === !0;
525
528
  } catch {
526
529
  return !1;
527
530
  }
528
531
  }
529
- function W(e) {
532
+ function Y(e) {
530
533
  if (!z(e)) return !1;
531
534
  try {
532
535
  const t = e;
@@ -535,11 +538,11 @@ function W(e) {
535
538
  return !1;
536
539
  }
537
540
  }
538
- function _e(e) {
541
+ function ze(e) {
539
542
  if (typeof window > "u") return;
540
543
  const t = window, n = t.zdtp;
541
544
  if (n !== void 0) {
542
- if (U(n) || W(n))
545
+ if (W(n) || Y(n))
543
546
  return;
544
547
  console.warn(
545
548
  "[design-token-panel] window.zdtp already exists and was not installed by this package. Skipping the zdtp.show() / zdtp.hide() / zdtp.toggle() global alias to avoid clobbering it. Use window[consoleNamespace].* or the configurePanel(cfg) handle instead."
@@ -547,9 +550,9 @@ function _e(e) {
547
550
  return;
548
551
  }
549
552
  const i = { ...e };
550
- i[_] = !0, t.zdtp = i;
553
+ i[K] = !0, t.zdtp = i;
551
554
  }
552
- function ze(e) {
555
+ function Ne(e) {
553
556
  if (e === null || typeof e != "object" || Array.isArray(e))
554
557
  throw new Error("[design-token-panel] PanelConfig must be a non-null object");
555
558
  const t = e;
@@ -641,10 +644,10 @@ function Z(e) {
641
644
  throw new Error(
642
645
  `[design-token-panel] PanelConfig.tabs: duplicate tab id "${i.id}"`
643
646
  );
644
- t.add(i.id), X(i.id, i, e);
647
+ t.add(i.id), Q(i.id, i, e);
645
648
  }
646
649
  }
647
- function Y(e) {
650
+ function X(e) {
648
651
  if (typeof e == "number" || e === "bg" || e === "fg") return !0;
649
652
  if (e === null || typeof e != "object" || Array.isArray(e)) return !1;
650
653
  const t = e;
@@ -663,7 +666,7 @@ function Y(e) {
663
666
  }
664
667
  return !1;
665
668
  }
666
- function X(e, t, n) {
669
+ function Q(e, t, n) {
667
670
  if (!Array.isArray(t.tiers))
668
671
  throw new Error(
669
672
  `[design-token-panel] PanelConfig.tabs["${e}"].tiers must be an array`
@@ -860,27 +863,27 @@ function X(e, t, n) {
860
863
  }
861
864
  h = b;
862
865
  }
863
- const C = Array.isArray(h.tiers) ? h.tiers : [], T = [];
866
+ const C = Array.isArray(h.tiers) ? h.tiers : [], O = [];
864
867
  let P;
865
868
  for (const b of C) {
866
869
  if (b === null || typeof b != "object" || Array.isArray(b)) continue;
867
870
  const y = b;
868
- typeof y.id == "string" && (T.push(y.id), y.id === c.tier && (P = y));
871
+ typeof y.id == "string" && (O.push(y.id), y.id === c.tier && (P = y));
869
872
  }
870
873
  if (!P)
871
874
  throw new Error(
872
- `[design-token-panel] PanelConfig.tabs["${e}"].tiers["${f}"].referencesRamps[${a}]: tier "${c.tier}" does not exist in tab "${p}". Available tiers: ${T.join(", ")}.`
875
+ `[design-token-panel] PanelConfig.tabs["${e}"].tiers["${f}"].referencesRamps[${a}]: tier "${c.tier}" does not exist in tab "${p}". Available tiers: ${O.join(", ")}.`
873
876
  );
874
877
  if (l !== void 0) {
875
878
  const b = Array.isArray(P.items) ? P.items : [];
876
879
  let y;
877
880
  for (const w of b) {
878
881
  if (w === null || typeof w != "object" || Array.isArray(w)) continue;
879
- const v = w.type;
880
- if (v === null || typeof v != "object" || Array.isArray(v)) continue;
881
- const O = v.kind;
882
- if (typeof O == "string") {
883
- y = O;
882
+ const E = w.type;
883
+ if (E === null || typeof E != "object" || Array.isArray(E)) continue;
884
+ const R = E.kind;
885
+ if (typeof R == "string") {
886
+ y = R;
884
887
  break;
885
888
  }
886
889
  }
@@ -939,7 +942,7 @@ function X(e, t, n) {
939
942
  );
940
943
  const o = s.semanticDefaults;
941
944
  for (const [a, g] of Object.entries(o))
942
- if (!Y(g))
945
+ if (!X(g))
943
946
  throw new Error(
944
947
  `[design-token-panel] PanelConfig.tabs["${e}"].colorExtras.semanticDefaults["${a}"] must be a valid SemanticValue (number | 'bg' | 'fg' | { literal: string } | { literal: { light, dark } } | { ref: { tier, item, tab? } }), got ${JSON.stringify(g)}`
945
948
  );
@@ -996,14 +999,14 @@ function X(e, t, n) {
996
999
  `[design-token-panel] PanelConfig.tabs["${e}"].notesExtras must only be set on a tab with id "notes"`
997
1000
  );
998
1001
  }
999
- function Q(e = j()) {
1002
+ function I(e = T()) {
1000
1003
  return e.applyRouting ?? {};
1001
1004
  }
1002
- function Ke(e = j()) {
1003
- return !!e.applyEndpoint && Object.keys(Q(e)).length > 0;
1005
+ function Me(e = T()) {
1006
+ return !!e.applyEndpoint && Object.keys(I(e)).length > 0;
1004
1007
  }
1005
- function Ne(e) {
1006
- const t = x();
1008
+ function De(e) {
1009
+ const t = j();
1007
1010
  if (t === null) {
1008
1011
  m().pendingColorPresets = e;
1009
1012
  return;
@@ -1011,47 +1014,48 @@ function Ne(e) {
1011
1014
  t.config = { ...t.config, colorPresets: e };
1012
1015
  }
1013
1016
  export {
1014
- M as A,
1015
- V as B,
1016
- S as C,
1017
- Ve as D,
1018
- Q as E,
1019
- Ke as F,
1020
- Ae as G,
1021
- Ee as H,
1022
- ve as I,
1023
- Oe as J,
1024
- oe as K,
1025
- se as L,
1026
- Te as M,
1027
- ae as N,
1028
- le as O,
1029
- je as P,
1030
- fe as _,
1031
- Se as a,
1032
- ze as b,
1033
- ie as c,
1034
- we as d,
1035
- be as e,
1036
- he as f,
1037
- j as g,
1038
- pe as h,
1039
- _e as i,
1040
- xe as j,
1041
- me as k,
1042
- ye as l,
1043
- Re as m,
1044
- ge as n,
1045
- ue as o,
1046
- ee as p,
1047
- te as q,
1048
- re as r,
1049
- Ne as s,
1050
- ke as t,
1051
- Pe as u,
1052
- Ce as v,
1053
- $e as w,
1054
- ne as x,
1055
- ce as y,
1056
- de as z
1017
+ D as A,
1018
+ _ as B,
1019
+ x as C,
1020
+ Ke as D,
1021
+ I as E,
1022
+ Me as F,
1023
+ xe as G,
1024
+ Se as H,
1025
+ Ae as I,
1026
+ Ve as J,
1027
+ ie as K,
1028
+ ae as L,
1029
+ Re as M,
1030
+ le as N,
1031
+ fe as O,
1032
+ Oe as P,
1033
+ be as Q,
1034
+ ce as _,
1035
+ je as a,
1036
+ Ne as b,
1037
+ se as c,
1038
+ ke as d,
1039
+ $e as e,
1040
+ we as f,
1041
+ T as g,
1042
+ ye as h,
1043
+ ze as i,
1044
+ Te as j,
1045
+ he as k,
1046
+ me as l,
1047
+ _e as m,
1048
+ de as n,
1049
+ pe as o,
1050
+ te as p,
1051
+ ne as q,
1052
+ oe as r,
1053
+ De as s,
1054
+ Ce as t,
1055
+ ve as u,
1056
+ Ee as v,
1057
+ Pe as w,
1058
+ re as x,
1059
+ ge as y,
1060
+ ue as z
1057
1061
  };
@@ -18,6 +18,6 @@ export interface GenericItemEditorProps {
18
18
  /** Called with (itemId, newValue). */
19
19
  onChange: (itemId: string, next: string) => void;
20
20
  }
21
- declare function GenericItemEditorInner({ item, value, onChange }: GenericItemEditorProps): import("preact").JSX.Element | null;
22
- declare const _default: typeof GenericItemEditorInner;
21
+ declare function GenericItemEditor(props: GenericItemEditorProps): import("preact").JSX.Element;
22
+ declare const _default: typeof GenericItemEditor;
23
23
  export default _default;
@@ -7,6 +7,8 @@ export interface TokenRowProps {
7
7
  onChange: (address: TokenAddress, next: string) => void;
8
8
  onDelete: (address: TokenAddress) => void;
9
9
  }
10
- declare function TokenRow({ entry, overrides, contributions, onChange, onDelete, }: TokenRowProps): import("preact").JSX.Element | null;
10
+ /** The grid allocates this box; the row inside may query it without
11
+ * containing an intrinsically sized editor or nesting pill containers. */
12
+ declare function TokenRow(props: TokenRowProps): import("preact").JSX.Element;
11
13
  declare const _default: typeof TokenRow;
12
14
  export default _default;