@danxbot/ui 3.12.0 → 3.12.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.
@@ -59,6 +59,54 @@ export interface ProvenanceDisclosureProps {
59
59
  * edges and does not want a second one.
60
60
  */
61
61
  triggerContent?: ReactNode;
62
+ /**
63
+ * Draw the PANEL HEADER'S VALUE yourself — an editor, most usefully.
64
+ *
65
+ * This replaces the one paragraph that prints the value inside the open
66
+ * panel, and nothing else: the field name above it, the state badge beside
67
+ * it, the confidence meter under it, and every row below the separator are
68
+ * still the component's. It does not touch the trigger — the value on the
69
+ * page is still drawn from `record`, still truncated or wrapped per
70
+ * `valueWrap`, still announced as part of the trigger's own name. The
71
+ * closed page does not change because a consumer supplied this.
72
+ *
73
+ * UNLIKE `triggerContent`, THIS MAY BE INTERACTIVE, and that is the entire
74
+ * reason it exists. `triggerContent` sits inside the disclosure's `<button>`,
75
+ * so a control there would nest a control inside a control — invalid and
76
+ * unfocusable. This sits in the panel body, which Base UI gives
77
+ * `role="dialog"` and full focus management: an `InlineEdit`, a select, a
78
+ * confirm/cancel pair are all legitimate here.
79
+ *
80
+ * WHY A SLOT AND NOT AN `onCorrect` PROP. The same reason `actions` is a
81
+ * slot: this library has no idea who is allowed to correct an extracted
82
+ * value, what the permitted values are, or what writing one costs. What it
83
+ * does know is WHERE the correction belongs — against the value, in the
84
+ * surface someone opened to judge it — and the observed alternative is a
85
+ * consumer putting its editor in `actions`, which reads as "here is the
86
+ * value, and separately, down here, a form about some value".
87
+ *
88
+ * IT OVERRIDES THE ABSENCES TOO — redacted, empty and failed alike — and
89
+ * that is a deliberate choice rather than an oversight. A slot that
90
+ * disappeared whenever the value was missing would vanish in exactly the
91
+ * case a value editor is most wanted: a field that was never extracted is
92
+ * the one somebody actually has to type. It would also make the header's
93
+ * shape depend on a state the consumer did not ask about, so an editor would
94
+ * silently become a read-only word for reasons invisible at the call site.
95
+ * The absence vocabulary is not lost — the struck-through eye, the dash and
96
+ * the triangle still do their whole job on the trigger, which is the surface
97
+ * the density argument was ever about.
98
+ *
99
+ * The redaction gate is unchanged and still worth knowing about: the panel
100
+ * keeps withholding the quote, the reasoning and the sign-off note from a
101
+ * record marked `redacted`. It cannot police a node you built yourself, so
102
+ * a consumer rendering this against a redactable record owns that one
103
+ * decision — `record.redacted` is right there to branch on.
104
+ *
105
+ * Passing `null` or `undefined` falls back to the built-in paragraph, so
106
+ * gating editability is `canEdit ? <Editor … /> : null` rather than two
107
+ * spellings of the whole component.
108
+ */
109
+ valueContent?: ReactNode;
62
110
  /**
63
111
  * Called with `true` when the panel opens and `false` when it closes.
64
112
  *
@@ -79,4 +127,4 @@ export interface ProvenanceDisclosureProps {
79
127
  onOpenChange?: (open: boolean) => void;
80
128
  className?: string;
81
129
  }
82
- export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, triggerBadge, valueWrap, triggerContent, onOpenChange, className, }: ProvenanceDisclosureProps): import("react").JSX.Element;
130
+ export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, triggerBadge, valueWrap, triggerContent, valueContent, onOpenChange, className, }: ProvenanceDisclosureProps): import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",