@ucdjs/pipelines-ui 0.0.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/components/detail/execution-result.d.mts +49 -0
  4. package/dist/components/detail/execution-result.mjs +366 -0
  5. package/dist/components/detail/version-selector.d.mts +21 -0
  6. package/dist/components/detail/version-selector.mjs +132 -0
  7. package/dist/components/graph/details.d.mts +14 -0
  8. package/dist/components/graph/details.mjs +369 -0
  9. package/dist/components/graph/filters.d.mts +14 -0
  10. package/dist/components/graph/filters.mjs +183 -0
  11. package/dist/components/graph/node-types.d.mts +10 -0
  12. package/dist/components/graph/node-types.mjs +13 -0
  13. package/dist/components/graph/nodes.d.mts +14 -0
  14. package/dist/components/graph/nodes.mjs +264 -0
  15. package/dist/components/graph/pipeline-graph.d.mts +15 -0
  16. package/dist/components/graph/pipeline-graph.mjs +241 -0
  17. package/dist/components/logs/execution-log-payload.d.mts +12 -0
  18. package/dist/components/logs/execution-log-payload.mjs +79 -0
  19. package/dist/components/logs/execution-log-table.d.mts +16 -0
  20. package/dist/components/logs/execution-log-table.mjs +121 -0
  21. package/dist/components/logs/execution-span-drawer.d.mts +16 -0
  22. package/dist/components/logs/execution-span-drawer.mjs +208 -0
  23. package/dist/components/logs/execution-waterfall.d.mts +18 -0
  24. package/dist/components/logs/execution-waterfall.mjs +354 -0
  25. package/dist/components/pipeline-sidebar.d.mts +6 -0
  26. package/dist/components/pipeline-sidebar.mjs +190 -0
  27. package/dist/components/status-badge.d.mts +11 -0
  28. package/dist/components/status-badge.mjs +50 -0
  29. package/dist/components/status-icon.d.mts +11 -0
  30. package/dist/components/status-icon.mjs +46 -0
  31. package/dist/hooks/index.d.mts +7 -0
  32. package/dist/hooks/index.mjs +8 -0
  33. package/dist/hooks/use-event-view.d.mts +19 -0
  34. package/dist/hooks/use-event-view.mjs +112 -0
  35. package/dist/hooks/use-execute.d.mts +20 -0
  36. package/dist/hooks/use-execute.mjs +68 -0
  37. package/dist/hooks/use-pipeline-file.d.mts +20 -0
  38. package/dist/hooks/use-pipeline-file.mjs +39 -0
  39. package/dist/hooks/use-pipeline-versions.d.mts +10 -0
  40. package/dist/hooks/use-pipeline-versions.mjs +137 -0
  41. package/dist/hooks/use-pipeline.d.mts +21 -0
  42. package/dist/hooks/use-pipeline.mjs +46 -0
  43. package/dist/hooks/use-pipelines.d.mts +26 -0
  44. package/dist/hooks/use-pipelines.mjs +38 -0
  45. package/dist/index.d.mts +31 -0
  46. package/dist/index.mjs +29 -0
  47. package/dist/lib/adapter.d.mts +26 -0
  48. package/dist/lib/adapter.mjs +74 -0
  49. package/dist/lib/colors.d.mts +7 -0
  50. package/dist/lib/colors.mjs +15 -0
  51. package/dist/lib/execution-logs.d.mts +19 -0
  52. package/dist/lib/execution-logs.mjs +74 -0
  53. package/dist/lib/format-time.d.mts +4 -0
  54. package/dist/lib/format-time.mjs +7 -0
  55. package/dist/lib/index.d.mts +5 -0
  56. package/dist/lib/index.mjs +6 -0
  57. package/dist/lib/layout.d.mts +8 -0
  58. package/dist/lib/layout.mjs +71 -0
  59. package/dist/lib/pipeline-utils.d.mts +9 -0
  60. package/dist/lib/pipeline-utils.mjs +49 -0
  61. package/dist/lib/utils.d.mts +6 -0
  62. package/dist/lib/utils.mjs +10 -0
  63. package/dist/styles/globals.css +3 -0
  64. package/dist/types.d.mts +143 -0
  65. package/package.json +95 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-PRESENT Lucas Nørgård
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @ucdjs/pipelines-ui
2
+
3
+ [![npm version][npm-version-src]][npm-version-href]
4
+ [![npm downloads][npm-downloads-src]][npm-downloads-href]
5
+ [![codecov][codecov-src]][codecov-href]
6
+
7
+ > [!IMPORTANT]
8
+ > This is an internal package. It may change without warning and is not subject to semantic versioning. Use at your own risk.
9
+
10
+ A collection of core pipeline functionalities for the UCD project.
11
+
12
+ ## Installation
13
+
14
+ ```bash
15
+ npm install @ucdjs/pipelines-ui
16
+ ```
17
+
18
+ ## 📄 License
19
+
20
+ Published under [MIT License](./LICENSE).
21
+
22
+ [npm-version-src]: https://img.shields.io/npm/v/@ucdjs/pipelines-ui?style=flat&colorA=18181B&colorB=4169E1
23
+ [npm-version-href]: https://npmjs.com/package/@ucdjs/pipelines-ui
24
+ [npm-downloads-src]: https://img.shields.io/npm/dm/@ucdjs/pipelines-ui?style=flat&colorA=18181B&colorB=4169E1
25
+ [npm-downloads-href]: https://npmjs.com/package/@ucdjs/pipelines-ui
26
+ [codecov-src]: https://img.shields.io/codecov/c/gh/ucdjs/ucd?style=flat&colorA=18181B&colorB=4169E1
27
+ [codecov-href]: https://codecov.io/gh/ucdjs/ucd
@@ -0,0 +1,49 @@
1
+ import { ExecuteResult } from "../../types.mjs";
2
+ import * as react from "react";
3
+
4
+ //#region src/components/detail/execution-result.d.ts
5
+ interface ExecutionResultProps {
6
+ result: ExecuteResult;
7
+ className?: string;
8
+ }
9
+ declare function ExecutionResult({
10
+ result,
11
+ className
12
+ }: ExecutionResultProps): react.JSX.Element;
13
+ interface ExecutionSummaryProps {
14
+ totalFiles: number;
15
+ matchedFiles: number;
16
+ skippedFiles: number;
17
+ fallbackFiles: number;
18
+ totalOutputs: number;
19
+ durationMs: number;
20
+ className?: string;
21
+ }
22
+ /**
23
+ * Compact execution summary (without result wrapper)
24
+ */
25
+ declare function ExecutionSummary({
26
+ totalFiles,
27
+ matchedFiles,
28
+ skippedFiles,
29
+ fallbackFiles,
30
+ totalOutputs,
31
+ durationMs,
32
+ className
33
+ }: ExecutionSummaryProps): react.JSX.Element;
34
+ interface ExecutionErrorsProps {
35
+ errors: Array<{
36
+ scope: string;
37
+ message: string;
38
+ }>;
39
+ className?: string;
40
+ }
41
+ /**
42
+ * List of execution errors
43
+ */
44
+ declare function ExecutionErrors({
45
+ errors,
46
+ className
47
+ }: ExecutionErrorsProps): react.JSX.Element | null;
48
+ //#endregion
49
+ export { ExecutionErrors, ExecutionErrorsProps, ExecutionResult, ExecutionResultProps, ExecutionSummary, ExecutionSummaryProps };
@@ -0,0 +1,366 @@
1
+ import { cn } from "../../lib/utils.mjs";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+
5
+ //#region src/components/detail/execution-result.tsx
6
+ function ExecutionResult(t0) {
7
+ const $ = c(27);
8
+ const { result, className } = t0;
9
+ const isSuccess = result.success;
10
+ const t1 = isSuccess ? "bg-primary/10 border-primary/30" : "bg-destructive/10 border-destructive/40";
11
+ let t2;
12
+ if ($[0] !== className || $[1] !== t1) {
13
+ t2 = cn("rounded-lg border p-4", t1, className);
14
+ $[0] = className;
15
+ $[1] = t1;
16
+ $[2] = t2;
17
+ } else t2 = $[2];
18
+ const t3 = isSuccess ? "bg-primary" : "bg-destructive";
19
+ let t4;
20
+ if ($[3] !== t3) {
21
+ t4 = cn("w-2 h-2 rounded-full", t3);
22
+ $[3] = t3;
23
+ $[4] = t4;
24
+ } else t4 = $[4];
25
+ let t5;
26
+ if ($[5] !== t4) {
27
+ t5 = /* @__PURE__ */ jsx("div", { className: t4 });
28
+ $[5] = t4;
29
+ $[6] = t5;
30
+ } else t5 = $[6];
31
+ const t6 = isSuccess ? "text-primary" : "text-destructive";
32
+ let t7;
33
+ if ($[7] !== t6) {
34
+ t7 = cn("text-sm font-medium", t6);
35
+ $[7] = t6;
36
+ $[8] = t7;
37
+ } else t7 = $[8];
38
+ const t8 = isSuccess ? "Completed" : "Failed";
39
+ let t9;
40
+ if ($[9] !== t7 || $[10] !== t8) {
41
+ t9 = /* @__PURE__ */ jsx("span", {
42
+ className: t7,
43
+ children: t8
44
+ });
45
+ $[9] = t7;
46
+ $[10] = t8;
47
+ $[11] = t9;
48
+ } else t9 = $[11];
49
+ let t10;
50
+ if ($[12] !== t5 || $[13] !== t9) {
51
+ t10 = /* @__PURE__ */ jsxs("div", {
52
+ className: "flex items-center gap-2 mb-2",
53
+ children: [t5, t9]
54
+ });
55
+ $[12] = t5;
56
+ $[13] = t9;
57
+ $[14] = t10;
58
+ } else t10 = $[14];
59
+ let t11;
60
+ if ($[15] !== result.summary) {
61
+ t11 = result.summary && /* @__PURE__ */ jsxs("div", {
62
+ className: "grid grid-cols-2 gap-4 text-xs sm:grid-cols-3 lg:grid-cols-6",
63
+ children: [
64
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
65
+ className: "text-muted-foreground block",
66
+ children: "Files"
67
+ }), /* @__PURE__ */ jsx("span", {
68
+ className: "text-foreground",
69
+ children: result.summary.totalFiles
70
+ })] }),
71
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
72
+ className: "text-muted-foreground block",
73
+ children: "Matched"
74
+ }), /* @__PURE__ */ jsx("span", {
75
+ className: "text-primary",
76
+ children: result.summary.matchedFiles
77
+ })] }),
78
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
79
+ className: "text-muted-foreground block",
80
+ children: "Skipped"
81
+ }), /* @__PURE__ */ jsx("span", {
82
+ className: "text-foreground/80",
83
+ children: result.summary.skippedFiles
84
+ })] }),
85
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
86
+ className: "text-muted-foreground block",
87
+ children: "Fallback"
88
+ }), /* @__PURE__ */ jsx("span", {
89
+ className: "text-amber-400",
90
+ children: result.summary.fallbackFiles
91
+ })] }),
92
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
93
+ className: "text-muted-foreground block",
94
+ children: "Outputs"
95
+ }), /* @__PURE__ */ jsx("span", {
96
+ className: "text-foreground",
97
+ children: result.summary.totalOutputs
98
+ })] }),
99
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
100
+ className: "text-muted-foreground block",
101
+ children: "Time"
102
+ }), /* @__PURE__ */ jsxs("span", {
103
+ className: "text-foreground",
104
+ children: [Math.round(result.summary.durationMs), "ms"]
105
+ })] })
106
+ ]
107
+ });
108
+ $[15] = result.summary;
109
+ $[16] = t11;
110
+ } else t11 = $[16];
111
+ let t12;
112
+ if ($[17] !== result.error) {
113
+ t12 = result.error && /* @__PURE__ */ jsx("p", {
114
+ className: "text-sm text-destructive mt-2",
115
+ children: result.error
116
+ });
117
+ $[17] = result.error;
118
+ $[18] = t12;
119
+ } else t12 = $[18];
120
+ let t13;
121
+ if ($[19] !== result.errors) {
122
+ t13 = result.errors && result.errors.length > 0 && /* @__PURE__ */ jsx("div", {
123
+ className: "mt-3 space-y-1",
124
+ children: result.errors.map(_temp)
125
+ });
126
+ $[19] = result.errors;
127
+ $[20] = t13;
128
+ } else t13 = $[20];
129
+ let t14;
130
+ if ($[21] !== t10 || $[22] !== t11 || $[23] !== t12 || $[24] !== t13 || $[25] !== t2) {
131
+ t14 = /* @__PURE__ */ jsxs("div", {
132
+ className: t2,
133
+ children: [
134
+ t10,
135
+ t11,
136
+ t12,
137
+ t13
138
+ ]
139
+ });
140
+ $[21] = t10;
141
+ $[22] = t11;
142
+ $[23] = t12;
143
+ $[24] = t13;
144
+ $[25] = t2;
145
+ $[26] = t14;
146
+ } else t14 = $[26];
147
+ return t14;
148
+ }
149
+ function _temp(err) {
150
+ return /* @__PURE__ */ jsxs("div", {
151
+ className: "text-xs",
152
+ children: [
153
+ /* @__PURE__ */ jsxs("span", {
154
+ className: "text-destructive",
155
+ children: [
156
+ "[",
157
+ err.scope,
158
+ "]"
159
+ ]
160
+ }),
161
+ " ",
162
+ /* @__PURE__ */ jsx("span", {
163
+ className: "text-destructive/90",
164
+ children: err.message
165
+ })
166
+ ]
167
+ }, `${err.scope}-${err.message}`);
168
+ }
169
+ /**
170
+ * Compact execution summary (without result wrapper)
171
+ */
172
+ function ExecutionSummary(t0) {
173
+ const $ = c(30);
174
+ const { totalFiles, matchedFiles, skippedFiles, fallbackFiles, totalOutputs, durationMs, className } = t0;
175
+ let t1;
176
+ if ($[0] !== className) {
177
+ t1 = cn("grid grid-cols-2 gap-4 text-xs sm:grid-cols-3 lg:grid-cols-6", className);
178
+ $[0] = className;
179
+ $[1] = t1;
180
+ } else t1 = $[1];
181
+ let t2;
182
+ if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
183
+ t2 = /* @__PURE__ */ jsx("span", {
184
+ className: "text-muted-foreground block",
185
+ children: "Files"
186
+ });
187
+ $[2] = t2;
188
+ } else t2 = $[2];
189
+ let t3;
190
+ if ($[3] !== totalFiles) {
191
+ t3 = /* @__PURE__ */ jsxs("div", { children: [t2, /* @__PURE__ */ jsx("span", {
192
+ className: "text-foreground",
193
+ children: totalFiles
194
+ })] });
195
+ $[3] = totalFiles;
196
+ $[4] = t3;
197
+ } else t3 = $[4];
198
+ let t4;
199
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
200
+ t4 = /* @__PURE__ */ jsx("span", {
201
+ className: "text-muted-foreground block",
202
+ children: "Matched"
203
+ });
204
+ $[5] = t4;
205
+ } else t4 = $[5];
206
+ let t5;
207
+ if ($[6] !== matchedFiles) {
208
+ t5 = /* @__PURE__ */ jsxs("div", { children: [t4, /* @__PURE__ */ jsx("span", {
209
+ className: "text-primary",
210
+ children: matchedFiles
211
+ })] });
212
+ $[6] = matchedFiles;
213
+ $[7] = t5;
214
+ } else t5 = $[7];
215
+ let t6;
216
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
217
+ t6 = /* @__PURE__ */ jsx("span", {
218
+ className: "text-muted-foreground block",
219
+ children: "Skipped"
220
+ });
221
+ $[8] = t6;
222
+ } else t6 = $[8];
223
+ let t7;
224
+ if ($[9] !== skippedFiles) {
225
+ t7 = /* @__PURE__ */ jsxs("div", { children: [t6, /* @__PURE__ */ jsx("span", {
226
+ className: "text-foreground/80",
227
+ children: skippedFiles
228
+ })] });
229
+ $[9] = skippedFiles;
230
+ $[10] = t7;
231
+ } else t7 = $[10];
232
+ let t8;
233
+ if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
234
+ t8 = /* @__PURE__ */ jsx("span", {
235
+ className: "text-muted-foreground block",
236
+ children: "Fallback"
237
+ });
238
+ $[11] = t8;
239
+ } else t8 = $[11];
240
+ let t9;
241
+ if ($[12] !== fallbackFiles) {
242
+ t9 = /* @__PURE__ */ jsxs("div", { children: [t8, /* @__PURE__ */ jsx("span", {
243
+ className: "text-amber-400",
244
+ children: fallbackFiles
245
+ })] });
246
+ $[12] = fallbackFiles;
247
+ $[13] = t9;
248
+ } else t9 = $[13];
249
+ let t10;
250
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
251
+ t10 = /* @__PURE__ */ jsx("span", {
252
+ className: "text-muted-foreground block",
253
+ children: "Outputs"
254
+ });
255
+ $[14] = t10;
256
+ } else t10 = $[14];
257
+ let t11;
258
+ if ($[15] !== totalOutputs) {
259
+ t11 = /* @__PURE__ */ jsxs("div", { children: [t10, /* @__PURE__ */ jsx("span", {
260
+ className: "text-foreground",
261
+ children: totalOutputs
262
+ })] });
263
+ $[15] = totalOutputs;
264
+ $[16] = t11;
265
+ } else t11 = $[16];
266
+ let t12;
267
+ if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
268
+ t12 = /* @__PURE__ */ jsx("span", {
269
+ className: "text-muted-foreground block",
270
+ children: "Time"
271
+ });
272
+ $[17] = t12;
273
+ } else t12 = $[17];
274
+ let t13;
275
+ if ($[18] !== durationMs) {
276
+ t13 = Math.round(durationMs);
277
+ $[18] = durationMs;
278
+ $[19] = t13;
279
+ } else t13 = $[19];
280
+ let t14;
281
+ if ($[20] !== t13) {
282
+ t14 = /* @__PURE__ */ jsxs("div", { children: [t12, /* @__PURE__ */ jsxs("span", {
283
+ className: "text-foreground",
284
+ children: [t13, "ms"]
285
+ })] });
286
+ $[20] = t13;
287
+ $[21] = t14;
288
+ } else t14 = $[21];
289
+ let t15;
290
+ if ($[22] !== t1 || $[23] !== t11 || $[24] !== t14 || $[25] !== t3 || $[26] !== t5 || $[27] !== t7 || $[28] !== t9) {
291
+ t15 = /* @__PURE__ */ jsxs("div", {
292
+ className: t1,
293
+ children: [
294
+ t3,
295
+ t5,
296
+ t7,
297
+ t9,
298
+ t11,
299
+ t14
300
+ ]
301
+ });
302
+ $[22] = t1;
303
+ $[23] = t11;
304
+ $[24] = t14;
305
+ $[25] = t3;
306
+ $[26] = t5;
307
+ $[27] = t7;
308
+ $[28] = t9;
309
+ $[29] = t15;
310
+ } else t15 = $[29];
311
+ return t15;
312
+ }
313
+ /**
314
+ * List of execution errors
315
+ */
316
+ function ExecutionErrors(t0) {
317
+ const $ = c(7);
318
+ const { errors, className } = t0;
319
+ if (errors.length === 0) return null;
320
+ let t1;
321
+ if ($[0] !== className) {
322
+ t1 = cn("space-y-1", className);
323
+ $[0] = className;
324
+ $[1] = t1;
325
+ } else t1 = $[1];
326
+ let t2;
327
+ if ($[2] !== errors) {
328
+ t2 = errors.map(_temp2);
329
+ $[2] = errors;
330
+ $[3] = t2;
331
+ } else t2 = $[3];
332
+ let t3;
333
+ if ($[4] !== t1 || $[5] !== t2) {
334
+ t3 = /* @__PURE__ */ jsx("div", {
335
+ className: t1,
336
+ children: t2
337
+ });
338
+ $[4] = t1;
339
+ $[5] = t2;
340
+ $[6] = t3;
341
+ } else t3 = $[6];
342
+ return t3;
343
+ }
344
+ function _temp2(err) {
345
+ return /* @__PURE__ */ jsxs("div", {
346
+ className: "text-xs",
347
+ children: [
348
+ /* @__PURE__ */ jsxs("span", {
349
+ className: "text-destructive",
350
+ children: [
351
+ "[",
352
+ err.scope,
353
+ "]"
354
+ ]
355
+ }),
356
+ " ",
357
+ /* @__PURE__ */ jsx("span", {
358
+ className: "text-destructive/90",
359
+ children: err.message
360
+ })
361
+ ]
362
+ }, `${err.scope}-${err.message}`);
363
+ }
364
+
365
+ //#endregion
366
+ export { ExecutionErrors, ExecutionResult, ExecutionSummary };
@@ -0,0 +1,21 @@
1
+ import * as react from "react";
2
+
3
+ //#region src/components/detail/version-selector.d.ts
4
+ interface VersionSelectorProps {
5
+ versions: string[];
6
+ selectedVersions: Set<string>;
7
+ onToggleVersion: (version: string) => void;
8
+ onSelectAll?: () => void;
9
+ onDeselectAll?: () => void;
10
+ className?: string;
11
+ }
12
+ declare function VersionSelector({
13
+ versions,
14
+ selectedVersions,
15
+ onToggleVersion,
16
+ onSelectAll,
17
+ onDeselectAll,
18
+ className
19
+ }: VersionSelectorProps): react.JSX.Element;
20
+ //#endregion
21
+ export { VersionSelector, VersionSelectorProps };
@@ -0,0 +1,132 @@
1
+ import { cn } from "../../lib/utils.mjs";
2
+ import { c } from "react/compiler-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+
5
+ //#region src/components/detail/version-selector.tsx
6
+ function VersionSelector(t0) {
7
+ const $ = c(25);
8
+ const { versions, selectedVersions, onToggleVersion, onSelectAll, onDeselectAll, className } = t0;
9
+ let map;
10
+ if ($[0] !== onToggleVersion || $[1] !== versions) {
11
+ map = /* @__PURE__ */ new Map();
12
+ for (const v of versions) map.set(v, () => onToggleVersion(v));
13
+ $[0] = onToggleVersion;
14
+ $[1] = versions;
15
+ $[2] = map;
16
+ } else map = $[2];
17
+ const versionToggles = map;
18
+ let t1;
19
+ if ($[3] !== selectedVersions.size || $[4] !== versions.length) {
20
+ t1 = /* @__PURE__ */ jsxs("span", {
21
+ className: "text-xs text-muted-foreground uppercase tracking-wider",
22
+ children: [
23
+ "Versions (",
24
+ selectedVersions.size,
25
+ "/",
26
+ versions.length,
27
+ ")"
28
+ ]
29
+ });
30
+ $[3] = selectedVersions.size;
31
+ $[4] = versions.length;
32
+ $[5] = t1;
33
+ } else t1 = $[5];
34
+ let t2;
35
+ if ($[6] !== onDeselectAll || $[7] !== onSelectAll) {
36
+ t2 = (onSelectAll || onDeselectAll) && /* @__PURE__ */ jsxs("div", {
37
+ className: "flex gap-2 text-xs",
38
+ children: [onSelectAll && /* @__PURE__ */ jsx("button", {
39
+ type: "button",
40
+ onClick: onSelectAll,
41
+ className: "text-muted-foreground hover:text-foreground",
42
+ children: "All"
43
+ }), onDeselectAll && /* @__PURE__ */ jsx("button", {
44
+ type: "button",
45
+ onClick: onDeselectAll,
46
+ className: "text-muted-foreground hover:text-foreground",
47
+ children: "None"
48
+ })]
49
+ });
50
+ $[6] = onDeselectAll;
51
+ $[7] = onSelectAll;
52
+ $[8] = t2;
53
+ } else t2 = $[8];
54
+ let t3;
55
+ if ($[9] !== t1 || $[10] !== t2) {
56
+ t3 = /* @__PURE__ */ jsxs("div", {
57
+ className: "flex items-center justify-between mb-2",
58
+ children: [t1, t2]
59
+ });
60
+ $[9] = t1;
61
+ $[10] = t2;
62
+ $[11] = t3;
63
+ } else t3 = $[11];
64
+ let t4;
65
+ if ($[12] !== selectedVersions || $[13] !== versionToggles || $[14] !== versions) {
66
+ let t5;
67
+ if ($[16] !== selectedVersions || $[17] !== versionToggles) {
68
+ t5 = (version) => /* @__PURE__ */ jsx(VersionTag, {
69
+ version,
70
+ selected: selectedVersions.has(version),
71
+ onToggle: versionToggles.get(version)
72
+ }, version);
73
+ $[16] = selectedVersions;
74
+ $[17] = versionToggles;
75
+ $[18] = t5;
76
+ } else t5 = $[18];
77
+ t4 = versions.map(t5);
78
+ $[12] = selectedVersions;
79
+ $[13] = versionToggles;
80
+ $[14] = versions;
81
+ $[15] = t4;
82
+ } else t4 = $[15];
83
+ let t5;
84
+ if ($[19] !== t4) {
85
+ t5 = /* @__PURE__ */ jsx("div", {
86
+ className: "flex flex-wrap gap-1.5",
87
+ children: t4
88
+ });
89
+ $[19] = t4;
90
+ $[20] = t5;
91
+ } else t5 = $[20];
92
+ let t6;
93
+ if ($[21] !== className || $[22] !== t3 || $[23] !== t5) {
94
+ t6 = /* @__PURE__ */ jsxs("div", {
95
+ className,
96
+ children: [t3, t5]
97
+ });
98
+ $[21] = className;
99
+ $[22] = t3;
100
+ $[23] = t5;
101
+ $[24] = t6;
102
+ } else t6 = $[24];
103
+ return t6;
104
+ }
105
+ function VersionTag(t0) {
106
+ const $ = c(6);
107
+ const { version, selected, onToggle } = t0;
108
+ const t1 = selected ? "bg-primary text-primary-foreground" : "bg-secondary text-secondary-foreground hover:bg-secondary/80";
109
+ let t2;
110
+ if ($[0] !== t1) {
111
+ t2 = cn("px-2.5 py-1 text-xs rounded transition-colors", t1);
112
+ $[0] = t1;
113
+ $[1] = t2;
114
+ } else t2 = $[1];
115
+ let t3;
116
+ if ($[2] !== onToggle || $[3] !== t2 || $[4] !== version) {
117
+ t3 = /* @__PURE__ */ jsx("button", {
118
+ type: "button",
119
+ onClick: onToggle,
120
+ className: t2,
121
+ children: version
122
+ });
123
+ $[2] = onToggle;
124
+ $[3] = t2;
125
+ $[4] = version;
126
+ $[5] = t3;
127
+ } else t3 = $[5];
128
+ return t3;
129
+ }
130
+
131
+ //#endregion
132
+ export { VersionSelector };
@@ -0,0 +1,14 @@
1
+ import * as react from "react";
2
+ import { PipelineGraphNode } from "@ucdjs/pipelines-core";
3
+
4
+ //#region src/components/graph/details.d.ts
5
+ interface PipelineGraphDetailsProps {
6
+ node: PipelineGraphNode | null;
7
+ onClose: () => void;
8
+ }
9
+ declare function PipelineGraphDetails({
10
+ node,
11
+ onClose
12
+ }: PipelineGraphDetailsProps): react.JSX.Element | null;
13
+ //#endregion
14
+ export { PipelineGraphDetails, PipelineGraphDetailsProps };