@mt-gloss/ui 0.1.133 → 0.1.135

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.
Files changed (37) hide show
  1. package/{COMMITS-WBmqrmdI.js → COMMITS-B_qGBoy7.js} +171 -183
  2. package/{Expandable-D0vngX68.js → Expandable-DA4NFzCR.js} +2768 -2720
  3. package/catalog.js +2 -2
  4. package/composites-panels.js +451 -543
  5. package/index.js +1233 -1215
  6. package/lib/composites/forms/PasswordInput.d.ts +6 -1
  7. package/lib/composites/forms/PhoneInput.d.ts +6 -1
  8. package/lib/composites/forms/SearchInput.d.ts +6 -1
  9. package/lib/composites/forms/TagInput.d.ts +6 -1
  10. package/lib/composites/inputs/FilterChip.d.ts +6 -1
  11. package/lib/composites/overlay/SplitButton/SplitButton.d.ts +6 -1
  12. package/lib/composites/panels/coordinator/settingsBufferSchemas.d.ts +4 -9
  13. package/lib/composites/panels/index.d.ts +2 -0
  14. package/lib/composites/panels/shells/MetricInfoShell.d.ts +29 -0
  15. package/lib/composites/panels/shells/SettingsShell.d.ts +4 -13
  16. package/lib/composites/panels/shells/index.d.ts +2 -0
  17. package/lib/composites/panels/shells/settings/index.d.ts +3 -4
  18. package/lib/containers/ContainerDialog/ContainerDialog.d.ts +18 -3
  19. package/lib/containers/ContainerFormSection/ContainerFormSection.d.ts +6 -1
  20. package/lib/containers/ContainerPanel/ContainerPanel.d.ts +6 -1
  21. package/lib/containers/ContainerTable/ContainerTable.d.ts +6 -1
  22. package/lib/containers/ContainerToolbar/ContainerToolbar.d.ts +6 -1
  23. package/lib/primitives/dashboard/ResizePill/ResizePill.d.ts +7 -1
  24. package/lib/wrappers/Actionable/Actionable.d.ts +6 -1
  25. package/lib/wrappers/AsyncLoader/AsyncLoader.d.ts +6 -1
  26. package/lib/wrappers/ButtonGroup/ButtonGroup.d.ts +6 -1
  27. package/lib/wrappers/CheckboxGroup/CheckboxGroup.d.ts +6 -1
  28. package/lib/wrappers/Dismissible/Dismissible.d.ts +6 -1
  29. package/lib/wrappers/Expandable/Expandable.d.ts +6 -1
  30. package/lib/wrappers/InputGroup/InputGroup.d.ts +12 -2
  31. package/lib/wrappers/RadioGroup/RadioGroup.d.ts +6 -1
  32. package/lib/wrappers/Selectable/Selectable.d.ts +6 -1
  33. package/lib/wrappers/Sortable/Sortable.d.ts +6 -1
  34. package/package.json +1 -1
  35. package/ui.css +1 -1
  36. package/lib/composites/panels/shells/settings/ColorControls.d.ts +0 -13
  37. package/lib/composites/panels/shells/settings/ThresholdControls.d.ts +0 -10
@@ -1,7 +1,7 @@
1
- import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { motion as ie } from "framer-motion";
3
- import M, { useSyncExternalStore as le, useState as H, useRef as O, useMemo as $, useEffect as w, useCallback as T, createContext as ae, useContext as W, useReducer as ce, useId as X, useLayoutEffect as G } from "react";
4
- import { z as L } from "zod";
1
+ import { jsx as s, jsxs as N } from "react/jsx-runtime";
2
+ import { motion as se } from "framer-motion";
3
+ import Z, { useSyncExternalStore as le, useState as A, useRef as O, useMemo as $, useEffect as w, useCallback as T, createContext as ae, useContext as W, useReducer as ce, useId as X, useLayoutEffect as G } from "react";
4
+ import { z as K } from "zod";
5
5
  const de = "(prefers-reduced-motion: reduce)";
6
6
  function J() {
7
7
  return typeof window > "u" || typeof window.matchMedia != "function" ? null : window.matchMedia(de);
@@ -34,38 +34,38 @@ function ge({
34
34
  activeTab: n,
35
35
  onSelect: t,
36
36
  reduced: r,
37
- labels: s,
37
+ labels: i,
38
38
  ariaLabel: a = "Settings dimensions"
39
39
  }) {
40
40
  const c = ee(), o = r ?? c;
41
41
  if (e.length < 2) return null;
42
- const p = (d) => s?.[d] ?? me[d], u = (d, m) => {
42
+ const p = (d) => i?.[d] ?? me[d], u = (d, m) => {
43
43
  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]));
44
44
  };
