@mt-gloss/ui 0.1.95 → 0.1.96
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/composites-panels.js +593 -189
- package/lib/composites/panels/coordinator/PANEL_IDS.d.ts +8 -0
- package/lib/composites/panels/index.d.ts +16 -0
- package/lib/composites/panels/shells/CatalogAddShell.d.ts +19 -0
- package/lib/composites/panels/shells/CatalogReplaceShell.d.ts +13 -0
- package/lib/composites/panels/shells/PageMgmtShell.d.ts +10 -0
- package/lib/composites/panels/shells/index.d.ts +15 -0
- package/lib/composites/panels/shells/internals/CatalogFooter.d.ts +18 -0
- package/lib/composites/panels/shells/internals/CatalogLensPicker.d.ts +6 -0
- package/lib/composites/panels/shells/internals/CatalogTileGrid.d.ts +17 -0
- package/lib/composites/panels/shells/internals/PageMgmtFooter.d.ts +16 -0
- package/lib/composites/panels/shells/internals/PageMgmtRow.d.ts +8 -0
- package/lib/composites/panels/shells/internals/catalog-mocks.d.ts +20 -0
- package/lib/composites/panels/shells/internals/page-mgmt-mocks.d.ts +12 -0
- package/package.json +1 -1
package/composites-panels.js
CHANGED
|
@@ -1,36 +1,391 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { C as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */
|
|
1
|
+
import { a as C, f as L, u as K, g, c as b } from "./COMMITS-By42AA8m.js";
|
|
2
|
+
import { C as we, b as Ae, P as _e, e as Le, i as Oe, r as xe, d as Ie } from "./COMMITS-By42AA8m.js";
|
|
3
|
+
import { jsx as o, jsxs as c, Fragment as j } from "react/jsx-runtime";
|
|
4
|
+
import { useState as m, useRef as O, createContext as x, useContext as I, useEffect as N, useLayoutEffect as q, useCallback as T } from "react";
|
|
5
|
+
function B({ children: e }) {
|
|
6
|
+
return /* @__PURE__ */ o("div", { className: "clone-stage", children: e });
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */
|
|
8
|
+
function G({ span: e, rotating: t = !0, children: a }) {
|
|
9
|
+
const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" ");
|
|
10
|
+
return /* @__PURE__ */ o("div", { className: n, children: a });
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function he({
|
|
13
13
|
isOpen: e,
|
|
14
|
-
cardSpan:
|
|
15
|
-
cardLabel:
|
|
16
|
-
cardValue:
|
|
14
|
+
cardSpan: t,
|
|
15
|
+
cardLabel: a = "Metric",
|
|
16
|
+
cardValue: n = "—"
|
|
17
17
|
}) {
|
|
18
|
-
const
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
18
|
+
const r = C()?.state.activeTrigger, s = r?.kind === "card-overflow" ? r.cardId : null, i = L(), d = r?.span;
|
|
19
|
+
return /* @__PURE__ */ c("div", { "data-shell": "settings", "aria-hidden": !e, children: [
|
|
20
|
+
/* @__PURE__ */ o(B, { children: /* @__PURE__ */ c(G, { span: t ?? d ?? 1, rotating: !i, children: [
|
|
21
|
+
/* @__PURE__ */ o("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: a }),
|
|
22
|
+
/* @__PURE__ */ o("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
|
|
23
23
|
] }) }),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ o("p", { style: { margin: "12px 0 0", fontSize: 14, color: "#495057" }, children: s ? `Settings for card: ${s}` : "Settings" }),
|
|
25
|
+
/* @__PURE__ */ o("p", { style: { margin: "8px 0 0", fontSize: 12, color: "#adb5bd" }, children: "Configuration options coming soon." })
|
|
26
26
|
] });
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
function M({ lenses: e, activeLens: t, onLensChange: a }) {
|
|
29
|
+
const [n, l] = m(!1), r = O(null), s = () => {
|
|
30
|
+
r.current != null && (window.clearTimeout(r.current), r.current = null);
|
|
31
|
+
}, i = () => {
|
|
32
|
+
s(), r.current = window.setTimeout(() => l(!1), 100);
|
|
33
|
+
}, d = e.filter((u) => u !== t);
|
|
34
|
+
return /* @__PURE__ */ o("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ c("div", { className: "cat-segmented", children: [
|
|
35
|
+
/* @__PURE__ */ o(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
type: "button",
|
|
39
|
+
className: "cat-seg active",
|
|
40
|
+
"data-lens": t,
|
|
41
|
+
"aria-pressed": "true",
|
|
42
|
+
children: t
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ c(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: "cat-seg-more",
|
|
49
|
+
onMouseEnter: () => {
|
|
50
|
+
s(), l(!0);
|
|
51
|
+
},
|
|
52
|
+
onMouseLeave: i,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ o("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
|
|
55
|
+
n && /* @__PURE__ */ o(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
className: "cat-seg-overflow",
|
|
59
|
+
role: "menu",
|
|
60
|
+
onMouseEnter: s,
|
|
61
|
+
onMouseLeave: i,
|
|
62
|
+
children: d.map((u) => /* @__PURE__ */ o(
|
|
63
|
+
"button",
|
|
64
|
+
{
|
|
65
|
+
type: "button",
|
|
66
|
+
"data-lens": u,
|
|
67
|
+
role: "menuitem",
|
|
68
|
+
onClick: () => {
|
|
69
|
+
a(u), l(!1);
|
|
70
|
+
},
|
|
71
|
+
children: u
|
|
72
|
+
},
|
|
73
|
+
u
|
|
74
|
+
))
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] }) });
|
|
81
|
+
}
|
|
82
|
+
function U(e) {
|
|
83
|
+
return e.split("·").map((t, a) => {
|
|
84
|
+
const n = t.trim(), l = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), r = l ? l[1] : "", s = l ? l[2] : n;
|
|
85
|
+
return /* @__PURE__ */ c("span", { children: [
|
|
86
|
+
/* @__PURE__ */ o("strong", { children: r }),
|
|
87
|
+
/* @__PURE__ */ o("small", { children: s })
|
|
88
|
+
] }, a);
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function D({ tiles: e, selectedTileId: t, onSelectTile: a }) {
|
|
92
|
+
return /* @__PURE__ */ o("div", { className: "cat-tiles", children: e.map((n) => {
|
|
93
|
+
const l = n.id === t, r = n.stack === !0, s = ["cat-tile"];
|
|
94
|
+
return r && s.push("span-2"), l && s.push("selected"), /* @__PURE__ */ c(
|
|
95
|
+
"button",
|
|
96
|
+
{
|
|
97
|
+
type: "button",
|
|
98
|
+
className: s.join(" "),
|
|
99
|
+
"data-metric": n.id,
|
|
100
|
+
"data-desc": n.desc,
|
|
101
|
+
"aria-pressed": l,
|
|
102
|
+
onClick: () => a(n.id, n.desc),
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ o("span", { className: "cat-tile-label", children: n.label }),
|
|
105
|
+
/* @__PURE__ */ o("span", { className: "cat-tile-value", children: r ? U(n.value) : n.value }),
|
|
106
|
+
n.variants && n.variants.length > 0 && /* @__PURE__ */ o("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((i) => /* @__PURE__ */ o("span", { children: i }, i)) })
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
n.id
|
|
110
|
+
);
|
|
111
|
+
}) });
|
|
112
|
+
}
|
|
113
|
+
const E = x(null);
|
|
114
|
+
function Y() {
|
|
115
|
+
return I(E);
|
|
116
|
+
}
|
|
117
|
+
function V({ mode: e, dispatch: t }) {
|
|
118
|
+
const a = Y();
|
|
119
|
+
if (a == null && e == null) return null;
|
|
120
|
+
const n = a?.mode ?? e ?? "add", l = a?.selectedTileId ?? null, r = a?.description ?? null, s = l == null;
|
|
121
|
+
return /* @__PURE__ */ c("div", { className: "panel-footer catalog", children: [
|
|
122
|
+
/* @__PURE__ */ o("div", { className: "cat-description", id: "cat-desc", children: r ?? /* @__PURE__ */ o("em", { children: "Tap a metric to see its description" }) }),
|
|
123
|
+
/* @__PURE__ */ c("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
|
|
124
|
+
/* @__PURE__ */ o("div", { className: "spacer", style: { flex: 1 } }),
|
|
125
|
+
/* @__PURE__ */ o(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
id: "btn-cat-cancel",
|
|
129
|
+
type: "button",
|
|
130
|
+
className: "btn btn-ghost",
|
|
131
|
+
onClick: () => t({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
132
|
+
children: "Cancel"
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
n === "add" && /* @__PURE__ */ o(
|
|
136
|
+
"button",
|
|
137
|
+
{
|
|
138
|
+
id: "btn-cat-add",
|
|
139
|
+
type: "button",
|
|
140
|
+
className: "btn btn-primary",
|
|
141
|
+
disabled: s,
|
|
142
|
+
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
143
|
+
children: "Add metric"
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
n === "replace" && /* @__PURE__ */ o(
|
|
147
|
+
"button",
|
|
148
|
+
{
|
|
149
|
+
id: "btn-cat-replace",
|
|
150
|
+
type: "button",
|
|
151
|
+
className: "btn btn-primary",
|
|
152
|
+
disabled: s,
|
|
153
|
+
onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
154
|
+
children: "Replace metric"
|
|
155
|
+
}
|
|
156
|
+
)
|
|
157
|
+
] })
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
const R = [
|
|
161
|
+
"Revenue",
|
|
162
|
+
"Order flow",
|
|
163
|
+
"Rep performance",
|
|
164
|
+
"Brand portfolio",
|
|
165
|
+
"Account coverage",
|
|
166
|
+
"Commission"
|
|
167
|
+
], k = "Order flow", z = {
|
|
168
|
+
Revenue: [
|
|
169
|
+
{ id: "rev-mtd", label: "Revenue MTD", value: "$184K", desc: "Month-to-date revenue across all manufacturers and territories." },
|
|
170
|
+
{ id: "rev-ytd", label: "Revenue YTD", value: "$2.1M", desc: "Year-to-date revenue including pending and posted orders.", variants: ["1×1", "1×3"] },
|
|
171
|
+
{ id: "rev-yoy", label: "YoY Δ", value: "+12.4%", desc: "Revenue growth versus the prior comparable period." },
|
|
172
|
+
{ id: "rev-avg", label: "Avg order", value: "$1,820", desc: "Average order value over the last 30 days." }
|
|
173
|
+
],
|
|
174
|
+
"Order flow": [
|
|
175
|
+
{
|
|
176
|
+
id: "of-funnel",
|
|
177
|
+
label: "Order funnel",
|
|
178
|
+
value: "New 42 · Incomplete 18 · Transmitted 91",
|
|
179
|
+
stack: !0,
|
|
180
|
+
desc: "Funnel snapshot — new orders, incomplete (awaiting attention), and transmitted to manufacturer.",
|
|
181
|
+
variants: ["1×3"]
|
|
182
|
+
},
|
|
183
|
+
{ id: "of-incomplete", label: "Incomplete", value: "18", desc: "Orders started but not yet transmitted." },
|
|
184
|
+
{ id: "of-transmitted", label: "Transmitted", value: "91", desc: "Orders successfully sent to manufacturer." },
|
|
185
|
+
{ id: "of-today", label: "New today", value: "7", desc: "Orders created in the current calendar day." },
|
|
186
|
+
{ id: "of-velocity", label: "Order velocity", value: "+3.1/d", desc: "Rolling 7-day order-creation rate change." }
|
|
187
|
+
],
|
|
188
|
+
"Rep performance": [
|
|
189
|
+
{ id: "rp-leader", label: "#1 Rep", value: "A. Chen", desc: "Top revenue performer in the current period." },
|
|
190
|
+
{ id: "rp-quota", label: "Below quota", value: "4 reps", desc: "Reps currently tracking below pace-to-quota." },
|
|
191
|
+
{ id: "rp-commission", label: "Commission pace", value: "$48K", desc: "Projected commission pool at current burn rate." },
|
|
192
|
+
{ id: "rp-active", label: "Active reps", value: "14", desc: "Reps with at least one order this period." }
|
|
193
|
+
],
|
|
194
|
+
"Brand portfolio": [
|
|
195
|
+
{ id: "bp-top", label: "Top brand", value: "Acme Co.", desc: "Highest-revenue manufacturer this period." },
|
|
196
|
+
{ id: "bp-mix", label: "Mix Δ", value: "+2pp", desc: "Portfolio mix shift versus the prior period." },
|
|
197
|
+
{ id: "bp-coverage", label: "Brand coverage", value: "73%", desc: "Percent of accounts with at least one active brand." },
|
|
198
|
+
{ id: "bp-new", label: "New brand adds", value: "3", desc: "Brands with first-order activity this period." }
|
|
199
|
+
],
|
|
200
|
+
"Account coverage": [
|
|
201
|
+
{ id: "ac-active", label: "Active accounts", value: "128", desc: "Accounts with at least one order in the period." },
|
|
202
|
+
{ id: "ac-untouched", label: "Untouched", value: "34", desc: "Accounts with zero activity in the period." },
|
|
203
|
+
{ id: "ac-concentration", label: "Concentration", value: "38% top-5", desc: "Revenue concentration in top-5 accounts." },
|
|
204
|
+
{ id: "ac-new", label: "New accounts", value: "6", desc: "Accounts with first-ever order this period." }
|
|
205
|
+
],
|
|
206
|
+
Commission: [
|
|
207
|
+
{ id: "cm-projected", label: "Projected", value: "$48K", desc: "Forecast commission at current pace." },
|
|
208
|
+
{ id: "cm-paid", label: "Paid", value: "$31K", desc: "Commission posted to ledger this period." },
|
|
209
|
+
{ id: "cm-pending", label: "Pending", value: "$17K", desc: "Commission earned but not yet posted." },
|
|
210
|
+
{ id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
|
|
211
|
+
]
|
|
212
|
+
};
|
|
213
|
+
function ve({
|
|
214
|
+
isOpen: e,
|
|
215
|
+
lenses: t = R,
|
|
216
|
+
defaultLens: a = k,
|
|
217
|
+
tilesByLens: n = z,
|
|
218
|
+
footerSlot: l
|
|
219
|
+
}) {
|
|
220
|
+
const [r, s] = m(a), [i, d] = m(null), [u, p] = m(null), v = n[r] ?? [];
|
|
221
|
+
return /* @__PURE__ */ c(
|
|
222
|
+
E.Provider,
|
|
223
|
+
{
|
|
224
|
+
value: { mode: "add", selectedTileId: i, description: u },
|
|
225
|
+
children: [
|
|
226
|
+
/* @__PURE__ */ c("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
|
|
227
|
+
/* @__PURE__ */ o("h3", { children: "Add a metric" }),
|
|
228
|
+
/* @__PURE__ */ o(
|
|
229
|
+
M,
|
|
230
|
+
{
|
|
231
|
+
lenses: t,
|
|
232
|
+
activeLens: r,
|
|
233
|
+
onLensChange: (f) => {
|
|
234
|
+
s(f), d(null), p(null);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
),
|
|
238
|
+
/* @__PURE__ */ o(
|
|
239
|
+
D,
|
|
240
|
+
{
|
|
241
|
+
tiles: v,
|
|
242
|
+
selectedTileId: i,
|
|
243
|
+
onSelectTile: (f, h) => {
|
|
244
|
+
d(f), p(h);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
)
|
|
248
|
+
] }),
|
|
249
|
+
l
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
function ge({
|
|
255
|
+
isOpen: e,
|
|
256
|
+
replacingLabel: t,
|
|
257
|
+
lenses: a = R,
|
|
258
|
+
defaultLens: n = k,
|
|
259
|
+
tilesByLens: l = z,
|
|
260
|
+
footerSlot: r
|
|
261
|
+
}) {
|
|
262
|
+
const [s, i] = m(n), [d, u] = m(null), [p, v] = m(null), f = l[s] ?? [];
|
|
263
|
+
return /* @__PURE__ */ c(
|
|
264
|
+
E.Provider,
|
|
265
|
+
{
|
|
266
|
+
value: { mode: "replace", selectedTileId: d, description: p },
|
|
267
|
+
children: [
|
|
268
|
+
/* @__PURE__ */ c("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
|
|
269
|
+
/* @__PURE__ */ o("h3", { children: "Replace metric" }),
|
|
270
|
+
t && /* @__PURE__ */ c("p", { className: "cat-subtitle", children: [
|
|
271
|
+
"replacing ",
|
|
272
|
+
t
|
|
273
|
+
] }),
|
|
274
|
+
/* @__PURE__ */ o(
|
|
275
|
+
M,
|
|
276
|
+
{
|
|
277
|
+
lenses: a,
|
|
278
|
+
activeLens: s,
|
|
279
|
+
onLensChange: (h) => {
|
|
280
|
+
i(h), u(null), v(null);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
),
|
|
284
|
+
/* @__PURE__ */ o(
|
|
285
|
+
D,
|
|
286
|
+
{
|
|
287
|
+
tiles: f,
|
|
288
|
+
selectedTileId: d,
|
|
289
|
+
onSelectTile: (h, H) => {
|
|
290
|
+
u(h), v(H);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
)
|
|
294
|
+
] }),
|
|
295
|
+
r
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
function W({ page: e, onRename: t, onKebab: a, onDragStart: n }) {
|
|
301
|
+
const l = ["pm-row"];
|
|
302
|
+
return e.active && l.push("active"), /* @__PURE__ */ c("div", { className: l.join(" "), "data-page-id": e.id, role: "listitem", children: [
|
|
303
|
+
/* @__PURE__ */ o(
|
|
304
|
+
"div",
|
|
305
|
+
{
|
|
306
|
+
className: "pm-handle",
|
|
307
|
+
"aria-hidden": "true",
|
|
308
|
+
onMouseDown: () => n?.(e.id),
|
|
309
|
+
children: "⋮⋮"
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
/* @__PURE__ */ o("div", { className: "pm-name", onClick: () => t?.(e.id), children: e.name }),
|
|
313
|
+
/* @__PURE__ */ o(
|
|
314
|
+
"button",
|
|
315
|
+
{
|
|
316
|
+
type: "button",
|
|
317
|
+
className: "pm-kebab",
|
|
318
|
+
"aria-label": "Page options",
|
|
319
|
+
onClick: () => a?.(e.id),
|
|
320
|
+
children: "⋯"
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
] });
|
|
324
|
+
}
|
|
325
|
+
const $ = x(null);
|
|
326
|
+
function Q() {
|
|
327
|
+
return I($);
|
|
328
|
+
}
|
|
329
|
+
function J(e = {}) {
|
|
330
|
+
const a = Q()?.setPages;
|
|
331
|
+
return /* @__PURE__ */ c(
|
|
332
|
+
"div",
|
|
333
|
+
{
|
|
334
|
+
className: "panel-footer pm",
|
|
335
|
+
style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
|
|
336
|
+
children: [
|
|
337
|
+
/* @__PURE__ */ o("div", { className: "spacer", style: { flex: 1 } }),
|
|
338
|
+
/* @__PURE__ */ o(
|
|
339
|
+
"button",
|
|
340
|
+
{
|
|
341
|
+
id: "btn-new-page",
|
|
342
|
+
type: "button",
|
|
343
|
+
className: "btn btn-primary",
|
|
344
|
+
onClick: () => {
|
|
345
|
+
a && a((n) => [
|
|
346
|
+
...n,
|
|
347
|
+
{ id: `new-${Date.now()}`, name: "Untitled", active: !1 }
|
|
348
|
+
]);
|
|
349
|
+
},
|
|
350
|
+
children: "+ New page"
|
|
351
|
+
}
|
|
352
|
+
)
|
|
353
|
+
]
|
|
354
|
+
}
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
const X = [
|
|
358
|
+
{ id: "p-pipeline", name: "My Pipeline", active: !0 },
|
|
359
|
+
{ id: "p-numbers", name: "My Numbers", active: !1 },
|
|
360
|
+
{ id: "p-morning", name: "My Morning", active: !1 },
|
|
361
|
+
{ id: "p-accounts", name: "My Accounts", active: !1 }
|
|
362
|
+
];
|
|
363
|
+
function be({
|
|
364
|
+
isOpen: e,
|
|
365
|
+
pages: t = X,
|
|
366
|
+
footerSlot: a
|
|
367
|
+
}) {
|
|
368
|
+
const [n, l] = m(() => [...t]);
|
|
369
|
+
return /* @__PURE__ */ c($.Provider, { value: { pages: n, setPages: l }, children: [
|
|
370
|
+
/* @__PURE__ */ c("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
|
|
371
|
+
/* @__PURE__ */ o("h3", { children: "Manage pages" }),
|
|
372
|
+
/* @__PURE__ */ o("div", { className: "pm-list", role: "list", children: n.map((r) => /* @__PURE__ */ o(W, { page: r }, r.id)) })
|
|
373
|
+
] }),
|
|
374
|
+
a
|
|
375
|
+
] });
|
|
376
|
+
}
|
|
377
|
+
const ye = {
|
|
378
|
+
SETTINGS: "settings",
|
|
379
|
+
CATALOG_ADD: "catalog-add",
|
|
380
|
+
CATALOG_REPLACE: "catalog-replace",
|
|
381
|
+
PAGE_MGMT: "page-management",
|
|
382
|
+
NOTIFICATION_CENTER: "notification-center"
|
|
383
|
+
}, Z = {
|
|
29
384
|
position: "fixed",
|
|
30
385
|
inset: 0,
|
|
31
386
|
pointerEvents: "none",
|
|
32
387
|
zIndex: 55
|
|
33
|
-
},
|
|
388
|
+
}, ee = {
|
|
34
389
|
position: "absolute",
|
|
35
390
|
inset: 0,
|
|
36
391
|
zIndex: 1,
|
|
@@ -39,259 +394,308 @@ const z = {
|
|
|
39
394
|
pointerEvents: "none",
|
|
40
395
|
background: "rgba(0, 0, 0, 0.04)"
|
|
41
396
|
};
|
|
42
|
-
function
|
|
43
|
-
const { state: e, dispatch:
|
|
44
|
-
|
|
397
|
+
function Pe() {
|
|
398
|
+
const { state: e, dispatch: t, getCloseLog: a } = K();
|
|
399
|
+
N(() => {
|
|
45
400
|
if (e.activePanelId == null) return;
|
|
46
|
-
function
|
|
47
|
-
|
|
401
|
+
function r(s) {
|
|
402
|
+
s.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
|
|
48
403
|
}
|
|
49
|
-
return document.addEventListener("keydown",
|
|
50
|
-
}, [e.activePanelId,
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}),
|
|
404
|
+
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
|
405
|
+
}, [e.activePanelId, t]);
|
|
406
|
+
const n = O(e);
|
|
407
|
+
q(() => {
|
|
408
|
+
n.current = e;
|
|
409
|
+
}), N(() => {
|
|
55
410
|
if (process.env.NODE_ENV === "production") return;
|
|
56
|
-
const
|
|
57
|
-
return
|
|
58
|
-
dispatch:
|
|
59
|
-
getState: () =>
|
|
60
|
-
getCloseLog:
|
|
411
|
+
const r = window;
|
|
412
|
+
return r.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), r.__panelsHostHandle = {
|
|
413
|
+
dispatch: t,
|
|
414
|
+
getState: () => n.current,
|
|
415
|
+
getCloseLog: a
|
|
61
416
|
}, () => {
|
|
62
|
-
|
|
417
|
+
r.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
|
|
63
418
|
};
|
|
64
|
-
}, [
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
}, [
|
|
68
|
-
return /* @__PURE__ */
|
|
419
|
+
}, [t, a]);
|
|
420
|
+
const l = T(() => {
|
|
421
|
+
t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
|
|
422
|
+
}, [t]);
|
|
423
|
+
return /* @__PURE__ */ o("div", { "data-panel-host": "true", style: Z, children: e.activePanelId != null && /* @__PURE__ */ o(
|
|
69
424
|
"div",
|
|
70
425
|
{
|
|
71
426
|
"data-panel-scrim": "true",
|
|
72
|
-
style:
|
|
73
|
-
onClick:
|
|
427
|
+
style: ee,
|
|
428
|
+
onClick: l
|
|
74
429
|
}
|
|
75
430
|
) });
|
|
76
431
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
if (
|
|
80
|
-
const { state:
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
432
|
+
function Se({ panelComponents: e }) {
|
|
433
|
+
const t = C();
|
|
434
|
+
if (t == null) return null;
|
|
435
|
+
const { state: a, dispatch: n } = t;
|
|
436
|
+
if (a.activePanelId == null) return null;
|
|
437
|
+
const l = e[a.activePanelId];
|
|
438
|
+
if (l == null)
|
|
84
439
|
return process.env.NODE_ENV !== "production" && console.error(
|
|
85
440
|
"[panels] No panel component registered for activePanelId:",
|
|
86
|
-
|
|
441
|
+
a.activePanelId
|
|
87
442
|
), null;
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
443
|
+
if (a.activePanelId === "settings")
|
|
444
|
+
return /* @__PURE__ */ o(g, { isOpen: !0, children: /* @__PURE__ */ o(
|
|
445
|
+
b,
|
|
91
446
|
{
|
|
92
|
-
|
|
93
|
-
type: "
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
447
|
+
isOpen: !0,
|
|
448
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
449
|
+
footer: /* @__PURE__ */ c(j, { children: [
|
|
450
|
+
/* @__PURE__ */ o(
|
|
451
|
+
"button",
|
|
452
|
+
{
|
|
453
|
+
id: "settings-cancel",
|
|
454
|
+
type: "button",
|
|
455
|
+
className: "gloss-panel-chrome__footer-btn",
|
|
456
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
|
|
457
|
+
children: "Cancel"
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ o(
|
|
461
|
+
"button",
|
|
462
|
+
{
|
|
463
|
+
id: "settings-apply",
|
|
464
|
+
type: "button",
|
|
465
|
+
className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
|
|
466
|
+
onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
|
|
467
|
+
children: "Apply"
|
|
468
|
+
}
|
|
469
|
+
)
|
|
470
|
+
] }),
|
|
471
|
+
children: /* @__PURE__ */ o(l, { isOpen: !0 })
|
|
97
472
|
}
|
|
98
|
-
)
|
|
99
|
-
|
|
100
|
-
|
|
473
|
+
) });
|
|
474
|
+
if (a.activePanelId === "catalog-add" || a.activePanelId === "catalog-replace") {
|
|
475
|
+
const r = a.activePanelId === "catalog-replace" ? "replace" : "add";
|
|
476
|
+
return /* @__PURE__ */ o(g, { isOpen: !0, children: /* @__PURE__ */ o(
|
|
477
|
+
b,
|
|
101
478
|
{
|
|
102
|
-
|
|
103
|
-
type: "
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
479
|
+
isOpen: !0,
|
|
480
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
481
|
+
footer: null,
|
|
482
|
+
children: /* @__PURE__ */ o(
|
|
483
|
+
l,
|
|
484
|
+
{
|
|
485
|
+
isOpen: !0,
|
|
486
|
+
footerSlot: /* @__PURE__ */ o(V, { mode: r, dispatch: n })
|
|
487
|
+
}
|
|
488
|
+
)
|
|
107
489
|
}
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
|
|
490
|
+
) });
|
|
491
|
+
}
|
|
492
|
+
return a.activePanelId === "page-management" ? /* @__PURE__ */ o(g, { isOpen: !0, children: /* @__PURE__ */ o(
|
|
493
|
+
b,
|
|
494
|
+
{
|
|
495
|
+
isOpen: !0,
|
|
496
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
497
|
+
footer: null,
|
|
498
|
+
children: /* @__PURE__ */ o(l, { isOpen: !0, footerSlot: /* @__PURE__ */ o(J, {}) })
|
|
499
|
+
}
|
|
500
|
+
) }) : /* @__PURE__ */ o(g, { isOpen: !0, children: /* @__PURE__ */ o(
|
|
501
|
+
b,
|
|
112
502
|
{
|
|
113
503
|
isOpen: !0,
|
|
114
|
-
onClose: () =>
|
|
115
|
-
footer:
|
|
116
|
-
children: /* @__PURE__ */
|
|
504
|
+
onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
|
|
505
|
+
footer: null,
|
|
506
|
+
children: /* @__PURE__ */ o(l, { isOpen: !0 })
|
|
117
507
|
}
|
|
118
508
|
) });
|
|
119
509
|
}
|
|
120
|
-
function
|
|
510
|
+
function w(e) {
|
|
121
511
|
return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
|
|
122
512
|
}
|
|
123
|
-
const
|
|
124
|
-
function
|
|
125
|
-
if (typeof window > "u") return
|
|
126
|
-
const
|
|
127
|
-
if (!
|
|
128
|
-
const
|
|
129
|
-
return Number.isNaN(
|
|
513
|
+
const te = 685, A = 627, ne = "cubic-bezier(0.22, 1, 0.36, 1)", ae = 200;
|
|
514
|
+
function F(e, t) {
|
|
515
|
+
if (typeof window > "u") return t;
|
|
516
|
+
const a = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
|
|
517
|
+
if (!a) return t;
|
|
518
|
+
const n = parseFloat(a);
|
|
519
|
+
return Number.isNaN(n) ? t : a.endsWith("s") && !a.endsWith("ms") ? n * 1e3 : n;
|
|
130
520
|
}
|
|
131
|
-
function
|
|
132
|
-
return typeof window > "u" ?
|
|
521
|
+
function oe(e, t) {
|
|
522
|
+
return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
133
523
|
}
|
|
134
|
-
function
|
|
524
|
+
function y(e) {
|
|
135
525
|
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
136
526
|
}
|
|
137
|
-
function
|
|
138
|
-
const { mountEl:
|
|
139
|
-
if (
|
|
140
|
-
|
|
527
|
+
function re(e) {
|
|
528
|
+
const { mountEl: t, chromeEl: a, reducedMotion: n, onAssert: l } = e;
|
|
529
|
+
if (t == null || a == null) {
|
|
530
|
+
y(e), l?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
|
|
141
531
|
return;
|
|
142
532
|
}
|
|
143
|
-
if (
|
|
144
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
533
|
+
if (n) {
|
|
534
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), l?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
|
|
145
535
|
return;
|
|
146
536
|
}
|
|
147
|
-
if (typeof
|
|
148
|
-
|
|
537
|
+
if (typeof a.animate != "function") {
|
|
538
|
+
y(e), l?.({ branch: "slide-no-waapi", timestamp: Date.now() });
|
|
149
539
|
return;
|
|
150
540
|
}
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
const
|
|
541
|
+
const r = a.cloneNode(!0);
|
|
542
|
+
r.id = "panel-chrome-frozen", r.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(r), a.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
|
|
543
|
+
const s = F("--panel-open-dur", te), i = oe("--panel-easing", ne), d = a.animate(
|
|
154
544
|
[{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
|
|
155
|
-
{ duration:
|
|
545
|
+
{ duration: s, easing: i, fill: "forwards" }
|
|
156
546
|
);
|
|
157
|
-
|
|
547
|
+
d.addEventListener(
|
|
158
548
|
"finish",
|
|
159
549
|
() => {
|
|
160
|
-
|
|
550
|
+
r.remove(), a.style.zIndex = "", d.cancel(), l?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
|
|
161
551
|
},
|
|
162
552
|
{ once: !0 }
|
|
163
553
|
);
|
|
164
554
|
}
|
|
165
|
-
function
|
|
166
|
-
const { mountEl:
|
|
167
|
-
if (
|
|
168
|
-
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() =>
|
|
555
|
+
function le(e) {
|
|
556
|
+
const { mountEl: t, onAssert: a } = e;
|
|
557
|
+
if (t == null) {
|
|
558
|
+
e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => y(e), A), a?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
|
|
169
559
|
return;
|
|
170
560
|
}
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
|
|
561
|
+
const n = F("--panel-close-dur", A);
|
|
562
|
+
let l = !1, r = null;
|
|
563
|
+
const s = (d) => {
|
|
564
|
+
d.target !== t || d.propertyName !== "max-height" || l || (l = !0, r != null && clearTimeout(r), t.removeEventListener("transitionend", s), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "handoff-complete", timestamp: Date.now() }));
|
|
565
|
+
}, i = () => {
|
|
566
|
+
l || (l = !0, t.removeEventListener("transitionend", s), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "handoff-forced", timestamp: Date.now() }));
|
|
177
567
|
};
|
|
178
|
-
|
|
568
|
+
t.addEventListener("transitionend", s), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), r = setTimeout(i, n + ae);
|
|
179
569
|
}
|
|
180
|
-
function
|
|
181
|
-
const { state:
|
|
182
|
-
if (
|
|
183
|
-
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }),
|
|
570
|
+
function se(e) {
|
|
571
|
+
const { state: t, onAssert: a } = e;
|
|
572
|
+
if (t.activePanelId && t.isDirty) {
|
|
573
|
+
e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "blocked-dirty", timestamp: Date.now() });
|
|
184
574
|
return;
|
|
185
575
|
}
|
|
186
|
-
const
|
|
187
|
-
if (!!
|
|
188
|
-
|
|
576
|
+
const n = w(t.activeTrigger), l = w(e.trigger);
|
|
577
|
+
if (!!t.activePanelId && n != null && n === l) {
|
|
578
|
+
re(e);
|
|
189
579
|
return;
|
|
190
580
|
}
|
|
191
|
-
if (
|
|
192
|
-
|
|
581
|
+
if (t.activePanelId) {
|
|
582
|
+
le(e);
|
|
193
583
|
return;
|
|
194
584
|
}
|
|
195
|
-
|
|
585
|
+
y(e), a?.({ branch: "fresh-open", timestamp: Date.now() });
|
|
196
586
|
}
|
|
197
|
-
function
|
|
587
|
+
function ie() {
|
|
198
588
|
if (!(typeof window > "u"))
|
|
199
589
|
return window.__panelsAsserter;
|
|
200
590
|
}
|
|
201
|
-
function
|
|
202
|
-
const e =
|
|
203
|
-
return
|
|
204
|
-
(
|
|
591
|
+
function Ce() {
|
|
592
|
+
const e = C(), t = L();
|
|
593
|
+
return T(
|
|
594
|
+
(a, n) => {
|
|
205
595
|
if (!e)
|
|
206
596
|
return;
|
|
207
|
-
const
|
|
208
|
-
panelId:
|
|
209
|
-
trigger:
|
|
597
|
+
const l = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, r = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, s = {
|
|
598
|
+
panelId: a,
|
|
599
|
+
trigger: n,
|
|
210
600
|
state: e.state,
|
|
211
601
|
dispatch: e.dispatch,
|
|
212
|
-
mountEl:
|
|
213
|
-
chromeEl:
|
|
214
|
-
reducedMotion:
|
|
215
|
-
onAssert: (
|
|
216
|
-
|
|
602
|
+
mountEl: l,
|
|
603
|
+
chromeEl: r,
|
|
604
|
+
reducedMotion: t,
|
|
605
|
+
onAssert: (i) => {
|
|
606
|
+
ie()?.recordTransition?.(i);
|
|
217
607
|
}
|
|
218
608
|
};
|
|
219
|
-
|
|
609
|
+
se(s);
|
|
220
610
|
},
|
|
221
|
-
[e,
|
|
611
|
+
[e, t]
|
|
222
612
|
);
|
|
223
613
|
}
|
|
224
|
-
let
|
|
225
|
-
function
|
|
614
|
+
let P = !1, S = null;
|
|
615
|
+
function _() {
|
|
226
616
|
const e = [];
|
|
227
|
-
let
|
|
228
|
-
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"),
|
|
229
|
-
const
|
|
230
|
-
|
|
231
|
-
const
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
if (
|
|
235
|
-
const p =
|
|
617
|
+
let t = "cleaned";
|
|
618
|
+
document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
|
|
619
|
+
const n = document.querySelectorAll(".gloss-panel-mount");
|
|
620
|
+
n.length > 1 && e.push(`mount-count=${n.length}`);
|
|
621
|
+
const l = n[0] ?? null, r = l ? l.querySelectorAll(".gloss-panel-chrome") : [];
|
|
622
|
+
r.length > 1 && e.push(`chrome-count=${r.length}`);
|
|
623
|
+
const s = r[0] ?? null;
|
|
624
|
+
if (s) {
|
|
625
|
+
const p = s.style.zIndex;
|
|
236
626
|
p !== "" && p !== "2" && e.push(`chrome-zindex=${p}`);
|
|
237
627
|
}
|
|
238
|
-
const
|
|
628
|
+
const i = l ? "present" : "absent", d = s ? "present" : "absent";
|
|
239
629
|
return {
|
|
240
630
|
valid: e.length === 0,
|
|
241
|
-
mount:
|
|
242
|
-
chrome:
|
|
243
|
-
frozen:
|
|
631
|
+
mount: i,
|
|
632
|
+
chrome: d,
|
|
633
|
+
frozen: t,
|
|
244
634
|
orphans: e,
|
|
245
635
|
timestamp: Date.now()
|
|
246
636
|
};
|
|
247
637
|
}
|
|
248
|
-
function
|
|
638
|
+
function ce() {
|
|
249
639
|
return {
|
|
250
|
-
enable:
|
|
251
|
-
disable:
|
|
252
|
-
isEnabled: () =>
|
|
253
|
-
getLastReport: () =>
|
|
640
|
+
enable: de,
|
|
641
|
+
disable: ue,
|
|
642
|
+
isEnabled: () => P,
|
|
643
|
+
getLastReport: () => S,
|
|
254
644
|
recordTransition: (e) => {
|
|
255
|
-
|
|
645
|
+
P && (S = { ...e, ..._() });
|
|
256
646
|
},
|
|
257
647
|
assertOnce: () => {
|
|
258
|
-
const e =
|
|
259
|
-
return
|
|
648
|
+
const e = _();
|
|
649
|
+
return S = e, e;
|
|
260
650
|
}
|
|
261
651
|
};
|
|
262
652
|
}
|
|
263
|
-
function
|
|
264
|
-
if (
|
|
653
|
+
function de() {
|
|
654
|
+
if (P = !0, typeof window > "u") return;
|
|
265
655
|
const e = window;
|
|
266
|
-
e.__panelsAsserter || (e.__panelsAsserter =
|
|
656
|
+
e.__panelsAsserter || (e.__panelsAsserter = ce(), console.info(
|
|
267
657
|
"[panels] Q12-12 asserter enabled. Inspect via window.__panelsAsserter.getLastReport()."
|
|
268
658
|
));
|
|
269
659
|
}
|
|
270
|
-
function
|
|
271
|
-
|
|
660
|
+
function ue() {
|
|
661
|
+
P = !1;
|
|
272
662
|
}
|
|
273
663
|
export {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
G as
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
664
|
+
we as COMMITS,
|
|
665
|
+
ve as CatalogAddShell,
|
|
666
|
+
V as CatalogFooter,
|
|
667
|
+
ge as CatalogReplaceShell,
|
|
668
|
+
E as CatalogStateContext,
|
|
669
|
+
G as CloneCard,
|
|
670
|
+
B as CloneStage,
|
|
671
|
+
k as MOCK_DEFAULT_LENS,
|
|
672
|
+
R as MOCK_LENSES,
|
|
673
|
+
X as MOCK_PAGES,
|
|
674
|
+
z as MOCK_TILES_BY_LENS,
|
|
675
|
+
ye as PANEL_IDS,
|
|
676
|
+
J as PageMgmtFooter,
|
|
677
|
+
be as PageMgmtShell,
|
|
678
|
+
$ as PageMgmtStateContext,
|
|
679
|
+
b as PanelChrome,
|
|
680
|
+
Ae as PanelHost,
|
|
681
|
+
Pe as PanelHostShell,
|
|
682
|
+
g as PanelMount,
|
|
683
|
+
_e as PanelProvider,
|
|
684
|
+
Se as PanelSlot,
|
|
685
|
+
he as SettingsShell,
|
|
686
|
+
_ as assertPanelDomShape,
|
|
687
|
+
Le as deriveSurfaceState,
|
|
688
|
+
ue as disablePanelAsserter,
|
|
689
|
+
de as enablePanelAsserter,
|
|
690
|
+
Oe as initialState,
|
|
691
|
+
w as positionKey,
|
|
692
|
+
xe as reducer,
|
|
693
|
+
se as transitionToPanel,
|
|
694
|
+
Y as useCatalogState,
|
|
695
|
+
Q as usePageMgmtState,
|
|
696
|
+
K as usePanelContext,
|
|
697
|
+
C as usePanelContextOptional,
|
|
698
|
+
Ie as usePanelCoordinator,
|
|
699
|
+
L as useReducedMotionPanel,
|
|
700
|
+
Ce as useTransitionToPanel
|
|
297
701
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PANEL_IDS: {
|
|
2
|
+
readonly SETTINGS: "settings";
|
|
3
|
+
readonly CATALOG_ADD: "catalog-add";
|
|
4
|
+
readonly CATALOG_REPLACE: "catalog-replace";
|
|
5
|
+
readonly PAGE_MGMT: "page-management";
|
|
6
|
+
readonly NOTIFICATION_CENTER: "notification-center";
|
|
7
|
+
};
|
|
8
|
+
export type PanelIdKey = keyof typeof PANEL_IDS;
|
|
@@ -9,6 +9,22 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export { PanelProvider, usePanelContext, usePanelContextOptional } from './PanelProvider';
|
|
11
11
|
export { SettingsShell } from './shells/SettingsShell';
|
|
12
|
+
export { CatalogAddShell } from './shells/CatalogAddShell';
|
|
13
|
+
export type { CatalogAddShellProps } from './shells/CatalogAddShell';
|
|
14
|
+
export { CatalogReplaceShell } from './shells/CatalogReplaceShell';
|
|
15
|
+
export type { CatalogReplaceShellProps } from './shells/CatalogReplaceShell';
|
|
16
|
+
export { PageMgmtShell } from './shells/PageMgmtShell';
|
|
17
|
+
export type { PageMgmtShellProps } from './shells/PageMgmtShell';
|
|
18
|
+
export { CatalogFooter, CatalogStateContext, useCatalogState, } from './shells/internals/CatalogFooter';
|
|
19
|
+
export type { CatalogFooterMode, CatalogState, CatalogFooterProps, } from './shells/internals/CatalogFooter';
|
|
20
|
+
export { PageMgmtFooter, PageMgmtStateContext, usePageMgmtState, } from './shells/internals/PageMgmtFooter';
|
|
21
|
+
export type { PageMgmtState, PageMgmtFooterProps, } from './shells/internals/PageMgmtFooter';
|
|
22
|
+
export type { CatalogTile } from './shells/internals/catalog-mocks';
|
|
23
|
+
export { MOCK_LENSES, MOCK_DEFAULT_LENS, MOCK_TILES_BY_LENS, } from './shells/internals/catalog-mocks';
|
|
24
|
+
export type { PageEntry } from './shells/internals/page-mgmt-mocks';
|
|
25
|
+
export { MOCK_PAGES } from './shells/internals/page-mgmt-mocks';
|
|
26
|
+
export { PANEL_IDS } from './coordinator/PANEL_IDS';
|
|
27
|
+
export type { PanelIdKey } from './coordinator/PANEL_IDS';
|
|
12
28
|
export { PanelHost } from './PanelHost';
|
|
13
29
|
export { PanelHostShell } from './PanelHostShell';
|
|
14
30
|
export { PanelSlot } from './PanelSlot';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PanelShellProps } from '../PanelHost';
|
|
3
|
+
import { CatalogTile } from './internals/catalog-mocks';
|
|
4
|
+
export interface CatalogAddShellProps extends PanelShellProps {
|
|
5
|
+
/** Available lenses; defaults to MOCK_LENSES (spike §6.2.5). */
|
|
6
|
+
lenses?: readonly string[];
|
|
7
|
+
/** Initial active lens; defaults to MOCK_DEFAULT_LENS ('Order flow'). */
|
|
8
|
+
defaultLens?: string;
|
|
9
|
+
/** Tile catalog keyed by lens; defaults to MOCK_TILES_BY_LENS. */
|
|
10
|
+
tilesByLens?: Readonly<Record<string, readonly CatalogTile[]>>;
|
|
11
|
+
/**
|
|
12
|
+
* Optional footer slot rendered as a SIBLING of the body, INSIDE the shell's
|
|
13
|
+
* CatalogStateContext.Provider. PanelSlot passes <CatalogFooter/> here so it
|
|
14
|
+
* can read live selectedTileId/description from this shell instance.
|
|
15
|
+
* Standalone tests (no PanelSlot) leave undefined → no footer.
|
|
16
|
+
*/
|
|
17
|
+
footerSlot?: ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare function CatalogAddShell({ isOpen, lenses, defaultLens, tilesByLens, footerSlot, }: CatalogAddShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PanelShellProps } from '../PanelHost';
|
|
3
|
+
import { CatalogTile } from './internals/catalog-mocks';
|
|
4
|
+
export interface CatalogReplaceShellProps extends PanelShellProps {
|
|
5
|
+
/** Label of the card being replaced; rendered as 'replacing {label}' subtitle. */
|
|
6
|
+
replacingLabel?: string;
|
|
7
|
+
lenses?: readonly string[];
|
|
8
|
+
defaultLens?: string;
|
|
9
|
+
tilesByLens?: Readonly<Record<string, readonly CatalogTile[]>>;
|
|
10
|
+
/** See CatalogAddShellProps.footerSlot — sibling slot inside Provider. */
|
|
11
|
+
footerSlot?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function CatalogReplaceShell({ isOpen, replacingLabel, lenses, defaultLens, tilesByLens, footerSlot, }: CatalogReplaceShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PanelShellProps } from '../PanelHost';
|
|
3
|
+
import { PageEntry } from './internals/page-mgmt-mocks';
|
|
4
|
+
export interface PageMgmtShellProps extends PanelShellProps {
|
|
5
|
+
/** Initial page list; defaults to MOCK_PAGES (§6.4.3 verbatim). */
|
|
6
|
+
pages?: readonly PageEntry[];
|
|
7
|
+
/** See CatalogAddShellProps.footerSlot — sibling slot inside Provider. */
|
|
8
|
+
footerSlot?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare function PageMgmtShell({ isOpen, pages: initialPages, footerSlot, }: PageMgmtShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,3 +2,18 @@
|
|
|
2
2
|
* Panel shells barrel — all shells available from '@mt-gloss/ui/composites/panels'.
|
|
3
3
|
*/
|
|
4
4
|
export { SettingsShell } from './SettingsShell';
|
|
5
|
+
export type { SettingsShellProps } from './SettingsShell';
|
|
6
|
+
export { CatalogAddShell } from './CatalogAddShell';
|
|
7
|
+
export type { CatalogAddShellProps } from './CatalogAddShell';
|
|
8
|
+
export { CatalogReplaceShell } from './CatalogReplaceShell';
|
|
9
|
+
export type { CatalogReplaceShellProps } from './CatalogReplaceShell';
|
|
10
|
+
export { PageMgmtShell } from './PageMgmtShell';
|
|
11
|
+
export type { PageMgmtShellProps } from './PageMgmtShell';
|
|
12
|
+
export { PageMgmtFooter, PageMgmtStateContext, usePageMgmtState } from './internals/PageMgmtFooter';
|
|
13
|
+
export type { PageMgmtState, PageMgmtFooterProps } from './internals/PageMgmtFooter';
|
|
14
|
+
export { MOCK_PAGES } from './internals/page-mgmt-mocks';
|
|
15
|
+
export type { PageEntry } from './internals/page-mgmt-mocks';
|
|
16
|
+
export { CatalogFooter, CatalogStateContext, useCatalogState } from './internals/CatalogFooter';
|
|
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';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PanelAction } from '../../coordinator/types';
|
|
2
|
+
export type CatalogFooterMode = 'add' | 'replace';
|
|
3
|
+
export interface CatalogState {
|
|
4
|
+
mode: CatalogFooterMode;
|
|
5
|
+
selectedTileId: string | null;
|
|
6
|
+
description: string | null;
|
|
7
|
+
}
|
|
8
|
+
export declare const CatalogStateContext: import('react').Context<CatalogState | null>;
|
|
9
|
+
export declare function useCatalogState(): CatalogState | null;
|
|
10
|
+
export interface CatalogFooterProps {
|
|
11
|
+
/**
|
|
12
|
+
* Override mode if needed (rare — usually the context's `mode` wins). PanelSlot
|
|
13
|
+
* passes mode explicitly for safety when no context Provider is mounted.
|
|
14
|
+
*/
|
|
15
|
+
mode?: CatalogFooterMode;
|
|
16
|
+
dispatch: (action: PanelAction) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function CatalogFooter({ mode, dispatch }: CatalogFooterProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface CatalogLensPickerProps {
|
|
2
|
+
lenses: readonly string[];
|
|
3
|
+
activeLens: string;
|
|
4
|
+
onLensChange: (lens: string) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function CatalogLensPicker({ lenses, activeLens, onLensChange }: CatalogLensPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CatalogTile } from './catalog-mocks';
|
|
2
|
+
export interface CatalogTileGridProps {
|
|
3
|
+
tiles: readonly CatalogTile[];
|
|
4
|
+
selectedTileId: string | null;
|
|
5
|
+
onSelectTile: (id: string, desc: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* §6.2.8 — stack-tile value renderer. Splits a "LABEL N · LABEL N · LABEL N"
|
|
9
|
+
* (or "N today · N MTD · …") value string into per-segment React nodes.
|
|
10
|
+
* Each segment becomes `<span><strong>{num}</strong><small>{lbl}</small></span>`
|
|
11
|
+
* with the numeric token first (W2-G6 enforces strong+small+split present).
|
|
12
|
+
*
|
|
13
|
+
* The regex captures the leading numeric/currency/percent token; the remainder
|
|
14
|
+
* is the label. If the segment has no number, the whole text falls into <small>.
|
|
15
|
+
*/
|
|
16
|
+
export declare function renderStackValue(val: string): import("react/jsx-runtime").JSX.Element[];
|
|
17
|
+
export declare function CatalogTileGrid({ tiles, selectedTileId, onSelectTile }: CatalogTileGridProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PageEntry } from './page-mgmt-mocks';
|
|
2
|
+
export interface PageMgmtState {
|
|
3
|
+
pages: PageEntry[];
|
|
4
|
+
setPages: (updater: (prev: PageEntry[]) => PageEntry[]) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const PageMgmtStateContext: import('react').Context<PageMgmtState | null>;
|
|
7
|
+
export declare function usePageMgmtState(): PageMgmtState | null;
|
|
8
|
+
export interface PageMgmtFooterProps {
|
|
9
|
+
/**
|
|
10
|
+
* Optional dispatch — unused by footer per §6.4.6 (live-commit; no CLOSE_PANEL).
|
|
11
|
+
* Kept on the prop signature so PanelSlot can pass it uniformly with other
|
|
12
|
+
* footers without TS errors.
|
|
13
|
+
*/
|
|
14
|
+
dispatch?: unknown;
|
|
15
|
+
}
|
|
16
|
+
export declare function PageMgmtFooter(_?: PageMgmtFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PageEntry } from './page-mgmt-mocks';
|
|
2
|
+
export interface PageMgmtRowProps {
|
|
3
|
+
page: PageEntry;
|
|
4
|
+
onRename?: (id: string) => void;
|
|
5
|
+
onKebab?: (id: string) => void;
|
|
6
|
+
onDragStart?: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function PageMgmtRow({ page, onRename, onKebab, onDragStart }: PageMgmtRowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catalog panel mock data — Phase 11.5 P4 W2.
|
|
3
|
+
*
|
|
4
|
+
* Module-level constants; no fetch, no PII. Spike-verbatim §6.2.5 lens list +
|
|
5
|
+
* §6.2.7 tile model. Tiles per lens are illustrative (≥4 each; ≥1 stack under
|
|
6
|
+
* 'Order flow' to exercise `.span-2` + renderStackValue per §6.2.8).
|
|
7
|
+
*
|
|
8
|
+
* Real BFF binding will replace this seam in a future plan (P-N).
|
|
9
|
+
*/
|
|
10
|
+
export interface CatalogTile {
|
|
11
|
+
id: string;
|
|
12
|
+
label: string;
|
|
13
|
+
value: string;
|
|
14
|
+
stack?: boolean;
|
|
15
|
+
desc: string;
|
|
16
|
+
variants?: string[];
|
|
17
|
+
}
|
|
18
|
+
export declare const MOCK_LENSES: readonly string[];
|
|
19
|
+
export declare const MOCK_DEFAULT_LENS = "Order flow";
|
|
20
|
+
export declare const MOCK_TILES_BY_LENS: Readonly<Record<string, readonly CatalogTile[]>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Page Mgmt mock data — Phase 11.5 P4 W4.
|
|
3
|
+
*
|
|
4
|
+
* Spike §6.4.3 verbatim: 4 entries with My Pipeline as the active page.
|
|
5
|
+
* Real BFF binding will replace this seam in a future plan (P-N).
|
|
6
|
+
*/
|
|
7
|
+
export interface PageEntry {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
active: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare const MOCK_PAGES: readonly PageEntry[];
|