@danxbot/ui 15.2.0 → 15.4.0

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx as f, jsxs as P, Fragment as lt } from "react/jsx-runtime";
2
2
  import * as y from "react";
3
- import cu, { createElement as ix, useLayoutEffect as jn, useState as he, useRef as ye, useId as At, Component as YM, useCallback as Ne, useEffect as $e, createContext as In, useContext as Mn, useMemo as De, memo as uu, useImperativeHandle as XM, Fragment as fh, Children as ZM, isValidElement as QM, useSyncExternalStore as Vr } from "react";
3
+ import cu, { createElement as ix, useLayoutEffect as jn, useState as he, useRef as ye, useId as Dt, Component as YM, useCallback as Ne, useEffect as $e, createContext as In, useContext as Mn, useMemo as De, memo as uu, useImperativeHandle as XM, Fragment as fh, Children as ZM, isValidElement as QM, useSyncExternalStore as Vr } from "react";
4
4
  import * as kn from "react-dom";
5
5
  import { createPortal as JM } from "react-dom";
6
6
  const eT = {
@@ -13781,7 +13781,7 @@ function ct({
13781
13781
  "aria-disabled": b,
13782
13782
  ...x
13783
13783
  }) {
13784
- const [w, v] = he([]), E = ye(0), C = At(), S = h !== void 0, R = S ? !0 : b, k = i || c || S || R === !0 || R === "true";
13784
+ const [w, v] = he([]), E = ye(0), C = Dt(), S = h !== void 0, R = S ? !0 : b, k = i || c || S || R === !0 || R === "true";
13785
13785
  function N(T) {
13786
13786
  if (S) {
13787
13787
  T.preventDefault();
@@ -13969,7 +13969,7 @@ const p_ = pt({
13969
13969
  danger: "bg-danger",
13970
13970
  info: "bg-info"
13971
13971
  };
13972
- function Dt({
13972
+ function At({
13973
13973
  className: e,
13974
13974
  tone: t = "neutral",
13975
13975
  size: n,
@@ -15866,7 +15866,7 @@ function M8(e) {
15866
15866
  onCommit: n,
15867
15867
  onError: p,
15868
15868
  close: W
15869
- }), { pending: z, refusal: F, blocked: B } = _, O = At(), L = At(), $ = u !== void 0, H = R && !$;
15869
+ }), { pending: z, refusal: F, blocked: B } = _, O = Dt(), L = Dt(), $ = u !== void 0, H = R && !$;
15870
15870
  $e(() => {
15871
15871
  S && R && $ && k(!1);
15872
15872
  }, [S, R, $, k]);
@@ -24304,7 +24304,7 @@ function wz({
24304
24304
  S.current = C;
24305
24305
  const R = ye(p);
24306
24306
  R.current = p;
24307
- const [k, N] = he(e.length === 0), M = At(), I = ye(c), [T, A] = he(null), [D, _] = he(0), [V, z] = he(null), F = ye(t);
24307
+ const [k, N] = he(e.length === 0), M = Dt(), I = ye(c), [T, A] = he(null), [D, _] = he(0), [V, z] = he(null), F = ye(t);
24308
24308
  F.current = t, $e(() => {
24309
24309
  if (!g.current) return;
24310
24310
  const W = new IL({
@@ -24642,7 +24642,7 @@ function Nz({
24642
24642
  }) {
24643
24643
  if (!Number.isInteger(e) || e <= 0)
24644
24644
  throw new Error(`ReadMore: \`lines\` must be a positive integer, got ${e}.`);
24645
- const c = Ez(), u = At(), [p, d] = Us(n, r, o), h = ye(p);
24645
+ const c = Ez(), u = Dt(), [p, d] = Us(n, r, o), h = ye(p);
24646
24646
  h.current = p;
24647
24647
  const m = ye(e);
24648
24648
  m.current = e;
@@ -24796,7 +24796,7 @@ function U8(e) {
24796
24796
  }, [t, r, n]), t && !r ? /* @__PURE__ */ f(Tz, { ...e, session: s, editorRef: o }) : /* @__PURE__ */ f(Mz, { ...e });
24797
24797
  }
24798
24798
  function Mz({ value: e, label: t, placeholder: n = "Empty", collapsedLines: r, readOnly: o, className: s }) {
24799
- const i = At(), a = e.length === 0 ? /* @__PURE__ */ f("p", { className: "text-sm text-tertiary", children: n }) : /* @__PURE__ */ f(NC, { children: e }), l = /* @__PURE__ */ P(
24799
+ const i = Dt(), a = e.length === 0 ? /* @__PURE__ */ f("p", { className: "text-sm text-tertiary", children: n }) : /* @__PURE__ */ f(NC, { children: e }), l = /* @__PURE__ */ P(
24800
24800
  "div",
24801
24801
  {
24802
24802
  role: "group",
@@ -26477,7 +26477,7 @@ function W8(e) {
26477
26477
  effect: i,
26478
26478
  status: a,
26479
26479
  className: l
26480
- } = e, c = ZS(), u = At(), p = At(), d = n != null, h = e.readOnly ? null : typeof e.control == "function" ? e.control({
26480
+ } = e, c = ZS(), u = Dt(), p = Dt(), d = n != null, h = e.readOnly ? null : typeof e.control == "function" ? e.control({
26481
26481
  "aria-labelledby": u,
26482
26482
  "aria-describedby": d ? p : void 0
26483
26483
  }) : e.control;
@@ -26600,7 +26600,7 @@ function Y8({
26600
26600
  titleAs: l,
26601
26601
  className: c
26602
26602
  }) {
26603
- const u = r5[r], p = a !== void 0, d = At(), h = l ?? "h3";
26603
+ const u = r5[r], p = a !== void 0, d = Dt(), h = l ?? "h3";
26604
26604
  function m(x) {
26605
26605
  if (p) {
26606
26606
  x.preventDefault();
@@ -26635,7 +26635,7 @@ function Y8({
26635
26635
  /* @__PURE__ */ f(h, { className: "font-display text-md font-semibold text-primary text-balance", children: t }),
26636
26636
  n && /* @__PURE__ */ f("p", { className: "text-sm text-secondary text-pretty", children: n })
26637
26637
  ] }),
26638
- /* @__PURE__ */ f(Dt, { size: "sm", tone: u.tone, icon: u.icon, children: u.label })
26638
+ /* @__PURE__ */ f(At, { size: "sm", tone: u.tone, icon: u.icon, children: u.label })
26639
26639
  ] }),
26640
26640
  o != null && /* @__PURE__ */ f("p", { className: "text-xs text-tertiary text-pretty", children: o }),
26641
26641
  b && /* @__PURE__ */ f(XS, { children: p ? /* @__PURE__ */ f(Wt, { content: a, children: b }) : b })
@@ -30206,45 +30206,46 @@ function oB(e) {
30206
30206
  const sB = (e) => typeof e == "boolean";
30207
30207
  function iK({
30208
30208
  brand: e,
30209
- sections: t,
30210
- activeId: n,
30211
- sidebarFooter: r,
30212
- header: o,
30213
- contentLandmark: s = "main",
30214
- navLabel: i = "Main",
30215
- scroll: a = "content",
30216
- scrollResetKey: l,
30217
- persistId: c = "app-shell-sidebar",
30218
- children: u,
30219
- className: p
30209
+ brandCollapsed: t,
30210
+ sections: n,
30211
+ activeId: r,
30212
+ sidebarFooter: o,
30213
+ header: s,
30214
+ contentLandmark: i = "main",
30215
+ navLabel: a = "Main",
30216
+ scroll: l = "content",
30217
+ scrollResetKey: c,
30218
+ persistId: u = "app-shell-sidebar",
30219
+ children: p,
30220
+ className: d
30220
30221
  }) {
30221
- const d = s === "main" ? "main" : "div", h = a === "content", [m, g] = Fk(
30222
- c === !1 ? void 0 : c,
30222
+ const h = i === "main" ? "main" : "div", m = l === "content", [g, b] = Fk(
30223
+ u === !1 ? void 0 : u,
30223
30224
  !1,
30224
30225
  { isValid: sB }
30225
- ), b = ye(null);
30226
+ ), x = ye(null);
30226
30227
  $e(() => {
30227
- l !== void 0 && b.current?.scrollTo({ top: 0, behavior: "instant" });
30228
- }, [l]);
30229
- const [x, w] = he(!1), v = /* @__PURE__ */ f(
30228
+ c !== void 0 && x.current?.scrollTo({ top: 0, behavior: "instant" });
30229
+ }, [c]);
30230
+ const [w, v] = he(!1), E = /* @__PURE__ */ f(
30230
30231
  Ry,
30231
30232
  {
30232
- sections: t,
30233
- activeId: n,
30234
- collapsed: m,
30235
- label: i,
30236
- onNavigate: () => w(!1)
30233
+ sections: n,
30234
+ activeId: r,
30235
+ collapsed: g,
30236
+ label: a,
30237
+ onNavigate: () => v(!1)
30237
30238
  }
30238
30239
  );
30239
30240
  return (
30240
30241
  /* THE ONE VIEWPORT UNIT. Everything below it is `flex-1` and `min-h-0`,
30241
30242
  so no descendant — here or in a consumer's screen — ever has a reason to
30242
30243
  name `dvh` or subtract a token from it. */
30243
- /* @__PURE__ */ P("div", { className: U("flex bg-canvas", h ? "h-dvh" : "min-h-dvh", p), children: [
30244
+ /* @__PURE__ */ P("div", { className: U("flex bg-canvas", m ? "h-dvh" : "min-h-dvh", d), children: [
30244
30245
  /* @__PURE__ */ P(
30245
30246
  "aside",
30246
30247
  {
30247
- "data-collapsed": m || void 0,
30248
+ "data-collapsed": g || void 0,
30248
30249
  className: U(
30249
30250
  "group/sidebar hidden shrink-0 flex-col border-r border-border-subtle bg-surface lg:flex",
30250
30251
  /* Bounded: nothing. A flex item in a row of a fixed height is
@@ -30254,36 +30255,37 @@ function iK({
30254
30255
  so the aside has to state the viewport itself and stay put while
30255
30256
  the page scrolls past it — the ONE place a second viewport unit is
30256
30257
  unavoidable, and the reason it lives behind an opt-out. */
30257
- !h && "sticky top-0 h-dvh",
30258
+ !m && "sticky top-0 h-dvh",
30258
30259
  "transition-[var(--tx-colors),width] duration-(--dur-slow) ease-emphasis",
30259
- m ? "w-14" : "w-60"
30260
+ g ? "w-14" : "w-60"
30260
30261
  ),
30261
30262
  children: [
30262
- /* @__PURE__ */ P("div", { className: U("flex h-control-xl shrink-0 items-center gap-2 px-3", m && "justify-center"), children: [
30263
- !m && /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: e }),
30263
+ /* @__PURE__ */ P("div", { className: U("flex h-control-xl shrink-0 items-center gap-2 px-3", g && "justify-center"), children: [
30264
+ !g && /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: e }),
30264
30265
  /* @__PURE__ */ f(
30265
30266
  gt,
30266
30267
  {
30267
- label: m ? "Expand sidebar" : "Collapse sidebar",
30268
+ label: g ? "Expand sidebar" : "Collapse sidebar",
30268
30269
  tooltipSide: "right",
30269
- onClick: () => g((E) => !E),
30270
+ onClick: () => b((C) => !C),
30270
30271
  icon: /* @__PURE__ */ f(
30271
30272
  de,
30272
30273
  {
30273
30274
  name: "panel-left",
30274
30275
  size: "sm",
30275
- className: U("transition-[var(--tx-colors),transform,translate,scale,rotate] duration-(--dur-base)", m && "rotate-180")
30276
+ className: U("transition-[var(--tx-colors),transform,translate,scale,rotate] duration-(--dur-base)", g && "rotate-180")
30276
30277
  }
30277
30278
  )
30278
30279
  }
30279
30280
  )
30280
30281
  ] }),
30281
- /* @__PURE__ */ f("div", { className: "relative min-h-0 flex-1 overflow-y-auto px-2 py-2", children: v }),
30282
- r && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: r })
30282
+ g && t && /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center justify-center px-3 pb-2", children: t }),
30283
+ /* @__PURE__ */ f("div", { className: "relative min-h-0 flex-1 overflow-y-auto px-2 py-2", children: E }),
30284
+ o && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: o })
30283
30285
  ]
30284
30286
  }
30285
30287
  ),
30286
- /* @__PURE__ */ P("div", { className: U("flex min-w-0 flex-1 flex-col", h && "min-h-0"), children: [
30288
+ /* @__PURE__ */ P("div", { className: U("flex min-w-0 flex-1 flex-col", m && "min-h-0"), children: [
30287
30289
  /* @__PURE__ */ P(
30288
30290
  "header",
30289
30291
  {
@@ -30294,10 +30296,10 @@ function iK({
30294
30296
  OUTSIDE the scroller, so there is nothing for it to stick to.
30295
30297
  `sticky top-0` there would be a declaration that reads as intent
30296
30298
  and does nothing. */
30297
- !h && "sticky top-0"
30299
+ !m && "sticky top-0"
30298
30300
  ),
30299
30301
  children: [
30300
- /* @__PURE__ */ P(_m, { open: x, onOpenChange: w, children: [
30302
+ /* @__PURE__ */ P(_m, { open: w, onOpenChange: v, children: [
30301
30303
  /* @__PURE__ */ f(
30302
30304
  Yu,
30303
30305
  {
@@ -30353,34 +30355,34 @@ function iK({
30353
30355
  /* @__PURE__ */ f("div", { className: "relative min-h-0 flex-1 overflow-y-auto px-2 py-2", children: /* @__PURE__ */ f(
30354
30356
  Ry,
30355
30357
  {
30356
- sections: t,
30357
- activeId: n,
30358
+ sections: n,
30359
+ activeId: r,
30358
30360
  collapsed: !1,
30359
- label: i,
30360
- onNavigate: () => w(!1)
30361
+ label: a,
30362
+ onNavigate: () => v(!1)
30361
30363
  }
30362
30364
  ) }),
30363
- r && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: r })
30365
+ o && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: o })
30364
30366
  ]
30365
30367
  }
30366
30368
  )
30367
30369
  ] })
30368
30370
  ] }),
30369
- o
30371
+ s
30370
30372
  ]
30371
30373
  }
30372
30374
  ),
30373
30375
  /* @__PURE__ */ f(
30374
- d,
30376
+ h,
30375
30377
  {
30376
- ref: b,
30378
+ ref: x,
30377
30379
  "data-app-shell-content": "",
30378
- tabIndex: h ? 0 : -1,
30380
+ tabIndex: m ? 0 : -1,
30379
30381
  className: U(
30380
30382
  "flex min-w-0 flex-1 flex-col outline-none",
30381
- h && "relative min-h-0 overflow-y-auto focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent-border"
30383
+ m && "relative min-h-0 overflow-y-auto focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent-border"
30382
30384
  ),
30383
- children: u
30385
+ children: p
30384
30386
  }
30385
30387
  )
30386
30388
  ] })
@@ -30909,7 +30911,7 @@ function hB({
30909
30911
  }) {
30910
30912
  const { arcs: a, used: l, overflow: c } = dB(e, t), u = Vl(l, t), p = t - l, d = e.filter((g) => g.value > 0).map((g) => `${g.label} ${Vl(g.value, t)}%`);
30911
30913
  p > 0 && d.push(`${o} ${Vl(p, t)}%`);
30912
- const h = c > 0 ? `${d.join(", ")} — over the total by ${Vl(c, t)}%` : d.join(", "), m = `dx-ring-${At()}`;
30914
+ const h = c > 0 ? `${d.join(", ")} — over the total by ${Vl(c, t)}%` : d.join(", "), m = `dx-ring-${Dt()}`;
30913
30915
  return /* @__PURE__ */ P(
30914
30916
  "div",
30915
30917
  {
@@ -30965,7 +30967,7 @@ function mB({
30965
30967
  hint: l,
30966
30968
  className: c
30967
30969
  }) {
30968
- const u = At(), p = ye(0), [d, h] = he(!1), [m, g] = he([]);
30970
+ const u = Dt(), p = ye(0), [d, h] = he(!1), [m, g] = he([]);
30969
30971
  function b(x) {
30970
30972
  if (!x) return;
30971
30973
  const w = Array.from(x), v = s ? w.filter((C) => C.size > s) : [], E = s ? w.filter((C) => C.size <= s) : w;
@@ -31521,7 +31523,7 @@ function PB({
31521
31523
  invalidMessage: i = "That isn't a date — type it as MM/DD/YYYY.",
31522
31524
  className: a
31523
31525
  }) {
31524
- const l = At(), [c, u] = he(!1), [p, d] = he(""), [h, m] = he(!1), [g, b] = he(!1), x = c || h ? p : Ai(e), w = (S) => {
31526
+ const l = Dt(), [c, u] = he(!1), [p, d] = he(""), [h, m] = he(!1), [g, b] = he(!1), x = c || h ? p : Ai(e), w = (S) => {
31525
31527
  const R = S.trim();
31526
31528
  if (R === "") {
31527
31529
  m(!1), d(""), e !== null && t(null);
@@ -36939,7 +36941,7 @@ function g4({
36939
36941
  placeholder: i = "Unknown",
36940
36942
  className: a
36941
36943
  }) {
36942
- const l = t.find((u) => u.value === e), c = At();
36944
+ const l = t.find((u) => u.value === e), c = Dt();
36943
36945
  for (const u of t)
36944
36946
  if (u.refusal === "")
36945
36947
  throw new Error(
@@ -36967,7 +36969,7 @@ function g4({
36967
36969
  a
36968
36970
  ),
36969
36971
  children: [
36970
- /* @__PURE__ */ f(Dt, { size: r, tone: l?.tone ?? "neutral", dot: l?.dot, pulse: l?.pulse, icon: l?.icon, children: l?.label ?? i }),
36972
+ /* @__PURE__ */ f(At, { size: r, tone: l?.tone ?? "neutral", dot: l?.dot, pulse: l?.pulse, icon: l?.icon, children: l?.label ?? i }),
36971
36973
  !s && /* @__PURE__ */ f(
36972
36974
  de,
36973
36975
  {
@@ -37002,7 +37004,7 @@ function g4({
37002
37004
  ),
37003
37005
  children: [
37004
37006
  /* @__PURE__ */ P("span", { className: "flex min-w-0 flex-col items-start gap-1", children: [
37005
- /* @__PURE__ */ f(Dt, { size: r, tone: u.tone, dot: u.dot, pulse: u.pulse, icon: u.icon, children: u.label }),
37007
+ /* @__PURE__ */ f(At, { size: r, tone: u.tone, dot: u.dot, pulse: u.pulse, icon: u.icon, children: u.label }),
37006
37008
  d && /* @__PURE__ */ f("span", { id: h, className: "text-2xs leading-snug text-tertiary", children: u.refusal })
37007
37009
  ] }),
37008
37010
  u.value === e && /* @__PURE__ */ f(de, { name: "check", size: "xs", className: "shrink-0 text-success" })
@@ -38463,7 +38465,7 @@ function TK({
38463
38465
  className: u
38464
38466
  }) {
38465
38467
  wd(t, n);
38466
- const p = _4(t, n), d = D4(t, n), h = n === t.length - 1, g = `stepper-blocked-${At()}`, b = l === "vertical";
38468
+ const p = _4(t, n), d = D4(t, n), h = n === t.length - 1, g = `stepper-blocked-${Dt()}`, b = l === "vertical";
38467
38469
  return /* @__PURE__ */ P("div", { className: U("flex min-w-0 flex-col gap-6", u), children: [
38468
38470
  /* @__PURE__ */ P("div", { className: "flex flex-wrap items-center gap-3", children: [
38469
38471
  /* @__PURE__ */ P("p", { className: "text-2xs font-semibold tracking-widest text-tertiary uppercase", children: [
@@ -38475,7 +38477,7 @@ function TK({
38475
38477
  p.skipped > 0 && /* THE DISAGREEMENT, STATED. This is the chip a progress bar would
38476
38478
  have swallowed: the cursor is at step 4 and only two of the three
38477
38479
  behind it are finished. */
38478
- /* @__PURE__ */ P(Dt, { size: "sm", tone: "danger", dot: !0, children: [
38480
+ /* @__PURE__ */ P(At, { size: "sm", tone: "danger", dot: !0, children: [
38479
38481
  p.skipped,
38480
38482
  " skipped"
38481
38483
  ] })
@@ -38624,7 +38626,7 @@ function CN({
38624
38626
  children: t
38625
38627
  }) {
38626
38628
  return /* @__PURE__ */ f(
38627
- Dt,
38629
+ At,
38628
38630
  {
38629
38631
  size: "sm",
38630
38632
  tone: e.tone,
@@ -38670,7 +38672,7 @@ function PK({
38670
38672
  emptyIcon: a,
38671
38673
  className: l
38672
38674
  }) {
38673
- const c = V4(t, n), u = At(), p = (d) => c.find((h) => h.option.value === d).option;
38675
+ const c = V4(t, n), u = Dt(), p = (d) => c.find((h) => h.option.value === d).option;
38674
38676
  return (
38675
38677
  /* GROUP, NOT REGION. `role="region"` is a landmark, and a page carrying
38676
38678
  three of these would offer three landmarks — the `landmark-unique`
@@ -38738,7 +38740,7 @@ function OK({
38738
38740
  // `ordered` reads a ref, so `membership` is what makes this recompute.
38739
38741
  // eslint-disable-next-line react-hooks/exhaustive-deps
38740
38742
  [d, S]
38741
- ), k = R.some((O) => O.id === b) ? b : R[0]?.id ?? null, N = c === "tabs" && R.length >= 2, M = At(), I = Ne((O) => `${M}-tab-${O}`, [M]), T = Ne((O) => `${M}-panel-${O}`, [M]);
38743
+ ), k = R.some((O) => O.id === b) ? b : R[0]?.id ?? null, N = c === "tabs" && R.length >= 2, M = Dt(), I = Ne((O) => `${M}-tab-${O}`, [M]), T = Ne((O) => `${M}-panel-${O}`, [M]);
38742
38744
  jn(() => {
38743
38745
  const O = S();
38744
38746
  if (O.length === 0) return;
@@ -38995,7 +38997,7 @@ function DK({
38995
38997
  className: o,
38996
38998
  ref: s
38997
38999
  }) {
38998
- const i = kN("PanelResizer"), a = ye(null), l = ye(null), c = At(), u = i.direction === "horizontal", d = (a.current ? i.neighbours(a.current) : null)?.[0], h = d ? i.sizes[d.id] : void 0, m = (w) => {
39000
+ const i = kN("PanelResizer"), a = ye(null), l = ye(null), c = Dt(), u = i.direction === "horizontal", d = (a.current ? i.neighbours(a.current) : null)?.[0], h = d ? i.sizes[d.id] : void 0, m = (w) => {
38999
39001
  if (r || w.button !== 0) return;
39000
39002
  const v = a.current;
39001
39003
  v && (v.setPointerCapture(w.pointerId), l.current = {
@@ -42659,7 +42661,7 @@ function Sb({
42659
42661
  children: o,
42660
42662
  ...s
42661
42663
  }) {
42662
- const i = cU(s), a = SU(s.onDragEnd !== void 0), l = At(), c = Ss(), { threshold: u, maxSpeed: p, reducedMaxSpeed: d } = t ?? {}, h = De(
42664
+ const i = cU(s), a = SU(s.onDragEnd !== void 0), l = Dt(), c = Ss(), { threshold: u, maxSpeed: p, reducedMaxSpeed: d } = t ?? {}, h = De(
42663
42665
  () => ({ threshold: u, maxSpeed: p, reducedMaxSpeed: d }),
42664
42666
  [u, p, d]
42665
42667
  );
@@ -43435,7 +43437,7 @@ function zK({
43435
43437
  }
43436
43438
  ) }),
43437
43439
  /* @__PURE__ */ f(
43438
- Dt,
43440
+ At,
43439
43441
  {
43440
43442
  size: "sm",
43441
43443
  tone: V ? "danger" : _ === 0 ? "neutral" : "accent",
@@ -44331,7 +44333,7 @@ function QU({
44331
44333
  align: a = "start",
44332
44334
  className: l
44333
44335
  }) {
44334
- const c = At(), u = e.reduce((x, w) => x + Math.max(0, w.tokens), 0), p = t > 0 ? u / t : 0, d = Math.round(p * 100), h = p >= o ? "danger" : p >= r ? "warning" : "normal", m = `${Fl(u)} / ${Fl(t)} (${d}%)`, g = /* @__PURE__ */ f(
44336
+ const c = Dt(), u = e.reduce((x, w) => x + Math.max(0, w.tokens), 0), p = t > 0 ? u / t : 0, d = Math.round(p * 100), h = p >= o ? "danger" : p >= r ? "warning" : "normal", m = `${Fl(u)} / ${Fl(t)} (${d}%)`, g = /* @__PURE__ */ f(
44335
44337
  "div",
44336
44338
  {
44337
44339
  role: "img",
@@ -45683,7 +45685,7 @@ function nq({
45683
45685
  className: d,
45684
45686
  label: h = "Month"
45685
45687
  }) {
45686
- const m = Ij(), g = At(), b = De(
45688
+ const m = Ij(), g = Dt(), b = De(
45687
45689
  () => RB(e, r),
45688
45690
  [e.year, e.month, e.day, r]
45689
45691
  ), x = De(() => {
@@ -47809,7 +47811,7 @@ function uG(e, t) {
47809
47811
  return /* @__PURE__ */ P("div", { className: "flex items-center gap-2.5", children: [
47810
47812
  /* @__PURE__ */ f("span", { className: "grid size-8 shrink-0 place-items-center rounded-full bg-surface-inset text-tertiary", children: /* @__PURE__ */ f(de, { name: "monitor", size: "sm" }) }),
47811
47813
  /* @__PURE__ */ f(Sd, { primary: r.name, secondary: o || void 0 }),
47812
- r.current && /* @__PURE__ */ f(Dt, { tone: "accent", size: "sm", dot: !0, children: "Current" })
47814
+ r.current && /* @__PURE__ */ f(At, { tone: "accent", size: "sm", dot: !0, children: "Current" })
47813
47815
  ] });
47814
47816
  }
47815
47817
  },
@@ -48121,7 +48123,17 @@ function gG(e, t, n, r) {
48121
48123
  id: "status",
48122
48124
  header: "Status",
48123
48125
  accessorFn: (o) => o.status,
48124
- cell: ({ row: o }) => /* @__PURE__ */ f(Dt, { tone: pG[o.original.status], dot: !0, children: hG[o.original.status] })
48126
+ // card AC #6 — a failed/suppressed send, or a later bounce/complaint
48127
+ // notification, is shown on the invitation itself (not just a
48128
+ // one-time toast at create/resend time) so an operator revisiting the
48129
+ // list later still sees it and knows to Resend.
48130
+ cell: ({ row: o }) => {
48131
+ const { lastEmailStatus: s, lastEmailBounced: i, lastEmailComplained: a } = o.original, l = a ? "Complaint" : i ? "Bounced" : s === "failed" || s === "suppressed" ? "Delivery failed" : null;
48132
+ return /* @__PURE__ */ P("div", { className: "flex flex-wrap items-center gap-1", children: [
48133
+ /* @__PURE__ */ f(At, { tone: pG[o.original.status], dot: !0, children: hG[o.original.status] }),
48134
+ l && /* @__PURE__ */ f(At, { tone: "danger", children: l })
48135
+ ] });
48136
+ }
48125
48137
  },
48126
48138
  {
48127
48139
  id: "sent",
@@ -48219,7 +48231,7 @@ function vq({
48219
48231
  o && /* @__PURE__ */ f(Ar, { tone: "danger", title: o }),
48220
48232
  /* @__PURE__ */ f(_t, { label: "Email addresses", error: h, description: "Press Enter or comma after each one.", children: /* @__PURE__ */ P("div", { className: "flex flex-wrap items-center gap-1.5 rounded-md border border-field-border bg-field p-1.5 focus-within:border-accent focus-within:shadow-[0_0_0_3px_var(--focus-halo)]", children: [
48221
48233
  a.map((C) => /* @__PURE__ */ f(
48222
- Dt,
48234
+ At,
48223
48235
  {
48224
48236
  tone: "accent",
48225
48237
  dismiss: {
@@ -48412,7 +48424,7 @@ function wG({
48412
48424
  children: [
48413
48425
  /* @__PURE__ */ P("header", { className: "flex flex-wrap items-start justify-between gap-2", children: [
48414
48426
  /* @__PURE__ */ P("div", { className: "flex min-w-0 items-center gap-2", children: [
48415
- /* @__PURE__ */ f(Dt, { size: "sm", tone: "neutral", className: "font-mono", children: e.ref }),
48427
+ /* @__PURE__ */ f(At, { size: "sm", tone: "neutral", className: "font-mono", children: e.ref }),
48416
48428
  /* @__PURE__ */ f("h5", { className: "min-w-0 truncate text-sm font-semibold text-primary", children: e.title })
48417
48429
  ] }),
48418
48430
  /* @__PURE__ */ P("div", { className: "flex shrink-0 flex-wrap items-center gap-1.5", children: [
@@ -48425,7 +48437,7 @@ function wG({
48425
48437
  options: yG,
48426
48438
  onValueChange: n
48427
48439
  }
48428
- ) : /* @__PURE__ */ f(Dt, { size: "sm", tone: s.tone, icon: s.icon, dot: s.live, pulse: s.live, children: s.label }),
48440
+ ) : /* @__PURE__ */ f(At, { size: "sm", tone: s.tone, icon: s.icon, dot: s.live, pulse: s.live, children: s.label }),
48429
48441
  t.map((i) => {
48430
48442
  const a = e.built[i.id] === !0, l = `${i.name}${a ? " built" : " not built"}`, c = /* @__PURE__ */ P(lt, { children: [
48431
48443
  /* @__PURE__ */ f(de, { name: a ? "circle-check" : "circle-dashed", size: "xs" }),
@@ -48440,13 +48452,13 @@ function wG({
48440
48452
  "aria-label": l,
48441
48453
  onClick: () => r(i.id, !a),
48442
48454
  className: "dx-tap rounded-full",
48443
- children: /* @__PURE__ */ f(Dt, { size: "sm", tone: a ? "success" : "neutral", className: "gap-1", children: /* @__PURE__ */ P("span", { "aria-hidden": "true", className: "flex items-center gap-1", children: [
48455
+ children: /* @__PURE__ */ f(At, { size: "sm", tone: a ? "success" : "neutral", className: "gap-1", children: /* @__PURE__ */ P("span", { "aria-hidden": "true", className: "flex items-center gap-1", children: [
48444
48456
  /* @__PURE__ */ f(de, { name: a ? "circle-check" : "circle-dashed", size: "xs" }),
48445
48457
  i.name
48446
48458
  ] }) })
48447
48459
  },
48448
48460
  i.id
48449
- ) : /* @__PURE__ */ f(Dt, { size: "sm", tone: a ? "success" : "neutral", className: "gap-1", children: c }, i.id);
48461
+ ) : /* @__PURE__ */ f(At, { size: "sm", tone: a ? "success" : "neutral", className: "gap-1", children: c }, i.id);
48450
48462
  })
48451
48463
  ] })
48452
48464
  ] }),
@@ -48475,18 +48487,18 @@ function NI({
48475
48487
  defaultExpanded: c = !1,
48476
48488
  className: u
48477
48489
  }) {
48478
- const [p, d] = he(c), h = RI[Pb(s, Ob(i))], m = At();
48490
+ const [p, d] = he(c), h = RI[Pb(s, Ob(i))], m = Dt();
48479
48491
  return /* @__PURE__ */ P(ud, { variant: "raised", padding: "md", className: U("gap-3", u), children: [
48480
48492
  /* @__PURE__ */ P("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [
48481
48493
  /* @__PURE__ */ P("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [
48482
- /* @__PURE__ */ f(Dt, { size: "sm", tone: "neutral", className: "font-mono", children: e.ref }),
48494
+ /* @__PURE__ */ f(At, { size: "sm", tone: "neutral", className: "font-mono", children: e.ref }),
48483
48495
  /* @__PURE__ */ f("h4", { className: "min-w-0 truncate font-display text-md font-semibold text-primary", children: e.title })
48484
48496
  ] }),
48485
- /* @__PURE__ */ f(Dt, { size: "sm", tone: h.tone, dot: h.live, pulse: h.live, children: h.label })
48497
+ /* @__PURE__ */ f(At, { size: "sm", tone: h.tone, dot: h.live, pulse: h.live, children: h.label })
48486
48498
  ] }),
48487
48499
  /* @__PURE__ */ P("div", { className: "flex flex-wrap items-center gap-2", children: [
48488
- /* @__PURE__ */ f(Dt, { size: "sm", tone: ww(n), children: t.name }),
48489
- /* @__PURE__ */ f(Dt, { size: "sm", tone: ww(o), children: r.name })
48500
+ /* @__PURE__ */ f(At, { size: "sm", tone: ww(n), children: t.name }),
48501
+ /* @__PURE__ */ f(At, { size: "sm", tone: ww(o), children: r.name })
48490
48502
  ] }),
48491
48503
  e.summary && /* @__PURE__ */ f("p", { className: "text-sm text-secondary text-pretty", children: e.summary }),
48492
48504
  s.length > 0 && /* @__PURE__ */ P(lt, { children: [
@@ -48600,7 +48612,7 @@ function kG({
48600
48612
  children: [
48601
48613
  /* @__PURE__ */ P("div", { className: "flex items-center justify-between gap-2", children: [
48602
48614
  /* @__PURE__ */ f("span", { className: "text-2xs font-semibold uppercase tracking-widest text-tertiary", children: h.label }),
48603
- /* @__PURE__ */ f(Dt, { size: "sm", tone: g, children: m.length })
48615
+ /* @__PURE__ */ f(At, { size: "sm", tone: g, children: m.length })
48604
48616
  ] }),
48605
48617
  /* @__PURE__ */ f("div", { className: "flex flex-col gap-3", children: m.length === 0 ? /* @__PURE__ */ f("p", { className: "text-xs text-tertiary", children: "Nothing here yet." }) : m.map((b) => {
48606
48618
  const { phase: x, index: w } = SG(t, b.phaseId);
@@ -48865,7 +48877,7 @@ function Sq({
48865
48877
  function l(c) {
48866
48878
  const u = a.get(c.id) ?? 0, p = u > 0;
48867
48879
  return {
48868
- badge: p && /* @__PURE__ */ P(Dt, { size: "sm", tone: "warning", className: "shrink-0", children: [
48880
+ badge: p && /* @__PURE__ */ P(At, { size: "sm", tone: "warning", className: "shrink-0", children: [
48869
48881
  "In use by ",
48870
48882
  u,
48871
48883
  " item",
@@ -48911,7 +48923,7 @@ function kq({
48911
48923
  delete guard applies, so a disabled button never stands alone
48912
48924
  without one — unlike `PhaseManager`'s badge, this one is ALWAYS
48913
48925
  shown, not just while blocked. */
48914
- badge: /* @__PURE__ */ P(Dt, { size: "sm", tone: p ? "success" : "neutral", className: "shrink-0 tabular", children: [
48926
+ badge: /* @__PURE__ */ P(At, { size: "sm", tone: p ? "success" : "neutral", className: "shrink-0 tabular", children: [
48915
48927
  c,
48916
48928
  " / ",
48917
48929
  u,
@@ -49097,7 +49109,7 @@ function TI({
49097
49109
  }) {
49098
49110
  const s = MI[e], i = n === "icon";
49099
49111
  return s.quiet && !t && !i ? null : /* @__PURE__ */ f(
49100
- Dt,
49112
+ At,
49101
49113
  {
49102
49114
  tone: s.tone,
49103
49115
  size: r,
@@ -49158,7 +49170,7 @@ function $G({
49158
49170
  titleAs: l = "h2",
49159
49171
  className: c
49160
49172
  }) {
49161
- const u = `provenance-detail-${At()}`, p = a ?? u, d = Ab(e), h = PI(e), m = d && e.source ? { ...e.source, quote: null } : e.source, g = d ? null : e.reasoning, b = d && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, x = OI(e, { emptyLabel: n, redactedLabel: r });
49173
+ const u = `provenance-detail-${Dt()}`, p = a ?? u, d = Ab(e), h = PI(e), m = d && e.source ? { ...e.source, quote: null } : e.source, g = d ? null : e.reasoning, b = d && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, x = OI(e, { emptyLabel: n, redactedLabel: r });
49162
49174
  return /* @__PURE__ */ P("div", { className: U("flex flex-col", c), children: [
49163
49175
  /* @__PURE__ */ P("header", { className: "flex flex-col gap-2 p-4 pb-3", children: [
49164
49176
  /* @__PURE__ */ P("div", { className: "flex items-start justify-between gap-3", children: [
@@ -49221,16 +49233,16 @@ function $G({
49221
49233
  ] })
49222
49234
  ] }),
49223
49235
  e.call && /* @__PURE__ */ f(zi, { icon: "cpu", label: "Model call", children: /* @__PURE__ */ P("div", { className: "flex flex-wrap items-center gap-1.5", children: [
49224
- /* @__PURE__ */ f(Dt, { size: "sm", tone: "neutral", className: "font-mono", children: e.call.model }),
49225
- /* @__PURE__ */ P(Dt, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49236
+ /* @__PURE__ */ f(At, { size: "sm", tone: "neutral", className: "font-mono", children: e.call.model }),
49237
+ /* @__PURE__ */ P(At, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49226
49238
  e.call.tokensIn.toLocaleString(),
49227
49239
  " in"
49228
49240
  ] }),
49229
- /* @__PURE__ */ P(Dt, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49241
+ /* @__PURE__ */ P(At, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49230
49242
  e.call.tokensOut.toLocaleString(),
49231
49243
  " out"
49232
49244
  ] }),
49233
- /* @__PURE__ */ P(Dt, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49245
+ /* @__PURE__ */ P(At, { size: "sm", tone: "neutral", className: "tabular font-mono", children: [
49234
49246
  e.call.latencyMs.toLocaleString(),
49235
49247
  " ms"
49236
49248
  ] })
@@ -49260,7 +49272,7 @@ function Tq({
49260
49272
  className: p,
49261
49273
  width: d = "30rem"
49262
49274
  }) {
49263
- const h = OI(e, { emptyLabel: n, redactedLabel: r }), m = `provenance-${At()}`, g = /* @__PURE__ */ P(
49275
+ const h = OI(e, { emptyLabel: n, redactedLabel: r }), m = `provenance-${Dt()}`, g = /* @__PURE__ */ P(
49264
49276
  "button",
49265
49277
  {
49266
49278
  type: "button",
@@ -51685,7 +51697,7 @@ function Oq({
51685
51697
  disabled: g,
51686
51698
  className: b
51687
51699
  }) {
51688
- const x = At(), [w, v] = he(p), E = u !== void 0 ? u : w, C = Ne(
51700
+ const x = Dt(), [w, v] = he(p), E = u !== void 0 ? u : w, C = Ne(
51689
51701
  (Q) => {
51690
51702
  u === void 0 && v(Q), d?.(Q);
51691
51703
  },
@@ -52375,7 +52387,7 @@ function Yw({
52375
52387
  showToolbar: g,
52376
52388
  className: b
52377
52389
  }) {
52378
- const x = At(), [w, v] = he(null), [E, C] = he({}), S = ye(/* @__PURE__ */ new Map()), R = ye(/* @__PURE__ */ new Map()), k = Ne((q) => {
52390
+ const x = Dt(), [w, v] = he(null), [E, C] = he({}), S = ye(/* @__PURE__ */ new Map()), R = ye(/* @__PURE__ */ new Map()), k = Ne((q) => {
52379
52391
  let J = R.current.get(q);
52380
52392
  return J || (J = (se) => {
52381
52393
  const ue = S.current.get(q);
@@ -52892,7 +52904,7 @@ function Aq({
52892
52904
  label: l,
52893
52905
  className: c
52894
52906
  }) {
52895
- const u = At(), p = De(() => QW(t.map((I) => I.id)), [t]), d = yd("sm"), h = De(() => {
52907
+ const u = Dt(), p = De(() => QW(t.map((I) => I.id)), [t]), d = yd("sm"), h = De(() => {
52896
52908
  const I = [];
52897
52909
  return n && I.push({ node: n, role: "parent", leftPct: Zw.leftPct, topPct: Zw.topPct, index: null, tier: null }), I.push({ node: e, role: "center", leftPct: qo.leftPct, topPct: qo.topPct, index: null, tier: null }), t.forEach((T, A) => {
52898
52910
  const D = p[A];
@@ -54669,7 +54681,7 @@ export {
54669
54681
  yq as AuthLayout,
54670
54682
  No as Avatar,
54671
54683
  _K as AvatarGroup,
54672
- Dt as Badge,
54684
+ At as Badge,
54673
54685
  BK as Board,
54674
54686
  jK as BoardCard,
54675
54687
  HK as BoardCardSurface,