@loopstack/loopstack-studio 0.29.5 → 0.31.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/_virtual/rolldown_runtime.js +3 -1
- package/dist/api/config.js +5 -4
- package/dist/api/environments.js +5 -1
- package/dist/api/processor.js +4 -1
- package/dist/app/EnvironmentEmbedRoot.js +22 -30
- package/dist/components/ai-elements/code-block.js +4 -4
- package/dist/components/dynamic-form/CodeContent.js +1 -1
- package/dist/components/dynamic-form/FormBody.js +1 -1
- package/dist/components/layout/StudioSidebar.js +116 -131
- package/dist/components/lists/ListView.js +46 -46
- package/dist/components/motion/FadeIn.js +72 -0
- package/dist/components/motion/StreamingText.js +49 -0
- package/dist/components/ui/accordion.js +2 -2
- package/dist/components/ui-widgets/UiWidget.js +11 -10
- package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
- package/dist/events/sse-client-events.js +7 -1
- package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
- package/dist/features/dashboard/AppLauncher.js +84 -0
- package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
- package/dist/features/documents/DocumentRenderer.js +18 -17
- package/dist/features/documents/components/DocumentItem.js +42 -20
- package/dist/features/documents/components/DocumentList.js +34 -36
- package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
- package/dist/features/documents/document-details/DocumentDetails.js +577 -377
- package/dist/features/documents/document-details/PromptDetails.js +118 -130
- package/dist/features/documents/document-details/document-debug-utils.js +100 -0
- package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
- package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
- package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
- package/dist/features/documents/renderers/LlmMessage.js +52 -47
- package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
- package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
- package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
- package/dist/features/feature-registry/available-features.js +12 -0
- package/dist/features/feature-registry/index.js +2 -1
- package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
- package/dist/features/git/components/GitBranchBadge.js +31 -0
- package/dist/features/git/components/GitCommitList.js +46 -0
- package/dist/features/git/components/GitRemoteStatus.js +84 -0
- package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
- package/dist/features/git/git-feature.js +12 -0
- package/dist/features/git/hooks/useGit.js +78 -0
- package/dist/features/git/index.js +1 -0
- package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
- package/dist/features/runs/Runs.js +73 -73
- package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
- package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
- package/dist/features/workbench/Workbench.js +25 -33
- package/dist/features/workbench/WorkflowItem.js +9 -9
- package/dist/features/workbench/WorkflowList.js +61 -62
- package/dist/features/workbench/components/NewRunDialog.js +237 -209
- package/dist/features/workbench/components/RecentRunItem.js +3 -3
- package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
- package/dist/features/workbench/components/WorkbenchIconSidebar.js +74 -109
- package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
- package/dist/features/workbench/components/WorkflowForms.js +11 -10
- package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
- package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
- package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
- package/dist/features/workbench/index.js +2 -2
- package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
- package/dist/features/workspaces/Workspaces.js +166 -136
- package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
- package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
- package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
- package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
- package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
- package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
- package/dist/hooks/index.js +3 -2
- package/dist/hooks/query-keys.js +43 -30
- package/dist/hooks/useConfig.js +28 -22
- package/dist/hooks/useEnvironments.js +27 -2
- package/dist/hooks/useProcessor.js +14 -1
- package/dist/hooks/useWorkflows.js +4 -4
- package/dist/index.d.ts +119 -18
- package/dist/index.js +10 -9
- package/dist/node_modules/d3/src/index.js +13 -13
- package/dist/node_modules/d3-scale/src/continuous.js +16 -16
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
- package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
- package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
- package/dist/node_modules/motion/dist/es/react.js +9 -2
- package/dist/pages/DashboardPage.js +20 -74
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
- package/dist/pages/DebugWorkflowsPage.js +76 -106
- package/dist/pages/EmbedWorkbenchPage.js +1 -1
- package/dist/pages/PreviewWorkbenchPage.js +6 -6
- package/dist/pages/WorkbenchPage.js +43 -47
- package/dist/pages/WorkflowDebugPage.js +6 -12
- package/dist/pages/WorkspacePage.js +40 -66
- package/dist/pages/WorkspaceRunsPage.js +24 -31
- package/dist/routing/LocalRouter.js +1 -1
- package/package.json +2 -2
- package/dist/features/dashboard/Dashboard.js +0 -125
- package/dist/features/dashboard/RunItem.js +0 -78
- package/dist/features/dashboard/RunList.js +0 -32
- package/dist/hooks/useDashboard.js +0 -16
|
@@ -11,8 +11,10 @@ var __create = Object.create, __defProp = Object.defineProperty, __getOwnPropDes
|
|
|
11
11
|
enumerable: !(s = __getOwnPropDesc(i, d)) || s.enumerable
|
|
12
12
|
});
|
|
13
13
|
return e;
|
|
14
|
+
}, __reExport = (e, n, r, i) => {
|
|
15
|
+
i && (__defProp(e, Symbol.toStringTag, { value: "Module" }), r && __defProp(r, Symbol.toStringTag, { value: "Module" })), __copyProps(e, n, "default"), r && __copyProps(r, n, "default");
|
|
14
16
|
}, __toESM = (n, r, a) => (a = n == null ? {} : __create(__getProtoOf(n)), __copyProps(r || !n || !n.__esModule ? __defProp(a, "default", {
|
|
15
17
|
value: n,
|
|
16
18
|
enumerable: !0
|
|
17
19
|
}) : a, n));
|
|
18
|
-
export { __commonJSMin, __export, __toESM };
|
|
20
|
+
export { __commonJSMin, __export, __reExport, __toESM };
|
package/dist/api/config.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
function createConfigApi(e) {
|
|
2
2
|
return {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
getApps: () => e.get("/api/v1/config/apps").then((e) => e.data),
|
|
4
|
+
getWorkflowConfig: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}`).then((e) => e.data),
|
|
5
|
+
getWorkflowSource: (t) => e.get(`/api/v1/config/workflows/${encodeURIComponent(t.workflowName)}/source`).then((e) => e.data),
|
|
6
|
+
getToolConfigs: () => e.get("/api/v1/config/tools").then((e) => e.data),
|
|
7
|
+
getToolConfig: (t) => e.get(`/api/v1/config/tools/${encodeURIComponent(t.toolName)}`).then((e) => e.data),
|
|
7
8
|
getAvailableEnvironments: () => e.get("/api/v1/config/environments").then((e) => e.data)
|
|
8
9
|
};
|
|
9
10
|
}
|
package/dist/api/environments.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
function createEnvironmentsApi(e) {
|
|
2
|
-
return {
|
|
2
|
+
return {
|
|
3
|
+
getByWorkspace: (t) => e.get(`/api/v1/workspaces/${t}/environments`).then((e) => e.data),
|
|
4
|
+
replaceEnvironments: (t, n) => e.put(`/api/v1/workspaces/${t}/environments`, n).then((e) => e.data),
|
|
5
|
+
resetEnvironment: (t) => e.post(`/api/v1/workspaces/${t.workspaceId}/environments/${t.slotId}/reset`).then((e) => e.data)
|
|
6
|
+
};
|
|
3
7
|
}
|
|
4
8
|
export { createEnvironmentsApi };
|
package/dist/api/processor.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
function createProcessorApi(e) {
|
|
2
|
-
return {
|
|
2
|
+
return {
|
|
3
|
+
startWorkflow: (t) => e.post("/api/v1/processor/start", t.payload).then((e) => e.data),
|
|
4
|
+
runWorkflow: (t) => e.post(`/api/v1/processor/run/${t.workflowId}`, t.runWorkflowPayloadDto, t.force === void 0 ? void 0 : { params: { force: t.force } }).then((e) => e.data)
|
|
5
|
+
};
|
|
3
6
|
}
|
|
4
7
|
export { createProcessorApi };
|
|
@@ -4,42 +4,34 @@ import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvi
|
|
|
4
4
|
import { useRouter } from "../routing/LocalRouter.js";
|
|
5
5
|
import { FeatureRegistryProvider } from "../features/feature-registry/FeatureRegistryProvider.js";
|
|
6
6
|
import "../features/feature-registry/index.js";
|
|
7
|
-
import { fileExplorerFeature } from "../features/file-explorer/file-explorer-feature.js";
|
|
8
|
-
import "../features/file-explorer/index.js";
|
|
9
7
|
import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
|
|
10
|
-
import { secretsFeature } from "../features/secrets/secrets-feature.js";
|
|
11
|
-
import "../features/secrets/index.js";
|
|
12
8
|
import { QueryProvider } from "../providers/QueryProvider.js";
|
|
13
9
|
import { c } from "react/compiler-runtime";
|
|
14
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
15
11
|
import { Outlet, useSearchParams } from "react-router-dom";
|
|
16
|
-
var defaultFeatures = [secretsFeature, fileExplorerFeature];
|
|
17
12
|
function EnvironmentEmbedRoot() {
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
13
|
+
let p = c(11), [m] = useSearchParams(), h;
|
|
14
|
+
p[0] === m ? h = p[1] : (h = m.get("url") ?? "http://localhost:3080", p[0] = m, p[1] = h);
|
|
15
|
+
let g = h, _;
|
|
16
|
+
p[2] === m ? _ = p[3] : (_ = m.get("name") ?? "Preview Environment", p[2] = m, p[3] = _);
|
|
17
|
+
let v = _, y;
|
|
18
|
+
p[4] !== v || p[5] !== g ? (y = {
|
|
24
19
|
id: "preview-env",
|
|
25
|
-
name:
|
|
26
|
-
url:
|
|
27
|
-
},
|
|
28
|
-
let
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
environment: x,
|
|
42
|
-
children: C
|
|
43
|
-
}) }), m[8] = x, m[9] = S, m[10] = w) : w = m[10], w;
|
|
20
|
+
name: v,
|
|
21
|
+
url: g
|
|
22
|
+
}, p[4] = v, p[5] = g, p[6] = y) : y = p[6];
|
|
23
|
+
let b = y, x = useRouter(b.id, "/embed/env"), S;
|
|
24
|
+
p[7] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsxs(FeatureRegistryProvider, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(LocalHealthCheck_default, {}),
|
|
26
|
+
/* @__PURE__ */ jsx(SseProvider, {}),
|
|
27
|
+
/* @__PURE__ */ jsx(InvalidationEventsProvider, {}),
|
|
28
|
+
/* @__PURE__ */ jsx(Outlet, {})
|
|
29
|
+
] }), p[7] = S) : S = p[7];
|
|
30
|
+
let C;
|
|
31
|
+
return p[8] !== b || p[9] !== x ? (C = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
|
|
32
|
+
router: x,
|
|
33
|
+
environment: b,
|
|
34
|
+
children: S
|
|
35
|
+
}) }), p[8] = b, p[9] = x, p[10] = C) : C = p[10], C;
|
|
44
36
|
}
|
|
45
37
|
export { EnvironmentEmbedRoot as default };
|
|
@@ -56,15 +56,15 @@ const CodeBlock = (l) => {
|
|
|
56
56
|
let E;
|
|
57
57
|
d[12] === m ? E = d[13] : (E = { code: m }, d[12] = m, d[13] = E);
|
|
58
58
|
let D;
|
|
59
|
-
d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative w-full overflow-
|
|
59
|
+
d[14] === p ? D = d[15] : (D = cn("group bg-background text-foreground relative min-w-0 w-full overflow-auto overscroll-contain rounded-md border", p), d[14] = p, d[15] = D);
|
|
60
60
|
let O;
|
|
61
61
|
d[16] === y ? O = d[17] : (O = /* @__PURE__ */ jsx("div", {
|
|
62
|
-
className: "[&>pre]:bg-background! [&>pre]:text-foreground!
|
|
62
|
+
className: "[&>pre]:bg-background! [&>pre]:text-foreground! dark:hidden [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
|
|
63
63
|
dangerouslySetInnerHTML: { __html: y }
|
|
64
64
|
}), d[16] = y, d[17] = O);
|
|
65
65
|
let k;
|
|
66
66
|
d[18] === x ? k = d[19] : (k = /* @__PURE__ */ jsx("div", {
|
|
67
|
-
className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden
|
|
67
|
+
className: "[&>pre]:bg-background! [&>pre]:text-foreground! hidden dark:block [&_code]:font-mono [&_code]:text-sm [&>pre]:m-0 [&>pre]:p-4 [&>pre]:text-sm",
|
|
68
68
|
dangerouslySetInnerHTML: { __html: x }
|
|
69
69
|
}), d[18] = x, d[19] = k);
|
|
70
70
|
let A;
|
|
@@ -74,7 +74,7 @@ const CodeBlock = (l) => {
|
|
|
74
74
|
}), d[20] = f, d[21] = A);
|
|
75
75
|
let j;
|
|
76
76
|
d[22] !== O || d[23] !== k || d[24] !== A ? (j = /* @__PURE__ */ jsxs("div", {
|
|
77
|
-
className: "relative",
|
|
77
|
+
className: "relative min-w-max",
|
|
78
78
|
children: [
|
|
79
79
|
O,
|
|
80
80
|
k,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c } from "react/compiler-runtime";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
4
|
-
import Markdown from "react-markdown";
|
|
5
4
|
import { Prism } from "react-syntax-highlighter";
|
|
5
|
+
import Markdown from "react-markdown";
|
|
6
6
|
var adaptedPrism = {
|
|
7
7
|
"code[class*=\"language-\"]": {
|
|
8
8
|
color: "black",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import CodeContent_default from "./CodeContent.js";
|
|
2
1
|
import MarkdownContent_default from "./MarkdownContent.js";
|
|
2
|
+
import CodeContent_default from "./CodeContent.js";
|
|
3
3
|
import { ObjectController } from "./ObjectController.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { useStudio, useStudioOptional } from "../../providers/StudioProvider.js";
|
|
2
|
-
import { useFilterWorkflows } from "../../hooks/useWorkflows.js";
|
|
3
2
|
import { useFilterWorkspaces } from "../../hooks/useWorkspaces.js";
|
|
4
3
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
5
4
|
import { cn } from "../../lib/utils.js";
|
|
6
5
|
import { Button } from "../ui/button.js";
|
|
7
|
-
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu,
|
|
6
|
+
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, useSidebar } from "../ui/sidebar.js";
|
|
8
7
|
import { motion } from "../../node_modules/motion/dist/es/react.js";
|
|
9
8
|
import { c } from "react/compiler-runtime";
|
|
10
9
|
import { useState } from "react";
|
|
11
10
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
12
11
|
import { Link, useLocation } from "react-router-dom";
|
|
13
|
-
import {
|
|
12
|
+
import { Boxes, LayoutGrid, MoreHorizontal, PanelLeftIcon, Play, Star } from "lucide-react";
|
|
14
13
|
var DefaultSidebarHeader = () => {
|
|
15
|
-
let e = c(18), { state:
|
|
16
|
-
e[0] ===
|
|
17
|
-
let
|
|
18
|
-
e[2] ===
|
|
14
|
+
let e = c(18), { state: o, toggleSidebar: s } = useSidebar(), [l, f] = useState(!1), p = o === "collapsed" ? "justify-center" : "justify-between", m;
|
|
15
|
+
e[0] === p ? m = e[1] : (m = cn("border-sidebar-border h-12 w-full flex-row items-center border-b px-1.5 py-0", p), e[0] = p, e[1] = m);
|
|
16
|
+
let h;
|
|
17
|
+
e[2] === o ? h = e[3] : (h = o === "expanded" && /* @__PURE__ */ jsxs("div", {
|
|
19
18
|
className: "flex items-center gap-2 overflow-hidden px-1.5",
|
|
20
19
|
children: [/* @__PURE__ */ jsx("img", {
|
|
21
20
|
src: "/loopstack.svg",
|
|
@@ -45,174 +44,160 @@ var DefaultSidebarHeader = () => {
|
|
|
45
44
|
},
|
|
46
45
|
children: "Loopstack Studio"
|
|
47
46
|
})]
|
|
48
|
-
}), e[2] =
|
|
49
|
-
let
|
|
50
|
-
e[4] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
51
|
-
let
|
|
52
|
-
e[5] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
53
|
-
let
|
|
54
|
-
e[7] !==
|
|
47
|
+
}), e[2] = o, e[3] = h);
|
|
48
|
+
let g;
|
|
49
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (g = cn("relative size-10 text-muted-foreground hover:cursor-pointer hover:bg-accent/50 hover:text-accent-foreground"), e[4] = g) : g = e[4];
|
|
50
|
+
let _, y;
|
|
51
|
+
e[5] === Symbol.for("react.memo_cache_sentinel") ? (_ = () => f(!0), y = () => f(!1), e[5] = _, e[6] = y) : (_ = e[5], y = e[6]);
|
|
52
|
+
let b;
|
|
53
|
+
e[7] !== l || e[8] !== o ? (b = o === "collapsed" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(motion.img, {
|
|
55
54
|
src: "/loopstack.svg",
|
|
56
55
|
alt: "Loopstack",
|
|
57
56
|
className: "absolute top-1/2 left-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2",
|
|
58
57
|
initial: { opacity: 1 },
|
|
59
|
-
animate: { opacity:
|
|
58
|
+
animate: { opacity: l ? 0 : 1 },
|
|
60
59
|
transition: { duration: .2 }
|
|
61
60
|
}), /* @__PURE__ */ jsx(motion.div, {
|
|
62
61
|
className: "absolute top-1/2 left-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center",
|
|
63
62
|
initial: { opacity: 0 },
|
|
64
|
-
animate: { opacity:
|
|
63
|
+
animate: { opacity: l ? 1 : 0 },
|
|
65
64
|
transition: { duration: .2 },
|
|
66
65
|
children: /* @__PURE__ */ jsx(PanelLeftIcon, { className: "size-5" })
|
|
67
|
-
})] }) : /* @__PURE__ */ jsx(PanelLeftIcon, { className: "size-5" }), e[7] =
|
|
68
|
-
let
|
|
69
|
-
e[10] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
66
|
+
})] }) : /* @__PURE__ */ jsx(PanelLeftIcon, { className: "size-5" }), e[7] = l, e[8] = o, e[9] = b) : b = e[9];
|
|
67
|
+
let x;
|
|
68
|
+
e[10] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("span", {
|
|
70
69
|
className: "sr-only",
|
|
71
70
|
children: "Toggle Sidebar"
|
|
72
|
-
}), e[10] =
|
|
73
|
-
let
|
|
74
|
-
e[11] !==
|
|
71
|
+
}), e[10] = x) : x = e[10];
|
|
72
|
+
let E;
|
|
73
|
+
e[11] !== b || e[12] !== s ? (E = /* @__PURE__ */ jsxs(Button, {
|
|
75
74
|
"data-sidebar": "trigger",
|
|
76
75
|
"data-slot": "sidebar-trigger",
|
|
77
76
|
variant: "ghost",
|
|
78
77
|
size: "icon",
|
|
79
|
-
className:
|
|
80
|
-
onClick:
|
|
81
|
-
onMouseEnter:
|
|
82
|
-
onMouseLeave:
|
|
83
|
-
children: [
|
|
84
|
-
}), e[11] =
|
|
85
|
-
let
|
|
86
|
-
return e[14] !==
|
|
87
|
-
className:
|
|
88
|
-
children: [
|
|
89
|
-
}), e[14] =
|
|
90
|
-
},
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
let
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
className: g,
|
|
79
|
+
onClick: s,
|
|
80
|
+
onMouseEnter: _,
|
|
81
|
+
onMouseLeave: y,
|
|
82
|
+
children: [b, x]
|
|
83
|
+
}), e[11] = b, e[12] = s, e[13] = E) : E = e[13];
|
|
84
|
+
let D;
|
|
85
|
+
return e[14] !== m || e[15] !== h || e[16] !== E ? (D = /* @__PURE__ */ jsxs(SidebarHeader, {
|
|
86
|
+
className: m,
|
|
87
|
+
children: [h, E]
|
|
88
|
+
}), e[14] = m, e[15] = h, e[16] = E, e[17] = D) : D = e[17], D;
|
|
89
|
+
}, MainNav = () => {
|
|
90
|
+
let o = c(29), s = useLocation(), { router: l } = useStudio(), u;
|
|
91
|
+
o[0] === l ? u = o[1] : (u = l.getDashboard(), o[0] = l, o[1] = u);
|
|
92
|
+
let d = u, f;
|
|
93
|
+
o[2] === l ? f = o[3] : (f = l.getWorkspaces(), o[2] = l, o[3] = f);
|
|
94
|
+
let p = f, m = l.getRuns(), _ = s.pathname === d, v, S;
|
|
95
|
+
o[4] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(Boxes, {}), S = /* @__PURE__ */ jsx("span", { children: "Applications" }), o[4] = v, o[5] = S) : (v = o[4], S = o[5]);
|
|
96
|
+
let C;
|
|
97
|
+
o[6] === d ? C = o[7] : (C = /* @__PURE__ */ jsxs(Link, {
|
|
98
|
+
to: d,
|
|
99
|
+
children: [v, S]
|
|
100
|
+
}), o[6] = d, o[7] = C);
|
|
101
|
+
let w;
|
|
102
|
+
o[8] !== _ || o[9] !== C ? (w = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
103
|
+
asChild: !0,
|
|
104
|
+
isActive: _,
|
|
105
|
+
tooltip: "Applications",
|
|
106
|
+
children: C
|
|
107
|
+
}) }), o[8] = _, o[9] = C, o[10] = w) : w = o[10];
|
|
108
|
+
let T = s.pathname === p, k, A;
|
|
109
|
+
o[11] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ jsx(LayoutGrid, {}), A = /* @__PURE__ */ jsx("span", { children: "Workspaces" }), o[11] = k, o[12] = A) : (k = o[11], A = o[12]);
|
|
107
110
|
let j;
|
|
108
|
-
|
|
111
|
+
o[13] === p ? j = o[14] : (j = /* @__PURE__ */ jsxs(Link, {
|
|
112
|
+
to: p,
|
|
113
|
+
children: [k, A]
|
|
114
|
+
}), o[13] = p, o[14] = j);
|
|
115
|
+
let M;
|
|
116
|
+
o[15] !== j || o[16] !== T ? (M = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
109
117
|
asChild: !0,
|
|
110
|
-
isActive:
|
|
111
|
-
tooltip: "
|
|
112
|
-
children:
|
|
113
|
-
}) }),
|
|
114
|
-
let
|
|
115
|
-
|
|
116
|
-
let F;
|
|
117
|
-
u[13] === g ? F = u[14] : (F = /* @__PURE__ */ jsxs(Link, {
|
|
118
|
-
to: g,
|
|
119
|
-
children: [P, N]
|
|
120
|
-
}), u[13] = g, u[14] = F);
|
|
118
|
+
isActive: T,
|
|
119
|
+
tooltip: "Workspaces",
|
|
120
|
+
children: j
|
|
121
|
+
}) }), o[15] = j, o[16] = T, o[17] = M) : M = o[17];
|
|
122
|
+
let N = s.pathname === m || s.pathname === m + "/", P, F;
|
|
123
|
+
o[18] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ jsx(Play, {}), F = /* @__PURE__ */ jsx("span", { children: "Runs" }), o[18] = P, o[19] = F) : (P = o[18], F = o[19]);
|
|
121
124
|
let I;
|
|
122
|
-
|
|
123
|
-
asChild: !0,
|
|
124
|
-
isActive: M,
|
|
125
|
-
tooltip: "Action Required",
|
|
126
|
-
children: F
|
|
127
|
-
}), u[15] = F, u[16] = M, u[17] = I) : I = u[17];
|
|
128
|
-
let L;
|
|
129
|
-
u[18] === v ? L = u[19] : (L = v > 0 && /* @__PURE__ */ jsx(SidebarMenuBadge, { children: v }), u[18] = v, u[19] = L);
|
|
130
|
-
let R;
|
|
131
|
-
u[20] !== I || u[21] !== L ? (R = /* @__PURE__ */ jsxs(SidebarMenuItem, { children: [I, L] }), u[20] = I, u[21] = L, u[22] = R) : R = u[22];
|
|
132
|
-
let z;
|
|
133
|
-
return u[23] !== R || u[24] !== j ? (z = /* @__PURE__ */ jsxs(SidebarGroup, { children: [S, /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [j, R] }) })] }), u[23] = R, u[24] = j, u[25] = z) : z = u[25], z;
|
|
134
|
-
}, WorkspacesNav = () => {
|
|
135
|
-
let u = c(10), d = useLocation(), { router: f } = useStudio(), p;
|
|
136
|
-
u[0] === f ? p = u[1] : (p = f.getWorkspaces(), u[0] = f, u[1] = p);
|
|
137
|
-
let m = p, h;
|
|
138
|
-
u[2] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Workspaces" }), u[2] = h) : h = u[2];
|
|
139
|
-
let g = d.pathname === m, _, v;
|
|
140
|
-
u[3] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx(LayoutGrid, {}), v = /* @__PURE__ */ jsx("span", { children: "Workspaces" }), u[3] = _, u[4] = v) : (_ = u[3], v = u[4]);
|
|
141
|
-
let S;
|
|
142
|
-
u[5] === m ? S = u[6] : (S = /* @__PURE__ */ jsxs(Link, {
|
|
125
|
+
o[20] === m ? I = o[21] : (I = /* @__PURE__ */ jsxs(Link, {
|
|
143
126
|
to: m,
|
|
144
|
-
children: [
|
|
145
|
-
}),
|
|
146
|
-
let
|
|
147
|
-
|
|
127
|
+
children: [P, F]
|
|
128
|
+
}), o[20] = m, o[21] = I);
|
|
129
|
+
let L;
|
|
130
|
+
o[22] !== N || o[23] !== I ? (L = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
148
131
|
asChild: !0,
|
|
149
|
-
isActive:
|
|
150
|
-
tooltip: "
|
|
151
|
-
children:
|
|
152
|
-
}) })
|
|
132
|
+
isActive: N,
|
|
133
|
+
tooltip: "Runs",
|
|
134
|
+
children: I
|
|
135
|
+
}) }), o[22] = N, o[23] = I, o[24] = L) : L = o[24];
|
|
136
|
+
let R;
|
|
137
|
+
return o[25] !== M || o[26] !== L || o[27] !== w ? (R = /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [
|
|
138
|
+
w,
|
|
139
|
+
M,
|
|
140
|
+
L
|
|
141
|
+
] }) }) }), o[25] = M, o[26] = L, o[27] = w, o[28] = R) : R = o[28], R;
|
|
153
142
|
}, FavouritesNav = () => {
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
let
|
|
157
|
-
|
|
158
|
-
let
|
|
159
|
-
|
|
143
|
+
let o = c(19), l = useLocation(), { router: u } = useStudio(), d;
|
|
144
|
+
o[0] === u ? d = o[1] : (d = u.getWorkspaces(), o[0] = u, o[1] = d);
|
|
145
|
+
let f = d, p;
|
|
146
|
+
o[2] === Symbol.for("react.memo_cache_sentinel") ? (p = { isFavourite: "true" }, o[2] = p) : p = o[2];
|
|
147
|
+
let m = useFilterWorkspaces(void 0, p, "createdAt", "ASC", 0, 10), v;
|
|
148
|
+
o[3] === m.data?.data ? v = o[4] : (v = m.data?.data ?? [], o[3] = m.data?.data, o[4] = v);
|
|
160
149
|
let S = v;
|
|
161
150
|
if (S.length === 0) return null;
|
|
151
|
+
let C;
|
|
152
|
+
o[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Favourites" }), o[5] = C) : C = o[5];
|
|
162
153
|
let w;
|
|
163
|
-
|
|
164
|
-
let D;
|
|
165
|
-
if (u[6] !== S || u[7] !== d || u[8] !== p) {
|
|
154
|
+
if (o[6] !== S || o[7] !== l || o[8] !== u) {
|
|
166
155
|
let e;
|
|
167
|
-
|
|
168
|
-
let
|
|
156
|
+
o[10] !== l || o[11] !== u ? (e = (e) => {
|
|
157
|
+
let o = u.getWorkspace(e.id);
|
|
169
158
|
return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
170
159
|
asChild: !0,
|
|
171
|
-
isActive:
|
|
160
|
+
isActive: l.pathname === o || l.pathname.startsWith(o + "/"),
|
|
172
161
|
tooltip: e.title,
|
|
173
162
|
children: /* @__PURE__ */ jsxs(Link, {
|
|
174
|
-
to:
|
|
163
|
+
to: o,
|
|
175
164
|
children: [/* @__PURE__ */ jsx(Star, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: e.title })]
|
|
176
165
|
})
|
|
177
166
|
}) }, e.id);
|
|
178
|
-
},
|
|
179
|
-
} else
|
|
180
|
-
let
|
|
181
|
-
|
|
167
|
+
}, o[10] = l, o[11] = u, o[12] = e) : e = o[12], w = S.map(e), o[6] = S, o[7] = l, o[8] = u, o[9] = w;
|
|
168
|
+
} else w = o[9];
|
|
169
|
+
let T;
|
|
170
|
+
o[13] !== m.data?.total || o[14] !== f ? (T = (m.data?.total ?? 0) > 10 && /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
182
171
|
asChild: !0,
|
|
183
172
|
tooltip: "More favourites",
|
|
184
173
|
children: /* @__PURE__ */ jsxs(Link, {
|
|
185
|
-
to:
|
|
174
|
+
to: f,
|
|
186
175
|
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "More" })]
|
|
187
176
|
})
|
|
188
|
-
}) }),
|
|
189
|
-
let
|
|
190
|
-
return
|
|
177
|
+
}) }), o[13] = m.data?.total, o[14] = f, o[15] = T) : T = o[15];
|
|
178
|
+
let O;
|
|
179
|
+
return o[16] !== w || o[17] !== T ? (O = /* @__PURE__ */ jsxs(SidebarGroup, { children: [C, /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [w, T] }) })] }), o[16] = w, o[17] = T, o[18] = O) : O = o[18], O;
|
|
191
180
|
}, DefaultSidebarFooter = () => {
|
|
192
|
-
let e = c(1),
|
|
193
|
-
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
181
|
+
let e = c(1), o;
|
|
182
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ jsx(SidebarFooter, {}), e[0] = o) : o = e[0], o;
|
|
194
183
|
};
|
|
195
184
|
const StudioSidebar = () => {
|
|
196
|
-
let e = c(13),
|
|
197
|
-
e[0] ===
|
|
185
|
+
let e = c(13), s = useComponentOverrides(), u = useStudioOptional(), d = s.SidebarHeader ?? DefaultSidebarHeader, m = s.SidebarFooter ?? DefaultSidebarFooter, h;
|
|
186
|
+
e[0] === d ? h = e[1] : (h = /* @__PURE__ */ jsx(d, {}), e[0] = d, e[1] = h);
|
|
187
|
+
let g;
|
|
188
|
+
e[2] === u ? g = e[3] : (g = u && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(MainNav, {}), /* @__PURE__ */ jsx(FavouritesNav, {})] }), e[2] = u, e[3] = g);
|
|
189
|
+
let _;
|
|
190
|
+
e[4] === g ? _ = e[5] : (_ = /* @__PURE__ */ jsx(SidebarContent, { children: g }), e[4] = g, e[5] = _);
|
|
191
|
+
let v;
|
|
192
|
+
e[6] !== m || e[7] !== u ? (v = u && /* @__PURE__ */ jsx(m, {}), e[6] = m, e[7] = u, e[8] = v) : v = e[8];
|
|
198
193
|
let y;
|
|
199
|
-
e[
|
|
200
|
-
/* @__PURE__ */ jsx(RunsNav, {}),
|
|
201
|
-
/* @__PURE__ */ jsx(WorkspacesNav, {}),
|
|
202
|
-
/* @__PURE__ */ jsx(FavouritesNav, {})
|
|
203
|
-
] }), e[2] = f, e[3] = y);
|
|
204
|
-
let b;
|
|
205
|
-
e[4] === y ? b = e[5] : (b = /* @__PURE__ */ jsx(SidebarContent, { children: y }), e[4] = y, e[5] = b);
|
|
206
|
-
let x;
|
|
207
|
-
e[6] !== h || e[7] !== f ? (x = f && /* @__PURE__ */ jsx(h, {}), e[6] = h, e[7] = f, e[8] = x) : x = e[8];
|
|
208
|
-
let S;
|
|
209
|
-
return e[9] !== v || e[10] !== b || e[11] !== x ? (S = /* @__PURE__ */ jsxs(Sidebar, {
|
|
194
|
+
return e[9] !== h || e[10] !== _ || e[11] !== v ? (y = /* @__PURE__ */ jsxs(Sidebar, {
|
|
210
195
|
collapsible: "icon",
|
|
211
196
|
children: [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
197
|
+
h,
|
|
198
|
+
_,
|
|
199
|
+
v
|
|
215
200
|
]
|
|
216
|
-
}), e[9] =
|
|
201
|
+
}), e[9] = h, e[10] = _, e[11] = v, e[12] = y) : y = e[12], y;
|
|
217
202
|
};
|
|
218
203
|
export { StudioSidebar };
|