@danxbot/ui 4.0.0 → 4.1.1

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
@@ -45594,7 +45594,12 @@ function n4({
45594
45594
  }
45595
45595
  const dv = mt({
45596
45596
  slots: {
45597
- root: "flex items-center gap-px",
45597
+ /* `w-fit`, because the pips are a HOVER TARGET as well as a drawing. A
45598
+ flex item stretches to its container by default, so in a column layout
45599
+ the row silently spanned the full width of the panel and the tooltip
45600
+ fired anywhere along that line — pointing at a value's text and being
45601
+ told its certainty. The ticks looked correct the whole time. */
45602
+ root: "flex w-fit items-center gap-px",
45598
45603
  pip: "rounded-[1px]"
45599
45604
  },
45600
45605
  variants: {
@@ -45713,20 +45718,21 @@ function i4({
45713
45718
  actions: t,
45714
45719
  emptyLabel: n = "No value",
45715
45720
  redactedLabel: r = "Redacted",
45716
- valueContent: o,
45717
- titleId: s,
45718
- titleAs: i = "h2",
45719
- className: a
45721
+ ratingLabel: o,
45722
+ valueContent: s,
45723
+ titleId: i,
45724
+ titleAs: a = "h2",
45725
+ className: l
45720
45726
  }) {
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: [
45727
+ 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 });
45728
+ return /* @__PURE__ */ T("div", { className: W("flex flex-col", l), children: [
45723
45729
  /* @__PURE__ */ T("header", { className: "flex flex-col gap-2 p-4 pb-3", children: [
45724
45730
  /* @__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 }),
45731
+ /* @__PURE__ */ f(a, { id: u, className: "text-2xs font-semibold uppercase tracking-widest text-tertiary", children: e.label }),
45726
45732
  /* @__PURE__ */ f(ik, { state: e.state, alwaysShow: !0 })
45727
45733
  ] }),
45728
- o ?? /* @__PURE__ */ f("p", { className: W("text-md text-primary", m && "text-danger-text"), children: g }),
45729
- /* @__PURE__ */ f(o4, { confidence: e.confidence })
45734
+ s ?? /* @__PURE__ */ f("p", { className: W("text-md text-primary", d && "text-danger-text"), children: x }),
45735
+ /* @__PURE__ */ f(o4, { confidence: e.confidence, ratingLabel: o })
45730
45736
  ] }),
45731
45737
  /* @__PURE__ */ f(Mx, {}),
45732
45738
  /* @__PURE__ */ T("div", { className: "flex flex-col gap-4 p-4", children: [
@@ -45747,37 +45753,37 @@ function i4({
45747
45753
  )
45748
45754
  }
45749
45755
  ),
45750
- d && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45756
+ p && /* @__PURE__ */ T(bi, { icon: "file-text", label: "Source", children: [
45751
45757
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45752
- d.label,
45753
- d.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45758
+ p.label,
45759
+ p.locus && /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45754
45760
  " · ",
45755
- d.locus
45761
+ p.locus
45756
45762
  ] })
45757
45763
  ] }),
45758
- d.quote && /* The quote is the evidence, so it is set apart rather than run
45764
+ p.quote && /* The quote is the evidence, so it is set apart rather than run
45759
45765
  into the sentence above it — and it is never truncated: a
45760
45766
  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 })
45767
+ /* @__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
45768
  ] }),
45763
- p && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: p }),
45764
- h && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45769
+ h && /* @__PURE__ */ f(bi, { icon: "brain", label: "Reasoning", children: h }),
45770
+ g && /* @__PURE__ */ T(bi, { icon: "shield-check", label: "Signed", children: [
45765
45771
  /* @__PURE__ */ T("p", { className: "text-primary", children: [
45766
- h.by,
45772
+ g.by,
45767
45773
  " ",
45768
45774
  /* @__PURE__ */ T("span", { className: "text-tertiary", children: [
45769
45775
  "· ",
45770
- h.at
45776
+ g.at
45771
45777
  ] })
45772
45778
  ] }),
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
45779
+ g.note && /* @__PURE__ */ f("p", { className: "mt-1", children: g.note }),
45780
+ g.replaced !== null && /* The original, kept. A correction whose previous value is gone is
45775
45781
  an assertion rather than a record — this line is the difference
45776
45782
  between the two. */
45777
45783
  /* @__PURE__ */ T("p", { className: "mt-2 text-xs text-tertiary", children: [
45778
45784
  "Corrected from",
45779
45785
  " ",
45780
- /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: h.replaced })
45786
+ /* @__PURE__ */ f("span", { className: "line-through decoration-danger-border", children: g.replaced })
45781
45787
  ] })
45782
45788
  ] }),
45783
45789
  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 +45801,7 @@ function i4({
45795
45801
  " ms"
45796
45802
  ] })
