@mt-gloss/ui 0.1.121 → 0.1.123

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 a, Fragment as I } from "react/jsx-runtime";
4
4
  import * as $ from "react";
5
5
  import L, { useRef as M, useEffect as E, useState as A, useCallback as _, useId as Be, forwardRef as Ge, useMemo as ce, useLayoutEffect as Ne, createContext as He, useContext as We } from "react";
6
6
  import { motion as B, useMotionValue as Ve, AnimatePresence as je, useDragControls as Ke } from "framer-motion";
7
- import { u as Ue } from "./COMMITS-8eHelQHO.js";
8
- import { N as kl, C as Sl, d as Dl, c as xl, P as Rl, g as Tl, S as Ml, f as Pl, i as Al, r as El, b as Fl, e as Ll, a as Il } from "./COMMITS-8eHelQHO.js";
7
+ import { u as Ue } from "./COMMITS-C1VHNgld.js";
8
+ import { N as kl, C as Sl, d as Dl, c as xl, P as Rl, g as Tl, S as Ml, f as Pl, i as Al, r as El, b as Fl, e as Ll, a as Il } from "./COMMITS-C1VHNgld.js";
9
9
  import { createPortal as ke } from "react-dom";
10
10
  import { B as Ye, U as de } from "./UIContext-Dm0GYHFT.js";
11
11
  import { a as $l, u as zl } from "./UIContext-Dm0GYHFT.js";
@@ -2,5 +2,9 @@ import { ReactNode } from 'react';
2
2
  export interface PanelHeaderProps {
3
3
  title?: string;
4
4
  onClose: () => void;
5
+ /** Phase 11.6-CR-01: id wired by PanelChromeV2 via React.useId() so the dialog
6
+ * root's aria-labelledby points at the title span. WAI-ARIA 1.2 §3.15
7
+ * requires every role="dialog" to carry an accessible name. */
8
+ titleId?: string;
5
9
  }
6
- export declare function PanelHeader({ title, onClose }: PanelHeaderProps): ReactNode;
10
+ export declare function PanelHeader({ title, onClose, titleId }: PanelHeaderProps): ReactNode;
@@ -10,8 +10,14 @@
10
10
  export { PanelChromeV2 } from './PanelChromeV2';
11
11
  export type { PanelChromeV2Props } from './PanelChromeV2';
12
12
  export { PanelHeader } from './PanelHeader';
13
+ export type { PanelHeaderProps } from './PanelHeader';
13
14
  export { PanelStage } from './PanelStage';
15
+ export type { PanelStageProps } from './PanelStage';
14
16
  export { PanelNavigation } from './PanelNavigation';
17
+ export type { PanelNavigationProps } from './PanelNavigation';
15
18
  export { PanelBody } from './PanelBody';
19
+ export type { PanelBodyProps } from './PanelBody';
16
20
  export { PanelFooter } from './PanelFooter';
21
+ export type { PanelFooterProps } from './PanelFooter';
17
22
  export { PanelFooterMessage } from './PanelFooterMessage';
23
+ export type { PanelFooterMessageProps } from './PanelFooterMessage';
@@ -19,5 +19,14 @@ export interface CatalogAddShellProps extends PanelShellProps {
19
19
  footerSlot?: ReactNode;
20
20
  /** PHASE 17.1 D-08 — forwarded to inner CatalogTileGrid (both primary + secondary instances). */
21
21
  renderTile?: (tile: CatalogTile) => ReactNode;
22
+ /**
23
+ * 2026-05-21 catalog-add-wiring — invoked with the selected tile id when the
24
+ * user clicks "Add metric". Fires BEFORE the CLOSE_PANEL{reason:'apply-button'}
25
+ * dispatch so consumers (reptime PagesContext.addInstance) can create the new
26
+ * card while the panel context still has the active trigger. The CLOSE_PANEL
27
+ * dispatch is unconditional (mirrors prior behaviour); if onAdd is omitted the
28
+ * shell remains a presentational mock as before.
29
+ */
30
+ onAdd?: (tileId: string) => void;
22
31
  }
