@mt-gloss/ui 0.1.137 → 0.1.138
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-B7dc_-m8.js → COMMITS-aGwevMtR.js} +254 -186
- package/{Expandable-DA4NFzCR.js → Expandable-G7SCUlMb.js} +740 -738
- package/catalog.js +2 -2
- package/composites-panels.js +786 -668
- package/index.js +804 -852
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +9 -4
- package/lib/composites/panels/index.d.ts +0 -2
- package/lib/composites/panels/shells/SettingsShell.d.ts +14 -16
- package/lib/composites/panels/shells/index.d.ts +0 -2
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +13 -0
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +1 -6
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +10 -0
- package/lib/composites/panels/shells/settings/index.d.ts +4 -6
- package/lib/composites/panels/stage3d/CloneStage.d.ts +11 -1
- package/lib/facade/index.d.ts +0 -2
- package/lib/presets/PresetMenu/PresetMenu.d.ts +1 -0
- package/package.json +1 -1
- package/ui.css +1 -1
- package/lib/composites/panels/shells/MetricInfoShell.d.ts +0 -29
- package/lib/composites/panels/shells/settings/GhostSlotPill.d.ts +0 -7
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
* Called inside the SET_BUFFER_VALUE reducer case (coordinator.ts).
|
|
4
4
|
* Unknown keys pass through unchanged (forward-compat).
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* timeframe → 30
|
|
6
|
+
* Fallback values per spike §6.1.4:
|
|
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;
|
|
@@ -10,8 +10,6 @@
|
|
|
10
10
|
export { PanelProvider, usePanelContext, usePanelContextOptional } from './PanelProvider';
|
|
11
11
|
export { useEditingCardId } from './hooks/useEditingCardId';
|
|
12
12
|
export { SettingsShell } from './shells/SettingsShell';
|
|
13
|
-
export { MetricInfoShell } from './shells/MetricInfoShell';
|
|
14
|
-
export type { MetricInfoShellProps, MetricInfoBlock } from './shells/MetricInfoShell';
|
|
15
13
|
export { NotificationCenterShell } from './shells/NotificationCenterShell';
|
|
16
14
|
export { CatalogAddShell } from './shells/CatalogAddShell';
|
|
17
15
|
export type { CatalogAddShellProps } from './shells/CatalogAddShell';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { PanelShellProps } from '../PanelHost';
|
|
3
3
|
import { SettingsDimension } from '../../../primitives/dashboard/SettingsTabStrip';
|
|
4
|
+
import { AccentSwatch } from './settings';
|
|
4
5
|
export interface SettingsShellProps extends PanelShellProps {
|
|
5
6
|
/** Span of the source card (1|2|3). Plumbed by V2FeedbackSurface HOF. */
|
|
6
7
|
cardSpan?: 1 | 2 | 3;
|
|
@@ -36,29 +37,26 @@ export interface SettingsShellProps extends PanelShellProps {
|
|
|
36
37
|
* - Re-opening the panel after Apply shows the saved value (not React default).
|
|
37
38
|
* - Reset (CLEAR_BUFFER) reverts to the saved value (CC-19 semantics with persistence).
|
|
38
39
|
*
|
|
39
|
-
*
|
|
40
|
+
* Display precedence per dimension:
|
|
40
41
|
* 1. live buffer (`state.bufferByCard[cardId].changes[dim]`) — user mid-edit
|
|
41
42
|
* 2. `initialValues[dim]` — last-applied baseline from localStorage
|
|
42
|
-
* 3. React-default per spike §6.1.4 (timeframe=30, slots=['Orders','Quota','Unassigned'])
|
|
43
|
+
* 3. React-default per spike §6.1.4 (threshold=80, timeframe=30, accent=null, slots=['Orders','Quota','Unassigned'])
|
|
43
44
|
*
|
|
44
|
-
* Spike §6.1 documents the prototype's defaults
|
|
45
|
-
* via D-10 COMMIT_BUFFER → usePreferences('metricConfig')
|
|
45
|
+
* Spike §6.1 documents the prototype's defaults (30/80). Production persists
|
|
46
|
+
* via D-10 COMMIT_BUFFER → usePreferences('metricConfig'); the seed-on-open
|
|
47
|
+
* round-trip closes the loop — without it the Apply'd value vanishes from the
|
|
48
|
+
* UI even though localStorage holds it.
|
|
46
49
|
*/
|
|
47
50
|
initialValues?: Partial<{
|
|
51
|
+
threshold: number;
|
|
48
52
|
timeframe: number;
|
|
53
|
+
accent: AccentSwatch;
|
|
49
54
|
/** GAP-03 (sprint 2026-05-15): persisted slot order. Max 3, empty array valid. */
|
|
50
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;
|
|
51
60
|
}>;
|
|
52
|
-
/**
|
|
53
|
-
* M003-S005-SLT D-08 — Card's natural slot identifier list (registry data,
|
|
54
|
-
* NOT user-persisted). SlotsControls renders ghost pills for naturalSlots
|
|
55
|
-
* \ value so the user can re-add removed slots without Reset. Threaded by
|
|
56
|
-
* reptime MetricSettingsPanel (cardNaturalSlots derivation at ~L222-237).
|
|
57
|
-
*
|
|
58
|
-
* Kept as a top-level prop rather than nested under initialValues because
|
|
59
|
-
* `initialValues` is the *persisted-baseline* axis; naturalSlots is the
|
|
60
|
-
* *registry-data* axis — different semantics (RESEARCH Finding 5).
|
|
61
|
-
*/
|
|
62
|
-
naturalSlots?: ReadonlyArray<string>;
|
|
63
61
|
}
|
|
64
|
-
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues,
|
|
62
|
+
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export { SettingsShell } from './SettingsShell';
|
|
5
5
|
export type { SettingsShellProps } from './SettingsShell';
|
|
6
|
-
export { MetricInfoShell } from './MetricInfoShell';
|
|
7
|
-
export type { MetricInfoShellProps, MetricInfoBlock } from './MetricInfoShell';
|
|
8
6
|
export { CatalogAddShell } from './CatalogAddShell';
|
|
9
7
|
export type { CatalogAddShellProps } from './CatalogAddShell';
|
|
10
8
|
export { CatalogReplaceShell } from './CatalogReplaceShell';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
declare const SWATCHES: readonly ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
|
|
3
|
+
export type AccentSwatch = typeof SWATCHES[number];
|
|
4
|
+
export interface ColorControlsProps {
|
|
5
|
+
value: AccentSwatch | null;
|
|
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;
|
|
11
|
+
}
|
|
12
|
+
export declare function ColorControls({ value, onSelect, enabled, onToggleEnabled, }: ColorControlsProps): React.ReactElement;
|
|
13
|
+
export {};
|
|
@@ -2,10 +2,5 @@ import { default as React } from 'react';
|
|
|
2
2
|
export interface SlotsControlsProps {
|
|
3
3
|
value: ReadonlyArray<string>;
|
|
4
4
|
onChange: (next: ReadonlyArray<string>) => void;
|
|
5
|
-
/**
|
|
6
|
-
* M003-S005-SLT D-08 — natural slot list from the card registry. Ghosts =
|
|
7
|
-
* naturalSlots filtered to !value.includes. Default [].
|
|
8
|
-
*/
|
|
9
|
-
naturalSlots?: ReadonlyArray<string>;
|
|
10
5
|
}
|
|
11
|
-
export declare function SlotsControls({ value, onChange
|
|
6
|
+
export declare function SlotsControls({ value, onChange }: SlotsControlsProps): React.ReactElement;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ThresholdControlsProps {
|
|
3
|
+
value: number;
|
|
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;
|
|
9
|
+
}
|
|
10
|
+
export declare function ThresholdControls({ value, onChange, enabled, onToggleEnabled, }: ThresholdControlsProps): React.ReactElement;
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
* SettingsShell tab-body components. Each renders inside SettingsShell's role=tabpanel via React
|
|
3
3
|
* conditional render (CC-15/16). Phase 16 D-08 keeps these co-located with SettingsShell — they are
|
|
4
4
|
* not standalone primitives.
|
|
5
|
-
*
|
|
6
|
-
* M003-S002-CFG (2026-05-26): ThresholdControls + ColorControls removed per D-10 (per-metric-type
|
|
7
|
-
* threshold + color deferred to later product conversation).
|
|
8
5
|
*/
|
|
6
|
+
export { ThresholdControls } from './ThresholdControls';
|
|
7
|
+
export type { ThresholdControlsProps } from './ThresholdControls';
|
|
9
8
|
export { TimeframeControls } from './TimeframeControls';
|
|
10
9
|
export type { TimeframeControlsProps } from './TimeframeControls';
|
|
11
10
|
export { SlotsControls } from './SlotsControls';
|
|
12
|
-
export
|
|
13
|
-
export {
|
|
14
|
-
export type { GhostSlotPillProps } from './GhostSlotPill';
|
|
11
|
+
export { ColorControls } from './ColorControls';
|
|
12
|
+
export type { ColorControlsProps, AccentSwatch } from './ColorControls';
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export interface CloneStageProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
/** D-06 — incrementing counter. Every change fires one spin via motion/react animate(). */
|
|
5
|
+
spinTrigger?: number;
|
|
6
|
+
/** D-07 — fires from animate().then() / .finished, NOT animationend DOM event. */
|
|
7
|
+
onSpinComplete?: () => void;
|
|
8
|
+
/** D-03 — total spin duration (ms). Default 500. */
|
|
9
|
+
spinDuration?: number;
|
|
10
|
+
/** D-02 — number of 360° rotations. Default 1. */
|
|
11
|
+
spinRotations?: number;
|
|
12
|
+
/** D-05 — CSS color for the transient theme accent overlay. */
|
|
13
|
+
accentColor?: string;
|
|
4
14
|
}
|
|
5
|
-
export declare function CloneStage({ children }: CloneStageProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function CloneStage({ children, spinTrigger, onSpinComplete, spinDuration, spinRotations, accentColor, }: CloneStageProps): import("react/jsx-runtime").JSX.Element;
|
package/lib/facade/index.d.ts
CHANGED
|
@@ -8,8 +8,6 @@ export * from './typography';
|
|
|
8
8
|
export * from './inputs';
|
|
9
9
|
export * from './display';
|
|
10
10
|
export * from './overlay';
|
|
11
|
-
export * from './layout';
|
|
12
|
-
export * from './feedback';
|
|
13
11
|
export * from './data-display';
|
|
14
12
|
export * from './composites';
|
|
15
13
|
export * from './compositions';
|
|
@@ -30,6 +30,7 @@ export interface PresetMenuItemProps {
|
|
|
30
30
|
as?: React.ElementType;
|
|
31
31
|
icon?: React.ReactNode;
|
|
32
32
|
children: React.ReactNode;
|
|
33
|
+
href?: string;
|
|
33
34
|
}
|
|
34
35
|
export declare const PresetMenuItem: {
|
|
35
36
|
({ ref, disabled, active, as, icon, children, ...rest }: PresetMenuItemProps & Omit<React.HTMLAttributes<HTMLElement>, "className" | "style"> & {
|