45797
45803
  ] }) }),
45798
- !d && !p && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45804
+ !p && !h && !e.call && !e.check && /* Says so, rather than rendering an empty panel that reads as a
45799
45805
  loading state or a bug. */
45800
45806
  /* @__PURE__ */ f("p", { className: "text-sm text-tertiary", children: "Nothing was recorded about where this value came from." })
45801
45807
  ] }),
@@ -45810,14 +45816,15 @@ function EU({
45810
45816
  actions: t,
45811
45817
  emptyLabel: n = "No value",
45812
45818
  redactedLabel: r = "Redacted",
45813
- triggerBadge: o = "word",
45814
- valueWrap: s = !1,
45815
- triggerContent: i,
45816
- valueContent: a,
45817
- onOpenChange: l,
45818
- className: c
45819
+ ratingLabel: o,
45820
+ triggerBadge: s = "word",
45821
+ valueWrap: i = !1,
45822
+ triggerContent: a,
45823
+ valueContent: l,
45824
+ onOpenChange: c,
45825
+ className: u
45819
45826
  }) {
45820
- const u = lk(e, { emptyLabel: n, redactedLabel: r }), m = `provenance-${Ut()}`, d = /* @__PURE__ */ T(
45827
+ const m = lk(e, { emptyLabel: n, redactedLabel: r }), d = `provenance-${Ut()}`, p = /* @__PURE__ */ T(
45821
45828
  "button",
45822
45829
  {
45823
45830
  type: "button",
@@ -45826,21 +45833,21 @@ function EU({
45826
45833
  /* A wrapping value is several lines tall; centring the badge against
45827
45834
  the block would float it beside the middle line. Aligned to the top
45828
45835
  it sits on the first line, where the value starts. */
45829
- s ? "items-start" : "items-center",
45836
+ i ? "items-start" : "items-center",
45830
45837
  /* The dotted rule is the affordance on a bare value. Custom content
45831
45838
  brings its own edges, and a chip inside a second underline reads as
45832
45839
  two controls. */
45833
- !i && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
45840
+ !a && "underline decoration-border-subtle decoration-dotted underline-offset-4 hover:decoration-accent-border",
45834
45841
  "transition-colors duration-(--dur-fast)",
45835
45842
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent-border",
45836
- c
45843
+ u
45837
45844
  ),
45838
45845
  children: [
45839
45846
  /* @__PURE__ */ T("span", { className: "sr-only", children: [
45840
45847
  e.label,
45841
45848
  ":"
45842
45849
  ] }),
45843
- i ?? /* @__PURE__ */ f(
45850
+ a ?? /* @__PURE__ */ f(
45844
45851
  "span",
45845
45852
  {
45846
45853
  className: W(
@@ -45849,16 +45856,16 @@ function EU({
45849
45856
  together, so wrapping is not "drop truncate" — the wrap case
45850
45857
  names both halves explicitly, and `break-words` covers the
45851
45858
  single unbroken token that would otherwise push the column. */
45852
- s ? "whitespace-normal break-words" : "truncate"
45859
+ i ? "whitespace-normal break-words" : "truncate"
45853
45860
  ),
45854
- children: u
45861
+ children: m
45855
45862
  }
45856
45863
  ),
45857
- o !== "none" && /* @__PURE__ */ f(
45864
+ s !== "none" && /* @__PURE__ */ f(
45858
45865
  ik,
45859
45866
  {
45860
45867
  state: e.state,
45861
- appearance: o === "icon" ? "icon" : "word",
45868
+ appearance: s === "icon" ? "icon" : "word",
45862
45869
  className: "shrink-0"
45863
45870
  }
45864
45871
  ),
@@ -45877,13 +45884,13 @@ function EU({
45877
45884
  return /* @__PURE__ */ f(
45878
45885
  tr,
45879
45886
  {
45880
- trigger: d,
45887
+ trigger: p,
45881
45888
  side: "bottom",
45882
45889
  align: "start",
45883
45890
  width: "30rem",
45884
45891
  className: "p-0",
45885
- onOpenChange: l,
45886
- "aria-labelledby": m,
45892
+ onOpenChange: c,
45893
+ "aria-labelledby": d,
45887
45894
  children: /* @__PURE__ */ f(
45888
45895
  i4,
45889
45896
  {
@@ -45891,8 +45898,9 @@ function EU({
45891
45898
  actions: t,
45892
45899
  emptyLabel: n,
45893
45900
  redactedLabel: r,
45894
- valueContent: a,
45895
- titleId: m
45901
+ ratingLabel: o,
45902
+ valueContent: l,
45903
+ titleId: d
45896
45904
  }
45897
45905
  )
45898
45906
  }