@loopstack/loopstack-studio 0.25.2 → 0.26.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/api/environments.js +4 -0
- package/dist/api/index.js +13 -9
- package/dist/app/EnvironmentEmbedRoot.js +29 -19
- package/dist/components/data-table/DataList.js +93 -91
- package/dist/components/data-table/DataTable.js +128 -126
- package/dist/components/feedback/Snackbar.js +1 -1
- package/dist/components/layout/StudioSidebar.js +124 -131
- package/dist/components/ui/sidebar.js +2 -2
- package/dist/components/ui/slider.js +37 -26
- package/dist/components/ui-widgets/widgets/SandboxRun.js +16 -14
- package/dist/features/code-explorer/components/CodeExplorerTree.js +1 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +1 -1
- package/dist/features/dashboard/RunItem.js +39 -37
- package/dist/features/debug/lib/flow-utils.js +1 -1
- package/dist/features/documents/DocumentRenderer.js +59 -58
- package/dist/features/documents/renderers/useDocumentTransition.js +29 -24
- package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
- package/dist/features/feature-registry/index.js +1 -0
- package/dist/features/file-explorer/api/files.js +7 -0
- package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
- package/dist/features/{workbench/components/RemoteFileTabsBar.js → file-explorer/components/FileTabsBar.js} +4 -4
- package/dist/features/{workbench/components/RemoteFileTree.js → file-explorer/components/FileTree.js} +6 -6
- package/dist/features/file-explorer/file-explorer-feature.js +12 -0
- package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
- package/dist/features/file-explorer/index.js +2 -0
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +162 -132
- package/dist/features/runs/Runs.js +1 -1
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
- package/dist/features/secrets/index.js +1 -0
- package/dist/features/{documents → secrets}/renderers/SecretInputRenderer.js +17 -17
- package/dist/features/secrets/secrets-feature.js +14 -0
- package/dist/features/workbench/Workbench.js +32 -82
- package/dist/features/workbench/WorkflowList.js +109 -46
- package/dist/features/workbench/components/SidebarPanel.js +155 -0
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +128 -60
- package/dist/features/workbench/components/WorkbenchPreviewPanel.js +127 -114
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +3 -3
- package/dist/features/workbench/index.js +3 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +60 -62
- package/dist/features/workspaces/Workspaces.js +1 -1
- package/dist/features/workspaces/components/EnvironmentSlotSelector.js +68 -51
- package/dist/features/workspaces/components/WorkflowRunForm.js +1 -1
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
- package/dist/hooks/useEnvironments.js +8 -0
- package/dist/hooks/useWorkflows.js +28 -26
- package/dist/hooks/useWorkspaces.js +28 -26
- package/dist/index.d.ts +98 -7
- package/dist/index.js +8 -1
- package/dist/loopstack-studio.css +1 -1
- package/dist/node_modules/@shikijs/core/dist/index.js +105 -643
- package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +135 -122
- package/dist/node_modules/@shikijs/langs/dist/bird2.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/css.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/dart.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/kusto.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/php.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/ruby.js +1 -1
- package/dist/node_modules/@shikijs/langs/dist/typespec.js +1 -1
- package/dist/node_modules/@shikijs/primitive/dist/index.js +538 -0
- package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +1 -1
- package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
- package/dist/node_modules/shiki/dist/bundle-full.js +6 -5
- package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +15 -0
- package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -0
- package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +1 -1
- package/dist/node_modules/shiki/dist/themes.js +1 -1
- package/dist/pages/DashboardPage.js +54 -79
- package/dist/pages/DebugWorkflowDetailsPage.js +41 -55
- package/dist/pages/DebugWorkflowsPage.js +151 -112
- package/dist/pages/EmbedWorkbenchPage.js +2 -1
- package/dist/pages/PreviewWorkbenchPage.js +77 -59
- package/dist/pages/RunsListPage.js +27 -41
- package/dist/pages/RunsPage.js +21 -36
- package/dist/pages/WorkbenchPage.js +48 -70
- package/dist/pages/WorkflowDebugPage.js +65 -79
- package/dist/pages/WorkspacePage.js +59 -86
- package/dist/pages/WorkspaceRunsPage.js +59 -54
- package/dist/pages/WorkspacesPage.js +11 -27
- package/dist/providers/StudioPreferencesProvider.js +54 -0
- package/package.json +29 -29
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -67
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -57
- package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -47
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -182
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -160
- /package/dist/{node_modules → frontend/studio/node_modules}/@dagrejs/dagre/dist/dagre.esm.js +0 -0
|
@@ -12,86 +12,72 @@ import { c } from "react/compiler-runtime";
|
|
|
12
12
|
import React, { useMemo } from "react";
|
|
13
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
14
|
import { useParams } from "react-router-dom";
|
|
15
|
-
import {
|
|
15
|
+
import { Loader2 } from "lucide-react";
|
|
16
16
|
var WorkflowDebugPage_default = () => {
|
|
17
|
-
let
|
|
18
|
-
|
|
19
|
-
let
|
|
20
|
-
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
let N;
|
|
26
|
-
y[7] === j ? N = y[8] : (N = {
|
|
27
|
-
label: "Dashboard",
|
|
28
|
-
href: j,
|
|
29
|
-
icon: M
|
|
30
|
-
}, y[7] = j, y[8] = N);
|
|
31
|
-
let P;
|
|
32
|
-
y[9] === b ? P = y[10] : (P = b.getWorkspaces(), y[9] = b, y[10] = P);
|
|
33
|
-
let F;
|
|
34
|
-
y[11] === P ? F = y[12] : (F = {
|
|
17
|
+
let _ = c(48), { router: v } = useStudio(), y = useParams(), b;
|
|
18
|
+
_[0] === y ? b = _[1] : (b = requireParam(y, "workflowId"), _[0] = y, _[1] = b);
|
|
19
|
+
let x = b, S = useWorkflow(x), C = S.data?.workspaceId, w = useWorkspace(C), T = useChildWorkflows(x), E;
|
|
20
|
+
_[2] === T.data ? E = _[3] : (E = T.data ?? [], _[2] = T.data, _[3] = E);
|
|
21
|
+
let D = E, O = useWorkflowConfigByName(S.data?.className ?? void 0), k;
|
|
22
|
+
_[4] === v ? k = _[5] : (k = v.getWorkspaces(), _[4] = v, _[5] = k);
|
|
23
|
+
let A;
|
|
24
|
+
_[6] === k ? A = _[7] : (A = {
|
|
35
25
|
label: "Workspaces",
|
|
36
|
-
href:
|
|
37
|
-
},
|
|
38
|
-
let
|
|
39
|
-
|
|
26
|
+
href: k
|
|
27
|
+
}, _[6] = k, _[7] = A);
|
|
28
|
+
let j = w.data?.title ?? "...", M;
|
|
29
|
+
_[8] !== v || _[9] !== C ? (M = C ? v.getWorkspace(C) : void 0, _[8] = v, _[9] = C, _[10] = M) : M = _[10];
|
|
30
|
+
let N;
|
|
31
|
+
_[11] !== j || _[12] !== M ? (N = {
|
|
32
|
+
label: j,
|
|
33
|
+
href: M
|
|
34
|
+
}, _[11] = j, _[12] = M, _[13] = N) : N = _[13];
|
|
35
|
+
let P = `Run #${S.data?.run ?? "..."}`, F;
|
|
36
|
+
_[14] !== v || _[15] !== x ? (F = v.getWorkflow(x), _[14] = v, _[15] = x, _[16] = F) : F = _[16];
|
|
37
|
+
let I;
|
|
38
|
+
_[17] !== P || _[18] !== F ? (I = {
|
|
39
|
+
label: P,
|
|
40
|
+
href: F
|
|
41
|
+
}, _[17] = P, _[18] = F, _[19] = I) : I = _[19];
|
|
42
|
+
let L;
|
|
43
|
+
_[20] === Symbol.for("react.memo_cache_sentinel") ? (L = { label: "Debug Flow" }, _[20] = L) : L = _[20];
|
|
40
44
|
let R;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
href: L
|
|
44
|
-
}, y[16] = I, y[17] = L, y[18] = R) : R = y[18];
|
|
45
|
-
let z = `Run #${w.data?.run ?? "..."}`, B;
|
|
46
|
-
y[19] !== b || y[20] !== C ? (B = b.getWorkflow(C), y[19] = b, y[20] = C, y[21] = B) : B = y[21];
|
|
47
|
-
let V;
|
|
48
|
-
y[22] !== z || y[23] !== B ? (V = {
|
|
49
|
-
label: z,
|
|
50
|
-
href: B
|
|
51
|
-
}, y[22] = z, y[23] = B, y[24] = V) : V = y[24];
|
|
52
|
-
let H;
|
|
53
|
-
y[25] === Symbol.for("react.memo_cache_sentinel") ? (H = {
|
|
54
|
-
label: "Debug Flow",
|
|
55
|
-
icon: /* @__PURE__ */ jsx(Bug, { className: "h-4 w-4" })
|
|
56
|
-
}, y[25] = H) : H = y[25];
|
|
57
|
-
let U;
|
|
58
|
-
y[26] !== V || y[27] !== N || y[28] !== F || y[29] !== R ? (U = [
|
|
45
|
+
_[21] !== A || _[22] !== N || _[23] !== I ? (R = [
|
|
46
|
+
A,
|
|
59
47
|
N,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
let W = U;
|
|
66
|
-
if (w.isLoading || D.isLoading || E.isLoading) {
|
|
48
|
+
I,
|
|
49
|
+
L
|
|
50
|
+
], _[21] = A, _[22] = N, _[23] = I, _[24] = R) : R = _[24];
|
|
51
|
+
let z = R;
|
|
52
|
+
if (S.isLoading || T.isLoading || w.isLoading) {
|
|
67
53
|
let n;
|
|
68
|
-
|
|
54
|
+
_[25] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ jsx("div", {
|
|
69
55
|
className: "flex h-[calc(100vh-8rem)] items-center justify-center",
|
|
70
56
|
children: /* @__PURE__ */ jsx(Loader2, { className: "text-muted-foreground h-8 w-8 animate-spin" })
|
|
71
|
-
}),
|
|
72
|
-
let
|
|
73
|
-
return
|
|
74
|
-
breadcrumbsData:
|
|
57
|
+
}), _[25] = n) : n = _[25];
|
|
58
|
+
let g;
|
|
59
|
+
return _[26] === z ? g = _[27] : (g = /* @__PURE__ */ jsx(MainLayout_default, {
|
|
60
|
+
breadcrumbsData: z,
|
|
75
61
|
children: n
|
|
76
|
-
}),
|
|
62
|
+
}), _[26] = z, _[27] = g), g;
|
|
77
63
|
}
|
|
64
|
+
let B;
|
|
65
|
+
_[28] === S.error ? B = _[29] : (B = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[28] = S.error, _[29] = B);
|
|
66
|
+
let V = S.data?.title ?? S.data?.alias ?? "Workflow", H = S.data?.run, U;
|
|
67
|
+
_[30] !== v || _[31] !== x ? (U = () => void v.navigateToWorkflow(x), _[30] = v, _[31] = x, _[32] = U) : U = _[32];
|
|
68
|
+
let W;
|
|
69
|
+
_[33] !== V || _[34] !== H || _[35] !== U ? (W = /* @__PURE__ */ jsx(WorkflowDebugHeader_default, {
|
|
70
|
+
title: V,
|
|
71
|
+
runNumber: H,
|
|
72
|
+
onBack: U
|
|
73
|
+
}), _[33] = V, _[34] = H, _[35] = U, _[36] = W) : W = _[36];
|
|
78
74
|
let G;
|
|
79
|
-
|
|
80
|
-
let K = w.data?.title ?? w.data?.alias ?? "Workflow", q = w.data?.run, J;
|
|
81
|
-
y[36] !== b || y[37] !== C ? (J = () => void b.navigateToWorkflow(C), y[36] = b, y[37] = C, y[38] = J) : J = y[38];
|
|
82
|
-
let Y;
|
|
83
|
-
y[39] !== K || y[40] !== q || y[41] !== J ? (Y = /* @__PURE__ */ jsx(WorkflowDebugHeader_default, {
|
|
84
|
-
title: K,
|
|
85
|
-
runNumber: q,
|
|
86
|
-
onBack: J
|
|
87
|
-
}), y[39] = K, y[40] = q, y[41] = J, y[42] = Y) : Y = y[42];
|
|
88
|
-
let X;
|
|
89
|
-
y[43] !== k || y[44] !== A || y[45] !== C ? (X = /* @__PURE__ */ jsx("div", {
|
|
75
|
+
_[37] !== D || _[38] !== O || _[39] !== x ? (G = /* @__PURE__ */ jsx("div", {
|
|
90
76
|
className: "bg-card border-border flex-1 overflow-hidden rounded-2xl border shadow-sm",
|
|
91
|
-
children:
|
|
92
|
-
workflowId:
|
|
93
|
-
workflows:
|
|
94
|
-
workflowConfig:
|
|
77
|
+
children: D.length > 0 ? /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(WorkflowFlowViewer_default, {
|
|
78
|
+
workflowId: x,
|
|
79
|
+
workflows: D,
|
|
80
|
+
workflowConfig: O.data
|
|
95
81
|
}) }) : /* @__PURE__ */ jsx("div", {
|
|
96
82
|
className: "text-muted-foreground flex h-full items-center justify-center",
|
|
97
83
|
children: /* @__PURE__ */ jsx("p", {
|
|
@@ -99,16 +85,16 @@ var WorkflowDebugPage_default = () => {
|
|
|
99
85
|
children: "No child workflows found for this workflow"
|
|
100
86
|
})
|
|
101
87
|
})
|
|
102
|
-
}),
|
|
103
|
-
let
|
|
104
|
-
|
|
88
|
+
}), _[37] = D, _[38] = O, _[39] = x, _[40] = G) : G = _[40];
|
|
89
|
+
let K;
|
|
90
|
+
_[41] !== W || _[42] !== G ? (K = /* @__PURE__ */ jsxs("div", {
|
|
105
91
|
className: "flex h-[calc(100vh-8rem)] flex-col gap-6",
|
|
106
|
-
children: [
|
|
107
|
-
}),
|
|
108
|
-
let
|
|
109
|
-
return
|
|
110
|
-
breadcrumbsData:
|
|
111
|
-
children: [
|
|
112
|
-
}),
|
|
92
|
+
children: [W, G]
|
|
93
|
+
}), _[41] = W, _[42] = G, _[43] = K) : K = _[43];
|
|
94
|
+
let q;
|
|
95
|
+
return _[44] !== z || _[45] !== B || _[46] !== K ? (q = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
96
|
+
breadcrumbsData: z,
|
|
97
|
+
children: [B, K]
|
|
98
|
+
}), _[44] = z, _[45] = B, _[46] = K, _[47] = q) : q = _[47], q;
|
|
113
99
|
};
|
|
114
100
|
export { WorkflowDebugPage_default as default };
|
|
@@ -1,115 +1,88 @@
|
|
|
1
1
|
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
2
|
import { useWorkspaceConfig } from "../hooks/useConfig.js";
|
|
3
3
|
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
4
|
-
import { Button } from "../components/ui/button.js";
|
|
5
4
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
6
5
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
6
|
+
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
7
|
+
import { WorkbenchSidebarShell } from "../features/workbench/components/WorkbenchSidebarShell.js";
|
|
7
8
|
import WorkspaceHomePage_default from "../features/workspaces/components/WorkspaceHomePage.js";
|
|
9
|
+
import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
|
|
8
10
|
import { c } from "react/compiler-runtime";
|
|
9
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
+
import { useParams } from "react-router-dom";
|
|
13
|
+
import { Loader2 } from "lucide-react";
|
|
12
14
|
var WorkspacePage_default = () => {
|
|
13
|
-
let
|
|
15
|
+
let _ = c(40), { router: v } = useStudio(), { workspaceId: y } = useParams(), b = useWorkspace(y), x = useWorkspaceConfig(), S = useDefaultEnvironmentPreviewUrl(), C = b.data, w;
|
|
14
16
|
bb0: {
|
|
15
|
-
if (!C || !
|
|
17
|
+
if (!C || !x.data) {
|
|
16
18
|
w = void 0;
|
|
17
19
|
break bb0;
|
|
18
20
|
}
|
|
19
21
|
let t;
|
|
20
|
-
if (
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
t = (
|
|
25
|
-
} else t =
|
|
22
|
+
if (_[0] !== x.data || _[1] !== C) {
|
|
23
|
+
let h;
|
|
24
|
+
_[3] === C ? h = _[4] : (h = (t) => t.className === C.className, _[3] = C, _[4] = h);
|
|
25
|
+
let g = x.data.find(h)?.ui;
|
|
26
|
+
t = (g?.widgets ?? g?.actions)?.find(_temp), _[0] = x.data, _[1] = C, _[2] = t;
|
|
27
|
+
} else t = _[2];
|
|
26
28
|
w = t;
|
|
27
29
|
}
|
|
28
30
|
let T = w, E;
|
|
29
|
-
|
|
31
|
+
_[5] === v ? E = _[6] : (E = v.getWorkspaces(), _[5] = v, _[6] = E);
|
|
30
32
|
let D;
|
|
31
|
-
|
|
32
|
-
let O;
|
|
33
|
-
v[8] === E ? O = v[9] : (O = {
|
|
34
|
-
label: "Dashboard",
|
|
35
|
-
href: E,
|
|
36
|
-
icon: D
|
|
37
|
-
}, v[8] = E, v[9] = O);
|
|
38
|
-
let k;
|
|
39
|
-
v[10] === y ? k = v[11] : (k = y.getWorkspaces(), v[10] = y, v[11] = k);
|
|
40
|
-
let A;
|
|
41
|
-
v[12] === k ? A = v[13] : (A = {
|
|
33
|
+
_[7] === E ? D = _[8] : (D = {
|
|
42
34
|
label: "Workspaces",
|
|
43
|
-
href:
|
|
44
|
-
},
|
|
45
|
-
let
|
|
46
|
-
|
|
47
|
-
label:
|
|
35
|
+
href: E
|
|
36
|
+
}, _[7] = E, _[8] = D);
|
|
37
|
+
let O = C?.title ?? "", k;
|
|
38
|
+
_[9] === O ? k = _[10] : (k = {
|
|
39
|
+
label: O,
|
|
48
40
|
current: !0
|
|
49
|
-
},
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}),
|
|
41
|
+
}, _[9] = O, _[10] = k);
|
|
42
|
+
let A;
|
|
43
|
+
_[11] !== D || _[12] !== k ? (A = [D, k], _[11] = D, _[12] = k, _[13] = A) : A = _[13];
|
|
44
|
+
let j = A, M = b.isLoading || x.isLoading, N;
|
|
45
|
+
_[14] === C ? N = _[15] : (N = C ? {
|
|
46
|
+
volumes: C.volumes,
|
|
47
|
+
features: C.features
|
|
48
|
+
} : void 0, _[14] = C, _[15] = N);
|
|
49
|
+
let P = N, F = C?.environments, I;
|
|
50
|
+
_[16] === M ? I = _[17] : (I = M ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", _[16] = M, _[17] = I);
|
|
51
|
+
let L;
|
|
52
|
+
_[18] === b.error ? L = _[19] : (L = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: b.error }), _[18] = b.error, _[19] = L);
|
|
61
53
|
let R;
|
|
62
|
-
|
|
63
|
-
variant: "outline",
|
|
64
|
-
size: "sm",
|
|
65
|
-
asChild: !0,
|
|
66
|
-
children: /* @__PURE__ */ jsxs(Link, {
|
|
67
|
-
to: y.getWorkspaceRuns(b),
|
|
68
|
-
children: ["Runs", /* @__PURE__ */ jsx(ArrowRight, { className: "ml-1 h-4 w-4" })]
|
|
69
|
-
})
|
|
70
|
-
}), v[22] = y, v[23] = b, v[24] = R) : R = v[24];
|
|
54
|
+
_[20] === x.error ? R = _[21] : (R = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: x.error }), _[20] = x.error, _[21] = R);
|
|
71
55
|
let z;
|
|
72
|
-
|
|
73
|
-
className: "mb-4 flex items-center justify-between",
|
|
74
|
-
children: [L, R]
|
|
75
|
-
}), v[25] = L, v[26] = R, v[27] = z) : z = v[27];
|
|
76
|
-
let B;
|
|
77
|
-
v[28] === F ? B = v[29] : (B = F ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", v[28] = F, v[29] = B);
|
|
78
|
-
let V;
|
|
79
|
-
v[30] === x.error ? V = v[31] : (V = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: x.error }), v[30] = x.error, v[31] = V);
|
|
80
|
-
let H;
|
|
81
|
-
v[32] === S.error ? H = v[33] : (H = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), v[32] = S.error, v[33] = H);
|
|
82
|
-
let U;
|
|
83
|
-
v[34] !== F || v[35] !== y || v[36] !== T || v[37] !== C || v[38] !== b ? (U = C && T ? /* @__PURE__ */ jsx(WorkspaceHomePage_default, {
|
|
56
|
+
_[22] !== M || _[23] !== T || _[24] !== C ? (z = C && T ? /* @__PURE__ */ jsx(WorkspaceHomePage_default, {
|
|
84
57
|
workspace: C,
|
|
85
58
|
action: T
|
|
86
|
-
}) : C && !
|
|
59
|
+
}) : C && !M ? /* @__PURE__ */ jsx("div", {
|
|
87
60
|
className: "flex flex-col items-center justify-center py-16",
|
|
88
|
-
children:
|
|
89
|
-
className: "text-muted-foreground
|
|
61
|
+
children: /* @__PURE__ */ jsx("p", {
|
|
62
|
+
className: "text-muted-foreground",
|
|
90
63
|
children: "No home page configured for this workspace."
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
})
|
|
100
|
-
let
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
B
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
children:
|
|
112
|
-
}),
|
|
64
|
+
})
|
|
65
|
+
}) : null, _[22] = M, _[23] = T, _[24] = C, _[25] = z) : z = _[25];
|
|
66
|
+
let B;
|
|
67
|
+
_[26] !== R || _[27] !== z || _[28] !== I || _[29] !== L ? (B = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
68
|
+
I,
|
|
69
|
+
L,
|
|
70
|
+
R,
|
|
71
|
+
z
|
|
72
|
+
] }), _[26] = R, _[27] = z, _[28] = I, _[29] = L, _[30] = B) : B = _[30];
|
|
73
|
+
let V;
|
|
74
|
+
_[31] !== j || _[32] !== B ? (V = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
|
|
75
|
+
breadcrumbsData: j,
|
|
76
|
+
children: B
|
|
77
|
+
}) }), _[31] = j, _[32] = B, _[33] = V) : V = _[33];
|
|
78
|
+
let H;
|
|
79
|
+
return _[34] !== S || _[35] !== V || _[36] !== F || _[37] !== P || _[38] !== y ? (H = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
80
|
+
workspaceId: y,
|
|
81
|
+
environments: F,
|
|
82
|
+
workspaceConfig: P,
|
|
83
|
+
getEnvironmentPreviewUrl: S,
|
|
84
|
+
children: V
|
|
85
|
+
}), _[34] = S, _[35] = V, _[36] = F, _[37] = P, _[38] = y, _[39] = H) : H = _[39], H;
|
|
113
86
|
};
|
|
114
87
|
function _temp(t) {
|
|
115
88
|
return t.widget === "start-form";
|
|
@@ -2,70 +2,75 @@ import { useStudio } from "../providers/StudioProvider.js";
|
|
|
2
2
|
import { useWorkspace } from "../hooks/useWorkspaces.js";
|
|
3
3
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
4
4
|
import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
|
|
5
|
+
import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
|
|
5
6
|
import ExecutionTimeline_default from "../features/workspaces/components/ExecutionTimeline.js";
|
|
7
|
+
import { WorkbenchSidebarShell } from "../features/workbench/components/WorkbenchSidebarShell.js";
|
|
8
|
+
import { useDefaultEnvironmentPreviewUrl } from "../hooks/useEnvironmentPreviewUrl.js";
|
|
6
9
|
import { c } from "react/compiler-runtime";
|
|
7
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
11
|
import { useParams } from "react-router-dom";
|
|
9
|
-
import {
|
|
12
|
+
import { Loader2 } from "lucide-react";
|
|
10
13
|
var WorkspaceRunsPage_default = () => {
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let y;
|
|
16
|
-
p[3] === _ ? y = p[4] : (y = {
|
|
17
|
-
label: "Dashboard",
|
|
18
|
-
href: _,
|
|
19
|
-
icon: v
|
|
20
|
-
}, p[3] = _, p[4] = y);
|
|
21
|
-
let b;
|
|
22
|
-
p[5] === m ? b = p[6] : (b = m.getWorkspaces(), p[5] = m, p[6] = b);
|
|
23
|
-
let x;
|
|
24
|
-
p[7] === b ? x = p[8] : (x = {
|
|
14
|
+
let h = c(38), { router: g } = useStudio(), { workspaceId: _ } = useParams(), v = useWorkspace(_), y = useDefaultEnvironmentPreviewUrl(), b = v.data, x;
|
|
15
|
+
h[0] === g ? x = h[1] : (x = g.getWorkspaces(), h[0] = g, h[1] = x);
|
|
16
|
+
let S;
|
|
17
|
+
h[2] === x ? S = h[3] : (S = {
|
|
25
18
|
label: "Workspaces",
|
|
26
|
-
href:
|
|
27
|
-
},
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
let w;
|
|
31
|
-
p[12] !== S || p[13] !== C ? (w = {
|
|
32
|
-
label: S,
|
|
33
|
-
href: C
|
|
34
|
-
}, p[12] = S, p[13] = C, p[14] = w) : w = p[14];
|
|
19
|
+
href: x
|
|
20
|
+
}, h[2] = x, h[3] = S);
|
|
21
|
+
let C = b?.title ?? "", w;
|
|
22
|
+
h[4] !== g || h[5] !== _ ? (w = _ ? g.getWorkspace(_) : void 0, h[4] = g, h[5] = _, h[6] = w) : w = h[6];
|
|
35
23
|
let T;
|
|
36
|
-
|
|
24
|
+
h[7] !== C || h[8] !== w ? (T = {
|
|
25
|
+
label: C,
|
|
26
|
+
href: w
|
|
27
|
+
}, h[7] = C, h[8] = w, h[9] = T) : T = h[9];
|
|
28
|
+
let E;
|
|
29
|
+
h[10] === Symbol.for("react.memo_cache_sentinel") ? (E = {
|
|
37
30
|
label: "Runs",
|
|
38
31
|
current: !0
|
|
39
|
-
},
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
}, h[10] = E) : E = h[10];
|
|
33
|
+
let D;
|
|
34
|
+
h[11] !== S || h[12] !== T ? (D = [
|
|
35
|
+
S,
|
|
36
|
+
T,
|
|
37
|
+
E
|
|
38
|
+
], h[11] = S, h[12] = T, h[13] = D) : D = h[13];
|
|
39
|
+
let O = D, k;
|
|
40
|
+
h[14] === b ? k = h[15] : (k = b ? {
|
|
41
|
+
volumes: b.volumes,
|
|
42
|
+
features: b.features
|
|
43
|
+
} : void 0, h[14] = b, h[15] = k);
|
|
44
|
+
let A = k, j = b?.environments, M = b?.title ?? "", N;
|
|
45
|
+
h[16] === M ? N = h[17] : (N = /* @__PURE__ */ jsxs("h1", {
|
|
49
46
|
className: "mb-4 text-3xl font-bold tracking-tight",
|
|
50
|
-
children: [
|
|
51
|
-
}),
|
|
52
|
-
let A;
|
|
53
|
-
p[22] === g.isLoading ? A = p[23] : (A = g.isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", p[22] = g.isLoading, p[23] = A);
|
|
54
|
-
let j;
|
|
55
|
-
p[24] === g.error ? j = p[25] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: g.error }), p[24] = g.error, p[25] = j);
|
|
56
|
-
let M;
|
|
57
|
-
p[26] === g.data ? M = p[27] : (M = g.data ? /* @__PURE__ */ jsx(ExecutionTimeline_default, { workspace: g.data }) : "", p[26] = g.data, p[27] = M);
|
|
58
|
-
let N;
|
|
59
|
-
p[28] !== k || p[29] !== A || p[30] !== j || p[31] !== M ? (N = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
60
|
-
k,
|
|
61
|
-
A,
|
|
62
|
-
j,
|
|
63
|
-
M
|
|
64
|
-
] }), p[28] = k, p[29] = A, p[30] = j, p[31] = M, p[32] = N) : N = p[32];
|
|
47
|
+
children: [M, " — Runs"]
|
|
48
|
+
}), h[16] = M, h[17] = N);
|
|
65
49
|
let P;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
50
|
+
h[18] === v.isLoading ? P = h[19] : (P = v.isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-6 w-6 animate-spin" }) : "", h[18] = v.isLoading, h[19] = P);
|
|
51
|
+
let F;
|
|
52
|
+
h[20] === v.error ? F = h[21] : (F = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: v.error }), h[20] = v.error, h[21] = F);
|
|
53
|
+
let I;
|
|
54
|
+
h[22] === b ? I = h[23] : (I = b ? /* @__PURE__ */ jsx(ExecutionTimeline_default, { workspace: b }) : "", h[22] = b, h[23] = I);
|
|
55
|
+
let L;
|
|
56
|
+
h[24] !== N || h[25] !== P || h[26] !== F || h[27] !== I ? (L = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
|
+
N,
|
|
58
|
+
P,
|
|
59
|
+
F,
|
|
60
|
+
I
|
|
61
|
+
] }), h[24] = N, h[25] = P, h[26] = F, h[27] = I, h[28] = L) : L = h[28];
|
|
62
|
+
let R;
|
|
63
|
+
h[29] !== O || h[30] !== L ? (R = /* @__PURE__ */ jsx(WorkbenchSidebarShell, { children: /* @__PURE__ */ jsx(MainLayout_default, {
|
|
64
|
+
breadcrumbsData: O,
|
|
65
|
+
children: L
|
|
66
|
+
}) }), h[29] = O, h[30] = L, h[31] = R) : R = h[31];
|
|
67
|
+
let z;
|
|
68
|
+
return h[32] !== y || h[33] !== R || h[34] !== j || h[35] !== A || h[36] !== _ ? (z = /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
|
|
69
|
+
workspaceId: _,
|
|
70
|
+
environments: j,
|
|
71
|
+
workspaceConfig: A,
|
|
72
|
+
getEnvironmentPreviewUrl: y,
|
|
73
|
+
children: R
|
|
74
|
+
}), h[32] = y, h[33] = R, h[34] = j, h[35] = A, h[36] = _, h[37] = z) : z = h[37], z;
|
|
70
75
|
};
|
|
71
76
|
export { WorkspaceRunsPage_default as default };
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import { useStudio } from "../providers/StudioProvider.js";
|
|
2
1
|
import MainLayout_default from "../components/layout/MainLayout.js";
|
|
3
2
|
import Workspaces_default from "../features/workspaces/Workspaces.js";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
5
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Home } from "lucide-react";
|
|
7
5
|
function WorkspacesPage() {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let d;
|
|
11
|
-
s[2] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), s[2] = d) : d = s[2];
|
|
12
|
-
let f;
|
|
13
|
-
s[3] === u ? f = s[4] : (f = {
|
|
14
|
-
label: "Dashboard",
|
|
15
|
-
href: u,
|
|
16
|
-
icon: d
|
|
17
|
-
}, s[3] = u, s[4] = f);
|
|
18
|
-
let p;
|
|
19
|
-
s[5] === Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
6
|
+
let a = c(2), o;
|
|
7
|
+
a[0] === Symbol.for("react.memo_cache_sentinel") ? (o = [{
|
|
20
8
|
label: "Workspaces",
|
|
21
9
|
current: !0
|
|
22
|
-
},
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return s[10] === h ? v = s[11] : (v = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
32
|
-
breadcrumbsData: h,
|
|
33
|
-
children: [g, _]
|
|
34
|
-
}), s[10] = h, s[11] = v), v;
|
|
10
|
+
}], a[0] = o) : o = a[0];
|
|
11
|
+
let s = o, l;
|
|
12
|
+
return a[1] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ jsxs(MainLayout_default, {
|
|
13
|
+
breadcrumbsData: s,
|
|
14
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
15
|
+
className: "mb-4 text-3xl font-bold tracking-tight",
|
|
16
|
+
children: "Workspaces"
|
|
17
|
+
}), /* @__PURE__ */ jsx(Workspaces_default, {})]
|
|
18
|
+
}), a[1] = l) : l = a[1], l;
|
|
35
19
|
}
|
|
36
20
|
export { WorkspacesPage as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var STORAGE_KEY = "loopstack:studio-preferences", DEFAULTS = {
|
|
5
|
+
leftSidebarOpen: !1,
|
|
6
|
+
activePanel: null,
|
|
7
|
+
panelSizes: {}
|
|
8
|
+
}, StudioPreferencesContext = createContext(null);
|
|
9
|
+
function readFromStorage() {
|
|
10
|
+
try {
|
|
11
|
+
let e = localStorage.getItem(STORAGE_KEY);
|
|
12
|
+
if (e) return {
|
|
13
|
+
...DEFAULTS,
|
|
14
|
+
...JSON.parse(e)
|
|
15
|
+
};
|
|
16
|
+
} catch {}
|
|
17
|
+
return { ...DEFAULTS };
|
|
18
|
+
}
|
|
19
|
+
function writeToStorage(e) {
|
|
20
|
+
try {
|
|
21
|
+
localStorage.setItem(STORAGE_KEY, JSON.stringify(e));
|
|
22
|
+
} catch {}
|
|
23
|
+
}
|
|
24
|
+
function StudioPreferencesProvider(o) {
|
|
25
|
+
let s = c(6), { children: l } = o, [u, d] = useState(readFromStorage), f;
|
|
26
|
+
s[0] === Symbol.for("react.memo_cache_sentinel") ? (f = (e, o) => {
|
|
27
|
+
d((s) => {
|
|
28
|
+
let l = {
|
|
29
|
+
...s,
|
|
30
|
+
[e]: o
|
|
31
|
+
};
|
|
32
|
+
return writeToStorage(l), l;
|
|
33
|
+
});
|
|
34
|
+
}, s[0] = f) : f = s[0];
|
|
35
|
+
let p = f, m;
|
|
36
|
+
s[1] === u ? m = s[2] : (m = {
|
|
37
|
+
preferences: u,
|
|
38
|
+
setPreference: p
|
|
39
|
+
}, s[1] = u, s[2] = m);
|
|
40
|
+
let h = m, g;
|
|
41
|
+
return s[3] !== l || s[4] !== h ? (g = /* @__PURE__ */ jsx(StudioPreferencesContext.Provider, {
|
|
42
|
+
value: h,
|
|
43
|
+
children: l
|
|
44
|
+
}), s[3] = l, s[4] = h, s[5] = g) : g = s[5], g;
|
|
45
|
+
}
|
|
46
|
+
function useStudioPreferences() {
|
|
47
|
+
let e = useContext(StudioPreferencesContext);
|
|
48
|
+
if (!e) throw Error("useStudioPreferences must be used within a StudioPreferencesProvider");
|
|
49
|
+
return e;
|
|
50
|
+
}
|
|
51
|
+
function useOptionalStudioPreferences() {
|
|
52
|
+
return useContext(StudioPreferencesContext);
|
|
53
|
+
}
|
|
54
|
+
export { StudioPreferencesProvider, useOptionalStudioPreferences, useStudioPreferences };
|