@mt-gloss/ui 0.1.106 → 0.1.108
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/{BaseAsyncButton-Cq_l7clO.js → BaseAsyncButton-aDQ_TjJi.js} +30 -29
- package/BaseText-Dxbk1JJa.js +66 -0
- package/{COMMITS-kaUvc5jL.js → COMMITS-DG0Q_9DU.js} +89 -81
- package/{Expandable-BcmIxWR8.js → Expandable-DFHxVkCF.js} +3493 -4181
- package/MetricCard-Cyoxhb_S.js +697 -0
- package/{UIContext-DP6JGCto.js → UIContext-Dm0GYHFT.js} +564 -626
- package/catalog.js +122 -120
- package/composites-panels.js +1124 -537
- package/index.js +329 -327
- package/internals.js +81 -80
- package/lib/composites/panels/PanelChrome.d.ts +15 -1
- package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +2 -2
- package/lib/composites/panels/index.d.ts +2 -2
- package/lib/composites/panels/shells/CatalogAddShell.d.ts +6 -4
- package/lib/composites/panels/shells/CatalogReplaceShell.d.ts +2 -2
- package/lib/composites/panels/shells/PageMgmtShell.d.ts +1 -1
- package/lib/composites/panels/shells/SettingsShell.d.ts +46 -3
- package/lib/composites/panels/shells/index.d.ts +2 -2
- package/lib/composites/panels/shells/internals/CatalogLensPicker.d.ts +14 -1
- package/lib/composites/panels/shells/internals/CatalogTileGrid.d.ts +3 -0
- package/lib/composites/panels/shells/internals/PageMgmtFooter.d.ts +7 -0
- package/lib/composites/panels/shells/internals/PageMgmtRow.d.ts +3 -0
- package/lib/composites/panels/shells/internals/catalog-mocks.d.ts +59 -7
- package/lib/composites/panels/shells/settings/SlotsControls.d.ts +5 -1
- package/package.json +1 -1
- package/ui.css +1 -1
package/internals.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as B } from "./UIContext-Dm0GYHFT.js";
|
|
2
|
+
import { z as A, F as I, A as H, D as M, ab as $, ad as R, e as E, q as F, y as O, s as U, t as z, r as W, v as L, x as j, w as G, h as V, ae as X, a4 as Z, a7 as q, a6 as J, a5 as K, a8 as Q, N as Y, P as aa, Q as sa, O as ea, Y as oa, _ as ta, a1 as la, a3 as ra, a2 as ia, d as da, f as na, af as ca, a0 as Ba, G as ga, J as ba, H as ma, I as ua, $ as pa, B as ya, ac as ha, i as _a, a9 as fa, L as va, M as Ca, k as ka, m as Da, o as Ta, n as xa, l as wa, p as Sa, c as Na, g as Pa, V as Aa, X as Ia, W as Ha, aa as Ma, j as $a, K as Ra, C as Ea, E as Fa, R as Oa, S as Ua, T as za, a as Wa, U as La, Z as ja, u as Ga } from "./UIContext-Dm0GYHFT.js";
|
|
3
|
+
import { B as Xa, b as Za, a as qa, c as Ja } from "./BaseText-Dxbk1JJa.js";
|
|
3
4
|
import { jsx as d, jsxs as g, Fragment as b } from "react/jsx-runtime";
|
|
4
|
-
import { c as
|
|
5
|
+
import { c as Qa, e as Ya, d as as, B as ss, b as es, a as os } from "./BaseAsyncButton-aDQ_TjJi.js";
|
|
5
6
|
const T = {
|
|
6
7
|
DurationFast: "var(--gloss-motion-duration-fast)",
|
|
7
8
|
DurationNormal: "var(--gloss-motion-duration-normal)",
|
|
@@ -9,13 +10,13 @@ const T = {
|
|
|
9
10
|
EasingDefault: "var(--gloss-motion-easing-default)",
|
|
10
11
|
EasingEnter: "var(--gloss-motion-easing-enter)",
|
|
11
12
|
EasingExit: "var(--gloss-motion-easing-exit)"
|
|
12
|
-
},
|
|
13
|
+
}, x = {
|
|
13
14
|
Sm: "var(--gloss-breakpoint-sm)",
|
|
14
15
|
Md: "var(--gloss-breakpoint-md)",
|
|
15
16
|
Lg: "var(--gloss-breakpoint-lg)",
|
|
16
17
|
Xl: "var(--gloss-breakpoint-xl)",
|
|
17
18
|
"2xl": "var(--gloss-breakpoint-2xl)"
|
|
18
|
-
},
|
|
19
|
+
}, w = {
|
|
19
20
|
Disabled: "var(--gloss-opacity-disabled)",
|
|
20
21
|
Hover: "var(--gloss-opacity-hover)",
|
|
21
22
|
Focus: "var(--gloss-opacity-focus)",
|
|
@@ -187,93 +188,93 @@ export {
|
|
|
187
188
|
I as BaseAccordionContent,
|
|
188
189
|
H as BaseAccordionItem,
|
|
189
190
|
M as BaseAccordionTrigger,
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
Qa as BaseAlert,
|
|
192
|
+
Ya as BaseAsyncButton,
|
|
192
193
|
$ as BaseAvatar,
|
|
193
194
|
R as BaseBadge,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
195
|
+
Xa as BaseBox,
|
|
196
|
+
as as BaseBreadcrumbs,
|
|
197
|
+
E as BaseButton,
|
|
198
|
+
F as BaseCard,
|
|
199
|
+
O as BaseCardActions,
|
|
200
|
+
U as BaseCardBody,
|
|
201
|
+
z as BaseCardFooter,
|
|
202
|
+
W as BaseCardHeader,
|
|
203
|
+
L as BaseCardMedia,
|
|
204
|
+
j as BaseCardSubtitle,
|
|
205
|
+
G as BaseCardTitle,
|
|
206
|
+
V as BaseCheckbox,
|
|
207
|
+
X as BaseChip,
|
|
208
|
+
Z as BaseColorPicker,
|
|
209
|
+
q as BaseColorPickerAlpha,
|
|
210
|
+
J as BaseColorPickerHue,
|
|
211
|
+
K as BaseColorPickerSaturation,
|
|
212
|
+
Q as BaseColorPickerSwatch,
|
|
213
|
+
Y as BaseDatePicker,
|
|
214
|
+
aa as BaseDatePickerCalendar,
|
|
215
|
+
sa as BaseDatePickerDay,
|
|
216
|
+
ea as BaseDatePickerHeader,
|
|
217
|
+
oa as BaseDateRangePicker,
|
|
218
|
+
ta as BaseDateRangePickerDay,
|
|
218
219
|
_ as BaseDialog,
|
|
219
220
|
C as BaseDialogActions,
|
|
220
221
|
v as BaseDialogBody,
|
|
221
222
|
f as BaseDialogHeader,
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
223
|
+
Za as BaseDivider,
|
|
224
|
+
la as BaseFileUpload,
|
|
225
|
+
ra as BaseFileUploadItem,
|
|
226
|
+
ia as BaseFileUploadList,
|
|
227
|
+
da as BaseIcon,
|
|
228
|
+
na as BaseInput,
|
|
229
|
+
ss as BaseLabel,
|
|
230
|
+
ca as BaseLink,
|
|
231
|
+
Ba as BaseMaskedInput,
|
|
232
|
+
ga as BaseMenu,
|
|
233
|
+
ba as BaseMenuDivider,
|
|
234
|
+
ma as BaseMenuGroup,
|
|
235
|
+
ua as BaseMenuItem,
|
|
236
|
+
pa as BaseNumberInput,
|
|
236
237
|
B as BaseOverlay,
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
238
|
+
ya as BasePopover,
|
|
239
|
+
ha as BaseProgressBar,
|
|
240
|
+
_a as BaseRadio,
|
|
241
|
+
fa as BaseRangeSlider,
|
|
242
|
+
va as BaseRating,
|
|
243
|
+
Ca as BaseSegmentedControl,
|
|
244
|
+
ka as BaseSelect,
|
|
245
|
+
Da as BaseSelectDropdown,
|
|
246
|
+
Ta as BaseSelectGroup,
|
|
247
|
+
xa as BaseSelectOption,
|
|
248
|
+
wa as BaseSelectTrigger,
|
|
249
|
+
Sa as BaseSlider,
|
|
250
|
+
Na as BaseStack,
|
|
250
251
|
m as BaseTable,
|
|
251
252
|
p as BaseTableBody,
|
|
252
253
|
h as BaseTableCell,
|
|
253
254
|
u as BaseTableHead,
|
|
254
255
|
y as BaseTableRow,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
256
|
+
qa as BaseText,
|
|
257
|
+
Pa as BaseTextarea,
|
|
258
|
+
Aa as BaseTimePicker,
|
|
259
|
+
Ia as BaseTimePickerCell,
|
|
260
|
+
Ha as BaseTimePickerColumn,
|
|
261
|
+
Ma as BaseTitle,
|
|
262
|
+
es as BaseToast,
|
|
263
|
+
$a as BaseToggle,
|
|
264
|
+
Ra as BaseTooltip,
|
|
265
|
+
Ja as BaseTypography,
|
|
266
|
+
os as BaseValue,
|
|
266
267
|
S as Border,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
x as Breakpoint,
|
|
269
|
+
Ea as Color,
|
|
270
|
+
Fa as Elevation,
|
|
270
271
|
T as Motion,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
272
|
+
w as Opacity,
|
|
273
|
+
Oa as Radius,
|
|
274
|
+
Ua as Spacing,
|
|
275
|
+
za as Typography,
|
|
276
|
+
Wa as UIContext,
|
|
277
|
+
La as UIContextProvider,
|
|
278
|
+
ja as ZIndex,
|
|
279
|
+
Ga as useUIContext
|
|
279
280
|
};
|
|
@@ -9,5 +9,19 @@ export interface PanelChromeProps {
|
|
|
9
9
|
isOpen?: boolean;
|
|
10
10
|
/** P2 — optional footer slot. Notification-center keeps null (no footer). */
|
|
11
11
|
footer?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* GAP-01 (sprint 2026-05-15): optional title rendered left-aligned in the
|
|
14
|
+
* header, on the same line as the close button. Spike §6.1 shows
|
|
15
|
+
* "Configure metric" over the stage gradient.
|
|
16
|
+
*/
|
|
17
|
+
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* GAP-01 (sprint 2026-05-15): visual variant. 'merged-stage' fuses the
|
|
20
|
+
* header with the stage gradient region (title left + outlined close right),
|
|
21
|
+
* drops bottom rounding so the panel exits the toolbar bounds, and lets the
|
|
22
|
+
* body grow with content (no inner scroll). 'default' preserves the
|
|
23
|
+
* P3a fixed-3-row chrome used by notification-center / catalog / etc.
|
|
24
|
+
*/
|
|
25
|
+
variant?: 'default' | 'merged-stage';
|
|
12
26
|
}
|
|
13
|
-
export declare function PanelChrome({ children, onClose, footer }: PanelChromeProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function PanelChrome({ children, onClose, footer, title, variant }: PanelChromeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Unknown keys pass through unchanged (forward-compat).
|
|
5
5
|
*
|
|
6
6
|
* Fallback values per spike §6.1.4:
|
|
7
|
-
* threshold → 80, timeframe → 30, accent → null
|
|
7
|
+
* threshold → 80, timeframe → 30, accent → null, slots → []
|
|
8
8
|
*
|
|
9
9
|
* @param key buffer-value key (e.g. 'threshold', 'timeframe', 'accent', 'slots')
|
|
10
|
-
* @param value unknown —
|
|
10
|
+
* @param value unknown — number (sliders), string (color hex), or string[] (slots)
|
|
11
11
|
* @returns normalized value (clamped, parsed, or passthrough)
|
|
12
12
|
*/
|
|
13
13
|
export declare function normalizeBufferValue(key: string, value: unknown): unknown;
|
|
@@ -20,8 +20,8 @@ export { CatalogFooter, CatalogStateContext, useCatalogState, } from './shells/i
|
|
|
20
20
|
export type { CatalogFooterMode, CatalogState, CatalogFooterProps, } from './shells/internals/CatalogFooter';
|
|
21
21
|
export { PageMgmtFooter, PageMgmtStateContext, usePageMgmtState, } from './shells/internals/PageMgmtFooter';
|
|
22
22
|
export type { PageMgmtState, PageMgmtFooterProps, } from './shells/internals/PageMgmtFooter';
|
|
23
|
-
export type { CatalogTile } from './shells/internals/catalog-mocks';
|
|
24
|
-
export { MOCK_LENSES, MOCK_DEFAULT_LENS, MOCK_TILES_BY_LENS, } from './shells/internals/catalog-mocks';
|
|
23
|
+
export type { CatalogTile, CatalogTileSubStat, CatalogLensMeta, CatalogLensTiles, } from './shells/internals/catalog-mocks';
|
|
24
|
+
export { MOCK_LENSES, MOCK_DEFAULT_LENS, MOCK_LENS_META, MOCK_TILES_BY_LENS, } from './shells/internals/catalog-mocks';
|
|
25
25
|
export type { PageEntry } from './shells/internals/page-mgmt-mocks';
|
|
26
26
|
export { MOCK_PAGES } from './shells/internals/page-mgmt-mocks';
|
|
27
27
|
export { PANEL_IDS } from './coordinator/PANEL_IDS';
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PanelShellProps } from '../PanelHost';
|
|
3
|
-
import {
|
|
3
|
+
import { CatalogLensMeta, CatalogLensTiles } from './internals/catalog-mocks';
|
|
4
4
|
export interface CatalogAddShellProps extends PanelShellProps {
|
|
5
5
|
/** Available lenses; defaults to MOCK_LENSES (spike §6.2.5). */
|
|
6
6
|
lenses?: readonly string[];
|
|
7
|
-
/** Initial active lens; defaults to MOCK_DEFAULT_LENS
|
|
7
|
+
/** Initial active lens; defaults to MOCK_DEFAULT_LENS. */
|
|
8
8
|
defaultLens?: string;
|
|
9
9
|
/** Tile catalog keyed by lens; defaults to MOCK_TILES_BY_LENS. */
|
|
10
|
-
tilesByLens?: Readonly<Record<string,
|
|
10
|
+
tilesByLens?: Readonly<Record<string, CatalogLensTiles>>;
|
|
11
|
+
/** Per-lens H2 + helper + beta-chip metadata. */
|
|
12
|
+
lensMeta?: Readonly<Record<string, CatalogLensMeta>>;
|
|
11
13
|
/**
|
|
12
14
|
* Optional footer slot rendered as a SIBLING of the body, INSIDE the shell's
|
|
13
15
|
* CatalogStateContext.Provider. PanelSlot passes <CatalogFooter/> here so it
|
|
@@ -16,4 +18,4 @@ export interface CatalogAddShellProps extends PanelShellProps {
|
|
|
16
18
|
*/
|
|
17
19
|
footerSlot?: ReactNode;
|
|
18
20
|
}
|
|
19
|
-
export declare function CatalogAddShell({ isOpen, lenses, defaultLens, tilesByLens, footerSlot, }: CatalogAddShellProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function CatalogAddShell({ isOpen, lenses, defaultLens, tilesByLens, lensMeta, footerSlot, }: CatalogAddShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PanelShellProps } from '../PanelHost';
|
|
3
|
-
import {
|
|
3
|
+
import { CatalogLensTiles } from './internals/catalog-mocks';
|
|
4
4
|
export interface CatalogReplaceShellProps extends PanelShellProps {
|
|
5
5
|
/** Label of the card being replaced; rendered as 'replacing {label}' subtitle. */
|
|
6
6
|
replacingLabel?: string;
|
|
7
7
|
lenses?: readonly string[];
|
|
8
8
|
defaultLens?: string;
|
|
9
|
-
tilesByLens?: Readonly<Record<string,
|
|
9
|
+
tilesByLens?: Readonly<Record<string, CatalogLensTiles>>;
|
|
10
10
|
/** See CatalogAddShellProps.footerSlot — sibling slot inside Provider. */
|
|
11
11
|
footerSlot?: ReactNode;
|
|
12
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { PanelShellProps } from '
|
|
2
|
+
import { PanelShellProps } from './../PanelHost';
|
|
3
3
|
import { PageEntry } from './internals/page-mgmt-mocks';
|
|
4
4
|
export interface PageMgmtShellProps extends PanelShellProps {
|
|
5
5
|
/** Initial page list; defaults to MOCK_PAGES (§6.4.3 verbatim). */
|
|
@@ -1,15 +1,58 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
1
2
|
import { PanelShellProps } from '../PanelHost';
|
|
2
3
|
import { SettingsDimension } from '../../../primitives/dashboard/SettingsTabStrip';
|
|
4
|
+
import { AccentSwatch } from './settings';
|
|
3
5
|
export interface SettingsShellProps extends PanelShellProps {
|
|
4
6
|
/** Span of the source card (1|2|3). Plumbed by V2FeedbackSurface HOF. */
|
|
5
7
|
cardSpan?: 1 | 2 | 3;
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Legacy fallback label on the clone card when `previewSlot` is not provided.
|
|
10
|
+
* GAP-02 (sprint 2026-05-15) replaced this with `previewSlot` for 1:1 clones;
|
|
11
|
+
* kept for backward compatibility with consumers that haven't migrated.
|
|
12
|
+
* @deprecated prefer `previewSlot`
|
|
13
|
+
*/
|
|
7
14
|
cardLabel?: string;
|
|
8
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Legacy fallback value on the clone card when `previewSlot` is not provided.
|
|
17
|
+
* @deprecated prefer `previewSlot`
|
|
18
|
+
*/
|
|
9
19
|
cardValue?: string;
|
|
20
|
+
/**
|
|
21
|
+
* GAP-02 (sprint 2026-05-15): render-as-children path for the Stage 3D clone.
|
|
22
|
+
* When provided, this ReactNode is rendered inside <CloneCard>{...}</CloneCard>
|
|
23
|
+
* instead of the legacy cardLabel/cardValue placeholder. Consumer is expected
|
|
24
|
+
* to produce a static (pointer-events: none) preview of the source card with
|
|
25
|
+
* buffer-merged config so the clone is a 1:1 representation of the live card.
|
|
26
|
+
*/
|
|
27
|
+
previewSlot?: React.ReactNode;
|
|
10
28
|
/** Phase 16 D-02: dimensions to render as tabs. Reptime computes via useCardDimensions(cardType, colSpan). */
|
|
11
29
|
dimensions?: ReadonlyArray<SettingsDimension>;
|
|
12
30
|
/** Phase 16: initial active tab. Defaults to dimensions[0]. */
|
|
13
31
|
initialTab?: SettingsDimension;
|
|
32
|
+
/**
|
|
33
|
+
* Phase 16 P8 spot-fix — persisted baseline for this card.
|
|
34
|
+
*
|
|
35
|
+
* Consumer (reptime V2FeedbackSurface) computes this from
|
|
36
|
+
* `usePreferences('metricConfig')[cardId]` at OPEN time so that:
|
|
37
|
+
* - Re-opening the panel after Apply shows the saved value (not React default).
|
|
38
|
+
* - Reset (CLEAR_BUFFER) reverts to the saved value (CC-19 semantics with persistence).
|
|
39
|
+
*
|
|
40
|
+
* Display precedence per dimension:
|
|
41
|
+
* 1. live buffer (`state.bufferByCard[cardId].changes[dim]`) — user mid-edit
|
|
42
|
+
* 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'])
|
|
44
|
+
*
|
|
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.
|
|
49
|
+
*/
|
|
50
|
+
initialValues?: Partial<{
|
|
51
|
+
threshold: number;
|
|
52
|
+
timeframe: number;
|
|
53
|
+
accent: AccentSwatch;
|
|
54
|
+
/** GAP-03 (sprint 2026-05-15): persisted slot order. Max 3, empty array valid. */
|
|
55
|
+
slots: ReadonlyArray<string>;
|
|
56
|
+
}>;
|
|
14
57
|
}
|
|
15
|
-
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, dimensions, initialTab, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function SettingsShell({ isOpen, cardSpan, cardLabel, cardValue, previewSlot, dimensions, initialTab, initialValues, }: SettingsShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,5 +15,5 @@ export { MOCK_PAGES } from './internals/page-mgmt-mocks';
|
|
|
15
15
|
export type { PageEntry } from './internals/page-mgmt-mocks';
|
|
16
16
|
export { CatalogFooter, CatalogStateContext, useCatalogState } from './internals/CatalogFooter';
|
|
17
17
|
export type { CatalogFooterMode, CatalogState, CatalogFooterProps } from './internals/CatalogFooter';
|
|
18
|
-
export type { CatalogTile } from './internals/catalog-mocks';
|
|
19
|
-
export { MOCK_LENSES, MOCK_DEFAULT_LENS, MOCK_TILES_BY_LENS } from './internals/catalog-mocks';
|
|
18
|
+
export type { CatalogTile, CatalogTileSubStat, CatalogLensMeta, CatalogLensTiles, } from './internals/catalog-mocks';
|
|
19
|
+
export { MOCK_LENSES, MOCK_DEFAULT_LENS, MOCK_LENS_META, MOCK_TILES_BY_LENS, } from './internals/catalog-mocks';
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { CatalogLensMeta } from './catalog-mocks';
|
|
1
2
|
export interface CatalogLensPickerProps {
|
|
2
3
|
lenses: readonly string[];
|
|
3
4
|
activeLens: string;
|
|
4
5
|
onLensChange: (lens: string) => void;
|
|
6
|
+
/**
|
|
7
|
+
* GAP-06 — `pills` matches the prior-modal contract (default for CatalogAdd);
|
|
8
|
+
* `segmented` preserves the W2 segmented-chip + overflow contract for
|
|
9
|
+
* back-compat (CatalogReplace and any legacy tests still default to this
|
|
10
|
+
* when they pass `variant='segmented'` explicitly).
|
|
11
|
+
*/
|
|
12
|
+
variant?: 'pills' | 'segmented';
|
|
13
|
+
/**
|
|
14
|
+
* Per-lens metadata (beta chip, etc.); defaults to MOCK_LENS_META so the
|
|
15
|
+
* shell can omit the prop when using mocks.
|
|
16
|
+
*/
|
|
17
|
+
lensMeta?: Readonly<Record<string, CatalogLensMeta>>;
|
|
5
18
|
}
|
|
6
|
-
export declare function CatalogLensPicker({ lenses, activeLens, onLensChange }: CatalogLensPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function CatalogLensPicker({ lenses, activeLens, onLensChange, variant, lensMeta, }: CatalogLensPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,6 +12,9 @@ export interface CatalogTileGridProps {
|
|
|
12
12
|
*
|
|
13
13
|
* The regex captures the leading numeric/currency/percent token; the remainder
|
|
14
14
|
* is the label. If the segment has no number, the whole text falls into <small>.
|
|
15
|
+
*
|
|
16
|
+
* Kept for back-compat with W2 tests + the `stack: true` legacy tile model.
|
|
17
|
+
* GAP-06 — new tiles prefer `subStats` (structured) over `·`-split strings.
|
|
15
18
|
*/
|
|
16
19
|
export declare function renderStackValue(val: string): import("react/jsx-runtime").JSX.Element[];
|
|
17
20
|
export declare function CatalogTileGrid({ tiles, selectedTileId, onSelectTile }: CatalogTileGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,13 @@ import { PageEntry } from './page-mgmt-mocks';
|
|
|
2
2
|
export interface PageMgmtState {
|
|
3
3
|
pages: PageEntry[];
|
|
4
4
|
setPages: (updater: (prev: PageEntry[]) => PageEntry[]) => void;
|
|
5
|
+
/** GAP-05 (sprint 2026-05-15) — rename via kebab menu. Mock-state operation. */
|
|
6
|
+
renamePage?: (id: string, name: string) => void;
|
|
7
|
+
/** GAP-05 — duplicate via kebab menu. Mock-state operation; real BFF wiring
|
|
8
|
+
* in P5+ via HOF (PagesContext.duplicatePage already exists in reptime). */
|
|
9
|
+
duplicatePage?: (id: string) => void;
|
|
10
|
+
/** GAP-05 — delete via kebab menu. Mock-state operation. */
|
|
11
|
+
deletePage?: (id: string) => void;
|
|
5
12
|
}
|
|
6
13
|
export declare const PageMgmtStateContext: import('react').Context<PageMgmtState | null>;
|
|
7
14
|
export declare function usePageMgmtState(): PageMgmtState | null;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { PageEntry } from './page-mgmt-mocks';
|
|
2
2
|
export interface PageMgmtRowProps {
|
|
3
3
|
page: PageEntry;
|
|
4
|
+
/** @deprecated GAP-05 wires rename via window.prompt() through context. */
|
|
4
5
|
onRename?: (id: string) => void;
|
|
6
|
+
/** @deprecated GAP-05 wires kebab menu directly via context. */
|
|
5
7
|
onKebab?: (id: string) => void;
|
|
8
|
+
/** Drag-to-reorder hook seam — DEBT.md tracks dnd-kit wiring. */
|
|
6
9
|
onDragStart?: (id: string) => void;
|
|
7
10
|
}
|
|
8
11
|
export declare function PageMgmtRow({ page, onRename, onKebab, onDragStart }: PageMgmtRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Catalog panel mock data — Phase 11.5 P4 W2.
|
|
2
|
+
* Catalog panel mock data — Phase 11.5 P4 W2 + GAP-06 (sprint 2026-05-15).
|
|
3
3
|
*
|
|
4
4
|
* Module-level constants; no fetch, no PII. Spike-verbatim §6.2.5 lens list +
|
|
5
|
-
* §6.2.7 tile model.
|
|
6
|
-
* 'Order flow' to exercise `.span-2` + renderStackValue per §6.2.8).
|
|
5
|
+
* §6.2.7 tile model.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* GAP-06 (sprint 2026-05-15) — data shape widened to support spike-grade
|
|
8
|
+
* catalog rendering (SCREENSHOT-07/-08 visual contract):
|
|
9
|
+
*
|
|
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).
|
|
13
|
+
* - `lensMeta` keyed by lens name carries `headline` (active-lens H2),
|
|
14
|
+
* `helper` (sub-paragraph), `beta` flag.
|
|
15
|
+
* - 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).
|
|
18
|
+
* - `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
|
+
* - `accent` color hint for sparkline/donut tiles (HEX); CSS reads via
|
|
23
|
+
* inline style. `donut` flag enables the donut variant.
|
|
24
|
+
*
|
|
25
|
+
* Real BFF binding will replace this seam in a future plan (P5+); the
|
|
26
|
+
* `CatalogAddWithCards` HOF in V2FeedbackSurface will inject live-card
|
|
27
|
+
* snapshot values per Q4 (B_representative_static + mock fallback).
|
|
9
28
|
*/
|
|
29
|
+
/** Multi-up segment for stack tiles (3-up MTD/QTD/YTD, 5-up MTD/QTD/YTD/LYTD/7D). */
|
|
30
|
+
export interface CatalogTileSubStat {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}
|
|
10
34
|
export interface CatalogTile {
|
|
11
35
|
id: string;
|
|
12
36
|
label: string;
|
|
37
|
+
/** Single-value display; ignored when `subStats` is present. */
|
|
13
38
|
value: string;
|
|
39
|
+
/** Sub-statistics for multi-up tiles (3-up or 5-up). When present, overrides `value`. */
|
|
40
|
+
subStats?: readonly CatalogTileSubStat[];
|
|
41
|
+
/** @deprecated GAP-06 — `stack` is inferred from `subStats.length > 0`. Kept for back-compat with W2 tests. */
|
|
14
42
|
stack?: boolean;
|
|
15
43
|
desc: string;
|
|
16
|
-
|
|
44
|
+
/** Span variant chips ("1×1", "1×3", "1×5"); rendered top-right of tile. */
|
|
45
|
+
variants?: readonly string[];
|
|
46
|
+
/** Small orange "new" dot, top-right. */
|
|
47
|
+
isNew?: boolean;
|
|
48
|
+
/** GAP-06 — primary tile flagged as the recommended starting metric for this lens. */
|
|
49
|
+
startHere?: boolean;
|
|
50
|
+
/** Donut + value combo variant (vs flat number). */
|
|
51
|
+
donut?: boolean;
|
|
52
|
+
/** Accent HEX for donut/sparkline tiles. */
|
|
53
|
+
accent?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface CatalogLensMeta {
|
|
56
|
+
/** H2 question shown beneath the pill row when this lens is active. */
|
|
57
|
+
headline: string;
|
|
58
|
+
/** Sub-paragraph helper sentence. */
|
|
59
|
+
helper: string;
|
|
60
|
+
/** Renders BETA chip next to the pill label. */
|
|
61
|
+
beta?: boolean;
|
|
17
62
|
}
|
|
18
63
|
export declare const MOCK_LENSES: readonly string[];
|
|
19
|
-
export declare const MOCK_DEFAULT_LENS = "
|
|
20
|
-
export declare const
|
|
64
|
+
export declare const MOCK_DEFAULT_LENS = "Overbought";
|
|
65
|
+
export declare const MOCK_LENS_META: Readonly<Record<string, CatalogLensMeta>>;
|
|
66
|
+
/** Primary vs secondary tile groups for a lens. */
|
|
67
|
+
export interface CatalogLensTiles {
|
|
68
|
+
primary: readonly CatalogTile[];
|
|
69
|
+
/** Rendered under "MORE IN THIS LENS" subsection (§6.2.7 extension). */
|
|
70
|
+
secondary?: readonly CatalogTile[];
|
|
71
|
+
}
|
|
72
|
+
export declare const MOCK_TILES_BY_LENS: Readonly<Record<string, CatalogLensTiles>>;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface SlotsControlsProps {
|
|
3
|
+
value: ReadonlyArray<string>;
|
|
4
|
+
onChange: (next: ReadonlyArray<string>) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function SlotsControls({ value, onChange }: SlotsControlsProps): React.ReactElement;
|