@loopstack/loopstack-studio 0.25.2 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/api/environments.js +4 -0
  2. package/dist/api/index.js +13 -9
  3. package/dist/app/EnvironmentEmbedRoot.js +29 -19
  4. package/dist/components/data-table/DataList.js +93 -91
  5. package/dist/components/data-table/DataTable.js +128 -126
  6. package/dist/components/feedback/Snackbar.js +1 -1
  7. package/dist/components/layout/StudioSidebar.js +124 -131
  8. package/dist/components/ui/sidebar.js +2 -2
  9. package/dist/components/ui/slider.js +37 -26
  10. package/dist/components/ui-widgets/widgets/SandboxRun.js +16 -14
  11. package/dist/features/code-explorer/components/CodeExplorerTree.js +1 -0
  12. package/dist/features/code-explorer/components/FileContentViewer.js +1 -1
  13. package/dist/features/dashboard/RunItem.js +39 -37
  14. package/dist/features/debug/lib/flow-utils.js +1 -1
  15. package/dist/features/documents/DocumentRenderer.js +59 -58
  16. package/dist/features/documents/renderers/useDocumentTransition.js +29 -24
  17. package/dist/features/feature-registry/FeatureRegistryProvider.js +17 -0
  18. package/dist/features/feature-registry/index.js +1 -0
  19. package/dist/features/file-explorer/api/files.js +7 -0
  20. package/dist/features/file-explorer/components/FileExplorerPanel.js +95 -0
  21. package/dist/features/{workbench/components/RemoteFileTabsBar.js → file-explorer/components/FileTabsBar.js} +4 -4
  22. package/dist/features/{workbench/components/RemoteFileTree.js → file-explorer/components/FileTree.js} +6 -6
  23. package/dist/features/file-explorer/file-explorer-feature.js +12 -0
  24. package/dist/features/file-explorer/hooks/useFileExplorer.js +44 -0
  25. package/dist/features/file-explorer/index.js +2 -0
  26. package/dist/features/file-explorer/providers/FileExplorerProvider.js +112 -0
  27. package/dist/features/oauth/OAuthPromptRenderer.js +162 -132
  28. package/dist/features/runs/Runs.js +1 -1
  29. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +178 -0
  30. package/dist/features/secrets/index.js +1 -0
  31. package/dist/features/{documents → secrets}/renderers/SecretInputRenderer.js +17 -17
  32. package/dist/features/secrets/secrets-feature.js +14 -0
  33. package/dist/features/workbench/Workbench.js +32 -82
  34. package/dist/features/workbench/WorkflowList.js +109 -46
  35. package/dist/features/workbench/components/SidebarPanel.js +155 -0
  36. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +82 -0
  37. package/dist/features/workbench/components/WorkbenchIconSidebar.js +128 -60
  38. package/dist/features/workbench/components/WorkbenchPreviewPanel.js +127 -114
  39. package/dist/features/workbench/components/WorkbenchRunsPanel.js +32 -0
  40. package/dist/features/workbench/components/WorkbenchSidebarShell.js +80 -0
  41. package/dist/features/workbench/hooks/useWorkflowData.js +3 -3
  42. package/dist/features/workbench/index.js +3 -2
  43. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +60 -62
  44. package/dist/features/workspaces/Workspaces.js +1 -1
  45. package/dist/features/workspaces/components/EnvironmentSlotSelector.js +68 -51
  46. package/dist/features/workspaces/components/WorkflowRunForm.js +1 -1
  47. package/dist/features/workspaces/components/WorkspaceHomePage.js +1 -1
  48. package/dist/hooks/useEnvironmentPreviewUrl.js +13 -0
  49. package/dist/hooks/useEnvironments.js +8 -0
  50. package/dist/hooks/useWorkflows.js +28 -26
  51. package/dist/hooks/useWorkspaces.js +28 -26
  52. package/dist/index.d.ts +98 -7
  53. package/dist/index.js +8 -1
  54. package/dist/loopstack-studio.css +1 -1
  55. package/dist/node_modules/@shikijs/core/dist/index.js +105 -643
  56. package/dist/node_modules/@shikijs/engine-oniguruma/dist/index.js +135 -122
  57. package/dist/node_modules/@shikijs/langs/dist/bird2.js +1 -1
  58. package/dist/node_modules/@shikijs/langs/dist/cobol.js +1 -1
  59. package/dist/node_modules/@shikijs/langs/dist/css.js +1 -1
  60. package/dist/node_modules/@shikijs/langs/dist/dart.js +1 -1
  61. package/dist/node_modules/@shikijs/langs/dist/emacs-lisp.js +1 -1
  62. package/dist/node_modules/@shikijs/langs/dist/es-tag-sql.js +1 -1
  63. package/dist/node_modules/@shikijs/langs/dist/go.js +1 -1
  64. package/dist/node_modules/@shikijs/langs/dist/kusto.js +1 -1
  65. package/dist/node_modules/@shikijs/langs/dist/nextflow-groovy.js +1 -1
  66. package/dist/node_modules/@shikijs/langs/dist/php.js +1 -1
  67. package/dist/node_modules/@shikijs/langs/dist/ruby.js +1 -1
  68. package/dist/node_modules/@shikijs/langs/dist/typespec.js +1 -1
  69. package/dist/node_modules/@shikijs/primitive/dist/index.js +538 -0
  70. package/dist/node_modules/@shikijs/themes/dist/horizon-bright.js +1 -1
  71. package/dist/node_modules/@xyflow/react/dist/esm/index.js +1 -1
  72. package/dist/node_modules/shiki/dist/bundle-full.js +6 -5
  73. package/dist/node_modules/shiki/dist/chunk-CtajNgzt.js +15 -0
  74. package/dist/node_modules/shiki/dist/engine-oniguruma.js +5 -0
  75. package/dist/node_modules/shiki/dist/{langs.js → langs-bundle-full-DfKZStlK.js} +1 -1
  76. package/dist/node_modules/shiki/dist/themes.js +1 -1
  77. package/dist/pages/DashboardPage.js +54 -79
  78. package/dist/pages/DebugWorkflowDetailsPage.js +41 -55
  79. package/dist/pages/DebugWorkflowsPage.js +151 -112
  80. package/dist/pages/EmbedWorkbenchPage.js +2 -1
  81. package/dist/pages/PreviewWorkbenchPage.js +77 -59
  82. package/dist/pages/RunsListPage.js +27 -41
  83. package/dist/pages/RunsPage.js +21 -36
  84. package/dist/pages/WorkbenchPage.js +48 -70
  85. package/dist/pages/WorkflowDebugPage.js +65 -79
  86. package/dist/pages/WorkspacePage.js +59 -86
  87. package/dist/pages/WorkspaceRunsPage.js +59 -54
  88. package/dist/pages/WorkspacesPage.js +11 -27
  89. package/dist/providers/StudioPreferencesProvider.js +54 -0
  90. package/package.json +29 -29
  91. package/dist/features/workbench/components/WorkbenchFilesPanel.js +0 -67
  92. package/dist/features/workbench/components/WorkbenchFloatingPanel.js +0 -57
  93. package/dist/features/workbench/components/WorkbenchFlowPanel.js +0 -47
  94. package/dist/features/workbench/components/WorkbenchSecretsPanel.js +0 -182
  95. package/dist/features/workbench/providers/RemoteFileExplorerProvider.js +0 -160
  96. /package/dist/{node_modules → frontend/studio/node_modules}/@dagrejs/dagre/dist/dagre.esm.js +0 -0
