@mt-gloss/ui 0.1.113 → 0.1.115
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/COMMITS-CeuMPpjt.js +812 -0
- package/composites-panels.js +718 -554
- package/index.js +1759 -2027
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +7 -2
- package/lib/composites/panels/shells/PageMgmtShell.d.ts +21 -1
- package/lib/composites/panels/shells/SettingsShell.d.ts +4 -0
- package/lib/composites/panels/shells/internals/PageMgmtFooter.d.ts +4 -0
- package/lib/composites/panels/shells/internals/PageMgmtRow.d.ts +4 -2
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +5 -1
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +5 -1
- package/package.json +1 -1
- package/ui.css +1 -1
- package/COMMITS-DG0Q_9DU.js +0 -538
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
* Fallback values per spike §6.1.4:
|
|
7
7
|
* threshold → 80, timeframe → 30, accent → null, slots → []
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Phase 17.2 additions:
|
|
10
|
+
* thresholdEnabled → false, accentEnabled → false
|
|
11
|
+
*
|
|
12
|
+
* @param key buffer-value key (e.g. 'threshold', 'timeframe', 'accent',
|
|
13
|
+
* 'slots', 'thresholdEnabled', 'accentEnabled')
|
|
14
|
+
* @param value unknown — number (sliders), string (color hex), string[]
|
|
15
|
+
* (slots), or boolean (toggles)
|
|
11
16
|
* @returns normalized value (clamped, parsed, or passthrough)
|
|
12
17
|
*/
|
|
13
18
|
export declare function normalizeBufferValue(key: string, value: unknown): unknown;
|
|
@@ -6,5 +6,25 @@ export interface PageMgmtShellProps extends PanelShellProps {
|
|
|
6
6
|
pages?: readonly PageEntry[];
|
|
7
7
|
/** See CatalogAddShellProps.footerSlot — sibling slot inside Provider. */
|
|
8
8
|
footerSlot?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* When provided, the shell renders this external list verbatim (active flag
|
|
11
|
+
* is recomputed from `activePageId`). External pages override `pages`/MOCK_PAGES
|
|
12
|
+
* and disable internal mock mutations.
|
|
13
|
+
*/
|
|
14
|
+
externalPages?: readonly PageEntry[];
|
|
15
|
+
/** Active page id; drives the .active class on rows. Required when externalPages set. */
|
|
16
|
+
activePageId?: string;
|
|
17
|
+
/** Live-commit rename binding. Replaces the mock-state renamePage when set. */
|
|
18
|
+
onRename?: (id: string, name: string) => void;
|
|
19
|
+
/** Live-commit duplicate binding. */
|
|
20
|
+
onDuplicate?: (id: string) => void;
|
|
21
|
+
/** Live-commit delete binding. */
|
|
22
|
+
onDelete?: (id: string) => void;
|
|
23
|
+
/** Live-commit reorder binding. When set together with externalPages, drag-to-reorder activates. */
|
|
24
|
+
onReorder?: (orderedIds: string[]) => void;
|
|
25
|
+
/** Live-commit create binding. Forwarded to footer via context. */
|
|
26
|
+
onCreatePage?: () => void;
|
|
27
|
+
/** Optional: switch active page when a row name is clicked. */
|
|
28
|
+
onSwitchPage?: (id: string) => void;
|
|
9
29
|
}
|
|
10
|
-
export declare function PageMgmtShell({ isOpen, pages: initialPages, footerSlot, }: PageMgmtShellProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function PageMgmtShell({ isOpen, pages: initialPages, footerSlot, externalPages, activePageId, onRename, onDuplicate, onDelete, onReorder, onCreatePage, onSwitchPage, }: PageMgmtShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,6 +53,10 @@ export interface SettingsShellProps extends PanelShellProps {
|
|
|
53
53
|
accent: AccentSwatch;
|
|
54
54
|
/** GAP-03 (sprint 2026-05-15): persisted slot order. Max 3, empty array valid. */
|
|
55
55
|
slots: ReadonlyArray<string>;
|
|
56
|
+
/** Phase 17.2 Fix #2 — opt-in toggle for threshold overlay. Default false. */
|
|
57
|
+
thresholdEnabled: boolean;
|
|
58
|
+
/** Phase 17.2 Fix #2 — opt-in toggle for accent override. Default false. */
|
|
59
|
+
accentEnabled: boolean;
|
|
56
60
|
}>;
|
|
57
61
|
}
|
|
58
62
|
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,10 @@ export interface PageMgmtState {
|
|
|
9
9
|
duplicatePage?: (id: string) => void;
|
|
10
10
|
/** GAP-05 — delete via kebab menu. Mock-state operation. */
|
|
11
11
|
deletePage?: (id: string) => void;
|
|
12
|
+
/** Sprint 2026-05-20 — live-commit create binding for '+ New page' footer
|
|
13
|
+
* button. When set, the footer routes to this binding instead of mutating
|
|
14
|
+
* local mock state via setPages. */
|
|
15
|
+
createPage?: () => void;
|
|
12
16
|
}
|
|
13
17
|
export declare const PageMgmtStateContext: import('react').Context<PageMgmtState | null>;
|
|
14
18
|
export declare function usePageMgmtState(): PageMgmtState | null;
|
|
@@ -5,7 +5,9 @@ export interface PageMgmtRowProps {
|
|
|
5
5
|
onRename?: (id: string) => void;
|
|
6
6
|
/** @deprecated GAP-05 wires kebab menu directly via context. */
|
|
7
7
|
onKebab?: (id: string) => void;
|
|
8
|
-
/** Drag-to-reorder hook seam —
|
|
8
|
+
/** Drag-to-reorder hook seam — legacy; SortableZones owns drag now. */
|
|
9
9
|
onDragStart?: (id: string) => void;
|
|
10
|
+
/** Sprint 2026-05-20 — switch active page when the row name is clicked. */
|
|
11
|
+
onSwitchPage?: (id: string) => void;
|
|
10
12
|
}
|
|
11
|
-
export declare function PageMgmtRow({ page, onRename, onKebab, onDragStart }: PageMgmtRowProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function PageMgmtRow({ page, onRename, onKebab, onDragStart, onSwitchPage }: PageMgmtRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,6 +4,10 @@ export type AccentSwatch = typeof SWATCHES[number];
|
|
|
4
4
|
export interface ColorControlsProps {
|
|
5
5
|
value: AccentSwatch | null;
|
|
6
6
|
onSelect: (hex: AccentSwatch) => void;
|
|
7
|
+
/** Phase 17.2 Fix #2 — opt-in toggle. Defaults false. */
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
/** Phase 17.2 Fix #2 — toggle dispatch (parent wires SET_BUFFER_VALUE 'accentEnabled'). */
|
|
10
|
+
onToggleEnabled?: (next: boolean) => void;
|
|
7
11
|
}
|
|
8
|
-
export declare function ColorControls({ value, onSelect }: ColorControlsProps): React.ReactElement;
|
|
12
|
+
export declare function ColorControls({ value, onSelect, enabled, onToggleEnabled, }: ColorControlsProps): React.ReactElement;
|
|
9
13
|
export {};
|
|
@@ -2,5 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
export interface ThresholdControlsProps {
|
|
3
3
|
value: number;
|
|
4
4
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
/** Phase 17.2 Fix #2 — opt-in toggle. Defaults false. */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
/** Phase 17.2 Fix #2 — toggle dispatch (parent wires SET_BUFFER_VALUE 'thresholdEnabled'). */
|
|
8
|
+
onToggleEnabled?: (next: boolean) => void;
|
|
5
9
|
}
|
|
6
|
-
export declare function ThresholdControls({ value, onChange }: ThresholdControlsProps): React.ReactElement;
|
|
10
|
+
export declare function ThresholdControls({ value, onChange, enabled, onToggleEnabled, }: ThresholdControlsProps): React.ReactElement;
|