@tangle-network/sandbox-ui 0.105.3 → 0.106.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 +59 -51
  2. package/package.json +1 -1
package/dist/chat.d.ts CHANGED
@@ -60,9 +60,11 @@ declare function ReasoningLevelPicker({ value, onChange, disabled, className, tr
60
60
  /**
61
61
  * Limits applied when staging files onto a composer.
62
62
  *
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.
63
+ * @deprecated Composer-only helper of the legacy AgentComposer. agent-app
64
+ * (≥0.46) splits this job: accept filtering lives in `filterAcceptedFiles`
65
+ * from `@tangle-network/agent-app/web-react`, and size/count limits belong to
66
+ * the staging queue (`useComposerAttachments`). AgentComposer is frozen and
67
+ * will be removed at sandbox-ui's next breaking release.
66
68
  */
67
69
  interface ComposerFileValidationConfig {
68
70
  /** Reject any single file larger than this. */
@@ -80,9 +82,11 @@ interface ComposerFileValidationConfig {
80
82
  }
81
83
  /** A file that failed validation, paired with a human-readable reason.
82
84
  *
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. */
85
+ * @deprecated Composer-only helper of the legacy AgentComposer. Import
86
+ * `ComposerFileRejection` from `@tangle-network/agent-app/web-react`
87
+ * (agent-app ≥0.46) — the same shape, reported by `ChatComposer`'s
88
+ * `onRejectFiles`. AgentComposer is frozen and will be removed at sandbox-ui's
89
+ * next breaking release. */
86
90
  interface ComposerFileRejection {
87
91
  file: File;
88
92
  reason: string;
@@ -92,9 +96,10 @@ interface ComposerFileRejection {
92
96
  * grammar as the native `<input accept>` attribute. An undefined or empty
93
97
  * `accept` accepts everything.
94
98
  *
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.
99
+ * @deprecated Composer-only helper of the legacy AgentComposer. Use
100
+ * `isAcceptedFileType` from `@tangle-network/agent-app/web-react`
101
+ * (agent-app ≥0.46) — the same `accept` grammar. AgentComposer is frozen and
102
+ * will be removed at sandbox-ui's next breaking release.
98
103
  */
99
104
  declare function isAcceptedType(file: File, accept?: string): boolean;
100
105
  /**
@@ -104,9 +109,11 @@ declare function isAcceptedType(file: File, accept?: string): boolean;
104
109
  * file and the limit it broke. Pure data in, pure data out — no throwing,
105
110
  * no console noise, so callers decide how to surface rejections.
106
111
  *
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.
112
+ * @deprecated Composer-only helper of the legacy AgentComposer. Use
113
+ * `filterAcceptedFiles` from `@tangle-network/agent-app/web-react`
114
+ * (agent-app ≥0.46) for accept filtering; size and count limits belong to the
115
+ * staging queue (`useComposerAttachments`). AgentComposer is frozen and will
116
+ * be removed at sandbox-ui's next breaking release.
110
117
  */
111
118
  declare function validateComposerFiles(files: File[] | FileList, config: ComposerFileValidationConfig): {
112
119
  accepted: File[];
@@ -116,9 +123,10 @@ declare function validateComposerFiles(files: File[] | FileList, config: Compose
116
123
  /** A selectable item in the `@`-mention popover. Generic — file semantics live
117
124
  * in the consuming app, not here.
118
125
  *
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
+ * @deprecated Part of the legacy AgentComposer API. Import `MentionItem` from
127
+ * `@tangle-network/agent-app/web-react` (agent-app ≥0.46) — the same contract,
128
+ * now owned by the package that defines it. AgentComposer is frozen and will
129
+ * be removed at sandbox-ui's next breaking release. */
122
130
  interface MentionItem {
123
131
  id: string;
124
132
  label: string;
@@ -130,9 +138,10 @@ interface MentionItem {
130
138
  * TipTap rich input that renders mentions as atomic pills; absent ⇒ exactly
131
139
  * today's plain-textarea behavior. Data-agnostic: the app supplies items.
132
140
  *
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.
141
+ * @deprecated Part of the legacy AgentComposer API. `ComposerMentionProp` in
142
+ * `@tangle-network/agent-app/web-react` (agent-app ≥0.46) is the same contract
143
+ * on `ChatComposer`'s `mention` prop. AgentComposer is frozen and will be
144
+ * removed at sandbox-ui's next breaking release.
136
145
  */
137
146
  interface AgentComposerMention {
138
147
  /** The character that opens the popover. Default "@". */
@@ -155,9 +164,10 @@ interface AgentComposerMention {
155
164
  }
156
165
  /** A staged attachment shown as a chip above the input.
157
166
  *
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. */
167
+ * @deprecated Part of the legacy AgentComposer API. Import `ComposerFile` from
168
+ * `@tangle-network/agent-app/web-react` (agent-app ≥0.46) — the same shape,
169
+ * consumed by `ChatComposer`'s `pendingFiles`. AgentComposer is frozen and
170
+ * will be removed at sandbox-ui's next breaking release. */
161
171
  interface ComposerFile {
162
172
  id: string;
163
173
  name: string;
@@ -177,9 +187,11 @@ interface ComposerFile {
177
187
  }
178
188
  /** Context the agent will see alongside the next message.
179
189
  *
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. */
190
+ * @deprecated Part of the legacy AgentComposer API. Import
191
+ * `ComposerContextItem` from `@tangle-network/agent-app/web-react`
192
+ * (agent-app ≥0.46) — the same shape, consumed by `ChatComposer`'s
193
+ * `contextItems`. AgentComposer is frozen and will be removed at sandbox-ui's
194
+ * next breaking release. */
183
195
  interface ComposerContextItem {
184
196
  id: string;
185
197
  label: string;
@@ -188,11 +200,12 @@ interface ComposerContextItem {
188
200
  onRemove?: () => void;
189
201
  }
190
202
  /**
191
- * Props of {@link AgentComposer}.
203
+ * Props of the legacy {@link AgentComposer}.
192
204
  *
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.
205
+ * @deprecated Part of the legacy AgentComposer API. `ChatComposerProps` in
206
+ * `@tangle-network/agent-app/web-react` (agent-app ≥0.46) covers every prop
207
+ * here — see {@link AgentComposer} for the four renames. AgentComposer is
208
+ * frozen and will be removed at sandbox-ui's next breaking release.
196
209
  */
197
210
  interface AgentComposerProps {
198
211
  /** Composer text (controlled). */
@@ -284,26 +297,19 @@ interface AgentComposerProps {
284
297
  autoFocus?: boolean;
285
298
  }
286
299
  /**
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.
290
- *
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`.
300
+ * @deprecated Use `ChatComposer` from `@tangle-network/agent-app/web-react` —
301
+ * since agent-app 0.46 it is a strict superset of this component. Everything
302
+ * that once lived only here now lives there: `mention` (the same
303
+ * `ComposerMentionProp` contract), `contextItems`, the full attachment
304
+ * lifecycle (`pendingFiles` with `previewUrl` thumbnails, `onRejectFiles`,
305
+ * `onRetryFile`, clipboard paste with `pasted-image-<n>.<ext>` naming),
306
+ * `autoFocus`, `canSubmitAttachmentsOnly`, `canSubmitWhileBusy`, `trailing`,
307
+ * `maxHeight`, and `minRows`. Migration is four prop renames — `onChange` →
308
+ * `onValueChange`, `onSubmit()` → `onSend(message)`, `busy` → `isStreaming`,
309
+ * `attachments` → `pendingFiles`; every other prop carries across unchanged.
310
+ * Add `sendVariant="icon"` and `focusShortcut={false}` where a surface wants
311
+ * this component's exact chrome. AgentComposer is frozen and will be removed
312
+ * at sandbox-ui's next breaking release.
307
313
  *
308
314
  * The input itself: one rounded surface holding an auto-growing
309
315
  * textarea and a bottom row that runs left → right — attach buttons, the
@@ -329,9 +335,11 @@ declare function AgentComposer({ value, onChange, onSubmit, placeholder, disable
329
335
  * importing it never pulls the lazily-loaded editor chunk into a consumer's
330
336
  * bundle.
331
337
  *
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.
338
+ * @deprecated Mention-pill contract of the legacy AgentComposer mention
339
+ * feature. Import `MENTION_PILL_CLASS` from
340
+ * `@tangle-network/agent-app/web-react` (agent-app ≥0.46) — `ChatComposer`
341
+ * owns the mention stack now. AgentComposer is frozen and will be removed at
342
+ * sandbox-ui's next breaking release.
335
343
  */
336
344
  declare const MENTION_PILL_CLASS: string;
337
345
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.105.3",
3
+ "version": "0.106.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",