@takazudo/zdtp 0.5.2 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/PORTABLE-CONTRACT.md +120 -0
  3. package/README.md +82 -0
  4. package/dist/apply/build-apply-overrides.d.ts +2 -2
  5. package/dist/apply/last-applied.d.ts +1 -1
  6. package/dist/apply/reconcile-applied.d.ts +2 -2
  7. package/dist/apply/route-tokens-to-files.d.ts +1 -1
  8. package/dist/apply/tier-resolver.d.ts +1 -1
  9. package/dist/apply-modal.d.ts +2 -2
  10. package/dist/astro/host-adapter.js +3 -3
  11. package/dist/astro/index.d.ts +8 -8
  12. package/dist/astro/index.js +1 -1
  13. package/dist/{autoload-state-BI4-9A58.js → autoload-state-CGnis85c.js} +1 -1
  14. package/dist/bulk/bulk-actions.d.ts +3 -3
  15. package/dist/bulk/index.d.ts +2 -2
  16. package/dist/chain/index.d.ts +2 -2
  17. package/dist/chain/token-chain-context.d.ts +3 -3
  18. package/dist/chain/token-chain-popover.d.ts +2 -2
  19. package/dist/changed/contribution.d.ts +5 -5
  20. package/dist/changed/footer-content.d.ts +4 -4
  21. package/dist/changed/index.d.ts +4 -4
  22. package/dist/components/color-picker/color-field.d.ts +1 -1
  23. package/dist/components/color-picker/index.d.ts +2 -2
  24. package/dist/components/palette-chart/index.d.ts +2 -2
  25. package/dist/components/palette-chart/palette-chart.d.ts +4 -4
  26. package/dist/config/cluster-config.d.ts +4 -4
  27. package/dist/config/color-scheme-utils.d.ts +1 -1
  28. package/dist/config/panel-config.d.ts +5 -5
  29. package/dist/controls/tier-ref-selector.d.ts +1 -1
  30. package/dist/dashboard/index.d.ts +4 -0
  31. package/dist/dashboard/index.js +407 -0
  32. package/dist/dashboard/model.d.ts +7 -0
  33. package/dist/dashboard/styles.css +294 -0
  34. package/dist/dashboard/token-dashboard.d.ts +23 -0
  35. package/dist/dashboard/types.d.ts +62 -0
  36. package/dist/dom-tweaker/dom-tweaker-diff-action-link.d.ts +1 -1
  37. package/dist/dom-tweaker/dom-tweaker-orchestrator.d.ts +1 -1
  38. package/dist/dom-tweaker/dom-tweaker-state.d.ts +1 -1
  39. package/dist/dom-tweaker/lazy/class-editor-popup.d.ts +1 -1
  40. package/dist/dom-tweaker/lazy/diff-export-modal.d.ts +1 -1
  41. package/dist/dom-tweaker/lazy/index.d.ts +2 -2
  42. package/dist/element-inspect/element-inspect-context.d.ts +1 -1
  43. package/dist/element-inspect/element-inspect-orchestrator.d.ts +3 -3
  44. package/dist/element-inspect/element-inspect-overlay.d.ts +1 -1
  45. package/dist/element-inspect/find-tokens-for-element.d.ts +1 -1
  46. package/dist/element-inspect/index.d.ts +8 -8
  47. package/dist/element-path/element-path-state.d.ts +1 -1
  48. package/dist/element-path/index.d.ts +7 -7
  49. package/dist/export-modal.d.ts +2 -2
  50. package/dist/highlight/highlight-orchestrator.d.ts +2 -2
  51. package/dist/highlight/highlight-state.d.ts +1 -1
  52. package/dist/highlight/highlight-toggle-button.d.ts +2 -2
  53. package/dist/history/buttons.d.ts +1 -1
  54. package/dist/history/index.d.ts +3 -3
  55. package/dist/history/rail.d.ts +2 -2
  56. package/dist/history/snapshots.d.ts +2 -2
  57. package/dist/import-modal.d.ts +2 -2
  58. package/dist/{index-ChsJ5u4d.js → index-DWs1XPfy.js} +993 -993
  59. package/dist/{index-CAQf4HKm.js → index-LYsbHWcy.js} +2 -2
  60. package/dist/index.d.ts +14 -14
  61. package/dist/index.js +14 -13
  62. package/dist/{panel-config-CqbuB0nh.js → panel-config-Crn5QJGy.js} +243 -208
  63. package/dist/panel.d.ts +2 -2
  64. package/dist/picker/index.d.ts +4 -4
  65. package/dist/search/command-palette.d.ts +3 -3
  66. package/dist/search/contribution.d.ts +1 -1
  67. package/dist/search/index.d.ts +4 -4
  68. package/dist/search/match-bar.d.ts +1 -1
  69. package/dist/search/token-search.d.ts +3 -3
  70. package/dist/server/create-apply-handler.d.ts +2 -2
  71. package/dist/server/index.d.ts +6 -6
  72. package/dist/shell/dock-mode-switch.d.ts +1 -1
  73. package/dist/shell/regions.d.ts +1 -1
  74. package/dist/shell/tab-bar.d.ts +1 -1
  75. package/dist/shell/tab-overflow-popover.d.ts +1 -1
  76. package/dist/specimen/on-page-specimen.d.ts +3 -3
  77. package/dist/specimen/preview-glyphs.d.ts +1 -1
  78. package/dist/specimen/specimen-state.d.ts +1 -1
  79. package/dist/specimen/specimen-tab-body.d.ts +5 -5
  80. package/dist/specimen/specimen-toolbar.d.ts +1 -1
  81. package/dist/specimen/specimen-values.d.ts +1 -1
  82. package/dist/state/autoload-state.d.ts +1 -1
  83. package/dist/state/history.d.ts +1 -1
  84. package/dist/state/persist.d.ts +3 -3
  85. package/dist/state/transaction.d.ts +3 -3
  86. package/dist/state/tweak-state.d.ts +12 -12
  87. package/dist/tabs/_generic-item-editor.d.ts +1 -1
  88. package/dist/tabs/color-tab.d.ts +6 -6
  89. package/dist/tabs/flat/flat-tab.d.ts +5 -5
  90. package/dist/tabs/flat/index.d.ts +8 -8
  91. package/dist/tabs/flat/scroll-to-token-row.d.ts +1 -1
  92. package/dist/tabs/flat/tier-section.d.ts +3 -3
  93. package/dist/tabs/flat/token-controller.d.ts +1 -1
  94. package/dist/tabs/flat/token-row.d.ts +2 -2
  95. package/dist/tabs/flat/types.d.ts +1 -1
  96. package/dist/tabs/font-tab.d.ts +6 -6
  97. package/dist/tabs/generic-tab.d.ts +4 -4
  98. package/dist/tabs/notes-tab.d.ts +1 -1
  99. package/dist/tabs/palette/palette-check-view.d.ts +3 -3
  100. package/dist/tabs/palette/palette-edit-view.d.ts +3 -3
  101. package/dist/tabs/palette/palette-readout.d.ts +1 -1
  102. package/dist/tabs/palette/palette-tab.d.ts +3 -3
  103. package/dist/tabs/size-tab.d.ts +5 -5
  104. package/dist/tabs/spacing-tab.d.ts +5 -5
  105. package/dist/testing.d.ts +6 -6
  106. package/dist/testing.js +16 -15
  107. package/dist/tokens/tier-model.d.ts +2 -2
  108. package/dist/{tweak-state-c53KtLHq.js → tweak-state-Dzr5kDhX.js} +210 -207
  109. package/dist/utils/color-oklch.d.ts +2 -2
  110. package/dist/utils/design-token-serde.d.ts +2 -2
  111. package/dist/utils/token-diff.d.ts +3 -3
  112. package/dist/utils/token-graph.d.ts +4 -4
  113. package/dist/utils/token-index.d.ts +2 -2
  114. package/package.json +11 -4
