@tangle-network/sandbox-ui 0.104.1 → 0.105.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.
Files changed (2) hide show
  1. package/dist/chat.d.ts +53 -48
  2. package/package.json +1 -1
package/dist/chat.d.ts CHANGED
@@ -60,10 +60,9 @@ declare function ReasoningLevelPicker({ value, onChange, disabled, className, tr
60
60
  /**
61
61
  * Limits applied when staging files onto a composer.
62
62
  *
63
- * @deprecated Composer-only helper of the legacy AgentComposer. Use
64
- * ChatComposer from `@tangle-network/agent-app/web-react` — the canonical
65
- * composer. AgentComposer is frozen and will be removed at sandbox-ui's next
66
- * breaking release.
63
+ * Serves {@link AgentComposer}'s attachment lifecycle. `ChatComposer` in
64
+ * `@tangle-network/agent-app/web-react` stages files without a validation or
65
+ * retry step, so it has no equivalent.
67
66
  */
68
67
  interface ComposerFileValidationConfig {
69
68
  /** Reject any single file larger than this. */
@@ -81,10 +80,9 @@ interface ComposerFileValidationConfig {
81
80
  }
82
81
  /** A file that failed validation, paired with a human-readable reason.
83
82
  *
84
- * @deprecated Composer-only helper of the legacy AgentComposer. Use
85
- * ChatComposer from `@tangle-network/agent-app/web-react` — the canonical
86
- * composer. AgentComposer is frozen and will be removed at sandbox-ui's next
87
- * breaking release. */
83
+ * Serves {@link AgentComposer}'s attachment lifecycle. `ChatComposer` in
84
+ * `@tangle-network/agent-app/web-react` stages files without a validation or
85
+ * retry step, so it has no equivalent. */
88
86
  interface ComposerFileRejection {
89
87
  file: File;
90
88
  reason: string;
@@ -94,10 +92,9 @@ interface ComposerFileRejection {
94
92
  * grammar as the native `<input accept>` attribute. An undefined or empty
95
93
  * `accept` accepts everything.
96
94
  *
97
- * @deprecated Composer-only helper of the legacy AgentComposer. Use
98
- * ChatComposer from `@tangle-network/agent-app/web-react` — the canonical
99
- * composer. AgentComposer is frozen and will be removed at sandbox-ui's next
100
- * breaking release.
95
+ * Serves {@link AgentComposer}'s attachment lifecycle. `ChatComposer` in
96
+ * `@tangle-network/agent-app/web-react` stages files without a validation or
97
+ * retry step, so it has no equivalent.
101
98
  */
102
99
  declare function isAcceptedType(file: File, accept?: string): boolean;
103
100
  /**
@@ -107,10 +104,9 @@ declare function isAcceptedType(file: File, accept?: string): boolean;
107
104
  * file and the limit it broke. Pure data in, pure data out — no throwing,
108
105
  * no console noise, so callers decide how to surface rejections.
109
106
  *
110
- * @deprecated Composer-only helper of the legacy AgentComposer. Use
111
- * ChatComposer from `@tangle-network/agent-app/web-react` — the canonical
112
- * composer. AgentComposer is frozen and will be removed at sandbox-ui's next
113
- * breaking release.
107
+ * Serves {@link AgentComposer}'s attachment lifecycle. `ChatComposer` in
108
+ * `@tangle-network/agent-app/web-react` stages files without a validation or
109
+ * retry step, so it has no equivalent.
114
110
  */
115
111
  declare function validateComposerFiles(files: File[] | FileList, config: ComposerFileValidationConfig): {
116
112
  accepted: File[];
@@ -120,9 +116,9 @@ declare function validateComposerFiles(files: File[] | FileList, config: Compose
120
116
  /** A selectable item in the `@`-mention popover. Generic — file semantics live
121
117
  * in the consuming app, not here.
122
118
  *
123
- * @deprecated Part of the legacy AgentComposer API. Use ChatComposer from
124
- * `@tangle-network/agent-app/web-react` — the canonical composer. AgentComposer
125
- * is frozen and will be removed at sandbox-ui's next breaking release. */
119
+ * Part of the {@link AgentComposer} API. `ChatComposer` in
120
+ * `@tangle-network/agent-app/web-react` has no equivalent — see
121
+ * {@link AgentComposer} for which composer fits a surface. */
126
122
  interface MentionItem {
127
123
  id: string;
128
124
  label: string;
@@ -134,9 +130,9 @@ interface MentionItem {
134
130
  * TipTap rich input that renders mentions as atomic pills; absent ⇒ exactly
135
131
  * today's plain-textarea behavior. Data-agnostic: the app supplies items.
136
132
  *
137
- * @deprecated Part of the legacy AgentComposer API. Use ChatComposer from
138
- * `@tangle-network/agent-app/web-react` — the canonical composer. AgentComposer
139
- * is frozen and will be removed at sandbox-ui's next breaking release.
133
+ * Part of the {@link AgentComposer} API. `ChatComposer` in
134
+ * `@tangle-network/agent-app/web-react` has no equivalent — see
135
+ * {@link AgentComposer} for which composer fits a surface.
140
136
  */
141
137
  interface AgentComposerMention {
142
138
  /** The character that opens the popover. Default "@". */
@@ -159,9 +155,9 @@ interface AgentComposerMention {
159
155
  }
160
156
  /** A staged attachment shown as a chip above the input.
161
157
  *
162
- * @deprecated Part of the legacy AgentComposer API. Use ChatComposer from
163
- * `@tangle-network/agent-app/web-react` — the canonical composer. AgentComposer
164
- * is frozen and will be removed at sandbox-ui's next breaking release. */
158
+ * Part of the {@link AgentComposer} API. `ChatComposer` in
159
+ * `@tangle-network/agent-app/web-react` has no equivalent — see
160
+ * {@link AgentComposer} for which composer fits a surface. */
165
161
  interface ComposerFile {
166
162
  id: string;
167
163
  name: string;
@@ -181,9 +177,9 @@ interface ComposerFile {
181
177
  }
182
178
  /** Context the agent will see alongside the next message.
183
179
  *
184
- * @deprecated Part of the legacy AgentComposer API. Use ChatComposer from
185
- * `@tangle-network/agent-app/web-react` — the canonical composer. AgentComposer
186
- * is frozen and will be removed at sandbox-ui's next breaking release. */
180
+ * Part of the {@link AgentComposer} API. `ChatComposer` in
181
+ * `@tangle-network/agent-app/web-react` has no equivalent — see
182
+ * {@link AgentComposer} for which composer fits a surface. */
187
183
  interface ComposerContextItem {
188
184
  id: string;
189
185
  label: string;
@@ -192,11 +188,11 @@ interface ComposerContextItem {
192
188
  onRemove?: () => void;
193
189
  }
194
190
  /**
195
- * Props of the legacy {@link AgentComposer}.
191
+ * Props of {@link AgentComposer}.
196
192
  *
197
- * @deprecated Part of the legacy AgentComposer API. Use ChatComposer from
198
- * `@tangle-network/agent-app/web-react` — the canonical composer. AgentComposer
199
- * is frozen and will be removed at sandbox-ui's next breaking release.
193
+ * Part of the {@link AgentComposer} API. `ChatComposer` in
194
+ * `@tangle-network/agent-app/web-react` has no equivalent — see
195
+ * {@link AgentComposer} for which composer fits a surface.
200
196
  */
201
197
  interface AgentComposerProps {
202
198
  /** Composer text (controlled). */
@@ -288,25 +284,35 @@ interface AgentComposerProps {
288
284
  autoFocus?: boolean;
289
285
  }
290
286
  /**
291
- * @deprecated Use `ChatComposer` from `@tangle-network/agent-app/web-react` —
292
- * the canonical composer. It adds send-failure recovery, seeds, control
293
- * placement, floating elevation, and the circular icon send via
294
- * `sendVariant="icon"`. Plan a port, not a rename: 14 of the 28 props here
295
- * have no same-named counterpart there, among them `contextItems`, `mention`,
296
- * `trailing`, `maxHeight`, `minRows`, and `autoFocus`. The control model also
297
- * differs — this component requires `value` and `onChange` and calls
298
- * `onSubmit` with no arguments, while `ChatComposer` can own its draft and
299
- * gives the message to a refusable `onSend`. This slot-shell is frozen and
300
- * will be removed at sandbox-ui's next breaking release.
287
+ * Sibling of `ChatComposer` in `@tangle-network/agent-app/web-react`, not a
288
+ * predecessor of it. The two composers cover different jobs, and neither is a
289
+ * superset of the other, so pick by the features a surface needs.
301
290
  *
302
- * The canonical agent chat input: one rounded surface holding an auto-growing
291
+ * Reach for `AgentComposer` when the surface needs `@`-mentions (`mention`,
292
+ * backed by a lazily loaded rich-text input that renders mention pills),
293
+ * `contextItems`, or the full attachment lifecycle — `attachments` plus
294
+ * `onRejectFiles` and `onRetryFile`. It also owns `autoFocus`,
295
+ * `canSubmitAttachmentsOnly`, `trailing`, `maxHeight`, and `minRows`.
296
+ *
297
+ * Reach for `ChatComposer` when the surface is a plain send box. It owns
298
+ * send-failure recovery (`onSendFailed`, `sendFailureMessage`), one-shot
299
+ * prefill (`seed`), `controlsPlacement`, `floating`, `sendVariant`,
300
+ * parts-aware sends (`onSendParts`), and an uncontrolled mode
301
+ * (`initialValue`) — none of which exist here.
302
+ *
303
+ * Moving between them is a port, not a rename: the control models differ. This
304
+ * component requires `value` and `onChange` and calls `onSubmit` with no
305
+ * arguments, while `ChatComposer` can own its draft and hands the message to a
306
+ * refusable `onSend`.
307
+ *
308
+ * The input itself: one rounded surface holding an auto-growing
303
309
  * textarea and a bottom row that runs left → right — attach buttons, the
304
310
  * control strip (supplied via the required `controls` prop), trailing slot,
305
311
  * and the send button on the far right. The strip is explicit: the canonical
306
312
  * pickers are `ModelPicker` / `EffortPicker` / `AgentSessionControls` from
307
313
  * `@tangle-network/agent-app/web-react` — this component only owns the slot.
308
314
  *
309
- * Opt-in extras make it the superset of every app's hand-rolled composer:
315
+ * Opt-in extras cover what apps otherwise hand-roll:
310
316
  * file/folder attachments with drag-and-drop + chips + clipboard paste
311
317
  * (`onAttach` also gates pasting files onto the textarea, auto-naming
312
318
  * generic clipboard image blobs `pasted-image-<n>.<ext>`), a streaming Stop
@@ -323,10 +329,9 @@ declare function AgentComposer({ value, onChange, onSubmit, placeholder, disable
323
329
  * importing it never pulls the lazily-loaded editor chunk into a consumer's
324
330
  * bundle.
325
331
  *
326
- * @deprecated Mention-pill contract of the legacy AgentComposer mention
327
- * feature. Use ChatComposer from `@tangle-network/agent-app/web-react` — the
328
- * canonical composer. AgentComposer is frozen and will be removed at
329
- * sandbox-ui's next breaking release.
332
+ * Mention-pill contract of {@link AgentComposer}'s mention feature.
333
+ * `ChatComposer` in `@tangle-network/agent-app/web-react` has no mention
334
+ * support, so it has no equivalent.
330
335
  */
331
336
  declare const MENTION_PILL_CLASS: string;
332
337
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.104.1",
3
+ "version": "0.105.0",
4
4
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
5
5
  "repository": {
6
6
  "type": "git",