@tangle-network/sandbox-ui 0.105.1 → 0.105.3
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/{WorkflowGraph-AQLN34R3.js → WorkflowGraph-BJ5ZSDZB.js} +1 -1
- package/dist/{chunk-FW77EXKG.js → chunk-F7LNWZQR.js} +26 -3
- package/dist/{chunk-MXQT46AZ.js → chunk-LWSWKLI5.js} +1 -1
- package/dist/{chunk-NT6SCOY2.js → chunk-X24MVW2R.js} +1 -1
- package/dist/globals.css +3 -0
- package/dist/hooks.js +1 -1
- package/dist/index.js +3 -3
- package/dist/styles.css +3 -0
- package/dist/terminal.js +2 -2
- package/dist/workbench.js +3 -3
- package/dist/workflows.js +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -37,6 +37,20 @@ function createTerminalConnectionId() {
|
|
|
37
37
|
}
|
|
38
38
|
return `terminal-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
|
|
39
39
|
}
|
|
40
|
+
function interactiveIdentityKey(incarnationId, control) {
|
|
41
|
+
if (incarnationId === void 0 && control === void 0) return "plain";
|
|
42
|
+
if (incarnationId === void 0 || control === void 0) {
|
|
43
|
+
return `incomplete:${incarnationId ?? ""}`;
|
|
44
|
+
}
|
|
45
|
+
return [
|
|
46
|
+
incarnationId,
|
|
47
|
+
control.refDigest,
|
|
48
|
+
String(control.generation),
|
|
49
|
+
control.leaseId,
|
|
50
|
+
control.holderId,
|
|
51
|
+
control.expiresAt
|
|
52
|
+
].join("\0");
|
|
53
|
+
}
|
|
40
54
|
function usePtySession({
|
|
41
55
|
apiUrl,
|
|
42
56
|
token,
|
|
@@ -161,6 +175,7 @@ function usePtySession({
|
|
|
161
175
|
}
|
|
162
176
|
ws.binaryType = "arraybuffer";
|
|
163
177
|
pendingWsRef.current = ws;
|
|
178
|
+
const isCurrentSocket = () => wsRef.current === ws || pendingWsRef.current === ws;
|
|
164
179
|
let opened = false;
|
|
165
180
|
let settled = false;
|
|
166
181
|
const settle = (ok) => {
|
|
@@ -229,7 +244,7 @@ function usePtySession({
|
|
|
229
244
|
wsRef.current = ws;
|
|
230
245
|
};
|
|
231
246
|
ws.onmessage = (ev) => {
|
|
232
|
-
if (!mountedRef.current) return;
|
|
247
|
+
if (!mountedRef.current || !isCurrentSocket()) return;
|
|
233
248
|
const data = ev.data;
|
|
234
249
|
let text;
|
|
235
250
|
if (typeof data === "string") {
|
|
@@ -240,7 +255,7 @@ function usePtySession({
|
|
|
240
255
|
text = new TextDecoder().decode(data);
|
|
241
256
|
} else {
|
|
242
257
|
data.text().then((t) => {
|
|
243
|
-
if (mountedRef.current) onDataRef.current(t);
|
|
258
|
+
if (mountedRef.current && isCurrentSocket()) onDataRef.current(t);
|
|
244
259
|
}).catch(() => {
|
|
245
260
|
});
|
|
246
261
|
return;
|
|
@@ -419,6 +434,7 @@ function usePtySession({
|
|
|
419
434
|
controlRef.current = control;
|
|
420
435
|
exactAttachRequiredRef.current = incarnationId !== void 0 || control !== void 0;
|
|
421
436
|
connectStreamRef.current = connectStream;
|
|
437
|
+
const exactIdentityKey = interactiveIdentityKey(incarnationId, control);
|
|
422
438
|
const connect = useCallback(async () => {
|
|
423
439
|
cleanup();
|
|
424
440
|
const myGen = ++connectGenRef.current;
|
|
@@ -494,7 +510,14 @@ function usePtySession({
|
|
|
494
510
|
setIsConnected(false);
|
|
495
511
|
}
|
|
496
512
|
}
|
|
497
|
-
}, [
|
|
513
|
+
}, [
|
|
514
|
+
apiUrl,
|
|
515
|
+
providedConnectionId,
|
|
516
|
+
cleanup,
|
|
517
|
+
connectWs,
|
|
518
|
+
connectStream,
|
|
519
|
+
exactIdentityKey
|
|
520
|
+
]);
|
|
498
521
|
reconnectRef.current = connect;
|
|
499
522
|
const resizeTerminal = useCallback(async (cols, rows) => {
|
|
500
523
|
if (cols > 0) colsRef.current = cols;
|
package/dist/globals.css
CHANGED
package/dist/hooks.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
buildUnifiedPatch,
|
|
154
154
|
computeDiffStats,
|
|
155
155
|
resolveLanguage
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-X24MVW2R.js";
|
|
157
157
|
import {
|
|
158
158
|
FileArtifactPane,
|
|
159
159
|
FilePreview,
|
|
@@ -238,10 +238,10 @@ import {
|
|
|
238
238
|
UsageChart,
|
|
239
239
|
formatPrice
|
|
240
240
|
} from "./chunk-OMUIPJQZ.js";
|
|
241
|
-
import "./chunk-
|
|
241
|
+
import "./chunk-LWSWKLI5.js";
|
|
242
242
|
import {
|
|
243
243
|
usePtySession
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-F7LNWZQR.js";
|
|
245
245
|
import {
|
|
246
246
|
Avatar,
|
|
247
247
|
AvatarFallback,
|
package/dist/styles.css
CHANGED
package/dist/terminal.js
CHANGED
package/dist/workbench.js
CHANGED
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
buildUnifiedPatch,
|
|
13
13
|
computeDiffStats,
|
|
14
14
|
resolveLanguage
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X24MVW2R.js";
|
|
16
16
|
import "./chunk-PZVUIUUW.js";
|
|
17
17
|
import "./chunk-K4Q4E7D7.js";
|
|
18
18
|
import "./chunk-OMUIPJQZ.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-LWSWKLI5.js";
|
|
20
|
+
import "./chunk-F7LNWZQR.js";
|
|
21
21
|
import "./chunk-2XPJ2XF7.js";
|
|
22
22
|
import "./chunk-RQZRXKMR.js";
|
|
23
23
|
import "./chunk-BGVEHENC.js";
|
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