@tangle-network/sandbox-ui 0.105.2 → 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.
|
@@ -571,7 +571,7 @@ function isEditableEdge(edge) {
|
|
|
571
571
|
return edge.data?.kind !== "fork" && triggerNodeIndex(edge.source) === null;
|
|
572
572
|
}
|
|
573
573
|
var HANDLE_CLASS = "!h-2 !w-2 !min-w-0 !border-0 !bg-transparent opacity-0";
|
|
574
|
-
var HANDLE_CONNECTABLE_CLASS = "!h-2.5 !w-2.5 !min-w-0 !rounded-full !border !border-border !bg-muted-foreground/70 opacity-100 transition-opacity hover:!bg-primary";
|
|
574
|
+
var HANDLE_CONNECTABLE_CLASS = "!z-10 !h-2.5 !w-2.5 !min-w-0 !rounded-full !border !border-border !bg-muted-foreground/70 opacity-100 transition-opacity hover:!bg-primary";
|
|
575
575
|
function compactHandleStyle(position, isLR) {
|
|
576
576
|
const tileLeft = isLR ? (COMPACT_NODE_SIZE.width - COMPACT_TILE) / 2 : 0;
|
|
577
577
|
const center = COMPACT_TILE / 2;
|
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
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
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
|
-
*
|
|
84
|
-
* `@tangle-network/agent-app/web-react`
|
|
85
|
-
*
|
|
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
|
-
*
|
|
96
|
-
* `@tangle-network/agent-app/web-react`
|
|
97
|
-
*
|
|
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
|
-
*
|
|
108
|
-
* `@tangle-network/agent-app/web-react`
|
|
109
|
-
*
|
|
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
|
|
120
|
-
* `@tangle-network/agent-app/web-react`
|
|
121
|
-
*
|
|
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
|
|
134
|
-
* `@tangle-network/agent-app/web-react`
|
|
135
|
-
*
|
|
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
|
|
159
|
-
* `@tangle-network/agent-app/web-react`
|
|
160
|
-
*
|
|
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
|
|
181
|
-
* `@tangle-network/agent-app/web-react`
|
|
182
|
-
*
|
|
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
|
|
194
|
-
* `@tangle-network/agent-app/web-react`
|
|
195
|
-
* {@link AgentComposer} for
|
|
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
|
-
*
|
|
288
|
-
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
* `
|
|
294
|
-
* `
|
|
295
|
-
* `
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
*
|
|
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
|
|
333
|
-
*
|
|
334
|
-
*
|
|
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/dist/globals.css
CHANGED
package/dist/styles.css
CHANGED
package/dist/workflows.js
CHANGED
|
@@ -36,7 +36,7 @@ function retryImport(factory, retries = 2, delayMs = 350) {
|
|
|
36
36
|
function lazyWorkflowGraph() {
|
|
37
37
|
return lazy(
|
|
38
38
|
() => retryImport(
|
|
39
|
-
() => import("./WorkflowGraph-
|
|
39
|
+
() => import("./WorkflowGraph-BJ5ZSDZB.js").then((m) => ({ default: m.WorkflowGraph }))
|
|
40
40
|
)
|
|
41
41
|
);
|
|
42
42
|
}
|
package/package.json
CHANGED