@danxbot/ui 4.0.0 → 4.1.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
@@ -45713,20 +45713,21 @@ function i4({
45713
45713
  actions: t,
45714
45714
  emptyLabel: n = "No value",
45715
45715
  redactedLabel: r = "Redacted",
45716
- valueContent: o,
45717
- titleId: s,
45718
- titleAs: i = "h2",
45719
- className: a
45716
+ ratingLabel: o,
45717
+ valueContent: s,
45718
+ titleId: i,
45719
+ titleAs: a = "h2",
45720
+ className: l
45720
45721
  }) {
45721
- const l = `provenance-detail-${Ut()}`, c = s ?? l, u = Ag(e), m = ak(e), d = u && e.source ? { ...e.source, quote: null } : e.source, p = u ? null : e.reasoning, h = u && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, g = lk(e, { emptyLabel: n, redactedLabel: r });
45722
- return /* @__PURE__ */ T("div", { className: W("flex flex-col", a), children: [
45722
+ const c = `provenance-detail-${Ut()}`, u = i ?? c, m = Ag(e), d = ak(e), p = m && e.source ? { ...e.source, quote: null } : e.source, h = m ? null : e.reasoning, g = m && e.signoff ? { ...e.signoff, note: null, replaced: null } : e.signoff, x = lk(e, { emptyLabel: n, redactedLabel: r });
45723
+ return /* @__PURE__ */ T("div", { className: W("flex flex-col", l), children: [
45723
45724
  /* @__PURE__ */ T("header", { className: "flex flex-col gap-2 p-4 pb-3", children: [
45724
45725
  /* @__PURE__ */ T("div", { className: "flex items-start justify-between gap-3", children: [
45725
- /* @__PURE__ */ f(i, { id: c, className: "text-2xs font-semibold uppercase tracking-widest text-tertiary", children: e.label }),
45726
+ /* @__PURE__ */ f(a, { id: u, className: "text-2xs font-semibold uppercase tracking-widest text-tertiary", children: e.label }),
45726
45727
  /* @__PURE__ */ f(ik, { state: e.state, alwaysShow: !0 })
45727
45728
  ] }),
45728
- o ?? /* @__PURE__ */ f("p", { className: W("text-md text-primary", m && "text-danger-text"), children: g }),
45729
- /* @__PURE__ */ f(o4, { confidence: e.confidence })
45729
+ s ?? /* @__PURE__ */ f("p", { className: W("text-md text-primary", d && "text-danger-text"), children: x }),
45730
+ /* @__PURE__ */ f(o4, { confidence: e.confidence, ratingLabel: o })
45730
45731
  ] }),
45731
45732
  /* @__PURE__ */ f(Mx, {}),
45732
45733
  /* @__PURE__ */ T("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -45747,37 +45748,37 @@ function i4({
45747
45748
  )
45748
45749
  }
45749
45750
  ),
45750
- d && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45751
+ p && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45751
45752
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45752
- d.label,
45753
- d.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45753
+ p.label,
45754
+ p.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45754
45755
  " · ",
45755
- d.locus
45756
+ p.locus
45756
45757
  ] })
45757
45758
  ] }),
45758
- d.quote && /* The quote is the evidence, so it is set apart rather than run
45759
+ p.quote && /* The quote is the evidence, so it is set apart rather than run
45759
45760
  into the sentence above it — and it is never truncated: a
45760
45761
  half-shown quotation is a misquotation. */
45761
- /* @__PURE__ */ f("blockquote", { className: "mt-2 border-l-2 border-accent-border bg-surface-sunken py-2 pl-3 text-sm text-secondary", children: d.quote })
45762
+ /* @__PURE__ */ f("blockquote", { className: "mt-2 border-l-2 border-accent-border bg-surface-sunken py-2 pl-3 text-sm text-secondary", children: p.quote })
45762
45763
  ] }),
45763
- p && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: p }),
45764
- h && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45764
+ h && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: h }),
45765
+ g && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45765
45766
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45766
- h.by,
45767
+ g.by,
45767
45768
  " ",
45768
45769
  /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45769
45770
  "· ",
45770
- h.at
45771
+ g.at
45771
45772
  ] })
45772
45773
  ] }),
45773
- h.note && /* @__PURE__ */ f("p", { className: "mt-1", children: h.note }),
45774
- h.replaced !== null && /* The original, kept. A correction whose previous value is gone is
45774
+ g.note && /* @__PURE__ */ f("p", { className: "mt-1", children: g.note }),
45775
+ g.replaced !== null && /* The original, kept. A correction whose previous value is gone is
45775
45776
  an assertion rather than a record — this line is the difference
45776
45777
  between the two. */
45777
45778
  /* @__PURE__ */ T("p", { className: "mt-2 text-xs text-tertiary", children: [
45778
45779
  "Corrected from",
45779
45780
  " ",
45780
- /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: h.replaced })
45781
+ /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: g.replaced })
45781
45782
  ] })
