@takazudo/zdtp 0.4.13 → 0.4.15
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 +143 -0
- package/PORTABLE-CONTRACT.md +366 -94
- package/README.md +218 -96
- package/dist/apply/build-apply-overrides.d.ts +2 -2
- package/dist/apply/compute-hunks.d.ts +23 -0
- package/dist/apply/last-applied.d.ts +5 -0
- package/dist/apply/reconcile-applied.d.ts +19 -0
- package/dist/apply-modal.d.ts +2 -48
- package/dist/astro/host-adapter.js +3 -3
- package/dist/astro/index.js +2 -2
- package/dist/{autoload-state-CfL2VUe1.js → autoload-state-7BQYXI7Y.js} +1 -1
- package/dist/bin/server.js +52 -50
- package/dist/bulk/bulk-actions.d.ts +45 -0
- package/dist/bulk/index.d.ts +2 -0
- package/dist/chain/index.d.ts +2 -0
- package/dist/chain/token-chain-context.d.ts +19 -0
- package/dist/chain/token-chain-popover.d.ts +22 -0
- package/dist/changed/contribution.d.ts +32 -0
- package/dist/changed/footer-content.d.ts +16 -0
- package/dist/changed/index.d.ts +4 -0
- package/dist/changed/tab-badge.d.ts +8 -0
- package/dist/changed/tab-filter.d.ts +8 -0
- package/dist/config/panel-config.d.ts +22 -25
- package/dist/controls/actions-menu-popover.d.ts +2 -0
- package/dist/controls/role-button.d.ts +5 -2
- package/dist/controls/tooltip.d.ts +8 -4
- package/dist/element-inspect/element-inspect-context.d.ts +22 -0
- package/dist/element-inspect/element-inspect-orchestrator.d.ts +17 -0
- package/dist/element-inspect/element-inspect-overlay.d.ts +16 -0
- package/dist/element-inspect/element-inspect-toggle-button.d.ts +3 -0
- package/dist/element-inspect/element-inspect-view.d.ts +6 -0
- package/dist/element-inspect/find-tokens-for-element.d.ts +23 -0
- package/dist/element-inspect/index.d.ts +8 -0
- package/dist/highlight/find-elements.d.ts +14 -3
- package/dist/highlight/highlight-orchestrator.d.ts +7 -3
- package/dist/highlight/highlight-state.d.ts +3 -2
- package/dist/highlight/highlight-toggle-button.d.ts +3 -0
- package/dist/highlight/walk-css-rules.d.ts +2 -0
- package/dist/history/buttons.d.ts +28 -0
- package/dist/history/index.d.ts +3 -0
- package/dist/history/rail.d.ts +13 -0
- package/dist/history/snapshots.d.ts +57 -0
- package/dist/host/host-mutations.d.ts +23 -0
- package/dist/index-BOOmFtJh.js +12165 -0
- package/dist/{index-BAY1JOUl.js → index-C2DIYD0d.js} +2 -2
- package/dist/index.js +14 -14
- package/dist/load-routing-BtCE1hGI.js +547 -0
- package/dist/{manifest-DCReQE0k.js → manifest-DvuKi7I4.js} +11 -7
- package/dist/{panel-config-COHesW2B.js → panel-config-CRf-ONSV.js} +404 -308
- package/dist/picker/alt-click-picker.d.ts +10 -2
- package/dist/picker/arming-coordinator.d.ts +2 -0
- package/dist/picker/index.d.ts +2 -2
- package/dist/search/command-palette.d.ts +21 -0
- package/dist/search/contribution.d.ts +7 -0
- package/dist/search/fuzzy.d.ts +10 -0
- package/dist/search/index.d.ts +4 -0
- package/dist/search/match-bar.d.ts +14 -0
- package/dist/search/search-header.d.ts +7 -0
- package/dist/search/token-search.d.ts +36 -0
- package/dist/server/create-apply-handler.d.ts +33 -0
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +1 -1
- package/dist/shell/dock-mode-switch.d.ts +6 -0
- package/dist/shell/footer.d.ts +1 -0
- package/dist/shell/ghost-idle.d.ts +24 -0
- package/dist/shell/header.d.ts +5 -0
- package/dist/shell/layer-activity.d.ts +6 -0
- package/dist/shell/mini-pill.d.ts +21 -0
- package/dist/shell/regions.d.ts +26 -0
- package/dist/shell/shortcut-dispatcher.d.ts +17 -0
- package/dist/shell/tab-bar.d.ts +17 -0
- package/dist/shell/tab-overflow-popover.d.ts +13 -0
- package/dist/specimen/on-page-specimen.d.ts +19 -0
- package/dist/specimen/preview-glyphs.d.ts +2 -0
- package/dist/specimen/specimen-state.d.ts +12 -0
- package/dist/specimen/specimen-tab-body.d.ts +18 -0
- package/dist/specimen/specimen-toolbar.d.ts +10 -0
- package/dist/specimen/specimen-values.d.ts +9 -0
- package/dist/state/history.d.ts +64 -0
- package/dist/state/persist.d.ts +10 -14
- package/dist/state/transaction.d.ts +24 -0
- package/dist/state/tweak-state.d.ts +16 -0
- package/dist/styles/z-index-tokens.d.ts +2 -0
- package/dist/tabs/color-tab.d.ts +10 -1
- package/dist/tabs/flat/flat-tab.d.ts +27 -0
- package/dist/tabs/flat/index.d.ts +8 -0
- package/dist/tabs/flat/scroll-to-token-row.d.ts +3 -0
- package/dist/tabs/flat/tier-section.d.ts +17 -0
- package/dist/tabs/flat/token-controller.d.ts +23 -0
- package/dist/tabs/flat/token-row.d.ts +12 -0
- package/dist/tabs/flat/types.d.ts +25 -0
- package/dist/tabs/font-tab.d.ts +13 -12
- package/dist/tabs/generic-tab.d.ts +8 -38
- package/dist/tabs/palette/palette-check-view.d.ts +5 -1
- package/dist/tabs/palette/palette-edit-view.d.ts +9 -1
- package/dist/tabs/palette/palette-tab.d.ts +12 -1
- package/dist/tabs/size-tab.d.ts +7 -10
- package/dist/tabs/spacing-tab.d.ts +7 -13
- package/dist/testing.js +3 -3
- package/dist/tokens/tier-model.d.ts +6 -0
- package/dist/{tweak-state-BKNxtHzb.js → tweak-state-BGp_7Tfh.js} +473 -423
- package/dist/utils/numeric-transform.d.ts +32 -0
- package/dist/utils/token-diff.d.ts +25 -0
- package/dist/utils/token-graph.d.ts +23 -0
- package/dist/utils/token-index.d.ts +30 -0
- package/dist/zdtp.css +1 -1
- package/package.json +3 -1
- package/dist/controls/pill-slider-row.d.ts +0 -36
- package/dist/controls/select-row.d.ts +0 -25
- package/dist/controls/slider-row.d.ts +0 -29
- package/dist/controls/text-row.d.ts +0 -27
- package/dist/index-U7Ol7tgA.js +0 -7591
- package/dist/load-routing-D4H2VOl5.js +0 -426
package/dist/tabs/color-tab.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ import type { TabOverrides } from '../apply/tier-resolver';
|
|
|
39
39
|
import { type PanelConfig } from '../config/panel-config';
|
|
40
40
|
import type { TabConfig } from '../tokens/tier-model';
|
|
41
41
|
import type { PersistColor, PersistSecondary } from '../state/persist';
|
|
42
|
+
import { type TokenAddress } from './flat/types';
|
|
42
43
|
interface ColorTabProps {
|
|
43
44
|
/**
|
|
44
45
|
* The color tab's TabConfig. Provides palette + semantic tiers and
|
|
@@ -67,6 +68,14 @@ interface ColorTabProps {
|
|
|
67
68
|
instanceConfig?: PanelConfig;
|
|
68
69
|
/** Live generic-tab overrides used by ramp preview chips and option labels. */
|
|
69
70
|
tabOverrides?: Record<string, TabOverrides>;
|
|
71
|
+
/** Header-filter query applied to palette and semantic rows. */
|
|
72
|
+
searchQuery?: string;
|
|
73
|
+
/** S2 evaluator callback supplied by the mounted panel shell. */
|
|
74
|
+
isChanged?: (address: TokenAddress) => boolean;
|
|
75
|
+
/** Transient active-tab Changed-only filter. */
|
|
76
|
+
changedOnly?: boolean;
|
|
77
|
+
/** Shell transaction callback for one-row revert. */
|
|
78
|
+
onRevert?: (address: TokenAddress) => void;
|
|
70
79
|
}
|
|
71
|
-
export default function ColorTab({ tab, state, persistColor, secondaryTab, secondaryState, persistSecondary, instanceConfig, tabOverrides, }: ColorTabProps): import("preact").JSX.Element;
|
|
80
|
+
export default function ColorTab({ tab, state, persistColor, secondaryTab, secondaryState, persistSecondary, instanceConfig, tabOverrides, searchQuery, isChanged, changedOnly, onRevert, }: ColorTabProps): import("preact").JSX.Element;
|
|
72
81
|
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import { type BulkPatchEntry } from '../../bulk';
|
|
3
|
+
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
4
|
+
import type { TabConfig, TierConfig, TierItem } from '../../tokens/tier-model';
|
|
5
|
+
import { type SharedRowRenderer } from './tier-section';
|
|
6
|
+
import type { RowContribution, TokenAddress } from './types';
|
|
7
|
+
export interface FlatTabProps {
|
|
8
|
+
tab: TabConfig;
|
|
9
|
+
getValue: (address: TokenAddress, item: TierItem) => string;
|
|
10
|
+
setValue: (address: TokenAddress, next: string) => void;
|
|
11
|
+
deleteValue: (address: TokenAddress) => void;
|
|
12
|
+
overrides?: TabOverrides;
|
|
13
|
+
contributions?: readonly RowContribution[];
|
|
14
|
+
/** Header-filter query; implemented as an S3 row contribution. */
|
|
15
|
+
searchQuery?: string;
|
|
16
|
+
/** Transient S7 Changed-only filter; never persisted. */
|
|
17
|
+
changedOnly?: boolean;
|
|
18
|
+
actions?: ComponentChildren;
|
|
19
|
+
className?: string;
|
|
20
|
+
testId?: string;
|
|
21
|
+
sectionTestId?: (tier: TierConfig) => string;
|
|
22
|
+
renderTierBody?: (tier: TierConfig, renderRow: SharedRowRenderer) => ComponentChildren;
|
|
23
|
+
jumpTo?: (address: TokenAddress) => void;
|
|
24
|
+
/** Enables the shared numeric-selection action bar for this tab. */
|
|
25
|
+
onBulkApply?: (patch: readonly BulkPatchEntry[]) => void;
|
|
26
|
+
}
|
|
27
|
+
export default function FlatTab({ tab, getValue, setValue, deleteValue, overrides, contributions, searchQuery, changedOnly, actions, className, testId, sectionTestId, renderTierBody, jumpTo, onBulkApply, }: FlatTabProps): import("preact").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { default as FlatTab } from './flat-tab';
|
|
2
|
+
export { default as TierSection } from './tier-section';
|
|
3
|
+
export { default as TokenRow } from './token-row';
|
|
4
|
+
export { useTokenController, TokenControllerProvider } from './token-controller';
|
|
5
|
+
export { scrollToTokenRow, TOKEN_ROW_FLASH_CLASS } from './scroll-to-token-row';
|
|
6
|
+
export { tokenAddressKey } from './types';
|
|
7
|
+
export type { FlatTabEntry, RowContribution, TokenAddress } from './types';
|
|
8
|
+
export type { TokenController } from './token-controller';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
3
|
+
import type { TierConfig, TierItem } from '../../tokens/tier-model';
|
|
4
|
+
import type { FlatTabEntry, RowContribution, TokenAddress } from './types';
|
|
5
|
+
export type SharedRowRenderer = (item: TierItem) => ComponentChildren;
|
|
6
|
+
export interface TierSectionProps {
|
|
7
|
+
tier: TierConfig;
|
|
8
|
+
entries: readonly FlatTabEntry[];
|
|
9
|
+
overrides: TabOverrides;
|
|
10
|
+
contributions?: readonly RowContribution[];
|
|
11
|
+
testId?: string;
|
|
12
|
+
setValue: (address: TokenAddress, next: string) => void;
|
|
13
|
+
deleteValue: (address: TokenAddress) => void;
|
|
14
|
+
renderTierBody?: (tier: TierConfig, renderRow: SharedRowRenderer) => ComponentChildren;
|
|
15
|
+
}
|
|
16
|
+
declare function TierSection({ tier, entries, overrides, contributions, testId, setValue, deleteValue, renderTierBody, }: TierSectionProps): import("preact").JSX.Element;
|
|
17
|
+
export default TierSection;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type { FlatTabEntry, TokenAddress } from './types';
|
|
3
|
+
export interface TokenController {
|
|
4
|
+
value: string;
|
|
5
|
+
setValue: (next: string) => void;
|
|
6
|
+
revert: () => void;
|
|
7
|
+
kind: FlatTabEntry['kind'];
|
|
8
|
+
entry: FlatTabEntry;
|
|
9
|
+
readonly: boolean;
|
|
10
|
+
jumpTo?: () => void;
|
|
11
|
+
}
|
|
12
|
+
interface TokenControllerRegistry {
|
|
13
|
+
entries: ReadonlyMap<string, FlatTabEntry>;
|
|
14
|
+
setValue: (address: TokenAddress, next: string) => void;
|
|
15
|
+
deleteValue: (address: TokenAddress) => void;
|
|
16
|
+
jumpTo?: (address: TokenAddress) => void;
|
|
17
|
+
}
|
|
18
|
+
interface TokenControllerProviderProps extends TokenControllerRegistry {
|
|
19
|
+
children: ComponentChildren;
|
|
20
|
+
}
|
|
21
|
+
export declare function TokenControllerProvider({ children, ...registry }: TokenControllerProviderProps): import("preact").JSX.Element;
|
|
22
|
+
export declare function useTokenController(address: TokenAddress): TokenController;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
2
|
+
import type { FlatTabEntry, RowContribution, TokenAddress } from './types';
|
|
3
|
+
export interface TokenRowProps {
|
|
4
|
+
entry: FlatTabEntry;
|
|
5
|
+
overrides: TabOverrides;
|
|
6
|
+
contributions?: readonly RowContribution[];
|
|
7
|
+
onChange: (address: TokenAddress, next: string) => void;
|
|
8
|
+
onDelete: (address: TokenAddress) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function TokenRow({ entry, overrides, contributions, onChange, onDelete, }: TokenRowProps): import("preact").JSX.Element | null;
|
|
11
|
+
declare const _default: typeof TokenRow;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentChildren } from 'preact';
|
|
2
|
+
import type { TabConfig, TierConfig, TierItem, TierValueKind } from '../../tokens/tier-model';
|
|
3
|
+
export interface TokenAddress {
|
|
4
|
+
tabId: string;
|
|
5
|
+
tierId: string;
|
|
6
|
+
itemId: string;
|
|
7
|
+
}
|
|
8
|
+
export interface FlatTabEntry {
|
|
9
|
+
address: TokenAddress;
|
|
10
|
+
tab: TabConfig;
|
|
11
|
+
tier: TierConfig;
|
|
12
|
+
item: TierItem;
|
|
13
|
+
value: string;
|
|
14
|
+
kind: TierValueKind['kind'];
|
|
15
|
+
}
|
|
16
|
+
export interface RowContribution {
|
|
17
|
+
id: string;
|
|
18
|
+
filter?: (entry: FlatTabEntry) => boolean;
|
|
19
|
+
leading?: (entry: FlatTabEntry) => ComponentChildren;
|
|
20
|
+
trailing?: (entry: FlatTabEntry) => ComponentChildren;
|
|
21
|
+
tail?: (entry: FlatTabEntry) => ComponentChildren;
|
|
22
|
+
className?: (entry: FlatTabEntry) => string | undefined;
|
|
23
|
+
tierHeadingExtra?: (tier: TierConfig) => ComponentChildren;
|
|
24
|
+
}
|
|
25
|
+
export declare function tokenAddressKey(address: TokenAddress): string;
|
package/dist/tabs/font-tab.d.ts
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
+
import type { PanelConfig } from '../config/panel-config';
|
|
1
2
|
import type { TabConfig } from '../tokens/tier-model';
|
|
2
3
|
import type { TokenOverrides } from '../state/tweak-state';
|
|
3
4
|
import type { PersistFont } from '../state/persist';
|
|
5
|
+
import type { RowContribution } from './flat/types';
|
|
6
|
+
import type { BulkPatchEntry } from '../bulk';
|
|
4
7
|
interface FontTabProps {
|
|
5
8
|
tab: TabConfig;
|
|
6
9
|
state: TokenOverrides;
|
|
7
10
|
persistFont: PersistFont;
|
|
11
|
+
instanceConfig?: PanelConfig;
|
|
12
|
+
/** Whether the read-only specimen is currently portaled into the host page. */
|
|
13
|
+
renderOnPage?: boolean;
|
|
14
|
+
/** Called when the toolbar toggles the page-level specimen. */
|
|
15
|
+
onRenderOnPageChange?: (enabled: boolean) => void;
|
|
16
|
+
searchQuery?: string;
|
|
17
|
+
onBulkApply?: (patch: readonly BulkPatchEntry[]) => void;
|
|
18
|
+
changedContribution?: RowContribution;
|
|
19
|
+
changedOnly?: boolean;
|
|
8
20
|
}
|
|
9
|
-
|
|
10
|
-
* Font tab — TabConfig.tiers driven.
|
|
11
|
-
*
|
|
12
|
-
* Renders all tiers flat in declaration order. Each tier has one heading
|
|
13
|
-
* (div role=heading aria-level=3). No progressive disclosure (details/summary).
|
|
14
|
-
* When a tier has `referencesTier`, its items render `TierRefSelector`.
|
|
15
|
-
*
|
|
16
|
-
* The persist path: `state.typography` is a flat `TokenOverrides` map keyed
|
|
17
|
-
* by item id. Reference values store the target item id; apply emits
|
|
18
|
-
* `var(--targetCssVar)`.
|
|
19
|
-
*/
|
|
20
|
-
export default function FontTab({ tab, state, persistFont }: FontTabProps): import("preact").JSX.Element;
|
|
21
|
+
export default function FontTab({ tab, state, persistFont, instanceConfig, renderOnPage: renderOnPageProp, onRenderOnPageChange, searchQuery, onBulkApply, changedContribution, changedOnly, }: FontTabProps): import("preact").JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -1,44 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
* GenericTab — renders any TabConfig whose id is not one of the reserved ids
|
|
3
|
-
* (color / font / spacing / size). Reserved ids continue to dispatch to their
|
|
4
|
-
* dedicated tab components until Wave 5 migrates them.
|
|
5
|
-
*
|
|
6
|
-
* Renders the tab's tiers in declaration order. Each tier shows a heading and
|
|
7
|
-
* its items via kind-appropriate controls:
|
|
8
|
-
*
|
|
9
|
-
* length / number → number input with unit suffix (numeric range)
|
|
10
|
-
* select → native <select>
|
|
11
|
-
* text → free-form text input
|
|
12
|
-
* color → native <input type="color"> by default (emits hex); with format:'oklch' → OKLCH picker emitting an oklch() string. Color values therefore persist as hex OR oklch(), not hex-only.
|
|
13
|
-
*
|
|
14
|
-
* For items in a tier with `referencesTier`, TierRefSelector is rendered
|
|
15
|
-
* instead, so the user can either pick a tier-1 item id (emitted as
|
|
16
|
-
* `var(--target-cssvar)` at apply time) or flip the item back to literal mode.
|
|
17
|
-
*/
|
|
1
|
+
import type { TabOverrides } from '../apply/tier-resolver';
|
|
18
2
|
import type { TabConfig } from '../tokens/tier-model';
|
|
19
|
-
import {
|
|
3
|
+
import type { RowContribution } from './flat/types';
|
|
4
|
+
import type { BulkPatchEntry } from '../bulk';
|
|
20
5
|
export interface GenericTabProps {
|
|
21
|
-
/** The tab configuration to render. Must NOT be a reserved id. */
|
|
22
6
|
tab: TabConfig;
|
|
23
|
-
/**
|
|
24
|
-
* Current per-tier, per-item overrides for this tab.
|
|
25
|
-
*
|
|
26
|
-
* Shape: { [tierId]: { [itemId]: overrideValue } }
|
|
27
|
-
*
|
|
28
|
-
* When an item has no override, its `TierItem.default` is used.
|
|
29
|
-
*/
|
|
30
7
|
overrides: TabOverrides;
|
|
31
|
-
/** Called when the user commits a change to any item. `next: undefined`
|
|
32
|
-
* (only reachable for ref-tier items) means "drop the stored override for
|
|
33
|
-
* this item" rather than writing a literal value. */
|
|
34
8
|
onChange: (tierId: string, itemId: string, next: string | undefined) => void;
|
|
9
|
+
searchQuery?: string;
|
|
10
|
+
onBulkApply?: (patch: readonly BulkPatchEntry[]) => void;
|
|
11
|
+
changedContribution?: RowContribution;
|
|
12
|
+
changedOnly?: boolean;
|
|
35
13
|
}
|
|
36
|
-
|
|
37
|
-
* Renders a non-reserved tab (any TabConfig whose id is not color/font/
|
|
38
|
-
* spacing/size). Dispatches each tier to TierSection, which in turn renders
|
|
39
|
-
* item editors by value kind.
|
|
40
|
-
*
|
|
41
|
-
* Reserved-id tabs (color/font/spacing/size) are handled by their dedicated
|
|
42
|
-
* components until Wave 5 migrates them to consume TabConfig.tiers.
|
|
43
|
-
*/
|
|
44
|
-
export default function GenericTab({ tab, overrides, onChange }: GenericTabProps): import("preact").JSX.Element;
|
|
14
|
+
export default function GenericTab({ tab, overrides, onChange, searchQuery, onBulkApply, changedContribution, changedOnly, }: GenericTabProps): import("preact").JSX.Element;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { TabConfig } from '../../tokens/tier-model';
|
|
2
2
|
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
3
|
+
import type { TokenAddress } from '../flat/types';
|
|
3
4
|
export interface PaletteCheckViewProps {
|
|
4
5
|
tab: TabConfig;
|
|
5
6
|
overrides: TabOverrides;
|
|
6
7
|
onChange: (tierId: string, itemId: string, next: string) => void;
|
|
8
|
+
searchQuery?: string;
|
|
9
|
+
changedOnly?: boolean;
|
|
10
|
+
isChanged?: (address: TokenAddress) => boolean;
|
|
7
11
|
}
|
|
8
|
-
export default function PaletteCheckView({ tab, overrides }: PaletteCheckViewProps): import("preact").JSX.Element;
|
|
12
|
+
export default function PaletteCheckView({ tab, overrides, searchQuery, changedOnly, isChanged, }: PaletteCheckViewProps): import("preact").JSX.Element;
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import type { TabConfig } from '../../tokens/tier-model';
|
|
38
38
|
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
39
|
+
import type { TokenAddress } from '../flat/types';
|
|
39
40
|
export interface PaletteEditViewProps {
|
|
40
41
|
tab: TabConfig;
|
|
41
42
|
overrides: TabOverrides;
|
|
@@ -51,5 +52,12 @@ export interface PaletteEditViewProps {
|
|
|
51
52
|
* per-item `onChange`).
|
|
52
53
|
*/
|
|
53
54
|
onCommitBatch?: (tierId: string, patch: Record<string, string>) => void;
|
|
55
|
+
searchQuery?: string;
|
|
56
|
+
/** Transient active-tab Changed-only filter. */
|
|
57
|
+
changedOnly?: boolean;
|
|
58
|
+
/** S2 evaluator callback for palette-step addresses. */
|
|
59
|
+
isChanged?: (address: TokenAddress) => boolean;
|
|
60
|
+
jumpAddress?: TokenAddress | null;
|
|
61
|
+
onJumpAddressHandled?: (address: TokenAddress) => void;
|
|
54
62
|
}
|
|
55
|
-
export default function PaletteEditView({ tab, overrides, onChange, onCommitBatch }: PaletteEditViewProps): import("preact").JSX.Element;
|
|
63
|
+
export default function PaletteEditView({ tab, overrides, onChange, onCommitBatch, searchQuery, changedOnly, isChanged, jumpAddress, onJumpAddressHandled, }: PaletteEditViewProps): import("preact").JSX.Element;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import type { TabConfig, TierConfig, TierItem } from '../../tokens/tier-model';
|
|
17
17
|
import type { TabOverrides } from '../../apply/tier-resolver';
|
|
18
|
+
import type { TokenAddress } from '../flat/types';
|
|
18
19
|
/** Returns tiers in declaration order — the canonical group ordering. */
|
|
19
20
|
export declare function groupPaletteTiers(tab: TabConfig): readonly TierConfig[];
|
|
20
21
|
/** Returns all items across all tiers flattened into a single array. */
|
|
@@ -32,5 +33,15 @@ export interface PaletteTabProps {
|
|
|
32
33
|
* Optional — Check mode and older callers don't supply it.
|
|
33
34
|
*/
|
|
34
35
|
onCommitBatch?: (tierId: string, patch: Record<string, string>) => void;
|
|
36
|
+
/** Header-filter query shared with the active tab. */
|
|
37
|
+
searchQuery?: string;
|
|
38
|
+
/** Transient active-tab Changed-only filter. */
|
|
39
|
+
changedOnly?: boolean;
|
|
40
|
+
/** S2 evaluator callback for palette-step addresses. */
|
|
41
|
+
isChanged?: (address: TokenAddress) => boolean;
|
|
42
|
+
/** Address selected by the command palette. */
|
|
43
|
+
jumpAddress?: TokenAddress | null;
|
|
44
|
+
/** Called after the Edit view has opened and selected the requested step. */
|
|
45
|
+
onJumpAddressHandled?: (address: TokenAddress) => void;
|
|
35
46
|
}
|
|
36
|
-
export default function PaletteTab({ tab, overrides, onChange, onCommitBatch }: PaletteTabProps): import("preact").JSX.Element;
|
|
47
|
+
export default function PaletteTab({ tab, overrides, onChange, onCommitBatch, searchQuery, changedOnly, isChanged, jumpAddress, onJumpAddressHandled, }: PaletteTabProps): import("preact").JSX.Element;
|
package/dist/tabs/size-tab.d.ts
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import type { TabConfig } from '../tokens/tier-model';
|
|
2
2
|
import type { TokenOverrides } from '../state/tweak-state';
|
|
3
3
|
import type { PersistSize } from '../state/persist';
|
|
4
|
+
import type { RowContribution } from './flat/types';
|
|
5
|
+
import type { BulkPatchEntry } from '../bulk';
|
|
4
6
|
interface SizeTabProps {
|
|
5
7
|
tab: TabConfig;
|
|
6
8
|
state: TokenOverrides;
|
|
7
9
|
persistSize: PersistSize;
|
|
10
|
+
searchQuery?: string;
|
|
11
|
+
onBulkApply?: (patch: readonly BulkPatchEntry[]) => void;
|
|
12
|
+
changedContribution?: RowContribution;
|
|
13
|
+
changedOnly?: boolean;
|
|
8
14
|
}
|
|
9
|
-
|
|
10
|
-
* Size tab — TabConfig.tiers driven.
|
|
11
|
-
*
|
|
12
|
-
* Renders all tiers flat in declaration order. Each tier has one heading
|
|
13
|
-
* (div role=heading aria-level=3). No progressive disclosure (details/summary).
|
|
14
|
-
* When a tier has `referencesTier`, items render TierRefSelector.
|
|
15
|
-
* Pill toggle is preserved: `item.pill` drives a checkbox + disabled slider
|
|
16
|
-
* exactly as the legacy PillSliderRow did.
|
|
17
|
-
*/
|
|
18
|
-
export default function SizeTab({ tab, state, persistSize }: SizeTabProps): import("preact").JSX.Element;
|
|
15
|
+
export default function SizeTab({ tab, state, persistSize, searchQuery, onBulkApply, changedContribution, changedOnly, }: SizeTabProps): import("preact").JSX.Element;
|
|
19
16
|
export {};
|
|
@@ -1,22 +1,16 @@
|
|
|
1
1
|
import type { TabConfig } from '../tokens/tier-model';
|
|
2
2
|
import type { TokenOverrides } from '../state/tweak-state';
|
|
3
3
|
import type { PersistSpacing } from '../state/persist';
|
|
4
|
+
import type { RowContribution } from './flat/types';
|
|
5
|
+
import type { BulkPatchEntry } from '../bulk';
|
|
4
6
|
interface SpacingTabProps {
|
|
5
7
|
tab: TabConfig;
|
|
6
8
|
state: TokenOverrides;
|
|
7
9
|
persistSpacing: PersistSpacing;
|
|
10
|
+
searchQuery?: string;
|
|
11
|
+
onBulkApply?: (patch: readonly BulkPatchEntry[]) => void;
|
|
12
|
+
changedContribution?: RowContribution;
|
|
13
|
+
changedOnly?: boolean;
|
|
8
14
|
}
|
|
9
|
-
|
|
10
|
-
* Spacing tab — TabConfig.tiers driven.
|
|
11
|
-
*
|
|
12
|
-
* Renders all tiers flat in declaration order. Each tier has one heading
|
|
13
|
-
* (div role=heading aria-level=3). No progressive disclosure (details/summary).
|
|
14
|
-
* When a tier has `referencesTier`, its items render `TierRefSelector`
|
|
15
|
-
* instead of the kind-specific control.
|
|
16
|
-
*
|
|
17
|
-
* The persist path remains the same: `state.spacing` is a flat `TokenOverrides`
|
|
18
|
-
* map keyed by item id. Reference values are stored as the target item id; the
|
|
19
|
-
* apply pipeline emits `var(--targetCssVar)`.
|
|
20
|
-
*/
|
|
21
|
-
export default function SpacingTab({ tab, state, persistSpacing }: SpacingTabProps): import("preact").JSX.Element;
|
|
15
|
+
export default function SpacingTab({ tab, state, persistSpacing, searchQuery, onBulkApply, changedContribution, changedOnly, }: SpacingTabProps): import("preact").JSX.Element;
|
|
22
16
|
export {};
|
package/dist/testing.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as r, c as _, d as i, e as n, f as g, h as R, a as p } from "./panel-config-
|
|
2
|
-
import { a as l, b as y, l as O } from "./tweak-state-
|
|
3
|
-
import { F as K, G as E, a as S, S as u } from "./manifest-
|
|
1
|
+
import { _ as r, c as _, d as i, e as n, f as g, h as R, a as p } from "./panel-config-CRf-ONSV.js";
|
|
2
|
+
import { a as l, b as y, l as O } from "./tweak-state-BGp_7Tfh.js";
|
|
3
|
+
import { F as K, G as E, a as S, S as u } from "./manifest-DvuKi7I4.js";
|
|
4
4
|
async function s(e, a) {
|
|
5
5
|
await e.fill(a), await e.dispatchEvent("input");
|
|
6
6
|
}
|
|
@@ -17,6 +17,7 @@ export type TierValueKind = {
|
|
|
17
17
|
} | {
|
|
18
18
|
kind: 'number';
|
|
19
19
|
step: number;
|
|
20
|
+
unit?: string;
|
|
20
21
|
} | {
|
|
21
22
|
kind: 'select';
|
|
22
23
|
options: readonly string[];
|
|
@@ -135,6 +136,11 @@ export interface TierConfig {
|
|
|
135
136
|
tab?: string;
|
|
136
137
|
tier: string;
|
|
137
138
|
}[];
|
|
139
|
+
/** Optional visual treatment for this tier's values. Omission preserves the
|
|
140
|
+
* ordinary flat token-row rendering. */
|
|
141
|
+
preview?: 'size' | 'line-height' | 'family' | 'weight' | 'bar' | 'radius' | 'duration';
|
|
142
|
+
/** Font-size custom property used as the line-height specimen's base size. */
|
|
143
|
+
previewBase?: string;
|
|
138
144
|
}
|
|
139
145
|
export interface ColorClusterExtras {
|
|
140
146
|
id: string;
|