@tangle-network/sandbox-ui 0.113.7 → 0.115.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 (107) hide show
  1. package/README.md +40 -0
  2. package/dist/WorkflowGraph-B-NsdYz_.js +1961 -0
  3. package/dist/assets.d.ts +214 -206
  4. package/dist/assets.js +1057 -908
  5. package/dist/auth-CWe17Hly.js +37 -0
  6. package/dist/auth.d.ts +2 -30
  7. package/dist/auth.js +2 -15
  8. package/dist/chat-BOvFAe6p.js +903 -0
  9. package/dist/chat.d.ts +2 -230
  10. package/dist/chat.js +2 -34
  11. package/dist/connectors.d.ts +52 -49
  12. package/dist/connectors.js +595 -643
  13. package/dist/dashboard-CZ3VgNPR.js +4969 -0
  14. package/dist/dashboard.d.ts +4 -1297
  15. package/dist/dashboard.js +4 -152
  16. package/dist/editor.d.ts +2 -1
  17. package/dist/editor.js +2 -31
  18. package/dist/files.d.ts +2 -6
  19. package/dist/files.js +2 -33
  20. package/dist/globals.css +75 -3
  21. package/dist/hooks.d.ts +146 -148
  22. package/dist/hooks.js +222 -55
  23. package/dist/index-CKRaj1pM.d.ts +776 -0
  24. package/dist/index-CXX5IpH2.d.ts +2 -0
  25. package/dist/index-CesPlOyx.d.ts +367 -0
  26. package/dist/index-DPePq7c8.d.ts +1340 -0
  27. package/dist/index-DiyLLZuJ.d.ts +230 -0
  28. package/dist/index-DvmZLMT1.d.ts +30 -0
  29. package/dist/index-PRM636Ex.d.ts +86 -0
  30. package/dist/index.d.ts +21 -33
  31. package/dist/index.js +21 -701
  32. package/dist/info-panel-C9cqDzOL.js +594 -0
  33. package/dist/integrations.d.ts +133 -141
  34. package/dist/integrations.js +491 -673
  35. package/dist/markdown.d.ts +2 -1
  36. package/dist/markdown.js +2 -13
  37. package/dist/model-I-NIxeM-.js +1250 -0
  38. package/dist/model-brand-B9A4H9pJ.d.ts +98 -0
  39. package/dist/model-brand-hMyDTUqB.js +624 -0
  40. package/dist/motion-DkyBRJb9.js +37 -0
  41. package/dist/openui.d.ts +2 -1
  42. package/dist/openui.js +2 -7
  43. package/dist/pages.d.ts +307 -300
  44. package/dist/pages.js +4404 -4181
  45. package/dist/primitives-Dh1vG6J3.js +113 -0
  46. package/dist/primitives.d.ts +2 -74
  47. package/dist/primitives.js +2 -204
  48. package/dist/provider-logo-DjqmConF.js +311 -0
  49. package/dist/run.d.ts +2 -1
  50. package/dist/run.js +2 -23
  51. package/dist/sdk-hooks.d.ts +3 -4
  52. package/dist/sdk-hooks.js +3 -31
  53. package/dist/sidecar-DgH_vQ6m.d.ts +9 -0
  54. package/dist/stores.d.ts +14 -15
  55. package/dist/stores.js +13 -81
  56. package/dist/styles.css +75 -3
  57. package/dist/template-card-L-4gmjx2.d.ts +90 -0
  58. package/dist/terminal-CN9ZgHRt.js +197 -0
  59. package/dist/terminal.d.ts +60 -60
  60. package/dist/terminal.js +2 -10
  61. package/dist/tokens.css +51 -0
  62. package/dist/types.d.ts +4 -11
  63. package/dist/types.js +0 -1
  64. package/dist/use-pty-session-C8cE0adT.js +669 -0
  65. package/dist/use-sidecar-auth-CCTJcrq7.d.ts +145 -0
  66. package/dist/use-sidecar-auth-DkdcufOz.js +742 -0
  67. package/dist/utils-DzWbktWG.js +2 -0
  68. package/dist/utils.d.ts +2 -1
  69. package/dist/utils.js +2 -37
  70. package/dist/workbench-ztU44Jt2.js +8455 -0
  71. package/dist/workbench.d.ts +2 -310
  72. package/dist/workbench.js +2 -44
  73. package/dist/workflows.d.ts +341 -339
  74. package/dist/workflows.js +74 -109
  75. package/dist/workspace-B6AtI6ld.js +2510 -0
  76. package/dist/workspace.d.ts +2 -761
  77. package/dist/workspace.js +2 -51
  78. package/package.json +46 -40
  79. package/dist/WorkflowGraph-2QOORYIR.js +0 -1722
  80. package/dist/chunk-2BUPSB7O.js +0 -0
  81. package/dist/chunk-3KBNPQQF.js +0 -2697
  82. package/dist/chunk-3LIXVEEE.js +0 -279
  83. package/dist/chunk-72UF2H5H.js +0 -707
  84. package/dist/chunk-AI25G5MX.js +0 -944
  85. package/dist/chunk-ANSC5AFC.js +0 -314
  86. package/dist/chunk-AZ3AWMTM.js +0 -8
  87. package/dist/chunk-BGVEHENC.js +0 -10
  88. package/dist/chunk-CZ7CSFO4.js +0 -39
  89. package/dist/chunk-DYXXYGS4.js +0 -4700
  90. package/dist/chunk-EI44GEQ5.js +0 -6
  91. package/dist/chunk-IACRDXER.js +0 -219
  92. package/dist/chunk-IOB2PW5Z.js +0 -55
  93. package/dist/chunk-M4K7ZGR2.js +0 -24
  94. package/dist/chunk-MYZAW4RX.js +0 -665
  95. package/dist/chunk-OMUIPJQZ.js +0 -555
  96. package/dist/chunk-RQZRXKMR.js +0 -398
  97. package/dist/chunk-SOKKTB7W.js +0 -230
  98. package/dist/chunk-TADGS4Q7.js +0 -1010
  99. package/dist/chunk-UCQNOUN3.js +0 -7964
  100. package/dist/chunk-ULPLRBMF.js +0 -34
  101. package/dist/chunk-WID73FPH.js +0 -89
  102. package/dist/chunk-X3YXP7FG.js +0 -38
  103. package/dist/logo-DiAjq759.d.ts +0 -15
  104. package/dist/model-brand-BNnaUKKZ.d.ts +0 -99
  105. package/dist/ports-list-CDIvTNnX.d.ts +0 -17
  106. package/dist/sdk-hooks-Djkjq4cp.d.ts +0 -145
  107. package/dist/template-card-Bn-Bw5xC.d.ts +0 -87