@@ -170,7 +170,7 @@ var bundledThemesInfo = [
170
170
  {
171
171
  id: "horizon-bright",
172
172
  displayName: "Horizon Bright",
173
- type: "dark",
173
+ type: "light",
174
174
  import: (() => import("../../@shikijs/themes/dist/horizon-bright.js"))
175
175
  },
176
176
  {
@@ -1,4 +1,3 @@
1
- import { useStudio } from "../providers/StudioProvider.js";
2
1
  import { Button } from "../components/ui/button.js";
3
2
  import { Alert, AlertDescription, AlertTitle } from "../components/ui/alert.js";
4
3
  import MainLayout_default from "../components/layout/MainLayout.js";
@@ -7,104 +6,80 @@ import Dashboard from "../features/dashboard/Dashboard.js";
7
6
  import { useDashboardStats } from "../hooks/useDashboard.js";
8
7
  import { c } from "react/compiler-runtime";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { Home, TriangleAlert } from "lucide-react";
9
+ import { TriangleAlert } from "lucide-react";
11
10
  function DashboardPage() {
12
- let h = c(38), { environment: g } = useStudio(), { data: _, isLoading: v, error: y, refetch: b, isRefetching: x } = useDashboardStats();
13
- if (v) {
11
+ let p = c(22), { data: m, isLoading: h, error: g, refetch: _, isRefetching: v } = useDashboardStats();
12
+ if (h) {
14
13
  let e;
15
- return h[0] === v ? e = h[1] : (e = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: v }), h[0] = v, h[1] = e), e;
14
+ return p[0] === h ? e = p[1] : (e = /* @__PURE__ */ jsx(LoadingCentered_default, { loading: h }), p[0] = h, p[1] = e), e;
16
15
  }
17
- if (y) {
18
- let e;
19
- h[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[2] = e) : e = h[2];
20
- let d;
21
- h[3] === g.name ? d = h[4] : (d = {
22
- label: g.name,
23
- href: "#",
24
- icon: e
25
- }, h[3] = g.name, h[4] = d);
26
- let f;
27
- h[5] === Symbol.for("react.memo_cache_sentinel") ? (f = {
16
+ if (g) {
17
+ let l;
18
+ p[2] === Symbol.for("react.memo_cache_sentinel") ? (l = [{
28
19
  label: "Dashboard",
29
20
  current: !0
30
- }, h[5] = f) : f = h[5];
31
- let p;
32
- h[6] === d ? p = h[7] : (p = [d, f], h[6] = d, h[7] = p);
33
- let m = p, _;
34
- h[8] === Symbol.for("react.memo_cache_sentinel") ? (_ = /* @__PURE__ */ jsx("h1", {
21
+ }], p[2] = l) : l = p[2];
22
+ let u = l, d;
23
+ p[3] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ jsx("h1", {
35
24
  className: "mb-4 text-3xl font-bold tracking-tight",
36
25
  children: "Dashboard"
37
- }), h[8] = _) : _ = h[8];
38
- let v, S;
39
- h[9] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ jsx(TriangleAlert, {}), S = /* @__PURE__ */ jsx(AlertTitle, { children: "Failed to load dashboard" }), h[9] = v, h[10] = S) : (v = h[9], S = h[10]);
40
- let C;
41
- h[11] === y.message ? C = h[12] : (C = /* @__PURE__ */ jsxs("p", {
26
+ }), p[3] = d) : d = p[3];
27
+ let f, m;
28
+ p[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ jsx(TriangleAlert, {}), m = /* @__PURE__ */ jsx(AlertTitle, { children: "Failed to load dashboard" }), p[4] = f, p[5] = m) : (f = p[4], m = p[5]);
29
+ let h;
30
+ p[6] === g.message ? h = p[7] : (h = /* @__PURE__ */ jsxs("p", {
42
31
  className: "wrap-break-word",
43
- children: ["Please try again. ", y.message]
44
- }), h[11] = y.message, h[12] = C);
45
- let w;
46
- h[13] === b ? w = h[14] : (w = () => void b(), h[13] = b, h[14] = w);
47
- let T = x ? "Reloading…" : "Retry", E;
48
- h[15] !== x || h[16] !== w || h[17] !== T ? (E = /* @__PURE__ */ jsx("div", {
32
+ children: ["Please try again. ", g.message]
33
+ }), p[6] = g.message, p[7] = h);
34
+ let y;
35
+ p[8] === _ ? y = p[9] : (y = () => void _(), p[8] = _, p[9] = y);
36
+ let b = v ? "Reloading…" : "Retry", x;
37
+ p[10] !== v || p[11] !== y || p[12] !== b ? (x = /* @__PURE__ */ jsx("div", {
49
38
  className: "mt-3 flex flex-wrap gap-2",
50
39
  children: /* @__PURE__ */ jsx(Button, {
51
40
  variant: "destructive",
52
- onClick: w,
53
- disabled: x,
54
- children: T
55
- })
56
- }), h[15] = x, h[16] = w, h[17] = T, h[18] = E) : E = h[18];
57
- let D;
58
- h[19] !== E || h[20] !== C ? (D = /* @__PURE__ */ jsx("div", {
59
- className: "mx-auto w-full max-w-2xl",
60
- children: /* @__PURE__ */ jsxs(Alert, {
61
- variant: "destructive",
62
- children: [
63
- v,
64
- S,
65
- /* @__PURE__ */ jsxs(AlertDescription, { children: [C, E] })
66
- ]
41
+ onClick: y,
42
+ disabled: v,
43
+ children: b
67
44
  })
68
- }), h[19] = E, h[20] = C, h[21] = D) : D = h[21];
69
- let O;
70
- return h[22] !== m || h[23] !== D ? (O = /* @__PURE__ */ jsxs(MainLayout_default, {
71
- breadcrumbsData: m,
72
- children: [_, D]
73
- }), h[22] = m, h[23] = D, h[24] = O) : O = h[24], O;
45
+ }), p[10] = v, p[11] = y, p[12] = b, p[13] = x) : x = p[13];
46
+ let S;
47
+ return p[14] !== h || p[15] !== x ? (S = /* @__PURE__ */ jsxs(MainLayout_default, {
48
+ breadcrumbsData: u,
49
+ children: [d, /* @__PURE__ */ jsx("div", {
50
+ className: "mx-auto w-full max-w-2xl",
51
+ children: /* @__PURE__ */ jsxs(Alert, {
52
+ variant: "destructive",
53
+ children: [
54
+ f,
55
+ m,
56
+ /* @__PURE__ */ jsxs(AlertDescription, { children: [h, x] })
57
+ ]
58
+ })
59
+ })]
60
+ }), p[14] = h, p[15] = x, p[16] = S) : S = p[16], S;
74
61
  }
75
- if (!_) {
62
+ if (!m) {
76
63
  let e;
77
- return h[25] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
64
+ return p[17] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ jsx("div", {
78
65
  className: "p-4",
79
66
  children: "No data available"
80
- }), h[25] = e) : e = h[25], e;
67
+ }), p[17] = e) : e = p[17], e;
81
68
  }
