@takazudo/zdtp 0.4.1 → 0.4.3
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 +63 -0
- package/README.md +78 -25
- package/dist/apply/apply-token-overrides.d.ts +0 -1
- package/dist/apply/build-apply-overrides.d.ts +4 -3
- package/dist/apply/route-tokens-to-files.d.ts +0 -1
- package/dist/apply/tier-resolver.d.ts +0 -1
- package/dist/apply-modal.d.ts +0 -1
- package/dist/astro/DesignTokenPanelHost.astro +2 -4
- package/dist/astro/host-adapter.d.ts +0 -1
- package/dist/astro/host-adapter.js +69 -46
- package/dist/astro/index.d.ts +0 -1
- package/dist/astro/index.js +1 -1
- package/dist/autoload-state-B1MWY_Pp.js +46 -0
- package/dist/bin/cors.d.ts +0 -1
- package/dist/bin/parse-args.d.ts +0 -1
- package/dist/bin/server.d.ts +0 -1
- package/dist/bin/server.js +1 -1
- package/dist/components/color-picker/color-field.d.ts +0 -1
- package/dist/components/color-picker/color-picker.d.ts +12 -3
- package/dist/components/color-picker/custom-slider.d.ts +0 -1
- package/dist/components/color-picker/index.d.ts +0 -1
- package/dist/components/palette-chart/index.d.ts +0 -1
- package/dist/components/palette-chart/palette-chart.d.ts +0 -1
- package/dist/config/cluster-config.d.ts +0 -1
- package/dist/config/color-scheme-utils.d.ts +0 -1
- package/dist/config/color-schemes.d.ts +0 -1
- package/dist/config/panel-config.d.ts +19 -1
- package/dist/controls/dismiss-layer.d.ts +55 -0
- package/dist/controls/pill-slider-row.d.ts +0 -1
- package/dist/controls/role-button.d.ts +0 -1
- package/dist/controls/sanitize-css-value.d.ts +0 -1
- package/dist/controls/select-row.d.ts +0 -1
- package/dist/controls/slider-row.d.ts +0 -1
- package/dist/controls/text-row.d.ts +0 -1
- package/dist/controls/tier-ref-selector.d.ts +0 -1
- package/dist/controls/token-label.d.ts +0 -1
- package/dist/controls/tooltip.d.ts +0 -1
- package/dist/controls/use-dialog-backdrop-close.d.ts +32 -0
- package/dist/element-path/build-element-path.d.ts +0 -1
- package/dist/element-path/element-path-context.d.ts +0 -1
- package/dist/element-path/element-path-orchestrator.d.ts +0 -1
- package/dist/element-path/element-path-state.d.ts +3 -3
- package/dist/element-path/element-path-toast.d.ts +0 -1
- package/dist/element-path/element-path-toggle-button.d.ts +0 -1
- package/dist/element-path/index.d.ts +0 -1
- package/dist/element-path/inspector-overlay.d.ts +0 -1
- package/dist/export-modal.d.ts +0 -1
- package/dist/highlight/find-elements.d.ts +0 -1
- package/dist/highlight/highlight-orchestrator.d.ts +0 -1
- package/dist/highlight/highlight-overlay.d.ts +0 -1
- package/dist/highlight/highlight-settings-popover.d.ts +0 -1
- package/dist/highlight/highlight-state.d.ts +0 -1
- package/dist/highlight/highlight-toggle-button.d.ts +0 -1
- package/dist/import-modal.d.ts +0 -1
- package/dist/index.d.ts +39 -1
- package/dist/index.js +3067 -3956
- package/dist/{load-routing-XyKgftpe.js → load-routing-DtNTKoLW.js} +1 -1
- package/dist/panel-config-3tBEHjvZ.js +493 -0
- package/dist/panel.d.ts +0 -1
- package/dist/server/create-apply-handler.d.ts +0 -1
- package/dist/server/index.d.ts +0 -1
- package/dist/server/index.js +1 -1
- package/dist/server/load-routing.d.ts +0 -1
- package/dist/server/path-safety.d.ts +0 -1
- package/dist/server/serialize-write.d.ts +0 -1
- package/dist/state/autoload-state.d.ts +91 -0
- package/dist/state/persist.d.ts +0 -3
- package/dist/state/tweak-state.d.ts +47 -7
- package/dist/styles/z-index-tokens.d.ts +35 -0
- package/dist/tabs/_generic-item-editor.d.ts +0 -1
- package/dist/tabs/color-tab.d.ts +7 -5
- package/dist/tabs/font-tab.d.ts +0 -1
- package/dist/tabs/generic-tab.d.ts +1 -2
- package/dist/tabs/palette/palette-check-view.d.ts +0 -1
- package/dist/tabs/palette/palette-edit-view.d.ts +0 -1
- package/dist/tabs/palette/palette-readout.d.ts +0 -1
- package/dist/tabs/palette/palette-tab.d.ts +0 -1
- package/dist/tabs/size-tab.d.ts +0 -1
- package/dist/tabs/spacing-tab.d.ts +0 -1
- package/dist/testing.d.ts +0 -1
- package/dist/testing.js +2 -2
- package/dist/tokens/manifest.d.ts +0 -1
- package/dist/tokens/tier-model.d.ts +0 -1
- package/dist/tweak-state-BEx1SHu7.js +1773 -0
- package/dist/utils/color-convert.d.ts +0 -1
- package/dist/utils/color-hsla.d.ts +0 -1
- package/dist/utils/color-oklch.d.ts +0 -1
- package/dist/utils/copy-to-clipboard.d.ts +0 -1
- package/dist/utils/design-token-serde.d.ts +2 -2
- package/dist/utils/palette-curve.d.ts +0 -1
- package/dist/utils/structural-equal.d.ts +0 -1
- package/dist/utils/use-portal-mount.d.ts +0 -1
- package/dist/utils/wcag-contrast.d.ts +0 -1
- package/dist/zdtp.css +1 -1
- package/package.json +24 -11
- package/dist/apply/apply-token-overrides.d.ts.map +0 -1
- package/dist/apply/build-apply-overrides.d.ts.map +0 -1
- package/dist/apply/route-tokens-to-files.d.ts.map +0 -1
- package/dist/apply/tier-resolver.d.ts.map +0 -1
- package/dist/apply-modal.d.ts.map +0 -1
- package/dist/astro/host-adapter.d.ts.map +0 -1
- package/dist/astro/index.d.ts.map +0 -1
- package/dist/bin/cors.d.ts.map +0 -1
- package/dist/bin/parse-args.d.ts.map +0 -1
- package/dist/bin/server.d.ts.map +0 -1
- package/dist/components/color-picker/color-field.d.ts.map +0 -1
- package/dist/components/color-picker/color-picker.d.ts.map +0 -1
- package/dist/components/color-picker/custom-slider.d.ts.map +0 -1
- package/dist/components/color-picker/index.d.ts.map +0 -1
- package/dist/components/palette-chart/index.d.ts.map +0 -1
- package/dist/components/palette-chart/palette-chart.d.ts.map +0 -1
- package/dist/config/cluster-config.d.ts.map +0 -1
- package/dist/config/color-scheme-utils.d.ts.map +0 -1
- package/dist/config/color-schemes.d.ts.map +0 -1
- package/dist/config/panel-config.d.ts.map +0 -1
- package/dist/controls/pill-slider-row.d.ts.map +0 -1
- package/dist/controls/role-button.d.ts.map +0 -1
- package/dist/controls/sanitize-css-value.d.ts.map +0 -1
- package/dist/controls/select-row.d.ts.map +0 -1
- package/dist/controls/slider-row.d.ts.map +0 -1
- package/dist/controls/text-row.d.ts.map +0 -1
- package/dist/controls/tier-ref-selector.d.ts.map +0 -1
- package/dist/controls/token-label.d.ts.map +0 -1
- package/dist/controls/tooltip.d.ts.map +0 -1
- package/dist/element-path/build-element-path.d.ts.map +0 -1
- package/dist/element-path/element-path-context.d.ts.map +0 -1
- package/dist/element-path/element-path-orchestrator.d.ts.map +0 -1
- package/dist/element-path/element-path-state.d.ts.map +0 -1
- package/dist/element-path/element-path-toast.d.ts.map +0 -1
- package/dist/element-path/element-path-toggle-button.d.ts.map +0 -1
- package/dist/element-path/index.d.ts.map +0 -1
- package/dist/element-path/inspector-overlay.d.ts.map +0 -1
- package/dist/export-modal.d.ts.map +0 -1
- package/dist/highlight/find-elements.d.ts.map +0 -1
- package/dist/highlight/highlight-orchestrator.d.ts.map +0 -1
- package/dist/highlight/highlight-overlay.d.ts.map +0 -1
- package/dist/highlight/highlight-settings-popover.d.ts.map +0 -1
- package/dist/highlight/highlight-state.d.ts.map +0 -1
- package/dist/highlight/highlight-toggle-button.d.ts.map +0 -1
- package/dist/import-modal.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/panel-config-066BPYJD.js +0 -411
- package/dist/panel.d.ts.map +0 -1
- package/dist/server/create-apply-handler.d.ts.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/load-routing.d.ts.map +0 -1
- package/dist/server/path-safety.d.ts.map +0 -1
- package/dist/server/serialize-write.d.ts.map +0 -1
- package/dist/state/persist.d.ts.map +0 -1
- package/dist/state/tweak-state.d.ts.map +0 -1
- package/dist/tabs/_generic-item-editor.d.ts.map +0 -1
- package/dist/tabs/color-tab.d.ts.map +0 -1
- package/dist/tabs/font-tab.d.ts.map +0 -1
- package/dist/tabs/generic-tab.d.ts.map +0 -1
- package/dist/tabs/palette/palette-check-view.d.ts.map +0 -1
- package/dist/tabs/palette/palette-edit-view.d.ts.map +0 -1
- package/dist/tabs/palette/palette-readout.d.ts.map +0 -1
- package/dist/tabs/palette/palette-tab.d.ts.map +0 -1
- package/dist/tabs/size-tab.d.ts.map +0 -1
- package/dist/tabs/spacing-tab.d.ts.map +0 -1
- package/dist/testing.d.ts.map +0 -1
- package/dist/tokens/manifest.d.ts.map +0 -1
- package/dist/tokens/tier-model.d.ts.map +0 -1
- package/dist/tweak-state-Do5gj6Nw.js +0 -730
- package/dist/utils/color-convert.d.ts.map +0 -1
- package/dist/utils/color-hsla.d.ts.map +0 -1
- package/dist/utils/color-oklch.d.ts.map +0 -1
- package/dist/utils/copy-to-clipboard.d.ts.map +0 -1
- package/dist/utils/design-token-serde.d.ts.map +0 -1
- package/dist/utils/palette-curve.d.ts.map +0 -1
- package/dist/utils/structural-equal.d.ts.map +0 -1
- package/dist/utils/use-portal-mount.d.ts.map +0 -1
- package/dist/utils/wcag-contrast.d.ts.map +0 -1
|
@@ -132,4 +132,3 @@ export declare function resolvePrimaryColorCluster(tabs: readonly TabConfig[]):
|
|
|
132
132
|
* `ColorClusterDataConfig`. Returns `null` when no secondary color tab exists.
|
|
133
133
|
*/
|
|
134
134
|
export declare function resolveSecondaryColorClusterFromTabs(tabs: readonly TabConfig[]): ColorClusterDataConfig | null;
|
|
135
|
-
//# sourceMappingURL=cluster-config.d.ts.map
|
|
@@ -102,4 +102,3 @@ export declare function resolveSemanticColors(scheme: ColorScheme): Record<strin
|
|
|
102
102
|
export declare function schemeToCssPairs(scheme: ColorScheme): [string, string][];
|
|
103
103
|
export declare function generateCssCustomProperties(): string;
|
|
104
104
|
export declare function generateLightDarkCssProperties(): string;
|
|
105
|
-
//# sourceMappingURL=color-scheme-utils.d.ts.map
|
|
@@ -337,6 +337,17 @@ export declare function registerPostConfigureHook(hook: () => void): void;
|
|
|
337
337
|
* called `configurePanel`.
|
|
338
338
|
*/
|
|
339
339
|
export declare function getPanelConfig(): PanelConfig;
|
|
340
|
+
/**
|
|
341
|
+
* Return the configs of ALL registered panel instances, in registration order.
|
|
342
|
+
* Returns an empty array when no instance has been configured yet.
|
|
343
|
+
*
|
|
344
|
+
* Used by the Astro lifecycle handlers (unmountForSwap / reapplyFromStorage)
|
|
345
|
+
* to loop every mounted instance rather than only the default one. Without
|
|
346
|
+
* this, non-default panels have their DOM roots removed by Astro's body swap
|
|
347
|
+
* WITHOUT `render(null, root)` being called, so their useEffect cleanups never
|
|
348
|
+
* fire and window/document listeners accumulate per soft navigation.
|
|
349
|
+
*/
|
|
350
|
+
export declare function getAllPanelConfigs(): PanelConfig[];
|
|
340
351
|
/**
|
|
341
352
|
* Resolve the registered config for a SPECIFIC instance by its `storagePrefix`
|
|
342
353
|
* (=== `instanceId`), or `null` when no such instance is registered.
|
|
@@ -398,6 +409,14 @@ export declare function storageKey_density(cfg: PanelConfig): string;
|
|
|
398
409
|
* continuity.
|
|
399
410
|
*/
|
|
400
411
|
export declare function storageKey_visible(cfg: PanelConfig): string;
|
|
412
|
+
/**
|
|
413
|
+
* Adapter-level owner-autoload intent flag, paired with `:visible`.
|
|
414
|
+
*
|
|
415
|
+
* Marks this browser as the site-owner device so the host-adapter eagerly
|
|
416
|
+
* loads the bundle on every subsequent visit. Uses the same `:` separator as
|
|
417
|
+
* `:visible` (distinct from the `-` separator on all other derived keys).
|
|
418
|
+
*/
|
|
419
|
+
export declare function storageKey_autoload(cfg: PanelConfig): string;
|
|
401
420
|
/** DOM id of the root element the Preact panel tree mounts into. */
|
|
402
421
|
export declare function panelRootId(cfg: PanelConfig): string;
|
|
403
422
|
/**
|
|
@@ -475,4 +494,3 @@ export declare function resolveApplyRouting(cfg?: PanelConfig): ApplyRoutingMap;
|
|
|
475
494
|
* registry level and merged into the first instance to be configured.
|
|
476
495
|
*/
|
|
477
496
|
export declare function setPanelColorPresets(presets: Record<string, ColorScheme>): void;
|
|
478
|
-
//# sourceMappingURL=panel-config.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dismiss-layer stack — shared Escape arbitration for the panel's layered
|
|
3
|
+
* popovers (#446).
|
|
4
|
+
*
|
|
5
|
+
* Problem it solves
|
|
6
|
+
* -----------------
|
|
7
|
+
* The panel stacks several dismissable surfaces on top of each other:
|
|
8
|
+
* a ColorPicker popover, the HighlightSettingsPopover (which can itself host a
|
|
9
|
+
* nested ColorPicker), and the PaletteSelector listbox — plus the panel shell
|
|
10
|
+
* underneath. Each surface used to register its OWN `document` keydown listener
|
|
11
|
+
* that closed it on Escape. Because they were all bound to `document`, a single
|
|
12
|
+
* Escape fired EVERY listener at once: the popover closed AND the panel torn
|
|
13
|
+
* down, and with a nested picker all three layers collapsed on one keypress.
|
|
14
|
+
*
|
|
15
|
+
* The fix is a single, shared arbiter. Every dismissable JS-managed popover
|
|
16
|
+
* registers a layer here instead of adding its own key listener. One
|
|
17
|
+
* capture-phase `keydown` listener on `document` routes Escape to exactly ONE
|
|
18
|
+
* layer — the topmost — and marks the event handled via `preventDefault()`.
|
|
19
|
+
* Base surfaces that keep their own listener (the panel shell) bail when they
|
|
20
|
+
* see `event.defaultPrevented`, so one Escape never closes two layers.
|
|
21
|
+
*
|
|
22
|
+
* Native `<dialog>` modals (Export / Import / Apply) are intentionally NOT
|
|
23
|
+
* layers here: the browser already gives them their own top-layer Escape
|
|
24
|
+
* handling. The panel guards against those separately via its modal-open flags.
|
|
25
|
+
*
|
|
26
|
+
* Topmost selection
|
|
27
|
+
* -----------------
|
|
28
|
+
* "Topmost" is resolved by DOM depth, not registration order: the layer whose
|
|
29
|
+
* element is the deepest descendant wins (a nested popover's container is a DOM
|
|
30
|
+
* descendant of its host popover's container). This is robust regardless of the
|
|
31
|
+
* order in which effects register the layers (child effects run before parent
|
|
32
|
+
* effects in Preact), which matters for the ColorPicker-inside-
|
|
33
|
+
* HighlightSettingsPopover case. When elements are unrelated or unavailable it
|
|
34
|
+
* falls back to the most-recently-registered layer.
|
|
35
|
+
*/
|
|
36
|
+
export interface DismissLayerOptions {
|
|
37
|
+
/**
|
|
38
|
+
* Invoked when this layer is the topmost and Escape is pressed. Should close
|
|
39
|
+
* the layer (and may restore focus to its trigger).
|
|
40
|
+
*/
|
|
41
|
+
onEscape: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the layer's root element, used to resolve DOM depth when several
|
|
44
|
+
* layers are open at once. May return null before the element mounts.
|
|
45
|
+
*/
|
|
46
|
+
getElement: () => HTMLElement | null;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Register a dismiss layer. Returns an unregister function to call on unmount.
|
|
50
|
+
*/
|
|
51
|
+
export declare function pushDismissLayer(options: DismissLayerOptions): () => void;
|
|
52
|
+
/** Number of currently-registered layers (test/introspection helper). */
|
|
53
|
+
export declare function dismissLayerCount(): number;
|
|
54
|
+
/** Clear all registered layers. Test-only reset between cases. */
|
|
55
|
+
export declare function __resetDismissLayersForTests(): void;
|
|
@@ -34,4 +34,3 @@ export interface PillSliderRowProps {
|
|
|
34
34
|
declare function PillSliderRow({ token, value, onChange }: PillSliderRowProps): import("preact").JSX.Element;
|
|
35
35
|
declare const _default: typeof PillSliderRow;
|
|
36
36
|
export default _default;
|
|
37
|
-
//# sourceMappingURL=pill-slider-row.d.ts.map
|
|
@@ -15,4 +15,3 @@ export interface RoleButtonProps {
|
|
|
15
15
|
'aria-label'?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function RoleButton({ children, onClick, className, 'aria-disabled': ariaDisabled, ariaProps, tabIndex, id, title, 'aria-label': ariaLabel, }: RoleButtonProps): JSX.Element;
|
|
18
|
-
//# sourceMappingURL=role-button.d.ts.map
|
|
@@ -36,4 +36,3 @@ export interface TierRefSelectorProps {
|
|
|
36
36
|
declare function TierRefSelector({ tab, tierId, itemId, value, onChange, previewValueFor }: TierRefSelectorProps): import("preact").JSX.Element;
|
|
37
37
|
declare const _default: typeof TierRefSelector;
|
|
38
38
|
export default _default;
|
|
39
|
-
//# sourceMappingURL=tier-ref-selector.d.ts.map
|
|
@@ -14,4 +14,3 @@ export interface TokenLabelProps {
|
|
|
14
14
|
declare function TokenLabelInner({ cssVar, label, className }: TokenLabelProps): import("preact").JSX.Element;
|
|
15
15
|
export declare const TokenLabel: typeof TokenLabelInner;
|
|
16
16
|
export default TokenLabel;
|
|
17
|
-
//# sourceMappingURL=token-label.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useDialogBackdropClose — gesture-aware backdrop dismissal for native
|
|
3
|
+
* `<dialog>` modals (#446, finding F14).
|
|
4
|
+
*
|
|
5
|
+
* The naive backdrop check tests only the *click* coordinates against the
|
|
6
|
+
* dialog rect: `if (clientX < rect.left || ...) dialog.close()`. That misfires
|
|
7
|
+
* on a text-selection drag — when the user presses inside a selectable region
|
|
8
|
+
* (the export JSON block, the import textarea, the apply preview) and releases
|
|
9
|
+
* on the backdrop, Chrome synthesizes the `click` on the common ancestor (the
|
|
10
|
+
* `<dialog>` itself) using the mouseup coordinates, which land outside the rect.
|
|
11
|
+
* The modal then closes and the user's unsaved input (e.g. pasted JSON) is lost.
|
|
12
|
+
*
|
|
13
|
+
* The fix tracks where the gesture STARTED. A backdrop dismissal fires only when
|
|
14
|
+
* BOTH the mousedown and the click landed outside the dialog's content rect, so
|
|
15
|
+
* a drag that began inside the dialog never dismisses it.
|
|
16
|
+
*
|
|
17
|
+
* This is a hook so the mousedown-origin ref is per-modal-instance; the returned
|
|
18
|
+
* handlers are spread onto the `<dialog>` element.
|
|
19
|
+
*/
|
|
20
|
+
import type { JSX } from 'preact';
|
|
21
|
+
export interface DialogBackdropHandlers {
|
|
22
|
+
onMouseDown: (e: JSX.TargetedMouseEvent<HTMLDialogElement>) => void;
|
|
23
|
+
onClick: (e: JSX.TargetedMouseEvent<HTMLDialogElement>) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @param dialogRef ref to the `<dialog>` element.
|
|
27
|
+
* @param onBackdrop invoked for a genuine backdrop dismissal (a press+release
|
|
28
|
+
* that both land outside the dialog's content rect).
|
|
29
|
+
*/
|
|
30
|
+
export declare function useDialogBackdropClose(dialogRef: {
|
|
31
|
+
current: HTMLDialogElement | null;
|
|
32
|
+
}, onBackdrop: () => void): DialogBackdropHandlers;
|
|
@@ -83,4 +83,3 @@ export declare function buildElementPath(el: Element): ElementPathResult;
|
|
|
83
83
|
export declare function formatElementPath(result: ElementPathResult): string;
|
|
84
84
|
/** Convenience: build + format in one call. */
|
|
85
85
|
export declare function buildElementPathString(el: Element): string;
|
|
86
|
-
//# sourceMappingURL=build-element-path.d.ts.map
|
|
@@ -10,11 +10,11 @@
|
|
|
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
14
|
/**
|
|
14
15
|
* Load the persisted enabled flag from localStorage. Defaults to `false`
|
|
15
16
|
* (inspect mode off) on any parse/access failure or when absent.
|
|
16
17
|
*/
|
|
17
|
-
export declare function loadElementPathEnabled(): boolean;
|
|
18
|
+
export declare function loadElementPathEnabled(cfg?: PanelConfig): boolean;
|
|
18
19
|
/** Persist the enabled flag to localStorage. Degrades silently when storage is unavailable. */
|
|
19
|
-
export declare function saveElementPathEnabled(enabled: boolean): void;
|
|
20
|
-
//# sourceMappingURL=element-path-state.d.ts.map
|
|
20
|
+
export declare function saveElementPathEnabled(enabled: boolean, cfg?: PanelConfig): void;
|
|
@@ -12,4 +12,3 @@ export type { ElementPathContextValue } from './element-path-context';
|
|
|
12
12
|
export { buildElementPath, buildElementPathString, formatElementPath, buildUniqueSelector, buildBreadcrumb, } from './build-element-path';
|
|
13
13
|
export type { ElementPathResult } from './build-element-path';
|
|
14
14
|
export { loadElementPathEnabled, saveElementPathEnabled } from './element-path-state';
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/export-modal.d.ts
CHANGED
|
@@ -126,4 +126,3 @@ export declare const PANEL_EXCLUSION_SELECTOR = ".tokenpanel-shell, [data-design
|
|
|
126
126
|
* causing equality mode to miss `font-size` consumers.
|
|
127
127
|
*/
|
|
128
128
|
export declare function findElementsUsingToken(cssVar: string, options?: FindElementsOptions): FindElementsResult;
|
|
129
|
-
//# sourceMappingURL=find-elements.d.ts.map
|
package/dist/import-modal.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -63,6 +63,45 @@ export { emptyOverrides } from './state/tweak-state';
|
|
|
63
63
|
export declare function showDesignTokenPanel(): void;
|
|
64
64
|
export declare function hideDesignTokenPanel(): void;
|
|
65
65
|
export declare function toggleDesignPanel(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Arm the owner-autoload flag for a panel instance (defaults to the active
|
|
68
|
+
* default instance).
|
|
69
|
+
*
|
|
70
|
+
* For non-Astro hosts (e.g. the doc site bootstrapped via `@takazudo/zudo-doc`)
|
|
71
|
+
* that cannot use the Astro console adapter (S2); the adapter also delegates its
|
|
72
|
+
* per-namespace `enableAutoload` here with the captured `cfg` so it targets the
|
|
73
|
+
* right instance on multi-instance pages. Mirrors the S2 contract from
|
|
74
|
+
* `autoload-state.ts §enableAutoload()`:
|
|
75
|
+
* 1. Sets `:autoload = '1'`.
|
|
76
|
+
* 2. Sets `-elpath-enabled = '1'` to arm the alt+click inspector.
|
|
77
|
+
* 3. Mounts the Preact shell CLOSED (element-path inspector activates without
|
|
78
|
+
* opening the panel UI).
|
|
79
|
+
*/
|
|
80
|
+
export declare function enableAutoload(cfg?: PanelConfig): void;
|
|
81
|
+
/**
|
|
82
|
+
* Disarm the owner-autoload flag for a panel instance (defaults to the active
|
|
83
|
+
* default instance) and fully tear down the owner-mode state.
|
|
84
|
+
*
|
|
85
|
+
* The Astro host adapter delegates its per-namespace `disableAutoload` here with
|
|
86
|
+
* the captured `cfg`, so the live Alt+click inspector is unmounted immediately
|
|
87
|
+
* (not merely closed) and the right instance is targeted on multi-instance
|
|
88
|
+
* pages. Mirrors the S2 contract from `autoload-state.ts §disableAutoload()`:
|
|
89
|
+
* 1. Clears `:autoload`.
|
|
90
|
+
* 2. Clears `:visible` (sets to `'0'`).
|
|
91
|
+
* 3. Clears `-elpath-enabled` (sets to `'0'`).
|
|
92
|
+
* 4. Removes the open-state key so the next mount starts closed.
|
|
93
|
+
* 5. Unmounts the Preact shell (drives effect cleanups, removes root).
|
|
94
|
+
*/
|
|
95
|
+
export declare function disableAutoload(cfg?: PanelConfig): void;
|
|
96
|
+
/**
|
|
97
|
+
* Return `true` iff the default panel instance has the owner-autoload flag set.
|
|
98
|
+
* Thin wrapper over `shouldAutoload(cfg)` from `./state/autoload-state` that
|
|
99
|
+
* reads the default instance's config so non-Astro hosts do not need to import
|
|
100
|
+
* from the internal sub-path.
|
|
101
|
+
*/
|
|
102
|
+
export declare function shouldAutoload(): boolean;
|
|
103
|
+
/** Test-only: invoke `reapplyFromStorage` with the current active config. */
|
|
104
|
+
export declare function __reapplyFromStorageForTests(): void;
|
|
66
105
|
/**
|
|
67
106
|
* Apply persisted token overrides directly to `:root` BEFORE any Preact
|
|
68
107
|
* render. Called at adapter module init (and again on every `astro:page-load`)
|
|
@@ -111,4 +150,3 @@ export interface LifecycleAdapter {
|
|
|
111
150
|
* No-op outside a browser context (SSR-safe).
|
|
112
151
|
*/
|
|
113
152
|
export declare function setLifecycleAdapter(adapter: LifecycleAdapter | null): void;
|
|
114
|
-
//# sourceMappingURL=index.d.ts.map
|