@takazudo/zdtp 0.5.2 → 0.6.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.
Files changed (107) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/PORTABLE-CONTRACT.md +18 -0
  3. package/dist/apply/build-apply-overrides.d.ts +2 -2
  4. package/dist/apply/last-applied.d.ts +1 -1
  5. package/dist/apply/reconcile-applied.d.ts +2 -2
  6. package/dist/apply/route-tokens-to-files.d.ts +1 -1
  7. package/dist/apply/tier-resolver.d.ts +1 -1
  8. package/dist/apply-modal.d.ts +2 -2
  9. package/dist/astro/host-adapter.js +3 -3
  10. package/dist/astro/index.d.ts +8 -8
  11. package/dist/astro/index.js +1 -1
  12. package/dist/{autoload-state-BI4-9A58.js → autoload-state-CGnis85c.js} +1 -1
  13. package/dist/bulk/bulk-actions.d.ts +3 -3
  14. package/dist/bulk/index.d.ts +2 -2
  15. package/dist/chain/index.d.ts +2 -2
  16. package/dist/chain/token-chain-context.d.ts +3 -3
  17. package/dist/chain/token-chain-popover.d.ts +2 -2
  18. package/dist/changed/contribution.d.ts +5 -5
  19. package/dist/changed/footer-content.d.ts +4 -4
  20. package/dist/changed/index.d.ts +4 -4
  21. package/dist/components/color-picker/color-field.d.ts +1 -1
  22. package/dist/components/color-picker/index.d.ts +2 -2
  23. package/dist/components/palette-chart/index.d.ts +2 -2
  24. package/dist/components/palette-chart/palette-chart.d.ts +4 -4
  25. package/dist/config/cluster-config.d.ts +4 -4
  26. package/dist/config/color-scheme-utils.d.ts +1 -1
  27. package/dist/config/panel-config.d.ts +5 -5
  28. package/dist/controls/tier-ref-selector.d.ts +1 -1
  29. package/dist/dom-tweaker/dom-tweaker-diff-action-link.d.ts +1 -1
  30. package/dist/dom-tweaker/dom-tweaker-orchestrator.d.ts +1 -1
  31. package/dist/dom-tweaker/dom-tweaker-state.d.ts +1 -1
  32. package/dist/dom-tweaker/lazy/class-editor-popup.d.ts +1 -1
  33. package/dist/dom-tweaker/lazy/diff-export-modal.d.ts +1 -1
  34. package/dist/dom-tweaker/lazy/index.d.ts +2 -2
  35. package/dist/element-inspect/element-inspect-context.d.ts +1 -1
  36. package/dist/element-inspect/element-inspect-orchestrator.d.ts +3 -3
  37. package/dist/element-inspect/element-inspect-overlay.d.ts +1 -1
  38. package/dist/element-inspect/find-tokens-for-element.d.ts +1 -1
  39. package/dist/element-inspect/index.d.ts +8 -8
  40. package/dist/element-path/element-path-state.d.ts +1 -1
  41. package/dist/element-path/index.d.ts +7 -7
  42. package/dist/export-modal.d.ts +2 -2
  43. package/dist/highlight/highlight-orchestrator.d.ts +2 -2
  44. package/dist/highlight/highlight-state.d.ts +1 -1
  45. package/dist/highlight/highlight-toggle-button.d.ts +2 -2
  46. package/dist/history/buttons.d.ts +1 -1
  47. package/dist/history/index.d.ts +3 -3
  48. package/dist/history/rail.d.ts +2 -2
  49. package/dist/history/snapshots.d.ts +2 -2
  50. package/dist/import-modal.d.ts +2 -2
  51. package/dist/{index-ChsJ5u4d.js → index-DWs1XPfy.js} +993 -993
  52. package/dist/{index-CAQf4HKm.js → index-LYsbHWcy.js} +2 -2
  53. package/dist/index.d.ts +14 -14
  54. package/dist/index.js +14 -13
  55. package/dist/{panel-config-CqbuB0nh.js → panel-config-Crn5QJGy.js} +243 -208
  56. package/dist/panel.d.ts +2 -2
  57. package/dist/picker/index.d.ts +4 -4
  58. package/dist/search/command-palette.d.ts +3 -3
  59. package/dist/search/contribution.d.ts +1 -1
  60. package/dist/search/index.d.ts +4 -4
  61. package/dist/search/match-bar.d.ts +1 -1
  62. package/dist/search/token-search.d.ts +3 -3
  63. package/dist/server/create-apply-handler.d.ts +2 -2
  64. package/dist/server/index.d.ts +6 -6
  65. package/dist/shell/dock-mode-switch.d.ts +1 -1
  66. package/dist/shell/regions.d.ts +1 -1
  67. package/dist/shell/tab-bar.d.ts +1 -1
  68. package/dist/shell/tab-overflow-popover.d.ts +1 -1
  69. package/dist/specimen/on-page-specimen.d.ts +3 -3
  70. package/dist/specimen/preview-glyphs.d.ts +1 -1
  71. package/dist/specimen/specimen-state.d.ts +1 -1
  72. package/dist/specimen/specimen-tab-body.d.ts +5 -5
  73. package/dist/specimen/specimen-toolbar.d.ts +1 -1
  74. package/dist/specimen/specimen-values.d.ts +1 -1
  75. package/dist/state/autoload-state.d.ts +1 -1
  76. package/dist/state/history.d.ts +1 -1
  77. package/dist/state/persist.d.ts +3 -3
  78. package/dist/state/transaction.d.ts +3 -3
  79. package/dist/state/tweak-state.d.ts +12 -12
  80. package/dist/tabs/_generic-item-editor.d.ts +1 -1
  81. package/dist/tabs/color-tab.d.ts +6 -6
  82. package/dist/tabs/flat/flat-tab.d.ts +5 -5
  83. package/dist/tabs/flat/index.d.ts +8 -8
  84. package/dist/tabs/flat/scroll-to-token-row.d.ts +1 -1
  85. package/dist/tabs/flat/tier-section.d.ts +3 -3
  86. package/dist/tabs/flat/token-controller.d.ts +1 -1
  87. package/dist/tabs/flat/token-row.d.ts +2 -2
  88. package/dist/tabs/flat/types.d.ts +1 -1
  89. package/dist/tabs/font-tab.d.ts +6 -6
  90. package/dist/tabs/generic-tab.d.ts +4 -4
  91. package/dist/tabs/notes-tab.d.ts +1 -1
  92. package/dist/tabs/palette/palette-check-view.d.ts +3 -3
  93. package/dist/tabs/palette/palette-edit-view.d.ts +3 -3
  94. package/dist/tabs/palette/palette-readout.d.ts +1 -1
  95. package/dist/tabs/palette/palette-tab.d.ts +3 -3
  96. package/dist/tabs/size-tab.d.ts +5 -5
  97. package/dist/tabs/spacing-tab.d.ts +5 -5
  98. package/dist/testing.d.ts +6 -6
  99. package/dist/testing.js +16 -15
  100. package/dist/tokens/tier-model.d.ts +2 -2
  101. package/dist/{tweak-state-c53KtLHq.js → tweak-state-Dzr5kDhX.js} +210 -207
  102. package/dist/utils/color-oklch.d.ts +2 -2
  103. package/dist/utils/design-token-serde.d.ts +2 -2
  104. package/dist/utils/token-diff.d.ts +3 -3
  105. package/dist/utils/token-graph.d.ts +4 -4
  106. package/dist/utils/token-index.d.ts +2 -2
  107. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ 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.0] - 2026-09-08
