@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.
- package/CHANGELOG.md +25 -0
- package/PORTABLE-CONTRACT.md +18 -0
- package/dist/apply/build-apply-overrides.d.ts +2 -2
- package/dist/apply/last-applied.d.ts +1 -1
- package/dist/apply/reconcile-applied.d.ts +2 -2
- package/dist/apply/route-tokens-to-files.d.ts +1 -1
- package/dist/apply/tier-resolver.d.ts +1 -1
- package/dist/apply-modal.d.ts +2 -2
- package/dist/astro/host-adapter.js +3 -3
- package/dist/astro/index.d.ts +8 -8
- package/dist/astro/index.js +1 -1
- package/dist/{autoload-state-BI4-9A58.js → autoload-state-CGnis85c.js} +1 -1
- package/dist/bulk/bulk-actions.d.ts +3 -3
- package/dist/bulk/index.d.ts +2 -2
- package/dist/chain/index.d.ts +2 -2
- package/dist/chain/token-chain-context.d.ts +3 -3
- package/dist/chain/token-chain-popover.d.ts +2 -2
- package/dist/changed/contribution.d.ts +5 -5
- package/dist/changed/footer-content.d.ts +4 -4
- package/dist/changed/index.d.ts +4 -4
- package/dist/components/color-picker/color-field.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/palette-chart/index.d.ts +2 -2
- package/dist/components/palette-chart/palette-chart.d.ts +4 -4
- package/dist/config/cluster-config.d.ts +4 -4
- package/dist/config/color-scheme-utils.d.ts +1 -1
- package/dist/config/panel-config.d.ts +5 -5
- package/dist/controls/tier-ref-selector.d.ts +1 -1
- package/dist/dom-tweaker/dom-tweaker-diff-action-link.d.ts +1 -1
- package/dist/dom-tweaker/dom-tweaker-orchestrator.d.ts +1 -1
- package/dist/dom-tweaker/dom-tweaker-state.d.ts +1 -1
- package/dist/dom-tweaker/lazy/class-editor-popup.d.ts +1 -1
- package/dist/dom-tweaker/lazy/diff-export-modal.d.ts +1 -1
- package/dist/dom-tweaker/lazy/index.d.ts +2 -2
- package/dist/element-inspect/element-inspect-context.d.ts +1 -1
- package/dist/element-inspect/element-inspect-orchestrator.d.ts +3 -3
- package/dist/element-inspect/element-inspect-overlay.d.ts +1 -1
- package/dist/element-inspect/find-tokens-for-element.d.ts +1 -1
- package/dist/element-inspect/index.d.ts +8 -8
- package/dist/element-path/element-path-state.d.ts +1 -1
- package/dist/element-path/index.d.ts +7 -7
- package/dist/export-modal.d.ts +2 -2
- package/dist/highlight/highlight-orchestrator.d.ts +2 -2
- package/dist/highlight/highlight-state.d.ts +1 -1
- package/dist/highlight/highlight-toggle-button.d.ts +2 -2
- package/dist/history/buttons.d.ts +1 -1
- package/dist/history/index.d.ts +3 -3
- package/dist/history/rail.d.ts +2 -2
- package/dist/history/snapshots.d.ts +2 -2
- package/dist/import-modal.d.ts +2 -2
- package/dist/{index-ChsJ5u4d.js → index-DWs1XPfy.js} +993 -993
- package/dist/{index-CAQf4HKm.js → index-LYsbHWcy.js} +2 -2
- package/dist/index.d.ts +14 -14
- package/dist/index.js +14 -13
- package/dist/{panel-config-CqbuB0nh.js → panel-config-Crn5QJGy.js} +243 -208
- package/dist/panel.d.ts +2 -2
- package/dist/picker/index.d.ts +4 -4
- package/dist/search/command-palette.d.ts +3 -3
- package/dist/search/contribution.d.ts +1 -1
- package/dist/search/index.d.ts +4 -4
- package/dist/search/match-bar.d.ts +1 -1
- package/dist/search/token-search.d.ts +3 -3
- package/dist/server/create-apply-handler.d.ts +2 -2
- package/dist/server/index.d.ts +6 -6
- package/dist/shell/dock-mode-switch.d.ts +1 -1
- package/dist/shell/regions.d.ts +1 -1
- package/dist/shell/tab-bar.d.ts +1 -1
- package/dist/shell/tab-overflow-popover.d.ts +1 -1
- package/dist/specimen/on-page-specimen.d.ts +3 -3
- package/dist/specimen/preview-glyphs.d.ts +1 -1
- package/dist/specimen/specimen-state.d.ts +1 -1
- package/dist/specimen/specimen-tab-body.d.ts +5 -5
- package/dist/specimen/specimen-toolbar.d.ts +1 -1
- package/dist/specimen/specimen-values.d.ts +1 -1
- package/dist/state/autoload-state.d.ts +1 -1
- package/dist/state/history.d.ts +1 -1
- package/dist/state/persist.d.ts +3 -3
- package/dist/state/transaction.d.ts +3 -3
- package/dist/state/tweak-state.d.ts +12 -12
- package/dist/tabs/_generic-item-editor.d.ts +1 -1
- package/dist/tabs/color-tab.d.ts +6 -6
- package/dist/tabs/flat/flat-tab.d.ts +5 -5
- package/dist/tabs/flat/index.d.ts +8 -8
- package/dist/tabs/flat/scroll-to-token-row.d.ts +1 -1
- package/dist/tabs/flat/tier-section.d.ts +3 -3
- package/dist/tabs/flat/token-controller.d.ts +1 -1
- package/dist/tabs/flat/token-row.d.ts +2 -2
- package/dist/tabs/flat/types.d.ts +1 -1
- package/dist/tabs/font-tab.d.ts +6 -6
- package/dist/tabs/generic-tab.d.ts +4 -4
- package/dist/tabs/notes-tab.d.ts +1 -1
- package/dist/tabs/palette/palette-check-view.d.ts +3 -3
- package/dist/tabs/palette/palette-edit-view.d.ts +3 -3
- package/dist/tabs/palette/palette-readout.d.ts +1 -1
- package/dist/tabs/palette/palette-tab.d.ts +3 -3
- package/dist/tabs/size-tab.d.ts +5 -5
- package/dist/tabs/spacing-tab.d.ts +5 -5
- package/dist/testing.d.ts +6 -6
- package/dist/testing.js +16 -15
- package/dist/tokens/tier-model.d.ts +2 -2
- package/dist/{tweak-state-c53KtLHq.js → tweak-state-Dzr5kDhX.js} +210 -207
- package/dist/utils/color-oklch.d.ts +2 -2
- package/dist/utils/design-token-serde.d.ts +2 -2
- package/dist/utils/token-diff.d.ts +3 -3
- package/dist/utils/token-graph.d.ts +4 -4
- package/dist/utils/token-index.d.ts +2 -2
- 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
|
package/PORTABLE-CONTRACT.md
CHANGED
|
@@ -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
|
|
64
|
-
import type { TabConfig } from
|
|
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
|
|
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
|
|
2
|
-
import type { ColorTweakState, TweakState } from
|
|
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
|
|
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
|
|
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);
|
package/dist/apply-modal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type PanelConfig } from
|
|
2
|
-
import { type ColorTweakState, type TweakState } from
|
|
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-
|
|
2
|
-
import { g, Z as A } from "../tweak-state-
|
|
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-
|
|
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() {
|
package/dist/astro/index.d.ts
CHANGED
|
@@ -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
|
|
26
|
-
export type { ColorScheme, ColorRef } from
|
|
27
|
-
export type { ColorClusterConfig } from
|
|
28
|
-
export { setPanelColorPresets } from
|
|
29
|
-
export { colorSchemes } from
|
|
30
|
-
export { panelSettings, SEMANTIC_CSS_NAMES, SEMANTIC_DEFAULTS_ZD } from
|
|
31
|
-
export { GROUP_ORDER, FONT_GROUP_ORDER, SIZE_GROUP_ORDER, GROUP_TITLES } from
|
|
32
|
-
export type { TokenDef, TokenManifest } from
|
|
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";
|
package/dist/astro/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentChildren } from 'preact';
|
|
2
|
-
import type { TierConfig } from
|
|
3
|
-
import { type NumericValue } from
|
|
4
|
-
import type { FlatTabEntry, RowContribution, TokenAddress } from
|
|
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;
|
package/dist/bulk/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { BulkActionBar, DEFAULT_BULK_OPERATIONS, createBulkContribution, isBulkSelectable, isSelectable, numericEntryUnit, numericValueForEntry, transformBulkEntry, } from
|
|
2
|
-
export type { BulkActionBarProps, BulkContributionOptions, BulkOperations, BulkPatchEntry, } from
|
|
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";
|
package/dist/chain/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChainButton, ChainPopover, TOKEN_CHAIN_CONTRIBUTION, TokenChainButton, TokenChainPopover, type TokenChainButtonProps, type TokenChainPopoverProps, } from
|
|
2
|
-
export { TokenChainProvider, useTokenChainContext, type TokenChainContextValue, type TokenChainProviderProps, } from
|
|
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
|
|
3
|
-
import type { TweakState } from
|
|
4
|
-
import { type TokenGraph } from
|
|
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
|
|
3
|
-
import type { RowContribution } from
|
|
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
|
|
9
|
-
import type { TweakState } from
|
|
10
|
-
import { revertEntry, type ColorBaseline } from
|
|
11
|
-
import type { TokenIndex, TokenAddress } from
|
|
12
|
-
import type { RowContribution } from
|
|
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
|
|
3
|
-
import type { ColorBaseline } from
|
|
4
|
-
import type { TweakState } from
|
|
5
|
-
import type { TokenIndex } from
|
|
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;
|
package/dist/changed/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { changedContribution, changedStateContribution, createChangedContribution, revertEntry, } from
|
|
2
|
-
export { ChangedFooter, ChangedFooterContent, COPY_REVERT_MS } from
|
|
3
|
-
export { ChangedOnlyToggle } from
|
|
4
|
-
export { ChangedTabBadge, TabChangedBadge } from
|
|
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
|
|
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
|
|
2
|
-
export { default } from
|
|
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
|
|
2
|
-
export { default } from
|
|
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
|
|
3
|
-
import { type Oklcha } from
|
|
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
|
|
36
|
-
export type { Channel } from
|
|
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
|
|
24
|
-
import type { SemanticValue } from
|
|
25
|
-
export type { SemanticValue } from
|
|
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
|
|
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
|
|
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
|
|
49
|
-
import type { TabConfig } from
|
|
50
|
-
export { DEFAULT_STORAGE_PREFIX, DEFAULT_TOGGLE_EVENT } from
|
|
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
|
|
434
|
-
import type { ColorClusterDataConfig } from
|
|
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
|
|
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
|
|
@@ -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
|
|
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
|
|
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
|
|
2
|
+
import { type TrackedElementRect } from "./pinned-selection-overlay.js";
|
|
3
3
|
export interface ClassEditorPopupProps {
|
|
4
4
|
target: Element | null;
|
|
5
5
|
selectorSummary: string;
|
|
@@ -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
|
|
12
|
-
export { buildStaticSuggestions, buildSuggestions, buildThemeSuggestions, filterSuggestions, STATIC_SUGGESTIONS, } from
|
|
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
|
|
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
|
|
3
|
-
import type { TweakState } from
|
|
4
|
-
import type { CommitTweakStateOptions, TweakStateUpdater } from
|
|
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
|
|
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,8 +1,8 @@
|
|
|
1
|
-
export { findTokensForElement } from
|
|
2
|
-
export type { ElementTokenMatch, ElementTokenPropertyGroup, FindTokensForElementResult, } from
|
|
3
|
-
export { ElementInspectOrchestrator, type ElementInspectOrchestratorProps, } from
|
|
4
|
-
export { ElementInspectOverlay, ELEMENT_INSPECT_PORTAL_MOUNT_ID } from
|
|
5
|
-
export { ElementInspectToggleButton } from
|
|
6
|
-
export { ElementInspectView, type ElementInspectViewProps } from
|
|
7
|
-
export { ElementInspectContext, ELEMENT_INSPECT_TAB_ID, } from
|
|
8
|
-
export type { ElementInspectContextValue } from
|
|
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
|
|
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
|
|
9
|
-
export { ElementPathToggleButton } from
|
|
10
|
-
export { ElementPathContext } from
|
|
11
|
-
export type { ElementPathContextValue } from
|
|
12
|
-
export { buildElementPath, buildElementPathString, formatElementPath, buildUniqueSelector, buildBreadcrumb, } from
|
|
13
|
-
export type { ElementPathResult } from
|
|
14
|
-
export { loadElementPathEnabled, saveElementPathEnabled } from
|
|
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";
|
package/dist/export-modal.d.ts
CHANGED
|
@@ -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
|
|
26
|
-
import { type PanelConfig } from
|
|
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
|
|
18
|
-
import type { TierValueKind } from
|
|
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
|
|
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
|
|
15
|
-
import type { TokenAddress } from
|
|
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;
|
package/dist/history/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { HistoryButtons, HistoryRedoButton, HistoryShortcuts, HistoryUndoButton, type HistoryButtonProps, type HistoryButtonsProps, type HistoryShortcutsProps, } from
|
|
2
|
-
export { HistoryRail, type HistoryRailProps } from
|
|
3
|
-
export { clearSnapshots, getSnapshotKey, isSnapshotState, loadSnapshot, loadSnapshots, removeSnapshot, restoreSnapshotState, saveSnapshot, storageKey_snapshotA, storageKey_snapshotB, useSnapshots, type SnapshotRestoreResult, type SnapshotSlot, type SnapshotSlots, type TweakSnapshot, } from
|
|
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";
|
package/dist/history/rail.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { TweakHistorySnapshot } from
|
|
2
|
-
import type { SnapshotSlot, SnapshotSlots } from
|
|
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
|
|
2
|
-
import type { TweakState } from
|
|
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;
|
package/dist/import-modal.d.ts
CHANGED
|
@@ -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
|
|
24
|
-
import { type PanelConfig } from
|
|
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
|