82
- let S;
83
- h[26] === Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[26] = S) : S = h[26];
84
- let C;
85
- h[27] === g.name ? C = h[28] : (C = {
86
- label: g.name,
87
- href: "#",
88
- icon: S
89
- }, h[27] = g.name, h[28] = C);
90
- let w;
91
- h[29] === Symbol.for("react.memo_cache_sentinel") ? (w = {
69
+ let y;
70
+ p[18] === Symbol.for("react.memo_cache_sentinel") ? (y = [{
92
71
  label: "Dashboard",
93
72
  current: !0
94
- }, h[29] = w) : w = h[29];
95
- let T;
96
- h[30] === C ? T = h[31] : (T = [C, w], h[30] = C, h[31] = T);
97
- let E = T, D;
98
- h[32] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx("h1", {
73
+ }], p[18] = y) : y = p[18];
74
+ let b = y, x;
75
+ p[19] === Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ jsx("h1", {
99
76
  className: "mb-4 text-3xl font-bold tracking-tight",
100
77
  children: "Dashboard"
101
- }), h[32] = D) : D = h[32];
102
- let O;
103
- h[33] === _ ? O = h[34] : (O = /* @__PURE__ */ jsx(Dashboard, { dashboardStats: _ }), h[33] = _, h[34] = O);
104
- let k;
105
- return h[35] !== E || h[36] !== O ? (k = /* @__PURE__ */ jsxs(MainLayout_default, {
106
- breadcrumbsData: E,
107
- children: [D, O]
108
- }), h[35] = E, h[36] = O, h[37] = k) : k = h[37], k;
78
+ }), p[19] = x) : x = p[19];
79
+ let S;
80
+ return p[20] === m ? S = p[21] : (S = /* @__PURE__ */ jsxs(MainLayout_default, {
81
+ breadcrumbsData: b,
82
+ children: [x, /* @__PURE__ */ jsx(Dashboard, { dashboardStats: m })]
83
+ }), p[20] = m, p[21] = S), S;
109
84
  }
