@mt-gloss/ui 0.1.134 → 0.1.136
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-WBmqrmdI.js → COMMITS-B_qGBoy7.js} +171 -183
- package/composites-panels.js +622 -663
- package/index.js +2 -2
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +4 -9
- package/lib/composites/panels/index.d.ts +2 -0
- package/lib/composites/panels/shells/MetricInfoShell.d.ts +29 -0
- package/lib/composites/panels/shells/SettingsShell.d.ts +16 -14
- package/lib/composites/panels/shells/index.d.ts +2 -0
- package/lib/composites/panels/shells/settings/GhostSlotPill.d.ts +7 -0
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +6 -1
- package/lib/composites/panels/shells/settings/index.d.ts +6 -4
- package/package.json +1 -1
- package/ui.css +1 -1
- package/lib/composites/panels/shells/settings/ColorControls.d.ts +0 -13
- package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +0 -10
package/index.js
CHANGED
|
@@ -4,8 +4,8 @@ import { jsxs as f, jsx as r, Fragment as I } from "react/jsx-runtime";
|
|
|
4
4
|
import * as O from "react";
|
|
5
5
|
import V, { useRef as M, useEffect as E, useState as A, useCallback as C, useId as Ne, useMemo as ce, useLayoutEffect as ke, createContext as Ge, useContext as He } from "react";
|
|
6
6
|
import { motion as z, useMotionValue as We, AnimatePresence as Ve, useDragControls as je } from "framer-motion";
|
|
7
|
-
import { u as Ke } from "./COMMITS-
|
|
8
|
-
import { N as Cl, C as Nl, c as kl, P as Sl, f as Dl, S as xl, e as Tl, i as Rl, r as Ml, b as Pl, d as Al, a as El } from "./COMMITS-
|
|
7
|
+
import { u as Ke } from "./COMMITS-B_qGBoy7.js";
|
|
8
|
+
import { N as Cl, C as Nl, c as kl, P as Sl, f as Dl, S as xl, e as Tl, i as Rl, r as Ml, b as Pl, d as Al, a as El } from "./COMMITS-B_qGBoy7.js";
|
|
9
9
|
import { createPortal as Se } from "react-dom";
|
|
10
10
|
import { B as Ue, U as de } from "./UIContext-CGQI_KJk.js";
|
|
11
11
|
import { a as Il, u as Ll } from "./UIContext-CGQI_KJk.js";
|
|
@@ -3,16 +3,11 @@
|
|
|
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
|
-
*
|
|
6
|
+
* Post-M003-S002-CFG discriminated union (D-14):
|
|
7
|
+
* timeframe → 30 (default), slots → []
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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)
|
|
9
|
+
* @param key buffer-value key — 'timeframe' | 'slots' | any forward-compat string
|
|
10
|
+
* @param value unknown
|
|
16
11
|
* @returns normalized value (clamped, parsed, or passthrough)
|
|
17
12
|
*/
|
|
18
13
|
export declare function normalizeBufferValue(key: string, value: unknown): unknown;
|
|
@@ -10,6 +10,8 @@
|
|
|
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';
|
|
13
15
|
export { NotificationCenterShell } from './shells/NotificationCenterShell';
|
|
14
16
|
export { CatalogAddShell } from './shells/CatalogAddShell';
|
|
15
17
|
export type { CatalogAddShellProps } from './shells/CatalogAddShell';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PanelShellProps } from '../PanelHost';
|
|
3
|
+
export interface MetricInfoBlock {
|
|
4
|
+
/** Metric display name from getMetricInfo(metricTypeId).title. */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Metric description from getMetricInfo(metricTypeId).description. */
|
|
7
|
+
description: string;
|
|
8
|
+
}
|
|
9
|
+
export interface MetricInfoShellProps extends PanelShellProps {
|
|
10
|
+
/** Span of the source card (1|2|3). Plumbed by reptime MetricSettingsPanel. */
|
|
11
|
+
cardSpan?: 1 | 2 | 3;
|
|
12
|
+
/**
|
|
13
|
+
* Render-as-children path for the Stage 3D clone. Mirrors SettingsShell's
|
|
14
|
+
* previewSlot prop (D-09 — verbatim reuse). Consumer (reptime) builds this
|
|
15
|
+
* by calling renderCard(card, span, ...) so the clone is a 1:1 representation
|
|
16
|
+
* of the live card.
|
|
17
|
+
*/
|
|
18
|
+
previewSlot?: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Metric name + description block rendered below the CloneStage (D-05).
|
|
21
|
+
* Consumer pulls these from getMetricInfo(metricTypeId) at
|
|
22
|
+
* reptime-cloud/.../app/data/metricInfo/helpers.ts.
|
|
23
|
+
*/
|
|
24
|
+
metricInfo: MetricInfoBlock;
|
|
25
|
+
}
|
|
26
|
+
export declare function MetricInfoShell({ isOpen, cardSpan, previewSlot, metricInfo, }: MetricInfoShellProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare namespace MetricInfoShell {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
export interface SettingsShellProps extends PanelShellProps {
|
|
6
5
|
/** Span of the source card (1|2|3). Plumbed by V2FeedbackSurface HOF. */
|
|
7
6
|
cardSpan?: 1 | 2 | 3;
|
|
@@ -37,26 +36,29 @@ export interface SettingsShellProps extends PanelShellProps {
|
|
|
37
36
|
* - Re-opening the panel after Apply shows the saved value (not React default).
|
|
38
37
|
* - Reset (CLEAR_BUFFER) reverts to the saved value (CC-19 semantics with persistence).
|
|
39
38
|
*
|
|
40
|
-
*
|
|
39
|
+
* Post-M003-S002-CFG display precedence per dimension:
|
|
41
40
|
* 1. live buffer (`state.bufferByCard[cardId].changes[dim]`) — user mid-edit
|
|
42
41
|
* 2. `initialValues[dim]` — last-applied baseline from localStorage
|
|
43
|
-
* 3. React-default per spike §6.1.4 (
|
|
42
|
+
* 3. React-default per spike §6.1.4 (timeframe=30, slots=['Orders','Quota','Unassigned'])
|
|
44
43
|
*
|
|
45
|
-
* Spike §6.1 documents the prototype's defaults
|
|
46
|
-
* via D-10 COMMIT_BUFFER → usePreferences('metricConfig')
|
|
47
|
-
* round-trip closes the loop — without it the Apply'd value vanishes from the
|
|
48
|
-
* UI even though localStorage holds it.
|
|
44
|
+
* Spike §6.1 documents the prototype's defaults; production persists
|
|
45
|
+
* via D-10 COMMIT_BUFFER → usePreferences('metricConfig').
|
|
49
46
|
*/
|
|
50
47
|
initialValues?: Partial<{
|
|
51
|
-
threshold: number;
|
|
52
48
|
timeframe: number;
|
|
53
|
-
accent: AccentSwatch;
|
|
54
49
|
/** GAP-03 (sprint 2026-05-15): persisted slot order. Max 3, empty array valid. */
|
|
55
50
|
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;
|
|
60
51
|
}>;
|
|
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>;
|
|
61
63
|
}
|
|
62
|
-
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, naturalSlots, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,6 +3,8 @@
|
|
|
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';
|
|
6
8
|
export { CatalogAddShell } from './CatalogAddShell';
|
|
7
9
|
export type { CatalogAddShellProps } from './CatalogAddShell';
|
|
8
10
|
export { CatalogReplaceShell } from './CatalogReplaceShell';
|
|
@@ -2,5 +2,10 @@ 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>;
|
|
5
10
|
}
|
|
6
|
-
export declare function SlotsControls({ value, onChange }: SlotsControlsProps): React.ReactElement;
|
|
11
|
+
export declare function SlotsControls({ value, onChange, naturalSlots, }: SlotsControlsProps): React.ReactElement;
|
|
@@ -2,11 +2,13 @@
|
|
|
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).
|
|
5
8
|
*/
|
|
6
|
-
export { ThresholdControls } from './ThresholdControls';
|
|
7
|
-
export type { ThresholdControlsProps } from './ThresholdControls';
|
|
8
9
|
export { TimeframeControls } from './TimeframeControls';
|
|
9
10
|
export type { TimeframeControlsProps } from './TimeframeControls';
|
|
10
11
|
export { SlotsControls } from './SlotsControls';
|
|
11
|
-
export {
|
|
12
|
-
export
|
|
12
|
+
export type { SlotsControlsProps } from './SlotsControls';
|
|
13
|
+
export { GhostSlotPill } from './GhostSlotPill';
|
|
14
|
+
export type { GhostSlotPillProps } from './GhostSlotPill';
|