@danxbot/ui 3.10.1 → 3.11.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
@@ -13693,34 +13693,42 @@ function tr({
13693
13693
  children: s,
13694
13694
  ref: i,
13695
13695
  defaultOpen: a,
13696
- "aria-labelledby": l,
13697
- "aria-label": c
13696
+ onOpenChange: l,
13697
+ "aria-labelledby": c,
13698
+ "aria-label": u
13698
13699
  }) {
13699
- return /* @__PURE__ */ T(g2, { defaultOpen: a, children: [
13700
- /* @__PURE__ */ f(s0, { render: e }),
13701
- /* @__PURE__ */ f(i0, { children: /* @__PURE__ */ f(
13702
- d0,
13703
- {
13704
- side: t,
13705
- align: n,
13706
- sideOffset: 8,
13707
- className: "z-(--z-popover) outline-none",
13708
- children: /* @__PURE__ */ T(
13709
- h0,
13700
+ return /* @__PURE__ */ T(
13701
+ g2,
13702
+ {
13703
+ defaultOpen: a,
13704
+ onOpenChange: l && ((m) => l(m)),
13705
+ children: [
13706
+ /* @__PURE__ */ f(s0, { render: e }),
13707
+ /* @__PURE__ */ f(i0, { children: /* @__PURE__ */ f(
13708
+ d0,
13710
13709
  {
13711
- ref: i,
13712
- "aria-labelledby": l,
13713
- "aria-label": c,
13714
- className: W(tO, "max-w-[calc(20rem*var(--ui-scale))] p-4", o),
13715
- children: [
13716
- r && /* @__PURE__ */ f(g0, { className: W(N0), children: /* @__PURE__ */ f("span", { className: W(I0) }) }),
13717
- s
13718
- ]
13710
+ side: t,
13711
+ align: n,
13712
+ sideOffset: 8,
13713
+ className: "z-(--z-popover) outline-none",
13714
+ children: /* @__PURE__ */ T(
13715
+ h0,
13716
+ {
13717
+ ref: i,
13718
+ "aria-labelledby": c,
13719
+ "aria-label": u,
13720
+ className: W(tO, "max-w-[calc(20rem*var(--ui-scale))] p-4", o),
13721
+ children: [
13722
+ r && /* @__PURE__ */ f(g0, { className: W(N0), children: /* @__PURE__ */ f("span", { className: W(I0) }) }),
13723
+ s
13724
+ ]
13725
+ }
13726
+ )
13719
13727
  }
13720
- )
13721
- }
13722
- ) })
13723
- ] });
13728
+ ) })
13729
+ ]
13730
+ }
13731
+ );
13724
13732
  }