110
85
  export { DashboardPage as default };
@@ -7,69 +7,55 @@ import { c } from "react/compiler-runtime";
7
7
  import { useMemo } from "react";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  import { useParams } from "react-router-dom";
10
- import { Home, Loader2 } from "lucide-react";
10
+ import { Loader2 } from "lucide-react";
11
11
  import { Prism } from "react-syntax-highlighter";
12
12
  import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";
13
13
  function DebugWorkflowDetailsPage() {
14
- let h = c(29), { workflowId: g } = useParams(), { router: _ } = useStudio(), v;
14
+ let m = c(23), { workflowId: h } = useParams(), { router: g } = useStudio(), _;
15
15
  bb0: {
16
- if (!g) {
17
- let t;
18
- h[0] === Symbol.for("react.memo_cache_sentinel") ? (t = ["", ""], h[0] = t) : t = h[0], v = t;
16
+ if (!h) {
17
+ let e;
18
+ m[0] === Symbol.for("react.memo_cache_sentinel") ? (e = ["", ""], m[0] = e) : e = m[0], _ = e;
19
19
  break bb0;
20
20
  }
21
- let t;
22
- h[1] === g ? t = h[2] : (t = g.split("::"), h[1] = g, h[2] = t);
23
- let p = t;
24
- if (p.length === 2) {
25
- v = p;
21
+ let e;
22
+ m[1] === h ? e = m[2] : (e = h.split("::"), m[1] = h, m[2] = e);
23
+ let f = e;
24
+ if (f.length === 2) {
25
+ _ = f;
26
26
  break bb0;
27
27
  }
28
- let m;
29
- h[3] === g ? m = h[4] : (m = ["default", g], h[3] = g, h[4] = m), v = m;
28
+ let p;
29
+ m[3] === h ? p = m[4] : (p = ["default", h], m[3] = h, m[4] = p), _ = p;
30
30
  }
31
- let [y, b] = v, { data: x, isLoading: S } = useWorkflowConfigByName(b), { data: C, isLoading: w } = useWorkflowSource(b), T = S || w, E;
32
- h[5] === _ ? E = h[6] : (E = _.getDashboard(), h[5] = _, h[6] = E);
33
- let D;
34
- h[7] === Symbol.for("react.memo_cache_sentinel") ? (D = /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" }), h[7] = D) : D = h[7];
35
- let O;
36
- h[8] === E ? O = h[9] : (O = {
37
- label: "Dashboard",
38
- href: E,
39
- icon: D
40
- }, h[8] = E, h[9] = O);
41
- let k;
42
- h[10] === _ ? k = h[11] : (k = _.getDebugWorkflows(), h[10] = _, h[11] = k);
43
- let A;
44
- h[12] === k ? A = h[13] : (A = {
31
+ let [v, y] = _, { data: b, isLoading: x } = useWorkflowConfigByName(y), { data: S, isLoading: C } = useWorkflowSource(y), w = x || C, T;
32
+ m[5] === g ? T = m[6] : (T = g.getDebugWorkflows(), m[5] = g, m[6] = T);
33
+ let E;
34
+ m[7] === T ? E = m[8] : (E = {
45
35
  label: "Debug Workflows",
46
- href: k
47
- }, h[12] = k, h[13] = A);
48
- let j = x?.title || x?.alias || b || "Workflow Details", M;
49
- h[14] === j ? M = h[15] : (M = {
50
- label: j,
36
+ href: T
37
+ }, m[7] = T, m[8] = E);
38
+ let D = b?.title || b?.alias || y || "Workflow Details", O;
39
+ m[9] === D ? O = m[10] : (O = {
40
+ label: D,
51
41
  current: !0
52
- }, h[14] = j, h[15] = M);
53
- let N;
54
- h[16] !== O || h[17] !== A || h[18] !== M ? (N = [
55
- O,
56
- A,
57
- M
58
- ], h[16] = O, h[17] = A, h[18] = M, h[19] = N) : N = h[19];
59
- let P = N, F;
60
- h[20] !== T || h[21] !== C || h[22] !== b || h[23] !== x || h[24] !== y ? (F = T ? /* @__PURE__ */ jsxs("div", {
42
+ }, m[9] = D, m[10] = O);
43
+ let k;
44
+ m[11] !== E || m[12] !== O ? (k = [E, O], m[11] = E, m[12] = O, m[13] = k) : k = m[13];
45
+ let A = k, j;
46
+ m[14] !== w || m[15] !== S || m[16] !== y || m[17] !== b || m[18] !== v ? (j = w ? /* @__PURE__ */ jsxs("div", {
61
47
  className: "flex items-center space-x-2",
62
48
  children: [/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }), /* @__PURE__ */ jsx("span", { children: "Loading..." })]
63
- }) : x ? /* @__PURE__ */ jsxs("div", {
49
+ }) : b ? /* @__PURE__ */ jsxs("div", {
64
50
  className: "flex h-[calc(100vh-8rem)] flex-col gap-4",
65
51
  children: [
66
52
  /* @__PURE__ */ jsx("h1", {
67
53
  className: "text-3xl font-bold tracking-tight",
68
- children: x.title || x.alias
54
+ children: b.title || b.alias
69
55
  }),
70
56
  /* @__PURE__ */ jsx("p", {
71
57
  className: "text-muted-foreground",
72
- children: x.description
58
+ children: b.description
73
59
  }),
74
60
  /* @__PURE__ */ jsxs("div", {
75
61
  className: "flex flex-1 gap-4 overflow-hidden",
@@ -77,11 +63,11 @@ function DebugWorkflowDetailsPage() {
77
63
  className: "w-1/2 flex flex-col rounded-lg border bg-card text-card-foreground shadow-sm overflow-hidden",
78
64
  children: [/* @__PURE__ */ jsx("div", {
79
65
  className: "border-b bg-muted/50 px-4 py-2 font-medium text-sm",
80
- children: C?.filePath
66
+ children: S?.filePath
81
67
  }), /* @__PURE__ */ jsx("div", {
82
68
  className: "flex-1 overflow-auto bg-[#1e1e1e]",
83
69
  children: /* @__PURE__ */ jsx(Prism, {
84
- language: C?.raw ? "typescript" : "json",
70
+ language: S?.raw ? "typescript" : "json",
85
71
  style: vscDarkPlus,
86
72
  customStyle: {
87
73
  margin: 0,
@@ -90,7 +76,7 @@ function DebugWorkflowDetailsPage() {
90
76
  fontSize: "13px"
91
77
  },
92
78
  showLineNumbers: !0,
93
- children: C?.raw ? C.raw : JSON.stringify(x, null, 2)
79
+ children: S?.raw ? S.raw : JSON.stringify(b, null, 2)
94
80
  })
95
81
  })]
96
82
  }), /* @__PURE__ */ jsxs("div", {
@@ -100,22 +86,22 @@ function DebugWorkflowDetailsPage() {
100
86
  children: "Diagram"
101
87
  }), /* @__PURE__ */ jsx("div", {
102
88
  className: "flex-1 relative bg-background",
103
- children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(ConfigFlowViewer_default, { config: x }) })
89
+ children: /* @__PURE__ */ jsx(ReactFlowProvider, { children: /* @__PURE__ */ jsx(ConfigFlowViewer_default, { config: b }) })
104
90
  })]
105
91
  })]
106
92
  })
107
93
  ]
108
94
  }) : /* @__PURE__ */ jsxs("div", { children: [
109
95
  "Workflow Type not found (Workspace: ",
110
- y,
96
+ v,
111
97
  ", Workflow: ",
112
- b,
98
+ y,
113
99
  ")"
114
- ] }), h[20] = T, h[21] = C, h[22] = b, h[23] = x, h[24] = y, h[25] = F) : F = h[25];
115
- let I;
116
- return h[26] !== P || h[27] !== F ? (I = /* @__PURE__ */ jsx(MainLayout_default, {
117
- breadcrumbsData: P,
118
- children: F
119
- }), h[26] = P, h[27] = F, h[28] = I) : I = h[28], I;
100
+ ] }), m[14] = w, m[15] = S, m[16] = y, m[17] = b, m[18] = v, m[19] = j) : j = m[19];
101
+ let M;
102
+ return m[20] !== A || m[21] !== j ? (M = /* @__PURE__ */ jsx(MainLayout_default, {
103
+ breadcrumbsData: A,
104
+ children: j
105
+ }), m[20] = A, m[21] = j, m[22] = M) : M = m[22], M;
120
106
  }