45782
45783
  ] }),
45783
45784
  e.call && /* @__PURE__ */ f(bi, { icon: "cpu", label: "Model call", children: /* @__PURE__ */ T("div", { className: "flex flex-wrap items-center gap-1.5", children: [
@@ -45795,7 +45796,7 @@ function i4({
45795
45796
  " ms"
45796
45797
  ] })
45797
45798
  ] }) }),
45798
- !d && !p && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45799
+ !p && !h && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45799
45800
  loading state or a bug. */
45800
45801
  /* @__PURE__ */ f("p", { className: "text-sm text-tertiary", children: "Nothing was recorded about where this value came from." })
45801
45802
  ] }),
@@ -45810,14 +45811,15 @@ function EU({
45810
45811
  actions: t,
45811
45812
  emptyLabel: n = "No value",
45812
45813
  redactedLabel: r = "Redacted",
45813
- triggerBadge: o = "word",
45814
- valueWrap: s = !1,
45815
- triggerContent: i,
45816
- valueContent: a,
45817
- onOpenChange: l,
45818
- className: c
45814
+ ratingLabel: o,
45815
+ triggerBadge: s = "word",
45816
+ valueWrap: i = !1,
45817
+ triggerContent: a,
45818
+ valueContent: l,
45819
+ onOpenChange: c,
45820
+ className: u
45819
45821
  }) {
45820
- const u = lk(e, { emptyLabel: n, redactedLabel: r }), m = `provenance-${Ut()}`, d = /* @__PURE__ */ T(
45822
+ const m = lk(e, { emptyLabel: n, redactedLabel: r }), d = `provenance-${Ut()}`, p = /* @__PURE__ */ T(
45821
45823
  "button",
45822
45824
  {
45823
45825
  type: "button",
@@ -45826,21 +45828,21 @@ function EU({
45826
45828
  /* A wrapping value is several lines tall; centring the badge against
45827
45829
  the block would float it beside the middle line. Aligned to the top
45828
45830
  it sits on the first line, where the value starts. */
45829
- s ? "items-start" : "items-center",
45831
+ i ? "items-start" : "items-center",
45830
45832
  /* The dotted rule is the affordance on a bare value. Custom content
45831
45833
  brings its own edges, and a chip inside a second underline reads as
45832
45834
  two controls. */
45833
- !i && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
45835
+ !a && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
45834
45836
  "transition-colors duration-(--dur-fast)",
45835
45837
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-border",
45836
- c
45838
+ u
45837
45839
  ),
45838
45840
  children: [
45839
45841
  /* @__PURE__ */ T("span", { className: "sr-only", children: [
45840
45842
  e.label,
45841
45843
  ":"
45842
45844
  ] }),
45843
- i ?? /* @__PURE__ */ f(
45845
+ a ?? /* @__PURE__ */ f(
45844
45846
  "span",
45845
45847
  {
45846
45848
  className: W(
@@ -45849,16 +45851,16 @@ function EU({
45849
45851
  together, so wrapping is not "drop truncate" — the wrap case
45850
45852
  names both halves explicitly, and `break-words` covers the
45851
45853
  single unbroken token that would otherwise push the column. */
45852
- s ? "whitespace-normal break-words" : "truncate"
45854
+ i ? "whitespace-normal break-words" : "truncate"
45853
45855
  ),
45854
- children: u
45856
+ children: m
45855
45857
  }
45856
45858
  ),
45857
- o !== "none" && /* @__PURE__ */ f(
45859
+ s !== "none" && /* @__PURE__ */ f(
45858
45860
  ik,
45859
45861
  {
45860
45862
  state: e.state,
45861
- appearance: o === "icon" ? "icon" : "word",
45863
+ appearance: s === "icon" ? "icon" : "word",
45862
45864
  className: "shrink-0"
45863
45865
  }
45864
45866
  ),
@@ -45877,13 +45879,13 @@ function EU({
45877
45879
  return /* @__PURE__ */ f(
45878
45880
  tr,
45879
45881
  {
45880
- trigger: d,
45882
+ trigger: p,
45881
45883
  side: "bottom",
45882
45884
  align: "start",
45883
45885
  width: "30rem",
45884
45886
  className: "p-0",
45885
- onOpenChange: l,
45886
- "aria-labelledby": m,
45887
+ onOpenChange: c,
45888
+ "aria-labelledby": d,
45887
45889
  children: /* @__PURE__ */ f(
45888
45890
  i4,
45889
45891
  {
@@ -45891,8 +45893,9 @@ function EU({
45891
45893
  actions: t,
45892
45894
  emptyLabel: n,
45893
45895
  redactedLabel: r,
45894
- valueContent: a,
45895
- titleId: m
45896
+ ratingLabel: o,
45897
+ valueContent: l,
45898
+ titleId: d
45896
45899
  }
45897
45900
  )
45898
45901
  }