@loopstack/loopstack-studio 0.34.0 → 0.35.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/app/EnvironmentEmbedRoot.js +18 -24
- package/dist/components/layout/StudioSidebar.js +34 -34
- package/dist/events/api-client-events.js +13 -1
- package/dist/events/index.js +1 -0
- package/dist/features/code-explorer/components/FileTabsBarBase.js +1 -1
- package/dist/features/code-explorer/index.js +0 -3
- package/dist/features/dashboard/AppLauncher.js +1 -1
- package/dist/features/debug/components/WorkflowFlowViewer.js +2 -1
- package/dist/features/debug/components/workflow-flow/WorkflowGraph.js +2 -1
- package/dist/features/documents/components/DocumentList.js +1 -1
- package/dist/features/documents/document-details/DocumentDetails.js +0 -5
- package/dist/features/documents/renderers/DocumentFormRenderer.js +13 -12
- package/dist/features/documents/renderers/LinkMessageRenderer.js +2 -1
- package/dist/features/documents/renderers/useDocumentTransition.js +3 -2
- package/dist/features/feature-registry/FeatureRegistryProvider.js +2 -1
- package/dist/features/file-explorer/components/FileTabsBar.js +1 -1
- package/dist/features/file-explorer/components/FileTree.js +1 -1
- package/dist/features/file-explorer/hooks/useFileExplorer.js +36 -31
- package/dist/features/file-explorer/providers/FileExplorerProvider.js +94 -92
- package/dist/features/git/components/WorkbenchGitPanel.js +6 -9
- package/dist/features/git/hooks/useGit.js +55 -57
- package/dist/features/health/LocalHealthCheck.js +46 -47
- package/dist/features/oauth/OAuthPromptRenderer.js +6 -5
- package/dist/features/runs/Runs.js +3 -2
- package/dist/features/secrets/renderers/SecretInputRenderer.js +3 -2
- package/dist/features/workbench/WorkflowItem.js +5 -8
- package/dist/features/workbench/components/NewRunDialog.js +172 -170
- package/dist/features/workbench/components/PreviewEmptyState.js +1 -1
- package/dist/features/workbench/components/WorkbenchRunsPanel.js +2 -1
- package/dist/features/workbench/components/WorkflowForms.js +1 -1
- package/dist/features/workbench/components/WorkflowHistoryItem.js +2 -1
- package/dist/features/workbench/components/buttons/WorkflowButtons.js +8 -14
- package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +65 -132
- package/dist/features/workbench/hooks/useWorkflowData.js +8 -6
- package/dist/features/workspaces/Workspaces.js +4 -2
- package/dist/features/workspaces/components/CreateWorkspace.js +7 -5
- package/dist/features/workspaces/components/ExecutionTimeline.js +69 -65
- package/dist/features/workspaces/components/WorkflowRunForm.js +6 -4
- package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
- package/dist/hooks/index.js +5 -5
- package/dist/hooks/useAuth.js +14 -53
- package/dist/hooks/useConfig.js +13 -37
- package/dist/hooks/useDocuments.js +5 -30
- package/dist/hooks/useEnvironments.js +34 -24
- package/dist/hooks/useProcessor.js +2 -31
- package/dist/hooks/useSecrets.js +78 -24
- package/dist/hooks/useWorkflows.js +43 -172
- package/dist/hooks/useWorkspaces.js +24 -130
- package/dist/index.d.ts +130 -488
- package/dist/index.js +10 -12
- package/dist/packages/client/dist/client.js +35 -0
- package/dist/packages/client/dist/http.js +47 -0
- package/dist/packages/client/dist/index.js +15 -0
- package/dist/packages/client/dist/queries/query-keys.js +94 -0
- package/dist/packages/client/dist/queries/query-options.js +97 -0
- package/dist/packages/client/dist/resources/auth.js +10 -0
- package/dist/packages/client/dist/resources/config.js +11 -0
- package/dist/packages/client/dist/resources/dashboard.js +4 -0
- package/dist/packages/client/dist/resources/documents.js +7 -0
- package/dist/packages/client/dist/resources/processor.js +7 -0
- package/dist/packages/client/dist/resources/workflows.js +13 -0
- package/dist/packages/client/dist/resources/workspaces.js +12 -0
- package/dist/packages/client/dist/stream/invalidations.js +20 -0
- package/dist/packages/client/dist/stream/llm-reducer.js +65 -0
- package/dist/packages/client/dist/stream/sse-parser.js +40 -0
- package/dist/packages/client/dist/stream/stream.js +147 -0
- package/dist/packages/contracts/dist/events/client-message-base.schema.js +6 -0
- package/dist/packages/contracts/dist/events/client-message.schema.js +24 -0
- package/dist/packages/contracts/dist/events/index.js +6 -0
- package/dist/packages/contracts/dist/events/llm-events.schema.js +44 -0
- package/dist/packages/contracts/dist/events/stream-events.schema.js +4 -0
- package/dist/packages/contracts/dist/events/workflow-events.schema.js +20 -0
- package/dist/packages/contracts/dist/events/workspace-events.schema.js +5 -0
- package/dist/packages/contracts/dist/types/types/ui-message.type.js +39 -0
- package/dist/packages/react/dist/hooks/mutations.js +175 -0
- package/dist/packages/react/dist/hooks/queries.js +139 -0
- package/dist/packages/react/dist/hooks/use-live-invalidation.js +39 -0
- package/dist/packages/react/dist/hooks/use-llm-stream.js +18 -0
- package/dist/packages/react/dist/index.js +5 -0
- package/dist/packages/react/dist/provider.js +15 -0
- package/dist/pages/DashboardPage.js +2 -1
- package/dist/pages/DebugWorkflowDetailsPage.js +2 -1
- package/dist/pages/DebugWorkflowsPage.js +2 -1
- package/dist/pages/EmbedWorkbenchPage.js +5 -4
- package/dist/pages/PreviewWorkbenchPage.js +60 -59
- package/dist/pages/StudioLandingPage.js +1 -1
- package/dist/pages/WorkbenchPage.js +3 -2
- package/dist/pages/WorkflowDebugPage.js +3 -2
- package/dist/pages/WorkspacePage.js +3 -2
- package/dist/pages/WorkspaceRunsPage.js +2 -1
- package/dist/providers/LoopstackClientProvider.js +31 -0
- package/dist/services/createApiClient.js +9 -3
- package/dist/services/index.js +0 -1
- package/dist/services/reporting-fetch.js +13 -0
- package/package.json +4 -3
- package/dist/api/auth.js +0 -10
- package/dist/api/client.js +0 -13
- package/dist/api/config.js +0 -11
- package/dist/api/dashboard.js +0 -4
- package/dist/api/documents.js +0 -7
- package/dist/api/environments.js +0 -8
- package/dist/api/index.js +0 -31
- package/dist/api/processor.js +0 -7
- package/dist/api/secrets.js +0 -16
- package/dist/api/workflows.js +0 -15
- package/dist/api/workspaces.js +0 -12
- package/dist/events/sse-client-events.js +0 -15
- package/dist/features/code-explorer/CodeExplorer.js +0 -6
- package/dist/features/code-explorer/components/CodeExplorerTree.js +0 -6
- package/dist/features/code-explorer/components/FileTabsBar.js +0 -4
- package/dist/features/code-explorer/providers/CodeExplorerProvider.js +0 -5
- package/dist/features/file-explorer/api/files.js +0 -12
- package/dist/features/git/api/git.js +0 -9
- package/dist/hooks/query-keys.js +0 -145
- package/dist/hooks/useApi.js +0 -15
- package/dist/hooks/useFiles.js +0 -3
- package/dist/node_modules/lodash/_Symbol.js +0 -7
- package/dist/node_modules/lodash/_baseGetTag.js +0 -13
- package/dist/node_modules/lodash/_baseTrim.js +0 -11
- package/dist/node_modules/lodash/_freeGlobal.js +0 -6
- package/dist/node_modules/lodash/_getRawTag.js +0 -17
- package/dist/node_modules/lodash/_objectToString.js +0 -10
- package/dist/node_modules/lodash/_root.js +0 -8
- package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -11
- package/dist/node_modules/lodash/debounce.js +0 -53
- package/dist/node_modules/lodash/isObject.js +0 -10
- package/dist/node_modules/lodash/isObjectLike.js +0 -9
- package/dist/node_modules/lodash/isSymbol.js +0 -12
- package/dist/node_modules/lodash/now.js +0 -10
- package/dist/node_modules/lodash/toNumber.js +0 -22
- package/dist/providers/InvalidationEventsProvider.js +0 -43
- package/dist/providers/SseProvider.js +0 -37
- package/dist/services/eventEmitter.js +0 -12
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { StudioProvider } from "../providers/StudioProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import { InvalidationEventsProvider } from "../providers/InvalidationEventsProvider.js";
|
|
2
|
+
import { LoopstackClientProvider } from "../providers/LoopstackClientProvider.js";
|
|
4
3
|
import { useRouter } from "../routing/LocalRouter.js";
|
|
5
4
|
import LocalHealthCheck_default from "../features/health/LocalHealthCheck.js";
|
|
6
5
|
import { QueryProvider } from "../providers/QueryProvider.js";
|
|
@@ -8,28 +7,23 @@ import { c } from "react/compiler-runtime";
|
|
|
8
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { Outlet, useSearchParams } from "react-router-dom";
|
|
10
9
|
function EnvironmentEmbedRoot() {
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
let
|
|
16
|
-
|
|
10
|
+
let d = c(11), [f] = useSearchParams(), p;
|
|
11
|
+
d[0] === f ? p = d[1] : (p = f.get("url") ?? "http://localhost:3080", d[0] = f, d[1] = p);
|
|
12
|
+
let m = p, h;
|
|
13
|
+
d[2] === f ? h = d[3] : (h = f.get("name") ?? "Preview Environment", d[2] = f, d[3] = h);
|
|
14
|
+
let g = h, _;
|
|
15
|
+
d[4] !== g || d[5] !== m ? (_ = {
|
|
17
16
|
id: "preview-env",
|
|
18
|
-
name:
|
|
19
|
-
url:
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
let
|
|
24
|
-
return
|
|
25
|
-
router:
|
|
26
|
-
environment:
|
|
27
|
-
children:
|
|
28
|
-
|
|
29
|
-
S,
|
|
30
|
-
C,
|
|
31
|
-
w
|
|
32
|
-
]
|
|
33
|
-
}) }), f[11] = y, f[12] = b, f[13] = T) : T = f[13], T;
|
|
17
|
+
name: g,
|
|
18
|
+
url: m
|
|
19
|
+
}, d[4] = g, d[5] = m, d[6] = _) : _ = d[6];
|
|
20
|
+
let v = _, y = useRouter(v.id, "/embed/env"), b;
|
|
21
|
+
d[7] === Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ jsxs(LoopstackClientProvider, { children: [/* @__PURE__ */ jsx(LocalHealthCheck_default, {}), /* @__PURE__ */ jsx(Outlet, {})] }), d[7] = b) : b = d[7];
|
|
22
|
+
let x;
|
|
23
|
+
return d[8] !== v || d[9] !== y ? (x = /* @__PURE__ */ jsx(QueryProvider, { children: /* @__PURE__ */ jsx(StudioProvider, {
|
|
24
|
+
router: y,
|
|
25
|
+
environment: v,
|
|
26
|
+
children: b
|
|
27
|
+
}) }), d[8] = v, d[9] = y, d[10] = x) : x = d[10], x;
|
|
34
28
|
}
|
|
35
29
|
export { EnvironmentEmbedRoot as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useStudio, useStudioOptional } from "../../providers/StudioProvider.js";
|
|
2
1
|
import { useFilterWorkspaces } from "../../hooks/useWorkspaces.js";
|
|
2
|
+
import { useStudio, useStudioOptional } from "../../providers/StudioProvider.js";
|
|
3
3
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
4
4
|
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { Button } from "../ui/button.js";
|
|
@@ -87,73 +87,73 @@ var DefaultSidebarHeader = () => {
|
|
|
87
87
|
children: [h, E]
|
|
88
88
|
}), e[14] = m, e[15] = h, e[16] = E, e[17] = D) : D = e[17], D;
|
|
89
89
|
}, MainNav = () => {
|
|
90
|
-
let
|
|
91
|
-
|
|
90
|
+
let e = c(29), s = useLocation(), { router: l } = useStudio(), u;
|
|
91
|
+
e[0] === l ? u = e[1] : (u = l.getDashboard(), e[0] = l, e[1] = u);
|
|
92
92
|
let d = u, f;
|
|
93
|
-
|
|
93
|
+
e[2] === l ? f = e[3] : (f = l.getWorkspaces(), e[2] = l, e[3] = f);
|
|
94
94
|
let p = f, m = l.getRuns(), _ = s.pathname === d, v, S;
|
|
95
|
-
|
|
95
|
+
e[4] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(Boxes, {}), S = /* @__PURE__ */ jsx("span", { children: "Applications" }), e[4] = v, e[5] = S) : (v = e[4], S = e[5]);
|
|
96
96
|
let C;
|
|
97
|
-
|
|
97
|
+
e[6] === d ? C = e[7] : (C = /* @__PURE__ */ jsxs(Link, {
|
|
98
98
|
to: d,
|
|
99
99
|
children: [v, S]
|
|
100
|
-
}),
|
|
100
|
+
}), e[6] = d, e[7] = C);
|
|
101
101
|
let w;
|
|
102
|
-
|
|
102
|
+
e[8] !== _ || e[9] !== C ? (w = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
103
103
|
asChild: !0,
|
|
104
104
|
isActive: _,
|
|
105
105
|
tooltip: "Applications",
|
|
106
106
|
children: C
|
|
107
|
-
}) }),
|
|
107
|
+
}) }), e[8] = _, e[9] = C, e[10] = w) : w = e[10];
|
|
108
108
|
let T = s.pathname === p, k, A;
|
|
109
|
-
|
|
109
|
+
e[11] === Symbol.for("react.memo_cache_sentinel") ? (k = /* @__PURE__ */ jsx(LayoutGrid, {}), A = /* @__PURE__ */ jsx("span", { children: "Workspaces" }), e[11] = k, e[12] = A) : (k = e[11], A = e[12]);
|
|
110
110
|
let j;
|
|
111
|
-
|
|
111
|
+
e[13] === p ? j = e[14] : (j = /* @__PURE__ */ jsxs(Link, {
|
|
112
112
|
to: p,
|
|
113
113
|
children: [k, A]
|
|
114
|
-
}),
|
|
114
|
+
}), e[13] = p, e[14] = j);
|
|
115
115
|
let M;
|
|
116
|
-
|
|
116
|
+
e[15] !== j || e[16] !== T ? (M = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
117
117
|
asChild: !0,
|
|
118
118
|
isActive: T,
|
|
119
119
|
tooltip: "Workspaces",
|
|
120
120
|
children: j
|
|
121
|
-
}) }),
|
|
121
|
+
}) }), e[15] = j, e[16] = T, e[17] = M) : M = e[17];
|
|
122
122
|
let N = s.pathname === m || s.pathname === m + "/", P, F;
|
|
123
|
-
|
|
123
|
+
e[18] === Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ jsx(Play, {}), F = /* @__PURE__ */ jsx("span", { children: "Runs" }), e[18] = P, e[19] = F) : (P = e[18], F = e[19]);
|
|
124
124
|
let I;
|
|
125
|
-
|
|
125
|
+
e[20] === m ? I = e[21] : (I = /* @__PURE__ */ jsxs(Link, {
|
|
126
126
|
to: m,
|
|
127
127
|
children: [P, F]
|
|
128
|
-
}),
|
|
128
|
+
}), e[20] = m, e[21] = I);
|
|
129
129
|
let L;
|
|
130
|
-
|
|
130
|
+
e[22] !== N || e[23] !== I ? (L = /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
131
131
|
asChild: !0,
|
|
132
132
|
isActive: N,
|
|
133
133
|
tooltip: "Runs",
|
|
134
134
|
children: I
|
|
135
|
-
}) }),
|
|
135
|
+
}) }), e[22] = N, e[23] = I, e[24] = L) : L = e[24];
|
|
136
136
|
let R;
|
|
137
|
-
return
|
|
137
|
+
return e[25] !== M || e[26] !== L || e[27] !== w ? (R = /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [
|
|
138
138
|
w,
|
|
139
139
|
M,
|
|
140
140
|
L
|
|
141
|
-
] }) }) }),
|
|
141
|
+
] }) }) }), e[25] = M, e[26] = L, e[27] = w, e[28] = R) : R = e[28], R;
|
|
142
142
|
}, FavouritesNav = () => {
|
|
143
|
-
let
|
|
144
|
-
|
|
143
|
+
let s = c(19), l = useLocation(), { router: u } = useStudio(), d;
|
|
144
|
+
s[0] === u ? d = s[1] : (d = u.getWorkspaces(), s[0] = u, s[1] = d);
|
|
145
145
|
let f = d, p;
|
|
146
|
-
|
|
146
|
+
s[2] === Symbol.for("react.memo_cache_sentinel") ? (p = { isFavourite: "true" }, s[2] = p) : p = s[2];
|
|
147
147
|
let m = useFilterWorkspaces(void 0, p, "createdAt", "ASC", 0, 10), v;
|
|
148
|
-
|
|
148
|
+
s[3] === m.data?.data ? v = s[4] : (v = m.data?.data ?? [], s[3] = m.data?.data, s[4] = v);
|
|
149
149
|
let S = v;
|
|
150
150
|
if (S.length === 0) return null;
|
|
151
151
|
let C;
|
|
152
|
-
|
|
152
|
+
s[5] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ jsx(SidebarGroupLabel, { children: "Favourites" }), s[5] = C) : C = s[5];
|
|
153
153
|
let w;
|
|
154
|
-
if (
|
|
154
|
+
if (s[6] !== S || s[7] !== l || s[8] !== u) {
|
|
155
155
|
let e;
|
|
156
|
-
|
|
156
|
+
s[10] !== l || s[11] !== u ? (e = (e) => {
|
|
157
157
|
let o = u.getWorkspace(e.id);
|
|
158
158
|
return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
159
159
|
asChild: !0,
|
|
@@ -164,25 +164,25 @@ var DefaultSidebarHeader = () => {
|
|
|
164
164
|
children: [/* @__PURE__ */ jsx(Star, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: e.title })]
|
|
165
165
|
})
|
|
166
166
|
}) }, e.id);
|
|
167
|
-
},
|
|
168
|
-
} else w =
|
|
167
|
+
}, s[10] = l, s[11] = u, s[12] = e) : e = s[12], w = S.map(e), s[6] = S, s[7] = l, s[8] = u, s[9] = w;
|
|
168
|
+
} else w = s[9];
|
|
169
169
|
let T;
|
|
170
|
-
|
|
170
|
+
s[13] !== m.data?.total || s[14] !== f ? (T = (m.data?.total ?? 0) > 10 && /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, {
|
|
171
171
|
asChild: !0,
|
|
172
172
|
tooltip: "More favourites",
|
|
173
173
|
children: /* @__PURE__ */ jsxs(Link, {
|
|
174
174
|
to: f,
|
|
175
175
|
children: [/* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }), /* @__PURE__ */ jsx("span", { children: "More" })]
|
|
176
176
|
})
|
|
177
|
-
}) }),
|
|
177
|
+
}) }), s[13] = m.data?.total, s[14] = f, s[15] = T) : T = s[15];
|
|
178
178
|
let O;
|
|
179
|
-
return
|
|
179
|
+
return s[16] !== w || s[17] !== T ? (O = /* @__PURE__ */ jsxs(SidebarGroup, { children: [C, /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsxs(SidebarMenu, { children: [w, T] }) })] }), s[16] = w, s[17] = T, s[18] = O) : O = s[18], O;
|
|
180
180
|
}, DefaultSidebarFooter = () => {
|
|
181
181
|
let e = c(1), o;
|
|
182
182
|
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ jsx(SidebarFooter, {}), e[0] = o) : o = e[0], o;
|
|
183
183
|
};
|
|
184
184
|
const StudioSidebar = () => {
|
|
185
|
-
let e = c(13),
|
|
185
|
+
let e = c(13), o = useComponentOverrides(), u = useStudioOptional(), d = o.SidebarHeader ?? DefaultSidebarHeader, m = o.SidebarFooter ?? DefaultSidebarFooter, h;
|
|
186
186
|
e[0] === d ? h = e[1] : (h = /* @__PURE__ */ jsx(d, {}), e[0] = d, e[1] = h);
|
|
187
187
|
let g;
|
|
188
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);
|
|
@@ -2,4 +2,16 @@ const ApiClientEvents = {
|
|
|
2
2
|
UNAUTHORIZED: "api.unauthorized",
|
|
3
3
|
ERR_NETWORK: "api.ERR_NETWORK"
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
function createApiClientEventEmitter() {
|
|
6
|
+
let e = /* @__PURE__ */ new Map();
|
|
7
|
+
return {
|
|
8
|
+
on(t, n) {
|
|
9
|
+
return e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n), () => e.get(t)?.delete(n);
|
|
10
|
+
},
|
|
11
|
+
emit(t, n) {
|
|
12
|
+
for (let r of e.get(t) ?? []) r(n);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const apiClientEvents = createApiClientEventEmitter();
|
|
17
|
+
export { ApiClientEvents, apiClientEvents };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { ApiClientEvents, apiClientEvents } from "./api-client-events.js";
|
|
@@ -2,8 +2,8 @@ import { cn } from "../../../lib/utils.js";
|
|
|
2
2
|
import { Button } from "../../../components/ui/button.js";
|
|
3
3
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "../../../components/ui/dropdown-menu.js";
|
|
4
4
|
import { ScrollArea, ScrollBar } from "../../../components/ui/scroll-area.js";
|
|
5
|
-
import { getFileIcon } from "../utils/fileIcons.js";
|
|
6
5
|
import { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuSeparator, ContextMenuTrigger } from "../../../components/ui/context-menu.js";
|
|
6
|
+
import { getFileIcon } from "../utils/fileIcons.js";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
8
|
import { useEffect, useRef } from "react";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useStudio } from "../../providers/StudioProvider.js";
|
|
2
1
|
import { useFilterWorkspaces } from "../../hooks/useWorkspaces.js";
|
|
2
|
+
import { useStudio } from "../../providers/StudioProvider.js";
|
|
3
3
|
import { useComponentOverrides } from "../../providers/ComponentOverridesProvider.js";
|
|
4
4
|
import { Button } from "../../components/ui/button.js";
|
|
5
5
|
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "../../components/ui/card.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkflow } from "../../../hooks/
|
|
1
|
+
import { useWorkflow } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../hooks/useWorkflows.js";
|
|
2
3
|
import { Background, BackgroundVariant, Controls, Panel, index, useEdgesState, useNodesState, useReactFlow } from "../../../node_modules/@xyflow/react/dist/esm/index.js";
|
|
3
4
|
/* empty css */
|
|
4
5
|
import StateNode_default from "./workflow-flow/StateNode.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useWorkflow, useWorkflowCheckpoints } from "../../../../hooks/
|
|
1
|
+
import { useWorkflow, useWorkflowCheckpoints } from "../../../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../../../hooks/useWorkflows.js";
|
|
2
3
|
import { buildWorkflowGraph, getTransitions } from "../../lib/flow-utils.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import React, { useEffect, useRef } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useDocumentConfigs } from "../../../hooks/useConfig.js";
|
|
2
1
|
import { WorkflowState } from "../../../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
2
|
import "../../../packages/contracts/dist/enums/index.js";
|
|
3
|
+
import { useDocumentConfigs } from "../../../hooks/useConfig.js";
|
|
4
4
|
import DocumentItem_default from "./DocumentItem.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import React, { useEffect } from "react";
|
|
@@ -257,11 +257,6 @@ var formatDate = (e) => {
|
|
|
257
257
|
className: "text-xs capitalize",
|
|
258
258
|
children: a.level
|
|
259
259
|
}),
|
|
260
|
-
a?.hidden && /* @__PURE__ */ jsx(Badge, {
|
|
261
|
-
variant: "outline",
|
|
262
|
-
className: "text-xs",
|
|
263
|
-
children: "Hidden"
|
|
264
|
-
}),
|
|
265
260
|
m.invalidate && /* @__PURE__ */ jsx(Badge, {
|
|
266
261
|
variant: "outline",
|
|
267
262
|
className: "text-xs",
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { useRunWorkflow } from "../../../packages/react/dist/hooks/mutations.js";
|
|
1
2
|
import { useDocumentConfigs } from "../../../hooks/useConfig.js";
|
|
2
3
|
import { Button } from "../../../components/ui/button.js";
|
|
3
|
-
import
|
|
4
|
+
import "../../../hooks/useProcessor.js";
|
|
4
5
|
import Form_default from "../../../components/dynamic-form/Form.js";
|
|
5
6
|
import { c } from "react/compiler-runtime";
|
|
6
7
|
import React, { useEffect } from "react";
|
|
7
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { z } from "zod";
|
|
8
10
|
import { Loader2 } from "lucide-react";
|
|
9
11
|
import { useForm } from "react-hook-form";
|
|
10
|
-
import "zod";
|
|
11
12
|
function resolveFormConfig(e) {
|
|
12
13
|
let d = e, f = (d?.widgets)?.find((e) => e.widget === "form");
|
|
13
14
|
if (f?.options) {
|
|
@@ -55,7 +56,7 @@ var DocumentFormRenderer_default = (m) => {
|
|
|
55
56
|
}
|
|
56
57
|
x.mutate({
|
|
57
58
|
workflowId: g.id,
|
|
58
|
-
|
|
59
|
+
payload: { transition: {
|
|
59
60
|
id: e,
|
|
60
61
|
workflowId: _.id,
|
|
61
62
|
payload: d
|
|
@@ -65,9 +66,9 @@ var DocumentFormRenderer_default = (m) => {
|
|
|
65
66
|
C?.type === "object" ? A(e, d) : A(e, d.raw);
|
|
66
67
|
}, M = (e) => {
|
|
67
68
|
e.transition && E.handleSubmit((d) => j(e.transition)(d), _temp2)();
|
|
68
|
-
}, { formUi: N, actions: P } = resolveFormConfig(S?.ui), F = !!N?.form?.disabled, I = !y || F || !1, L = Form_default, R = C ?? {},
|
|
69
|
+
}, { formUi: N, actions: P } = resolveFormConfig(S?.ui), F = !!N?.form?.disabled, I = !y || F || !1, L = Form_default, R = C ?? {}, B = N ?? void 0, V = S?.meta?.mimeType, H = !b && P.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
69
70
|
className: "flex w-full flex-col items-end gap-4",
|
|
70
|
-
children: P.map((e,
|
|
71
|
+
children: P.map((e, d) => {
|
|
71
72
|
let p = I || e.transition !== void 0 && !k.includes(e.transition);
|
|
72
73
|
return /* @__PURE__ */ jsxs(Button, {
|
|
73
74
|
type: "button",
|
|
@@ -77,21 +78,21 @@ var DocumentFormRenderer_default = (m) => {
|
|
|
77
78
|
className: e.type === "button-full-w" ? "w-full" : "w-48",
|
|
78
79
|
...e.props ?? {},
|
|
79
80
|
children: [x.isPending && /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), e.label ?? "Submit"]
|
|
80
|
-
},
|
|
81
|
+
}, d);
|
|
81
82
|
})
|
|
82
|
-
}) : void 0,
|
|
83
|
-
return h[6] !== L || h[7] !== I || h[8] !== E || h[9] !== R || h[10] !==
|
|
83
|
+
}) : void 0, U;
|
|
84
|
+
return h[6] !== L || h[7] !== I || h[8] !== E || h[9] !== R || h[10] !== B || h[11] !== V || h[12] !== H || h[13] !== b ? (U = /* @__PURE__ */ jsx("div", {
|
|
84
85
|
className: "flex",
|
|
85
86
|
children: /* @__PURE__ */ jsx(L, {
|
|
86
87
|
form: E,
|
|
87
88
|
schema: R,
|
|
88
|
-
ui:
|
|
89
|
-
mimeType:
|
|
89
|
+
ui: B,
|
|
90
|
+
mimeType: V,
|
|
90
91
|
disabled: I,
|
|
91
92
|
viewOnly: b,
|
|
92
|
-
actions:
|
|
93
|
+
actions: H
|
|
93
94
|
})
|
|
94
|
-
}), h[6] = L, h[7] = I, h[8] = E, h[9] = R, h[10] =
|
|
95
|
+
}), h[6] = L, h[7] = I, h[8] = E, h[9] = R, h[10] = B, h[11] = V, h[12] = H, h[13] = b, h[14] = U) : U = h[14], U;
|
|
95
96
|
};
|
|
96
97
|
function _temp(e) {
|
|
97
98
|
return e.id;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { useWorkflowStatus } from "../../../hooks/
|
|
1
|
+
import { useWorkflowStatus } from "../../../packages/react/dist/hooks/queries.js";
|
|
2
2
|
import { WorkflowState } from "../../../packages/contracts/dist/enums/workflow-state.enum.js";
|
|
3
3
|
import "../../../packages/contracts/dist/enums/index.js";
|
|
4
|
+
import "../../../hooks/useWorkflows.js";
|
|
4
5
|
import link_default from "../../../components/loopstack-elements/link.js";
|
|
5
6
|
import { c } from "react/compiler-runtime";
|
|
6
7
|
import React from "react";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useRunWorkflow } from "../../../hooks/
|
|
1
|
+
import { useRunWorkflow } from "../../../packages/react/dist/hooks/mutations.js";
|
|
2
|
+
import "../../../hooks/useProcessor.js";
|
|
2
3
|
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { useCallback } from "react";
|
|
4
5
|
function resolveTransition(e) {
|
|
@@ -15,7 +16,7 @@ function useDocumentTransition(i, a, o) {
|
|
|
15
16
|
s[4] !== f || s[5] !== i.id || s[6] !== l || s[7] !== d || s[8] !== a.id ? (p = (e) => {
|
|
16
17
|
!d || !f || l.mutate({
|
|
17
18
|
workflowId: i.id,
|
|
18
|
-
|
|
19
|
+
payload: { transition: {
|
|
19
20
|
id: d,
|
|
20
21
|
workflowId: a.id,
|
|
21
22
|
payload: e
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useAppsConfig } from "../../hooks/
|
|
1
|
+
import { useAppsConfig } from "../../packages/react/dist/hooks/queries.js";
|
|
2
|
+
import "../../hooks/useConfig.js";
|
|
2
3
|
import { AVAILABLE_FEATURES } from "./available-features.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { createContext, useContext, useMemo } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FileTabsBarBase } from "../../code-explorer/components/FileTabsBarBase.js";
|
|
2
1
|
import { useFileExplorer } from "../providers/FileExplorerProvider.js";
|
|
2
|
+
import { FileTabsBarBase } from "../../code-explorer/components/FileTabsBarBase.js";
|
|
3
3
|
import { c } from "react/compiler-runtime";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
function FileTabsBar() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Button } from "../../../components/ui/button.js";
|
|
2
2
|
import { ScrollArea } from "../../../components/ui/scroll-area.js";
|
|
3
|
-
import { CodeExplorerTreeNode } from "../../code-explorer/components/CodeExplorerTreeNode.js";
|
|
4
3
|
import { useFileExplorer } from "../providers/FileExplorerProvider.js";
|
|
4
|
+
import { CodeExplorerTreeNode } from "../../code-explorer/components/CodeExplorerTreeNode.js";
|
|
5
5
|
import { c } from "react/compiler-runtime";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { AlertCircle, Loader2, RefreshCw } from "lucide-react";
|
|
@@ -1,46 +1,51 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useLoopstackClient } from "../../../packages/react/dist/provider.js";
|
|
2
|
+
import "../../../packages/react/dist/index.js";
|
|
2
3
|
import { c } from "react/compiler-runtime";
|
|
3
4
|
import { useQuery } from "@tanstack/react-query";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
var VARIANT_BASE_PATH = {
|
|
6
|
+
local: "local-files",
|
|
7
|
+
remote: "remote-files"
|
|
8
|
+
}, explorerPath = (e, n) => `/api/v1/workspaces/${n}/${VARIANT_BASE_PATH[e]}`;
|
|
9
|
+
function fileTreeKey(e, n, r) {
|
|
10
|
+
return [
|
|
7
11
|
"file-explorer-tree",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
e,
|
|
13
|
+
...n ? [n] : [],
|
|
14
|
+
...r ? [r] : []
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function useFileTree(i, o, s) {
|
|
18
|
+
let l = c(12), u = s === void 0 ? !0 : s, d = useLoopstackClient(), f;
|
|
19
|
+
l[0] !== d.envKey || l[1] !== i || l[2] !== o ? (f = fileTreeKey(d.envKey, i, o), l[0] = d.envKey, l[1] = i, l[2] = o, l[3] = f) : f = l[3];
|
|
20
|
+
let p;
|
|
21
|
+
l[4] !== d.http || l[5] !== i || l[6] !== o ? (p = () => d.http.get(`${explorerPath(i, o)}/tree`), l[4] = d.http, l[5] = i, l[6] = o, l[7] = p) : p = l[7];
|
|
22
|
+
let m = !!o && u, h;
|
|
23
|
+
return l[8] !== f || l[9] !== p || l[10] !== m ? (h = {
|
|
24
|
+
queryKey: f,
|
|
25
|
+
queryFn: p,
|
|
26
|
+
enabled: m,
|
|
19
27
|
staleTime: 3e4,
|
|
20
28
|
retry: !1
|
|
21
|
-
},
|
|
29
|
+
}, l[8] = f, l[9] = p, l[10] = m, l[11] = h) : h = l[11], useQuery(h);
|
|
22
30
|
}
|
|
23
|
-
function useFileContent(
|
|
24
|
-
let
|
|
25
|
-
|
|
31
|
+
function useFileContent(i, a, o, s) {
|
|
32
|
+
let l = c(14), u = s === void 0 ? !0 : s, d = useLoopstackClient(), f;
|
|
33
|
+
l[0] !== d.envKey || l[1] !== o || l[2] !== i || l[3] !== a ? (f = [
|
|
26
34
|
"file-explorer-content",
|
|
27
|
-
|
|
28
|
-
u,
|
|
35
|
+
d.envKey,
|
|
29
36
|
i,
|
|
30
|
-
a
|
|
31
|
-
|
|
37
|
+
a,
|
|
38
|
+
o
|
|
39
|
+
], l[0] = d.envKey, l[1] = o, l[2] = i, l[3] = a, l[4] = f) : f = l[4];
|
|
32
40
|
let p;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}), s[5] = d, s[6] = a, s[7] = r, s[8] = i, s[9] = p) : p = s[9];
|
|
37
|
-
let m = !!i && !!a && l, h;
|
|
38
|
-
return s[10] !== f || s[11] !== p || s[12] !== m ? (h = {
|
|
41
|
+
l[5] !== d.http || l[6] !== o || l[7] !== i || l[8] !== a ? (p = () => d.http.get(`${explorerPath(i, a)}/read`, { path: o }), l[5] = d.http, l[6] = o, l[7] = i, l[8] = a, l[9] = p) : p = l[9];
|
|
42
|
+
let m = !!a && !!o && u, h;
|
|
43
|
+
return l[10] !== f || l[11] !== p || l[12] !== m ? (h = {
|
|
39
44
|
queryKey: f,
|
|
40
45
|
queryFn: p,
|
|
41
46
|
enabled: m,
|
|
42
47
|
staleTime: 15e3,
|
|
43
48
|
retry: !1
|
|
44
|
-
},
|
|
49
|
+
}, l[10] = f, l[11] = p, l[12] = m, l[13] = h) : h = l[13], useQuery(h);
|
|
45
50
|
}
|
|
46
|
-
export { useFileContent, useFileTree };
|
|
51
|
+
export { fileTreeKey, useFileContent, useFileTree };
|