@loopstack/loopstack-studio 0.25.2 → 0.26.1
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 +15 -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/git/api/git.js +9 -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/index.js +1 -1
- package/dist/hooks/query-keys.js +45 -24
- 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 +146 -7
- package/dist/index.js +9 -2
- 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 +56 -85
- package/dist/pages/WorkspaceRunsPage.js +59 -54
- package/dist/pages/WorkspacesPage.js +11 -27
- package/dist/providers/SseProvider.js +14 -20
- package/dist/providers/StudioPreferencesProvider.js +54 -0
- package/package.json +30 -30
- 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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useFeatureRegistry } from "../../feature-registry/FeatureRegistryProvider.js";
|
|
2
|
+
import "../../feature-registry/index.js";
|
|
3
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
|
+
import { WorkbenchEnvironmentPanel } from "./WorkbenchEnvironmentPanel.js";
|
|
5
|
+
import { WorkbenchIconSidebar } from "./WorkbenchIconSidebar.js";
|
|
6
|
+
import { WorkbenchPreviewPanel } from "./WorkbenchPreviewPanel.js";
|
|
7
|
+
import { WorkbenchRunsPanel } from "./WorkbenchRunsPanel.js";
|
|
8
|
+
import { c } from "react/compiler-runtime";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var PANEL_WIDTH = {
|
|
11
|
+
small: "w-80",
|
|
12
|
+
medium: "w-1/2",
|
|
13
|
+
large: "w-2/3"
|
|
14
|
+
}, CONTENT_WIDTH = {
|
|
15
|
+
small: "w-full",
|
|
16
|
+
medium: "w-1/2",
|
|
17
|
+
large: "w-1/3"
|
|
18
|
+
};
|
|
19
|
+
function ActivePanelContent() {
|
|
20
|
+
let a = c(13), { activePanel: l, workspaceId: u, environments: d } = useWorkbenchLayout(), f = useFeatureRegistry();
|
|
21
|
+
switch (l) {
|
|
22
|
+
case "runs": {
|
|
23
|
+
let e;
|
|
24
|
+
return a[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(WorkbenchRunsPanel, {}), a[0] = e) : e = a[0], e;
|
|
25
|
+
}
|
|
26
|
+
case "preview": {
|
|
27
|
+
let e;
|
|
28
|
+
return a[1] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(WorkbenchPreviewPanel, {}), a[1] = e) : e = a[1], e;
|
|
29
|
+
}
|
|
30
|
+
case "environment": {
|
|
31
|
+
let e;
|
|
32
|
+
return a[2] !== d || a[3] !== u ? (e = /* @__PURE__ */ jsx(WorkbenchEnvironmentPanel, {
|
|
33
|
+
workspaceId: u,
|
|
34
|
+
environments: d
|
|
35
|
+
}), a[2] = d, a[3] = u, a[4] = e) : e = a[4], e;
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
let e;
|
|
39
|
+
if (a[5] !== l || a[6] !== f) {
|
|
40
|
+
let r;
|
|
41
|
+
a[8] === l ? r = a[9] : (r = (e) => e.sidebarPanel?.id === l, a[8] = l, a[9] = r), e = f.find(r), a[5] = l, a[6] = f, a[7] = e;
|
|
42
|
+
} else e = a[7];
|
|
43
|
+
let r = e;
|
|
44
|
+
if (r?.sidebarPanel) {
|
|
45
|
+
let e = r.sidebarPanel.component, i;
|
|
46
|
+
return a[10] !== e || a[11] !== u ? (i = /* @__PURE__ */ jsx(e, { workspaceId: u }), a[10] = e, a[11] = u, a[12] = i) : i = a[12], i;
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function SidebarContent(e) {
|
|
53
|
+
let i = c(12), { children: o } = e, { activePanel: s, panelSize: p } = useWorkbenchLayout(), m = `${s ? CONTENT_WIDTH[p] : "w-full"} overflow-hidden`, h;
|
|
54
|
+
i[0] !== o || i[1] !== m ? (h = /* @__PURE__ */ jsx("div", {
|
|
55
|
+
className: m,
|
|
56
|
+
children: o
|
|
57
|
+
}), i[0] = o, i[1] = m, i[2] = h) : h = i[2];
|
|
58
|
+
let g;
|
|
59
|
+
i[3] !== s || i[4] !== p ? (g = s && /* @__PURE__ */ jsx("div", {
|
|
60
|
+
className: `${PANEL_WIDTH[p]} shrink-0 overflow-hidden`,
|
|
61
|
+
children: /* @__PURE__ */ jsx(ActivePanelContent, {})
|
|
62
|
+
}), i[3] = s, i[4] = p, i[5] = g) : g = i[5];
|
|
63
|
+
let _;
|
|
64
|
+
i[6] !== h || i[7] !== g ? (_ = /* @__PURE__ */ jsxs("div", {
|
|
65
|
+
className: "flex flex-1 overflow-hidden",
|
|
66
|
+
children: [h, g]
|
|
67
|
+
}), i[6] = h, i[7] = g, i[8] = _) : _ = i[8];
|
|
68
|
+
let v;
|
|
69
|
+
i[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(WorkbenchIconSidebar, {}), i[9] = v) : v = i[9];
|
|
70
|
+
let y;
|
|
71
|
+
return i[10] === _ ? y = i[11] : (y = /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: "flex h-full w-full",
|
|
73
|
+
children: [_, v]
|
|
74
|
+
}), i[10] = _, i[11] = y), y;
|
|
75
|
+
}
|
|
76
|
+
function WorkbenchSidebarShell(e) {
|
|
77
|
+
let r = c(2), { children: i } = e, a;
|
|
78
|
+
return r[0] === i ? a = r[1] : (a = /* @__PURE__ */ jsx(SidebarContent, { children: i }), r[0] = i, r[1] = a), a;
|
|
79
|
+
}
|
|
80
|
+
export { WorkbenchSidebarShell };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useWorkflow } from "../../../hooks/useWorkflows.js";
|
|
2
|
-
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
3
2
|
import { require_enums } from "../../../packages/contracts/dist/enums/index.js";
|
|
3
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
4
4
|
import { useFilterDocuments } from "../../../hooks/useDocuments.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { useCallback, useMemo } from "react";
|
|
7
7
|
var import_enums = require_enums();
|
|
8
|
-
function useWorkflowData(
|
|
9
|
-
let o = c(21), { workflowId: s, showFullMessageHistory: l } =
|
|
8
|
+
function useWorkflowData(r) {
|
|
9
|
+
let o = c(21), { workflowId: s, showFullMessageHistory: l } = r, u = useWorkflow(s), d = useFilterDocuments(s), f = useRunWorkflow(), p;
|
|
10
10
|
o[0] !== u.data?.place || o[1] !== l ? (p = (e) => {
|
|
11
11
|
let r = e.meta, i = e.ui, a = r?.hidden || i?.hidden || !!r?.hideAtPlaces?.includes(u.data?.place ?? "");
|
|
12
12
|
return !l && e.tags?.includes("internal") && (a = !0), !a;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
2
|
+
import { WorkbenchSidebarShell } from "./components/WorkbenchSidebarShell.js";
|
|
1
3
|
import WorkflowItem_default from "./WorkflowItem.js";
|
|
4
|
+
import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
2
5
|
import WorkflowButtons_default from "./components/buttons/WorkflowButtons.js";
|
|
3
6
|
import WorkflowList_default from "./WorkflowList.js";
|
|
4
|
-
import { useWorkbenchLayout } from "./providers/WorkbenchLayoutProvider.js";
|
|
5
|
-
import WorkflowHistoryList_default from "./components/WorkflowHistoryList.js";
|
|
6
7
|
import Workbench from "./Workbench.js";
|
|
7
8
|
import { NewRunDialog } from "./components/NewRunDialog.js";
|
|
@@ -1,79 +1,77 @@
|
|
|
1
|
+
import { useOptionalStudioPreferences } from "../../../providers/StudioPreferencesProvider.js";
|
|
1
2
|
import { c } from "react/compiler-runtime";
|
|
2
3
|
import { createContext, useCallback, useContext, useMemo, useState } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
var WorkbenchLayoutContext = createContext(null);
|
|
5
|
-
function WorkbenchLayoutProvider(
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
function WorkbenchLayoutProvider(o) {
|
|
7
|
+
let s = c(36), { children: l, workspaceId: u, workflow: d, workspaceConfig: f, getPreviewUrl: p, getEnvironmentPreviewUrl: m, environments: h } = o, g = useOptionalStudioPreferences(), [_, v] = useState(null), y;
|
|
8
|
+
s[0] === Symbol.for("react.memo_cache_sentinel") ? (y = {}, s[0] = y) : y = s[0];
|
|
9
|
+
let [b, x] = useState(y), S = g ? g.preferences.activePanel : _, C = g ? g.preferences.panelSizes : b, [w, T] = useState(null), [E, D] = useState(""), O = f?.features?.previewPanel?.enabled ?? !1, k;
|
|
10
|
+
s[1] === h ? k = s[2] : (k = h === void 0 || h.some(_temp), s[1] = h, s[2] = k);
|
|
11
|
+
let A = O && k, j;
|
|
12
|
+
s[3] === Symbol.for("react.memo_cache_sentinel") ? (j = {
|
|
13
|
+
runs: "medium",
|
|
14
|
+
preview: "medium",
|
|
15
|
+
files: "medium",
|
|
16
|
+
environment: "small"
|
|
17
|
+
}, s[3] = j) : j = s[3];
|
|
18
|
+
let M = j, N = S ? C[S] ?? M[S] ?? "small" : "small", P;
|
|
19
|
+
s[4] === g ? P = s[5] : (P = (t) => {
|
|
20
|
+
g ? g.setPreference("activePanel", t) : v(t);
|
|
21
|
+
}, s[4] = g, s[5] = P);
|
|
22
|
+
let F = P, I;
|
|
23
|
+
s[6] !== S || s[7] !== F ? (I = (t) => {
|
|
24
|
+
F(S === t ? null : t);
|
|
25
|
+
}, s[6] = S, s[7] = F, s[8] = I) : I = s[8];
|
|
14
26
|
let L = I, R;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
},
|
|
27
|
+
s[9] === F ? R = s[10] : (R = () => {
|
|
28
|
+
F(null);
|
|
29
|
+
}, s[9] = F, s[10] = R);
|
|
18
30
|
let z = R, B;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
s[11] !== S || s[12] !== C || s[13] !== g ? (B = (t) => {
|
|
32
|
+
if (!S) return;
|
|
33
|
+
let a = {
|
|
34
|
+
...C,
|
|
35
|
+
[S]: t
|
|
36
|
+
};
|
|
37
|
+
g ? g.setPreference("panelSizes", a) : x(a);
|
|
38
|
+
}, s[11] = S, s[12] = C, s[13] = g, s[14] = B) : B = s[14];
|
|
22
39
|
let V = B, H;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}, o[12] = k, o[13] = L, o[14] = H) : H = o[14];
|
|
40
|
+
s[15] === F ? H = s[16] : (H = (t) => {
|
|
41
|
+
D(t), F("preview");
|
|
42
|
+
}, s[15] = F, s[16] = H);
|
|
27
43
|
let U = H, W;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
workflow: l,
|
|
42
|
-
previewPanelEnabled: M,
|
|
43
|
-
fileExplorerEnabled: X,
|
|
44
|
-
isDeveloperMode: _,
|
|
45
|
-
workspaceConfig: d,
|
|
46
|
-
getPreviewUrl: f,
|
|
47
|
-
getEnvironmentPreviewUrl: p,
|
|
48
|
-
environments: m,
|
|
49
|
-
activeFloatingPanel: v,
|
|
50
|
-
toggleFloatingPanel: z,
|
|
51
|
-
closeFloatingPanel: V,
|
|
52
|
-
activeSidePanel: k,
|
|
53
|
-
toggleSidePanel: U,
|
|
54
|
-
closeSidePanel: G,
|
|
44
|
+
s[17] !== S || s[18] !== w || s[19] !== z || s[20] !== h || s[21] !== m || s[22] !== p || s[23] !== U || s[24] !== N || s[25] !== A || s[26] !== E || s[27] !== V || s[28] !== L || s[29] !== d || s[30] !== f || s[31] !== u ? (W = {
|
|
45
|
+
workspaceId: u,
|
|
46
|
+
workflow: d,
|
|
47
|
+
previewPanelEnabled: A,
|
|
48
|
+
workspaceConfig: f,
|
|
49
|
+
getPreviewUrl: p,
|
|
50
|
+
getEnvironmentPreviewUrl: m,
|
|
51
|
+
environments: h,
|
|
52
|
+
activePanel: S,
|
|
53
|
+
panelSize: N,
|
|
54
|
+
togglePanel: L,
|
|
55
|
+
closePanel: z,
|
|
56
|
+
setPanelSize: V,
|
|
55
57
|
selectedSlotId: E,
|
|
56
58
|
setSelectedSlotId: D,
|
|
57
|
-
openPreviewWithEnvironment:
|
|
58
|
-
previewPanelOpen: F,
|
|
59
|
-
togglePreviewPanel: Y,
|
|
60
|
-
activePreviewTab: S,
|
|
61
|
-
setActivePreviewTab: C,
|
|
59
|
+
openPreviewWithEnvironment: U,
|
|
62
60
|
activeSectionId: w,
|
|
63
61
|
setActiveSectionId: T
|
|
64
|
-
},
|
|
65
|
-
let
|
|
66
|
-
return
|
|
67
|
-
value:
|
|
68
|
-
children:
|
|
69
|
-
}),
|
|
62
|
+
}, s[17] = S, s[18] = w, s[19] = z, s[20] = h, s[21] = m, s[22] = p, s[23] = U, s[24] = N, s[25] = A, s[26] = E, s[27] = V, s[28] = L, s[29] = d, s[30] = f, s[31] = u, s[32] = W) : W = s[32];
|
|
63
|
+
let G = W, K;
|
|
64
|
+
return s[33] !== l || s[34] !== G ? (K = /* @__PURE__ */ jsx(WorkbenchLayoutContext.Provider, {
|
|
65
|
+
value: G,
|
|
66
|
+
children: l
|
|
67
|
+
}), s[33] = l, s[34] = G, s[35] = K) : K = s[35], K;
|
|
70
68
|
}
|
|
71
|
-
function _temp(
|
|
72
|
-
return !!
|
|
69
|
+
function _temp(t) {
|
|
70
|
+
return !!t.connectionUrl && (!!t.workerId || t.local);
|
|
73
71
|
}
|
|
74
72
|
function useWorkbenchLayout() {
|
|
75
|
-
let
|
|
76
|
-
if (!
|
|
77
|
-
return
|
|
73
|
+
let t = useContext(WorkbenchLayoutContext);
|
|
74
|
+
if (!t) throw Error("useWorkbenchLayout must be used within a WorkbenchLayoutProvider");
|
|
75
|
+
return t;
|
|
78
76
|
}
|
|
79
77
|
export { WorkbenchLayoutProvider, useWorkbenchLayout };
|
|
@@ -1,63 +1,80 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
2
|
import { Label } from "../../../components/ui/label.js";
|
|
3
3
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select.js";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { useMemo } from "react";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Info, Loader2, Plus } from "lucide-react";
|
|
7
|
-
function EnvironmentSlotSelector(
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
function EnvironmentSlotSelector(h) {
|
|
9
|
+
let g = c(25), { slot: _, environments: v, selectedEnvironmentId: y, onSelect: b, onCreateEnvironment: x, isCreating: S, error: C } = h, w;
|
|
10
|
+
if (g[0] !== v || g[1] !== _.type) {
|
|
11
|
+
let e;
|
|
12
|
+
g[3] === _.type ? e = g[4] : (e = (e) => _.type ? e.type === _.type : !0, g[3] = _.type, g[4] = e), w = v.filter(e), g[0] = v, g[1] = _.type, g[2] = w;
|
|
13
|
+
} else w = g[2];
|
|
14
|
+
let T = w, E = T.length > 0, D = _.title ?? _.id, O;
|
|
15
|
+
g[5] === _.optional ? O = g[6] : (O = _.optional && /* @__PURE__ */ jsx("span", {
|
|
16
|
+
className: "text-muted-foreground ml-1 font-normal",
|
|
17
|
+
children: "(optional)"
|
|
18
|
+
}), g[5] = _.optional, g[6] = O);
|
|
19
|
+
let k;
|
|
20
|
+
g[7] !== D || g[8] !== O ? (k = /* @__PURE__ */ jsxs(Label, { children: [D, O] }), g[7] = D, g[8] = O, g[9] = k) : k = g[9];
|
|
21
|
+
let A;
|
|
22
|
+
g[10] !== C || g[11] !== E || g[12] !== S || g[13] !== T || g[14] !== x || g[15] !== b || g[16] !== y || g[17] !== _.optional ? (A = E ? /* @__PURE__ */ jsxs(Select, {
|
|
23
|
+
value: y,
|
|
24
|
+
onValueChange: b,
|
|
25
|
+
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
26
|
+
className: "w-full",
|
|
27
|
+
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an environment" })
|
|
28
|
+
}), /* @__PURE__ */ jsxs(SelectContent, { children: [_.optional && /* @__PURE__ */ jsx(SelectItem, {
|
|
29
|
+
value: "__none__",
|
|
30
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: "text-muted-foreground",
|
|
32
|
+
children: "None"
|
|
33
|
+
})
|
|
34
|
+
}), T.map(_temp)] })]
|
|
35
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: `flex items-center gap-3 rounded-md border border-dashed bg-background p-3 ${C ? "border-destructive" : ""}`,
|
|
11
37
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
x ? /* @__PURE__ */ jsxs(Select, {
|
|
17
|
-
value: h,
|
|
18
|
-
onValueChange: g,
|
|
19
|
-
children: [/* @__PURE__ */ jsx(SelectTrigger, {
|
|
20
|
-
className: "w-full",
|
|
21
|
-
children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select an environment" })
|
|
22
|
-
}), /* @__PURE__ */ jsxs(SelectContent, { children: [p.optional && /* @__PURE__ */ jsx(SelectItem, {
|
|
23
|
-
value: "__none__",
|
|
24
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
25
|
-
className: "text-muted-foreground",
|
|
26
|
-
children: "None"
|
|
27
|
-
})
|
|
28
|
-
}), b.map((e) => /* @__PURE__ */ jsx(SelectItem, {
|
|
29
|
-
value: e.id,
|
|
30
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
31
|
-
className: "flex items-center gap-2",
|
|
32
|
-
children: [e.name, e.local && /* @__PURE__ */ jsx("span", {
|
|
33
|
-
className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
34
|
-
children: "Local"
|
|
35
|
-
})]
|
|
36
|
-
})
|
|
37
|
-
}, e.id))] })]
|
|
38
|
-
}) : /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
className: `flex items-center gap-3 rounded-md border border-dashed bg-background p-3 ${y ? "border-destructive" : ""}`,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(Info, { className: `h-4 w-4 shrink-0 ${y ? "text-destructive" : "text-muted-foreground"}` }),
|
|
42
|
-
/* @__PURE__ */ jsx("p", {
|
|
43
|
-
className: `text-sm flex-1 ${y ? "text-destructive" : "text-muted-foreground"}`,
|
|
44
|
-
children: "No matching environment available."
|
|
45
|
-
}),
|
|
46
|
-
_ && /* @__PURE__ */ jsxs(Button, {
|
|
47
|
-
type: "button",
|
|
48
|
-
size: "sm",
|
|
49
|
-
variant: "outline",
|
|
50
|
-
disabled: v,
|
|
51
|
-
onClick: () => _(),
|
|
52
|
-
children: [v ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), "Create"]
|
|
53
|
-
})
|
|
54
|
-
]
|
|
38
|
+
/* @__PURE__ */ jsx(Info, { className: `h-4 w-4 shrink-0 ${C ? "text-destructive" : "text-muted-foreground"}` }),
|
|
39
|
+
/* @__PURE__ */ jsx("p", {
|
|
40
|
+
className: `text-sm flex-1 ${C ? "text-destructive" : "text-muted-foreground"}`,
|
|
41
|
+
children: "No matching environment available."
|
|
55
42
|
}),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
x && /* @__PURE__ */ jsxs(Button, {
|
|
44
|
+
type: "button",
|
|
45
|
+
size: "sm",
|
|
46
|
+
variant: "outline",
|
|
47
|
+
disabled: S,
|
|
48
|
+
onClick: () => x(),
|
|
49
|
+
children: [S ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1.5 h-3.5 w-3.5" }), "Create"]
|
|
59
50
|
})
|
|
60
51
|
]
|
|
61
|
-
});
|
|
52
|
+
}), g[10] = C, g[11] = E, g[12] = S, g[13] = T, g[14] = x, g[15] = b, g[16] = y, g[17] = _.optional, g[18] = A) : A = g[18];
|
|
53
|
+
let j;
|
|
54
|
+
g[19] === C ? j = g[20] : (j = C && /* @__PURE__ */ jsx("p", {
|
|
55
|
+
className: "text-sm text-destructive",
|
|
56
|
+
children: C
|
|
57
|
+
}), g[19] = C, g[20] = j);
|
|
58
|
+
let M;
|
|
59
|
+
return g[21] !== k || g[22] !== A || g[23] !== j ? (M = /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "space-y-2",
|
|
61
|
+
children: [
|
|
62
|
+
k,
|
|
63
|
+
A,
|
|
64
|
+
j
|
|
65
|
+
]
|
|
66
|
+
}), g[21] = k, g[22] = A, g[23] = j, g[24] = M) : M = g[24], M;
|
|
67
|
+
}
|
|
68
|
+
function _temp(e) {
|
|
69
|
+
return /* @__PURE__ */ jsx(SelectItem, {
|
|
70
|
+
value: e.id,
|
|
71
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
72
|
+
className: "flex items-center gap-2",
|
|
73
|
+
children: [e.name, e.local && /* @__PURE__ */ jsx("span", {
|
|
74
|
+
className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 text-[10px] font-medium",
|
|
75
|
+
children: "Local"
|
|
76
|
+
})]
|
|
77
|
+
})
|
|
78
|
+
}, e.id);
|
|
62
79
|
}
|
|
63
80
|
export { EnvironmentSlotSelector };
|
|
@@ -2,9 +2,9 @@ import { useStudio } from "../../../providers/StudioProvider.js";
|
|
|
2
2
|
import { useWorkflowConfig } from "../../../hooks/useConfig.js";
|
|
3
3
|
import { useCreateWorkflow } from "../../../hooks/useWorkflows.js";
|
|
4
4
|
import ErrorSnackbar_default from "../../../components/feedback/ErrorSnackbar.js";
|
|
5
|
-
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
6
5
|
import ArgumentsView_default from "./workflow-form/ArgumentsView.js";
|
|
7
6
|
import SelectionView_default from "./workflow-form/SelectionView.js";
|
|
7
|
+
import { useRunWorkflow } from "../../../hooks/useProcessor.js";
|
|
8
8
|
import { c } from "react/compiler-runtime";
|
|
9
9
|
import { useEffect, useMemo, useState } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -79,7 +79,7 @@ var WorkspaceHomePage_default = (p) => {
|
|
|
79
79
|
}), m[28] = k, m[29] = P, m[30] = B, m[31] = V) : V = m[31];
|
|
80
80
|
let H;
|
|
81
81
|
return m[32] !== V || m[33] !== F || m[34] !== I || m[35] !== L || m[36] !== R || m[37] !== z ? (H = /* @__PURE__ */ jsxs("div", {
|
|
82
|
-
className: "mx-auto flex min-h-[
|
|
82
|
+
className: "mx-auto flex min-h-[80vh] max-w-2xl flex-col items-center justify-center",
|
|
83
83
|
children: [
|
|
84
84
|
F,
|
|
85
85
|
I,
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
1
|
+
import { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey } from "./query-keys.js";
|
|
2
2
|
import { useApiClient } from "./useApi.js";
|
|
3
3
|
import { useIsMobile } from "./use-mobile.js";
|
|
4
4
|
import { useAvailableEnvironments, useWorkflowConfig, useWorkspaceConfig } from "./useConfig.js";
|
package/dist/hooks/query-keys.js
CHANGED
|
@@ -7,11 +7,11 @@ function getHealthCacheKey(e) {
|
|
|
7
7
|
function getWorkspaceTypesCacheKey(e) {
|
|
8
8
|
return ["workspace-types", e];
|
|
9
9
|
}
|
|
10
|
-
function getWorkflowTypesCacheKey(e,
|
|
10
|
+
function getWorkflowTypesCacheKey(e, y) {
|
|
11
11
|
return [
|
|
12
12
|
"workflowTypes",
|
|
13
13
|
e,
|
|
14
|
-
|
|
14
|
+
y
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
17
|
function getAvailableEnvironmentsCacheKey(e) {
|
|
@@ -24,81 +24,102 @@ function getDashboardStatsCacheKey(e) {
|
|
|
24
24
|
e
|
|
25
25
|
];
|
|
26
26
|
}
|
|
27
|
-
function getWorkflowCacheKey(e,
|
|
27
|
+
function getWorkflowCacheKey(e, y) {
|
|
28
28
|
return [
|
|
29
29
|
"workflow",
|
|
30
30
|
e,
|
|
31
|
-
|
|
31
|
+
y
|
|
32
32
|
];
|
|
33
33
|
}
|
|
34
34
|
function getWorkflowsCacheKey(e) {
|
|
35
35
|
return ["workflows", e];
|
|
36
36
|
}
|
|
37
|
-
function getChildWorkflowsCacheKey(e,
|
|
37
|
+
function getChildWorkflowsCacheKey(e, y) {
|
|
38
38
|
return [
|
|
39
39
|
"childWorkflows",
|
|
40
40
|
e,
|
|
41
|
-
|
|
41
|
+
y
|
|
42
42
|
];
|
|
43
43
|
}
|
|
44
|
-
function getWorkflowConfigCacheKey(e,
|
|
44
|
+
function getWorkflowConfigCacheKey(e, y) {
|
|
45
45
|
return [
|
|
46
46
|
"workflowConfig",
|
|
47
47
|
e,
|
|
48
|
-
|
|
48
|
+
y
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
-
function getWorkflowSourceCacheKey(e,
|
|
51
|
+
function getWorkflowSourceCacheKey(e, y) {
|
|
52
52
|
return [
|
|
53
53
|
"workflowSource",
|
|
54
54
|
e,
|
|
55
|
-
|
|
55
|
+
y
|
|
56
56
|
];
|
|
57
57
|
}
|
|
58
|
-
function getWorkspaceCacheKey(e,
|
|
58
|
+
function getWorkspaceCacheKey(e, y) {
|
|
59
59
|
return [
|
|
60
60
|
"workspace",
|
|
61
61
|
e,
|
|
62
|
-
|
|
62
|
+
y
|
|
63
63
|
];
|
|
64
64
|
}
|
|
65
65
|
function getWorkspacesCacheKey(e) {
|
|
66
66
|
return ["workspaces", e];
|
|
67
67
|
}
|
|
68
|
-
function getDocumentCacheKey(e,
|
|
68
|
+
function getDocumentCacheKey(e, y) {
|
|
69
69
|
return [
|
|
70
70
|
"document",
|
|
71
71
|
e,
|
|
72
|
-
|
|
72
|
+
y
|
|
73
73
|
];
|
|
74
74
|
}
|
|
75
|
-
function getDocumentsCacheKey(e,
|
|
75
|
+
function getDocumentsCacheKey(e, y) {
|
|
76
76
|
return [
|
|
77
77
|
"documents",
|
|
78
78
|
e,
|
|
79
|
-
|
|
79
|
+
y
|
|
80
80
|
];
|
|
81
81
|
}
|
|
82
|
-
function getSecretsCacheKey(e,
|
|
82
|
+
function getSecretsCacheKey(e, y) {
|
|
83
83
|
return [
|
|
84
84
|
"secrets",
|
|
85
85
|
e,
|
|
86
|
-
|
|
86
|
+
y
|
|
87
87
|
];
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function getGitStatusCacheKey(e, y) {
|
|
90
|
+
return [
|
|
91
|
+
"gitStatus",
|
|
92
|
+
e,
|
|
93
|
+
y
|
|
94
|
+
];
|
|
95
|
+
}
|
|
96
|
+
function getGitLogCacheKey(e, y) {
|
|
97
|
+
return [
|
|
98
|
+
"gitLog",
|
|
99
|
+
e,
|
|
100
|
+
y
|
|
101
|
+
];
|
|
102
|
+
}
|
|
103
|
+
function getGitRemoteCacheKey(e, y) {
|
|
104
|
+
return [
|
|
105
|
+
"gitRemote",
|
|
106
|
+
e,
|
|
107
|
+
y
|
|
108
|
+
];
|
|
109
|
+
}
|
|
110
|
+
function getFileTreeCacheKey(e, y) {
|
|
90
111
|
return [
|
|
91
112
|
"fileTree",
|
|
92
113
|
e,
|
|
93
|
-
|
|
114
|
+
y
|
|
94
115
|
];
|
|
95
116
|
}
|
|
96
|
-
function getFileContentCacheKey(e,
|
|
117
|
+
function getFileContentCacheKey(e, y, b) {
|
|
97
118
|
return [
|
|
98
119
|
"fileContent",
|
|
99
120
|
e,
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
y,
|
|
122
|
+
b
|
|
102
123
|
];
|
|
103
124
|
}
|
|
104
|
-
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
|
125
|
+
export { getAvailableEnvironmentsCacheKey, getChildWorkflowsCacheKey, getDashboardStatsCacheKey, getDocumentCacheKey, getDocumentsCacheKey, getFileContentCacheKey, getFileTreeCacheKey, getGitLogCacheKey, getGitRemoteCacheKey, getGitStatusCacheKey, getHealthCacheKey, getMeCacheKey, getSecretsCacheKey, getWorkflowCacheKey, getWorkflowConfigCacheKey, getWorkflowSourceCacheKey, getWorkflowTypesCacheKey, getWorkflowsCacheKey, getWorkspaceCacheKey, getWorkspaceTypesCacheKey, getWorkspacesCacheKey };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useCallback } from "react";
|
|
2
|
+
function useDefaultEnvironmentPreviewUrl() {
|
|
3
|
+
return _temp;
|
|
4
|
+
}
|
|
5
|
+
function _temp(e, t) {
|
|
6
|
+
if (!e.connectionUrl) return "";
|
|
7
|
+
let n = new URLSearchParams({
|
|
8
|
+
url: e.connectionUrl,
|
|
9
|
+
name: e.envName || e.workerId || ""
|
|
10
|
+
});
|
|
11
|
+
return t ? `/embed/env/preview/workflows/${t}?${n}` : `/embed/env/preview?${n}`;
|
|
12
|
+
}
|
|
13
|
+
export { useDefaultEnvironmentPreviewUrl };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useApiClient } from "./useApi.js";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { useMutation } from "@tanstack/react-query";
|
|
4
|
+
function useResetEnvironment() {
|
|
5
|
+
let r = c(2), { api: i } = useApiClient(), a;
|
|
6
|
+
return r[0] === i ? a = r[1] : (a = { mutationFn: (e) => i.environments.resetEnvironment(e) }, r[0] = i, r[1] = a), useMutation(a);
|
|
7
|
+
}
|
|
8
|
+
export { useResetEnvironment };
|