@tangle-network/sandbox-ui 0.113.6 → 0.114.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.
- package/dist/WorkflowGraph-B-NsdYz_.js +1961 -0
- package/dist/assets.d.ts +214 -206
- package/dist/assets.js +1057 -908
- package/dist/auth-CWe17Hly.js +37 -0
- package/dist/auth.d.ts +2 -30
- package/dist/auth.js +2 -15
- package/dist/chat-BOvFAe6p.js +903 -0
- package/dist/chat.d.ts +2 -230
- package/dist/chat.js +2 -34
- package/dist/connectors.d.ts +52 -49
- package/dist/connectors.js +595 -643
- package/dist/dashboard-CZ3VgNPR.js +4969 -0
- package/dist/dashboard.d.ts +4 -1297
- package/dist/dashboard.js +4 -152
- package/dist/editor.d.ts +2 -1
- package/dist/editor.js +2 -31
- package/dist/files.d.ts +2 -6
- package/dist/files.js +2 -33
- package/dist/globals.css +63 -3
- package/dist/hooks.d.ts +146 -148
- package/dist/hooks.js +222 -55
- package/dist/index-CKRaj1pM.d.ts +776 -0
- package/dist/index-CXX5IpH2.d.ts +2 -0
- package/dist/index-DPePq7c8.d.ts +1340 -0
- package/dist/index-DiyLLZuJ.d.ts +230 -0
- package/dist/index-DvmZLMT1.d.ts +30 -0
- package/dist/index-I8ZLVtHd.d.ts +330 -0
- package/dist/index-PRM636Ex.d.ts +86 -0
- package/dist/index.d.ts +21 -33
- package/dist/index.js +21 -701
- package/dist/info-panel-C9cqDzOL.js +594 -0
- package/dist/integrations.d.ts +133 -139
- package/dist/integrations.js +491 -673
- package/dist/markdown.d.ts +2 -1
- package/dist/markdown.js +2 -13
- package/dist/model-I-NIxeM-.js +1250 -0
- package/dist/model-brand-B9A4H9pJ.d.ts +98 -0
- package/dist/model-brand-hMyDTUqB.js +624 -0
- package/dist/motion-DkyBRJb9.js +37 -0
- package/dist/openui.d.ts +2 -1
- package/dist/openui.js +2 -7
- package/dist/pages.d.ts +307 -300
- package/dist/pages.js +4404 -4181
- package/dist/primitives-Dh1vG6J3.js +113 -0
- package/dist/primitives.d.ts +2 -74
- package/dist/primitives.js +2 -204
- package/dist/provider-logo-DjqmConF.js +311 -0
- package/dist/run.d.ts +2 -1
- package/dist/run.js +2 -23
- package/dist/sdk-hooks.d.ts +3 -4
- package/dist/sdk-hooks.js +3 -31
- package/dist/sidecar-DgH_vQ6m.d.ts +9 -0
- package/dist/stores.d.ts +14 -15
- package/dist/stores.js +13 -81
- package/dist/styles.css +63 -3
- package/dist/template-card-L-4gmjx2.d.ts +90 -0
- package/dist/terminal-CN9ZgHRt.js +197 -0
- package/dist/terminal.d.ts +60 -60
- package/dist/terminal.js +2 -10
- package/dist/tokens.css +51 -0
- package/dist/types.d.ts +4 -11
- package/dist/types.js +0 -1
- package/dist/use-pty-session-C8cE0adT.js +669 -0
- package/dist/use-sidecar-auth-CCTJcrq7.d.ts +145 -0
- package/dist/use-sidecar-auth-DkdcufOz.js +742 -0
- package/dist/utils-DzWbktWG.js +2 -0
- package/dist/utils.d.ts +2 -1
- package/dist/utils.js +2 -37
- package/dist/workbench-BCaCKl-J.js +8347 -0
- package/dist/workbench.d.ts +2 -310
- package/dist/workbench.js +2 -44
- package/dist/workflows.d.ts +341 -339
- package/dist/workflows.js +74 -109
- package/dist/workspace-B6AtI6ld.js +2510 -0
- package/dist/workspace.d.ts +2 -761
- package/dist/workspace.js +2 -51
- package/package.json +46 -40
- package/dist/WorkflowGraph-2QOORYIR.js +0 -1722
- package/dist/chunk-2BUPSB7O.js +0 -0
- package/dist/chunk-3KBNPQQF.js +0 -2697
- package/dist/chunk-3LIXVEEE.js +0 -279
- package/dist/chunk-72UF2H5H.js +0 -707
- package/dist/chunk-AI25G5MX.js +0 -944
- package/dist/chunk-ANSC5AFC.js +0 -314
- package/dist/chunk-AZ3AWMTM.js +0 -8
- package/dist/chunk-BGVEHENC.js +0 -10
- package/dist/chunk-CZ7CSFO4.js +0 -39
- package/dist/chunk-DYXXYGS4.js +0 -4700
- package/dist/chunk-EI44GEQ5.js +0 -6
- package/dist/chunk-IACRDXER.js +0 -219
- package/dist/chunk-IOB2PW5Z.js +0 -55
- package/dist/chunk-M4K7ZGR2.js +0 -24
- package/dist/chunk-MYZAW4RX.js +0 -665
- package/dist/chunk-OMUIPJQZ.js +0 -555
- package/dist/chunk-RQZRXKMR.js +0 -398
- package/dist/chunk-SOKKTB7W.js +0 -230
- package/dist/chunk-TADGS4Q7.js +0 -1010
- package/dist/chunk-UCQNOUN3.js +0 -7964
- package/dist/chunk-ULPLRBMF.js +0 -34
- package/dist/chunk-WID73FPH.js +0 -89
- package/dist/chunk-X3YXP7FG.js +0 -38
- package/dist/logo-DiAjq759.d.ts +0 -15
- package/dist/model-brand-BNnaUKKZ.d.ts +0 -99
- package/dist/ports-list-CDIvTNnX.d.ts +0 -17
- package/dist/sdk-hooks-Djkjq4cp.d.ts +0 -145
- package/dist/template-card-Bn-Bw5xC.d.ts +0 -87
package/dist/workflows.js
CHANGED
|
@@ -1,119 +1,84 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
actionNodeId,
|
|
4
|
-
branchNodeId,
|
|
5
|
-
buildWorkflowGraph,
|
|
6
|
-
triggerNodeId,
|
|
7
|
-
triggerNodeIndex
|
|
8
|
-
} from "./chunk-AI25G5MX.js";
|
|
9
|
-
import {
|
|
10
|
-
ModelBrandStack,
|
|
11
|
-
modelBrandFor
|
|
12
|
-
} from "./chunk-RQZRXKMR.js";
|
|
13
|
-
import "./chunk-EI44GEQ5.js";
|
|
14
|
-
import "./chunk-CZ7CSFO4.js";
|
|
15
|
-
|
|
16
|
-
// src/workflows/WorkflowGraphLazy.tsx
|
|
17
|
-
import {
|
|
18
|
-
Component,
|
|
19
|
-
lazy,
|
|
20
|
-
Suspense,
|
|
21
|
-
useMemo,
|
|
22
|
-
useState
|
|
23
|
-
} from "react";
|
|
1
|
+
import { r as modelBrandFor, t as ModelBrandStack } from "./model-brand-hMyDTUqB.js";
|
|
2
|
+
import { a as buildWorkflowGraph, c as triggerNodeIndex, i as branchNodeId, n as TRIGGER_NODE_ID, r as actionNodeId, s as triggerNodeId } from "./model-I-NIxeM-.js";
|
|
24
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Component, Suspense, lazy, useMemo, useState } from "react";
|
|
5
|
+
//#region src/workflows/WorkflowGraphLazy.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Lazy + error-isolated boundary for {@link WorkflowGraph}. React Flow (~50KB)
|
|
8
|
+
* is only needed on the workflow detail page and on workflow proposal cards, so
|
|
9
|
+
* it's code-split out of the always-loaded app shell. The Suspense fallback
|
|
10
|
+
* keeps the caller's height so layout doesn't jump; the error boundary degrades
|
|
11
|
+
* to the raw YAML if the chunk fails
|
|
12
|
+
* to load (offline) or React Flow throws, instead of crashing the panel tree.
|
|
13
|
+
*
|
|
14
|
+
* The chunk import auto-retries a transient failure (a flaky network or an
|
|
15
|
+
* HMR/cache miss) before degrading, and the fallback offers a manual retry that
|
|
16
|
+
* re-attempts the import — so a recoverable failure isn't permanently pinned to
|
|
17
|
+
* the YAML view. A chunk that is gone for good (e.g. an old hash after a deploy)
|
|
18
|
+
* still degrades to the fully-legible YAML; the host can recover those globally
|
|
19
|
+
* via a Vite `vite:preloadError` reload guard.
|
|
20
|
+
*/
|
|
21
|
+
/** Re-run `factory` up to `retries` times with a short backoff before giving up.
|
|
22
|
+
* Covers a transient dynamic-import rejection (network blip, a chunk briefly
|
|
23
|
+
* unavailable behind a CDN) without bothering the user. Exported for tests. */
|
|
25
24
|
function retryImport(factory, retries = 2, delayMs = 350) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
33
|
-
});
|
|
34
|
-
});
|
|
25
|
+
return factory().catch((err) => {
|
|
26
|
+
if (retries <= 0) throw err;
|
|
27
|
+
return new Promise((resolve, reject) => {
|
|
28
|
+
setTimeout(() => retryImport(factory, retries - 1, delayMs).then(resolve, reject), delayMs);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
35
31
|
}
|
|
36
32
|
function lazyWorkflowGraph() {
|
|
37
|
-
|
|
38
|
-
() => retryImport(
|
|
39
|
-
() => import("./WorkflowGraph-2QOORYIR.js").then((m) => ({ default: m.WorkflowGraph }))
|
|
40
|
-
)
|
|
41
|
-
);
|
|
33
|
+
return lazy(() => retryImport(() => import("./WorkflowGraph-B-NsdYz_.js").then((m) => ({ default: m.WorkflowGraph }))));
|
|
42
34
|
}
|
|
43
35
|
var GraphErrorBoundary = class extends Component {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
state = { hasError: false };
|
|
37
|
+
static getDerivedStateFromError() {
|
|
38
|
+
return { hasError: true };
|
|
39
|
+
}
|
|
40
|
+
render() {
|
|
41
|
+
return this.state.hasError ? this.props.fallback : this.props.children;
|
|
42
|
+
}
|
|
51
43
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
] }),
|
|
74
|
-
/* @__PURE__ */ jsx("pre", { className: "text-foreground text-xs", children: /* @__PURE__ */ jsx("code", { children: yaml }) })
|
|
75
|
-
]
|
|
76
|
-
}
|
|
77
|
-
);
|
|
44
|
+
/** Graceful degradation when the graph can't render: the workflow is still
|
|
45
|
+
* fully legible as YAML, with a retry for a recoverable load failure. */
|
|
46
|
+
function GraphFallback({ yaml, className, onRetry }) {
|
|
47
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
48
|
+
className: `overflow-auto rounded-lg border border-border bg-background p-2 ${className ?? ""}`,
|
|
49
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
50
|
+
className: "mb-1 flex items-center justify-between gap-2",
|
|
51
|
+
children: [/* @__PURE__ */ jsx("p", {
|
|
52
|
+
className: "text-muted-foreground text-xs",
|
|
53
|
+
children: "Couldn't render the graph — showing the definition."
|
|
54
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
55
|
+
type: "button",
|
|
56
|
+
onClick: onRetry,
|
|
57
|
+
className: "shrink-0 rounded border border-border px-1.5 py-0.5 text-muted-foreground text-xs transition hover:text-foreground",
|
|
58
|
+
children: "Retry"
|
|
59
|
+
})]
|
|
60
|
+
}), /* @__PURE__ */ jsx("pre", {
|
|
61
|
+
className: "text-foreground text-xs",
|
|
62
|
+
children: /* @__PURE__ */ jsx("code", { children: yaml })
|
|
63
|
+
})]
|
|
64
|
+
});
|
|
78
65
|
}
|
|
79
66
|
function WorkflowGraph(props) {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
"div",
|
|
96
|
-
{
|
|
97
|
-
className: `flex items-center justify-center rounded-lg border border-border border-dashed text-text-muted text-xs ${props.className ?? ""}`,
|
|
98
|
-
children: "Loading graph\u2026"
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
children: /* @__PURE__ */ jsx(Impl, { ...props })
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
},
|
|
105
|
-
`${props.yaml}::${attempt}`
|
|
106
|
-
)
|
|
107
|
-
);
|
|
67
|
+
const [attempt, setAttempt] = useState(0);
|
|
68
|
+
const Impl = useMemo(() => lazyWorkflowGraph(), [attempt]);
|
|
69
|
+
return /* @__PURE__ */ jsx(GraphErrorBoundary, {
|
|
70
|
+
fallback: /* @__PURE__ */ jsx(GraphFallback, {
|
|
71
|
+
...props,
|
|
72
|
+
onRetry: () => setAttempt((a) => a + 1)
|
|
73
|
+
}),
|
|
74
|
+
children: /* @__PURE__ */ jsx(Suspense, {
|
|
75
|
+
fallback: /* @__PURE__ */ jsx("div", {
|
|
76
|
+
className: `flex items-center justify-center rounded-lg border border-border border-dashed text-text-muted text-xs ${props.className ?? ""}`,
|
|
77
|
+
children: "Loading graph…"
|
|
78
|
+
}),
|
|
79
|
+
children: /* @__PURE__ */ jsx(Impl, { ...props })
|
|
80
|
+
})
|
|
81
|
+
}, `${props.yaml}::${attempt}`);
|
|
108
82
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
TRIGGER_NODE_ID,
|
|
112
|
-
WorkflowGraph as WorkflowGraphLazy,
|
|
113
|
-
actionNodeId,
|
|
114
|
-
branchNodeId,
|
|
115
|
-
buildWorkflowGraph,
|
|
116
|
-
modelBrandFor,
|
|
117
|
-
triggerNodeId,
|
|
118
|
-
triggerNodeIndex
|
|
119
|
-
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { ModelBrandStack, TRIGGER_NODE_ID, WorkflowGraph as WorkflowGraphLazy, actionNodeId, branchNodeId, buildWorkflowGraph, modelBrandFor, triggerNodeId, triggerNodeIndex };
|