121
107
  export { DebugWorkflowDetailsPage as default };
@@ -4,126 +4,165 @@ import { useWorkspaceConfig } from "../hooks/useConfig.js";
4
4
  import { Badge } from "../components/ui/badge.js";
5
5
  import MainLayout_default from "../components/layout/MainLayout.js";
6
6
  import { DataTable } from "../components/data-table/DataTable.js";
7
+ import { c } from "react/compiler-runtime";
7
8
  import { useMemo, useState } from "react";
8
9
  import { jsx, jsxs } from "react/jsx-runtime";
9
10
  import { useQueries } from "@tanstack/react-query";
10
- import { Home } from "lucide-react";
11
11
  function DebugWorkflowsPage() {
12
- let { router: f } = useStudio(), { envKey: p, api: m } = useApiClient(), { data: h, isLoading: g } = useWorkspaceConfig(), _ = useQueries({ queries: (h ?? []).map((e) => ({
13
- queryKey: [
14
- "workflowTypes",
15
- e.className,
16
- p
17
- ],
18
- queryFn: async () => {
19
- let c = await m.config.getWorkflowTypesByWorkspace({ workspaceBlockName: e.className });
20
- return {
21
- workspaceBlockName: e.className,
22
- types: c
23
- };
24
- },
25
- enabled: !!h?.length
26
- })) }), v = _.some((e) => e.isLoading), y = g || v, b = useMemo(() => y || !_ ? [] : _.flatMap((e) => {
27
- if (!e.data) return [];
28
- let { workspaceBlockName: c, types: l } = e.data;
29
- return (l ?? []).map((e) => ({
30
- ...e,
31
- id: `${c}::${e.alias}`,
32
- workspaceBlockName: c
33
- }));
34
- }), [_, y]), [x, S] = useState(""), [C, w] = useState("alias"), [T, E] = useState("ASC"), [D, O] = useState(0), [k, A] = useState(10), j = useMemo(() => {
35
- let e = b;
36
- if (x) {
37
- let c = x.toLowerCase();
38
- e = e.filter((e) => e.alias?.toLowerCase().includes(c) || e.title?.toLowerCase().includes(c) || e.description?.toLowerCase().includes(c) || e.workspaceBlockName.toLowerCase().includes(c));
39
- }
40
- return e = [...e].sort((e, c) => {
41
- let l = C, u = (e[l] || "").toLowerCase(), d = (c[l] || "").toLowerCase();
42
- return u < d ? T === "ASC" ? -1 : 1 : u > d ? T === "ASC" ? 1 : -1 : 0;
43
- }), e;
44
- }, [
45
- b,
46
- x,
47
- C,
48
- T
49
- ]), M = useMemo(() => {
50
- let e = D * k;
51
- return j.slice(e, e + k);
52
- }, [
53
- j,
54
- D,
55
- k
56
- ]);
57
- return /* @__PURE__ */ jsxs(MainLayout_default, {
58
- breadcrumbsData: [{
59
- label: "Dashboard",
60
- href: f.getDashboard(),
61
- icon: /* @__PURE__ */ jsx(Home, { className: "h-4 w-4" })
62
- }, {
63
- label: "Debug Workflows",
64
- current: !0
65
- }],
66
- children: [/* @__PURE__ */ jsx("h1", {
67
- className: "mb-4 text-3xl font-bold tracking-tight",
68
- children: "Workflow Types"
69
- }), /* @__PURE__ */ jsx(DataTable, {
70
- data: M,
71
- columns: [
72
- {
73
- id: "alias",
74
- label: "Type ID (Alias)",
75
- sortable: !0,
76
- minWidth: 200,
77
- format: (e) => /* @__PURE__ */ jsx("span", {
78
- className: "font-medium",
79
- children: String(e)
80
- })
81
- },
82
- {
83
- id: "title",
84
- label: "Title",
85
- sortable: !0,
86
- format: (e, c) => /* @__PURE__ */ jsx("span", { children: String(e || c.alias || "N/A") })
87
- },
88
- {
89
- id: "workspaceBlockName",
90
- label: "Workspace Type",
91
- sortable: !0,
92
- format: (e) => /* @__PURE__ */ jsx(Badge, {
93
- variant: "outline",
94
- children: String(e)
95
- })
96
- },
97
- {
98
- id: "description",
99
- label: "Description",
100
- sortable: !0,
101
- format: (e) => /* @__PURE__ */ jsx("span", {
102
- className: "text-muted-foreground max-w-xs truncate block",
103
- children: String(e || "-")
104
- })
105
- }
12
+ let f = c(50), { router: m } = useStudio(), { envKey: h, api: g } = useApiClient(), { data: _, isLoading: v } = useWorkspaceConfig(), y;
13
+ f[0] === _ ? y = f[1] : (y = _ ?? [], f[0] = _, f[1] = y);
14
+ let b;
15
+ if (f[2] !== g || f[3] !== h || f[4] !== y || f[5] !== _?.length) {
16
+ let e;
17
+ f[7] !== g || f[8] !== h || f[9] !== _?.length ? (e = (e) => ({
18
+ queryKey: [
19
+ "workflowTypes",
20
+ e.className,
21
+ h
106
22
  ],
107
- loading: y,
108
- totalItems: j.length,
109
- searchTerm: x,
110
- onSearchChange: S,
111
- page: D,
112
- pageSize: k,
113
- onPageChange: (e) => O(e),
114
- onPageSizeChange: (e) => {
115
- A(e), O(0);
116
- },
117
- sortBy: C,
118
- sortOrder: T,
119
- onSortChange: (e, c) => {
120
- w(e), E(c);
23
+ queryFn: async () => {
24
+ let u = await g.config.getWorkflowTypesByWorkspace({ workspaceBlockName: e.className });
25
+ return {
26
+ workspaceBlockName: e.className,
27
+ types: u
28
+ };
121
29
  },
122
- filters: {},
123
- onFiltersChange: () => {},
30
+ enabled: !!_?.length
31
+ }), f[7] = g, f[8] = h, f[9] = _?.length, f[10] = e) : e = f[10], b = y.map(e), f[2] = g, f[3] = h, f[4] = y, f[5] = _?.length, f[6] = b;
32
+ } else b = f[6];
33
+ let x;
34
+ f[11] === b ? x = f[12] : (x = { queries: b }, f[11] = b, f[12] = x);
35
+ let S = useQueries(x), C;
36
+ f[13] === S ? C = f[14] : (C = S.some(_temp), f[13] = S, f[14] = C);
37
+ let w = v || C, T;
38
+ bb0: {
39
+ if (w || !S) {
40
+ let e;
41
+ f[15] === Symbol.for("react.memo_cache_sentinel") ? (e = [], f[15] = e) : e = f[15], T = e;
42
+ break bb0;
43
+ }
44
+ let e;
45
+ f[16] === S ? e = f[17] : (e = S.flatMap(_temp2), f[16] = S, f[17] = e), T = e;
46
+ }
47
+ let E = T, [D, O] = useState(""), [k, A] = useState("alias"), [j, M] = useState("ASC"), [N, P] = useState(0), [F, I] = useState(10), L, R;
48
+ if (f[18] !== E || f[19] !== D || f[20] !== k || f[21] !== j) {
49
+ if (L = E, D) {
50
+ let e = D.toLowerCase();
51
+ L = L.filter((u) => u.alias?.toLowerCase().includes(e) || u.title?.toLowerCase().includes(e) || u.description?.toLowerCase().includes(e) || u.workspaceBlockName.toLowerCase().includes(e));
52
+ }
53
+ let e;
54
+ f[24] !== k || f[25] !== j ? (e = (e, u) => {
55
+ let d = k, f = (e[d] || "").toLowerCase(), p = (u[d] || "").toLowerCase();
56
+ return f < p ? j === "ASC" ? -1 : 1 : f > p ? j === "ASC" ? 1 : -1 : 0;
57
+ }, f[24] = k, f[25] = j, f[26] = e) : e = f[26], R = [...L].sort(e), f[18] = E, f[19] = D, f[20] = k, f[21] = j, f[22] = L, f[23] = R;
58
+ } else L = f[22], R = f[23];
59
+ L = R;
60
+ let z = L, B = N * F, V;
61
+ f[27] !== z || f[28] !== F || f[29] !== B ? (V = z.slice(B, B + F), f[27] = z, f[28] = F, f[29] = B, f[30] = V) : V = f[30];
62
+ let H = V, U;
63
+ f[31] === Symbol.for("react.memo_cache_sentinel") ? (U = [
64
+ {
65
+ id: "alias",
66
+ label: "Type ID (Alias)",
67
+ sortable: !0,
68
+ minWidth: 200,
69
+ format: _temp3
70
+ },
71
+ {
72
+ id: "title",
73
+ label: "Title",
74
+ sortable: !0,
75
+ format: _temp4
76
+ },
77
+ {
78
+ id: "workspaceBlockName",
79
+ label: "Workspace Type",
80
+ sortable: !0,
81
+ format: _temp5
82
+ },
83
+ {
84
+ id: "description",
85
+ label: "Description",
86
+ sortable: !0,
87
+ format: _temp6
88
+ }
89
+ ], f[31] = U) : U = f[31];
90
+ let W = U, G;
91
+ f[32] === Symbol.for("react.memo_cache_sentinel") ? (G = [{
92
+ label: "Debug Workflows",
93
+ current: !0
94
+ }], f[32] = G) : G = f[32];
95
+ let K = G, q;
96
+ f[33] === Symbol.for("react.memo_cache_sentinel") ? (q = /* @__PURE__ */ jsx("h1", {
97
+ className: "mb-4 text-3xl font-bold tracking-tight",
98
+ children: "Workflow Types"
99
+ }), f[33] = q) : q = f[33];
100
+ let J, Y;
101
+ f[34] === Symbol.for("react.memo_cache_sentinel") ? (J = (e) => P(e), Y = (e) => {
102
+ I(e), P(0);
103
+ }, f[34] = J, f[35] = Y) : (J = f[34], Y = f[35]);
104
+ let X, Z;
105
+ f[36] === Symbol.for("react.memo_cache_sentinel") ? (X = (e, u) => {
106
+ A(e), M(u);
107
+ }, Z = {}, f[36] = X, f[37] = Z) : (X = f[36], Z = f[37]);
108
+ let Q;
109
+ f[38] === m ? Q = f[39] : (Q = (e) => void m.navigateToDebugWorkflow(e.id), f[38] = m, f[39] = Q);
110
+ let $;
111
+ return f[40] !== z.length || f[41] !== w || f[42] !== N || f[43] !== F || f[44] !== H || f[45] !== D || f[46] !== k || f[47] !== j || f[48] !== Q ? ($ = /* @__PURE__ */ jsxs(MainLayout_default, {
112
+ breadcrumbsData: K,
113
+ children: [q, /* @__PURE__ */ jsx(DataTable, {
114
+ data: H,
115
+ columns: W,
116
+ loading: w,
117
+ totalItems: z.length,
118
+ searchTerm: D,
119
+ onSearchChange: O,
120
+ page: N,
121
+ pageSize: F,
122
+ onPageChange: J,
123
+ onPageSizeChange: Y,
124
+ sortBy: k,
125
+ sortOrder: j,
126
+ onSortChange: X,
127
+ filters: Z,
128
+ onFiltersChange: _temp7,
124
129
  enableBatchActions: !1,
125
- onRowClick: (e) => void f.navigateToDebugWorkflow(e.id)
130
+ onRowClick: Q
126
131
  })]
132
+ }), f[40] = z.length, f[41] = w, f[42] = N, f[43] = F, f[44] = H, f[45] = D, f[46] = k, f[47] = j, f[48] = Q, f[49] = $) : $ = f[49], $;
133
+ }
134
+ function _temp7() {}
135
+ function _temp6(e) {
136
+ return /* @__PURE__ */ jsx("span", {
137
+ className: "text-muted-foreground max-w-xs truncate block",
138
+ children: String(e || "-")
139
+ });
140
+ }
141
+ function _temp5(e) {
142
+ return /* @__PURE__ */ jsx(Badge, {
143
+ variant: "outline",
144
+ children: String(e)
145
+ });
146
+ }
147
+ function _temp4(e, u) {
148
+ return /* @__PURE__ */ jsx("span", { children: String(e || u.alias || "N/A") });
149
+ }
150
+ function _temp3(e) {
151
+ return /* @__PURE__ */ jsx("span", {
152
+ className: "font-medium",
153
+ children: String(e)
127
154
  });
128
155
  }
156
+ function _temp2(e) {
157
+ if (!e.data) return [];
158
+ let { workspaceBlockName: u, types: d } = e.data;
159
+ return (d ?? []).map((e) => ({
160
+ ...e,
161
+ id: `${u}::${e.alias}`,
162
+ workspaceBlockName: u
163
+ }));
164
+ }
165
+ function _temp(e) {
166
+ return e.isLoading;
167
+ }
129
168
  export { DebugWorkflowsPage as default };
@@ -1,9 +1,9 @@
1
1
  import { useWorkflow } from "../hooks/useWorkflows.js";
2
2
  import LoadingCentered_default from "../components/feedback/LoadingCentered.js";
3
3
  import ErrorSnackbar_default from "../components/feedback/ErrorSnackbar.js";
4
+ import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
4
5
  import { require_enums } from "../packages/contracts/dist/enums/index.js";
5
6
  import WorkflowItem_default from "../features/workbench/WorkflowItem.js";
6
- import { WorkbenchLayoutProvider } from "../features/workbench/providers/WorkbenchLayoutProvider.js";
7
7
  import "../features/workbench/index.js";
8
8
  import { requireParam } from "../lib/requireParam.js";
9
9
  import { c } from "react/compiler-runtime";
@@ -44,6 +44,7 @@ function EmbedWorkbenchPage() {
44
44
  _[10] === S.error ? j = _[11] : (j = /* @__PURE__ */ jsx(ErrorSnackbar_default, { error: S.error }), _[10] = S.error, _[11] = j);
45
45
  let M;
46
46
  _[12] === S.data ? M = _[13] : (M = S.data ? /* @__PURE__ */ jsx(WorkbenchLayoutProvider, {
47
+ workspaceId: S.data.workspaceId,
47
48
  workflow: S.data,
48
49
  children: /* @__PURE__ */ jsx(WorkflowItem_default, {
49
50
  workflow: S.data,