@mt-gloss/ui 0.1.103 → 0.1.105

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.
@@ -1,79 +1,155 @@
1
- import { u as I, f as q, a as Z, g as N, c as w } from "./COMMITS-Dm8qIHaq.js";
2
- import { C as Ve, b as qe, P as Be, e as He, i as Ue, r as Ye, d as Ke } from "./COMMITS-Dm8qIHaq.js";
3
- import { jsx as s, jsxs as h, Fragment as ee } from "react/jsx-runtime";
4
- import { useState as y, useRef as B, createContext as H, useContext as U, useEffect as F, useLayoutEffect as te, useCallback as Y } from "react";
5
- function ne({ children: e }) {
1
+ import { u as $, f as q, S as se, a as oe, g as E, c as A } from "./COMMITS-kaUvc5jL.js";
2
+ import { C as Xe, b as Je, P as Ze, e as et, i as tt, r as nt, d as st } from "./COMMITS-kaUvc5jL.js";
3
+ import { jsx as s, jsxs as p, Fragment as ae } from "react/jsx-runtime";
4
+ import z, { useState as b, useRef as U, createContext as Y, useContext as K, useEffect as V, useLayoutEffect as re, useCallback as W } from "react";
5
+ function le({ children: e }) {
6
6
  return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
7
7
  }
8
- function oe({ span: e, rotating: t = !0, children: o }) {
8
+ function ie({ span: e, rotating: t = !0, children: o }) {
9
9
  const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" ");
10
10
  return /* @__PURE__ */ s("div", { className: n, children: o });
11
11
  }
12
- const se = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
13
- function Le({
12
+ function ce({ value: e, onChange: t }) {
13
+ return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
14
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
15
+ /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
16
+ /* @__PURE__ */ s(
17
+ "input",
18
+ {
19
+ id: "settings-threshold-input",
20
+ type: "range",
21
+ min: 0,
22
+ max: 100,
23
+ value: e,
24
+ onChange: t,
25
+ "aria-label": "Threshold",
26
+ "aria-valuenow": e,
27
+ "aria-valuemin": 0,
28
+ "aria-valuemax": 100,
29
+ className: "settings-shell__slider"
30
+ }
31
+ ),
32
+ /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
33
+ e,
34
+ "%"
35
+ ] })
36
+ ] })
37
+ ] });
38
+ }
39
+ function de({ value: e, onChange: t }) {
40
+ return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
41
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
42
+ /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
43
+ /* @__PURE__ */ s(
44
+ "input",
45
+ {
46
+ id: "settings-timeframe-input",
47
+ type: "range",
48
+ min: 7,
49
+ max: 90,
50
+ value: e,
51
+ onChange: t,
52
+ "aria-label": "Timeframe",
53
+ "aria-valuenow": e,
54
+ "aria-valuemin": 7,
55
+ "aria-valuemax": 90,
56
+ className: "settings-shell__slider"
57
+ }
58
+ ),
59
+ /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
60
+ e,
61
+ " days"
62
+ ] })
63
+ ] })
64
+ ] });
65
+ }
66
+ const ue = ["Orders", "Quota", "Unassigned"];
67
+ function pe() {
68
+ return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots (display only)", children: [
69
+ /* @__PURE__ */ s("p", { className: "settings-shell__help", children: "Slots are currently fixed. Drag-to-reorder is coming in a later phase." }),
70
+ /* @__PURE__ */ s("ul", { className: "settings-shell__slots-list", children: ue.map((e) => /* @__PURE__ */ s("li", { className: "settings-shell__slot-pill", children: e }, e)) })
71
+ ] });
72
+ }
73
+ const me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
74
+ function he({ value: e, onSelect: t }) {
75
+ return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
76
+ /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent color" }),
77
+ /* @__PURE__ */ s("div", { className: "settings-shell__swatch-row", children: me.map((o) => {
78
+ const n = e === o;
79
+ return /* @__PURE__ */ s(
80
+ "button",
81
+ {
82
+ type: "button",
83
+ "aria-pressed": n,
84
+ "aria-label": `Accent ${o}`,
85
+ className: `settings-shell__swatch${n ? " settings-shell__swatch--active" : ""}`,
86
+ style: { backgroundColor: o },
87
+ onClick: () => t(o)
88
+ },
89
+ o
90
+ );
91
+ }) })
92
+ ] });
93
+ }
94
+ const fe = ["threshold", "timeframe", "color"];
95
+ function Be({
14
96
  isOpen: e,
15
97
  cardSpan: t,
16
98
  cardLabel: o = "Metric",
17
- cardValue: n = "—"
99
+ cardValue: n = "—",
100
+ dimensions: r = fe,
101
+ initialTab: l
18
102
  }) {
19
- const a = I(), r = a?.state.activeTrigger, d = r?.kind === "card-overflow" ? r.cardId : null, l = q(), i = r?.span, c = t ?? i ?? 1, u = d != null ? a?.state?.bufferByCard?.[d]?.changes ?? {} : {}, m = typeof u.threshold == "number" ? u.threshold : 50, f = typeof u.accent == "string" ? u.accent : null, v = (g) => {
20
- d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "threshold", value: Number(g.target.value) });
21
- }, b = (g) => {
22
- d == null || a == null || a.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "accent", value: g });
103
+ const d = $(), i = d?.state.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null, c = q(), u = i?.span, h = t ?? u ?? 1, g = r[0] ?? "threshold", [f, y] = z.useState(l ?? g);
104
+ z.useEffect(() => {
105
+ r.includes(f) || y(g);
106
+ }, [r, f, g]);
107
+ const v = a != null ? d?.state?.bufferByCard?.[a]?.changes ?? {} : {}, N = typeof v.threshold == "number" ? v.threshold : 80, S = typeof v.timeframe == "number" ? v.timeframe : 30, w = typeof v.accent == "string" ? v.accent : null, C = (_) => {
108
+ a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "threshold", value: Number(_.target.value) });
109
+ }, te = (_) => {
110
+ a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "timeframe", value: Number(_.target.value) });
111
+ }, ne = (_) => {
112
+ a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "accent", value: _ });
23
113
  };