23
- export declare function CatalogAddShell({ isOpen, lenses, defaultLens, tilesByLens, lensMeta, renderTile, }: CatalogAddShellProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function CatalogAddShell({ isOpen, lenses, defaultLens, tilesByLens, lensMeta, renderTile, onAdd, }: CatalogAddShellProps): import("react/jsx-runtime").JSX.Element;
@@ -1,27 +1,34 @@
1
1
  /**
2
- * Catalog panel mock data — Phase 11.5 P4 W2 + GAP-06 (sprint 2026-05-15).
2
+ * Catalog panel mock data — Phase 11.5 P4 W2 + GAP-06 + Fix-2 (2026-05-21).
3
3
  *
4
- * Module-level constants; no fetch, no PII. Spike-verbatim §6.2.5 lens list +
5
- * §6.2.7 tile model.
4
+ * Module-level constants; no fetch, no PII.
6
5
  *
7
- * GAP-06 (sprint 2026-05-15) — data shape widened to support spike-grade
8
- * catalog rendering (SCREENSHOT-07/-08 visual contract):
6
+ * Fix-2 (debug session: catalog-wrong-inventory-and-blank-insert) — lens
7
+ * vocabulary restored to the legacy sales-agency taxonomy (`Revenue / Order
8
+ * flow / Rep performance / Brand portfolio / Account coverage / Commission`)
9
+ * sourced from `reptime-cloud/react-dashboard/app/data/lensInfo.ts:29-34`.
10
+ * Tile inventory restricted to `agency-*` IDs that are registered in
11
+ * `react-dashboard/app/data/metricInfo/agency/*.ts` so every catalog tile
12
+ * resolves to a metricInfo entry and renders a real card on insert (no more
13
+ * blank-shell fall-through in `useRenderCard.tsx:411-428`).
9
14
  *
10
- * - Lens names replaced with spike-correct vocabulary (Overbought / What's
11
- * selling / On track vs plan / Orders on time / Vendor performance /
12
- * Assortment mix / Customer retention BETA).
15
+ * Visual treatment preserved from GAP-06 + S923–S925 polish:
13
16
  * - `lensMeta` keyed by lens name carries `headline` (active-lens H2),
14
17
  * `helper` (sub-paragraph), `beta` flag.
15
18
  * - Tiles per lens split into `primary` (rendered in main grid; at most one
16
- * `startHere: true` per lens; small orange `isNew` dot opt-in) and
17
- * `secondary` (rendered under "MORE IN THIS LENS" subsection).
19
+ * `startHere: true` per lens) and `secondary` (rendered under "MORE IN
20
+ * THIS LENS" subsection).
18
21
  * - `value` semantics: a single string for 1×1 tiles, OR `subStats` array
19
- * for multi-up tiles (3-up MTD/QTD/YTD, 5-up MTD/QTD/YTD/LYTD/7D). When
20
- * `subStats` is present, the renderer ignores `value` and stacks the
21
- * segments. Span is implicit: 0 stats = 1×1, 3 = 1×3, 5 = 1×5.
22
+ * for multi-up tiles. When `subStats` is present, the renderer ignores
23
+ * `value` and stacks the segments.
22
24
  * - `accent` color hint for sparkline/donut tiles (HEX); CSS reads via
23
25
  * inline style. `donut` flag enables the donut variant.
24
26
  *
27
+ * Removed (Fix-2): all `ob-*`, `ws-*`, `pl-*`, `ot-*`, `vp-*`, `am-*`, `cr-*`
28
+ * tiles. These were spike-vocabulary illustrative mocks with NO metricInfo
29
+ * registration — selecting one produced a blank card on the grid (per commit
30
+ * b54301f83b's documented "expected by design" footnote).
31
+ *
25
32
  * Real BFF binding will replace this seam in a future plan (P5+); the
26
33
  * `CatalogAddWithCards` HOF in V2FeedbackSurface will inject live-card
27
34
  * snapshot values per Q4 (B_representative_static + mock fallback).
@@ -139,7 +146,7 @@ export interface CatalogLensMeta {
139
146
  beta?: boolean;
140
147
  }
141
148
  export declare const MOCK_LENSES: readonly string[];
142
- export declare const MOCK_DEFAULT_LENS = "Overbought";
149
+ export declare const MOCK_DEFAULT_LENS = "Revenue";
143
150
  export declare const MOCK_LENS_META: Readonly<Record<string, CatalogLensMeta>>;
144
151
  /** Primary vs secondary tile groups for a lens. */
145
152
  export interface CatalogLensTiles {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mt-gloss/ui",
3
- "version": "0.1.121",
3
+ "version": "0.1.123",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "restricted"