8
+
9
+ ### Breaking Changes
10
+
11
+ - 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.
12
+
13
+ ### Features
14
+
15
+ - feat(minimal): teach grouped palette and semantic colors (5dcbe12)
16
+ - feat(playground): use grouped OKLCH palette and semantic colors (42c7c86)
17
+
18
+ ### Fixed
19
+
20
+ - fix: preserve host color-scheme on per-mode apply (90c30c6)
21
+ - fix: render specimen fonts from instance values (7d18952)
22
+ - fix: normalize emitted declaration module specifiers (8f858c0)
23
+ - fix: expose panel config validator through public entrypoints (5335713)
24
+
25
+ ### Other Changes
26
+
27
+ - docs: explain grouped palettes and per-mode semantic colors (3d1d114)
28
+ - Restructure playground colors into grouped semantic ramps (2076abe)
29
+ - test: verify specimen instance isolation in Chromium (6ff7ed6)
30
+ - test: guard packed declarations across TypeScript resolution modes (f1e5e21)
31
+
7
32
  ## [0.5.2] - 2026-09-08
8
33
 
9
34
  ### 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**
@@ -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
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from 'preact';
2
- import type { PanelConfig } from '../config/panel-config';
2
+ import type { PanelConfig } from "../config/panel-config.js";
3
3
  export interface DomTweakerDiffActionLinkProps {
4
4
  instanceConfig: PanelConfig;
5
5
  onSelected?: () => void;
@@ -10,7 +10,7 @@
10
10
  * explicit scalar config values into that boundary.
11
11
  */
12
12
  import type { ComponentChildren, JSX } from 'preact';
13
- import type { PanelConfig } from '../config/panel-config';
13
+ import type { PanelConfig } from "../config/panel-config.js";
14
14
  export declare function DomTweakerOrchestrator({ children, instanceConfig, }: {
15
15
  children: ComponentChildren;
16
16
  instanceConfig: PanelConfig;
@@ -6,7 +6,7 @@
6
6
  * time (never at module init), so a late `configurePanel({ storagePrefix })`
7
7
  * is respected by no-arg callers.
8
8
  */
9
- import { type PanelConfig } from '../config/panel-config';
9
+ import { type PanelConfig } from "../config/panel-config.js";
10
10
  export declare function storageKey_domTweakerEnabled(cfg?: PanelConfig): string;
11
11
  /**
12
12
  * Load the persisted enabled flag from localStorage. Defaults to `false` on
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from 'preact';
2
- import { type TrackedElementRect } from './pinned-selection-overlay';
2
+ import { type TrackedElementRect } from "./pinned-selection-overlay.js";
3
3
  export interface ClassEditorPopupProps {
4
4
  target: Element | null;
5
5
  selectorSummary: string;
@@ -1,5 +1,5 @@
1
1
  import type { JSX } from 'preact';
2
- import { type PanelConfig } from '../../config/panel-config';
2
+ import { type PanelConfig } from "../../config/panel-config.js";
3
3
  export interface DiffExportModalProps {
4
4
  diffText: string;
5
5
  onClose: () => void;
@@ -8,8 +8,8 @@
8
8
  * lazy boundary does not read global panel config.
9
9
  */
10
10
  import type { JSX } from 'preact';
11
- import type { DomTweakerRuntimeStatus } from '../dom-tweaker-context';
12
- export { buildStaticSuggestions, buildSuggestions, buildThemeSuggestions, filterSuggestions, STATIC_SUGGESTIONS, } from './suggestions';
11
+ import type { DomTweakerRuntimeStatus } from "../dom-tweaker-context.js";
12
+ export { buildStaticSuggestions, buildSuggestions, buildThemeSuggestions, filterSuggestions, STATIC_SUGGESTIONS, } from "./suggestions.js";
13
13
  export interface DomTweakerLazyBoundaryProps {
14
14
  enabled: boolean;
15
15
  storagePrefix: string;
@@ -1,4 +1,4 @@
1
- import type { FindTokensForElementResult } from './find-tokens-for-element';
1
+ import type { FindTokensForElementResult } from "./find-tokens-for-element.js";
2
2
  /** The synthetic tab id used by the transient element-inspect view. */
3
3
  export declare const ELEMENT_INSPECT_TAB_ID = "inspect";
4
4
  export interface ElementInspectContextValue {
@@ -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 { CommitTweakStateOptions, TweakStateUpdater } from '../state/transaction';
2
+ import type { PanelConfig } from "../config/panel-config.js";
3
+ import type { TweakState } from "../state/tweak-state.js";
4
+ import type { CommitTweakStateOptions, TweakStateUpdater } from "../state/transaction.js";
5
5
  type CommitTweakState = (reason: string, next: TweakStateUpdater, options?: CommitTweakStateOptions) => void;
6
6
  export interface ElementInspectOrchestratorProps {
7
7
  children: ComponentChildren;
@@ -1,6 +1,6 @@
1
1
  import type { JSX } from 'preact';
2
2
  /** Body-level mount used by the picker and the pinned inspect marker. */
3
- export { ELEMENT_INSPECT_PORTAL_MOUNT_ID } from '../highlight/find-elements';
3
+ export { ELEMENT_INSPECT_PORTAL_MOUNT_ID } from "../highlight/find-elements.js";
4
4
  /** Class hooks shared by the hover picker and the pinned overlay. */
5
5
  export declare const ELEMENT_INSPECT_PICKER_CLASS_NAMES: {
6
6
  readonly box: "tokenpanel-element-inspect-box";
@@ -1,4 +1,4 @@
1
- import type { TokenAddress, TokenIndex, TokenIndexEntry } from '../utils/token-index';
1
+ import type { TokenAddress, TokenIndex, TokenIndexEntry } from "../utils/token-index.js";
2
2
  export interface ElementTokenMatch {
3
3
  property: string;
4
4
  cssVar: string;
@@ -1,8 +1,8 @@
1
- export { findTokensForElement } from './find-tokens-for-element';
2
- export type { ElementTokenMatch, ElementTokenPropertyGroup, FindTokensForElementResult, } from './find-tokens-for-element';
3
- export { ElementInspectOrchestrator, type ElementInspectOrchestratorProps, } from './element-inspect-orchestrator';
4
- export { ElementInspectOverlay, ELEMENT_INSPECT_PORTAL_MOUNT_ID } from './element-inspect-overlay';
5
- export { ElementInspectToggleButton } from './element-inspect-toggle-button';
6
- export { ElementInspectView, type ElementInspectViewProps } from './element-inspect-view';
7
- export { ElementInspectContext, ELEMENT_INSPECT_TAB_ID, } from './element-inspect-context';
8
- export type { ElementInspectContextValue } from './element-inspect-context';
1
+ export { findTokensForElement } from "./find-tokens-for-element.js";
2
+ export type { ElementTokenMatch, ElementTokenPropertyGroup, FindTokensForElementResult, } from "./find-tokens-for-element.js";
3
+ export { ElementInspectOrchestrator, type ElementInspectOrchestratorProps, } from "./element-inspect-orchestrator.js";
4
+ export { ElementInspectOverlay, ELEMENT_INSPECT_PORTAL_MOUNT_ID } from "./element-inspect-overlay.js";
5
+ export { ElementInspectToggleButton } from "./element-inspect-toggle-button.js";
6
+ export { ElementInspectView, type ElementInspectViewProps } from "./element-inspect-view.js";
7
+ export { ElementInspectContext, ELEMENT_INSPECT_TAB_ID, } from "./element-inspect-context.js";
8
+ export type { ElementInspectContextValue } from "./element-inspect-context.js";
@@ -10,7 +10,7 @@
10
10
  * `panelConfig.storagePrefix` at call-time (never at module init) so a host's
11
11
  * `configurePanel({ storagePrefix })` is respected.
12
12
  */
13
- import type { PanelConfig } from '../config/panel-config';
13
+ import type { PanelConfig } from "../config/panel-config.js";
14
14
  /**
15
15
  * Load the persisted enabled flag from localStorage. Defaults to `false`
16
16
  * (inspect mode off) on any parse/access failure or when absent.
@@ -5,10 +5,10 @@
5
5
  * DevTools-style highlight, click to copy an annotated path block to the
6
6
  * clipboard) for precise human↔AI communication about the page.
7
7
  */
8
- export { ElementPathOrchestrator } from './element-path-orchestrator';
9
- export { ElementPathToggleButton } from './element-path-toggle-button';
10
- export { ElementPathContext } from './element-path-context';
11
- export type { ElementPathContextValue } from './element-path-context';
12
- export { buildElementPath, buildElementPathString, formatElementPath, buildUniqueSelector, buildBreadcrumb, } from './build-element-path';
13
- export type { ElementPathResult } from './build-element-path';
14
- export { loadElementPathEnabled, saveElementPathEnabled } from './element-path-state';
8
+ export { ElementPathOrchestrator } from "./element-path-orchestrator.js";
9
+ export { ElementPathToggleButton } from "./element-path-toggle-button.js";
10
+ export { ElementPathContext } from "./element-path-context.js";
11
+ export type { ElementPathContextValue } from "./element-path-context.js";
12
+ export { buildElementPath, buildElementPathString, formatElementPath, buildUniqueSelector, buildBreadcrumb, } from "./build-element-path.js";
13
+ export type { ElementPathResult } from "./build-element-path.js";
14
+ export { loadElementPathEnabled, saveElementPathEnabled } from "./element-path-state.js";
@@ -22,8 +22,8 @@
22
22
  * programmatic "Close" button) routes through `dialog.close()` so the native
23
23
  * `close` event — and thus `onClose` — fires exactly once per dismissal.
24
24
  */
25
- import { type ColorTweakState, type TweakState } from './state/tweak-state';
26
- import { type PanelConfig } from './config/panel-config';
25
+ import { type ColorTweakState, type TweakState } from "./state/tweak-state.js";
26
+ import { type PanelConfig } from "./config/panel-config.js";
27
27
  export interface ExportModalProps {
28
28
  onClose: () => void;
29
29
  /** Full unified tweak state — the modal serializes all four categories. */
@@ -14,8 +14,8 @@
14
14
  * overlay persists even when the panel is closed.
15
15
  */
16
16
  import type { ComponentChildren } from 'preact';
17
- import { type PanelConfig } from '../config/panel-config';
18
- import type { TierValueKind } from '../tokens/tier-model';
17
+ import { type PanelConfig } from "../config/panel-config.js";
18
+ import type { TierValueKind } from "../tokens/tier-model.js";
19
19
  type ProbeKind = 'color' | 'length' | 'number' | 'text' | 'easing' | 'cursor' | 'content' | 'mask-image';
20
20
  export declare function tierKindToProbeKind(t: TierValueKind | undefined): ProbeKind | undefined;
21
21
  export interface HighlightOrchestratorProps {
@@ -14,7 +14,7 @@
14
14
  * outlineWidth → localStorage (survives full page reload — user width setting kept)
15
15
  * active → sessionStorage (cleared on reload — inspection set is ephemeral)
16
16
  */
17
- import { type PanelConfig } from '../config/panel-config';
17
+ import { type PanelConfig } from "../config/panel-config.js";
18
18
  export interface HighlightSlotSpec {
19
19
  color: string;
20
20
  }
@@ -11,8 +11,8 @@
11
11
  * module.
12
12
  */
13
13
  import type { JSX } from 'preact';
14
- import type { HighlightState, HighlightSlotSpec } from './highlight-state';
15
- import type { TokenAddress } from '../utils/token-index';
14
+ import type { HighlightState, HighlightSlotSpec } from "./highlight-state.js";
15
+ import type { TokenAddress } from "../utils/token-index.js";
16
16
  export interface HighlightContextValue {
17
17
  state: HighlightState;
18
18
  toggle: (cssVar: string) => void;
@@ -1,4 +1,4 @@
1
- import type { TweakHistorySnapshot } from '../state/history';
1
+ import type { TweakHistorySnapshot } from "../state/history.js";
2
2
  export interface HistoryButtonProps {
3
3
  canUndo: boolean;
4
4
  onUndo: () => void;
@@ -1,3 +1,3 @@
1
- export { HistoryButtons, HistoryRedoButton, HistoryShortcuts, HistoryUndoButton, type HistoryButtonProps, type HistoryButtonsProps, type HistoryShortcutsProps, } from './buttons';
2
- export { HistoryRail, type HistoryRailProps } from './rail';
3
- export { clearSnapshots, getSnapshotKey, isSnapshotState, loadSnapshot, loadSnapshots, removeSnapshot, restoreSnapshotState, saveSnapshot, storageKey_snapshotA, storageKey_snapshotB, useSnapshots, type SnapshotRestoreResult, type SnapshotSlot, type SnapshotSlots, type TweakSnapshot, } from './snapshots';
1
+ export { HistoryButtons, HistoryRedoButton, HistoryShortcuts, HistoryUndoButton, type HistoryButtonProps, type HistoryButtonsProps, type HistoryShortcutsProps, } from "./buttons.js";
2
+ export { HistoryRail, type HistoryRailProps } from "./rail.js";
3
+ export { clearSnapshots, getSnapshotKey, isSnapshotState, loadSnapshot, loadSnapshots, removeSnapshot, restoreSnapshotState, saveSnapshot, storageKey_snapshotA, storageKey_snapshotB, useSnapshots, type SnapshotRestoreResult, type SnapshotSlot, type SnapshotSlots, type TweakSnapshot, } from "./snapshots.js";
@@ -1,5 +1,5 @@
1
- import type { TweakHistorySnapshot } from '../state/history';
2
- import type { SnapshotSlot, SnapshotSlots } from './snapshots';
1
+ import type { TweakHistorySnapshot } from "../state/history.js";
2
+ import type { SnapshotSlot, SnapshotSlots } from "./snapshots.js";
3
3
  export interface HistoryRailProps {
4
4
  history: TweakHistorySnapshot;
5
5
  snapshots: SnapshotSlots;
@@ -1,5 +1,5 @@
1
- import { storageKey_snapshotA, storageKey_snapshotB, type PanelConfig } from '../config/panel-config';
2
- import type { TweakState } from '../state/tweak-state';
1
+ import { storageKey_snapshotA, storageKey_snapshotB, type PanelConfig } from "../config/panel-config.js";
2
+ import type { TweakState } from "../state/tweak-state.js";
3
3
  export type SnapshotSlot = 'A' | 'B';
4
4
  export interface TweakSnapshot {
5
5
  state: TweakState;
@@ -20,8 +20,8 @@
20
20
  * programmatic "Close" button) routes through `dialog.close()` so the native
21
21
  * `close` event — and thus `onClose` — fires exactly once per dismissal.
22
22
  */
23
- import type { ColorTweakState, TweakState } from './state/tweak-state';
24
- import { type PanelConfig } from './config/panel-config';
23
+ import type { ColorTweakState, TweakState } from "./state/tweak-state.js";
24
+ import { type PanelConfig } from "./config/panel-config.js";
25
25
  export interface ImportModalProps {
26
26
  onClose: () => void;
27
27
  /** Called with the parsed state when the user hits "Load". The caller is