package/CHANGELOG.md CHANGED
@@ -4,6 +4,56 @@ All notable changes to `@takazudo/zdtp` are documented in this file.
4
4
 
5
5
  The format is based on Keep a Changelog, and release notes are generated from the changelog MDX pages.
6
6
 
7
+ ## [0.6.1] - 2026-09-08
8
+
9
+ ### Features
10
+
11
+ - feat: model declared token defaults for static dashboards (422643b)
12
+ - feat: expose a static Preact token dashboard (5b6c0f8)
13
+ - feat(playground): add static token dashboard demo and docs (2edd98b)
14
+ - feat(dashboard): render rulers, palette strips and wide type specimens (7cdf01f)
15
+
16
+ ### Fixed
17
+
18
+ - fix: preserve semantic literals alongside legacy palette references (b813c8a)
19
+
20
+ ### Other Changes
21
+
22
+ - test: account for standalone dashboard stylesheet delivery (a00541a)
23
+ - test: verify packed dashboard SSR and public stylesheet consumption (6cd8157)
24
+ - test: cover static dashboard list-view geometry in browser (e07d69e)
25
+ - chore: normalize dashboard browser test file mode (0ec8217)
26
+ - docs: demonstrate dashboard rulers ramps and reading specimens (859d3a4)
27
+ - test: verify packed dashboard list views and preview text (7ebf4cf)
28
+ - test: prove isolated dashboard package consumption (fdb3906)
29
+ - fix(test): compare Preact package identity across module conditions (bb280ee)
30
+ - Fix static browser harness loading and polling (3fe6203)
31
+
32
+ ## [0.6.0] - 2026-09-08
33
+
34
+ ### Breaking Changes
35
+
36
+ - fix: validate reserved palette tab configuration (73e70f9). The reserved `palette` tab now rejects `colorExtras`, empty or non-color tiers, and inconsistent CSS-variable families. This also affects Astro host configuration validation. **Migration**: remove `colorExtras` from the `palette` tab; give each tier non-empty color items using either consecutive numbered CSS variables with one prefix or unique named variables with one prefix. Move mixed-kind generic tiers to a differently named tab and update any `referencesRamps` tab references.
37
+
38
+ ### Features
39
+
40
+ - feat(minimal): teach grouped palette and semantic colors (5dcbe12)
41
+ - feat(playground): use grouped OKLCH palette and semantic colors (42c7c86)
42
+
43
+ ### Fixed
44
+
45
+ - fix: preserve host color-scheme on per-mode apply (90c30c6)
46
+ - fix: render specimen fonts from instance values (7d18952)
47
+ - fix: normalize emitted declaration module specifiers (8f858c0)
48
+ - fix: expose panel config validator through public entrypoints (5335713)
49
+
50
+ ### Other Changes
51
+
52
+ - docs: explain grouped palettes and per-mode semantic colors (3d1d114)
53
+ - Restructure playground colors into grouped semantic ramps (2076abe)
54
+ - test: verify specimen instance isolation in Chromium (6ff7ed6)
55
+ - test: guard packed declarations across TypeScript resolution modes (f1e5e21)
56
+
7
57
  ## [0.5.2] - 2026-09-08
