@mt-gloss/ui 0.1.141 → 0.1.143

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,31 +1,31 @@
1
- import { jsx as s, jsxs as N } from "react/jsx-runtime";
2
- import { motion as se } from "framer-motion";
1
+ import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
+ import { motion as ie } from "framer-motion";
3
3
  import B, { useSyncExternalStore as le, useState as F, useRef as O, useMemo as z, useEffect as w, useCallback as T, createContext as ae, useContext as W, useReducer as ce, useId as X, useLayoutEffect as G } from "react";
4
4
  import { z as K } from "zod";
5
- const We = {
5
+ const Xe = {
6
6
  forwardStaggerMs: 50,
7
7
  reverseStaggerMs: 30,
8
8
  springStiffness: 380,
9
9
  springDamping: 32,
10
10
  reverseVelocityMultiplier: 1.4
11
- }, Xe = {
11
+ }, Ge = {
12
12
  enterDurationMs: 220,
13
13
  exitDurationMs: 140,
14
14
  enterEasing: "cubic-bezier(0.34, 1.56, 0.64, 1)",
15
15
  exitEasing: "cubic-bezier(0.4, 0, 1, 1)",
16
16
  translateOffsetPx: 8
17
- }, Ge = {
17
+ }, Je = {
18
18
  shiverCycles: 3,
19
19
  shiverAmplitudePx: 2,
20
20
  shiverDurationMs: 180,
21
21
  validCellOpacity: 0.6
22
- }, Je = {
22
+ }, en = {
23
23
  materializeMs: 180,
24
24
  dematerializeMs: 140,
25
25
  easing: "cubic-bezier(0.22, 1, 0.36, 1)",
26
26
  dotStrokePx: 2,
27
27
  dividerDashGapPx: 4
28
- }, en = {
28
+ }, nn = {
29
29
  cascadeStaggerMs: 0,
30
30
  cascadeSpringCapMs: 120,
31
31
  swingEnterMs: 100,
@@ -34,7 +34,7 @@ const We = {
34
34
  provisionalStyle: "opacity",
35
35
  shiverMs: 200,
36
36
  shiverStyle: "color-flash"
37
- }, nn = !0, tn = {
37
+ }, tn = !0, rn = {
38
38
  rejectionFill: "var(--gloss-rejection-fill)",
39
39
  rejectionStroke: "var(--gloss-rejection-stroke)",
40
40
  validFill: "var(--gloss-valid-fill)",
@@ -42,7 +42,7 @@ const We = {
42
42
  validCellStroke: "var(--gloss-valid-cell-stroke)",
43
43
  provisionalWash: "var(--gloss-provisional-wash)"
44
44
  };
45
- function rn() {
45
+ function on() {
46
46
  if (typeof window > "u") return "full";
47
47
  try {
48
48
  return window.matchMedia("(prefers-reduced-motion: reduce)").matches ? "reduced" : "full";
@@ -82,15 +82,15 @@ function ge({
82
82
  activeTab: n,
83
83
  onSelect: t,
84
84
  reduced: r,
85
- labels: i,
85
+ labels: s,
86
86
  ariaLabel: a = "Settings dimensions"
87
87
  }) {
88
88
  const c = ee(), o = r ?? c;
89
89
  if (e.length < 2) return null;
90
- const p = (d) => i?.[d] ?? me[d], u = (d, m) => {
90
+ const p = (d) => s?.[d] ?? me[d], u = (d, m) => {
91
91
  d.key === "ArrowRight" ? (d.preventDefault(), t(e[(m + 1) % e.length])) : d.key === "ArrowLeft" ? (d.preventDefault(), t(e[(m - 1 + e.length) % e.length])) : d.key === "Home" ? (d.preventDefault(), t(e[0])) : d.key === "End" && (d.preventDefault(), t(e[e.length - 1]));
92
92
  };
93
- return /* @__PURE__ */ s(
93
+ return /* @__PURE__ */ i(
94
94
  "div",
95
95
  {
96
96
  role: "tablist",
@@ -111,9 +111,9 @@ function ge({
111
111
  onClick: () => t(d),
112
112
  onKeyDown: (k) => u(k, m),
113
113
  children: [
114
- /* @__PURE__ */ s("span", { className: "settings-tab-strip__label", children: p(d) }),
115
- _ && !o && /* @__PURE__ */ s(
116
- se.span,
114
+ /* @__PURE__ */ i("span", { className: "settings-tab-strip__label", children: p(d) }),
115
+ _ && !o && /* @__PURE__ */ i(
116
+ ie.span,
117
117
  {
118
118
  layoutId: "settings-active-tab-indicator",
119
119
  "data-layout-id": "settings-active-tab-indicator",
@@ -142,8 +142,8 @@ function Q(e, n) {
142
142
  return t ? t.zoneKey : U(e, n);
143
143
  }
144
144
  function ve(e, n, t) {
145
- const r = [...e], [i] = r.splice(n, 1);
146
- return r.splice(t, 0, i), r;
145
+ const r = [...e], [s] = r.splice(n, 1);
146
+ return r.splice(t, 0, s), r;
147
147
  }
148
148
  function he(e) {
149
149
  return e.map((n) => `${n.zoneKey}:${n.items.map((t) => t.id).join(",")}`).join("|");
@@ -153,7 +153,7 @@ function ye(e) {
153
153
  () => e.zones.map((l) => l.maxItems !== void 0 && l.items.length > l.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
154
154
  `useSortableZones: zone "${l.zoneKey}" exceeds maxItems (${l.items.length} > ${l.maxItems}); trimming to cap.`
155
155
  ), { ...l, items: l.items.slice(0, l.maxItems) }) : l)
156
- ), [r, i] = F(null), [a, c] = F(null), o = O(null), p = O(e.onZoneChange);
156
+ ), [r, s] = F(null), [a, c] = F(null), o = O(null), p = O(e.onZoneChange);
157
157
  p.current = e.onZoneChange;
158
158
  const u = z(
159
159
  () => he(e.zones),
@@ -177,7 +177,7 @@ function ye(e) {
177
177
  break;
178
178
  }
179
179
  }
180
- o.current = y, i(C), c(y);
180
+ o.current = y, s(C), c(y);
181
181
  },
182
182
  [n]
183
183
  ), _ = T(
@@ -193,7 +193,7 @@ function ye(e) {
193
193
  ), k = T(
194
194
  (l) => {
195
195
  const { active: g, over: C } = l, y = () => {
196
- o.current = null, i(null), c(null);
196
+ o.current = null, s(null), c(null);
197
197
  };
198
198
  if (!C) {
199
199
  y();
@@ -204,15 +204,15 @@ function ye(e) {
204
204
  y();
205
205
  return;
206
206
  }
207
- let f = n.map((I) => ({ ...I, items: [...I.items] }));
207
+ let f = n.map((E) => ({ ...E, items: [...E.items] }));
208
208
  if (b === P) {
209
- const I = f.findIndex((D) => D.zoneKey === b), E = f[I], v = E.items.findIndex((D) => D.id === g.id), S = E.items.findIndex((D) => D.id === C.id), M = S >= 0 ? S : Math.max(0, E.items.length - 1);
210
- f[I] = {
211
- ...E,
212
- items: ve(E.items, v, M)
209
+ const E = f.findIndex((D) => D.zoneKey === b), I = f[E], v = I.items.findIndex((D) => D.id === g.id), S = I.items.findIndex((D) => D.id === C.id), M = S >= 0 ? S : Math.max(0, I.items.length - 1);
210
+ f[E] = {
211
+ ...I,
212
+ items: ve(I.items, v, M)
213
213
  };
214
214
  } else {
215
- const I = f.findIndex((h) => h.zoneKey === b), E = f.findIndex((h) => h.zoneKey === P), v = f[I], S = f[E], M = v.items.find((h) => h.id === g.id);
215
+ const E = f.findIndex((h) => h.zoneKey === b), I = f.findIndex((h) => h.zoneKey === P), v = f[E], S = f[I], M = v.items.find((h) => h.id === g.id);
216
216
  if (!M) {
217
217
  y();
218
218
  return;
@@ -223,12 +223,12 @@ function ye(e) {
223
223
  const h = x[x.length - 1];
224
224
  x = x.slice(0, S.maxItems - 1), j = [...D, h];
225
225
  }
226
- const q = Math.min(oe, x.length), ie = [
226
+ const q = Math.min(oe, x.length), se = [
227
227
  ...x.slice(0, q),
228
228
  M,
229
229
  ...x.slice(q)
230
230
  ];
231
- f[I] = { ...v, items: j }, f[E] = { ...S, items: ie };
231
+ f[E] = { ...v, items: j }, f[I] = { ...S, items: se };
232
232
  }
233
233
  t(f), p.current?.(f), y();
234
234
  },
@@ -262,7 +262,7 @@ function ye(e) {
262
262
  };
263
263
  }
264
264
  let L = null, R = null, Z = !1;
265
- const Ie = [
265
+ const Ee = [
266
266
  "DndContext",
267
267
  "DragOverlay",
268
268
  "useSensors",
@@ -271,18 +271,18 @@ const Ie = [
271
271
  "PointerSensor",
272
272
  "KeyboardSensor",
273
273
  "closestCenter"
274
- ], Ee = [
274
+ ], Ie = [
275
275
  "SortableContext",
276
276
  "useSortable",
277
277
  "verticalListSortingStrategy"
278
278
  ];
279
279
  function Se(e, n) {
280
280
  const t = [], r = e ?? {};
281
- for (const a of Ie)
282
- r[a] === void 0 && t.push(`@dnd-kit/core:${a}`);
283
- const i = n ?? {};
284
281
  for (const a of Ee)
285
- i[a] === void 0 && t.push(`@dnd-kit/sortable:${a}`);
282
+ r[a] === void 0 && t.push(`@dnd-kit/core:${a}`);
283
+ const s = n ?? {};
284
+ for (const a of Ie)
285
+ s[a] === void 0 && t.push(`@dnd-kit/sortable:${a}`);
286
286
  return t.length === 0 ? { ok: !0 } : { ok: !1, missing: t };
287
287
  }
288
288
  function Ce() {
@@ -308,7 +308,7 @@ function Ce() {
308
308
  })(), R);
309
309
  }
310
310
  function be(e) {
311
- const { zones: n, onZoneChange: t, renderZone: r, renderItem: i, renderDragOverlay: a } = e, c = ye({ zones: n, onZoneChange: t }), [o, p] = B.useState(L);
311
+ const { zones: n, onZoneChange: t, renderZone: r, renderItem: s, renderDragOverlay: a } = e, c = ye({ zones: n, onZoneChange: t }), [o, p] = B.useState(L);
312
312
  return B.useEffect(() => {
313
313
  if (o) return;
314
314
  let u = !0;
@@ -317,18 +317,18 @@ function be(e) {
317
317
  }), () => {
318
318
  u = !1;
319
319
  };
320
- }, [o]), o ? /* @__PURE__ */ s(
320
+ }, [o]), o ? /* @__PURE__ */ i(
321
321
  ne,
322
322
  {
323
323
  state: c,
324
324
  modules: o,
325
325
  renderZone: r,
326
- renderItem: i,
326
+ renderItem: s,
327
327
  renderDragOverlay: a
328
328
  }
329
- ) : /* @__PURE__ */ s("div", { "data-sortable-zones-passive": "true", children: c.zones.map((u) => {
330
- const d = u.items.map((m) => /* @__PURE__ */ s(B.Fragment, { children: i(m) }, m.id));
331
- return /* @__PURE__ */ s("div", { ...c.getZoneProps(u.zoneKey), children: r(u.zoneKey, u.items, d) }, u.zoneKey);
329
+ ) : /* @__PURE__ */ i("div", { "data-sortable-zones-passive": "true", children: c.zones.map((u) => {
330
+ const d = u.items.map((m) => /* @__PURE__ */ i(B.Fragment, { children: s(m) }, m.id));
331
+ return /* @__PURE__ */ i("div", { ...c.getZoneProps(u.zoneKey), children: r(u.zoneKey, u.items, d) }, u.zoneKey);
332
332
  }) });
333
333
  }
334
334
  be.displayName = "SortableZones";
@@ -337,7 +337,7 @@ function ne({
337
337
  modules: n,
338
338
  renderZone: t,
339
339
  renderItem: r,
340
- renderDragOverlay: i
340
+ renderDragOverlay: s
341
341
  }) {
342
342
  const { core: a, sortable: c, utilities: o } = n, { DndContext: p, DragOverlay: u, useSensors: d, useSensor: m, useDroppable: _, PointerSensor: k, KeyboardSensor: A, closestCenter: H } = a, { SortableContext: l, verticalListSortingStrategy: g } = c, C = d(
343
343
  m(k, { activationConstraint: { distance: 5 } }),
@@ -353,7 +353,7 @@ function ne({
353
353
  onDragEnd: e.handleDragEnd,
354
354
  children: [
355
355
  e.zones.map((f) => {
356
- const I = f.items.map((v) => v.id), E = f.items.map((v) => /* @__PURE__ */ s(
356
+ const E = f.items.map((v) => v.id), I = f.items.map((v) => /* @__PURE__ */ i(
357
357
  te,
358
358
  {
359
359
  id: v.id,
@@ -363,30 +363,30 @@ function ne({
363
363
  },
364
364
  v.id
365
365
  ));
366
- return /* @__PURE__ */ s(
366
+ return /* @__PURE__ */ i(
367
367
  re,
368
368
  {
369
369
  zoneKey: f.zoneKey,
370
370
  zoneProps: e.getZoneProps(f.zoneKey),
371
371
  useDroppable: _,
372
- children: /* @__PURE__ */ s(P, { items: I, strategy: g, children: t(f.zoneKey, f.items, E) })
372
+ children: /* @__PURE__ */ i(P, { items: E, strategy: g, children: t(f.zoneKey, f.items, I) })
373
373
  },
374
374
  f.zoneKey
375
375
  );
376
376
  }),
377
- /* @__PURE__ */ s(b, { children: e.activeItem ? i?.(e.activeItem) ?? r(e.activeItem) : null })
377
+ /* @__PURE__ */ i(b, { children: e.activeItem ? s?.(e.activeItem) ?? r(e.activeItem) : null })
378
378
  ]
379
379
  }
380
380
  );
381
381
  }
382
382
  ne.displayName = "SortableZonesInner";
383
383
  function te({ id: e, useSortable: n, cssHelper: t, children: r }) {
384
- const { attributes: i, listeners: a, setNodeRef: c, transform: o, transition: p, isDragging: u } = n({ id: e }), d = {
384
+ const { attributes: s, listeners: a, setNodeRef: c, transform: o, transition: p, isDragging: u } = n({ id: e }), d = {
385
385
  transform: t?.Transform?.toString(o) ?? void 0,
386
386
  transition: p,
387
387
  opacity: u ? 0.5 : 1
388
388
  };
389
- return /* @__PURE__ */ s("div", { ref: c, style: d, "data-sortable-item-id": e, ...i, ...a, children: r });
389
+ return /* @__PURE__ */ i("div", { ref: c, style: d, "data-sortable-item-id": e, ...s, ...a, children: r });
390
390
  }
391
391
  te.displayName = "SortableItem";
392
392
  function re({
@@ -395,8 +395,8 @@ function re({
395
395
  useDroppable: t,
396
396
  children: r
397
397
  }) {
398
- const { setNodeRef: i, isOver: a } = t({ id: e });
399
- return /* @__PURE__ */ s("div", { ref: i, "data-zone-is-over": a || void 0, ...n, children: r });
398
+ const { setNodeRef: s, isOver: a } = t({ id: e });
399
+ return /* @__PURE__ */ i("div", { ref: s, "data-zone-is-over": a || void 0, ...n, children: r });
400
400
  }
401
401
  re.displayName = "ZoneDroppable";
402
402
  const V = ae(null);
@@ -411,19 +411,28 @@ function _e() {
411
411
  function Pe() {
412
412
  return W(V);
413
413
  }
414
- const De = K.number().min(7).max(90), xe = K.array(K.string().min(1)).max(6);
415
- function Ne(e, n) {
414
+ const De = [
415
+ "today",
416
+ "7d",
417
+ "30d",
418
+ "60d",
419
+ "90d",
420
+ "mtd",
421
+ "qtd",
422
+ "ytd"
423
+ ], xe = K.enum(De), Ne = K.array(K.string().min(1)).max(6);
424
+ function Oe(e, n) {
416
425
  if (e === "timeframe") {
417
- const t = De.safeParse(n);
418
- return t.success ? t.data : 30;
426
+ const t = xe.safeParse(n);
427
+ return t.success ? t.data : "30d";
419
428
  }
420
429
  if (e === "slots") {
421
- const t = xe.safeParse(n);
430
+ const t = Ne.safeParse(n);
422
431
  return t.success ? t.data : [];
423
432
  }
424
433
  return n;
425
434
  }
426
- const Oe = {
435
+ const we = {
427
436
  activePanelId: null,
428
437
  activeTrigger: null,
429
438
  bellCutoutOpen: !1,
@@ -434,7 +443,7 @@ const Oe = {
434
443
  lastClose: null,
435
444
  pendingSideEffects: []
436
445
  }, Y = /* @__PURE__ */ new Set(["settings"]);
437
- function we(e, n) {
446
+ function Te(e, n) {
438
447
  if (e == null || e.kind !== n.kind) return !1;
439
448
  switch (e.kind) {
440
449
  case "bell":
@@ -449,7 +458,7 @@ function we(e, n) {
449
458
  return e.action === n.action && e.blockedCardId === n.blockedCardId && e.activeCardId === n.activeCardId;
450
459
  }
451
460
  }
452
- function Te(e, n) {
461
+ function ke(e, n) {
453
462
  switch (n.type) {
454
463
  case "OPEN_PANEL": {
455
464
  if (e.activePanelId && e.isDirty)
@@ -467,7 +476,7 @@ function Te(e, n) {
467
476
  }
468
477
  ]
469
478
  };
470
- if (e.activePanelId === n.panelId && we(e.activeTrigger, n.trigger))
479
+ if (e.activePanelId === n.panelId && Te(e.activeTrigger, n.trigger))
471
480
  return e;
472
481
  const t = e.activePanelId != null ? [
473
482
  {
@@ -492,12 +501,12 @@ function Te(e, n) {
492
501
  case "CLOSE_PANEL": {
493
502
  if (e.activePanelId == null)
494
503
  return e;
495
- const t = e.activePanelId, r = e.activeTrigger?.cardId ?? null, i = r != null ? e.bufferByCard[r] : void 0, a = e.isDirty ? n.reason === "apply-button" ? r != null && i != null ? [
504
+ const t = e.activePanelId, r = e.activeTrigger?.cardId ?? null, s = r != null ? e.bufferByCard[r] : void 0, a = e.isDirty ? n.reason === "apply-button" ? r != null && s != null ? [
496
505
  {
497
506
  type: "COMMIT_BUFFER",
498
- payload: { cardId: r, delta: i }
507
+ payload: { cardId: r, delta: s }
499
508
  }
500
- ] : [{ type: "COMMIT_BUFFER" }] : [{ type: "DISCARD_BUFFER" }] : [], c = r != null && i != null ? (() => {
509
+ ] : [{ type: "COMMIT_BUFFER" }] : [{ type: "DISCARD_BUFFER" }] : [], c = r != null && s != null ? (() => {
501
510
  const o = { ...e.bufferByCard };
502
511
  return delete o[r], o;
503
512
  })() : e.bufferByCard;
@@ -537,12 +546,12 @@ function Te(e, n) {
537
546
  { type: "INVALID_DISPATCH", reason: "no-buffer-panel" }
538
547
  ]
539
548
  };
540
- const t = e.bufferByCard[n.cardId], r = t == null, i = Ne(n.key, n.value);
541
- if (!r && t.changes[n.key] === i)
549
+ const t = e.bufferByCard[n.cardId], r = t == null, s = Oe(n.key, n.value);
550
+ if (!r && t.changes[n.key] === s)
542
551
  return e;
543
552
  const c = { kind: "settings", changes: {
544
553
  ...t?.kind === "settings" ? t.changes : {},
545
- [n.key]: i
554
+ [n.key]: s
546
555
  } }, o = { ...e.bufferByCard, [n.cardId]: c }, p = r ? [
547
556
  {
548
557
  type: "SCHEDULE_TIMER",
@@ -559,8 +568,8 @@ function Te(e, n) {
559
568
  case "CLEAR_BUFFER": {
560
569
  if (e.bufferByCard[n.cardId] == null)
561
570
  return e;
562
- const r = Object.keys(e.bufferByCard).length === 1, i = { ...e.bufferByCard };
563
- delete i[n.cardId];
571
+ const r = Object.keys(e.bufferByCard).length === 1, s = { ...e.bufferByCard };
572
+ delete s[n.cardId];
564
573
  const a = r && e.isDirty ? [
565
574
  {
566
575
  type: "SCHEDULE_TIMER",
@@ -570,7 +579,7 @@ function Te(e, n) {
570
579
  ] : [];
571
580
  return {
572
581
  ...e,
573
- bufferByCard: i,
582
+ bufferByCard: s,
574
583
  pendingSideEffects: [...e.pendingSideEffects, ...a]
575
584
  };
576
585
  }
@@ -611,11 +620,11 @@ function Te(e, n) {
611
620
  return e;
612
621
  }
613
622
  }
614
- function ke(e) {
623
+ function Le(e) {
615
624
  return e.activePanelId === "notification-center" ? "notif-center" : e.activePanelId != null && e.bellCutoutOpen ? e.isDirty ? "panel-dirty+cutout" : "panel-clean+cutout" : e.activePanelId != null ? e.isDirty ? "panel-dirty" : "panel-clean" : e.bellCutoutOpen ? "bell-cutout-only" : "idle";
616
625
  }
617
- function Le() {
618
- const [e, n] = ce(Te, Oe), t = O([]), r = O(null);
626
+ function Me() {
627
+ const [e, n] = ce(ke, we), t = O([]), r = O(null);
619
628
  w(() => () => {
620
629
  r.current != null && (window.clearTimeout(r.current), r.current = null);
621
630
  }, []), w(() => {
@@ -648,25 +657,25 @@ function Le() {
648
657
  c
649
658
  ];
650
659
  }, [e.lastClose]);
651
- const i = z(
652
- () => ke(e),
660
+ const s = z(
661
+ () => Le(e),
653
662
  [e.activePanelId, e.bellCutoutOpen, e.isDirty]
654
663
  ), a = T(() => t.current.slice(), []);
655
- return { state: e, surfaceState: i, dispatch: n, getCloseLog: a };
664
+ return { state: e, surfaceState: s, dispatch: n, getCloseLog: a };
656
665
  }
657
- function on({ children: e }) {
658
- const n = Le(), t = z(
666
+ function sn({ children: e }) {
667
+ const n = Me(), t = z(
659
668
  () => n,
660
669
  // Re-publish only when one of the four coordinator fields changes identity.
661
670
  // dispatch + getCloseLog are stable. state + surfaceState change on dispatch.
662
671
  [n.state, n.surfaceState, n.dispatch, n.getCloseLog]
663
672
  );
664
- return /* @__PURE__ */ s(V.Provider, { value: t, children: e });
673
+ return /* @__PURE__ */ i(V.Provider, { value: t, children: e });
665
674
  }
666
- function Me({ title: e, onClose: n, titleId: t }) {
675
+ function Re({ title: e, onClose: n, titleId: t }) {
667
676
  return /* @__PURE__ */ N("div", { className: "gloss-panel-chrome-v2__header", children: [
668
- e != null && /* @__PURE__ */ s("span", { id: t, className: "gloss-panel-chrome-v2__title", children: e }),
669
- /* @__PURE__ */ s(
677
+ e != null && /* @__PURE__ */ i("span", { id: t, className: "gloss-panel-chrome-v2__title", children: e }),
678
+ /* @__PURE__ */ i(
670
679
  "button",
671
680
  {
672
681
  id: "panel-close",
@@ -679,8 +688,8 @@ function Me({ title: e, onClose: n, titleId: t }) {
679
688
  )
680
689
  ] });
681
690
  }
682
- function Re({ children: e }) {
683
- return /* @__PURE__ */ s(
691
+ function Fe({ children: e }) {
692
+ return /* @__PURE__ */ i(
684
693
  "div",
685
694
  {
686
695
  "data-panel-stage": !0,
@@ -690,24 +699,24 @@ function Re({ children: e }) {
690
699
  }
691
700
  );
692
701
  }
693
- function Fe({ children: e }) {
694
- return /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
695
- }
696
702
  function Ae({ children: e }) {
697
- return /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__body", children: e });
703
+ return /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
704
+ }
705
+ function He({ children: e }) {
706
+ return /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__body", children: e });
698
707
  }
699
- function He({ left: e, right: n }) {
708
+ function Be({ left: e, right: n }) {
700
709
  return /* @__PURE__ */ N("div", { className: "gloss-panel-chrome-v2__footer", children: [
701
- /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
702
- /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__footer-right", children: n })
710
+ /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
711
+ /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__footer-right", children: n })
703
712
  ] });
704
713
  }
705
- function Be({
714
+ function Ze({
706
715
  children: e,
707
716
  onClose: n,
708
717
  title: t,
709
718
  variant: r = "no-stage",
710
- stage: i,
719
+ stage: s,
711
720
  navigation: a,
712
721
  footer: c
713
722
  }) {
@@ -724,12 +733,12 @@ function Be({
724
733
  "aria-label": u ? void 0 : "Panel",
725
734
  className: `gloss-panel-chrome-v2 gloss-panel-chrome-v2--${r}${o ? " gloss-panel-chrome-v2--headerless" : ""}`,
726
735
  children: [
727
- !o && /* @__PURE__ */ s(Me, { title: t, onClose: n, titleId: p }),
728
- r === "with-stage" && /* @__PURE__ */ s(Re, { children: i }),
729
- a != null && /* @__PURE__ */ s(Fe, { children: a }),
730
- /* @__PURE__ */ s(Ae, { children: e }),
731
- c != null && /* @__PURE__ */ s(He, { left: c.left, right: c.right }),
732
- o && /* @__PURE__ */ s(
736
+ !o && /* @__PURE__ */ i(Re, { title: t, onClose: n, titleId: p }),
737
+ r === "with-stage" && /* @__PURE__ */ i(Fe, { children: s }),
738
+ a != null && /* @__PURE__ */ i(Ae, { children: a }),
739
+ /* @__PURE__ */ i(He, { children: e }),
740
+ c != null && /* @__PURE__ */ i(Be, { left: c.left, right: c.right }),
741
+ o && /* @__PURE__ */ i(
733
742
  "button",
734
743
  {
735
744
  id: "panel-close",
@@ -744,45 +753,45 @@ function Be({
744
753
  }
745
754
  );
746
755
  }
747
- function sn({ isOpen: e }) {
756
+ function ln({ isOpen: e }) {
748
757
  const n = Pe();
749
- return /* @__PURE__ */ s(
750
- Be,
758
+ return /* @__PURE__ */ i(
759
+ Ze,
751
760
  {
752
761
  variant: "no-stage",
753
762
  title: "Notifications",
754
763
  onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
755
- children: /* @__PURE__ */ s(
764
+ children: /* @__PURE__ */ i(
756
765
  "div",
757
766
  {
758
767
  "data-shell": "notification-center",
759
768
  "data-panel": "notification-center",
760
769
  "aria-hidden": !e,
761
- children: /* @__PURE__ */ s("p", { children: "No notifications" })
770
+ children: /* @__PURE__ */ i("p", { children: "No notifications" })
762
771
  }
763
772
  )
764
773
  }
765
774
  );
766
775
  }
767
- const Ze = {
776
+ const Ke = {
768
777
  position: "relative",
769
778
  pointerEvents: "auto"
770
779
  };
771
- function Ke({ children: e, onClose: n, footer: t, title: r, variant: i = "default" }) {
780
+ function Ue({ children: e, onClose: n, footer: t, title: r, variant: s = "default" }) {
772
781
  const a = `panel-close-${X().replace(/:/g, "-")}`;
773
782
  return /* @__PURE__ */ N(
774
783
  "div",
775
784
  {
776
785
  "data-chrome": "panel",
777
- "data-chrome-variant": i,
786
+ "data-chrome-variant": s,
778
787
  role: "dialog",
779
788
  "aria-modal": "true",
780
- className: i === "merged-stage" ? "gloss-panel-chrome gloss-panel-chrome--merged-stage" : "gloss-panel-chrome",
781
- style: Ze,
789
+ className: s === "merged-stage" ? "gloss-panel-chrome gloss-panel-chrome--merged-stage" : "gloss-panel-chrome",
790
+ style: Ke,
782
791
  children: [
783
792
  /* @__PURE__ */ N("div", { className: "gloss-panel-chrome__header", children: [
784
- r != null && /* @__PURE__ */ s("span", { className: "gloss-panel-chrome__title", children: r }),
785
- /* @__PURE__ */ s(
793
+ r != null && /* @__PURE__ */ i("span", { className: "gloss-panel-chrome__title", children: r }),
794
+ /* @__PURE__ */ i(
786
795
  "button",
787
796
  {
788
797
  id: a,
@@ -794,13 +803,13 @@ function Ke({ children: e, onClose: n, footer: t, title: r, variant: i = "defaul
794
803
  }
795
804
  )
796
805
  ] }),
797
- /* @__PURE__ */ s("div", { className: "gloss-panel-chrome__body", children: e }),
798
- t != null && /* @__PURE__ */ s("div", { className: "gloss-panel-chrome__footer", children: t })
806
+ /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__body", children: e }),
807
+ t != null && /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__footer", children: t })
799
808
  ]
800
809
  }
801
810
  );
802
811
  }
803
- function Ue(e) {
812
+ function ze(e) {
804
813
  if (process.env.NODE_ENV === "production" || !e || !e.parentElement) return;
805
814
  let n = e.parentElement;
806
815
  for (; n && window.getComputedStyle(n).display === "contents"; )
@@ -815,12 +824,12 @@ function Ue(e) {
815
824
  n
816
825
  );
817
826
  }
818
- function ze({ isOpen: e, children: n }) {
827
+ function Ve({ isOpen: e, children: n }) {
819
828
  const t = ee(), r = O(null);
820
829
  G(() => {
821
- Ue(r.current);
830
+ ze(r.current);
822
831
  }, []);
823
- const [i, a] = F(!1);
832
+ const [s, a] = F(!1);
824
833
  w(() => {
825
834
  if (!e) {
826
835
  a(!1);
@@ -831,10 +840,10 @@ function ze({ isOpen: e, children: n }) {
831
840
  }, [e]);
832
841
  const c = [
833
842
  "gloss-panel-mount",
834
- i ? "has-panel" : "",
843
+ s ? "has-panel" : "",
835
844
  t ? "reduced-motion" : ""
836
845
  ].filter(Boolean).join(" ");
837
- return /* @__PURE__ */ s(
846
+ return /* @__PURE__ */ i(
838
847
  "div",
839
848
  {
840
849
  ref: r,
@@ -845,7 +854,7 @@ function ze({ isOpen: e, children: n }) {
845
854
  }
846
855
  );
847
856
  }
848
- const Ve = {
857
+ const $e = {
849
858
  position: "fixed",
850
859
  top: 0,
851
860
  left: 0,
@@ -856,7 +865,7 @@ const Ve = {
856
865
  overflow: "visible",
857
866
  pointerEvents: "none",
858
867
  zIndex: 55
859
- }, $e = {
868
+ }, je = {
860
869
  position: "fixed",
861
870
  top: "var(--tb-h, 60px)",
862
871
  left: 0,
@@ -870,9 +879,9 @@ const Ve = {
870
879
  pointerEvents: "none",
871
880
  background: "rgba(0, 0, 0, 0.04)"
872
881
  };
873
- function ln({ panelComponents: e }) {
874
- const { state: n, dispatch: t, getCloseLog: r } = _e(), i = n.activePanelId ? e[n.activePanelId] : null;
875
- n.activePanelId && !i && process.env.NODE_ENV !== "production" && console.error(
882
+ function an({ panelComponents: e }) {
883
+ const { state: n, dispatch: t, getCloseLog: r } = _e(), s = n.activePanelId ? e[n.activePanelId] : null;
884
+ n.activePanelId && !s && process.env.NODE_ENV !== "production" && console.error(
876
885
  "[panels] No panel component registered for activePanelId:",
877
886
  n.activePanelId
878
887
  ), w(() => {
@@ -898,26 +907,26 @@ function ln({ panelComponents: e }) {
898
907
  o.__panelsHostHandle?.dispatch === t && delete o.__panelsHostHandle;
899
908
  };
900
909
  }, [t, r]);
901
- const c = n.activePanelId != null && i != null;
902
- return /* @__PURE__ */ N("div", { "data-panel-host": "true", style: Ve, children: [
903
- c && /* @__PURE__ */ s(
910
+ const c = n.activePanelId != null && s != null;
911
+ return /* @__PURE__ */ N("div", { "data-panel-host": "true", style: $e, children: [
912
+ c && /* @__PURE__ */ i(
904
913
  "div",
905
914
  {
906
915
  "data-panel-scrim": "true",
907
- style: $e
916
+ style: je
908
917
  }
909
918
  ),
910
- /* @__PURE__ */ s(ze, { isOpen: c, children: c && /* @__PURE__ */ s(
911
- Ke,
919
+ /* @__PURE__ */ i(Ve, { isOpen: c, children: c && /* @__PURE__ */ i(
920
+ Ue,
912
921
  {
913
922
  isOpen: !0,
914
923
  onClose: () => t({ type: "CLOSE_PANEL", reason: "header-x" }),
915
- children: /* @__PURE__ */ s(i, { isOpen: !0 })
924
+ children: /* @__PURE__ */ i(s, { isOpen: !0 })
916
925
  }
917
926
  ) })
918
927
  ] });
919
928
  }
920
- const an = {
929
+ const cn = {
921
930
  "apply-button": !0,
922
931
  // the ONLY commit reason
923
932
  "cancel-button": !1,
@@ -935,33 +944,33 @@ const an = {
935
944
  // 260524 panel-x-axis-transitions — viewport shrank past targetSection
936
945
  };
937
946
  export {
938
- an as C,
939
- nn as H,
940
- sn as N,
941
- on as P,
947
+ cn as C,
948
+ tn as H,
949
+ ln as N,
950
+ sn as P,
942
951
  be as S,
943
- en as a,
944
- tn as b,
945
- We as c,
952
+ nn as a,
953
+ rn as b,
954
+ Xe as c,
946
955
  ye as d,
947
956
  _e as e,
948
- ln as f,
949
- rn as g,
950
- Le as h,
951
- Te as i,
952
- Oe as j,
953
- ke as k,
957
+ an as f,
958
+ on as g,
959
+ Me as h,
960
+ ke as i,
961
+ we as j,
962
+ Le as k,
954
963
  ge as l,
955
964
  ee as m,
956
- Be as n,
957
- ze as o,
958
- Je as p,
959
- Me as q,
960
- Ge as r,
961
- Xe as s,
962
- Re as t,
965
+ Ze as n,
966
+ Ve as o,
967
+ en as p,
968
+ Re as q,
969
+ Je as r,
970
+ Ge as s,
971
+ Fe as t,
963
972
  Pe as u,
964
- Fe as v,
965
- Ae as w,
966
- He as x
973
+ Ae as v,
974
+ He as w,
975
+ Be as x
967
976
  };