package/dist/workflows.js CHANGED
@@ -1,119 +1,84 @@
1
- import {
2
- TRIGGER_NODE_ID,
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
- return factory().catch((err) => {
27
- if (retries <= 0) throw err;
28
- return new Promise((resolve, reject) => {
29
- setTimeout(
30
- () => retryImport(factory, retries - 1, delayMs).then(resolve, reject),
31
- delayMs
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
- return lazy(
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
- state = { hasError: false };
45
- static getDerivedStateFromError() {
46
- return { hasError: true };
47
- }
48
- render() {
49
- return this.state.hasError ? this.props.fallback : this.props.children;
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
- function GraphFallback({
53
- yaml,
54
- className,
55
- onRetry
56
- }) {
57
- return /* @__PURE__ */ jsxs(
58
- "div",
59
- {
60
- className: `overflow-auto rounded-lg border border-border bg-background p-2 ${className ?? ""}`,
61
- children: [
62
- /* @__PURE__ */ jsxs("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
63
- /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs", children: "Couldn't render the graph \u2014 showing the definition." }),
64
- /* @__PURE__ */ jsx(
65
- "button",
66
- {
67
- type: "button",
68
- onClick: onRetry,
69
- className: "shrink-0 rounded border border-border px-1.5 py-0.5 text-muted-foreground text-xs transition hover:text-foreground",
70
- children: "Retry"
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
- const [attempt, setAttempt] = useState(0);
81
- const Impl = useMemo(() => lazyWorkflowGraph(), [attempt]);
82
- return (
83
- // Key the boundary by the workflow AND the attempt so a different/edited
84
- // definition or a manual retry remounts it and re-attempts the graph — a
85
- // transient chunk/render failure on one workflow doesn't permanently pin the
86
- // YAML fallback.
87
- /* @__PURE__ */ jsx(
88
- GraphErrorBoundary,
89
- {
90
- fallback: /* @__PURE__ */ jsx(GraphFallback, { ...props, onRetry: () => setAttempt((a) => a + 1) }),
91
- children: /* @__PURE__ */ jsx(
92
- Suspense,
93
- {
94
- fallback: /* @__PURE__ */ jsx(
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
- export {
110
- ModelBrandStack,
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 };