@mt-gloss/ui 0.1.134 → 0.1.135

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/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-WBmqrmdI.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-WBmqrmdI.js";
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
- * Fallback values per spike §6.1.4:
7
- * threshold → 80, timeframe → 30, accent → null, slots → []
6
+ * Post-M003-S002-CFG discriminated union (D-14):
7
+ * timeframe → 30 (default), slots → []
8
8
  *
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)
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,18 @@ 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
- * Display precedence per dimension:
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 (threshold=80, timeframe=30, accent=null, slots=['Orders','Quota','Unassigned'])
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 (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.
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
  }>;
61
52
  }
62
53
  export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, }: 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,11 +2,10 @@
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 { ColorControls } from './ColorControls';
12
- export type { ColorControlsProps, AccentSwatch } from './ColorControls';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.134",
3
+ "version": "0.1.135",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"