@burdenoff/microfe-vibecontrols 2026.518.2 → 2026.519.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.
- package/dist/pages/CatalogDetailPage.js +333 -289
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +243 -199
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +104 -71
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { useAddComponentToCatalogMutation as e,
|
|
2
|
-
import { useVibeNavigate as
|
|
3
|
-
import { PageHeader as
|
|
4
|
-
import { LoadingState as
|
|
5
|
-
import { ErrorState as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useAddComponentToCatalogMutation as e, useDeleteCatalogMutation as t, useGetCatalogDependencyGraphQuery as n, useGetCatalogQuery as r, useGetCatalogSbomQuery as i, useListAllComponentsForCatalogQuery as a, useRemoveComponentFromCatalogMutation as o, useUpdateCatalogMutation as s } from "../generated/wspace-operations.js";
|
|
2
|
+
import { useVibeNavigate as c } from "../providers/VibeControlsProvider.js";
|
|
3
|
+
import { PageHeader as l } from "../components/shared/PageHeader.js";
|
|
4
|
+
import { LoadingState as u } from "../components/shared/LoadingState.js";
|
|
5
|
+
import { ErrorState as d } from "../components/shared/ErrorState.js";
|
|
6
|
+
import { ConfirmDialog as f } from "../components/shared/ConfirmDialog.js";
|
|
7
|
+
import { EmptyState as p } from "../components/shared/EmptyState.js";
|
|
8
|
+
import { Card as m } from "../components/shared/Card.js";
|
|
9
|
+
import { StatCard as h } from "../components/shared/StatCard.js";
|
|
9
10
|
import "../components/shared/index.js";
|
|
10
|
-
import { VIBE_PERMISSIONS as
|
|
11
|
-
import { useQueryBackedTab as
|
|
12
|
-
import { ScorecardPanel as
|
|
11
|
+
import { VIBE_PERMISSIONS as ee } from "../constants/permissions.js";
|
|
12
|
+
import { useQueryBackedTab as te } from "../hooks/useQueryBackedTab.js";
|
|
13
|
+
import { ScorecardPanel as g } from "../components/scorecard/ScorecardPanel.js";
|
|
13
14
|
import "../components/scorecard/index.js";
|
|
14
15
|
import { DocsTabPanel as ne } from "../components/docs/DocsTabPanel.js";
|
|
15
16
|
import "../components/docs/index.js";
|
|
@@ -17,16 +18,16 @@ import { ComponentCard as re } from "../components/idp-components/ComponentCard.
|
|
|
17
18
|
import "../components/idp-components/index.js";
|
|
18
19
|
import { CatalogForm as ie } from "../components/catalog/CatalogForm.js";
|
|
19
20
|
import "../components/catalog/index.js";
|
|
20
|
-
import { useCallback as ae, useMemo as
|
|
21
|
-
import { useI18n as
|
|
22
|
-
import { ArrowLeft as
|
|
23
|
-
import { useParams as
|
|
24
|
-
import { usePermissions as
|
|
25
|
-
import { AnimatePresence as
|
|
26
|
-
import { Fragment as
|
|
27
|
-
import { MotionItem as
|
|
21
|
+
import { useCallback as ae, useMemo as _, useState as v } from "react";
|
|
22
|
+
import { useI18n as oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
23
|
+
import { ArrowLeft as y, ArrowRight as b, BarChart3 as x, BookOpen as S, Download as C, FileText as se, Layers as w, Network as T, Package as E, Plus as D, RefreshCw as O, Settings as ce, Shield as k, Trash2 as le, Zap as ue } from "lucide-react";
|
|
24
|
+
import { useParams as A } from "react-router-dom";
|
|
25
|
+
import { usePermissions as de } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
26
|
+
import { AnimatePresence as fe, motion as j } from "framer-motion";
|
|
27
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
28
|
+
import { MotionItem as F, MotionList as I, MotionPage as L } from "@burdenoff/fe-libs/shared/motion";
|
|
28
29
|
//#region src/pages/CatalogDetailPage.tsx
|
|
29
|
-
var
|
|
30
|
+
var R = [
|
|
30
31
|
"overview",
|
|
31
32
|
"components",
|
|
32
33
|
"dependency-graph",
|
|
@@ -35,15 +36,15 @@ var L = [
|
|
|
35
36
|
"scorecard",
|
|
36
37
|
"settings"
|
|
37
38
|
];
|
|
38
|
-
function
|
|
39
|
-
let { t } =
|
|
40
|
-
let r =
|
|
41
|
-
return r === e ?
|
|
42
|
-
}, [
|
|
43
|
-
variables: { id:
|
|
44
|
-
skip: !
|
|
39
|
+
function z() {
|
|
40
|
+
let { t: n } = oe(), { id: i } = A(), a = c(), { hasPermission: b, isLoading: C } = de(), E = ae((e, t) => {
|
|
41
|
+
let r = n(e);
|
|
42
|
+
return r === e ? t : r;
|
|
43
|
+
}, [n]), [M, z] = te(R, "overview"), [he, V] = v(!1), [ge, H] = v(!1), [_e, U] = v(!1), [ve, W] = v(!1), [G, K] = v(null), { data: ye, loading: q, error: J, refetch: Y } = r({
|
|
44
|
+
variables: { id: i || "" },
|
|
45
|
+
skip: !i,
|
|
45
46
|
fetchPolicy: "cache-and-network"
|
|
46
|
-
}), [
|
|
47
|
+
}), [be] = s({ refetchQueries: ["GetCatalog"] }), [xe] = t({ refetchQueries: ["ListCatalogs"] }), [X] = e({ refetchQueries: ["GetCatalog"] }), [Se] = o({ refetchQueries: ["GetCatalog"] }), Z = ye?.vibecontrolsCatalog ?? null, Q = _(() => (Z?.components ?? []).map((e) => {
|
|
47
48
|
let t = e.component || {};
|
|
48
49
|
return {
|
|
49
50
|
id: t.id,
|
|
@@ -59,33 +60,33 @@ function R() {
|
|
|
59
60
|
updatedAt: t.updatedAt
|
|
60
61
|
};
|
|
61
62
|
}), [Z?.components]);
|
|
62
|
-
if (
|
|
63
|
+
if (C) return /* @__PURE__ */ N("div", {
|
|
63
64
|
className: "flex items-center justify-center min-h-[400px]",
|
|
64
|
-
children: /* @__PURE__ */
|
|
65
|
+
children: /* @__PURE__ */ N("p", {
|
|
65
66
|
className: "text-text-secondary",
|
|
66
67
|
children: "Loading permissions..."
|
|
67
68
|
})
|
|
68
69
|
});
|
|
69
|
-
if (!
|
|
70
|
+
if (!b(ee.VIBE_READ)) return /* @__PURE__ */ N("div", {
|
|
70
71
|
className: "flex items-center justify-center min-h-[400px]",
|
|
71
|
-
children: /* @__PURE__ */
|
|
72
|
+
children: /* @__PURE__ */ P("div", {
|
|
72
73
|
className: "text-center space-y-2",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
74
75
|
className: "text-lg font-semibold text-foreground",
|
|
75
76
|
children: "Access Denied"
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
+
}), /* @__PURE__ */ N("p", {
|
|
77
78
|
className: "text-sm text-text-secondary",
|
|
78
79
|
children: "You don't have permission to access this page."
|
|
79
80
|
})]
|
|
80
81
|
})
|
|
81
82
|
});
|
|
82
83
|
let $ = () => {
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
id:
|
|
84
|
+
a("/catalogs");
|
|
85
|
+
}, Ce = (e) => {
|
|
86
|
+
a(`/components/${e.id}`);
|
|
87
|
+
}, we = async (e) => {
|
|
88
|
+
i && (await be({ variables: {
|
|
89
|
+
id: i,
|
|
89
90
|
input: {
|
|
90
91
|
name: e.name,
|
|
91
92
|
description: e.description || void 0,
|
|
@@ -93,129 +94,138 @@ function R() {
|
|
|
93
94
|
ownerName: e.owner || void 0,
|
|
94
95
|
tags: e.tags.length > 0 ? e.tags : void 0
|
|
95
96
|
}
|
|
96
|
-
} }), K(
|
|
97
|
-
},
|
|
97
|
+
} }), K(E("catalog.updatedSuccess", "Catalog updated successfully")), setTimeout(() => K(null), 3e3));
|
|
98
|
+
}, Te = async () => {
|
|
99
|
+
if (i) {
|
|
100
|
+
W(!0);
|
|
101
|
+
try {
|
|
102
|
+
await xe({ variables: { id: i } }), U(!1), a("/catalogs");
|
|
103
|
+
} finally {
|
|
104
|
+
W(!1);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}, Ee = [
|
|
98
108
|
{
|
|
99
109
|
id: "overview",
|
|
100
|
-
label:
|
|
101
|
-
icon:
|
|
110
|
+
label: E("nav.overview", "Overview"),
|
|
111
|
+
icon: S
|
|
102
112
|
},
|
|
103
113
|
{
|
|
104
114
|
id: "components",
|
|
105
|
-
label:
|
|
106
|
-
icon:
|
|
115
|
+
label: E("catalog.components", "Components"),
|
|
116
|
+
icon: w,
|
|
107
117
|
badge: `${Z?.componentCount ?? 0}`
|
|
108
118
|
},
|
|
109
119
|
{
|
|
110
120
|
id: "dependency-graph",
|
|
111
|
-
label:
|
|
112
|
-
icon:
|
|
121
|
+
label: E("catalog.dependencyGraph", "Dependency Graph"),
|
|
122
|
+
icon: T
|
|
113
123
|
},
|
|
114
124
|
{
|
|
115
125
|
id: "sbom",
|
|
116
|
-
label:
|
|
117
|
-
icon:
|
|
126
|
+
label: E("catalog.sbom", "SBOM"),
|
|
127
|
+
icon: k
|
|
118
128
|
},
|
|
119
129
|
{
|
|
120
130
|
id: "docs",
|
|
121
|
-
label:
|
|
122
|
-
icon:
|
|
131
|
+
label: E("catalog.docs", "Docs"),
|
|
132
|
+
icon: se
|
|
123
133
|
},
|
|
124
134
|
{
|
|
125
135
|
id: "scorecard",
|
|
126
|
-
label:
|
|
127
|
-
icon:
|
|
136
|
+
label: E("catalog.scorecard", "Scorecard"),
|
|
137
|
+
icon: x
|
|
128
138
|
},
|
|
129
139
|
{
|
|
130
140
|
id: "settings",
|
|
131
|
-
label:
|
|
132
|
-
icon:
|
|
141
|
+
label: E("common.settings", "Settings"),
|
|
142
|
+
icon: ce
|
|
133
143
|
}
|
|
134
144
|
];
|
|
135
|
-
return q && !Z ? /* @__PURE__ */
|
|
145
|
+
return q && !Z ? /* @__PURE__ */ P(L, {
|
|
136
146
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
137
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ P("button", {
|
|
138
148
|
onClick: $,
|
|
139
149
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
140
|
-
children: [/* @__PURE__ */
|
|
141
|
-
}), /* @__PURE__ */
|
|
142
|
-
}) : J && !Z ? /* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ N(y, { className: "w-4 h-4" }), E("catalog.backToCatalogs", "Back to Catalogs")]
|
|
151
|
+
}), /* @__PURE__ */ N(u, { message: E("catalog.loadingDetails", "Loading catalog details...") })]
|
|
152
|
+
}) : J && !Z ? /* @__PURE__ */ P(L, {
|
|
143
153
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
144
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ P("button", {
|
|
145
155
|
onClick: $,
|
|
146
156
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
-
}), /* @__PURE__ */
|
|
149
|
-
title:
|
|
157
|
+
children: [/* @__PURE__ */ N(y, { className: "w-4 h-4" }), E("catalog.backToCatalogs", "Back to Catalogs")]
|
|
158
|
+
}), /* @__PURE__ */ N(d, {
|
|
159
|
+
title: E("catalog.failedLoad", "Failed to load catalog"),
|
|
150
160
|
message: J.message,
|
|
151
161
|
onRetry: () => Y()
|
|
152
162
|
})]
|
|
153
|
-
}) : Z ? /* @__PURE__ */
|
|
163
|
+
}) : Z ? /* @__PURE__ */ P(L, {
|
|
154
164
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
155
165
|
children: [
|
|
156
|
-
G && /* @__PURE__ */
|
|
166
|
+
G && /* @__PURE__ */ N("div", {
|
|
157
167
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-success-bg text-status-success-text px-4 py-3 rounded-md shadow-lg",
|
|
158
168
|
children: G
|
|
159
169
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ P("button", {
|
|
161
171
|
onClick: $,
|
|
162
172
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ N(y, { className: "w-4 h-4" }), E("catalog.backToCatalogs", "Back to Catalogs")]
|
|
164
174
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ N(l, {
|
|
166
176
|
title: Z.name,
|
|
167
|
-
description: Z.description ||
|
|
168
|
-
actions: /* @__PURE__ */
|
|
177
|
+
description: Z.description || E("catalog.noDescription", "No description"),
|
|
178
|
+
actions: /* @__PURE__ */ P("div", {
|
|
169
179
|
className: "flex items-center gap-2 flex-wrap",
|
|
170
|
-
children: [/* @__PURE__ */
|
|
180
|
+
children: [/* @__PURE__ */ N("button", {
|
|
171
181
|
onClick: () => Y(),
|
|
172
182
|
disabled: q,
|
|
173
183
|
className: "flex items-center justify-center p-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
|
|
174
|
-
title:
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
-
}), /* @__PURE__ */
|
|
184
|
+
title: E("common.refresh", "Refresh"),
|
|
185
|
+
children: /* @__PURE__ */ N(O, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
|
|
186
|
+
}), /* @__PURE__ */ N("span", {
|
|
177
187
|
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${Z.visibility === "PUBLIC" ? "bg-status-success-bg text-status-success-text" : Z.visibility === "INTERNAL" ? "bg-status-warning-bg text-status-warning-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
178
188
|
children: Z.visibility
|
|
179
189
|
})]
|
|
180
190
|
})
|
|
181
191
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ P(I, {
|
|
183
193
|
stagger: .04,
|
|
184
194
|
className: "grid grid-cols-2 sm:grid-cols-3 gap-3 sm:gap-4",
|
|
185
195
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
187
|
-
title:
|
|
196
|
+
/* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
|
|
197
|
+
title: E("catalog.components", "Components"),
|
|
188
198
|
value: Z.componentCount ?? 0,
|
|
189
|
-
icon: /* @__PURE__ */
|
|
199
|
+
icon: /* @__PURE__ */ N(w, { className: "w-4 h-4" })
|
|
190
200
|
}) }),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
title:
|
|
201
|
+
/* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
|
|
202
|
+
title: E("catalog.vibes", "Vibes"),
|
|
193
203
|
value: Z.vibeCount ?? 0,
|
|
194
|
-
icon: /* @__PURE__ */
|
|
204
|
+
icon: /* @__PURE__ */ N(ue, { className: "w-4 h-4" })
|
|
195
205
|
}) }),
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
title:
|
|
206
|
+
/* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
|
|
207
|
+
title: E("catalog.ownerName", "Owner"),
|
|
198
208
|
value: Z.ownerNameName || "Unassigned",
|
|
199
|
-
icon: /* @__PURE__ */
|
|
209
|
+
icon: /* @__PURE__ */ N(S, { className: "w-4 h-4" })
|
|
200
210
|
}) })
|
|
201
211
|
]
|
|
202
212
|
}),
|
|
203
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ N("div", {
|
|
204
214
|
className: "border-b border-border-default",
|
|
205
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ N("nav", {
|
|
206
216
|
className: "flex gap-1 -mb-px overflow-x-auto pb-1",
|
|
207
|
-
"aria-label":
|
|
208
|
-
children:
|
|
209
|
-
let t = e.icon, n =
|
|
210
|
-
return /* @__PURE__ */
|
|
211
|
-
onClick: () =>
|
|
217
|
+
"aria-label": E("catalog.tabsAriaLabel", "Catalog tabs"),
|
|
218
|
+
children: Ee.map((e) => {
|
|
219
|
+
let t = e.icon, n = M === e.id;
|
|
220
|
+
return /* @__PURE__ */ P("button", {
|
|
221
|
+
onClick: () => z(e.id),
|
|
212
222
|
className: `flex shrink-0 items-center gap-1.5 px-3 py-2.5 text-xs sm:gap-2 sm:px-4 sm:text-sm font-medium border-b-2 transition-colors whitespace-nowrap ${n ? "border-action-primary-bg text-action-primary-text" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-default"}`,
|
|
213
223
|
"aria-selected": n,
|
|
214
224
|
role: "tab",
|
|
215
225
|
children: [
|
|
216
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ N(t, { className: "w-4 h-4" }),
|
|
217
227
|
e.label,
|
|
218
|
-
e.badge && /* @__PURE__ */
|
|
228
|
+
e.badge && /* @__PURE__ */ N("span", {
|
|
219
229
|
className: `hidden rounded-full px-1.5 py-0.5 text-[10px] sm:inline-flex sm:text-xs ${n ? "bg-action-primary-bg/10 text-action-primary-bg" : "bg-bg-sunken text-text-muted"}`,
|
|
220
230
|
children: e.badge
|
|
221
231
|
})
|
|
@@ -224,10 +234,10 @@ function R() {
|
|
|
224
234
|
})
|
|
225
235
|
})
|
|
226
236
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ P(fe, {
|
|
228
238
|
mode: "wait",
|
|
229
239
|
children: [
|
|
230
|
-
|
|
240
|
+
M === "overview" && /* @__PURE__ */ P(j.div, {
|
|
231
241
|
initial: {
|
|
232
242
|
opacity: 0,
|
|
233
243
|
y: 8
|
|
@@ -243,63 +253,63 @@ function R() {
|
|
|
243
253
|
transition: { duration: .2 },
|
|
244
254
|
className: "space-y-6",
|
|
245
255
|
children: [
|
|
246
|
-
Z.description && /* @__PURE__ */
|
|
256
|
+
Z.description && /* @__PURE__ */ N(m, { children: /* @__PURE__ */ N("div", {
|
|
247
257
|
className: "p-4",
|
|
248
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ N("p", {
|
|
249
259
|
className: "text-text-primary",
|
|
250
260
|
children: Z.description
|
|
251
261
|
})
|
|
252
262
|
}) }),
|
|
253
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ P(m, { children: [/* @__PURE__ */ N("div", {
|
|
254
264
|
className: "p-4 border-b border-border-default",
|
|
255
|
-
children: /* @__PURE__ */
|
|
265
|
+
children: /* @__PURE__ */ N("h3", {
|
|
256
266
|
className: "font-semibold text-text-primary",
|
|
257
|
-
children:
|
|
267
|
+
children: E("catalog.metadata", "Metadata")
|
|
258
268
|
})
|
|
259
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ N("div", {
|
|
260
270
|
className: "p-4",
|
|
261
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ P("div", {
|
|
262
272
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
|
|
263
273
|
children: [
|
|
264
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
265
275
|
className: "text-text-secondary",
|
|
266
|
-
children:
|
|
267
|
-
}), /* @__PURE__ */
|
|
276
|
+
children: E("catalog.ownerNameLabel", "Owner")
|
|
277
|
+
}), /* @__PURE__ */ N("p", {
|
|
268
278
|
className: "font-medium text-text-primary",
|
|
269
|
-
children: Z.ownerName ||
|
|
279
|
+
children: Z.ownerName || E("common.unset", "Unset")
|
|
270
280
|
})] }),
|
|
271
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
272
282
|
className: "text-text-secondary",
|
|
273
|
-
children:
|
|
274
|
-
}), /* @__PURE__ */
|
|
283
|
+
children: E("catalog.visibility", "Visibility")
|
|
284
|
+
}), /* @__PURE__ */ N("p", {
|
|
275
285
|
className: "font-medium text-text-primary",
|
|
276
286
|
children: Z.visibility
|
|
277
287
|
})] }),
|
|
278
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
279
289
|
className: "text-text-secondary",
|
|
280
|
-
children:
|
|
281
|
-
}), /* @__PURE__ */
|
|
290
|
+
children: E("common.created", "Created")
|
|
291
|
+
}), /* @__PURE__ */ N("p", {
|
|
282
292
|
className: "font-medium text-text-primary",
|
|
283
293
|
children: new Date(Z.createdAt).toLocaleDateString()
|
|
284
294
|
})] }),
|
|
285
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
286
296
|
className: "text-text-secondary",
|
|
287
|
-
children:
|
|
288
|
-
}), /* @__PURE__ */
|
|
297
|
+
children: E("common.updated", "Updated")
|
|
298
|
+
}), /* @__PURE__ */ N("p", {
|
|
289
299
|
className: "font-medium text-text-primary",
|
|
290
300
|
children: new Date(Z.updatedAt).toLocaleDateString()
|
|
291
301
|
})] })
|
|
292
302
|
]
|
|
293
303
|
})
|
|
294
304
|
})] }),
|
|
295
|
-
Z.tags?.length > 0 && /* @__PURE__ */
|
|
305
|
+
Z.tags?.length > 0 && /* @__PURE__ */ N(m, { children: /* @__PURE__ */ P("div", {
|
|
296
306
|
className: "p-4",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
307
|
+
children: [/* @__PURE__ */ N("h3", {
|
|
298
308
|
className: "font-semibold text-text-primary mb-3",
|
|
299
|
-
children:
|
|
300
|
-
}), /* @__PURE__ */
|
|
309
|
+
children: E("catalog.tags", "Tags")
|
|
310
|
+
}), /* @__PURE__ */ N("div", {
|
|
301
311
|
className: "flex flex-wrap gap-2",
|
|
302
|
-
children: Z.tags.map((e) => /* @__PURE__ */
|
|
312
|
+
children: Z.tags.map((e) => /* @__PURE__ */ N("span", {
|
|
303
313
|
className: "px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
304
314
|
children: e
|
|
305
315
|
}, e))
|
|
@@ -307,7 +317,7 @@ function R() {
|
|
|
307
317
|
}) })
|
|
308
318
|
]
|
|
309
319
|
}, "overview"),
|
|
310
|
-
|
|
320
|
+
M === "components" && /* @__PURE__ */ P(j.div, {
|
|
311
321
|
initial: {
|
|
312
322
|
opacity: 0,
|
|
313
323
|
y: 8
|
|
@@ -322,42 +332,42 @@ function R() {
|
|
|
322
332
|
},
|
|
323
333
|
transition: { duration: .2 },
|
|
324
334
|
className: "space-y-4",
|
|
325
|
-
children: [/* @__PURE__ */
|
|
335
|
+
children: [/* @__PURE__ */ P("div", {
|
|
326
336
|
className: "flex items-center justify-between",
|
|
327
|
-
children: [/* @__PURE__ */
|
|
337
|
+
children: [/* @__PURE__ */ P("p", {
|
|
328
338
|
className: "text-sm text-text-secondary",
|
|
329
339
|
children: [
|
|
330
340
|
Q.length,
|
|
331
341
|
" ",
|
|
332
|
-
|
|
342
|
+
E("catalog.componentsInCatalog", "components in this catalog")
|
|
333
343
|
]
|
|
334
|
-
}), /* @__PURE__ */
|
|
335
|
-
onClick: () =>
|
|
344
|
+
}), /* @__PURE__ */ P("button", {
|
|
345
|
+
onClick: () => H(!0),
|
|
336
346
|
className: "flex items-center gap-2 px-3 py-2 text-sm bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
347
|
+
children: [/* @__PURE__ */ N(D, { className: "w-4 h-4" }), E("catalog.addComponent", "Add Component")]
|
|
338
348
|
})]
|
|
339
|
-
}), Q.length > 0 ? /* @__PURE__ */
|
|
349
|
+
}), Q.length > 0 ? /* @__PURE__ */ N(I, {
|
|
340
350
|
stagger: .04,
|
|
341
351
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
342
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
352
|
+
children: Q.map((e) => /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(re, {
|
|
343
353
|
component: e,
|
|
344
|
-
onOpen:
|
|
354
|
+
onOpen: Ce
|
|
345
355
|
}) }, e.id))
|
|
346
|
-
}) : /* @__PURE__ */
|
|
347
|
-
icon: /* @__PURE__ */
|
|
348
|
-
title:
|
|
349
|
-
description:
|
|
356
|
+
}) : /* @__PURE__ */ N(p, {
|
|
357
|
+
icon: /* @__PURE__ */ N(w, { className: "w-8 h-8 text-text-secondary" }),
|
|
358
|
+
title: E("catalog.noComponents", "No components"),
|
|
359
|
+
description: E("catalog.noComponentsDescription", "Add components to this catalog to track them")
|
|
350
360
|
})]
|
|
351
361
|
}, "components"),
|
|
352
|
-
|
|
353
|
-
catalogId:
|
|
354
|
-
tr:
|
|
362
|
+
M === "dependency-graph" && /* @__PURE__ */ N(B, {
|
|
363
|
+
catalogId: i || "",
|
|
364
|
+
tr: E
|
|
355
365
|
}),
|
|
356
|
-
|
|
357
|
-
catalogId:
|
|
358
|
-
tr:
|
|
366
|
+
M === "sbom" && /* @__PURE__ */ N(pe, {
|
|
367
|
+
catalogId: i || "",
|
|
368
|
+
tr: E
|
|
359
369
|
}),
|
|
360
|
-
|
|
370
|
+
M === "docs" && /* @__PURE__ */ N(j.div, {
|
|
361
371
|
initial: {
|
|
362
372
|
opacity: 0,
|
|
363
373
|
y: 8
|
|
@@ -372,12 +382,12 @@ function R() {
|
|
|
372
382
|
},
|
|
373
383
|
transition: { duration: .2 },
|
|
374
384
|
className: "space-y-6",
|
|
375
|
-
children: /* @__PURE__ */
|
|
385
|
+
children: /* @__PURE__ */ N(ne, {
|
|
376
386
|
ownerType: "CATALOG",
|
|
377
|
-
ownerId:
|
|
387
|
+
ownerId: i || ""
|
|
378
388
|
})
|
|
379
389
|
}, "docs"),
|
|
380
|
-
|
|
390
|
+
M === "scorecard" && /* @__PURE__ */ N(j.div, {
|
|
381
391
|
initial: {
|
|
382
392
|
opacity: 0,
|
|
383
393
|
y: 8
|
|
@@ -391,12 +401,12 @@ function R() {
|
|
|
391
401
|
y: -8
|
|
392
402
|
},
|
|
393
403
|
transition: { duration: .2 },
|
|
394
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ N(g, {
|
|
395
405
|
ownerType: "CATALOG",
|
|
396
|
-
ownerId:
|
|
406
|
+
ownerId: i || ""
|
|
397
407
|
})
|
|
398
408
|
}, "scorecard"),
|
|
399
|
-
|
|
409
|
+
M === "settings" && /* @__PURE__ */ N(j.div, {
|
|
400
410
|
initial: {
|
|
401
411
|
opacity: 0,
|
|
402
412
|
y: 8
|
|
@@ -410,24 +420,48 @@ function R() {
|
|
|
410
420
|
y: -8
|
|
411
421
|
},
|
|
412
422
|
transition: { duration: .2 },
|
|
413
|
-
children: /* @__PURE__ */
|
|
414
|
-
|
|
415
|
-
children: [/* @__PURE__ */
|
|
416
|
-
|
|
417
|
-
children:
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
423
|
+
children: /* @__PURE__ */ P("div", {
|
|
424
|
+
className: "space-y-4",
|
|
425
|
+
children: [/* @__PURE__ */ P(m, {
|
|
426
|
+
padding: "lg",
|
|
427
|
+
children: [/* @__PURE__ */ N("h3", {
|
|
428
|
+
className: "font-semibold text-text-primary mb-4",
|
|
429
|
+
children: E("catalog.editCatalog", "Edit Catalog")
|
|
430
|
+
}), /* @__PURE__ */ N("button", {
|
|
431
|
+
onClick: () => V(!0),
|
|
432
|
+
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
433
|
+
children: E("catalog.editDetails", "Edit Details")
|
|
434
|
+
})]
|
|
435
|
+
}), /* @__PURE__ */ P(m, {
|
|
436
|
+
padding: "lg",
|
|
437
|
+
children: [
|
|
438
|
+
/* @__PURE__ */ N("h3", {
|
|
439
|
+
className: "font-semibold text-status-error-text mb-2",
|
|
440
|
+
children: E("catalog.dangerZone", "Danger Zone")
|
|
441
|
+
}),
|
|
442
|
+
/* @__PURE__ */ N("p", {
|
|
443
|
+
className: "text-sm text-text-secondary mb-4",
|
|
444
|
+
children: E("catalog.deleteWarning", "Deleting this catalog will detach all components and vibes. This cannot be undone.")
|
|
445
|
+
}),
|
|
446
|
+
/* @__PURE__ */ P("button", {
|
|
447
|
+
"data-testid": "catalog-delete-button",
|
|
448
|
+
onClick: () => U(!0),
|
|
449
|
+
className: "inline-flex items-center gap-2 px-4 py-2 bg-status-error-bg text-status-error-text rounded-md hover:opacity-90 transition-opacity",
|
|
450
|
+
children: [/* @__PURE__ */ N(le, {
|
|
451
|
+
className: "w-4 h-4",
|
|
452
|
+
"aria-hidden": "true"
|
|
453
|
+
}), E("catalog.deleteCatalog", "Delete Catalog")]
|
|
454
|
+
})
|
|
455
|
+
]
|
|
422
456
|
})]
|
|
423
457
|
})
|
|
424
458
|
}, "settings")
|
|
425
459
|
]
|
|
426
460
|
}),
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
isOpen:
|
|
429
|
-
onClose: () =>
|
|
430
|
-
onSubmit:
|
|
461
|
+
/* @__PURE__ */ N(ie, {
|
|
462
|
+
isOpen: he,
|
|
463
|
+
onClose: () => V(!1),
|
|
464
|
+
onSubmit: we,
|
|
431
465
|
initialData: {
|
|
432
466
|
name: Z.name,
|
|
433
467
|
description: Z.description || "",
|
|
@@ -435,46 +469,56 @@ function R() {
|
|
|
435
469
|
owner: Z.ownerName || "",
|
|
436
470
|
tags: Z.tags || []
|
|
437
471
|
},
|
|
438
|
-
title:
|
|
472
|
+
title: E("catalog.editCatalog", "Edit Catalog")
|
|
439
473
|
}),
|
|
440
|
-
|
|
441
|
-
catalogId:
|
|
474
|
+
ge && /* @__PURE__ */ N(me, {
|
|
475
|
+
catalogId: i || "",
|
|
442
476
|
existingComponentIds: Q.map((e) => e.id),
|
|
443
477
|
onAdd: async (e) => {
|
|
444
|
-
await
|
|
445
|
-
catalogId:
|
|
478
|
+
await X({ variables: {
|
|
479
|
+
catalogId: i,
|
|
446
480
|
componentId: e
|
|
447
|
-
} }), K(
|
|
481
|
+
} }), K(E("catalog.componentAdded", "Component added to catalog")), setTimeout(() => K(null), 3e3), H(!1);
|
|
448
482
|
},
|
|
449
|
-
onClose: () =>
|
|
450
|
-
tr:
|
|
483
|
+
onClose: () => H(!1),
|
|
484
|
+
tr: E
|
|
485
|
+
}),
|
|
486
|
+
/* @__PURE__ */ N(f, {
|
|
487
|
+
isOpen: _e,
|
|
488
|
+
onClose: () => U(!1),
|
|
489
|
+
onConfirm: Te,
|
|
490
|
+
title: E("catalog.deleteCatalog", "Delete Catalog"),
|
|
491
|
+
message: E("catalog.deleteConfirmMessage", `Are you sure you want to delete "${Z.name}"? This action cannot be undone.`),
|
|
492
|
+
confirmLabel: E("common.delete", "Delete"),
|
|
493
|
+
variant: "danger",
|
|
494
|
+
isLoading: ve
|
|
451
495
|
})
|
|
452
496
|
]
|
|
453
|
-
}) : /* @__PURE__ */
|
|
497
|
+
}) : /* @__PURE__ */ P(L, {
|
|
454
498
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ P("button", {
|
|
456
500
|
onClick: $,
|
|
457
501
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
458
|
-
children: [/* @__PURE__ */
|
|
459
|
-
}), /* @__PURE__ */
|
|
460
|
-
icon: /* @__PURE__ */
|
|
461
|
-
title:
|
|
462
|
-
description: `No catalog with ID "${
|
|
463
|
-
action: /* @__PURE__ */
|
|
502
|
+
children: [/* @__PURE__ */ N(y, { className: "w-4 h-4" }), E("catalog.backToCatalogs", "Back to Catalogs")]
|
|
503
|
+
}), /* @__PURE__ */ N(p, {
|
|
504
|
+
icon: /* @__PURE__ */ N(S, { className: "w-8 h-8 text-text-secondary" }),
|
|
505
|
+
title: E("catalog.notFound", "Catalog not found"),
|
|
506
|
+
description: `No catalog with ID "${i}" exists`,
|
|
507
|
+
action: /* @__PURE__ */ N("button", {
|
|
464
508
|
onClick: $,
|
|
465
509
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
466
|
-
children:
|
|
510
|
+
children: E("catalog.backToCatalogs", "Back to Catalogs")
|
|
467
511
|
})
|
|
468
512
|
})]
|
|
469
513
|
});
|
|
470
514
|
}
|
|
471
|
-
function
|
|
472
|
-
let { data: r, loading: i, error: a, refetch: o } =
|
|
515
|
+
function B({ catalogId: e, tr: t }) {
|
|
516
|
+
let { data: r, loading: i, error: a, refetch: o } = n({
|
|
473
517
|
variables: { catalogId: e },
|
|
474
518
|
skip: !e,
|
|
475
519
|
fetchPolicy: "cache-and-network"
|
|
476
520
|
}), s = r?.vibecontrolsCatalogDependencyGraph;
|
|
477
|
-
return /* @__PURE__ */
|
|
521
|
+
return /* @__PURE__ */ P(j.div, {
|
|
478
522
|
initial: {
|
|
479
523
|
opacity: 0,
|
|
480
524
|
y: 8
|
|
@@ -490,103 +534,103 @@ function z({ catalogId: e, tr: n }) {
|
|
|
490
534
|
transition: { duration: .2 },
|
|
491
535
|
className: "space-y-4",
|
|
492
536
|
children: [
|
|
493
|
-
/* @__PURE__ */
|
|
537
|
+
/* @__PURE__ */ P("div", {
|
|
494
538
|
className: "flex items-center justify-between",
|
|
495
|
-
children: [/* @__PURE__ */
|
|
539
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
496
540
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
498
|
-
}), /* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ N(T, { className: "w-5 h-5" }), t("catalog.dependencyGraph", "Dependency Graph")]
|
|
542
|
+
}), /* @__PURE__ */ N("button", {
|
|
499
543
|
onClick: () => o(),
|
|
500
544
|
disabled: i,
|
|
501
545
|
className: "p-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
502
|
-
title:
|
|
503
|
-
children: /* @__PURE__ */
|
|
546
|
+
title: t("common.refresh", "Refresh"),
|
|
547
|
+
children: /* @__PURE__ */ N(O, { className: `w-4 h-4 ${i ? "animate-spin" : ""}` })
|
|
504
548
|
})]
|
|
505
549
|
}),
|
|
506
|
-
i && !s && /* @__PURE__ */
|
|
507
|
-
a && !s && /* @__PURE__ */
|
|
508
|
-
title:
|
|
550
|
+
i && !s && /* @__PURE__ */ N(u, { message: t("catalog.loadingGraph", "Loading dependency graph...") }),
|
|
551
|
+
a && !s && /* @__PURE__ */ N(d, {
|
|
552
|
+
title: t("catalog.graphError", "Failed to load graph"),
|
|
509
553
|
message: a.message,
|
|
510
554
|
onRetry: () => o()
|
|
511
555
|
}),
|
|
512
|
-
s && s.nodes.length === 0 && /* @__PURE__ */
|
|
513
|
-
icon: /* @__PURE__ */
|
|
514
|
-
title:
|
|
515
|
-
description:
|
|
556
|
+
s && s.nodes.length === 0 && /* @__PURE__ */ N(p, {
|
|
557
|
+
icon: /* @__PURE__ */ N(T, { className: "w-8 h-8 text-text-secondary" }),
|
|
558
|
+
title: t("catalog.noGraphNodes", "No dependency data"),
|
|
559
|
+
description: t("catalog.noGraphNodesDesc", "Add components with dependencies to this catalog to visualize the dependency graph")
|
|
516
560
|
}),
|
|
517
|
-
s && s.nodes.length > 0 && /* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
561
|
+
s && s.nodes.length > 0 && /* @__PURE__ */ P(M, { children: [
|
|
562
|
+
/* @__PURE__ */ P("div", {
|
|
519
563
|
className: "grid grid-cols-2 gap-4",
|
|
520
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ P(m, {
|
|
521
565
|
padding: "md",
|
|
522
|
-
children: [/* @__PURE__ */
|
|
566
|
+
children: [/* @__PURE__ */ N("p", {
|
|
523
567
|
className: "text-sm text-text-secondary",
|
|
524
|
-
children:
|
|
525
|
-
}), /* @__PURE__ */
|
|
568
|
+
children: t("catalog.graphNodes", "Components")
|
|
569
|
+
}), /* @__PURE__ */ N("p", {
|
|
526
570
|
className: "text-2xl font-bold text-text-primary",
|
|
527
571
|
children: s.nodes.length
|
|
528
572
|
})]
|
|
529
|
-
}), /* @__PURE__ */
|
|
573
|
+
}), /* @__PURE__ */ P(m, {
|
|
530
574
|
padding: "md",
|
|
531
|
-
children: [/* @__PURE__ */
|
|
575
|
+
children: [/* @__PURE__ */ N("p", {
|
|
532
576
|
className: "text-sm text-text-secondary",
|
|
533
|
-
children:
|
|
534
|
-
}), /* @__PURE__ */
|
|
577
|
+
children: t("catalog.graphEdges", "Dependencies")
|
|
578
|
+
}), /* @__PURE__ */ N("p", {
|
|
535
579
|
className: "text-2xl font-bold text-text-primary",
|
|
536
580
|
children: s.edges.length
|
|
537
581
|
})]
|
|
538
582
|
})]
|
|
539
583
|
}),
|
|
540
|
-
/* @__PURE__ */
|
|
584
|
+
/* @__PURE__ */ P(m, { children: [/* @__PURE__ */ N("div", {
|
|
541
585
|
className: "p-4 border-b border-border-default",
|
|
542
|
-
children: /* @__PURE__ */
|
|
586
|
+
children: /* @__PURE__ */ N("h4", {
|
|
543
587
|
className: "font-medium text-text-primary",
|
|
544
|
-
children:
|
|
588
|
+
children: t("catalog.graphNodesList", "Components")
|
|
545
589
|
})
|
|
546
|
-
}), /* @__PURE__ */
|
|
590
|
+
}), /* @__PURE__ */ N("div", {
|
|
547
591
|
className: "divide-y divide-border-default",
|
|
548
|
-
children: s.nodes.map((e) => /* @__PURE__ */
|
|
592
|
+
children: s.nodes.map((e) => /* @__PURE__ */ P("div", {
|
|
549
593
|
className: "p-3 flex items-center justify-between",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
594
|
+
children: [/* @__PURE__ */ P("div", {
|
|
551
595
|
className: "flex items-center gap-3",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
596
|
+
children: [/* @__PURE__ */ N(E, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
553
597
|
className: "font-medium text-text-primary text-sm",
|
|
554
598
|
children: e.name
|
|
555
|
-
}), /* @__PURE__ */
|
|
599
|
+
}), /* @__PURE__ */ P("p", {
|
|
556
600
|
className: "text-xs text-text-secondary",
|
|
557
601
|
children: [e.type, e.version ? ` v${e.version}` : ""]
|
|
558
602
|
})] })]
|
|
559
|
-
}), /* @__PURE__ */
|
|
603
|
+
}), /* @__PURE__ */ P("span", {
|
|
560
604
|
className: "text-xs text-text-muted",
|
|
561
605
|
children: [s.edges.filter((t) => t.source === e.id).length, " deps"]
|
|
562
606
|
})]
|
|
563
607
|
}, e.id))
|
|
564
608
|
})] }),
|
|
565
|
-
s.edges.length > 0 && /* @__PURE__ */
|
|
609
|
+
s.edges.length > 0 && /* @__PURE__ */ P(m, { children: [/* @__PURE__ */ N("div", {
|
|
566
610
|
className: "p-4 border-b border-border-default",
|
|
567
|
-
children: /* @__PURE__ */
|
|
611
|
+
children: /* @__PURE__ */ N("h4", {
|
|
568
612
|
className: "font-medium text-text-primary",
|
|
569
|
-
children:
|
|
613
|
+
children: t("catalog.graphEdgesList", "Dependencies")
|
|
570
614
|
})
|
|
571
|
-
}), /* @__PURE__ */
|
|
615
|
+
}), /* @__PURE__ */ N("div", {
|
|
572
616
|
className: "divide-y divide-border-default",
|
|
573
|
-
children: s.edges.map((e, t) => /* @__PURE__ */
|
|
617
|
+
children: s.edges.map((e, t) => /* @__PURE__ */ P("div", {
|
|
574
618
|
className: "p-3 flex items-center gap-3 text-sm",
|
|
575
619
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
620
|
+
/* @__PURE__ */ N("span", {
|
|
577
621
|
className: "font-medium text-text-primary truncate max-w-[120px]",
|
|
578
622
|
children: s.nodes.find((t) => t.id === e.source)?.name || e.source
|
|
579
623
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ N(b, { className: "w-4 h-4 text-text-muted flex-shrink-0" }),
|
|
625
|
+
/* @__PURE__ */ N("span", {
|
|
582
626
|
className: "text-text-primary truncate max-w-[120px]",
|
|
583
627
|
children: e.target
|
|
584
628
|
}),
|
|
585
|
-
e.version && /* @__PURE__ */
|
|
629
|
+
e.version && /* @__PURE__ */ N("span", {
|
|
586
630
|
className: "text-xs text-text-muted ml-auto",
|
|
587
631
|
children: e.version
|
|
588
632
|
}),
|
|
589
|
-
e.dependencyType && /* @__PURE__ */
|
|
633
|
+
e.dependencyType && /* @__PURE__ */ N("span", {
|
|
590
634
|
className: "text-xs bg-bg-sunken text-text-secondary px-1.5 py-0.5 rounded",
|
|
591
635
|
children: e.dependencyType
|
|
592
636
|
})
|
|
@@ -597,13 +641,13 @@ function z({ catalogId: e, tr: n }) {
|
|
|
597
641
|
]
|
|
598
642
|
}, "dependency-graph");
|
|
599
643
|
}
|
|
600
|
-
function
|
|
601
|
-
let { data: n, loading:
|
|
644
|
+
function pe({ catalogId: e, tr: t }) {
|
|
645
|
+
let { data: n, loading: r, error: a, refetch: o } = i({
|
|
602
646
|
variables: { catalogId: e },
|
|
603
647
|
skip: !e,
|
|
604
648
|
fetchPolicy: "cache-and-network"
|
|
605
649
|
}), s = n?.vibecontrolsCatalogSBOM;
|
|
606
|
-
return /* @__PURE__ */
|
|
650
|
+
return /* @__PURE__ */ P(j.div, {
|
|
607
651
|
initial: {
|
|
608
652
|
opacity: 0,
|
|
609
653
|
y: 8
|
|
@@ -619,123 +663,123 @@ function B({ catalogId: e, tr: t }) {
|
|
|
619
663
|
transition: { duration: .2 },
|
|
620
664
|
className: "space-y-4",
|
|
621
665
|
children: [
|
|
622
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ P("div", {
|
|
623
667
|
className: "flex items-center justify-between",
|
|
624
|
-
children: [/* @__PURE__ */
|
|
668
|
+
children: [/* @__PURE__ */ P("h3", {
|
|
625
669
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
626
|
-
children: [/* @__PURE__ */
|
|
627
|
-
}), /* @__PURE__ */
|
|
670
|
+
children: [/* @__PURE__ */ N(k, { className: "w-5 h-5" }), t("catalog.sbom", "Software Bill of Materials")]
|
|
671
|
+
}), /* @__PURE__ */ P("div", {
|
|
628
672
|
className: "flex items-center gap-2",
|
|
629
|
-
children: [s && s.components.length > 0 && /* @__PURE__ */
|
|
673
|
+
children: [s && s.components.length > 0 && /* @__PURE__ */ P("button", {
|
|
630
674
|
onClick: () => {
|
|
631
675
|
if (!s) return;
|
|
632
676
|
let t = new Blob([JSON.stringify(s, null, 2)], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
633
677
|
r.href = n, r.download = `sbom-${e}.json`, r.click(), URL.revokeObjectURL(n);
|
|
634
678
|
},
|
|
635
679
|
className: "flex items-center gap-2 px-3 py-2 text-sm bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
636
|
-
children: [/* @__PURE__ */
|
|
637
|
-
}), /* @__PURE__ */
|
|
680
|
+
children: [/* @__PURE__ */ N(C, { className: "w-4 h-4" }), t("catalog.downloadSBOM", "Download JSON")]
|
|
681
|
+
}), /* @__PURE__ */ N("button", {
|
|
638
682
|
onClick: () => o(),
|
|
639
|
-
disabled:
|
|
683
|
+
disabled: r,
|
|
640
684
|
className: "p-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
|
|
641
685
|
title: t("common.refresh", "Refresh"),
|
|
642
|
-
children: /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ N(O, { className: `w-4 h-4 ${r ? "animate-spin" : ""}` })
|
|
643
687
|
})]
|
|
644
688
|
})]
|
|
645
689
|
}),
|
|
646
|
-
|
|
647
|
-
a && !s && /* @__PURE__ */
|
|
690
|
+
r && !s && /* @__PURE__ */ N(u, { message: t("catalog.loadingSBOM", "Generating SBOM...") }),
|
|
691
|
+
a && !s && /* @__PURE__ */ N(d, {
|
|
648
692
|
title: t("catalog.sbomError", "Failed to load SBOM"),
|
|
649
693
|
message: a.message,
|
|
650
694
|
onRetry: () => o()
|
|
651
695
|
}),
|
|
652
|
-
s && /* @__PURE__ */
|
|
696
|
+
s && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", {
|
|
653
697
|
className: "grid grid-cols-3 gap-4",
|
|
654
698
|
children: [
|
|
655
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ P(m, {
|
|
656
700
|
padding: "md",
|
|
657
|
-
children: [/* @__PURE__ */
|
|
701
|
+
children: [/* @__PURE__ */ N("p", {
|
|
658
702
|
className: "text-sm text-text-secondary",
|
|
659
703
|
children: t("catalog.sbomFormat", "Format")
|
|
660
|
-
}), /* @__PURE__ */
|
|
704
|
+
}), /* @__PURE__ */ N("p", {
|
|
661
705
|
className: "text-lg font-bold text-text-primary",
|
|
662
706
|
children: s.format
|
|
663
707
|
})]
|
|
664
708
|
}),
|
|
665
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ P(m, {
|
|
666
710
|
padding: "md",
|
|
667
|
-
children: [/* @__PURE__ */
|
|
711
|
+
children: [/* @__PURE__ */ N("p", {
|
|
668
712
|
className: "text-sm text-text-secondary",
|
|
669
713
|
children: t("catalog.sbomEntries", "Entries")
|
|
670
|
-
}), /* @__PURE__ */
|
|
714
|
+
}), /* @__PURE__ */ N("p", {
|
|
671
715
|
className: "text-lg font-bold text-text-primary",
|
|
672
716
|
children: s.totalCount
|
|
673
717
|
})]
|
|
674
718
|
}),
|
|
675
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ P(m, {
|
|
676
720
|
padding: "md",
|
|
677
|
-
children: [/* @__PURE__ */
|
|
721
|
+
children: [/* @__PURE__ */ N("p", {
|
|
678
722
|
className: "text-sm text-text-secondary",
|
|
679
723
|
children: t("catalog.sbomGenerated", "Generated")
|
|
680
|
-
}), /* @__PURE__ */
|
|
724
|
+
}), /* @__PURE__ */ N("p", {
|
|
681
725
|
className: "text-lg font-bold text-text-primary",
|
|
682
726
|
children: new Date(s.generatedAt).toLocaleTimeString()
|
|
683
727
|
})]
|
|
684
728
|
})
|
|
685
729
|
]
|
|
686
|
-
}), s.components.length > 0 ? /* @__PURE__ */
|
|
730
|
+
}), s.components.length > 0 ? /* @__PURE__ */ N(m, { children: /* @__PURE__ */ N("div", {
|
|
687
731
|
className: "overflow-x-auto",
|
|
688
|
-
children: /* @__PURE__ */
|
|
732
|
+
children: /* @__PURE__ */ P("table", {
|
|
689
733
|
className: "w-full text-sm",
|
|
690
|
-
children: [/* @__PURE__ */
|
|
734
|
+
children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ P("tr", {
|
|
691
735
|
className: "border-b border-border-default",
|
|
692
736
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
737
|
+
/* @__PURE__ */ N("th", {
|
|
694
738
|
className: "text-left p-3 font-medium text-text-secondary",
|
|
695
739
|
children: t("catalog.sbomName", "Name")
|
|
696
740
|
}),
|
|
697
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ N("th", {
|
|
698
742
|
className: "text-left p-3 font-medium text-text-secondary",
|
|
699
743
|
children: t("catalog.sbomVersion", "Version")
|
|
700
744
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
745
|
+
/* @__PURE__ */ N("th", {
|
|
702
746
|
className: "text-left p-3 font-medium text-text-secondary",
|
|
703
747
|
children: t("catalog.sbomType", "Type")
|
|
704
748
|
}),
|
|
705
|
-
/* @__PURE__ */
|
|
749
|
+
/* @__PURE__ */ N("th", {
|
|
706
750
|
className: "text-left p-3 font-medium text-text-secondary",
|
|
707
751
|
children: t("catalog.sbomLicense", "License")
|
|
708
752
|
}),
|
|
709
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ N("th", {
|
|
710
754
|
className: "text-left p-3 font-medium text-text-secondary",
|
|
711
755
|
children: t("catalog.sbomSupplier", "Supplier")
|
|
712
756
|
})
|
|
713
757
|
]
|
|
714
|
-
}) }), /* @__PURE__ */
|
|
758
|
+
}) }), /* @__PURE__ */ N("tbody", {
|
|
715
759
|
className: "divide-y divide-border-default",
|
|
716
|
-
children: s.components.map((e, t) => /* @__PURE__ */
|
|
760
|
+
children: s.components.map((e, t) => /* @__PURE__ */ P("tr", {
|
|
717
761
|
className: "hover:bg-bg-sunken/50 transition-colors",
|
|
718
762
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
763
|
+
/* @__PURE__ */ N("td", {
|
|
720
764
|
className: "p-3 font-medium text-text-primary",
|
|
721
765
|
children: e.name
|
|
722
766
|
}),
|
|
723
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ N("td", {
|
|
724
768
|
className: "p-3 text-text-secondary",
|
|
725
769
|
children: e.version || "-"
|
|
726
770
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ N("td", {
|
|
728
772
|
className: "p-3 text-text-secondary",
|
|
729
773
|
children: e.type || "-"
|
|
730
774
|
}),
|
|
731
|
-
/* @__PURE__ */
|
|
775
|
+
/* @__PURE__ */ N("td", {
|
|
732
776
|
className: "p-3",
|
|
733
|
-
children: e.license ? /* @__PURE__ */
|
|
777
|
+
children: e.license ? /* @__PURE__ */ N("span", {
|
|
734
778
|
className: "inline-flex px-2 py-0.5 text-xs bg-status-success-bg text-status-success-text rounded",
|
|
735
779
|
children: e.license
|
|
736
780
|
}) : "-"
|
|
737
781
|
}),
|
|
738
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ N("td", {
|
|
739
783
|
className: "p-3 text-text-secondary",
|
|
740
784
|
children: e.supplier || "-"
|
|
741
785
|
})
|
|
@@ -743,16 +787,16 @@ function B({ catalogId: e, tr: t }) {
|
|
|
743
787
|
}, t))
|
|
744
788
|
})]
|
|
745
789
|
})
|
|
746
|
-
}) }) : /* @__PURE__ */
|
|
747
|
-
icon: /* @__PURE__ */
|
|
790
|
+
}) }) : /* @__PURE__ */ N(p, {
|
|
791
|
+
icon: /* @__PURE__ */ N(k, { className: "w-8 h-8 text-text-secondary" }),
|
|
748
792
|
title: t("catalog.noSBOMEntries", "No SBOM entries"),
|
|
749
793
|
description: t("catalog.noSBOMEntriesDesc", "Add components with SBOM data or dependencies to this catalog to generate an aggregated SBOM")
|
|
750
794
|
})] })
|
|
751
795
|
]
|
|
752
796
|
}, "sbom");
|
|
753
797
|
}
|
|
754
|
-
function
|
|
755
|
-
let [o, s] =
|
|
798
|
+
function me({ catalogId: e, existingComponentIds: t, onAdd: n, onClose: r, tr: i }) {
|
|
799
|
+
let [o, s] = v(!1), [c, l] = v(""), { data: d, loading: f } = a({ fetchPolicy: "cache-and-network" }), p = _(() => {
|
|
756
800
|
let e = (d?.vibecontrolsComponents?.items ?? []).filter((e) => !t.includes(e.id));
|
|
757
801
|
if (!c) return e;
|
|
758
802
|
let n = c.toLowerCase();
|
|
@@ -769,9 +813,9 @@ function V({ catalogId: e, existingComponentIds: t, onAdd: n, onClose: r, tr: a
|
|
|
769
813
|
s(!1);
|
|
770
814
|
}
|
|
771
815
|
};
|
|
772
|
-
return /* @__PURE__ */
|
|
816
|
+
return /* @__PURE__ */ N("div", {
|
|
773
817
|
className: "fixed inset-0 bg-bg-overlay flex items-center justify-center z-50 p-4",
|
|
774
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ P(j.div, {
|
|
775
819
|
initial: {
|
|
776
820
|
opacity: 0,
|
|
777
821
|
scale: .95
|
|
@@ -782,54 +826,54 @@ function V({ catalogId: e, existingComponentIds: t, onAdd: n, onClose: r, tr: a
|
|
|
782
826
|
},
|
|
783
827
|
className: "bg-bg-surface rounded-lg w-full max-w-md max-h-[70vh] flex flex-col",
|
|
784
828
|
children: [
|
|
785
|
-
/* @__PURE__ */
|
|
829
|
+
/* @__PURE__ */ P("div", {
|
|
786
830
|
className: "p-4 border-b border-border-default",
|
|
787
|
-
children: [/* @__PURE__ */
|
|
831
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
788
832
|
className: "text-lg font-semibold text-text-primary",
|
|
789
|
-
children:
|
|
790
|
-
}), /* @__PURE__ */
|
|
833
|
+
children: i("catalog.addComponentTitle", "Add Component to Catalog")
|
|
834
|
+
}), /* @__PURE__ */ N("div", {
|
|
791
835
|
className: "mt-3",
|
|
792
|
-
children: /* @__PURE__ */
|
|
836
|
+
children: /* @__PURE__ */ N("input", {
|
|
793
837
|
type: "text",
|
|
794
838
|
value: c,
|
|
795
|
-
onChange: (e) =>
|
|
796
|
-
placeholder:
|
|
839
|
+
onChange: (e) => l(e.target.value),
|
|
840
|
+
placeholder: i("catalog.searchComponents", "Search components..."),
|
|
797
841
|
className: "w-full px-3 py-2 bg-bg-sunken border border-border-default rounded-md text-text-primary placeholder:text-text-placeholder text-sm"
|
|
798
842
|
})
|
|
799
843
|
})]
|
|
800
844
|
}),
|
|
801
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ P("div", {
|
|
802
846
|
className: "flex-1 overflow-y-auto p-2",
|
|
803
847
|
children: [
|
|
804
|
-
f && /* @__PURE__ */
|
|
805
|
-
!f && p.length === 0 && /* @__PURE__ */
|
|
848
|
+
f && /* @__PURE__ */ N(u, { message: i("common.loading", "Loading...") }),
|
|
849
|
+
!f && p.length === 0 && /* @__PURE__ */ N("div", {
|
|
806
850
|
className: "p-4 text-center text-text-secondary text-sm",
|
|
807
|
-
children:
|
|
851
|
+
children: i("catalog.noAvailableComponents", "No available components to add")
|
|
808
852
|
}),
|
|
809
|
-
p.map((e) => /* @__PURE__ */
|
|
853
|
+
p.map((e) => /* @__PURE__ */ P("button", {
|
|
810
854
|
onClick: () => m(e.id),
|
|
811
855
|
disabled: o,
|
|
812
856
|
className: "w-full flex items-center justify-between p-3 rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50 text-left",
|
|
813
|
-
children: [/* @__PURE__ */
|
|
857
|
+
children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
|
|
814
858
|
className: "font-medium text-text-primary text-sm",
|
|
815
859
|
children: e.name
|
|
816
|
-
}), /* @__PURE__ */
|
|
860
|
+
}), /* @__PURE__ */ P("p", {
|
|
817
861
|
className: "text-xs text-text-secondary",
|
|
818
862
|
children: [
|
|
819
863
|
e.type,
|
|
820
864
|
" · ",
|
|
821
865
|
e.lifecycle
|
|
822
866
|
]
|
|
823
|
-
})] }), /* @__PURE__ */
|
|
867
|
+
})] }), /* @__PURE__ */ N(D, { className: "w-4 h-4 text-text-secondary" })]
|
|
824
868
|
}, e.id))
|
|
825
869
|
]
|
|
826
870
|
}),
|
|
827
|
-
/* @__PURE__ */
|
|
871
|
+
/* @__PURE__ */ N("div", {
|
|
828
872
|
className: "p-4 border-t border-border-default",
|
|
829
|
-
children: /* @__PURE__ */
|
|
873
|
+
children: /* @__PURE__ */ N("button", {
|
|
830
874
|
onClick: r,
|
|
831
875
|
className: "w-full px-4 py-2 text-text-primary hover:bg-bg-sunken rounded-md transition-colors",
|
|
832
|
-
children:
|
|
876
|
+
children: i("common.close", "Close")
|
|
833
877
|
})
|
|
834
878
|
})
|
|
835
879
|
]
|
|
@@ -837,6 +881,6 @@ function V({ catalogId: e, existingComponentIds: t, onAdd: n, onClose: r, tr: a
|
|
|
837
881
|
});
|
|
838
882
|
}
|
|
839
883
|
//#endregion
|
|
840
|
-
export {
|
|
884
|
+
export { z as CatalogDetailPage };
|
|
841
885
|
|
|
842
886
|
//# sourceMappingURL=CatalogDetailPage.js.map
|