24
- return /* @__PURE__ */ h("div", { "data-shell": "settings", "aria-hidden": !e, children: [
25
- /* @__PURE__ */ s(ne, { children: /* @__PURE__ */ h(oe, { span: c, rotating: !l, children: [
114
+ return /* @__PURE__ */ p("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
115
+ /* @__PURE__ */ s("div", { "aria-hidden": "true", children: /* @__PURE__ */ s(le, { children: /* @__PURE__ */ p(ie, { span: h, rotating: !c, children: [
26
116
  /* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: o }),
27
117
  /* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
28
- ] }) }),
29
- /* @__PURE__ */ h("div", { className: "settings-shell__controls", children: [
30
- /* @__PURE__ */ s("h3", { className: "settings-shell__heading", children: "Settings" }),
31
- /* @__PURE__ */ h("label", { className: "settings-shell__field", children: [
32
- /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Threshold" }),
33
- /* @__PURE__ */ s(
34
- "input",
35
- {
36
- type: "range",
37
- min: 0,
38
- max: 100,
39
- step: 1,
40
- value: m,
41
- onChange: v,
42
- className: "settings-shell__slider",
43
- "aria-label": "Threshold",
44
- "data-testid": "settings-threshold-slider"
45
- }
46
- ),
47
- /* @__PURE__ */ s("span", { className: "settings-shell__value", "aria-live": "polite", children: m })
48
- ] }),
49
- /* @__PURE__ */ h("div", { className: "settings-shell__field", children: [
50
- /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent" }),
51
- /* @__PURE__ */ s("div", { className: "settings-shell__swatches", role: "radiogroup", "aria-label": "Accent color", children: se.map((g) => /* @__PURE__ */ s(
52
- "button",
53
- {
54
- type: "button",
55
- role: "radio",
56
- "aria-pressed": f === g,
57
- "aria-checked": f === g,
58
- "aria-label": `Accent ${g}`,
59
- className: "settings-shell__swatch",
60
- style: { backgroundColor: g },
61
- onClick: () => b(g),
62
- "data-testid": `settings-swatch-${g}`
63
- },
64
- g
65
- )) })
66
- ] })
67
- ] })
118
+ ] }) }) }),
119
+ /* @__PURE__ */ s(
120
+ se,
121
+ {
122
+ dimensions: r,
123
+ activeTab: f,
124
+ onSelect: y,
125
+ reduced: c
126
+ }
127
+ ),
128
+ /* @__PURE__ */ p(
129
+ "div",
130
+ {
131
+ role: "tabpanel",
132
+ id: `settings-tabpanel-${f}`,
133
+ "aria-label": "Settings dimension controls",
134
+ tabIndex: 0,
135
+ className: "settings-shell__tabpanel",
136
+ children: [
137
+ f === "threshold" && /* @__PURE__ */ s(ce, { value: N, onChange: C }),
138
+ f === "timeframe" && /* @__PURE__ */ s(de, { value: S, onChange: te }),
139
+ f === "slots" && /* @__PURE__ */ s(pe, {}),
140
+ f === "color" && /* @__PURE__ */ s(he, { value: w, onSelect: ne })
141
+ ]
142
+ }
143
+ )
68
144
  ] });
69
145
  }
70
- function K({ lenses: e, activeLens: t, onLensChange: o }) {
71
- const [n, a] = y(!1), r = B(null), d = () => {
72
- r.current != null && (window.clearTimeout(r.current), r.current = null);
73
- }, l = () => {
74
- d(), r.current = window.setTimeout(() => a(!1), 100);
75
- }, i = e.filter((c) => c !== t);
76
- return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
146
+ function j({ lenses: e, activeLens: t, onLensChange: o }) {
147
+ const [n, r] = b(!1), l = U(null), d = () => {
148
+ l.current != null && (window.clearTimeout(l.current), l.current = null);
149
+ }, i = () => {
150
+ d(), l.current = window.setTimeout(() => r(!1), 100);
151
+ }, a = e.filter((c) => c !== t);
152
+ return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ p("div", { className: "cat-segmented", children: [
77
153
  /* @__PURE__ */ s(
78
154
  "button",
79
155
  {
@@ -84,14 +160,14 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
84
160
  children: t
85
161
  }
86
162
  ),
87
- /* @__PURE__ */ h(
163
+ /* @__PURE__ */ p(
88
164
  "div",
89
165
  {
90
166
  className: "cat-seg-more",
91
167
  onMouseEnter: () => {
92
- d(), a(!0);
168
+ d(), r(!0);
93
169
  },
94
- onMouseLeave: l,
170
+ onMouseLeave: i,
95
171
  children: [
96
172
  /* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
97
173
  n && /* @__PURE__ */ s(
@@ -100,15 +176,15 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
100
176
  className: "cat-seg-overflow",
101
177
  role: "menu",
102
178
  onMouseEnter: d,
103
- onMouseLeave: l,
104
- children: i.map((c) => /* @__PURE__ */ s(
179
+ onMouseLeave: i,
180
+ children: a.map((c) => /* @__PURE__ */ s(
105
181
  "button",
106
182
  {
107
183
  type: "button",
108
184
  "data-lens": c,
109
185
  role: "menuitem",
110
186
  onClick: () => {
111
- o(c), a(!1);
187
+ o(c), r(!1);
112
188
  },
113
189
  children: c
114
190
  },
@@ -121,48 +197,48 @@ function K({ lenses: e, activeLens: t, onLensChange: o }) {
121
197
  )
122
198
  ] }) });
123
199
  }
124
- function ae(e) {
200
+ function ge(e) {
125
201
  return e.split("·").map((t, o) => {
126
- const n = t.trim(), a = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), r = a ? a[1] : "", d = a ? a[2] : n;
127
- return /* @__PURE__ */ h("span", { children: [
128
- /* @__PURE__ */ s("strong", { children: r }),
202
+ const n = t.trim(), r = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), l = r ? r[1] : "", d = r ? r[2] : n;
203
+ return /* @__PURE__ */ p("span", { children: [
204
+ /* @__PURE__ */ s("strong", { children: l }),
129
205
  /* @__PURE__ */ s("small", { children: d })
130
206
  ] }, o);
131
207
  });
132
208
  }
133
- function j({ tiles: e, selectedTileId: t, onSelectTile: o }) {
209
+ function G({ tiles: e, selectedTileId: t, onSelectTile: o }) {
134
210
  return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
135
- const a = n.id === t, r = n.stack === !0, d = ["cat-tile"];
136
- return r && d.push("span-2"), a && d.push("selected"), /* @__PURE__ */ h(
211
+ const r = n.id === t, l = n.stack === !0, d = ["cat-tile"];
212
+ return l && d.push("span-2"), r && d.push("selected"), /* @__PURE__ */ p(
137
213
  "button",
138
214
  {
139
215
  type: "button",
140
216
  className: d.join(" "),
141
217
  "data-metric": n.id,
142
218
  "data-desc": n.desc,
143
- "aria-pressed": a,
219
+ "aria-pressed": r,
144
220
  onClick: () => o(n.id, n.desc),
145
221
  children: [
146
222
  /* @__PURE__ */ s("span", { className: "cat-tile-label", children: n.label }),
147
- /* @__PURE__ */ s("span", { className: "cat-tile-value", children: r ? ae(n.value) : n.value }),
148
- n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((l) => /* @__PURE__ */ s("span", { children: l }, l)) })
223
+ /* @__PURE__ */ s("span", { className: "cat-tile-value", children: l ? ge(n.value) : n.value }),
224
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((i) => /* @__PURE__ */ s("span", { children: i }, i)) })
149
225
  ]
150
226
  },
151
227
  n.id
152
228
  );
153
229
  }) });
154
230
  }
155
- const k = H(null);
156
- function re() {
157
- return U(k);
231
+ const R = Y(null);
232
+ function ve() {
233
+ return K(R);
158
234
  }
159
- function le({ mode: e, dispatch: t }) {
160
- const o = re();
235
+ function be({ mode: e, dispatch: t }) {
236
+ const o = ve();
161
237
  if (o == null && e == null) return null;
162
- const n = o?.mode ?? e ?? "add", a = o?.selectedTileId ?? null, r = o?.description ?? null, d = a == null;
163
- return /* @__PURE__ */ h("div", { className: "panel-footer catalog", children: [
164
- /* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: r ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
165
- /* @__PURE__ */ h("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
238
+ const n = o?.mode ?? e ?? "add", r = o?.selectedTileId ?? null, l = o?.description ?? null, d = r == null;
239
+ return /* @__PURE__ */ p("div", { className: "panel-footer catalog", children: [
240
+ /* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: l ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
241
+ /* @__PURE__ */ p("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
166
242
  /* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
167
243
  /* @__PURE__ */ s(
168
244
  "button",
@@ -199,14 +275,14 @@ function le({ mode: e, dispatch: t }) {
199
275
  ] })
200
276
  ] });
201
277
  }
202
- const W = [
278
+ const Q = [
203
279
  "Revenue",
204
280
  "Order flow",
205
281
  "Rep performance",
206
282
  "Brand portfolio",
207
283
  "Account coverage",
208
284
  "Commission"
209
- ], G = "Order flow", Q = {
285
+ ], X = "Order flow", J = {
210
286
  Revenue: [
211
287
  { id: "rev-mtd", label: "Revenue MTD", value: "$184K", desc: "Month-to-date revenue across all manufacturers and territories." },
212
288
  { id: "rev-ytd", label: "Revenue YTD", value: "$2.1M", desc: "Year-to-date revenue including pending and posted orders.", variants: ["1×1", "1×3"] },
@@ -252,96 +328,96 @@ const W = [
252
328
  { id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
253
329
  ]
254
330
  };
255
- function Te({
331
+ function He({
256
332
  isOpen: e,
257
- lenses: t = W,
258
- defaultLens: o = G,
259
- tilesByLens: n = Q,
260
- footerSlot: a
333
+ lenses: t = Q,
334
+ defaultLens: o = X,
335
+ tilesByLens: n = J,
336
+ footerSlot: r
261
337
  }) {
262
- const [r, d] = y(o), [l, i] = y(null), [c, u] = y(null), m = n[r] ?? [];
263
- return /* @__PURE__ */ h(
264
- k.Provider,
338
+ const [l, d] = b(o), [i, a] = b(null), [c, u] = b(null), h = n[l] ?? [];
339
+ return /* @__PURE__ */ p(
340
+ R.Provider,
265
341
  {
266
- value: { mode: "add", selectedTileId: l, description: c },
342
+ value: { mode: "add", selectedTileId: i, description: c },
267
343
  children: [
268
- /* @__PURE__ */ h("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
344
+ /* @__PURE__ */ p("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
269
345
  /* @__PURE__ */ s("h3", { children: "Add a metric" }),
270
346
  /* @__PURE__ */ s(
271
- K,
347
+ j,
272
348
  {
273
349
  lenses: t,
274
- activeLens: r,
275
- onLensChange: (f) => {
276
- d(f), i(null), u(null);
350
+ activeLens: l,
351
+ onLensChange: (g) => {
352
+ d(g), a(null), u(null);
277
353
  }
278
354
  }
279
355
  ),
280
356
  /* @__PURE__ */ s(
281
- j,
357
+ G,
282
358
  {
283
- tiles: m,
284
- selectedTileId: l,
285
- onSelectTile: (f, v) => {
286
- i(f), u(v);
359
+ tiles: h,
360
+ selectedTileId: i,
361
+ onSelectTile: (g, f) => {
362
+ a(g), u(f);
287
363
  }
288
364
  }
289
365
  )
290
366
  ] }),
291
- a
367
+ r
292
368
  ]
293
369
  }
294
370
  );
295
371
  }
296
- function Ie({
372
+ function qe({
297
373
  isOpen: e,
298
374
  replacingLabel: t,
299
- lenses: o = W,
300
- defaultLens: n = G,
301
- tilesByLens: a = Q,
302
- footerSlot: r
375
+ lenses: o = Q,
376
+ defaultLens: n = X,
377
+ tilesByLens: r = J,
378
+ footerSlot: l
303
379
  }) {
304
- const [d, l] = y(n), [i, c] = y(null), [u, m] = y(null), f = a[d] ?? [];
305
- return /* @__PURE__ */ h(
306
- k.Provider,
380
+ const [d, i] = b(n), [a, c] = b(null), [u, h] = b(null), g = r[d] ?? [];
381
+ return /* @__PURE__ */ p(
382
+ R.Provider,
307
383
  {
308
- value: { mode: "replace", selectedTileId: i, description: u },
384
+ value: { mode: "replace", selectedTileId: a, description: u },
309
385
  children: [
310
- /* @__PURE__ */ h("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
386
+ /* @__PURE__ */ p("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
311
387
  /* @__PURE__ */ s("h3", { children: "Replace metric" }),
312
- t && /* @__PURE__ */ h("p", { className: "cat-subtitle", children: [
388
+ t && /* @__PURE__ */ p("p", { className: "cat-subtitle", children: [
313
389
  "replacing ",
314
390
  t
315
391
  ] }),
316
392
  /* @__PURE__ */ s(
317
- K,
393
+ j,
318
394
  {
319
395
  lenses: o,
320
396
  activeLens: d,
321
- onLensChange: (v) => {
322
- l(v), c(null), m(null);
397
+ onLensChange: (f) => {
398
+ i(f), c(null), h(null);
323
399
  }
324
400
  }
325
401
  ),
326
402
  /* @__PURE__ */ s(
327
- j,
403
+ G,
328
404
  {
329
- tiles: f,
330
- selectedTileId: i,
331
- onSelectTile: (v, b) => {
332
- c(v), m(b);
405
+ tiles: g,
406
+ selectedTileId: a,
407
+ onSelectTile: (f, y) => {
408
+ c(f), h(y);
333
409
  }
334
410
  }
335
411
  )
336
412
  ] }),
337
- r
413
+ l
338
414
  ]
339
415
  }
340
416
  );
341
417
  }
342
- function ie({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
343
- const a = ["pm-row"];
344
- return e.active && a.push("active"), /* @__PURE__ */ h("div", { className: a.join(" "), "data-page-id": e.id, role: "listitem", children: [
418
+ function ye({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
419
+ const r = ["pm-row"];
420
+ return e.active && r.push("active"), /* @__PURE__ */ p("div", { className: r.join(" "), "data-page-id": e.id, role: "listitem", children: [
345
421
  /* @__PURE__ */ s(
346
422
  "div",
347
423
  {
@@ -364,13 +440,13 @@ function ie({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
364
440
  )
365
441
  ] });
366
442
  }
367
- const X = H(null);
368
- function ce() {
369
- return U(X);
443
+ const Z = Y(null);
444
+ function Ce() {
445
+ return K(Z);
370
446
  }
371
- function de(e = {}) {
372
- const o = ce()?.setPages;
373
- return /* @__PURE__ */ h(
447
+ function Pe(e = {}) {
448
+ const o = Ce()?.setPages;
449
+ return /* @__PURE__ */ p(
374
450
  "div",
375
451
  {
376
452
  className: "panel-footer pm",
@@ -396,38 +472,38 @@ function de(e = {}) {
396
472
  }
397
473
  );
398
474
  }
399
- const ue = [
475
+ const _e = [
400
476
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
401
477
  { id: "p-numbers", name: "My Numbers", active: !1 },
402
478
  { id: "p-morning", name: "My Morning", active: !1 },
403
479
  { id: "p-accounts", name: "My Accounts", active: !1 }
404
480
  ];
405
- function ke({
481
+ function Ue({
406
482
  isOpen: e,
407
- pages: t = ue,
483
+ pages: t = _e,
408
484
  footerSlot: o
409
485
  }) {
410
- const [n, a] = y(() => [...t]);
411
- return /* @__PURE__ */ h(X.Provider, { value: { pages: n, setPages: a }, children: [
412
- /* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
486
+ const [n, r] = b(() => [...t]);
487
+ return /* @__PURE__ */ p(Z.Provider, { value: { pages: n, setPages: r }, children: [
488
+ /* @__PURE__ */ p("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
413
489
  /* @__PURE__ */ s("h3", { children: "Manage pages" }),
414
- /* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((r) => /* @__PURE__ */ s(ie, { page: r }, r.id)) })
490
+ /* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((l) => /* @__PURE__ */ s(ye, { page: l }, l.id)) })
415
491
  ] }),
416
492
  o
417
493
  ] });
418
494
  }
419
- const Me = {
495
+ const Ye = {
420
496
  SETTINGS: "settings",
421
497
  CATALOG_ADD: "catalog-add",
422
498
  CATALOG_REPLACE: "catalog-replace",
423
499
  PAGE_MGMT: "page-management",
424
500
  NOTIFICATION_CENTER: "notification-center"
425
- }, pe = {
501
+ }, Ne = {
426
502
  position: "fixed",
427
503
  inset: 0,
428
504
  pointerEvents: "none",
429
505
  zIndex: 55
430
- }, me = {
506
+ }, Se = {
431
507
  position: "absolute",
432
508
  inset: 0,
433
509
  zIndex: 1,
@@ -436,66 +512,81 @@ const Me = {
436
512
  pointerEvents: "none",
437
513
  background: "rgba(0, 0, 0, 0.04)"
438
514
  };
439
- function $e() {
440
- const { state: e, dispatch: t, getCloseLog: o } = Z();
441
- F(() => {
515
+ function Ke() {
516
+ const { state: e, dispatch: t, getCloseLog: o } = oe();
517
+ V(() => {
442
518
  if (e.activePanelId == null) return;
443
- function r(d) {
519
+ function l(d) {
444
520
  d.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
445
521
  }
446
- return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
522
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
447
523
  }, [e.activePanelId, t]);
448
- const n = B(e);
449
- te(() => {
524
+ const n = U(e);
525
+ re(() => {
450
526
  n.current = e;
451
- }), F(() => {
527
+ }), V(() => {
452
528
  if (process.env.NODE_ENV === "production") return;
453
- const r = window;
454
- return r.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), r.__panelsHostHandle = {
529
+ const l = window;
530
+ return l.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), l.__panelsHostHandle = {
455
531
  dispatch: t,
456
532
  getState: () => n.current,
457
533
  getCloseLog: o
458
534
  }, () => {
459
- r.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
535
+ l.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
460
536
  };
461
537
  }, [t, o]);
462
- const a = Y(() => {
538
+ const r = W(() => {
463
539
  t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
464
540
  }, [t]);
465
- return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: pe, children: e.activePanelId != null && /* @__PURE__ */ s(
541
+ return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: Ne, children: e.activePanelId != null && /* @__PURE__ */ s(
466
542
  "div",
467
543
  {
468
544
  "data-panel-scrim": "true",
469
- style: me,
470
- onClick: a
545
+ style: Se,
546
+ onClick: r
471
547
  }
472
548
  ) });
473
549
  }
474
- function De({ panelComponents: e }) {
475
- const t = I();
476
- if (t == null) return null;
477
- const { state: o, dispatch: n } = t;
478
- if (o.activePanelId == null) return null;
479
- const a = e[o.activePanelId];
480
- if (a == null)
550
+ function We({ panelComponents: e, children: t }) {
551
+ const o = $();
552
+ if (o == null) return null;
553
+ const { state: n, dispatch: r } = o;
554
+ if (n.activePanelId == null) return null;
555
+ const l = e?.[n.activePanelId];
556
+ if (l == null && t == null)
481
557
  return process.env.NODE_ENV !== "production" && console.error(
482
558
  "[panels] No panel component registered for activePanelId:",
483
- o.activePanelId
559
+ n.activePanelId
484
560
  ), null;
485
- if (o.activePanelId === "settings")
486
- return /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
487
- w,
561
+ if (n.activePanelId === "settings") {
562
+ const d = n.isDirty, i = n.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null;
563
+ return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
564
+ A,
488
565
  {
489
566
  isOpen: !0,
490
- onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
491
- footer: /* @__PURE__ */ h(ee, { children: [
567
+ onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
568
+ footer: /* @__PURE__ */ p(ae, { children: [
569
+ /* @__PURE__ */ s(
570
+ "button",
571
+ {
572
+ id: "btn-reset",
573
+ type: "button",
574
+ className: "gloss-panel-chrome__footer-btn",
575
+ disabled: !d,
576
+ onClick: () => {
577
+ a != null && r({ type: "CLEAR_BUFFER", cardId: a });
578
+ },
579
+ children: "Reset"
580
+ }
581
+ ),
582
+ /* @__PURE__ */ s("span", { style: { flex: 1 } }),
492
583
  /* @__PURE__ */ s(
493
584
  "button",
494
585
  {
495
586
  id: "settings-cancel",
496
587
  type: "button",
497
588
  className: "gloss-panel-chrome__footer-btn",
498
- onClick: () => n({ type: "CLOSE_PANEL", reason: "cancel-button" }),
589
+ onClick: () => r({ type: "CLOSE_PANEL", reason: "cancel-button" }),
499
590
  children: "Cancel"
500
591
  }
501
592
  ),
@@ -505,235 +596,238 @@ function De({ panelComponents: e }) {
505
596
  id: "settings-apply",
506
597
  type: "button",
507
598
  className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
508
- onClick: () => n({ type: "CLOSE_PANEL", reason: "apply-button" }),
599
+ disabled: !d,
600
+ onClick: () => r({ type: "CLOSE_PANEL", reason: "apply-button" }),
509
601
  children: "Apply"
510
602
  }
511
603
  )
512
604
  ] }),
513
- children: /* @__PURE__ */ s(a, { isOpen: !0 })
605
+ children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
514
606
  }
515
607
  ) });
516
- if (o.activePanelId === "catalog-add" || o.activePanelId === "catalog-replace") {
517
- const r = o.activePanelId === "catalog-replace" ? "replace" : "add";
518
- return /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
519
- w,
608
+ }
609
+ if (n.activePanelId === "catalog-add" || n.activePanelId === "catalog-replace") {
610
+ if (l == null) return null;
611
+ const d = n.activePanelId === "catalog-replace" ? "replace" : "add";
612
+ return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
613
+ A,
520
614
  {
521
615
  isOpen: !0,
522
- onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
616
+ onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
523
617
  footer: null,
524
618
  children: /* @__PURE__ */ s(
525
- a,
619
+ l,
526
620
  {
527
621
  isOpen: !0,
528
- footerSlot: /* @__PURE__ */ s(le, { mode: r, dispatch: n })
622
+ footerSlot: /* @__PURE__ */ s(be, { mode: d, dispatch: r })
529
623
  }
530
624
  )
531
625
  }
532
626
  ) });
533
627
  }
534
- return o.activePanelId === "page-management" ? /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
535
- w,
628
+ return n.activePanelId === "page-management" ? l == null ? null : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
629
+ A,
536
630
  {
537
631
  isOpen: !0,
538
- onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
632
+ onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
539
633
  footer: null,
540
- children: /* @__PURE__ */ s(a, { isOpen: !0, footerSlot: /* @__PURE__ */ s(de, {}) })
634
+ children: /* @__PURE__ */ s(l, { isOpen: !0, footerSlot: /* @__PURE__ */ s(Pe, {}) })
541
635
  }
542
- ) }) : /* @__PURE__ */ s(N, { isOpen: !0, children: /* @__PURE__ */ s(
543
- w,
636
+ ) }) : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
637
+ A,
544
638
  {
545
639
  isOpen: !0,
546
- onClose: () => n({ type: "CLOSE_PANEL", reason: "header-x" }),
640
+ onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
547
641
  footer: null,
548
- children: /* @__PURE__ */ s(a, { isOpen: !0 })
642
+ children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
549
643
  }
550
644
  ) });
551
645
  }
552
- function z(e) {
646
+ function B(e) {
553
647
  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;
554
648
  }
555
- const he = 685, V = 627, fe = "cubic-bezier(0.22, 1, 0.36, 1)", ve = 200;
556
- function J(e, t) {
649
+ const we = 685, H = 627, Ee = "cubic-bezier(0.22, 1, 0.36, 1)", Ae = 200;
650
+ function ee(e, t) {
557
651
  if (typeof window > "u") return t;
558
652
  const o = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
559
653
  if (!o) return t;
560
654
  const n = parseFloat(o);
561
655
  return Number.isNaN(n) ? t : o.endsWith("s") && !o.endsWith("ms") ? n * 1e3 : n;
562
656
  }
563
- function ge(e, t) {
657
+ function xe(e, t) {
564
658
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
565
659
  }
566
- function S(e) {
660
+ function x(e) {
567
661
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
568
662
  }
569
- function ye(e) {
570
- const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert: a } = e;
663
+ function Te(e) {
664
+ const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert: r } = e;
571
665
  if (t == null || o == null) {
572
- S(e), a?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
666
+ x(e), r?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
573
667
  return;
574
668
  }
575
669
  if (n) {
576
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), a?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
670
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
577
671
  return;
578
672
  }
579
673
  if (typeof o.animate != "function") {
580
- S(e), a?.({ branch: "slide-no-waapi", timestamp: Date.now() });
674
+ x(e), r?.({ branch: "slide-no-waapi", timestamp: Date.now() });
581
675
  return;
582
676
  }
583
- const r = o.cloneNode(!0);
584
- 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), o.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
585
- const d = J("--panel-open-dur", he), l = ge("--panel-easing", fe), i = o.animate(
677
+ const l = o.cloneNode(!0);
678
+ l.id = "panel-chrome-frozen", l.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(l), o.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
679
+ const d = ee("--panel-open-dur", we), i = xe("--panel-easing", Ee), a = o.animate(
586
680
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
587
- { duration: d, easing: l, fill: "forwards" }
681
+ { duration: d, easing: i, fill: "forwards" }
588
682
  );
589
- i.addEventListener(
683
+ a.addEventListener(
590
684
  "finish",
591
685
  () => {
592
- r.remove(), o.style.zIndex = "", i.cancel(), a?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
686
+ l.remove(), o.style.zIndex = "", a.cancel(), r?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
593
687
  },
594
688
  { once: !0 }
595
689
  );
596
690
  }
597
- function be(e) {
691
+ function Le(e) {
598
692
  const { mountEl: t, onAssert: o } = e;
599
693
  if (t == null) {
600
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => S(e), V), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
694
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => x(e), H), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
601
695
  return;
602
696
  }
603
- const n = J("--panel-close-dur", V);
604
- let a = !1, r = null;
605
- const d = (i) => {
606
- i.target !== t || i.propertyName !== "max-height" || a || (a = !0, r != null && clearTimeout(r), t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-complete", timestamp: Date.now() }));
607
- }, l = () => {
608
- a || (a = !0, t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-forced", timestamp: Date.now() }));
697
+ const n = ee("--panel-close-dur", H);
698
+ let r = !1, l = null;
699
+ const d = (a) => {
700
+ a.target !== t || a.propertyName !== "max-height" || r || (r = !0, l != null && clearTimeout(l), t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-complete", timestamp: Date.now() }));
701
+ }, i = () => {
702
+ r || (r = !0, t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-forced", timestamp: Date.now() }));
609
703
  };
610
- t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), r = setTimeout(l, n + ve);
704
+ t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), l = setTimeout(i, n + Ae);
611
705
  }
612
- function Pe(e) {
706
+ function Oe(e) {
613
707
  const { state: t, onAssert: o } = e;
614
708
  if (t.activePanelId && t.isDirty) {
615
709
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "blocked-dirty", timestamp: Date.now() });
616
710
  return;
617
711
  }
618
- const n = z(t.activeTrigger), a = z(e.trigger);
619
- if (!!t.activePanelId && n != null && n === a) {
620
- ye(e);
712
+ const n = B(t.activeTrigger), r = B(e.trigger);
713
+ if (!!t.activePanelId && n != null && n === r) {
714
+ Te(e);
621
715
  return;
622
716
  }
623
717
  if (t.activePanelId) {
624
- be(e);
718
+ Le(e);
625
719
  return;
626
720
  }
627
- S(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
721
+ x(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
628
722
  }
629
- function Ce() {
723
+ function Ie() {
630
724
  if (!(typeof window > "u"))
631
725
  return window.__panelsAsserter;
632
726
  }
633
- function Re() {
634
- const e = I(), t = q();
635
- return Y(
727
+ function je() {
728
+ const e = $(), t = q();
729
+ return W(
636
730
  (o, n) => {
637
731
  if (!e)
638
732
  return;
639
- const a = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, r = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, d = {
733
+ const r = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, l = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, d = {
640
734
  panelId: o,
641
735
  trigger: n,
642
736
  state: e.state,
643
737
  dispatch: e.dispatch,
644
- mountEl: a,
645
- chromeEl: r,
738
+ mountEl: r,
739
+ chromeEl: l,
646
740
  reducedMotion: t,
647
- onAssert: (l) => {
648
- Ce()?.recordTransition?.(l);
741
+ onAssert: (i) => {
742
+ Ie()?.recordTransition?.(i);
649
743
  }
650
744
  };
651
- Pe(d);
745
+ Oe(d);
652
746
  },
653
747
  [e, t]
654
748
  );
655
749
  }
656
- let E = !1, _ = null;
657
- function T() {
750
+ let T = !1, L = null;
751
+ function D() {
658
752
  const e = [];
659
753
  let t = "cleaned";
660
754
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
661
755
  const n = document.querySelectorAll(".gloss-panel-mount");
662
756
  n.length > 1 && e.push(`mount-count=${n.length}`);
663
- const a = n[0] ?? null, r = a ? a.querySelectorAll(".gloss-panel-chrome") : [];
664
- r.length > 1 && e.push(`chrome-count=${r.length}`);
665
- const d = r[0] ?? null;
757
+ const r = n[0] ?? null, l = r ? r.querySelectorAll(".gloss-panel-chrome") : [];
758
+ l.length > 1 && e.push(`chrome-count=${l.length}`);
759
+ const d = l[0] ?? null;
666
760
  if (d) {
667
761
  const u = d.style.zIndex;
668
762
  u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
669
763
  }
670
- const l = a ? "present" : "absent", i = d ? "present" : "absent";
764
+ const i = r ? "present" : "absent", a = d ? "present" : "absent";
671
765
  return {
672
766
  valid: e.length === 0,
673
- mount: l,
674
- chrome: i,
767
+ mount: i,
768
+ chrome: a,
675
769
  frozen: t,
676
770
  orphans: e,
677
771
  timestamp: Date.now()
678
772
  };
679
773
  }
680
- const A = "8px 8px 0px", x = "64px", O = "inset(0px 0px 60px 0px)", L = "inset(0px -40px -40px -40px)";
681
- function p(e, t, o, n, a) {
682
- return { id: e, constraint: t, expected: o, actual: n, pass: a };
774
+ const O = "8px 8px 0px", I = "64px", k = "inset(0px 0px 60px 0px)", M = "inset(0px -40px -40px -40px)";
775
+ function m(e, t, o, n, r) {
776
+ return { id: e, constraint: t, expected: o, actual: n, pass: r };
683
777
  }
684
778
  function P(e) {
685
779
  const t = parseInt(e, 10);
686
780
  return Number.isFinite(t) ? t : NaN;
687
781
  }
688
- function M() {
689
- const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), a = document.querySelector(".bell-cutout"), r = document.querySelector(".bell-popover"), d = document.querySelector(".gloss-bottom-toolbar");
782
+ function F() {
783
+ const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), r = document.querySelector(".bell-cutout"), l = document.querySelector(".bell-popover"), d = document.querySelector(".gloss-bottom-toolbar");
690
784
  if (!t)
691
- e.push(p("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
785
+ e.push(m("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
692
786
  else {
693
- const l = getComputedStyle(t), i = l.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = l.clipPath || t.style.clipPath || "", u = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = u ? parseInt(u[1], 10) : NaN, f = P(i), v = Number.isFinite(m) && Number.isFinite(f) && m === f;
787
+ const i = getComputedStyle(t), a = i.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = i.clipPath || t.style.clipPath || "", u = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), h = u ? parseInt(u[1], 10) : NaN, g = P(a), f = Number.isFinite(h) && Number.isFinite(g) && h === g;
694
788
  e.push(
695
- p(
789
+ m(
696
790
  "C1",
697
791
  "mount --reveal-y matches clip-path inset-bottom Npx",
698
- `inset(0 0 ${f}px 0) === --reveal-y(${f}px)`,
699
- `--reveal-y=${i || "n/a"} clip-path=${c || "n/a"}`,
700
- v
792
+ `inset(0 0 ${g}px 0) === --reveal-y(${g}px)`,
793
+ `--reveal-y=${a || "n/a"} clip-path=${c || "n/a"}`,
794
+ f
701
795
  )
702
796
  );
703
797
  }
704
798
  if (!t)
705
- e.push(p("C2", "mount padding constant", A, "absent", !1));
799
+ e.push(m("C2", "mount padding constant", O, "absent", !1));
706
800
  else {
707
- const l = t.style.padding, i = getComputedStyle(t), c = l || i.padding || "", u = c === A || c === "8px 8px 0px 8px";
708
- e.push(p("C2", "mount padding constant", A, c || "n/a", u));
801
+ const i = t.style.padding, a = getComputedStyle(t), c = i || a.padding || "", u = c === O || c === "8px 8px 0px 8px";
802
+ e.push(m("C2", "mount padding constant", O, c || "n/a", u));
709
803
  }
710
804
  if (!t)
711
- e.push(p("C3", "mount.bottom resolves to var(--tb-h)=64px", x, "absent", !1));
805
+ e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", I, "absent", !1));
712
806
  else {
713
- const i = getComputedStyle(t).bottom || t.style.bottom || "", c = i === x;
714
- e.push(p("C3", "mount.bottom resolves to var(--tb-h)=64px", x, i || "n/a", c));
807
+ const a = getComputedStyle(t).bottom || t.style.bottom || "", c = a === I;
808
+ e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", I, a || "n/a", c));
715
809
  }
716
810
  if (!o)
717
- e.push(p("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
811
+ e.push(m("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
718
812
  else {
719
- const l = getComputedStyle(o), i = P(
720
- l.getPropertyValue("--row-h").trim() || o.style.getPropertyValue("--row-h").trim() || "0"
813
+ const i = getComputedStyle(o), a = P(
814
+ i.getPropertyValue("--row-h").trim() || o.style.getPropertyValue("--row-h").trim() || "0"
721
815
  ), c = P(
722
- l.getPropertyValue("--row-gap").trim() || o.style.getPropertyValue("--row-gap").trim() || "0"
723
- ), u = i * 3 + c * 3 - 8, m = P(l.height || o.style.height || ""), f = Number.isFinite(i) && Number.isFinite(c) && Number.isFinite(m) && Number.isFinite(u) && m === u;
816
+ i.getPropertyValue("--row-gap").trim() || o.style.getPropertyValue("--row-gap").trim() || "0"
817
+ ), u = a * 3 + c * 3 - 8, h = P(i.height || o.style.height || ""), g = Number.isFinite(a) && Number.isFinite(c) && Number.isFinite(h) && Number.isFinite(u) && h === u;
724
818
  e.push(
725
- p(
819
+ m(
726
820
  "C4",
727
821
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
728
- `${u}px (rh=${i} rg=${c})`,
729
- `${m}px`,
730
- f
822
+ `${u}px (rh=${a} rg=${c})`,
823
+ `${h}px`,
824
+ g
731
825
  )
732
826
  );
733
827
  }
734
828
  if (!n || !o)
735
829
  e.push(
736
- p(
830
+ m(
737
831
  "C5",
738
832
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
739
833
  "present",
@@ -742,19 +836,19 @@ function M() {
742
836
  )
743
837
  );
744
838
  else {
745
- const l = getComputedStyle(n), i = getComputedStyle(o), c = l.perspective || n.style.perspective || "", u = (l.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), m = i.perspectiveStyle || o.style.perspectiveStyle || "", g = c !== "" && c !== "none" && (u === "center bottom" || u === "50% 100%") && m === "flat";
839
+ const i = getComputedStyle(n), a = getComputedStyle(o), c = i.perspective || n.style.perspective || "", u = (i.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), h = a.perspectiveStyle || o.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (u === "center bottom" || u === "50% 100%") && h === "flat";
746
840
  e.push(
747
- p(
841
+ m(
748
842
  "C5",
749
843
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
750
844
  "perspective:not-none, origin:center bottom, chrome-style:flat",
751
- `perspective=${c} origin=${u} chrome-style=${m}`,
752
- g
845
+ `perspective=${c} origin=${u} chrome-style=${h}`,
846
+ v
753
847
  )
754
848
  );
755
849
  }
756
850
  {
757
- let l = !1, i = "absent";
851
+ let i = !1, a = "absent";
758
852
  try {
759
853
  for (const c of Array.from(document.styleSheets)) {
760
854
  let u = [];
@@ -763,81 +857,81 @@ function M() {
763
857
  } catch {
764
858
  continue;
765
859
  }
766
- for (const m of u)
767
- if (m.name === "stage-spin") {
768
- const v = Array.from(m.cssRules), b = v.find((C) => C.keyText === "0%" || C.keyText === "from"), g = v.find((C) => C.keyText === "100%" || C.keyText === "to"), $ = b?.style.transform ?? "", D = g?.style.transform ?? "", R = /rotateY\(\s*0(?:deg)?\s*\)/;
769
- l = R.test($) && R.test(D), i = `0%=${$ || "n/a"} 100%=${D || "n/a"}`;
860
+ for (const h of u)
861
+ if (h.name === "stage-spin") {
862
+ const f = Array.from(h.cssRules), y = f.find((C) => C.keyText === "0%" || C.keyText === "from"), v = f.find((C) => C.keyText === "100%" || C.keyText === "to"), N = y?.style.transform ?? "", S = v?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
863
+ i = w.test(N) && w.test(S), a = `0%=${N || "n/a"} 100%=${S || "n/a"}`;
770
864
  break;
771
865
  }
772
- if (i !== "absent") break;
866
+ if (a !== "absent") break;
773
867
  }
774
868
  } catch {
775
- i = "inspection-error";
869
+ a = "inspection-error";
776
870
  }
777
871
  e.push(
778
- p(
872
+ m(
779
873
  "C6",
780
874
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
781
875
  "both frames rotateY(0)",
782
- i,
783
- l
876
+ a,
877
+ i
784
878
  )
785
879
  );
786
880
  }
787
881
  {
788
- const l = document.documentElement, i = getComputedStyle(l), c = i.getPropertyValue("--panel-open-dur").trim() || l.style.getPropertyValue("--panel-open-dur").trim(), u = i.getPropertyValue("--panel-close-dur").trim() || l.style.getPropertyValue("--panel-close-dur").trim(), m = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), f = P(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), v = Number.isFinite(m) && Number.isFinite(f) && m > f;
882
+ const i = document.documentElement, a = getComputedStyle(i), c = a.getPropertyValue("--panel-open-dur").trim() || i.style.getPropertyValue("--panel-open-dur").trim(), u = a.getPropertyValue("--panel-close-dur").trim() || i.style.getPropertyValue("--panel-close-dur").trim(), h = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), g = P(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), f = Number.isFinite(h) && Number.isFinite(g) && h > g;
789
883
  e.push(
790
- p("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${u || "n/a"}`, v)
884
+ m("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${u || "n/a"}`, f)
791
885
  );
792
886
  }
793
- if (!a)
794
- e.push(p("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
887
+ if (!r)
888
+ e.push(m("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
795
889
  else {
796
- const l = getComputedStyle(a), i = l.animationName || "", c = l.transitionProperty || "", u = (i === "" || i === "none") && (c === "" || c === "none" || c === "all");
890
+ const i = getComputedStyle(r), a = i.animationName || "", c = i.transitionProperty || "", u = (a === "" || a === "none") && (c === "" || c === "none" || c === "all");
797
891
  e.push(
798
- p(
892
+ m(
799
893
  "C8",
800
894
  "BellCutout zero computed animation/transition",
801
895
  "animation:none AND transition:none",
802
- `animation=${i || "n/a"} transition=${c || "n/a"}`,
896
+ `animation=${a || "n/a"} transition=${c || "n/a"}`,
803
897
  u
804
898
  )
805
899
  );
806
900
  }
807
901
  if (!t)
808
- e.push(p("C9", "mount closed-state clipPath", O, "absent", !1));
902
+ e.push(m("C9", "mount closed-state clipPath", k, "absent", !1));
809
903
  else {
810
- const l = t.style.clipPath, i = getComputedStyle(t), c = l || i.clipPath || "", u = c === O;
811
- e.push(p("C9", "mount closed-state clipPath", O, c || "n/a", u));
904
+ const i = t.style.clipPath, a = getComputedStyle(t), c = i || a.clipPath || "", u = c === k;
905
+ e.push(m("C9", "mount closed-state clipPath", k, c || "n/a", u));
812
906
  }
813
- if (!r)
814
- e.push(p("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
907
+ if (!l)
908
+ e.push(m("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
815
909
  else {
816
- const l = r.parentElement, i = l === document.body;
910
+ const i = l.parentElement, a = i === document.body;
817
911
  e.push(
818
- p(
912
+ m(
819
913
  "C10",
820
914
  "bell-popover parentElement === document.body (open)",
821
915
  "body",
822
- l === document.body ? "body" : l?.tagName ?? "n/a",
823
- i
916
+ i === document.body ? "body" : i?.tagName ?? "n/a",
917
+ a
824
918
  )
825
919
  );
826
920
  }
827
921
  if (!n)
828
- e.push(p("C11", "coordinator overflow === visible", "visible", "absent", !1));
922
+ e.push(m("C11", "coordinator overflow === visible", "visible", "absent", !1));
829
923
  else {
830
- const i = getComputedStyle(n).overflow || n.style.overflow || "", c = i === "visible";
831
- e.push(p("C11", "coordinator overflow === visible", "visible", i || "n/a", c));
924
+ const a = getComputedStyle(n).overflow || n.style.overflow || "", c = a === "visible";
925
+ e.push(m("C11", "coordinator overflow === visible", "visible", a || "n/a", c));
832
926
  }
833
927
  if (!d)
834
- e.push(p("C12", "toolbar clipPath = inset(0 -40 -40 -40)", L, "absent", !1));
928
+ e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", M, "absent", !1));
835
929
  else {
836
- const l = d.style.clipPath, i = getComputedStyle(d), c = l || i.clipPath || "", u = c === L;
837
- e.push(p("C12", "toolbar clipPath = inset(0 -40 -40 -40)", L, c || "n/a", u));
930
+ const i = d.style.clipPath, a = getComputedStyle(d), c = i || a.clipPath || "", u = c === M;
931
+ e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", M, c || "n/a", u));
838
932
  }
839
933
  return e.push(
840
- p(
934
+ m(
841
935
  "C13",
842
936
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
843
937
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -845,7 +939,7 @@ function M() {
845
939
  "wiring_only"
846
940
  )
847
941
  ), e.push(
848
- p(
942
+ m(
849
943
  "C14",
850
944
  'cross-position handoff transitionend filtered by propertyName="max-height"',
851
945
  "transitionend filter wired in orchestrator (source-proof)",
@@ -854,11 +948,11 @@ function M() {
854
948
  )
855
949
  ), e;
856
950
  }
857
- function Ne(e) {
858
- return M().find((t) => t.id === e);
951
+ function ke(e) {
952
+ return F().find((t) => t.id === e);
859
953
  }
860
- function we() {
861
- const e = T();
954
+ function Me() {
955
+ const e = D();
862
956
  return { q12: [
863
957
  {
864
958
  id: "Q12-12",
@@ -867,74 +961,74 @@ function we() {
867
961
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
868
962
  pass: e.valid
869
963
  }
870
- ], cc: M() };
964
+ ], cc: F() };
871
965
  }
872
- function Se() {
966
+ function De() {
873
967
  return {
874
- enable: Ee,
875
- disable: _e,
876
- isEnabled: () => E,
877
- getLastReport: () => _,
968
+ enable: $e,
969
+ disable: Re,
970
+ isEnabled: () => T,
971
+ getLastReport: () => L,
878
972
  recordTransition: (e) => {
879
- E && (_ = { ...e, ...T() });
973
+ T && (L = { ...e, ...D() });
880
974
  },
881
975
  assertOnce: () => {
882
- const e = T();
883
- return _ = e, e;
976
+ const e = D();
977
+ return L = e, e;
884
978
  },
885
- assertCcOnly: M,
886
- getCcRowById: Ne,
887
- assertPanelTruths: we
979
+ assertCcOnly: F,
980
+ getCcRowById: ke,
981
+ assertPanelTruths: Me
888
982
  };
889
983
  }
890
- function Ee() {
891
- if (E = !0, typeof window > "u") return;
892
- window.__panelsAsserter || (window.__panelsAsserter = Se(), console.info(
984
+ function $e() {
985
+ if (T = !0, typeof window > "u") return;
986
+ window.__panelsAsserter || (window.__panelsAsserter = De(), console.info(
893
987
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
894
988
  ));
895
989
  }
896
- function _e() {
897
- E = !1;
990
+ function Re() {
991
+ T = !1;
898
992
  }
899
993
  export {
900
- Ve as COMMITS,
901
- Te as CatalogAddShell,
902
- le as CatalogFooter,
903
- Ie as CatalogReplaceShell,
904
- k as CatalogStateContext,
905
- oe as CloneCard,
906
- ne as CloneStage,
907
- G as MOCK_DEFAULT_LENS,
908
- W as MOCK_LENSES,
909
- ue as MOCK_PAGES,
910
- Q as MOCK_TILES_BY_LENS,
911
- Me as PANEL_IDS,
912
- de as PageMgmtFooter,
913
- ke as PageMgmtShell,
914
- X as PageMgmtStateContext,
915
- w as PanelChrome,
916
- qe as PanelHost,
917
- $e as PanelHostShell,
918
- N as PanelMount,
919
- Be as PanelProvider,
920
- De as PanelSlot,
921
- Le as SettingsShell,
922
- M as assertCcOnly,
923
- T as assertPanelDomShape,
924
- we as assertPanelTruths,
925
- He as deriveSurfaceState,
926
- _e as disablePanelAsserter,
927
- Ee as enablePanelAsserter,
928
- Ne as getCcRowById,
929
- Ue as initialState,
930
- z as positionKey,
931
- Ye as reducer,
932
- Pe as transitionToPanel,
933
- re as useCatalogState,
934
- ce as usePageMgmtState,
935
- Z as usePanelContext,
936
- I as usePanelContextOptional,
937
- Ke as usePanelCoordinator,
994
+ Xe as COMMITS,
995
+ He as CatalogAddShell,
996
+ be as CatalogFooter,
997
+ qe as CatalogReplaceShell,
998
+ R as CatalogStateContext,
999
+ ie as CloneCard,
1000
+ le as CloneStage,
1001
+ X as MOCK_DEFAULT_LENS,
1002
+ Q as MOCK_LENSES,
1003
+ _e as MOCK_PAGES,
1004
+ J as MOCK_TILES_BY_LENS,
1005
+ Ye as PANEL_IDS,
1006
+ Pe as PageMgmtFooter,
1007
+ Ue as PageMgmtShell,
1008
+ Z as PageMgmtStateContext,
1009
+ A as PanelChrome,
1010
+ Je as PanelHost,
1011
+ Ke as PanelHostShell,
1012
+ E as PanelMount,
1013
+ Ze as PanelProvider,
1014
+ We as PanelSlot,
1015
+ Be as SettingsShell,
1016
+ F as assertCcOnly,
1017
+ D as assertPanelDomShape,
1018
+ Me as assertPanelTruths,
1019
+ et as deriveSurfaceState,
1020
+ Re as disablePanelAsserter,
1021
+ $e as enablePanelAsserter,
1022
+ ke as getCcRowById,
1023
+ tt as initialState,
1024
+ B as positionKey,
1025
+ nt as reducer,
1026
+ Oe as transitionToPanel,
1027
+ ve as useCatalogState,
1028
+ Ce as usePageMgmtState,
1029
+ oe as usePanelContext,
1030
+ $ as usePanelContextOptional,
1031
+ st as usePanelCoordinator,
938
1032
  q as useReducedMotionPanel,
939
- Re as useTransitionToPanel
1033
+ je as useTransitionToPanel
940
1034
  };