45
- return /* @__PURE__ */ i(
45
+ return /* @__PURE__ */ s(
46
46
  "div",
47
47
  {
48
48
  role: "tablist",
49
49
  "aria-label": a,
50
50
  className: "settings-tab-strip",
51
51
  children: e.map((d, m) => {
52
- const _ = n === d;
52
+ const b = n === d;
53
53
  return /* @__PURE__ */ N(
54
54
  "button",
55
55
  {
56
56
  role: "tab",
57
57
  type: "button",
58
58
  id: `settings-tab-${d}`,
59
- "aria-selected": _,
59
+ "aria-selected": b,
60
60
  "aria-controls": `settings-tabpanel-${d}`,
61
- tabIndex: _ ? 0 : -1,
62
- className: `settings-tab-strip__tab${_ ? " settings-tab-strip__tab--active" : ""}`,
61
+ tabIndex: b ? 0 : -1,
62
+ className: `settings-tab-strip__tab${b ? " settings-tab-strip__tab--active" : ""}`,
63
63
  onClick: () => t(d),
64
- onKeyDown: (R) => u(R, m),
64
+ onKeyDown: (L) => u(L, m),
65
65
  children: [
66
- /* @__PURE__ */ i("span", { className: "settings-tab-strip__label", children: p(d) }),
67
- _ && !o && /* @__PURE__ */ i(
68
- ie.span,
66
+ /* @__PURE__ */ s("span", { className: "settings-tab-strip__label", children: p(d) }),
67
+ b && !o && /* @__PURE__ */ s(
68
+ se.span,
69
69
  {
70
70
  layoutId: "settings-active-tab-indicator",
71
71
  "data-layout-id": "settings-active-tab-indicator",
@@ -94,18 +94,18 @@ function Q(e, n) {
94
94
  return t ? t.zoneKey : U(e, n);
95
95
  }
96
96
  function he(e, n, t) {
97
- const r = [...e], [s] = r.splice(n, 1);
98
- return r.splice(t, 0, s), r;
97
+ const r = [...e], [i] = r.splice(n, 1);
98
+ return r.splice(t, 0, i), r;
99
99
  }
100
100
  function ve(e) {
101
101
  return e.map((n) => `${n.zoneKey}:${n.items.map((t) => t.id).join(",")}`).join("|");
102
102
  }
103
103
  function ye(e) {
104
- const [n, t] = H(
104
+ const [n, t] = A(
105
105
  () => e.zones.map((l) => l.maxItems !== void 0 && l.items.length > l.maxItems ? (process.env.NODE_ENV !== "production" && console.warn(
106
106
  `useSortableZones: zone "${l.zoneKey}" exceeds maxItems (${l.items.length} > ${l.maxItems}); trimming to cap.`
107
107
  ), { ...l, items: l.items.slice(0, l.maxItems) }) : l)
108
- ), [r, s] = H(null), [a, c] = H(null), o = O(null), p = O(e.onZoneChange);
108
+ ), [r, i] = A(null), [a, c] = A(null), o = O(null), p = O(e.onZoneChange);
109
109
  p.current = e.onZoneChange;
110
110
  const u = $(
111
111
  () => ve(e.zones),
@@ -122,17 +122,17 @@ function ye(e) {
122
122
  (l) => {
123
123
  const g = l.active.id;
124
124
  let S = null, y = null;
125
- for (const b of n) {
126
- const P = b.items.find((f) => f.id === g);
125
+ for (const _ of n) {
126
+ const P = _.items.find((f) => f.id === g);
127
127
  if (P) {
128
- S = P, y = b.zoneKey;
128
+ S = P, y = _.zoneKey;
129
129
  break;
130
130
  }
131
131
  }
132
- o.current = y, s(S), c(y);
132
+ o.current = y, i(S), c(y);
133
133
  },
134
134
  [n]
135
- ), _ = T(
135
+ ), b = T(
136
136
  (l) => {
137
137
  if (!l.over) {
138
138
  c(o.current);
@@ -142,30 +142,30 @@ function ye(e) {
142
142
  c(g);
143
143
  },
144
144
  [n]
145
- ), R = T(
145
+ ), L = T(
146
146
  (l) => {
147
147
  const { active: g, over: S } = l, y = () => {
148
- o.current = null, s(null), c(null);
148
+ o.current = null, i(null), c(null);
149
149
  };
150
150
  if (!S) {
151
151
  y();
152
152
  return;
153
153
  }
154
- const b = U(n, g.id), P = Q(n, S.id);
155
- if (!b || !P) {
154
+ const _ = U(n, g.id), P = Q(n, S.id);
155
+ if (!_ || !P) {
156
156
  y();
157
157
  return;
158
158
  }
159
159
  let f = n.map((I) => ({ ...I, items: [...I.items] }));
160
- if (b === P) {
161
- const I = f.findIndex((D) => D.zoneKey === b), E = f[I], h = E.items.findIndex((D) => D.id === g.id), C = E.items.findIndex((D) => D.id === S.id), F = C >= 0 ? C : Math.max(0, E.items.length - 1);
160
+ if (_ === P) {
161
+ const I = f.findIndex((D) => D.zoneKey === _), E = f[I], h = E.items.findIndex((D) => D.id === g.id), C = E.items.findIndex((D) => D.id === S.id), k = C >= 0 ? C : Math.max(0, E.items.length - 1);
162
162
  f[I] = {
163
163
  ...E,
164
- items: he(E.items, h, F)
164
+ items: he(E.items, h, k)
165
165
  };
166
166
  } else {
167
- const I = f.findIndex((v) => v.zoneKey === b), E = f.findIndex((v) => v.zoneKey === P), h = f[I], C = f[E], F = h.items.find((v) => v.id === g.id);
168
- if (!F) {
167
+ const I = f.findIndex((v) => v.zoneKey === _), E = f.findIndex((v) => v.zoneKey === P), h = f[I], C = f[E], k = h.items.find((v) => v.id === g.id);
168
+ if (!k) {
169
169
  y();
170
170
  return;
171
171
  }
@@ -175,23 +175,23 @@ function ye(e) {
175
175
  const v = x[x.length - 1];
176
176
  x = x.slice(0, C.maxItems - 1), j = [...D, v];
177
177
  }
178
- const q = Math.min(oe, x.length), se = [
178
+ const q = Math.min(oe, x.length), ie = [
179
179
  ...x.slice(0, q),
180
- F,
180
+ k,
181
181
  ...x.slice(q)
182
182
  ];
183
- f[I] = { ...h, items: j }, f[E] = { ...C, items: se };
183
+ f[I] = { ...h, items: j }, f[E] = { ...C, items: ie };
184
184
  }
185
185
  t(f), p.current?.(f), y();
186
186
  },
187
187
  [n]
188
- ), B = T(
188
+ ), H = T(
189
189
  (l) => ({
190
190
  id: l,
191
191
  "data-zone-key": l
192
192
  }),
193
193
  []
194
- ), Z = T(
194
+ ), B = T(
195
195
  (l) => {
196
196
  const g = U(n, l.id) ?? "";
197
197
  return {
@@ -206,14 +206,14 @@ function ye(e) {
206
206
  zones: n,
207
207
  activeZone: a,
208
208
  activeItem: r,
209
- getZoneProps: B,
210
- getItemProps: Z,
209
+ getZoneProps: H,
210
+ getItemProps: B,
211
211
  handleDragStart: m,
212
- handleDragOver: _,
213
- handleDragEnd: R
212
+ handleDragOver: b,
213
+ handleDragEnd: L
214
214
  };
215
215
  }
216
- let k = null, A = null, K = !1;
216
+ let R = null, F = null, M = !1;
217
217
  const Ie = [
218
218
  "DndContext",
219
219
  "DragOverlay",
@@ -232,13 +232,13 @@ function Ce(e, n) {
232
232
  const t = [], r = e ?? {};
233
233
  for (const a of Ie)
234
234
  r[a] === void 0 && t.push(`@dnd-kit/core:${a}`);
235
- const s = n ?? {};
235
+ const i = n ?? {};
236
236
  for (const a of Ee)
237
- s[a] === void 0 && t.push(`@dnd-kit/sortable:${a}`);
237
+ i[a] === void 0 && t.push(`@dnd-kit/sortable:${a}`);
238
238
  return t.length === 0 ? { ok: !0 } : { ok: !1, missing: t };
239
239
  }
240
240
  function Se() {
241
- return k ? Promise.resolve(k) : K ? Promise.resolve(null) : A || (A = (async () => {
241
+ return R ? Promise.resolve(R) : M ? Promise.resolve(null) : F || (F = (async () => {
242
242
  try {
243
243
  const [e, n, t] = await Promise.all([
244
244
  import("@dnd-kit/core"),
@@ -247,21 +247,21 @@ function Se() {
247
247
  "SortableZones: @dnd-kit/utilities failed to load; drag-overlay positioning will fall back (items may teleport instead of slide)."
248
248
  ), {}))
249
249
  ]), r = Ce(e, n);
250
- return r.ok ? (k = {
250
+ return r.ok ? (R = {
251
251
  core: e,
252
252
  sortable: n,
253
253
  utilities: t
254
- }, k) : (K = !0, process.env.NODE_ENV !== "production" && console.error(
254
+ }, R) : (M = !0, process.env.NODE_ENV !== "production" && console.error(
255
255
  `SortableZones: @dnd-kit shape mismatch — missing exports: ${r.missing.join(", ")}. Check installed versions against optionalDependencies in @mt-gloss/ui.`
256
256
  ), null);
257
257
  } catch {
258
- return K = !0, null;
258
+ return M = !0, null;
259
259
  }
260
- })(), A);
260
+ })(), F);
261
261
  }
262
- function be(e) {
263
- const { zones: n, onZoneChange: t, renderZone: r, renderItem: s, renderDragOverlay: a } = e, c = ye({ zones: n, onZoneChange: t }), [o, p] = M.useState(k);
264
- return M.useEffect(() => {
262
+ function _e(e) {
263
+ const { zones: n, onZoneChange: t, renderZone: r, renderItem: i, renderDragOverlay: a } = e, c = ye({ zones: n, onZoneChange: t }), [o, p] = Z.useState(R);
264
+ return Z.useEffect(() => {
265
265
  if (o) return;
266
266
  let u = !0;
267
267
  return Se().then((d) => {
@@ -269,43 +269,43 @@ function be(e) {
269
269
  }), () => {
270
270
  u = !1;
271
271
  };
272
- }, [o]), o ? /* @__PURE__ */ i(
272
+ }, [o]), o ? /* @__PURE__ */ s(
273
273
  ne,
274
274
  {
275
275
  state: c,
276
276
  modules: o,
277
277
  renderZone: r,
278
- renderItem: s,
278
+ renderItem: i,
279
279
  renderDragOverlay: a
280
280
  }
281
- ) : /* @__PURE__ */ i("div", { "data-sortable-zones-passive": "true", children: c.zones.map((u) => {
282
- const d = u.items.map((m) => /* @__PURE__ */ i(M.Fragment, { children: s(m) }, m.id));
283
- return /* @__PURE__ */ i("div", { ...c.getZoneProps(u.zoneKey), children: r(u.zoneKey, u.items, d) }, u.zoneKey);
281
+ ) : /* @__PURE__ */ s("div", { "data-sortable-zones-passive": "true", children: c.zones.map((u) => {
282
+ const d = u.items.map((m) => /* @__PURE__ */ s(Z.Fragment, { children: i(m) }, m.id));
283
+ return /* @__PURE__ */ s("div", { ...c.getZoneProps(u.zoneKey), children: r(u.zoneKey, u.items, d) }, u.zoneKey);
284
284
  }) });
285
285
  }
286
- be.displayName = "SortableZones";
286
+ _e.displayName = "SortableZones";
287
287
  function ne({
288
288
  state: e,
289
289
  modules: n,
290
290
  renderZone: t,
291
291
  renderItem: r,
292
- renderDragOverlay: s
292
+ renderDragOverlay: i
293
293
  }) {
294
- const { core: a, sortable: c, utilities: o } = n, { DndContext: p, DragOverlay: u, useSensors: d, useSensor: m, useDroppable: _, PointerSensor: R, KeyboardSensor: B, closestCenter: Z } = a, { SortableContext: l, verticalListSortingStrategy: g } = c, S = d(
295
- m(R, { activationConstraint: { distance: 5 } }),
296
- m(B)
297
- ), y = p, b = u, P = l;
294
+ const { core: a, sortable: c, utilities: o } = n, { DndContext: p, DragOverlay: u, useSensors: d, useSensor: m, useDroppable: b, PointerSensor: L, KeyboardSensor: H, closestCenter: B } = a, { SortableContext: l, verticalListSortingStrategy: g } = c, S = d(
295
+ m(L, { activationConstraint: { distance: 5 } }),
296
+ m(H)
297
+ ), y = p, _ = u, P = l;
298
298
  return /* @__PURE__ */ N(
299
299
  y,
300
300
  {
301
301
  sensors: S,
302
- collisionDetection: Z,
302
+ collisionDetection: B,
303
303
  onDragStart: e.handleDragStart,
304
304
  onDragOver: e.handleDragOver,
305
305
  onDragEnd: e.handleDragEnd,
306
306
  children: [
307
307
  e.zones.map((f) => {
308
- const I = f.items.map((h) => h.id), E = f.items.map((h) => /* @__PURE__ */ i(
308
+ const I = f.items.map((h) => h.id), E = f.items.map((h) => /* @__PURE__ */ s(
309
309
  te,
310
310
  {
311
311
  id: h.id,
@@ -315,30 +315,30 @@ function ne({
315
315
  },
316
316
  h.id
317
317
  ));
318
- return /* @__PURE__ */ i(
318
+ return /* @__PURE__ */ s(
319
319
  re,
320
320
  {
321
321
  zoneKey: f.zoneKey,
322
322
  zoneProps: e.getZoneProps(f.zoneKey),
323
- useDroppable: _,
324
- children: /* @__PURE__ */ i(P, { items: I, strategy: g, children: t(f.zoneKey, f.items, E) })
323
+ useDroppable: b,
324
+ children: /* @__PURE__ */ s(P, { items: I, strategy: g, children: t(f.zoneKey, f.items, E) })
325
325
  },
326
326
  f.zoneKey
327
327
  );
328
328
  }),
329
- /* @__PURE__ */ i(b, { children: e.activeItem ? s?.(e.activeItem) ?? r(e.activeItem) : null })
329
+ /* @__PURE__ */ s(_, { children: e.activeItem ? i?.(e.activeItem) ?? r(e.activeItem) : null })
330
330
  ]
331
331
  }
332
332
  );
333
333
  }
334
334
  ne.displayName = "SortableZonesInner";
335
335
  function te({ id: e, useSortable: n, cssHelper: t, children: r }) {
336
- const { attributes: s, listeners: a, setNodeRef: c, transform: o, transition: p, isDragging: u } = n({ id: e }), d = {
336
+ const { attributes: i, listeners: a, setNodeRef: c, transform: o, transition: p, isDragging: u } = n({ id: e }), d = {
337
337
  transform: t?.Transform?.toString(o) ?? void 0,
338
338
  transition: p,
339
339
  opacity: u ? 0.5 : 1
340
340
  };
341
- return /* @__PURE__ */ i("div", { ref: c, style: d, "data-sortable-item-id": e, ...s, ...a, children: r });
341
+ return /* @__PURE__ */ s("div", { ref: c, style: d, "data-sortable-item-id": e, ...i, ...a, children: r });
342
342
  }
343
343
  te.displayName = "SortableItem";
344
344
  function re({
@@ -347,12 +347,12 @@ function re({
347
347
  useDroppable: t,
348
348
  children: r
349
349
  }) {
350
- const { setNodeRef: s, isOver: a } = t({ id: e });
351
- return /* @__PURE__ */ i("div", { ref: s, "data-zone-is-over": a || void 0, ...n, children: r });
350
+ const { setNodeRef: i, isOver: a } = t({ id: e });
351
+ return /* @__PURE__ */ s("div", { ref: i, "data-zone-is-over": a || void 0, ...n, children: r });
352
352
  }
353
353
  re.displayName = "ZoneDroppable";
354
354
  const V = ae(null);
355
- function _e() {
355
+ function be() {
356
356
  const e = W(V);
357
357
  if (!e)
358
358
  throw new Error(
@@ -363,31 +363,19 @@ function _e() {
363
363
  function Pe() {
364
364
  return W(V);
365
365
  }
366
- const De = L.number().min(0).max(100), xe = L.number().min(7).max(90), Ne = L.enum(["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"]), Oe = L.array(L.string().min(1)).max(3), we = L.boolean();
367
- function Te(e, n) {
368
- if (e === "threshold") {
369
- const t = De.safeParse(n);
370
- return t.success ? t.data : 80;
371
- }
366
+ const De = K.number().min(7).max(90), xe = K.array(K.string().min(1)).max(3);
367
+ function Ne(e, n) {
372
368
  if (e === "timeframe") {
373
- const t = xe.safeParse(n);
369
+ const t = De.safeParse(n);
374
370
  return t.success ? t.data : 30;
375
371
  }
376
- if (e === "accent") {
377
- const t = Ne.safeParse(n);
378
- return t.success ? t.data : null;
379
- }
380
372
  if (e === "slots") {
381
- const t = Oe.safeParse(n);
373
+ const t = xe.safeParse(n);
382
374
  return t.success ? t.data : [];
383
375
  }
384
- if (e === "thresholdEnabled" || e === "accentEnabled") {
385
- const t = we.safeParse(n);
386
- return t.success ? t.data : !1;
387
- }
388
376
  return n;
389
377
  }
390
- const Le = {
378
+ const Oe = {
391
379
  activePanelId: null,
392
380
  activeTrigger: null,
393
381
  bellCutoutOpen: !1,
@@ -398,7 +386,7 @@ const Le = {
398
386
  lastClose: null,
399
387
  pendingSideEffects: []
400
388
  }, Y = /* @__PURE__ */ new Set(["settings"]);
401
- function Re(e, n) {
389
+ function we(e, n) {
402
390
  if (e == null || e.kind !== n.kind) return !1;
403
391
  switch (e.kind) {
404
392
  case "bell":
@@ -413,7 +401,7 @@ function Re(e, n) {
413
401
  return e.action === n.action && e.blockedCardId === n.blockedCardId && e.activeCardId === n.activeCardId;
414
402
  }
415
403
  }
416
- function ke(e, n) {
404
+ function Te(e, n) {
417
405
  switch (n.type) {
418
406
  case "OPEN_PANEL": {
419
407
  if (e.activePanelId && e.isDirty)
@@ -431,7 +419,7 @@ function ke(e, n) {
431
419
  }
432
420
  ]
433
421
  };
434
- if (e.activePanelId === n.panelId && Re(e.activeTrigger, n.trigger))
422
+ if (e.activePanelId === n.panelId && we(e.activeTrigger, n.trigger))
435
423
  return e;
436
424
  const t = e.activePanelId != null ? [
437
425
  {
@@ -456,12 +444,12 @@ function ke(e, n) {
456
444
  case "CLOSE_PANEL": {
457
445
  if (e.activePanelId == null)
458
446
  return e;
459
- 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 ? [
447
+ 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 ? [
460
448
  {
461
449
  type: "COMMIT_BUFFER",
462
- payload: { cardId: r, delta: s }
450
+ payload: { cardId: r, delta: i }
463
451
  }
464
- ] : [{ type: "COMMIT_BUFFER" }] : [{ type: "DISCARD_BUFFER" }] : [], c = r != null && s != null ? (() => {
452
+ ] : [{ type: "COMMIT_BUFFER" }] : [{ type: "DISCARD_BUFFER" }] : [], c = r != null && i != null ? (() => {
465
453
  const o = { ...e.bufferByCard };
466
454
  return delete o[r], o;
467
455
  })() : e.bufferByCard;
@@ -501,12 +489,12 @@ function ke(e, n) {
501
489
  { type: "INVALID_DISPATCH", reason: "no-buffer-panel" }
502
490
  ]
503
491
  };
504
- const t = e.bufferByCard[n.cardId], r = t == null, s = Te(n.key, n.value);
505
- if (!r && t.changes[n.key] === s)
492
+ const t = e.bufferByCard[n.cardId], r = t == null, i = Ne(n.key, n.value);
493
+ if (!r && t.changes[n.key] === i)
506
494
  return e;
507
495
  const c = { kind: "settings", changes: {
508
496
  ...t?.kind === "settings" ? t.changes : {},
509
- [n.key]: s
497
+ [n.key]: i
510
498
  } }, o = { ...e.bufferByCard, [n.cardId]: c }, p = r ? [
511
499
  {
512
500
  type: "SCHEDULE_TIMER",
@@ -523,8 +511,8 @@ function ke(e, n) {
523
511
  case "CLEAR_BUFFER": {
524
512
  if (e.bufferByCard[n.cardId] == null)
525
513
  return e;
526
- const r = Object.keys(e.bufferByCard).length === 1, s = { ...e.bufferByCard };
527
- delete s[n.cardId];
514
+ const r = Object.keys(e.bufferByCard).length === 1, i = { ...e.bufferByCard };
515
+ delete i[n.cardId];
528
516
  const a = r && e.isDirty ? [
529
517
  {
530
518
  type: "SCHEDULE_TIMER",
@@ -534,7 +522,7 @@ function ke(e, n) {
534
522
  ] : [];
535
523
  return {
536
524
  ...e,
537
- bufferByCard: s,
525
+ bufferByCard: i,
538
526
  pendingSideEffects: [...e.pendingSideEffects, ...a]
539
527
  };
540
528
  }
@@ -575,11 +563,11 @@ function ke(e, n) {
575
563
  return e;
576
564
  }
577
565
  }
578
- function Fe(e) {
566
+ function Le(e) {
579
567
  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";
580
568
  }
581
- function Ae() {
582
- const [e, n] = ce(ke, Le), t = O([]), r = O(null);
569
+ function Re() {
570
+ const [e, n] = ce(Te, Oe), t = O([]), r = O(null);
583
571
  w(() => () => {
584
572
  r.current != null && (window.clearTimeout(r.current), r.current = null);
585
573
  }, []), w(() => {
@@ -612,25 +600,25 @@ function Ae() {
612
600
  c
613
601
  ];
614
602
  }, [e.lastClose]);
615
- const s = $(
616
- () => Fe(e),
603
+ const i = $(
604
+ () => Le(e),
617
605
  [e.activePanelId, e.bellCutoutOpen, e.isDirty]
618
606
  ), a = T(() => t.current.slice(), []);
619
- return { state: e, surfaceState: s, dispatch: n, getCloseLog: a };
607
+ return { state: e, surfaceState: i, dispatch: n, getCloseLog: a };
620
608
  }
621
- function Je({ children: e }) {
622
- const n = Ae(), t = $(
609
+ function We({ children: e }) {
610
+ const n = Re(), t = $(
623
611
  () => n,
624
612
  // Re-publish only when one of the four coordinator fields changes identity.
625
613
  // dispatch + getCloseLog are stable. state + surfaceState change on dispatch.
626
614
  [n.state, n.surfaceState, n.dispatch, n.getCloseLog]
627
615
  );
628
- return /* @__PURE__ */ i(V.Provider, { value: t, children: e });
616
+ return /* @__PURE__ */ s(V.Provider, { value: t, children: e });
629
617
  }
630
- function He({ title: e, onClose: n, titleId: t }) {
618
+ function ke({ title: e, onClose: n, titleId: t }) {
631
619
  return /* @__PURE__ */ N("div", { className: "gloss-panel-chrome-v2__header", children: [
632
- e != null && /* @__PURE__ */ i("span", { id: t, className: "gloss-panel-chrome-v2__title", children: e }),
633
- /* @__PURE__ */ i(
620
+ e != null && /* @__PURE__ */ s("span", { id: t, className: "gloss-panel-chrome-v2__title", children: e }),
621
+ /* @__PURE__ */ s(
634
622
  "button",
635
623
  {
636
624
  id: "panel-close",
@@ -643,8 +631,8 @@ function He({ title: e, onClose: n, titleId: t }) {
643
631
  )
644
632
  ] });
645
633
  }
646
- function Be({ children: e }) {
647
- return /* @__PURE__ */ i(
634
+ function Fe({ children: e }) {
635
+ return /* @__PURE__ */ s(
648
636
  "div",
649
637
  {
650
638
  "data-panel-stage": !0,
@@ -654,24 +642,24 @@ function Be({ children: e }) {
654
642
  }
655
643
  );
656
644
  }
657
- function Ze({ children: e }) {
658
- return /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
645
+ function Ae({ children: e }) {
646
+ return /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__navigation", children: e });
659
647
  }
660
- function Me({ children: e }) {
661
- return /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__body", children: e });
648
+ function He({ children: e }) {
649
+ return /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__body", children: e });
662
650
  }
663
- function Ke({ left: e, right: n }) {
651
+ function Be({ left: e, right: n }) {
664
652
  return /* @__PURE__ */ N("div", { className: "gloss-panel-chrome-v2__footer", children: [
665
- /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
666
- /* @__PURE__ */ i("div", { className: "gloss-panel-chrome-v2__footer-right", children: n })
653
+ /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__footer-left", children: e }),
654
+ /* @__PURE__ */ s("div", { className: "gloss-panel-chrome-v2__footer-right", children: n })
667
655
  ] });
668
656
  }
669
- function Ue({
657
+ function Ze({
670
658
  children: e,
671
659
  onClose: n,
672
660
  title: t,
673
661
  variant: r = "no-stage",
674
- stage: s,
662
+ stage: i,
675
663
  navigation: a,
676
664
  footer: c
677
665
  }) {
@@ -688,12 +676,12 @@ function Ue({
688
676
  "aria-label": u ? void 0 : "Panel",
689
677
  className: `gloss-panel-chrome-v2 gloss-panel-chrome-v2--${r}${o ? " gloss-panel-chrome-v2--headerless" : ""}`,
690
678
  children: [
691
- !o && /* @__PURE__ */ i(He, { title: t, onClose: n, titleId: p }),
692
- r === "with-stage" && /* @__PURE__ */ i(Be, { children: s }),
693
- a != null && /* @__PURE__ */ i(Ze, { children: a }),
694
- /* @__PURE__ */ i(Me, { children: e }),
695
- c != null && /* @__PURE__ */ i(Ke, { left: c.left, right: c.right }),
696
- o && /* @__PURE__ */ i(
679
+ !o && /* @__PURE__ */ s(ke, { title: t, onClose: n, titleId: p }),
680
+ r === "with-stage" && /* @__PURE__ */ s(Fe, { children: i }),
681
+ a != null && /* @__PURE__ */ s(Ae, { children: a }),
682
+ /* @__PURE__ */ s(He, { children: e }),
683
+ c != null && /* @__PURE__ */ s(Be, { left: c.left, right: c.right }),
684
+ o && /* @__PURE__ */ s(
697
685
  "button",
698
686
  {
699
687
  id: "panel-close",
@@ -708,45 +696,45 @@ function Ue({
708
696
  }
709
697
  );
710
698
  }
711
- function en({ isOpen: e }) {
699
+ function Xe({ isOpen: e }) {
712
700
  const n = Pe();
713
- return /* @__PURE__ */ i(
714
- Ue,
701
+ return /* @__PURE__ */ s(
702
+ Ze,
715
703
  {
716
704
  variant: "no-stage",
717
705
  title: "Notifications",
718
706
  onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
719
- children: /* @__PURE__ */ i(
707
+ children: /* @__PURE__ */ s(
720
708
  "div",
721
709
  {
722
710
  "data-shell": "notification-center",
723
711
  "data-panel": "notification-center",
724
712
  "aria-hidden": !e,
725
- children: /* @__PURE__ */ i("p", { children: "No notifications" })
713
+ children: /* @__PURE__ */ s("p", { children: "No notifications" })
726
714
  }
727
715
  )
728
716
  }
729
717
  );
730
718
  }
731
- const $e = {
719
+ const Me = {
732
720
  position: "relative",
733
721
  pointerEvents: "auto"
734
722
  };
735
- function Ve({ children: e, onClose: n, footer: t, title: r, variant: s = "default" }) {
723
+ function Ke({ children: e, onClose: n, footer: t, title: r, variant: i = "default" }) {
736
724
  const a = `panel-close-${X().replace(/:/g, "-")}`;
737
725
  return /* @__PURE__ */ N(
738
726
  "div",
739
727
  {
740
728
  "data-chrome": "panel",
741
- "data-chrome-variant": s,
729
+ "data-chrome-variant": i,
742
730
  role: "dialog",
743
731
  "aria-modal": "true",
744
- className: s === "merged-stage" ? "gloss-panel-chrome gloss-panel-chrome--merged-stage" : "gloss-panel-chrome",
745
- style: $e,
732
+ className: i === "merged-stage" ? "gloss-panel-chrome gloss-panel-chrome--merged-stage" : "gloss-panel-chrome",
733
+ style: Me,
746
734
  children: [
747
735
  /* @__PURE__ */ N("div", { className: "gloss-panel-chrome__header", children: [
748
- r != null && /* @__PURE__ */ i("span", { className: "gloss-panel-chrome__title", children: r }),
749
- /* @__PURE__ */ i(
736
+ r != null && /* @__PURE__ */ s("span", { className: "gloss-panel-chrome__title", children: r }),
737
+ /* @__PURE__ */ s(
750
738
  "button",
751
739
  {
752
740
  id: a,
@@ -758,13 +746,13 @@ function Ve({ children: e, onClose: n, footer: t, title: r, variant: s = "defaul
758
746
  }
759
747
  )
760
748
  ] }),
761
- /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__body", children: e }),
762
- t != null && /* @__PURE__ */ i("div", { className: "gloss-panel-chrome__footer", children: t })
749
+ /* @__PURE__ */ s("div", { className: "gloss-panel-chrome__body", children: e }),
750
+ t != null && /* @__PURE__ */ s("div", { className: "gloss-panel-chrome__footer", children: t })
763
751
  ]
764
752
  }
765
753
  );
766
754
  }
767
- function ze(e) {
755
+ function Ue(e) {
768
756
  if (process.env.NODE_ENV === "production" || !e || !e.parentElement) return;
769
757
  const n = e.parentElement, t = window.getComputedStyle(n);
770
758
  t.perspective === "none" && console.warn(
@@ -775,12 +763,12 @@ function ze(e) {
775
763
  n
776
764
  );
777
765
  }
778
- function je({ isOpen: e, children: n }) {
766
+ function $e({ isOpen: e, children: n }) {
779
767
  const t = ee(), r = O(null);
780
768
  G(() => {
781
- ze(r.current);
769
+ Ue(r.current);
782
770
  }, []);
783
- const [s, a] = H(!1);
771
+ const [i, a] = A(!1);
784
772
  w(() => {
785
773
  if (!e) {
786
774
  a(!1);
@@ -791,10 +779,10 @@ function je({ isOpen: e, children: n }) {
791
779
  }, [e]);
792
780
  const c = [
793
781
  "gloss-panel-mount",
794
- s ? "has-panel" : "",
782
+ i ? "has-panel" : "",
795
783
  t ? "reduced-motion" : ""
796
784
  ].filter(Boolean).join(" ");
797
- return /* @__PURE__ */ i(
785
+ return /* @__PURE__ */ s(
798
786
  "div",
799
787
  {
800
788
  ref: r,
@@ -805,7 +793,7 @@ function je({ isOpen: e, children: n }) {
805
793
  }
806
794
  );
807
795
  }
808
- const qe = {
796
+ const Ve = {
809
797
  position: "fixed",
810
798
  top: 0,
811
799
  left: 0,
@@ -816,7 +804,7 @@ const qe = {
816
804
  overflow: "visible",
817
805
  pointerEvents: "none",
818
806
  zIndex: 55
819
- }, Qe = {
807
+ }, ze = {
820
808
  position: "fixed",
821
809
  top: "var(--tb-h, 60px)",
822
810
  left: 0,
@@ -830,9 +818,9 @@ const qe = {
830
818
  pointerEvents: "none",
831
819
  background: "rgba(0, 0, 0, 0.04)"
832
820
  };
833
- function nn({ panelComponents: e }) {
834
- const { state: n, dispatch: t, getCloseLog: r } = _e(), s = n.activePanelId ? e[n.activePanelId] : null;
835
- n.activePanelId && !s && process.env.NODE_ENV !== "production" && console.error(
821
+ function Ge({ panelComponents: e }) {
822
+ const { state: n, dispatch: t, getCloseLog: r } = be(), i = n.activePanelId ? e[n.activePanelId] : null;
823
+ n.activePanelId && !i && process.env.NODE_ENV !== "production" && console.error(
836
824
  "[panels] No panel component registered for activePanelId:",
837
825
  n.activePanelId
838
826
  ), w(() => {
@@ -858,26 +846,26 @@ function nn({ panelComponents: e }) {
858
846
  o.__panelsHostHandle?.dispatch === t && delete o.__panelsHostHandle;
859
847
  };
860
848
  }, [t, r]);
861
- const c = n.activePanelId != null && s != null;
862
- return /* @__PURE__ */ N("div", { "data-panel-host": "true", style: qe, children: [
863
- c && /* @__PURE__ */ i(
849
+ const c = n.activePanelId != null && i != null;
850
+ return /* @__PURE__ */ N("div", { "data-panel-host": "true", style: Ve, children: [
851
+ c && /* @__PURE__ */ s(
864
852
  "div",
865
853
  {
866
854
  "data-panel-scrim": "true",
867
- style: Qe
855
+ style: ze
868
856
  }
869
857
  ),
870
- /* @__PURE__ */ i(je, { isOpen: c, children: c && /* @__PURE__ */ i(
871
- Ve,
858
+ /* @__PURE__ */ s($e, { isOpen: c, children: c && /* @__PURE__ */ s(
859
+ Ke,
872
860
  {
873
861
  isOpen: !0,
874
862
  onClose: () => t({ type: "CLOSE_PANEL", reason: "header-x" }),
875
- children: /* @__PURE__ */ i(s, { isOpen: !0 })
863
+ children: /* @__PURE__ */ s(i, { isOpen: !0 })
876
864
  }
877
865
  ) })
878
866
  ] });
879
867
  }
880
- const tn = {
868
+ const Je = {
881
869
  "apply-button": !0,
882
870
  // the ONLY commit reason
883
871
  "cancel-button": !1,
@@ -895,25 +883,25 @@ const tn = {
895
883
  // 260524 panel-x-axis-transitions — viewport shrank past targetSection
896
884
  };
897
885
  export {
898
- tn as C,
899
- en as N,
900
- Je as P,
901
- be as S,
886
+ Je as C,
887
+ Xe as N,
888
+ We as P,
889
+ _e as S,
902
890
  ye as a,
903
- _e as b,
904
- nn as c,
905
- Ae as d,
906
- Fe as e,
891
+ be as b,
892
+ Ge as c,
893
+ Re as d,
894
+ Le as e,
907
895
  ge as f,
908
896
  ee as g,
909
- Ue as h,
910
- Le as i,
911
- je as j,
912
- He as k,
913
- Be as l,
914
- Ze as m,
915
- Me as n,
916
- Ke as o,
917
- ke as r,
897
+ Ze as h,
898
+ Oe as i,
899
+ $e as j,
900
+ ke as k,
901
+ Fe as l,
902
+ Ae as m,
903
+ He as n,
904
+ Be as o,
905
+ Te as r,
918
906
  Pe as u
919
907
  };