@workflow/web 5.0.0-beta.1 → 5.0.0-beta.2
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/README.md +1 -1
- package/build/client/assets/encryption-80GMP4r0.js +26 -0
- package/build/client/assets/entry.client-BWsSsWQm.js +11899 -0
- package/build/client/assets/highlighted-body-B3W2YXNL-DPWdt39H.js +18 -0
- package/build/client/assets/home-OcN-ARTU.js +3992 -0
- package/build/client/assets/index-DQa-BExo.js +9432 -0
- package/build/client/assets/{manifest-2d7ab41e.js → manifest-62352cd9.js} +1 -1
- package/build/client/assets/mermaid-3ZIDBTTL-B9v3aKRl.js +48141 -0
- package/build/client/assets/root-BrnNveEi.css +1 -0
- package/build/client/assets/root-ClRrWHkX.js +690 -0
- package/build/client/assets/run-detail-BdYMODbi.js +6710 -0
- package/build/client/assets/{server-build-CiTtikBY.css → server-build-DKWv59Tp.css} +1 -1
- package/build/client/assets/worker-CqHKTA7D.js +115 -0
- package/build/client/assets/workflow-graph-viewer-BdFIMYrh.js +16175 -0
- package/build/server/assets/{app-DaJqmGT8.js → app-coxrYAYu.js} +1 -1
- package/build/server/assets/{highlighted-body-B3W2YXNL-xowfciga.js → highlighted-body-B3W2YXNL-DhGWas67.js} +2 -2
- package/build/server/assets/{index-CFBIzXaR.js → index-DJ8Yt9MV.js} +30 -29
- package/build/server/assets/{mermaid-3ZIDBTTL-nU8V7hWp.js → mermaid-3ZIDBTTL-DJkW_cc4.js} +3 -3
- package/build/server/assets/{server-build-rhQJXUIP.js → server-build-dCNkWo2d.js} +420 -95
- package/build/server/assets/{token-BZ35B6LQ.js → token-Bi1ru9oe.js} +2 -2
- package/build/server/assets/{token-util-vRsmZMJV.js → token-util-Bwj_Mj31.js} +2 -2
- package/build/server/index.js +1 -1
- package/package.json +6 -6
- package/build/client/assets/encryption-8OvC6eoJ.js +0 -1
- package/build/client/assets/entry.client-BiVEcoV8.js +0 -29
- package/build/client/assets/highlighted-body-B3W2YXNL-epbVCzUZ.js +0 -1
- package/build/client/assets/home-cYqw84jW.js +0 -40
- package/build/client/assets/index-BmZS3y7B.js +0 -59
- package/build/client/assets/mermaid-3ZIDBTTL-CCXSRVd3.js +0 -210
- package/build/client/assets/root-aMfmV5uh.css +0 -1
- package/build/client/assets/root-kDmPgm4u.js +0 -26
- package/build/client/assets/run-detail-B5k2OYOu.js +0 -37
- package/build/client/assets/worker-D-HfgUMl.js +0 -1
- package/build/client/assets/workflow-graph-viewer-B5c_xYyF.js +0 -161
|
@@ -0,0 +1,690 @@
|
|
|
1
|
+
import { r as reactExports, j as jsxRuntimeExports, w as withComponentProps, v as withErrorBoundaryProps, M as Meta, L as Links, S as ScrollRestoration, x as Scripts, O as Outlet, y as useRouteError, i as isRouteErrorResponse, z as Link, A as useNavigate, B as useSearchParams } from "./index-DQa-BExo.js";
|
|
2
|
+
import { c as createLucideIcon, u as useServerConfig, T as Tooltip, a as TooltipTrigger, b as TooltipContent, r as runHealthCheck, t as toast, B as Button, L as LoaderCircle, d as cn, e as Toaster$1, S as ServerConfigProvider, f as TooltipProvider } from "./mermaid-3ZIDBTTL-B9v3aKRl.js";
|
|
3
|
+
var M = (e, i, s, u, m, a, l, h) => {
|
|
4
|
+
let d = document.documentElement, w = ["light", "dark"];
|
|
5
|
+
function p(n) {
|
|
6
|
+
(Array.isArray(e) ? e : [e]).forEach((y) => {
|
|
7
|
+
let k = y === "class", S = k && a ? m.map((f) => a[f] || f) : m;
|
|
8
|
+
k ? (d.classList.remove(...S), d.classList.add(a && a[n] ? a[n] : n)) : d.setAttribute(y, n);
|
|
9
|
+
}), R(n);
|
|
10
|
+
}
|
|
11
|
+
function R(n) {
|
|
12
|
+
h && w.includes(n) && (d.style.colorScheme = n);
|
|
13
|
+
}
|
|
14
|
+
function c() {
|
|
15
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
16
|
+
}
|
|
17
|
+
if (u) p(u);
|
|
18
|
+
else try {
|
|
19
|
+
let n = localStorage.getItem(i) || s, y = l && n === "system" ? c() : n;
|
|
20
|
+
p(y);
|
|
21
|
+
} catch (n) {
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
var b = ["light", "dark"], I = "(prefers-color-scheme: dark)", O = typeof window == "undefined", x = reactExports.createContext(void 0), U = { setTheme: (e) => {
|
|
25
|
+
}, themes: [] }, z = () => {
|
|
26
|
+
var e;
|
|
27
|
+
return (e = reactExports.useContext(x)) != null ? e : U;
|
|
28
|
+
}, J = (e) => reactExports.useContext(x) ? reactExports.createElement(reactExports.Fragment, null, e.children) : reactExports.createElement(V, { ...e }), N = ["light", "dark"], V = ({ forcedTheme: e, disableTransitionOnChange: i = false, enableSystem: s = true, enableColorScheme: u = true, storageKey: m = "theme", themes: a = N, defaultTheme: l = s ? "system" : "light", attribute: h = "data-theme", value: d, children: w, nonce: p, scriptProps: R }) => {
|
|
29
|
+
let [c, n] = reactExports.useState(() => H(m, l)), [T, y] = reactExports.useState(() => c === "system" ? E() : c), k = d ? Object.values(d) : a, S = reactExports.useCallback((o) => {
|
|
30
|
+
let r = o;
|
|
31
|
+
if (!r) return;
|
|
32
|
+
o === "system" && s && (r = E());
|
|
33
|
+
let v = d ? d[r] : r, C = i ? W(p) : null, P = document.documentElement, L = (g) => {
|
|
34
|
+
g === "class" ? (P.classList.remove(...k), v && P.classList.add(v)) : g.startsWith("data-") && (v ? P.setAttribute(g, v) : P.removeAttribute(g));
|
|
35
|
+
};
|
|
36
|
+
if (Array.isArray(h) ? h.forEach(L) : L(h), u) {
|
|
37
|
+
let g = b.includes(l) ? l : null, D = b.includes(r) ? r : g;
|
|
38
|
+
P.style.colorScheme = D;
|
|
39
|
+
}
|
|
40
|
+
C == null || C();
|
|
41
|
+
}, [p]), f = reactExports.useCallback((o) => {
|
|
42
|
+
let r = typeof o == "function" ? o(c) : o;
|
|
43
|
+
n(r);
|
|
44
|
+
try {
|
|
45
|
+
localStorage.setItem(m, r);
|
|
46
|
+
} catch (v) {
|
|
47
|
+
}
|
|
48
|
+
}, [c]), A = reactExports.useCallback((o) => {
|
|
49
|
+
let r = E(o);
|
|
50
|
+
y(r), c === "system" && s && !e && S("system");
|
|
51
|
+
}, [c, e]);
|
|
52
|
+
reactExports.useEffect(() => {
|
|
53
|
+
let o = window.matchMedia(I);
|
|
54
|
+
return o.addListener(A), A(o), () => o.removeListener(A);
|
|
55
|
+
}, [A]), reactExports.useEffect(() => {
|
|
56
|
+
let o = (r) => {
|
|
57
|
+
r.key === m && (r.newValue ? n(r.newValue) : f(l));
|
|
58
|
+
};
|
|
59
|
+
return window.addEventListener("storage", o), () => window.removeEventListener("storage", o);
|
|
60
|
+
}, [f]), reactExports.useEffect(() => {
|
|
61
|
+
S(e != null ? e : c);
|
|
62
|
+
}, [e, c]);
|
|
63
|
+
let Q = reactExports.useMemo(() => ({ theme: c, setTheme: f, forcedTheme: e, resolvedTheme: c === "system" ? T : c, themes: s ? [...a, "system"] : a, systemTheme: s ? T : void 0 }), [c, f, e, T, s, a]);
|
|
64
|
+
return reactExports.createElement(x.Provider, { value: Q }, reactExports.createElement(_, { forcedTheme: e, storageKey: m, attribute: h, enableSystem: s, enableColorScheme: u, defaultTheme: l, value: d, themes: a, nonce: p, scriptProps: R }), w);
|
|
65
|
+
}, _ = reactExports.memo(({ forcedTheme: e, storageKey: i, attribute: s, enableSystem: u, enableColorScheme: m, defaultTheme: a, value: l, themes: h, nonce: d, scriptProps: w }) => {
|
|
66
|
+
let p = JSON.stringify([s, i, a, e, h, l, u, m]).slice(1, -1);
|
|
67
|
+
return reactExports.createElement("script", { ...w, suppressHydrationWarning: true, nonce: typeof window == "undefined" ? d : "", dangerouslySetInnerHTML: { __html: `(${M.toString()})(${p})` } });
|
|
68
|
+
}), H = (e, i) => {
|
|
69
|
+
if (O) return;
|
|
70
|
+
let s;
|
|
71
|
+
try {
|
|
72
|
+
s = localStorage.getItem(e) || void 0;
|
|
73
|
+
} catch (u) {
|
|
74
|
+
}
|
|
75
|
+
return s || i;
|
|
76
|
+
}, W = (e) => {
|
|
77
|
+
let i = document.createElement("style");
|
|
78
|
+
return e && i.setAttribute("nonce", e), i.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")), document.head.appendChild(i), () => {
|
|
79
|
+
window.getComputedStyle(document.body), setTimeout(() => {
|
|
80
|
+
document.head.removeChild(i);
|
|
81
|
+
}, 1);
|
|
82
|
+
};
|
|
83
|
+
}, E = (e) => (e || (e = window.matchMedia(I)), e.matches ? "dark" : "light");
|
|
84
|
+
/**
|
|
85
|
+
* @license lucide-react v0.575.0 - ISC
|
|
86
|
+
*
|
|
87
|
+
* This source code is licensed under the ISC license.
|
|
88
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
+
*/
|
|
90
|
+
const __iconNode$4 = [
|
|
91
|
+
[
|
|
92
|
+
"path",
|
|
93
|
+
{
|
|
94
|
+
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
95
|
+
key: "169zse"
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
];
|
|
99
|
+
const Activity = createLucideIcon("activity", __iconNode$4);
|
|
100
|
+
/**
|
|
101
|
+
* @license lucide-react v0.575.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/
|
|
106
|
+
const __iconNode$3 = [
|
|
107
|
+
["path", { d: "M7 7h10v10", key: "1tivn9" }],
|
|
108
|
+
["path", { d: "M7 17 17 7", key: "1vkiza" }]
|
|
109
|
+
];
|
|
110
|
+
const ArrowUpRight = createLucideIcon("arrow-up-right", __iconNode$3);
|
|
111
|
+
/**
|
|
112
|
+
* @license lucide-react v0.575.0 - ISC
|
|
113
|
+
*
|
|
114
|
+
* This source code is licensed under the ISC license.
|
|
115
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
+
*/
|
|
117
|
+
const __iconNode$2 = [
|
|
118
|
+
["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
|
|
119
|
+
["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
|
|
120
|
+
["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
|
|
121
|
+
];
|
|
122
|
+
const Monitor = createLucideIcon("monitor", __iconNode$2);
|
|
123
|
+
/**
|
|
124
|
+
* @license lucide-react v0.575.0 - ISC
|
|
125
|
+
*
|
|
126
|
+
* This source code is licensed under the ISC license.
|
|
127
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
+
*/
|
|
129
|
+
const __iconNode$1 = [
|
|
130
|
+
[
|
|
131
|
+
"path",
|
|
132
|
+
{
|
|
133
|
+
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
134
|
+
key: "kfwtm"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
];
|
|
138
|
+
const Moon = createLucideIcon("moon", __iconNode$1);
|
|
139
|
+
/**
|
|
140
|
+
* @license lucide-react v0.575.0 - ISC
|
|
141
|
+
*
|
|
142
|
+
* This source code is licensed under the ISC license.
|
|
143
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
+
*/
|
|
145
|
+
const __iconNode = [
|
|
146
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
147
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
148
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
149
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
150
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
151
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
152
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
153
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
154
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
155
|
+
];
|
|
156
|
+
const Sun = createLucideIcon("sun", __iconNode);
|
|
157
|
+
function getLocalShortName(displayInfo) {
|
|
158
|
+
return displayInfo == null ? void 0 : displayInfo["local.shortName"];
|
|
159
|
+
}
|
|
160
|
+
function getShowLocalMisconfigWarning(backendId, displayInfo) {
|
|
161
|
+
return (backendId === "local" || backendId === "@workflow/world-local") && getLocalShortName(displayInfo) === "packages/web";
|
|
162
|
+
}
|
|
163
|
+
function getVercelDisplayString(publicEnv) {
|
|
164
|
+
const env = publicEnv.WORKFLOW_VERCEL_ENV || "production";
|
|
165
|
+
const team = publicEnv.WORKFLOW_VERCEL_TEAM;
|
|
166
|
+
const project = publicEnv.WORKFLOW_VERCEL_PROJECT;
|
|
167
|
+
const vercelInfo = team && project ? `${team}/${project}` : project || team || "Unknown";
|
|
168
|
+
return `Connected to Vercel ${env} (${vercelInfo})`;
|
|
169
|
+
}
|
|
170
|
+
function getPostgresDisplayString(displayInfo) {
|
|
171
|
+
const host = displayInfo == null ? void 0 : displayInfo["derived.WORKFLOW_POSTGRES_URL.hostname"];
|
|
172
|
+
const db = displayInfo == null ? void 0 : displayInfo["derived.WORKFLOW_POSTGRES_URL.database"];
|
|
173
|
+
if (!host) return "Connected to Postgres";
|
|
174
|
+
return `Connected to Postgres (${host}${db ? `/${db}` : ""})`;
|
|
175
|
+
}
|
|
176
|
+
function getDisplayString(config) {
|
|
177
|
+
const { backendDisplayName, backendId, displayInfo, publicEnv } = config;
|
|
178
|
+
switch (backendId) {
|
|
179
|
+
case "local":
|
|
180
|
+
case "@workflow/world-local":
|
|
181
|
+
return `Local Dev: ${getLocalShortName(displayInfo) || "Unknown"}`;
|
|
182
|
+
case "vercel":
|
|
183
|
+
case "@workflow/world-vercel":
|
|
184
|
+
return getVercelDisplayString(publicEnv);
|
|
185
|
+
case "postgres":
|
|
186
|
+
case "@workflow/world-postgres":
|
|
187
|
+
return getPostgresDisplayString(displayInfo);
|
|
188
|
+
default:
|
|
189
|
+
return `Connected to: ${backendDisplayName}`;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function renderKeyValueTable(rows) {
|
|
193
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-[auto,1fr] gap-x-4 gap-y-1", children: rows.map(({ key, value }) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "contents", children: [
|
|
194
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-muted-foreground", children: key }),
|
|
195
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-mono text-xs text-foreground break-all", children: value })
|
|
196
|
+
] }, key)) });
|
|
197
|
+
}
|
|
198
|
+
function ConnectionStatus() {
|
|
199
|
+
const { serverConfig } = useServerConfig();
|
|
200
|
+
const displayString = getDisplayString(serverConfig);
|
|
201
|
+
const { backendId } = serverConfig;
|
|
202
|
+
const showLocalMisconfigWarning = getShowLocalMisconfigWarning(
|
|
203
|
+
backendId,
|
|
204
|
+
serverConfig.displayInfo
|
|
205
|
+
);
|
|
206
|
+
const publicEnvEntries = Object.entries(serverConfig.publicEnv).sort(
|
|
207
|
+
([a], [b2]) => a.localeCompare(b2)
|
|
208
|
+
);
|
|
209
|
+
const sensitiveKeys = [...serverConfig.sensitiveEnvKeys].sort();
|
|
210
|
+
const hasTooltip = publicEnvEntries.length > 0 || sensitiveKeys.length > 0 || showLocalMisconfigWarning;
|
|
211
|
+
const content = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-md whitespace-nowrap", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "font-medium", children: displayString }) });
|
|
212
|
+
if (!hasTooltip) {
|
|
213
|
+
return content;
|
|
214
|
+
}
|
|
215
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
216
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: content }),
|
|
217
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-2 max-w-[640px]", children: [
|
|
218
|
+
showLocalMisconfigWarning && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "mb-2", children: [
|
|
219
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "font-medium text-foreground", children: "Local data directory looks misconfigured" }),
|
|
220
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "text-muted-foreground", children: [
|
|
221
|
+
"This UI appears to be pointing at ",
|
|
222
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("code", { children: "packages/web" }),
|
|
223
|
+
". Configure the local data directory / working directory and restart the web UI. See",
|
|
224
|
+
" ",
|
|
225
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
226
|
+
"a",
|
|
227
|
+
{
|
|
228
|
+
className: "underline",
|
|
229
|
+
href: "https://workflow-sdk.dev/docs/observability",
|
|
230
|
+
target: "_blank",
|
|
231
|
+
rel: "noopener noreferrer",
|
|
232
|
+
children: "docs"
|
|
233
|
+
}
|
|
234
|
+
),
|
|
235
|
+
"."
|
|
236
|
+
] })
|
|
237
|
+
] }),
|
|
238
|
+
renderKeyValueTable([
|
|
239
|
+
...publicEnvEntries.map(([key, value]) => ({ key, value })),
|
|
240
|
+
...sensitiveKeys.map((key) => ({ key, value: "*****" }))
|
|
241
|
+
])
|
|
242
|
+
] }) })
|
|
243
|
+
] });
|
|
244
|
+
}
|
|
245
|
+
function HealthCheckButton() {
|
|
246
|
+
const [isChecking, setIsChecking] = reactExports.useState(false);
|
|
247
|
+
const env = reactExports.useMemo(() => ({}), []);
|
|
248
|
+
const runChecks = reactExports.useCallback(async () => {
|
|
249
|
+
setIsChecking(true);
|
|
250
|
+
const endpoints = ["workflow", "step"];
|
|
251
|
+
const results = [];
|
|
252
|
+
try {
|
|
253
|
+
for (const endpoint of endpoints) {
|
|
254
|
+
const response = await runHealthCheck(env, endpoint, {
|
|
255
|
+
timeout: 3e4
|
|
256
|
+
});
|
|
257
|
+
if (response.success) {
|
|
258
|
+
results.push({ endpoint, result: response.data });
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
const allHealthy = results.every((r) => r.result.healthy);
|
|
262
|
+
const anyHealthy = results.some((r) => r.result.healthy);
|
|
263
|
+
if (allHealthy) {
|
|
264
|
+
const totalLatency = results.reduce(
|
|
265
|
+
(sum, r) => sum + (r.result.latencyMs ?? 0),
|
|
266
|
+
0
|
|
267
|
+
);
|
|
268
|
+
toast.success("All endpoints healthy", {
|
|
269
|
+
description: `Workflow and Step endpoints are responding (${totalLatency}ms total)`
|
|
270
|
+
});
|
|
271
|
+
} else if (anyHealthy) {
|
|
272
|
+
const healthy = results.filter((r) => r.result.healthy);
|
|
273
|
+
const unhealthy = results.filter((r) => !r.result.healthy);
|
|
274
|
+
toast.warning("Partial health check success", {
|
|
275
|
+
description: `${healthy.map((r) => r.endpoint).join(", ")} OK; ${unhealthy.map((r) => `${r.endpoint}: ${r.result.error || "failed"}`).join(", ")}`
|
|
276
|
+
});
|
|
277
|
+
} else {
|
|
278
|
+
const errors = results.map((r) => `${r.endpoint}: ${r.result.error || "failed"}`).join("; ");
|
|
279
|
+
toast.error("Health check failed", {
|
|
280
|
+
description: errors
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
} catch (error) {
|
|
284
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
285
|
+
toast.error("Health check error", {
|
|
286
|
+
description: message
|
|
287
|
+
});
|
|
288
|
+
} finally {
|
|
289
|
+
setIsChecking(false);
|
|
290
|
+
}
|
|
291
|
+
}, [env]);
|
|
292
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tooltip, { children: [
|
|
293
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
294
|
+
Button,
|
|
295
|
+
{
|
|
296
|
+
variant: "ghost",
|
|
297
|
+
size: "sm",
|
|
298
|
+
onClick: runChecks,
|
|
299
|
+
disabled: isChecking,
|
|
300
|
+
className: "gap-1.5",
|
|
301
|
+
children: [
|
|
302
|
+
isChecking ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Activity, { className: "h-4 w-4" }),
|
|
303
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "hidden sm:inline", children: isChecking ? "Checking..." : "Health Check" })
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
) }),
|
|
307
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(TooltipContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
|
|
308
|
+
"Run a queue-based health check on workflow and step endpoints.",
|
|
309
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
|
|
310
|
+
"This bypasses Deployment Protection."
|
|
311
|
+
] }) })
|
|
312
|
+
] });
|
|
313
|
+
}
|
|
314
|
+
function SegmentedControl({
|
|
315
|
+
value,
|
|
316
|
+
onValueChange,
|
|
317
|
+
options,
|
|
318
|
+
className
|
|
319
|
+
}) {
|
|
320
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
321
|
+
"div",
|
|
322
|
+
{
|
|
323
|
+
className: cn(
|
|
324
|
+
"inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
325
|
+
className
|
|
326
|
+
),
|
|
327
|
+
children: options.map((option) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
328
|
+
"button",
|
|
329
|
+
{
|
|
330
|
+
type: "button",
|
|
331
|
+
onClick: () => onValueChange(option.value),
|
|
332
|
+
className: cn(
|
|
333
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
334
|
+
value === option.value ? "bg-background text-foreground shadow" : "hover:bg-background/50"
|
|
335
|
+
),
|
|
336
|
+
children: [
|
|
337
|
+
option.icon,
|
|
338
|
+
option.label && /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ml-2", children: option.label })
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
option.value
|
|
342
|
+
))
|
|
343
|
+
}
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
function ThemePicker() {
|
|
347
|
+
const { theme, setTheme } = z();
|
|
348
|
+
const currentTheme = theme || "system";
|
|
349
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
350
|
+
SegmentedControl,
|
|
351
|
+
{
|
|
352
|
+
value: currentTheme,
|
|
353
|
+
onValueChange: (value) => setTheme(value),
|
|
354
|
+
options: [
|
|
355
|
+
{ value: "system", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Monitor, { className: "h-4 w-4" }) },
|
|
356
|
+
{ value: "light", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Sun, { className: "h-4 w-4" }) },
|
|
357
|
+
{ value: "dark", icon: /* @__PURE__ */ jsxRuntimeExports.jsx(Moon, { className: "h-4 w-4" }) }
|
|
358
|
+
],
|
|
359
|
+
className: "h-8"
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
function DocsLink() {
|
|
364
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
365
|
+
"a",
|
|
366
|
+
{
|
|
367
|
+
href: "https://workflow-sdk.dev/docs/observability",
|
|
368
|
+
target: "_blank",
|
|
369
|
+
rel: "noopener noreferrer",
|
|
370
|
+
className: "gap-1",
|
|
371
|
+
children: [
|
|
372
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Docs" }),
|
|
373
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(ArrowUpRight, { className: "h-4 w-4" })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
) });
|
|
377
|
+
}
|
|
378
|
+
const Toaster = ({ ...props }) => {
|
|
379
|
+
const { theme = "system" } = z();
|
|
380
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
381
|
+
Toaster$1,
|
|
382
|
+
{
|
|
383
|
+
theme,
|
|
384
|
+
className: "toaster group",
|
|
385
|
+
toastOptions: {
|
|
386
|
+
classNames: {
|
|
387
|
+
toast: "group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
|
388
|
+
description: "group-[.toast]:text-muted-foreground",
|
|
389
|
+
actionButton: "group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
|
|
390
|
+
cancelButton: "group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
|
|
391
|
+
error: "group-[.toaster]:bg-destructive group-[.toaster]:text-destructive-foreground group-[.toaster]:border-destructive",
|
|
392
|
+
success: "group-[.toaster]:bg-green-600 group-[.toaster]:text-white group-[.toaster]:border-green-600"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
...props
|
|
396
|
+
}
|
|
397
|
+
);
|
|
398
|
+
};
|
|
399
|
+
function Logo({ className } = {}) {
|
|
400
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
401
|
+
"svg",
|
|
402
|
+
{
|
|
403
|
+
viewBox: "0 0 1792 240",
|
|
404
|
+
fill: "none",
|
|
405
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
406
|
+
className: className || "h-6 w-auto",
|
|
407
|
+
role: "img",
|
|
408
|
+
"aria-label": "Workflow Logo",
|
|
409
|
+
children: [
|
|
410
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("title", { children: "Workflow Logo" }),
|
|
411
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
412
|
+
"path",
|
|
413
|
+
{
|
|
414
|
+
fillRule: "evenodd",
|
|
415
|
+
clipRule: "evenodd",
|
|
416
|
+
d: "M753.933 55.627C806.249 55.627 840.685 91.718 840.685 147.345C840.685 202.971 806.249 239.062 753.933 239.062C701.286 239.062 666.851 202.971 666.851 147.345C666.851 91.7181 701.286 55.6271 753.933 55.627ZM753.933 90.0625C726.451 90.0626 710.889 111.254 710.889 147.345C710.889 183.436 726.451 204.627 753.933 204.627C781.084 204.627 796.978 183.436 796.978 147.345C796.978 111.254 781.084 90.0625 753.933 90.0625Z",
|
|
417
|
+
className: "fill-foreground"
|
|
418
|
+
}
|
|
419
|
+
),
|
|
420
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
421
|
+
"path",
|
|
422
|
+
{
|
|
423
|
+
fillRule: "evenodd",
|
|
424
|
+
clipRule: "evenodd",
|
|
425
|
+
d: "M1445.65 55.627C1497.96 55.627 1532.4 91.718 1532.4 147.345C1532.4 202.971 1497.96 239.062 1445.65 239.062C1393 239.062 1358.56 202.971 1358.56 147.345C1358.56 91.718 1393 55.627 1445.65 55.627ZM1445.65 90.0625C1418.16 90.0625 1402.6 111.254 1402.6 147.345C1402.6 183.436 1418.16 204.627 1445.65 204.627C1472.8 204.627 1488.69 183.436 1488.69 147.345C1488.69 111.254 1472.8 90.0626 1445.65 90.0625Z",
|
|
426
|
+
className: "fill-foreground"
|
|
427
|
+
}
|
|
428
|
+
),
|
|
429
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
430
|
+
"path",
|
|
431
|
+
{
|
|
432
|
+
d: "M902.473 94.0361C909.095 70.8584 922.34 59.5997 944.855 59.5996H961.079V92.3799H944.524C916.38 92.38 904.128 106.949 904.128 135.094V235.089H861.746V59.5996H901.48L902.473 94.0361Z",
|
|
433
|
+
className: "fill-foreground"
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
437
|
+
"path",
|
|
438
|
+
{
|
|
439
|
+
d: "M1019.25 138.735L1091.11 59.5996H1143.09L1074.55 132.113L1146.4 235.089H1098.72L1046.74 157.609L1019.25 187.078V235.089H976.872V0H1019.25V138.735Z",
|
|
440
|
+
className: "fill-foreground"
|
|
441
|
+
}
|
|
442
|
+
),
|
|
443
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
444
|
+
"path",
|
|
445
|
+
{
|
|
446
|
+
d: "M1263.63 32.7803H1235.82C1224.89 32.7803 1217.28 41.3893 1217.28 54.9648V59.5996H1260.98V92.3799H1217.28V235.089H1174.56V92.3799H1149.4V59.5996H1174.56V54.9648C1174.56 19.5359 1191.78 0 1230.85 0H1263.63V32.7803Z",
|
|
447
|
+
className: "fill-foreground"
|
|
448
|
+
}
|
|
449
|
+
),
|
|
450
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
451
|
+
"path",
|
|
452
|
+
{
|
|
453
|
+
d: "M1322.58 189.396C1322.58 197.673 1327.22 202.309 1335.5 202.31H1348.74V235.089H1324.57C1298.08 235.089 1280.2 218.534 1280.2 191.052V0H1322.58V189.396Z",
|
|
454
|
+
className: "fill-foreground"
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
458
|
+
"path",
|
|
459
|
+
{
|
|
460
|
+
d: "M1604.59 186.416L1641.02 59.5996H1677.77L1713.86 186.416L1749.95 59.5996H1791.34L1737.7 235.089H1694.32L1659.56 116.883L1624.79 235.089H1581.42L1527.77 59.5996H1568.83L1604.59 186.416Z",
|
|
461
|
+
className: "fill-foreground"
|
|
462
|
+
}
|
|
463
|
+
),
|
|
464
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
465
|
+
"path",
|
|
466
|
+
{
|
|
467
|
+
d: "M472.173 174.847L514.895 0.671875H554.66L598.038 174.847L640.432 0.671875H685.454L623.015 234H575.692L534.942 77.5713L493.863 234H446.869L384.1 0.671875H429.122L472.173 174.847Z",
|
|
468
|
+
className: "fill-foreground"
|
|
469
|
+
}
|
|
470
|
+
),
|
|
471
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
472
|
+
"path",
|
|
473
|
+
{
|
|
474
|
+
d: "M125.776 0C120.929 1.64945e-05 117 3.9291 117 8.77539V61.4248C117 66.2711 120.929 70.2002 125.776 70.2002H160.875L161.253 70.2051C169.032 70.4023 175.301 76.6734 175.495 84.4531L175.5 84.8252V143.325C175.5 148.171 179.429 152.101 184.276 152.101H219.375L219.753 152.105C227.53 152.303 233.798 158.571 233.995 166.348L234 166.726V225.225C234 230.071 237.929 234 242.776 234H295.425C300.271 234 304.2 230.071 304.2 225.225V172.575C304.2 167.729 300.271 163.8 295.425 163.8H260.25C252.334 163.76 245.905 157.43 245.705 149.553L245.7 149.176V90.6758C245.7 85.8295 241.771 81.9004 236.925 81.9004H201.825C193.874 81.9004 187.405 75.5551 187.205 67.6523L187.2 67.2754V8.77539C187.2 3.9291 183.271 1.64951e-05 178.425 0H125.776Z",
|
|
475
|
+
className: "fill-foreground"
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
479
|
+
"path",
|
|
480
|
+
{
|
|
481
|
+
d: "M67.2755 81.9004C62.4293 81.9004 58.5002 85.8295 58.5002 90.6758V143.325C58.5004 148.171 62.4294 152.101 67.2755 152.101H102.375L102.753 152.105C110.53 152.303 116.798 158.571 116.995 166.348L117 166.726V225.225C117 230.071 120.929 234 125.776 234H178.425C183.271 234 187.2 230.071 187.2 225.225V172.575C187.2 167.729 183.271 163.8 178.425 163.8H143.25C135.334 163.76 128.905 157.43 128.705 149.553L128.7 149.176V90.6758C128.7 85.8295 124.771 81.9004 119.925 81.9004H67.2755Z",
|
|
482
|
+
className: "fill-foreground"
|
|
483
|
+
}
|
|
484
|
+
),
|
|
485
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
486
|
+
"path",
|
|
487
|
+
{
|
|
488
|
+
d: "M8.77454 163.8C3.92844 163.8 0.00012207 167.729 0.00012207 172.575V225.225C0.00012207 230.071 3.92844 234 8.77454 234H61.4249C66.2712 234 70.2003 230.071 70.2003 225.225V172.575C70.2003 167.729 66.2712 163.8 61.4249 163.8H8.77454Z",
|
|
489
|
+
className: "fill-foreground"
|
|
490
|
+
}
|
|
491
|
+
)
|
|
492
|
+
]
|
|
493
|
+
}
|
|
494
|
+
);
|
|
495
|
+
}
|
|
496
|
+
function Layout({
|
|
497
|
+
children
|
|
498
|
+
}) {
|
|
499
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("html", {
|
|
500
|
+
lang: "en",
|
|
501
|
+
suppressHydrationWarning: true,
|
|
502
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("head", {
|
|
503
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("meta", {
|
|
504
|
+
charSet: "utf-8"
|
|
505
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("meta", {
|
|
506
|
+
name: "viewport",
|
|
507
|
+
content: "width=device-width, initial-scale=1"
|
|
508
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("link", {
|
|
509
|
+
rel: "icon",
|
|
510
|
+
href: "/favicon.ico"
|
|
511
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("title", {
|
|
512
|
+
children: "Workflow Observability UI"
|
|
513
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("meta", {
|
|
514
|
+
name: "description",
|
|
515
|
+
content: "Web interface for inspecting flow runs, steps, streams, and events"
|
|
516
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Meta, {}), /* @__PURE__ */ jsxRuntimeExports.jsx(Links, {})]
|
|
517
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("body", {
|
|
518
|
+
className: "antialiased",
|
|
519
|
+
children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollRestoration, {}), /* @__PURE__ */ jsxRuntimeExports.jsx(Scripts, {})]
|
|
520
|
+
})]
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
function computeDirectRunUrl(params) {
|
|
524
|
+
const {
|
|
525
|
+
runId,
|
|
526
|
+
stepId,
|
|
527
|
+
hookId
|
|
528
|
+
} = params;
|
|
529
|
+
if (stepId) {
|
|
530
|
+
return `/run/${runId}?sidebar=step&stepId=${stepId}`;
|
|
531
|
+
}
|
|
532
|
+
if (hookId) {
|
|
533
|
+
return `/run/${runId}?sidebar=hook&hookId=${hookId}`;
|
|
534
|
+
}
|
|
535
|
+
return `/run/${runId}`;
|
|
536
|
+
}
|
|
537
|
+
function computeResourceUrl(params) {
|
|
538
|
+
const {
|
|
539
|
+
resource,
|
|
540
|
+
id,
|
|
541
|
+
runId
|
|
542
|
+
} = params;
|
|
543
|
+
switch (resource) {
|
|
544
|
+
case "run":
|
|
545
|
+
return `/run/${id}`;
|
|
546
|
+
case "step":
|
|
547
|
+
return runId ? `/run/${runId}?sidebar=step&stepId=${id}` : null;
|
|
548
|
+
case "stream":
|
|
549
|
+
return runId ? `/run/${runId}?sidebar=stream&streamId=${id}` : null;
|
|
550
|
+
case "event":
|
|
551
|
+
return runId ? `/run/${runId}?sidebar=event&eventId=${id}` : null;
|
|
552
|
+
case "hook":
|
|
553
|
+
return runId ? `/run/${runId}?sidebar=hook&hookId=${id}` : `/?sidebar=hook&hookId=${id}`;
|
|
554
|
+
default:
|
|
555
|
+
return null;
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
function LayoutContent({
|
|
559
|
+
children
|
|
560
|
+
}) {
|
|
561
|
+
const navigate = useNavigate();
|
|
562
|
+
const [searchParams] = useSearchParams();
|
|
563
|
+
const {
|
|
564
|
+
setTheme
|
|
565
|
+
} = z();
|
|
566
|
+
const id = searchParams.get("id");
|
|
567
|
+
const runId = searchParams.get("runId");
|
|
568
|
+
const stepId = searchParams.get("stepId");
|
|
569
|
+
const hookId = searchParams.get("hookId");
|
|
570
|
+
const resource = searchParams.get("resource");
|
|
571
|
+
const themeParam = searchParams.get("theme");
|
|
572
|
+
const hasNavigatedRef = reactExports.useRef(false);
|
|
573
|
+
reactExports.useEffect(() => {
|
|
574
|
+
if (themeParam && (themeParam === "light" || themeParam === "dark" || themeParam === "system")) {
|
|
575
|
+
setTheme(themeParam);
|
|
576
|
+
}
|
|
577
|
+
}, [themeParam, setTheme]);
|
|
578
|
+
reactExports.useEffect(() => {
|
|
579
|
+
const pathname = window.location.pathname;
|
|
580
|
+
if (pathname.startsWith("/run/")) {
|
|
581
|
+
hasNavigatedRef.current = true;
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
if (pathname !== "/" && hasNavigatedRef.current) {
|
|
585
|
+
return;
|
|
586
|
+
}
|
|
587
|
+
if (resource) {
|
|
588
|
+
if (!id) return;
|
|
589
|
+
const url = computeResourceUrl({
|
|
590
|
+
resource,
|
|
591
|
+
id,
|
|
592
|
+
runId
|
|
593
|
+
});
|
|
594
|
+
if (url) {
|
|
595
|
+
hasNavigatedRef.current = true;
|
|
596
|
+
navigate(url);
|
|
597
|
+
} else {
|
|
598
|
+
console.warn(`Can't deep-link to ${resource} ${id}.`);
|
|
599
|
+
}
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
if (runId) {
|
|
603
|
+
hasNavigatedRef.current = true;
|
|
604
|
+
navigate(computeDirectRunUrl({
|
|
605
|
+
runId,
|
|
606
|
+
stepId,
|
|
607
|
+
hookId
|
|
608
|
+
}));
|
|
609
|
+
return;
|
|
610
|
+
}
|
|
611
|
+
}, [resource, id, runId, stepId, hookId, navigate]);
|
|
612
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
613
|
+
className: "min-h-screen flex flex-col",
|
|
614
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(TooltipProvider, {
|
|
615
|
+
delayDuration: 0,
|
|
616
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
617
|
+
className: "sticky top-0 z-50 bg-background border-b px-6 py-4",
|
|
618
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
619
|
+
className: "flex items-center justify-between w-full",
|
|
620
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
621
|
+
className: "flex items-center gap-4",
|
|
622
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Link, {
|
|
623
|
+
to: "/",
|
|
624
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx("h1", {
|
|
625
|
+
className: "flex items-center gap-2",
|
|
626
|
+
title: "Workflow Observability",
|
|
627
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Logo, {})
|
|
628
|
+
})
|
|
629
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
630
|
+
className: "h-6 w-px bg-border",
|
|
631
|
+
"aria-hidden": "true"
|
|
632
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(ConnectionStatus, {})]
|
|
633
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
634
|
+
className: "ml-auto flex items-center gap-2",
|
|
635
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(HealthCheckButton, {}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
636
|
+
className: "h-6 w-px bg-border",
|
|
637
|
+
"aria-hidden": "true"
|
|
638
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(ThemePicker, {}), /* @__PURE__ */ jsxRuntimeExports.jsx(DocsLink, {})]
|
|
639
|
+
})]
|
|
640
|
+
})
|
|
641
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
642
|
+
className: "flex-1 px-6 pt-6",
|
|
643
|
+
children
|
|
644
|
+
})]
|
|
645
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Toaster, {})]
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
const root = withComponentProps(function App({
|
|
649
|
+
loaderData
|
|
650
|
+
}) {
|
|
651
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(J, {
|
|
652
|
+
attribute: "class",
|
|
653
|
+
defaultTheme: "system",
|
|
654
|
+
enableSystem: true,
|
|
655
|
+
disableTransitionOnChange: true,
|
|
656
|
+
storageKey: "workflow-theme",
|
|
657
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ServerConfigProvider, {
|
|
658
|
+
serverConfig: loaderData.serverConfig,
|
|
659
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(LayoutContent, {
|
|
660
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Outlet, {})
|
|
661
|
+
})
|
|
662
|
+
})
|
|
663
|
+
});
|
|
664
|
+
});
|
|
665
|
+
const ErrorBoundary = withErrorBoundaryProps(function ErrorBoundary2() {
|
|
666
|
+
const error = useRouteError();
|
|
667
|
+
const isNotFound = isRouteErrorResponse(error) && error.status === 404;
|
|
668
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
669
|
+
className: "min-h-screen flex items-center justify-center",
|
|
670
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
671
|
+
className: "text-center",
|
|
672
|
+
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("h1", {
|
|
673
|
+
className: "text-4xl font-bold mb-4",
|
|
674
|
+
children: isNotFound ? "404" : "Error"
|
|
675
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("p", {
|
|
676
|
+
className: "text-muted-foreground mb-6",
|
|
677
|
+
children: isNotFound ? "This page does not exist." : "Something went wrong."
|
|
678
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Link, {
|
|
679
|
+
to: "/",
|
|
680
|
+
className: "text-primary underline",
|
|
681
|
+
children: "Go to dashboard"
|
|
682
|
+
})]
|
|
683
|
+
})
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
export {
|
|
687
|
+
ErrorBoundary,
|
|
688
|
+
Layout,
|
|
689
|
+
root as default
|
|
690
|
+
};
|