@loopstack/loopstack-studio 0.23.1 → 0.24.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/index.js +12 -10
- package/dist/api/secrets.js +16 -0
- package/dist/components/dynamic-form/ArrayController.js +68 -64
- package/dist/components/dynamic-form/Form.js +46 -40
- package/dist/components/dynamic-form/FormElement.js +1 -1
- package/dist/components/dynamic-form/FormElementHeader.js +2 -2
- package/dist/components/dynamic-form/ObjectController.js +24 -21
- package/dist/components/dynamic-form/fields/BaseFieldWrapper.js +1 -1
- package/dist/components/dynamic-form/fields/InputField.js +20 -19
- package/dist/components/dynamic-form/fields/RadioField.js +18 -18
- package/dist/components/dynamic-form/fields/SelectField.js +19 -19
- package/dist/components/dynamic-form/fields/TextareaField.js +17 -17
- package/dist/components/layout/MainLayout.js +18 -31
- package/dist/components/layout/StudioSidebar.js +168 -108
- package/dist/components/page/PageBreadcrumbs.js +79 -32
- package/dist/components/ui-widgets/UiWidget.js +36 -27
- package/dist/components/ui-widgets/widgets/SecretInput.js +42 -0
- package/dist/features/code-explorer/components/FileContentViewer.js +47 -30
- package/dist/features/documents/components/DocumentList.js +5 -1
- package/dist/features/documents/renderers/AiMessage.js +11 -11
- package/dist/features/documents/renderers/DocumentFormRenderer.js +17 -11
- package/dist/features/workbench/components/WorkbenchFilesPanel.js +32 -25
- package/dist/features/workbench/components/WorkbenchFloatingPanel.js +57 -49
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +46 -34
- package/dist/features/workbench/components/WorkbenchSecretsPanel.js +182 -0
- package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +132 -117
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/query-keys.js +41 -34
- package/dist/hooks/useSecrets.js +69 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +2 -2
- package/dist/pages/DashboardPage.js +87 -35
- package/dist/pages/EmbedWorkbenchPage.js +43 -39
- package/dist/types/ai.types.js +13 -0
- package/package.json +2 -3
- package/dist/node_modules/@ai-sdk/provider/dist/index.js +0 -65
- package/dist/node_modules/@ai-sdk/provider-utils/dist/index.js +0 -1008
- package/dist/node_modules/ai/dist/index.js +0 -1083
- package/dist/node_modules/zod/v3/ZodError.js +0 -79
- package/dist/node_modules/zod/v3/errors.js +0 -6
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -5
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -90
- package/dist/node_modules/zod/v3/helpers/util.js +0 -72
- package/dist/node_modules/zod/v3/locales/en.js +0 -58
- package/dist/node_modules/zod/v3/types.js +0 -2425
- package/dist/node_modules/zod/v4/classic/errors.js +0 -21
- package/dist/node_modules/zod/v4/classic/iso.js +0 -29
- package/dist/node_modules/zod/v4/classic/parse.js +0 -4
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -392
- package/dist/node_modules/zod/v4/core/api.js +0 -532
- package/dist/node_modules/zod/v4/core/checks.js +0 -283
- package/dist/node_modules/zod/v4/core/core.js +0 -44
- package/dist/node_modules/zod/v4/core/doc.js +0 -21
- package/dist/node_modules/zod/v4/core/errors.js +0 -40
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -305
- package/dist/node_modules/zod/v4/core/parse.js +0 -66
- package/dist/node_modules/zod/v4/core/regexes.js +0 -28
- package/dist/node_modules/zod/v4/core/registries.js +0 -38
- package/dist/node_modules/zod/v4/core/schemas.js +0 -863
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -220
- package/dist/node_modules/zod/v4/core/util.js +0 -267
- package/dist/node_modules/zod/v4/core/versions.js +0 -6
|
@@ -4,85 +4,93 @@ import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
|
4
4
|
import { useNamespaceTree } from "../../../hooks/useNamespaceTree.js";
|
|
5
5
|
import WorkbenchNavigation_default from "../WorkbenchNavigation.js";
|
|
6
6
|
import PipelineHistoryList_default from "./PipelineHistoryList.js";
|
|
7
|
+
import { WorkbenchSecretsPanel } from "./WorkbenchSecretsPanel.js";
|
|
7
8
|
import { c } from "react/compiler-runtime";
|
|
8
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
10
|
import { X } from "lucide-react";
|
|
10
11
|
var PANEL_TITLES = {
|
|
11
12
|
navigation: "Navigate",
|
|
12
|
-
history: "Run Log"
|
|
13
|
+
history: "Run Log",
|
|
14
|
+
secrets: "Secrets"
|
|
13
15
|
};
|
|
14
16
|
function NavigationContent() {
|
|
15
|
-
let e = c(3), { pipeline:
|
|
16
|
-
e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
17
|
-
let
|
|
18
|
-
return e[1] ===
|
|
17
|
+
let e = c(3), { pipeline: p } = useWorkbenchLayout(), m;
|
|
18
|
+
e[0] === Symbol.for("react.memo_cache_sentinel") ? (m = { "--sidebar-width": "100%" }, e[0] = m) : m = e[0];
|
|
19
|
+
let h;
|
|
20
|
+
return e[1] === p.id ? h = e[2] : (h = /* @__PURE__ */ jsx(SidebarProvider, {
|
|
19
21
|
defaultOpen: !0,
|
|
20
22
|
className: "min-h-0",
|
|
21
|
-
style:
|
|
23
|
+
style: m,
|
|
22
24
|
children: /* @__PURE__ */ jsx("div", {
|
|
23
25
|
className: "w-full overflow-auto p-2",
|
|
24
|
-
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId:
|
|
26
|
+
children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(NavigationContentInner, { pipelineId: p.id }) })
|
|
25
27
|
})
|
|
26
|
-
}), e[1] =
|
|
28
|
+
}), e[1] = p.id, e[2] = h), h;
|
|
27
29
|
}
|
|
28
30
|
function NavigationContentInner(e) {
|
|
29
|
-
let
|
|
30
|
-
if (!
|
|
31
|
+
let u = c(3), { pipelineId: d } = e, f = useNamespaceTree(d);
|
|
32
|
+
if (!f || f.length === 0) {
|
|
31
33
|
let e;
|
|
32
|
-
return
|
|
34
|
+
return u[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
|
|
33
35
|
className: "text-muted-foreground py-4 text-center text-sm",
|
|
34
36
|
children: "No navigation items"
|
|
35
|
-
}),
|
|
37
|
+
}), u[0] = e) : e = u[0], e;
|
|
36
38
|
}
|
|
37
|
-
let
|
|
38
|
-
return
|
|
39
|
-
namespaceTree:
|
|
39
|
+
let h;
|
|
40
|
+
return u[1] === f ? h = u[2] : (h = /* @__PURE__ */ jsx(WorkbenchNavigation_default, {
|
|
41
|
+
namespaceTree: f,
|
|
40
42
|
indent: 0
|
|
41
|
-
}),
|
|
43
|
+
}), u[1] = f, u[2] = h), h;
|
|
42
44
|
}
|
|
43
45
|
function HistoryContent() {
|
|
44
|
-
let e = c(2), { pipeline:
|
|
45
|
-
return e[0] ===
|
|
46
|
+
let e = c(2), { pipeline: u } = useWorkbenchLayout(), d;
|
|
47
|
+
return e[0] === u ? d = e[1] : (d = /* @__PURE__ */ jsx("div", {
|
|
46
48
|
className: "overflow-auto p-2",
|
|
47
|
-
children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline:
|
|
48
|
-
}), e[0] =
|
|
49
|
+
children: /* @__PURE__ */ jsx(PipelineHistoryList_default, { pipeline: u })
|
|
50
|
+
}), e[0] = u, e[1] = d), d;
|
|
49
51
|
}
|
|
50
52
|
function WorkbenchFloatingPanel() {
|
|
51
|
-
let
|
|
52
|
-
if (!
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
let
|
|
56
|
-
|
|
53
|
+
let u = c(22), { activeFloatingPanel: d, closeFloatingPanel: p } = useWorkbenchLayout();
|
|
54
|
+
if (!d) return null;
|
|
55
|
+
let m;
|
|
56
|
+
u[0] === Symbol.for("react.memo_cache_sentinel") ? (m = cn("border-l bg-background absolute right-0 top-0 bottom-0 z-20 flex w-80 flex-col shadow-lg", "animate-in slide-in-from-right duration-200"), u[0] = m) : m = u[0];
|
|
57
|
+
let h = PANEL_TITLES[d], g;
|
|
58
|
+
u[1] === h ? g = u[2] : (g = /* @__PURE__ */ jsx("span", {
|
|
57
59
|
className: "text-sm font-medium",
|
|
58
|
-
children:
|
|
59
|
-
}),
|
|
60
|
-
let g;
|
|
61
|
-
l[3] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), l[3] = g) : g = l[3];
|
|
60
|
+
children: h
|
|
61
|
+
}), u[1] = h, u[2] = g);
|
|
62
62
|
let _;
|
|
63
|
-
|
|
64
|
-
onClick: f,
|
|
65
|
-
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
66
|
-
children: g
|
|
67
|
-
}), l[4] = f, l[5] = _);
|
|
63
|
+
u[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }), u[3] = _) : _ = u[3];
|
|
68
64
|
let v;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
u[4] === p ? v = u[5] : (v = /* @__PURE__ */ jsx("button", {
|
|
66
|
+
onClick: p,
|
|
67
|
+
className: "text-muted-foreground hover:text-foreground flex h-8 w-8 items-center justify-center rounded-md transition-colors hover:cursor-pointer",
|
|
68
|
+
children: _
|
|
69
|
+
}), u[4] = p, u[5] = v);
|
|
73
70
|
let y;
|
|
74
|
-
|
|
71
|
+
u[6] !== g || u[7] !== v ? (y = /* @__PURE__ */ jsxs("div", {
|
|
72
|
+
className: "border-b flex h-12 shrink-0 items-center justify-between px-3",
|
|
73
|
+
children: [g, v]
|
|
74
|
+
}), u[6] = g, u[7] = v, u[8] = y) : y = u[8];
|
|
75
75
|
let b;
|
|
76
|
-
|
|
76
|
+
u[9] === d ? b = u[10] : (b = d === "navigation" && /* @__PURE__ */ jsx(NavigationContent, {}), u[9] = d, u[10] = b);
|
|
77
77
|
let x;
|
|
78
|
-
|
|
79
|
-
className: "flex-1 overflow-hidden",
|
|
80
|
-
children: [y, b]
|
|
81
|
-
}), l[13] = y, l[14] = b, l[15] = x) : x = l[15];
|
|
78
|
+
u[11] === d ? x = u[12] : (x = d === "history" && /* @__PURE__ */ jsx(HistoryContent, {}), u[11] = d, u[12] = x);
|
|
82
79
|
let S;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
u[13] === d ? S = u[14] : (S = d === "secrets" && /* @__PURE__ */ jsx(WorkbenchSecretsPanel, {}), u[13] = d, u[14] = S);
|
|
81
|
+
let C;
|
|
82
|
+
u[15] !== b || u[16] !== x || u[17] !== S ? (C = /* @__PURE__ */ jsxs("div", {
|
|
83
|
+
className: "flex-1 overflow-hidden",
|
|
84
|
+
children: [
|
|
85
|
+
b,
|
|
86
|
+
x,
|
|
87
|
+
S
|
|
88
|
+
]
|
|
89
|
+
}), u[15] = b, u[16] = x, u[17] = S, u[18] = C) : C = u[18];
|
|
90
|
+
let w;
|
|
91
|
+
return u[19] !== y || u[20] !== C ? (w = /* @__PURE__ */ jsxs("div", {
|
|
92
|
+
className: m,
|
|
93
|
+
children: [y, C]
|
|
94
|
+
}), u[19] = y, u[20] = C, u[21] = w) : w = u[21], w;
|
|
87
95
|
}
|
|
88
96
|
export { WorkbenchFloatingPanel };
|
|
@@ -3,7 +3,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/
|
|
|
3
3
|
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
4
4
|
import { c } from "react/compiler-runtime";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Files, ListOrdered, MonitorPlay, Navigation, Workflow } from "lucide-react";
|
|
6
|
+
import { Files, KeyRound, ListOrdered, MonitorPlay, Navigation, Workflow } from "lucide-react";
|
|
7
7
|
function IconButton(s) {
|
|
8
8
|
let l = c(11), { icon: u, label: d, active: f, onClick: p } = s, m = f ? "bg-foreground text-background" : "text-muted-foreground hover:bg-accent/50 hover:text-accent-foreground", h;
|
|
9
9
|
l[0] === m ? h = l[1] : (h = cn("flex h-10 w-10 items-center justify-center rounded-md transition-colors hover:cursor-pointer", m), l[0] = m, l[1] = h);
|
|
@@ -25,52 +25,64 @@ function IconButton(s) {
|
|
|
25
25
|
return l[8] !== g || l[9] !== _ ? (v = /* @__PURE__ */ jsxs(Tooltip, { children: [g, _] }), l[8] = g, l[9] = _, l[10] = v) : v = l[10], v;
|
|
26
26
|
}
|
|
27
27
|
function WorkbenchIconSidebar() {
|
|
28
|
-
let e = c(
|
|
29
|
-
e[0] !==
|
|
28
|
+
let e = c(32), { previewPanelEnabled: i, fileExplorerEnabled: a, isDeveloperMode: o, activeFloatingPanel: _, toggleFloatingPanel: v, activeSidePanel: y, toggleSidePanel: b } = useWorkbenchLayout(), x;
|
|
29
|
+
e[0] !== y || e[1] !== i || e[2] !== b ? (x = i && /* @__PURE__ */ jsx(IconButton, {
|
|
30
30
|
icon: /* @__PURE__ */ jsx(MonitorPlay, { className: "h-5 w-5" }),
|
|
31
31
|
label: "Preview",
|
|
32
|
-
active:
|
|
33
|
-
onClick: () =>
|
|
34
|
-
}), e[0] =
|
|
35
|
-
let
|
|
36
|
-
e[4] !==
|
|
32
|
+
active: y === "preview",
|
|
33
|
+
onClick: () => b("preview")
|
|
34
|
+
}), e[0] = y, e[1] = i, e[2] = b, e[3] = x) : x = e[3];
|
|
35
|
+
let S;
|
|
36
|
+
e[4] !== _ || e[5] !== y || e[6] !== o || e[7] !== v || e[8] !== b ? (S = o && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(IconButton, {
|
|
37
37
|
icon: /* @__PURE__ */ jsx(Workflow, { className: "h-5 w-5" }),
|
|
38
38
|
label: "Graph",
|
|
39
|
-
active:
|
|
40
|
-
onClick: () =>
|
|
39
|
+
active: y === "flow",
|
|
40
|
+
onClick: () => b("flow")
|
|
41
41
|
}), /* @__PURE__ */ jsx(IconButton, {
|
|
42
42
|
icon: /* @__PURE__ */ jsx(ListOrdered, { className: "h-5 w-5" }),
|
|
43
43
|
label: "Run Log",
|
|
44
|
-
active:
|
|
45
|
-
onClick: () =>
|
|
46
|
-
})] }), e[4] =
|
|
47
|
-
let
|
|
48
|
-
e[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
49
|
-
let
|
|
50
|
-
e[11] ===
|
|
51
|
-
let T;
|
|
52
|
-
e[13] !== C || e[14] !== w ? (T = /* @__PURE__ */ jsx(IconButton, {
|
|
53
|
-
icon: S,
|
|
54
|
-
label: "Navigate",
|
|
55
|
-
active: C,
|
|
56
|
-
onClick: w
|
|
57
|
-
}), e[13] = C, e[14] = w, e[15] = T) : T = e[15];
|
|
44
|
+
active: _ === "history",
|
|
45
|
+
onClick: () => v("history")
|
|
46
|
+
})] }), e[4] = _, e[5] = y, e[6] = o, e[7] = v, e[8] = b, e[9] = S) : S = e[9];
|
|
47
|
+
let C;
|
|
48
|
+
e[10] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(Navigation, { className: "h-5 w-5" }), e[10] = C) : C = e[10];
|
|
49
|
+
let w = _ === "navigation", T;
|
|
50
|
+
e[11] === v ? T = e[12] : (T = () => v("navigation"), e[11] = v, e[12] = T);
|
|
58
51
|
let E;
|
|
59
|
-
e[
|
|
52
|
+
e[13] !== w || e[14] !== T ? (E = /* @__PURE__ */ jsx(IconButton, {
|
|
53
|
+
icon: C,
|
|
54
|
+
label: "Navigate",
|
|
55
|
+
active: w,
|
|
56
|
+
onClick: T
|
|
57
|
+
}), e[13] = w, e[14] = T, e[15] = E) : E = e[15];
|
|
58
|
+
let D;
|
|
59
|
+
e[16] !== y || e[17] !== a || e[18] !== b ? (D = a && /* @__PURE__ */ jsx(IconButton, {
|
|
60
60
|
icon: /* @__PURE__ */ jsx(Files, { className: "h-5 w-5" }),
|
|
61
61
|
label: "Files",
|
|
62
|
-
active:
|
|
63
|
-
onClick: () =>
|
|
64
|
-
}), e[16] =
|
|
65
|
-
let
|
|
66
|
-
|
|
62
|
+
active: y === "files",
|
|
63
|
+
onClick: () => b("files")
|
|
64
|
+
}), e[16] = y, e[17] = a, e[18] = b, e[19] = D) : D = e[19];
|
|
65
|
+
let O;
|
|
66
|
+
e[20] === Symbol.for("react.memo_cache_sentinel") ? (O = /* @__PURE__ */ jsx(KeyRound, { className: "h-5 w-5" }), e[20] = O) : O = e[20];
|
|
67
|
+
let k = _ === "secrets", A;
|
|
68
|
+
e[21] === v ? A = e[22] : (A = () => v("secrets"), e[21] = v, e[22] = A);
|
|
69
|
+
let j;
|
|
70
|
+
e[23] !== k || e[24] !== A ? (j = /* @__PURE__ */ jsx(IconButton, {
|
|
71
|
+
icon: O,
|
|
72
|
+
label: "Secrets",
|
|
73
|
+
active: k,
|
|
74
|
+
onClick: A
|
|
75
|
+
}), e[23] = k, e[24] = A, e[25] = j) : j = e[25];
|
|
76
|
+
let M;
|
|
77
|
+
return e[26] !== x || e[27] !== S || e[28] !== j || e[29] !== E || e[30] !== D ? (M = /* @__PURE__ */ jsxs("div", {
|
|
67
78
|
className: "border-l bg-background flex w-12 shrink-0 flex-col items-center gap-1 py-2",
|
|
68
79
|
children: [
|
|
69
|
-
b,
|
|
70
80
|
x,
|
|
71
|
-
|
|
72
|
-
E
|
|
81
|
+
S,
|
|
82
|
+
E,
|
|
83
|
+
D,
|
|
84
|
+
j
|
|
73
85
|
]
|
|
74
|
-
}), e[
|
|
86
|
+
}), e[26] = x, e[27] = S, e[28] = j, e[29] = E, e[30] = D, e[31] = M) : M = e[31], M;
|
|
75
87
|
}
|
|
76
88
|
export { WorkbenchIconSidebar };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { Button } from "../../../components/ui/button.js";
|
|
2
|
+
import { Input } from "../../../components/ui/input.js";
|
|
3
|
+
import { Label } from "../../../components/ui/label.js";
|
|
4
|
+
import { useCreateSecret, useDeleteSecret, useUpdateSecret, useWorkspaceSecrets } from "../../../hooks/useSecrets.js";
|
|
5
|
+
import { useWorkbenchLayout } from "../providers/WorkbenchLayoutProvider.js";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { useState } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { KeyRound, Loader2, Plus, Trash2 } from "lucide-react";
|
|
10
|
+
function WorkbenchSecretsPanel() {
|
|
11
|
+
let _ = c(46), { pipeline: v } = useWorkbenchLayout(), y = v?.workspaceId, { data: b, isLoading: x } = useWorkspaceSecrets(y), S = useCreateSecret(), C = useUpdateSecret(), w = useDeleteSecret(), [T, E] = useState(""), [D, O] = useState(""), [k, A] = useState(null), [j, M] = useState(""), N;
|
|
12
|
+
_[0] !== S || _[1] !== T || _[2] !== D || _[3] !== y ? (N = async () => {
|
|
13
|
+
!y || !T.trim() || !D.trim() || (await S.mutateAsync({
|
|
14
|
+
workspaceId: y,
|
|
15
|
+
key: T.trim(),
|
|
16
|
+
value: D
|
|
17
|
+
}), E(""), O(""));
|
|
18
|
+
}, _[0] = S, _[1] = T, _[2] = D, _[3] = y, _[4] = N) : N = _[4];
|
|
19
|
+
let P = N, F;
|
|
20
|
+
_[5] !== j || _[6] !== C || _[7] !== y ? (F = async (n) => {
|
|
21
|
+
!y || !j || (await C.mutateAsync({
|
|
22
|
+
workspaceId: y,
|
|
23
|
+
id: n,
|
|
24
|
+
value: j
|
|
25
|
+
}), A(null), M(""));
|
|
26
|
+
}, _[5] = j, _[6] = C, _[7] = y, _[8] = F) : F = _[8];
|
|
27
|
+
let I = F, L;
|
|
28
|
+
_[9] !== w || _[10] !== y ? (L = async (n) => {
|
|
29
|
+
y && await w.mutateAsync({
|
|
30
|
+
workspaceId: y,
|
|
31
|
+
id: n
|
|
32
|
+
});
|
|
33
|
+
}, _[9] = w, _[10] = y, _[11] = L) : L = _[11];
|
|
34
|
+
let R = L, z;
|
|
35
|
+
_[12] === Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: "border-b px-4 py-3",
|
|
37
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
38
|
+
className: "flex items-center gap-2",
|
|
39
|
+
children: [/* @__PURE__ */ jsx(KeyRound, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("h3", {
|
|
40
|
+
className: "text-sm font-medium",
|
|
41
|
+
children: "Secrets"
|
|
42
|
+
})]
|
|
43
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
44
|
+
className: "text-muted-foreground mt-1 text-xs",
|
|
45
|
+
children: "Manage environment variables for this workspace."
|
|
46
|
+
})]
|
|
47
|
+
}), _[12] = z) : z = _[12];
|
|
48
|
+
let B;
|
|
49
|
+
_[13] !== j || _[14] !== k || _[15] !== R || _[16] !== I || _[17] !== x || _[18] !== b ? (B = /* @__PURE__ */ jsx("div", {
|
|
50
|
+
className: "flex-1 overflow-y-auto px-4 py-3",
|
|
51
|
+
children: x ? /* @__PURE__ */ jsxs("div", {
|
|
52
|
+
className: "flex items-center gap-2 py-4",
|
|
53
|
+
children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "text-muted-foreground text-sm",
|
|
55
|
+
children: "Loading..."
|
|
56
|
+
})]
|
|
57
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
58
|
+
className: "space-y-2",
|
|
59
|
+
children: [b?.map((g) => /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
className: "bg-muted/50 flex items-center gap-2 rounded-md px-3 py-2",
|
|
61
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
62
|
+
className: "flex-1",
|
|
63
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
64
|
+
className: "font-mono text-sm",
|
|
65
|
+
children: g.key
|
|
66
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
67
|
+
className: "text-muted-foreground text-xs",
|
|
68
|
+
children: g.hasValue ? "Value set" : "No value"
|
|
69
|
+
})]
|
|
70
|
+
}), k === g.id ? /* @__PURE__ */ jsxs("div", {
|
|
71
|
+
className: "flex items-center gap-1",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(Input, {
|
|
74
|
+
type: "password",
|
|
75
|
+
value: j,
|
|
76
|
+
onChange: (n) => M(n.target.value),
|
|
77
|
+
placeholder: "New value",
|
|
78
|
+
className: "h-7 w-32 text-xs"
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ jsx(Button, {
|
|
81
|
+
size: "sm",
|
|
82
|
+
variant: "outline",
|
|
83
|
+
className: "h-7 text-xs",
|
|
84
|
+
onClick: () => void I(g.id),
|
|
85
|
+
children: "Save"
|
|
86
|
+
}),
|
|
87
|
+
/* @__PURE__ */ jsx(Button, {
|
|
88
|
+
size: "sm",
|
|
89
|
+
variant: "ghost",
|
|
90
|
+
className: "h-7 text-xs",
|
|
91
|
+
onClick: () => {
|
|
92
|
+
A(null), M("");
|
|
93
|
+
},
|
|
94
|
+
children: "Cancel"
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
98
|
+
className: "flex items-center gap-1",
|
|
99
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
100
|
+
size: "sm",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
className: "h-7 text-xs",
|
|
103
|
+
onClick: () => {
|
|
104
|
+
A(g.id), M("");
|
|
105
|
+
},
|
|
106
|
+
children: "Update"
|
|
107
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
108
|
+
size: "sm",
|
|
109
|
+
variant: "ghost",
|
|
110
|
+
className: "h-7",
|
|
111
|
+
onClick: () => void R(g.id),
|
|
112
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "h-3 w-3" })
|
|
113
|
+
})]
|
|
114
|
+
})]
|
|
115
|
+
}, g.id)), b?.length === 0 && /* @__PURE__ */ jsx("p", {
|
|
116
|
+
className: "text-muted-foreground py-4 text-center text-sm",
|
|
117
|
+
children: "No secrets yet."
|
|
118
|
+
})]
|
|
119
|
+
})
|
|
120
|
+
}), _[13] = j, _[14] = k, _[15] = R, _[16] = I, _[17] = x, _[18] = b, _[19] = B) : B = _[19];
|
|
121
|
+
let V;
|
|
122
|
+
_[20] === Symbol.for("react.memo_cache_sentinel") ? (V = /* @__PURE__ */ jsx(Label, {
|
|
123
|
+
className: "text-xs",
|
|
124
|
+
children: "Add Secret"
|
|
125
|
+
}), _[20] = V) : V = _[20];
|
|
126
|
+
let H;
|
|
127
|
+
_[21] === Symbol.for("react.memo_cache_sentinel") ? (H = (n) => E(n.target.value), _[21] = H) : H = _[21];
|
|
128
|
+
let U;
|
|
129
|
+
_[22] === T ? U = _[23] : (U = /* @__PURE__ */ jsx(Input, {
|
|
130
|
+
value: T,
|
|
131
|
+
onChange: H,
|
|
132
|
+
placeholder: "KEY_NAME",
|
|
133
|
+
className: "font-mono text-sm"
|
|
134
|
+
}), _[22] = T, _[23] = U);
|
|
135
|
+
let W;
|
|
136
|
+
_[24] === Symbol.for("react.memo_cache_sentinel") ? (W = (n) => O(n.target.value), _[24] = W) : W = _[24];
|
|
137
|
+
let G;
|
|
138
|
+
_[25] === D ? G = _[26] : (G = /* @__PURE__ */ jsx(Input, {
|
|
139
|
+
type: "password",
|
|
140
|
+
value: D,
|
|
141
|
+
onChange: W,
|
|
142
|
+
placeholder: "Value",
|
|
143
|
+
className: "text-sm"
|
|
144
|
+
}), _[25] = D, _[26] = G);
|
|
145
|
+
let K;
|
|
146
|
+
_[27] !== S.isPending || _[28] !== T || _[29] !== D ? (K = !T.trim() || !D.trim() || S.isPending, _[27] = S.isPending, _[28] = T, _[29] = D, _[30] = K) : K = _[30];
|
|
147
|
+
let q;
|
|
148
|
+
_[31] === P ? q = _[32] : (q = () => void P(), _[31] = P, _[32] = q);
|
|
149
|
+
let J;
|
|
150
|
+
_[33] === S.isPending ? J = _[34] : (J = S.isPending ? /* @__PURE__ */ jsx(Loader2, { className: "mr-1 h-3 w-3 animate-spin" }) : /* @__PURE__ */ jsx(Plus, { className: "mr-1 h-3 w-3" }), _[33] = S.isPending, _[34] = J);
|
|
151
|
+
let Y;
|
|
152
|
+
_[35] !== K || _[36] !== q || _[37] !== J ? (Y = /* @__PURE__ */ jsxs(Button, {
|
|
153
|
+
size: "sm",
|
|
154
|
+
className: "w-full",
|
|
155
|
+
disabled: K,
|
|
156
|
+
onClick: q,
|
|
157
|
+
children: [J, "Add Secret"]
|
|
158
|
+
}), _[35] = K, _[36] = q, _[37] = J, _[38] = Y) : Y = _[38];
|
|
159
|
+
let X;
|
|
160
|
+
_[39] !== Y || _[40] !== U || _[41] !== G ? (X = /* @__PURE__ */ jsx("div", {
|
|
161
|
+
className: "border-t px-4 py-3",
|
|
162
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
163
|
+
className: "space-y-2",
|
|
164
|
+
children: [
|
|
165
|
+
V,
|
|
166
|
+
U,
|
|
167
|
+
G,
|
|
168
|
+
Y
|
|
169
|
+
]
|
|
170
|
+
})
|
|
171
|
+
}), _[39] = Y, _[40] = U, _[41] = G, _[42] = X) : X = _[42];
|
|
172
|
+
let Z;
|
|
173
|
+
return _[43] !== X || _[44] !== B ? (Z = /* @__PURE__ */ jsxs("div", {
|
|
174
|
+
className: "flex h-full flex-col",
|
|
175
|
+
children: [
|
|
176
|
+
z,
|
|
177
|
+
B,
|
|
178
|
+
X
|
|
179
|
+
]
|
|
180
|
+
}), _[43] = X, _[44] = B, _[45] = Z) : Z = _[45], Z;
|
|
181
|
+
}
|
|
182
|
+
export { WorkbenchSecretsPanel };
|