@mt-gloss/ui 0.1.98 → 0.1.100

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