@mt-gloss/ui 0.1.104 → 0.1.106

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