13725
13733
  function vi({ children: e }) {
13726
13734
  return /* @__PURE__ */ f(b0, { render: e });
@@ -45572,14 +45580,15 @@ function cU({
45572
45580
  triggerBadge: o = "word",
45573
45581
  valueWrap: s = !1,
45574
45582
  triggerContent: i,
45575
- className: a
45583
+ onOpenChange: a,
45584
+ className: l
45576
45585
  }) {
45577
- const l = e.redacted === !0, c = !l && e.state === "failed", u = l && e.source ? { ...e.source, quote: null } : e.source, m = l ? null : e.reasoning, d = l && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, p = l ? /* @__PURE__ */ f(Zd, { kind: "redacted", children: r }) : c ? /* @__PURE__ */ f(Zd, { kind: "failed", children: "Held null — check failed" }) : e.value === null ? (
45586
+ const c = e.redacted === !0, u = !c && e.state === "failed", m = c && e.source ? { ...e.source, quote: null } : e.source, d = c ? null : e.reasoning, p = c && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, h = c ? /* @__PURE__ */ f(Zd, { kind: "redacted", children: r }) : u ? /* @__PURE__ */ f(Zd, { kind: "failed", children: "Held null — check failed" }) : e.value === null ? (
45578
45587
  /* Only null. An extracted empty string IS a value — coercing it to "No
45579
45588
  value" is the component collapsing an absence it was built to keep
45580
45589
  apart, one level down. */
45581
45590
  /* @__PURE__ */ f(Zd, { kind: "empty", children: n })
45582
- ) : e.value, h = `provenance-${Gt()}`, g = /* @__PURE__ */ T(
45591
+ ) : e.value, g = `provenance-${Gt()}`, x = /* @__PURE__ */ T(
45583
45592
  "button",
45584
45593
  {
45585
45594
  type: "button",
@@ -45595,7 +45604,7 @@ function cU({
45595
45604
  !i && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
45596
45605
  "transition-colors duration-(--dur-fast)",
45597
45606
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-border",
45598
- a
45607
+ l
45599
45608
  ),
45600
45609
  children: [
45601
45610
  /* @__PURE__ */ T("span", { className: "sr-only", children: [
@@ -45613,7 +45622,7 @@ function cU({
45613
45622
  single unbroken token that would otherwise push the column. */
45614
45623
  s ? "whitespace-normal break-words" : "truncate"
45615
45624
  ),
45616
- children: p
45625
+ children: h
45617
45626
  }
45618
45627
  ),
45619
45628
  o !== "none" && /* @__PURE__ */ f(
@@ -45639,25 +45648,26 @@ function cU({
45639
45648
  return /* @__PURE__ */ f(
45640
45649
  tr,
45641
45650
  {
45642
- trigger: g,
45651
+ trigger: x,
45643
45652
  side: "bottom",
45644
45653
  align: "start",
45645
45654
  className: "w-96 max-w-[92vw] p-0",
45646
- "aria-labelledby": h,
45655
+ onOpenChange: a,
45656
+ "aria-labelledby": g,
45647
45657
  children: /* @__PURE__ */ T("div", { className: "flex max-h-[70vh] flex-col overflow-y-auto", children: [
45648
45658
  /* @__PURE__ */ T("header", { className: "flex flex-col gap-2 p-4 pb-3", children: [
45649
45659
  /* @__PURE__ */ T("div", { className: "flex items-start justify-between gap-3", children: [
45650
45660
  /* @__PURE__ */ f(
45651
45661
  "h2",
45652
45662
  {
45653
- id: h,
45663
+ id: g,
45654
45664
  className: "text-2xs font-semibold uppercase tracking-widest text-tertiary",
45655
45665
  children: e.label
45656
45666
  }
45657
45667
  ),
45658
45668
  /* @__PURE__ */ f(uv, { state: e.state, alwaysShow: !0 })
45659
45669
  ] }),
45660
- /* @__PURE__ */ f("p", { className: W("text-md text-primary", c && "text-danger-text"), children: p }),
45670
+ /* @__PURE__ */ f("p", { className: W("text-md text-primary", u && "text-danger-text"), children: h }),
45661
45671
  /* @__PURE__ */ f(jB, { confidence: e.confidence })
45662
45672
  ] }),
45663
45673
  /* @__PURE__ */ f(Ix, {}),
@@ -45679,37 +45689,37 @@ function cU({
45679
45689
  )
45680
45690
  }
45681
45691
  ),
45682
- u && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45692
+ m && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45683
45693
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45684
- u.label,
45685
- u.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45694
+ m.label,
45695
+ m.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45686
45696
  " · ",
45687
- u.locus
45697
+ m.locus
45688
45698
  ] })
45689
45699
  ] }),
45690
- u.quote && /* The quote is the evidence, so it is set apart rather than run
45700
+ m.quote && /* The quote is the evidence, so it is set apart rather than run
45691
45701
  into the sentence above it — and it is never truncated: a
45692
45702
  half-shown quotation is a misquotation. */
45693
- /* @__PURE__ */ f("blockquote", { className: "mt-2 border-l-2 border-accent-border bg-surface-sunken py-2 pl-3 text-sm text-secondary", children: u.quote })
45703
+ /* @__PURE__ */ f("blockquote", { className: "mt-2 border-l-2 border-accent-border bg-surface-sunken py-2 pl-3 text-sm text-secondary", children: m.quote })
45694
45704
  ] }),
45695
- m && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: m }),
45696
- d && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45705
+ d && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: d }),
45706
+ p && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45697
45707
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45698
- d.by,
45708
+ p.by,
45699
45709
  " ",
45700
45710
  /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45701
45711
  "· ",
45702
- d.at
45712
+ p.at
45703
45713
  ] })
45704
45714
  ] }),
45705
- d.note && /* @__PURE__ */ f("p", { className: "mt-1", children: d.note }),
45706
- d.replaced !== null && /* The original, kept. A correction whose previous value is gone
45715
+ p.note && /* @__PURE__ */ f("p", { className: "mt-1", children: p.note }),
45716
+ p.replaced !== null && /* The original, kept. A correction whose previous value is gone
45707
45717
  is an assertion rather than a record — this line is the
45708
45718
  difference between the two. */
45709
45719
  /* @__PURE__ */ T("p", { className: "mt-2 text-xs text-tertiary", children: [
45710
45720
  "Corrected from",
45711
45721
  " ",
45712
- /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: d.replaced })
45722
+ /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: p.replaced })
45713
45723
  ] })
45714
45724
  ] }),
45715
45725
  e.call && /* @__PURE__ */ f(bi, { icon: "cpu", label: "Model call", children: /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center gap-1.5", children: [
@@ -45727,7 +45737,7 @@ function cU({
45727
45737
  " ms"
45728
45738
  ] })
45729
45739
  ] }) }),
45730
- !u && !m && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45740
+ !m && !d && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45731
45741
  loading state or a bug. */
45732
45742
  /* @__PURE__ */ f("p", { className: "text-sm text-tertiary", children: "Nothing was recorded about where this value came from." })
45733
45743
  ] }),