8
58
 
9
59
  ### Features
@@ -191,6 +191,24 @@ export function setPanelColorPresets(presets: Record<string, ColorScheme>): void
191
191
  export function assertValidPanelConfig(value: unknown): asserts value is PanelConfig;
192
192
  ```
193
193
 
194
+ `assertValidPanelConfig` and its `PanelConfig` type are public exports from both
195
+ `@takazudo/zdtp` and `@takazudo/zdtp/testing`; no deep import is needed.
196
+ Run the assertion against your host config in a CI test, for example:
197
+
198
+ ```ts
199
+ import { assertValidPanelConfig } from '@takazudo/zdtp/testing';
200
+ import { panelConfig } from './panel-config';
201
+
202
+ // An invalid manifest throws and fails the test/CI run.
203
+ assertValidPanelConfig(panelConfig);
204
+ ```
205
+
206
+ The assertion accepts `unknown` and narrows it to `PanelConfig` on success.
207
+ Validation is explicit: `configurePanel` does not call this assertion. A host
208
+ that wants configure-time validation can import both functions from
209
+ `@takazudo/zdtp` and call `assertValidPanelConfig(config)` before
210
+ `configurePanel(config)`.
211
+
194
212
  Required behaviours:
195
213
 
196
214
  - **Multi-instance.** Calling `configurePanel` with a **distinct**
@@ -1723,6 +1741,107 @@ on across a release bump.
1723
1741
 
1724
1742
  ---
1725
1743
 
1744
+ ## 12. Static token dashboard
1745
+
1746
+ This entry is available from v0.6.1. It does
1747
+ not change the `configurePanel` or persistence contracts above.
1748
+
1749
+ `@takazudo/zdtp/dashboard` exports the Preact `TokenDashboard` component and
1750
+ `TokenDashboardProps`, `DashboardMode`, `DashboardPreviewKind`, `TabConfig`,
1751
+ `TierConfig`, and `TierItem` types. The internal value model is not a public API.
1752
+
1753
+ ```ts
1754
+ export type DashboardMode = 'light' | 'dark';
1755
+ export type DashboardPreviewKind =
1756
+ | 'bar' | 'size' | 'line-height' | 'family' | 'weight' | 'radius' | 'duration'
1757
+ | 'color' | 'shadow' | 'text';
1758
+
1759
+ export interface TokenDashboardProps {
1760
+ tabs: readonly TabConfig[];
1761
+ mode?: DashboardMode; // default: light
1762
+ title?: string; // default: Token dashboard
1763
+ previewText?: string; // static typography passage; default English/Japanese prose
1764
+ id?: string; // optional root ID; caller owns uniqueness
1765
+ previewOverrides?: Readonly<Record<string, DashboardPreviewKind>>;
1766
+ }
1767
+ ```
1768
+
1769
+ ### Rendering and package boundary
1770
+
1771
+ - Ordinary Preact rendering and server rendering are supported. The component
1772
+ has no browser-global, panel-runtime, persistence, host-adapter, bin-server,
1773
+ or browser Tailwind compiler dependency. No hydration is required.
1774
+ - `@takazudo/zdtp/dashboard/styles.css` is a separate public asset. Dashboard
1775
+ JavaScript has no CSS side-effect import; the host must include this asset
1776
+ through its CSS build or a static stylesheet link. It is not appended to the
1777
+ existing panel stylesheet, which is unnecessary for a dashboard-only page.
1778
+ - Each instance declares known token variables inside its inventory and sets
1779
+ `color-scheme` to its explicit `mode`. It never writes to `:root` or host
1780
+ state. Dashboard chrome styles are independent of inventory variables.
1781
+ - Tabs, tiers, and rows render in input order. All token rows remain visible;
1782
+ no collapsed sections or automatic IDs are introduced. Empty input is valid.
1783
+ Notes-only tabs are omitted, and arbitrary notes HTML is never injected.
1784
+
1785
+ ### Layouts for spacing, color, and typography
1786
+
1787
+ Spacing (`bar`) uses wide rows with aligned ruler origins. Nonnegative `px` or
1788
+ `rem` lengths, unitless zero, and resolved direct local aliases get an actual-size
1789
+ sample. Ticks mark 8 CSS px, with major ticks every 64 CSS px. The browser sizes
1790
+ `rem` against the host root font size; the dashboard does not assume a conversion.
1791
+ Large lengths scroll inside the focusable ruler instead of shrinking or clamping.
1792
+ Zero has zero width. Negative lengths, `em`, percentages, `calc()` and other
1793
+ unsupported expressions retain their declaration with a ruler-unavailable
1794
+ explanation. Missing references also retain their diagnostics.
1795
+
1796
+ A nonsemantic, non-reference tier whose source items are all colors becomes a
1797
+ discrete palette strip. Stops stay in declared order, with every label and value
1798
+ visible; narrow containers scroll horizontally. Grouping uses tier structure,
1799
+ not name matching or generated intermediate colors. Semantic and reference tiers
1800
+ keep independent color samples. Per-variable preview overrides remain authoritative
1801
+ and retain each token's slot and order, including mixed overrides within a strip.
1802
+
1803
+ `size`, `family`, `weight`, and `line-height` use wide, multiline specimens with
1804
+ auto height outside palette strips. Overrides inside a palette retain their stop slot. The baseline is 18px text with 1.6 line height; each sample changes
1805
+ only its intended property. A resolved `previewBase` can supply the font size of
1806
+ a line-height sample. Font families use locally available fonts and their CSS
1807
+ fallbacks; the dashboard does not download fonts.
1808
+
1809
+ `previewText` supplies one static passage for all typography samples in an
1810
+ instance. Its default is longer English/Japanese prose. Newlines and white space
1811
+ are preserved, text is escaped, and an explicit empty string stays empty.
1812
+ Long text wraps; unusually large glyphs can scroll locally without scaling.
1813
+ There is no built-in editable text workbench or connection to panel state.
1814
+
1815
+ ### Values and previews
1816
+
1817
+ - Inputs describe **declared defaults**: item defaults, selected-mode
1818
+ `colorExtras.semanticDefaults`, and explicit `colorExtras.baseDefaults` for
1819
+ base-role rows. Named presets, panel initialization, and saved/current panel
1820
+ state are not applied. Pill rows preserve `item.default`, not `customDefault`.
1821
+ - Reference tiers, cross-tab ramps, aliases, and legacy palette indices resolve
1822
+ against actual declared IDs and `cssVar` names. Rows retain declared values
1823
+ and display CSS/reference text. Missing/ambiguous mappings, duplicate
1824
+ variables, cycles, and unsafe declarations remain visible with diagnostics
1825
+ and no misleading sample.
1826
+ - CSS expressions remain expressions. Resolution is not universal CSS grammar
1827
+ validation or browser computed-style inspection. External dependencies may
1828
+ be context-dependent; unresolved dependencies suppress samples and expose
1829
+ diagnostics. Browser layout, units, and available fonts affect previews.
1830
+ - Preview choice is `previewOverrides[cssVar]`, then `TierConfig.preview`, then
1831
+ color for color-editor rows or text for other rows. `duration` and `text`
1832
+ display values without animated/visual samples. A resolved `previewBase`
1833
+ token can supply font size for a line-height sample. Subsets must include
1834
+ referenced tiers to retain resolved samples.
1835
+ - Preact escapes text. URL/mask assets and unsafe resource-bearing expressions
1836
+ are not automatically loaded through samples.
1837
+
1838
+ Keep shared token definitions in a build-safe data module using type-only
1839
+ imports. Pass the same tabs to `PanelConfig` and `TokenDashboard`; no automatic
1840
+ state synchronization follows from sharing them. A React adapter and an
1841
+ HTML-export function or CLI are outside this checkpoint.
1842
+
1843
+ ---
1844
+
1726
1845
  ## Appendix A — section index
1727
1846
 
1728
1847
  Cross-reference table — what each section pins down.
@@ -1754,6 +1873,7 @@ Cross-reference table — what each section pins down.
1754
1873
  | `data-zdtp-action` stable header-action hook (ids stable, labels not; two matches while the compact popover is open) | §7.6 |
1755
1874
  | v4 envelope precedence, v1/v2/v3 storage migration, and typography-id rename map | §2, §8.3, §8.4 |
1756
1875
  | JSON export/import schemas v1/v2/v3 (serde) | §9 |
1876
+ | Static Preact dashboard props, defaults, previews, isolation, and CSS export | §12 |
1757
1877
  | Out-of-scope / deferred concerns | §10 |
1758
1878
  | Versioning promise, breaking-change signalling, and consumer guidance for mirroring the eager-load gate registries | §11 |
1759
1879
  | Feature walkthrough and shortcut table | [Panel UX tour](/docs/recipes/panel-ux-tour) |
package/README.md CHANGED
@@ -32,12 +32,94 @@ The authoritative API spec is [`PORTABLE-CONTRACT.md`](./PORTABLE-CONTRACT.md).
32
32
  partial reconciliation, and JSON export/import when disk apply is not
33
33
  configured.
34
34
  - Owner autoload for developer-only loading across page visits.
35
+ - A separate Preact `TokenDashboard` for a static, read-only token inventory
36
+ (available from v0.6.1).
35
37
 
36
38
  See the [Panel UX tour](/docs/recipes/panel-ux-tour) for a feature-by-feature
37
39
  walkthrough and the shortcut table.
38
40
 
39
41
  ---
40
42
 
43
+ ## Static token dashboard
44
+
45
+ Import `TokenDashboard` from `@takazudo/zdtp/dashboard` to render the same tab
46
+ manifest on a plain page. This entry is available from v0.6.1. The [live workspace demo](https://zdtp-playground.zudolab.dev/dashboard/)
47
+ shows both modes and a compact embedded instance.
48
+
49
+ ```tsx
50
+ import { TokenDashboard } from '@takazudo/zdtp/dashboard';
51
+ import { tokenTabs } from './token-tabs'; // Shared data module; type-only imports.
52
+
53
+ export default function TokenPage() {
54
+ return <TokenDashboard tabs={tokenTabs} mode="light" title="Site tokens" />;
55
+ }
56
+ ```
57
+
58
+ For example, keep the definitions in a module that is safe to import at build time:
59
+
60
+ ```ts
61
+ // token-tabs.ts — data only; safe to import during a site build.
62
+ import type { TabConfig } from '@takazudo/zdtp/dashboard';
63
+
64
+ export const tokenTabs: readonly TabConfig[] = [{
65
+ id: 'space',
66
+ label: 'Spacing',
67
+ tiers: [{
68
+ id: 'scale',
69
+ label: 'Scale',
70
+ preview: 'bar',
71
+ items: [{
72
+ id: 'space-md',
73
+ cssVar: '--site-space-md',
74
+ label: 'Medium',
75
+ default: '1rem',
76
+ type: { kind: 'length', step: 0.25, unit: 'rem' },
77
+ }],
78
+ }],
79
+ }];
80
+ ```
81
+
82
+ Also pass `tokenTabs` as `tabs` in your panel's config. Keep panel initialization
83
+ and browser/storage code out of this data module.
84
+ The component requires Preact and can render during the host's static build
85
+ without hydration; no panel initialization is needed.
86
+
87
+ Include **`@takazudo/zdtp/dashboard/styles.css`** separately. The dashboard JS
88
+ does not import CSS and does not need the panel stylesheet. A CSS-emitting
89
+ bundler can import this asset from its layout; strict static hosts should use
90
+ a supported global CSS `@import` or copy the resolved public export to their
91
+ public assets directory and add a stylesheet link. The
92
+ [static dashboard recipe](https://zdtp.zudolab.dev/docs/recipes/static-token-dashboard/)
93
+ provides complete data and CSS-copy examples.
94
+
95
+ Optional props are `mode` (`light` by default), `title`, caller-owned unique
96
+ `id`, `previewText`, and `previewOverrides` keyed by CSS variable (for example,
97
+ a text-editor shadow can use `'shadow'`). Existing `TierConfig.preview` metadata is reused.
98
+
99
+ Spacing uses actual-size rulers with local scrolling. Nonnegative px/rem, zero,
100
+ and resolved direct aliases are supported; other lengths keep a readable fallback.
101
+ Color-only nonsemantic, non-reference tiers form discrete strips in source order.
102
+ Typography uses wide multiline specimens; `previewText` supplies your static
103
+ passage (default: English/Japanese prose; an explicit empty string stays empty).
104
+ The baseline is 18px/1.6, with only the intended property changed and resolved
105
+ `previewBase` honored for line-height. Fonts use local availability and CSS
106
+ fallbacks. There is no editable text workbench.
107
+
108
+ The inventory uses **declared defaults**: item defaults, per-mode
109
+ `semanticDefaults`, and explicit base-role `baseDefaults`. It does not apply
110
+ named color presets, panel initialization, or persisted edits. CSS expressions
111
+ remain expressions; samples depend on browser layout and available fonts.
112
+ Missing/context-dependent references and invalid declarations remain readable
113
+ with diagnostics rather than misleading samples. Preview variables and
114
+ `color-scheme` are local to each instance; the component never writes to
115
+ `:root`. Arbitrary notes HTML and URL/mask assets are not rendered or loaded.
116
+
117
+ This checkpoint provides a Preact component. An HTML-export API/CLI, React
118
+ adapter, and automatic panel-state synchronization are outside its scope.
119
+ See [`PORTABLE-CONTRACT.md` §12](./PORTABLE-CONTRACT.md#12-static-token-dashboard).
120
+
121
+ ---
122
+
41
123
  ## 0. Architecture at a glance
42
124
 
43
125
  The design-token panel is a browser-based UI that writes token overrides to
@@ -60,8 +60,8 @@
60
60
  *
61
61
  * Pure / no IO — safe to import anywhere (browser, Node, tests).
62
62
  */
63
- import type { ColorTweakState, TweakState, ColorClusterConfig } from '../state/tweak-state';
64
- import type { TabConfig } from '../tokens/tier-model';
63
+ import type { ColorTweakState, TweakState, ColorClusterConfig } from "../state/tweak-state.js";
64
+ import type { TabConfig } from "../tokens/tier-model.js";
65
65
  /**
66
66
  * Produce the flat cssVar → value map for the dev-API handler.
67
67
  *
@@ -1,4 +1,4 @@
1
- import type { PanelConfig } from '../config/panel-config';
1
+ import type { PanelConfig } from "../config/panel-config.js";
2
2
  export type FlatOverrides = Record<string, string>;
3
3
  export declare function loadLastApplied(cfg: PanelConfig): FlatOverrides;
4
4
  export declare function saveLastApplied(overrides: FlatOverrides, cfg: PanelConfig): void;
@@ -1,5 +1,5 @@
1
- import type { PanelConfig } from '../config/panel-config';
2
- import type { ColorTweakState, TweakState } from '../state/tweak-state';
1
+ import type { PanelConfig } from "../config/panel-config.js";
2
+ import type { ColorTweakState, TweakState } from "../state/tweak-state.js";
3
3
  /**
4
4
  * Remove only overrides the server confirms it wrote. CSS variables are
5
5
  * resolved through the manifest token index so color, secondary-color,
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * No IO, no DOM, no Node-specific imports — safe to bundle for the browser.
16
16
  */
17
- import type { ApplyRoutingMap } from '../config/panel-config';
17
+ import type { ApplyRoutingMap } from "../config/panel-config.js";
18
18
  /**
19
19
  * Prefix-family identifier. Plain string — the routing map is host-supplied.
20
20
  */
@@ -19,7 +19,7 @@
19
19
  * For a reference tier (referencesTier is set) the value is the id of a target
20
20
  * item in the named tier.
21
21
  */
22
- import type { TabConfig } from '../tokens/tier-model';
22
+ import type { TabConfig } from "../tokens/tier-model.js";
23
23
  export type TabOverrides = Readonly<Record<string, Readonly<Record<string, string>>>>;
24
24
  export declare class TierResolverError extends Error {
25
25
  constructor(message: string);
@@ -1,5 +1,5 @@
1
- import { type PanelConfig } from './config/panel-config';
2
- import { type ColorTweakState, type TweakState } from './state/tweak-state';
1
+ import { type PanelConfig } from "./config/panel-config.js";
2
+ import { type ColorTweakState, type TweakState } from "./state/tweak-state.js";
3
3
  export interface ApplyModalProps {
4
4
  state: TweakState;
5
5
  open: boolean;
@@ -1,6 +1,6 @@
1
- import { c as y, g as m, a as w, b, i as P } from "../panel-config-CqbuB0nh.js";
2
- import { g, Z as A } from "../tweak-state-c53KtLHq.js";
3
- import { s as D, l as E, a as _, i as c, r as f, c as k, b as S, d } from "../autoload-state-BI4-9A58.js";
1
+ import { c as y, g as m, a as w, b, i as P } from "../panel-config-Crn5QJGy.js";
2
+ import { g, Z as A } from "../tweak-state-Dzr5kDhX.js";
3
+ import { s as D, l as E, a as _, i as c, r as f, c as k, b as S, d } from "../autoload-state-CGnis85c.js";
4
4
  import { READABLE_STATE_KEY_SUFFIXES as T } from "../constants.js";
5
5
  const u = "tokenpanel-config";
6
6
  function I() {
@@ -22,11 +22,11 @@
22
22
  * callers don't need a deep `@takazudo/zdtp/dist/config/panel-config`
23
23
  * import to type their config object.
24
24
  */
25
- export type { PanelConfig } from '../config/panel-config';
26
- export type { ColorScheme, ColorRef } from '../config/color-schemes';
27
- export type { ColorClusterConfig } from '../state/tweak-state';
28
- export { setPanelColorPresets } from '../config/panel-config';
29
- export { colorSchemes } from '../config/color-schemes';
30
- export { panelSettings, SEMANTIC_CSS_NAMES, SEMANTIC_DEFAULTS_ZD } from '../config/color-scheme-utils';
31
- export { GROUP_ORDER, FONT_GROUP_ORDER, SIZE_GROUP_ORDER, GROUP_TITLES } from '../tokens/manifest';
32
- export type { TokenDef, TokenManifest } from '../tokens/manifest';
25
+ export type { PanelConfig } from "../config/panel-config.js";
26
+ export type { ColorScheme, ColorRef } from "../config/color-schemes.js";
27
+ export type { ColorClusterConfig } from "../state/tweak-state.js";
28
+ export { setPanelColorPresets } from "../config/panel-config.js";
29
+ export { colorSchemes } from "../config/color-schemes.js";
30
+ export { panelSettings, SEMANTIC_CSS_NAMES, SEMANTIC_DEFAULTS_ZD } from "../config/color-scheme-utils.js";
31
+ export { GROUP_ORDER, FONT_GROUP_ORDER, SIZE_GROUP_ORDER, GROUP_TITLES } from "../tokens/manifest.js";
32
+ export type { TokenDef, TokenManifest } from "../tokens/manifest.js";
@@ -1,4 +1,4 @@
1
- import { s as t } from "../panel-config-CqbuB0nh.js";
1
+ import { s as t } from "../panel-config-Crn5QJGy.js";
2
2
  import { c as d } from "../color-schemes-CgzOBqGO.js";
3
3
  import { F as r, G as m, a as g, S as z } from "../manifest-DvuKi7I4.js";
4
4
  const e = {
@@ -1,4 +1,4 @@
1
- import { g as n, j as o } from "./panel-config-CqbuB0nh.js";
1
+ import { g as n, j as o } from "./panel-config-Crn5QJGy.js";
2
2
  function c() {
3
3
  return typeof document < "u" && document !== null && typeof document.getElementById == "function";
4
4
  }
@@ -1,7 +1,7 @@
1
1
  import type { ComponentChildren } from 'preact';
2
- import type { TierConfig } from '../tokens/tier-model';
3
- import { type NumericValue } from '../utils/numeric-transform';
4
- import type { FlatTabEntry, RowContribution, TokenAddress } from '../tabs/flat/types';
2
+ import type { TierConfig } from "../tokens/tier-model.js";
3
+ import { type NumericValue } from "../utils/numeric-transform.js";
4
+ import type { FlatTabEntry, RowContribution, TokenAddress } from "../tabs/flat/types.js";
5
5
  export interface BulkOperations {
6
6
  multiply: string;
7
7
  add: string;
@@ -1,2 +1,2 @@
1
- export { BulkActionBar, DEFAULT_BULK_OPERATIONS, createBulkContribution, isBulkSelectable, isSelectable, numericEntryUnit, numericValueForEntry, transformBulkEntry, } from './bulk-actions';
2
- export type { BulkActionBarProps, BulkContributionOptions, BulkOperations, BulkPatchEntry, } from './bulk-actions';
1
+ export { BulkActionBar, DEFAULT_BULK_OPERATIONS, createBulkContribution, isBulkSelectable, isSelectable, numericEntryUnit, numericValueForEntry, transformBulkEntry, } from "./bulk-actions.js";
2
+ export type { BulkActionBarProps, BulkContributionOptions, BulkOperations, BulkPatchEntry, } from "./bulk-actions.js";
@@ -1,2 +1,2 @@
1
- export { ChainButton, ChainPopover, TOKEN_CHAIN_CONTRIBUTION, TokenChainButton, TokenChainPopover, type TokenChainButtonProps, type TokenChainPopoverProps, } from './token-chain-popover';
2
- export { TokenChainProvider, useTokenChainContext, type TokenChainContextValue, type TokenChainProviderProps, } from './token-chain-context';
1
+ export { ChainButton, ChainPopover, TOKEN_CHAIN_CONTRIBUTION, TokenChainButton, TokenChainPopover, type TokenChainButtonProps, type TokenChainPopoverProps, } from "./token-chain-popover.js";
2
+ export { TokenChainProvider, useTokenChainContext, type TokenChainContextValue, type TokenChainProviderProps, } from "./token-chain-context.js";
@@ -1,7 +1,7 @@
1
1
  import type { ComponentChildren } from 'preact';
2
- import type { PanelConfig } from '../config/panel-config';
3
- import type { TweakState } from '../state/tweak-state';
4
- import { type TokenGraph } from '../utils/token-graph';
2
+ import type { PanelConfig } from "../config/panel-config.js";
3
+ import type { TweakState } from "../state/tweak-state.js";
4
+ import { type TokenGraph } from "../utils/token-graph.js";
5
5
  export interface TokenChainContextValue {
6
6
  graph: TokenGraph;
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from 'preact';
2
- import { type TokenAddress } from '../utils/token-index';
3
- import type { RowContribution } from '../tabs/flat/types';
2
+ import { type TokenAddress } from "../utils/token-index.js";
3
+ import type { RowContribution } from "../tabs/flat/types.js";
4
4
  export interface TokenChainPopoverProps {
5
5
  address: TokenAddress;
6
6
  anchorRef: React.RefObject<HTMLElement | null>;
@@ -5,11 +5,11 @@
5
5
  * row's visual state, Changed-only filtering, ghost value, and revert affordance
6
6
  * all consult the same `isChanged` result for the row's stable token address.
7
7
  */
8
- import type { PanelConfig } from '../config/panel-config';
9
- import type { TweakState } from '../state/tweak-state';
10
- import { revertEntry, type ColorBaseline } from '../utils/token-diff';
11
- import type { TokenIndex, TokenAddress } from '../utils/token-index';
12
- import type { RowContribution } from '../tabs/flat/types';
8
+ import type { PanelConfig } from "../config/panel-config.js";
9
+ import type { TweakState } from "../state/tweak-state.js";
10
+ import { revertEntry, type ColorBaseline } from "../utils/token-diff.js";
11
+ import type { TokenIndex, TokenAddress } from "../utils/token-index.js";
12
+ import type { RowContribution } from "../tabs/flat/types.js";
13
13
  export interface ChangedContributionOptions {
14
14
  index: TokenIndex;
15
15
  state: TweakState;
@@ -1,8 +1,8 @@
1
1
  import type { JSX } from 'preact';
2
- import type { PanelConfig } from '../config/panel-config';
3
- import type { ColorBaseline } from '../utils/token-diff';
4
- import type { TweakState } from '../state/tweak-state';
5
- import type { TokenIndex } from '../utils/token-index';
2
+ import type { PanelConfig } from "../config/panel-config.js";
3
+ import type { ColorBaseline } from "../utils/token-diff.js";
4
+ import type { TweakState } from "../state/tweak-state.js";
5
+ import type { TokenIndex } from "../utils/token-index.js";
6
6
  export declare const COPY_REVERT_MS = 2000;
7
7
  export interface ChangedFooterContentProps {
8
8
  index: TokenIndex;
@@ -1,4 +1,4 @@
1
- export { changedContribution, changedStateContribution, createChangedContribution, revertEntry, } from './contribution';
2
- export { ChangedFooter, ChangedFooterContent, COPY_REVERT_MS } from './footer-content';
3
- export { ChangedOnlyToggle } from './tab-filter';
4
- export { ChangedTabBadge, TabChangedBadge } from './tab-badge';
1
+ export { changedContribution, changedStateContribution, createChangedContribution, revertEntry, } from "./contribution.js";
2
+ export { ChangedFooter, ChangedFooterContent, COPY_REVERT_MS } from "./footer-content.js";
3
+ export { ChangedOnlyToggle } from "./tab-filter.js";
4
+ export { ChangedTabBadge, TabChangedBadge } from "./tab-badge.js";
@@ -7,7 +7,7 @@
7
7
  * DOM-hygiene compliant: div-button with onClick + onKeyDown (Enter/Space);
8
8
  * no banned semantic tags — hostile-host policy (CLAUDE.md).
9
9
  */
10
- import type { ColorPickerValueFormat } from './color-picker';
10
+ import type { ColorPickerValueFormat } from "./color-picker.js";
11
11
  export interface ColorFieldProps {
12
12
  /** Current color value. Hex string in hex mode; `oklch(...)` string in oklch mode. */
13
13
  value: string;
@@ -1,2 +1,2 @@
1
- export { ColorPicker, type ColorPickerMode, type ColorPickerProps, LOCAL_STORAGE_KEY, getFixedPopoverStyle, usePopoverClose, } from './color-picker';
2
- export { default } from './color-picker';
1
+ export { ColorPicker, type ColorPickerMode, type ColorPickerProps, LOCAL_STORAGE_KEY, getFixedPopoverStyle, usePopoverClose, } from "./color-picker.js";
2
+ export { default } from "./color-picker.js";
@@ -1,2 +1,2 @@
1
- export { PaletteChart, type PaletteChartProps, type Oklcha, type Channel, } from './palette-chart';
2
- export { default } from './palette-chart';
1
+ export { PaletteChart, type PaletteChartProps, type Oklcha, type Channel, } from "./palette-chart.js";
2
+ export { default } from "./palette-chart.js";
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from 'preact';
2
- import { type Channel } from '../../utils/palette-curve';
3
- import { type Oklcha } from '../../utils/color-oklch';
2
+ import { type Channel } from "../../utils/palette-curve.js";
3
+ import { type Oklcha } from "../../utils/color-oklch.js";
4
4
  /**
5
5
  * PaletteChart — controlled, presentational OKLCH L/C/H curve editor.
6
6
  *
@@ -32,8 +32,8 @@ import { type Oklcha } from '../../utils/color-oklch';
32
32
  * within the same SVG, so a pointer-down on a node hits the circle (DOM order
33
33
  * within an SVG determines paint/hit precedence).
34
34
  */
35
- export type { Oklcha } from '../../utils/color-oklch';
36
- export type { Channel } from '../../utils/palette-curve';
35
+ export type { Oklcha } from "../../utils/color-oklch.js";
36
+ export type { Channel } from "../../utils/palette-curve.js";
37
37
  export interface PaletteChartProps {
38
38
  /**
39
39
  * Dense palette slots in OKLCH space. A null slot preserves its index/band,
@@ -20,9 +20,9 @@
20
20
  * everything the color tab needs to render is reachable from
21
21
  * `panelConfig.colorCluster`.
22
22
  */
23
- import type { ColorScheme } from './color-schemes';
24
- import type { SemanticValue } from '../tokens/tier-model';
25
- export type { SemanticValue } from '../tokens/tier-model';
23
+ import type { ColorScheme } from "./color-schemes.js";
24
+ import type { SemanticValue } from "../tokens/tier-model.js";
25
+ export type { SemanticValue } from "../tokens/tier-model.js";
26
26
  /**
27
27
  * Base-role keys that a cluster may declare. Subset is allowed (a cluster may
28
28
  * ship zero base roles when its design system doesn't expose them as tokens).
@@ -110,7 +110,7 @@ export interface ColorClusterDataConfig {
110
110
  export declare function resolvePaletteCssVar(cluster: {
111
111
  paletteCssVarTemplate: string;
112
112
  }, index: number): string;
113
- import type { TabConfig } from '../tokens/tier-model';
113
+ import type { TabConfig } from "../tokens/tier-model.js";
114
114
  /**
115
115
  * Derive a `ColorClusterDataConfig` from a color `TabConfig`.
116
116
  *
@@ -14,7 +14,7 @@
14
14
  * mappings in the bundled tokens, so the panel's defaults on first open
15
15
  * match the example CSS exactly.
16
16
  */
17
- import { type ColorScheme, type ColorRef } from './color-schemes';
17
+ import { type ColorScheme, type ColorRef } from "./color-schemes.js";
18
18
  /**
19
19
  * Minimal local replacement for the upstream `settings` object. The panel only
20
20
  * ever reads `colorScheme` and `colorMode`; the rest of the upstream settings
@@ -45,9 +45,9 @@
45
45
  * arbitrary host-irrelevant data. Hosts MUST call `configurePanel(...)` to
46
46
  * see useful behaviour.
47
47
  */
48
- import type { ColorScheme } from './color-schemes';
49
- import type { TabConfig } from '../tokens/tier-model';
50
- export { DEFAULT_STORAGE_PREFIX, DEFAULT_TOGGLE_EVENT } from '../constants';
48
+ import type { ColorScheme } from "./color-schemes.js";
49
+ import type { TabConfig } from "../tokens/tier-model.js";
50
+ export { DEFAULT_STORAGE_PREFIX, DEFAULT_TOGGLE_EVENT } from "../constants.js";
51
51
  /**
52
52
  * Apply-routing map.
53
53
  *
@@ -430,8 +430,8 @@ export declare function clearColorSchemeOwnership(prefix: string): void;
430
430
  * never removes a `color-scheme` it did not write.
431
431
  */
432
432
  export declare function ownsColorScheme(prefix: string): boolean;
433
- export { resolvePrimaryColorCluster, resolveSecondaryColorClusterFromTabs, } from './cluster-config';
434
- import type { ColorClusterDataConfig } from './cluster-config';
433
+ export { resolvePrimaryColorCluster, resolveSecondaryColorClusterFromTabs, } from "./cluster-config.js";
434
+ import type { ColorClusterDataConfig } from "./cluster-config.js";
435
435
  /**
436
436
  * Resolve the active primary color cluster from the panel config's tabs array.
437
437
  *
@@ -1,4 +1,4 @@
1
- import type { TabConfig } from '../tokens/tier-model';
1
+ import type { TabConfig } from "../tokens/tier-model.js";
2
2
  /**
3
3
  * Names one item in a (possibly cross-tab) tier. `tab` omitted means "the tab
4
4
  * `TierRefSelector` itself renders in" — the intra-tab case used by the
@@ -0,0 +1,4 @@
1
+ export { TokenDashboard } from "./token-dashboard.js";
2
+ export type { TokenDashboardProps, DashboardPreviewKind } from "./token-dashboard.js";
3
+ export type { DashboardMode } from "./types.js";
4
+ export type { TabConfig, TierConfig, TierItem } from "../tokens/tier-model.js";