@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.
@@ -1,15 +1,16 @@
1
- import { useAddComponentToCatalogMutation as e, useGetCatalogDependencyGraphQuery as t, useGetCatalogQuery as n, useGetCatalogSbomQuery as r, useListAllComponentsForCatalogQuery as i, useRemoveComponentFromCatalogMutation as a, useUpdateCatalogMutation as o } from "../generated/wspace-operations.js";
2
- import { useVibeNavigate as s } from "../providers/VibeControlsProvider.js";
3
- import { PageHeader as c } from "../components/shared/PageHeader.js";
4
- import { LoadingState as l } from "../components/shared/LoadingState.js";
5
- import { ErrorState as u } from "../components/shared/ErrorState.js";
6
- import { EmptyState as d } from "../components/shared/EmptyState.js";
7
- import { Card as f } from "../components/shared/Card.js";
8
- import { StatCard as p } from "../components/shared/StatCard.js";
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 m } from "../constants/permissions.js";
11
- import { useQueryBackedTab as ee } from "../hooks/useQueryBackedTab.js";
12
- import { ScorecardPanel as te } from "../components/scorecard/ScorecardPanel.js";
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 h, useState as g } from "react";
21
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { ArrowLeft as v, ArrowRight as y, BarChart3 as oe, BookOpen as b, Download as x, FileText as S, Layers as C, Network as w, Package as T, Plus as E, RefreshCw as D, Settings as se, Shield as O, Zap as k } from "lucide-react";
23
- import { useParams as ce } from "react-router-dom";
24
- import { usePermissions as le } from "@burdenoff/fe-libs/shared/providers/shell";
25
- import { AnimatePresence as ue, motion as A } from "framer-motion";
26
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
27
- import { MotionItem as P, MotionList as F, MotionPage as I } from "@burdenoff/fe-libs/shared/motion";
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 L = [
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 R() {
39
- let { t } = _(), { id: r } = ce(), i = s(), { hasPermission: y, isLoading: x } = le(), T = ae((e, n) => {
40
- let r = t(e);
41
- return r === e ? n : r;
42
- }, [t]), [j, R] = ee(L, "overview"), [H, U] = g(!1), [de, W] = g(!1), [G, K] = g(null), { data: fe, loading: q, error: J, refetch: Y } = n({
43
- variables: { id: r || "" },
44
- skip: !r,
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
- }), [X] = o({ refetchQueries: ["GetCatalog"] }), [pe] = e({ refetchQueries: ["GetCatalog"] }), [me] = a({ refetchQueries: ["GetCatalog"] }), Z = fe?.vibecontrolsCatalog ?? null, Q = h(() => (Z?.components ?? []).map((e) => {
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 (x) return /* @__PURE__ */ M("div", {
63
+ if (C) return /* @__PURE__ */ N("div", {
63
64
  className: "flex items-center justify-center min-h-[400px]",
64
- children: /* @__PURE__ */ M("p", {
65
+ children: /* @__PURE__ */ N("p", {
65
66
  className: "text-text-secondary",
66
67
  children: "Loading permissions..."
67
68
  })
68
69
  });
69
- if (!y(m.VIBE_READ)) return /* @__PURE__ */ M("div", {
70
+ if (!b(ee.VIBE_READ)) return /* @__PURE__ */ N("div", {
70
71
  className: "flex items-center justify-center min-h-[400px]",
71
- children: /* @__PURE__ */ N("div", {
72
+ children: /* @__PURE__ */ P("div", {
72
73
  className: "text-center space-y-2",
73
- children: [/* @__PURE__ */ M("h2", {
74
+ children: [/* @__PURE__ */ N("h2", {
74
75
  className: "text-lg font-semibold text-foreground",
75
76
  children: "Access Denied"
76
- }), /* @__PURE__ */ M("p", {
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
- i("/catalogs");
84
- }, he = (e) => {
85
- i(`/components/${e.id}`);
86
- }, ge = async (e) => {
87
- r && (await X({ variables: {
88
- id: r,
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(T("catalog.updatedSuccess", "Catalog updated successfully")), setTimeout(() => K(null), 3e3));
97
- }, _e = [
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: T("nav.overview", "Overview"),
101
- icon: b
110
+ label: E("nav.overview", "Overview"),
111
+ icon: S
102
112
  },
103
113
  {
104
114
  id: "components",
105
- label: T("catalog.components", "Components"),
106
- icon: C,
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: T("catalog.dependencyGraph", "Dependency Graph"),
112
- icon: w
121
+ label: E("catalog.dependencyGraph", "Dependency Graph"),
122
+ icon: T
113
123
  },
114
124
  {
115
125
  id: "sbom",
116
- label: T("catalog.sbom", "SBOM"),
117
- icon: O
126
+ label: E("catalog.sbom", "SBOM"),
127
+ icon: k
118
128
  },
119
129
  {
120
130
  id: "docs",
121
- label: T("catalog.docs", "Docs"),
122
- icon: S
131
+ label: E("catalog.docs", "Docs"),
132
+ icon: se
123
133
  },
124
134
  {
125
135
  id: "scorecard",
126
- label: T("catalog.scorecard", "Scorecard"),
127
- icon: oe
136
+ label: E("catalog.scorecard", "Scorecard"),
137
+ icon: x
128
138
  },
129
139
  {
130
140
  id: "settings",
131
- label: T("common.settings", "Settings"),
132
- icon: se
141
+ label: E("common.settings", "Settings"),
142
+ icon: ce
133
143
  }
134
144
  ];
135
- return q && !Z ? /* @__PURE__ */ N(I, {
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__ */ N("button", {
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__ */ M(v, { className: "w-4 h-4" }), T("catalog.backToCatalogs", "Back to Catalogs")]
141
- }), /* @__PURE__ */ M(l, { message: T("catalog.loadingDetails", "Loading catalog details...") })]
142
- }) : J && !Z ? /* @__PURE__ */ N(I, {
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__ */ N("button", {
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__ */ M(v, { className: "w-4 h-4" }), T("catalog.backToCatalogs", "Back to Catalogs")]
148
- }), /* @__PURE__ */ M(u, {
149
- title: T("catalog.failedLoad", "Failed to load catalog"),
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__ */ N(I, {
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__ */ M("div", {
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__ */ N("button", {
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__ */ M(v, { className: "w-4 h-4" }), T("catalog.backToCatalogs", "Back to Catalogs")]
173
+ children: [/* @__PURE__ */ N(y, { className: "w-4 h-4" }), E("catalog.backToCatalogs", "Back to Catalogs")]
164
174
  }),
165
- /* @__PURE__ */ M(c, {
175
+ /* @__PURE__ */ N(l, {
166
176
  title: Z.name,
167
- description: Z.description || T("catalog.noDescription", "No description"),
168
- actions: /* @__PURE__ */ N("div", {
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__ */ M("button", {
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: T("common.refresh", "Refresh"),
175
- children: /* @__PURE__ */ M(D, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
176
- }), /* @__PURE__ */ M("span", {
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__ */ N(F, {
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__ */ M(P, { children: /* @__PURE__ */ M(p, {
187
- title: T("catalog.components", "Components"),
196
+ /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
197
+ title: E("catalog.components", "Components"),
188
198
  value: Z.componentCount ?? 0,
189
- icon: /* @__PURE__ */ M(C, { className: "w-4 h-4" })
199
+ icon: /* @__PURE__ */ N(w, { className: "w-4 h-4" })
190
200
  }) }),
191
- /* @__PURE__ */ M(P, { children: /* @__PURE__ */ M(p, {
192
- title: T("catalog.vibes", "Vibes"),
201
+ /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
202
+ title: E("catalog.vibes", "Vibes"),
193
203
  value: Z.vibeCount ?? 0,
194
- icon: /* @__PURE__ */ M(k, { className: "w-4 h-4" })
204
+ icon: /* @__PURE__ */ N(ue, { className: "w-4 h-4" })
195
205
  }) }),
196
- /* @__PURE__ */ M(P, { children: /* @__PURE__ */ M(p, {
197
- title: T("catalog.ownerName", "Owner"),
206
+ /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(h, {
207
+ title: E("catalog.ownerName", "Owner"),
198
208
  value: Z.ownerNameName || "Unassigned",
199
- icon: /* @__PURE__ */ M(b, { className: "w-4 h-4" })
209
+ icon: /* @__PURE__ */ N(S, { className: "w-4 h-4" })
200
210
  }) })
201
211
  ]
202
212
  }),
203
- /* @__PURE__ */ M("div", {
213
+ /* @__PURE__ */ N("div", {
204
214
  className: "border-b border-border-default",
205
- children: /* @__PURE__ */ M("nav", {
215
+ children: /* @__PURE__ */ N("nav", {
206
216
  className: "flex gap-1 -mb-px overflow-x-auto pb-1",
207
- "aria-label": T("catalog.tabsAriaLabel", "Catalog tabs"),
208
- children: _e.map((e) => {
209
- let t = e.icon, n = j === e.id;
210
- return /* @__PURE__ */ N("button", {
211
- onClick: () => R(e.id),
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__ */ M(t, { className: "w-4 h-4" }),
226
+ /* @__PURE__ */ N(t, { className: "w-4 h-4" }),
217
227
  e.label,
218
- e.badge && /* @__PURE__ */ M("span", {
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__ */ N(ue, {
237
+ /* @__PURE__ */ P(fe, {
228
238
  mode: "wait",
229
239
  children: [
230
- j === "overview" && /* @__PURE__ */ N(A.div, {
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__ */ M(f, { children: /* @__PURE__ */ M("div", {
256
+ Z.description && /* @__PURE__ */ N(m, { children: /* @__PURE__ */ N("div", {
247
257
  className: "p-4",
248
- children: /* @__PURE__ */ M("p", {
258
+ children: /* @__PURE__ */ N("p", {
249
259
  className: "text-text-primary",
250
260
  children: Z.description
251
261
  })
252
262
  }) }),
253
- /* @__PURE__ */ N(f, { children: [/* @__PURE__ */ M("div", {
263
+ /* @__PURE__ */ P(m, { children: [/* @__PURE__ */ N("div", {
254
264
  className: "p-4 border-b border-border-default",
255
- children: /* @__PURE__ */ M("h3", {
265
+ children: /* @__PURE__ */ N("h3", {
256
266
  className: "font-semibold text-text-primary",
257
- children: T("catalog.metadata", "Metadata")
267
+ children: E("catalog.metadata", "Metadata")
258
268
  })
259
- }), /* @__PURE__ */ M("div", {
269
+ }), /* @__PURE__ */ N("div", {
260
270
  className: "p-4",
261
- children: /* @__PURE__ */ N("div", {
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__ */ N("div", { children: [/* @__PURE__ */ M("p", {
274
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
265
275
  className: "text-text-secondary",
266
- children: T("catalog.ownerNameLabel", "Owner")
267
- }), /* @__PURE__ */ M("p", {
276
+ children: E("catalog.ownerNameLabel", "Owner")
277
+ }), /* @__PURE__ */ N("p", {
268
278
  className: "font-medium text-text-primary",
269
- children: Z.ownerName || T("common.unset", "Unset")
279
+ children: Z.ownerName || E("common.unset", "Unset")
270
280
  })] }),
271
- /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
281
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
272
282
  className: "text-text-secondary",
273
- children: T("catalog.visibility", "Visibility")
274
- }), /* @__PURE__ */ M("p", {
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__ */ N("div", { children: [/* @__PURE__ */ M("p", {
288
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
279
289
  className: "text-text-secondary",
280
- children: T("common.created", "Created")
281
- }), /* @__PURE__ */ M("p", {
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__ */ N("div", { children: [/* @__PURE__ */ M("p", {
295
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
286
296
  className: "text-text-secondary",
287
- children: T("common.updated", "Updated")
288
- }), /* @__PURE__ */ M("p", {
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__ */ M(f, { children: /* @__PURE__ */ N("div", {
305
+ Z.tags?.length > 0 && /* @__PURE__ */ N(m, { children: /* @__PURE__ */ P("div", {
296
306
  className: "p-4",
297
- children: [/* @__PURE__ */ M("h3", {
307
+ children: [/* @__PURE__ */ N("h3", {
298
308
  className: "font-semibold text-text-primary mb-3",
299
- children: T("catalog.tags", "Tags")
300
- }), /* @__PURE__ */ M("div", {
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__ */ M("span", {
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
- j === "components" && /* @__PURE__ */ N(A.div, {
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__ */ N("div", {
335
+ children: [/* @__PURE__ */ P("div", {
326
336
  className: "flex items-center justify-between",
327
- children: [/* @__PURE__ */ N("p", {
337
+ children: [/* @__PURE__ */ P("p", {
328
338
  className: "text-sm text-text-secondary",
329
339
  children: [
330
340
  Q.length,
331
341
  " ",
332
- T("catalog.componentsInCatalog", "components in this catalog")
342
+ E("catalog.componentsInCatalog", "components in this catalog")
333
343
  ]
334
- }), /* @__PURE__ */ N("button", {
335
- onClick: () => W(!0),
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__ */ M(E, { className: "w-4 h-4" }), T("catalog.addComponent", "Add Component")]
347
+ children: [/* @__PURE__ */ N(D, { className: "w-4 h-4" }), E("catalog.addComponent", "Add Component")]
338
348
  })]
339
- }), Q.length > 0 ? /* @__PURE__ */ M(F, {
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__ */ M(P, { children: /* @__PURE__ */ M(re, {
352
+ children: Q.map((e) => /* @__PURE__ */ N(F, { children: /* @__PURE__ */ N(re, {
343
353
  component: e,
344
- onOpen: he
354
+ onOpen: Ce
345
355
  }) }, e.id))
346
- }) : /* @__PURE__ */ M(d, {
347
- icon: /* @__PURE__ */ M(C, { className: "w-8 h-8 text-text-secondary" }),
348
- title: T("catalog.noComponents", "No components"),
349
- description: T("catalog.noComponentsDescription", "Add components to this catalog to track them")
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
- j === "dependency-graph" && /* @__PURE__ */ M(z, {
353
- catalogId: r || "",
354
- tr: T
362
+ M === "dependency-graph" && /* @__PURE__ */ N(B, {
363
+ catalogId: i || "",
364
+ tr: E
355
365
  }),
356
- j === "sbom" && /* @__PURE__ */ M(B, {
357
- catalogId: r || "",
358
- tr: T
366
+ M === "sbom" && /* @__PURE__ */ N(pe, {
367
+ catalogId: i || "",
368
+ tr: E
359
369
  }),
360
- j === "docs" && /* @__PURE__ */ M(A.div, {
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__ */ M(ne, {
385
+ children: /* @__PURE__ */ N(ne, {
376
386
  ownerType: "CATALOG",
377
- ownerId: r || ""
387
+ ownerId: i || ""
378
388
  })
379
389
  }, "docs"),
380
- j === "scorecard" && /* @__PURE__ */ M(A.div, {
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__ */ M(te, {
404
+ children: /* @__PURE__ */ N(g, {
395
405
  ownerType: "CATALOG",
396
- ownerId: r || ""
406
+ ownerId: i || ""
397
407
  })
398
408
  }, "scorecard"),
399
- j === "settings" && /* @__PURE__ */ M(A.div, {
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__ */ N(f, {
414
- padding: "lg",
415
- children: [/* @__PURE__ */ M("h3", {
416
- className: "font-semibold text-text-primary mb-4",
417
- children: T("catalog.editCatalog", "Edit Catalog")
418
- }), /* @__PURE__ */ M("button", {
419
- onClick: () => U(!0),
420
- className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
421
- children: T("catalog.editDetails", "Edit Details")
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__ */ M(ie, {
428
- isOpen: H,
429
- onClose: () => U(!1),
430
- onSubmit: ge,
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: T("catalog.editCatalog", "Edit Catalog")
472
+ title: E("catalog.editCatalog", "Edit Catalog")
439
473
  }),
440
- de && /* @__PURE__ */ M(V, {
441
- catalogId: r || "",
474
+ ge && /* @__PURE__ */ N(me, {
475
+ catalogId: i || "",
442
476
  existingComponentIds: Q.map((e) => e.id),
443
477
  onAdd: async (e) => {
444
- await pe({ variables: {
445
- catalogId: r,
478
+ await X({ variables: {
479
+ catalogId: i,
446
480
  componentId: e
447
- } }), K(T("catalog.componentAdded", "Component added to catalog")), setTimeout(() => K(null), 3e3), W(!1);
481
+ } }), K(E("catalog.componentAdded", "Component added to catalog")), setTimeout(() => K(null), 3e3), H(!1);
448
482
  },
449
- onClose: () => W(!1),
450
- tr: T
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__ */ N(I, {
497
+ }) : /* @__PURE__ */ P(L, {
454
498
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
455
- children: [/* @__PURE__ */ N("button", {
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__ */ M(v, { className: "w-4 h-4" }), T("catalog.backToCatalogs", "Back to Catalogs")]
459
- }), /* @__PURE__ */ M(d, {
460
- icon: /* @__PURE__ */ M(b, { className: "w-8 h-8 text-text-secondary" }),
461
- title: T("catalog.notFound", "Catalog not found"),
462
- description: `No catalog with ID "${r}" exists`,
463
- action: /* @__PURE__ */ M("button", {
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: T("catalog.backToCatalogs", "Back to Catalogs")
510
+ children: E("catalog.backToCatalogs", "Back to Catalogs")
467
511
  })
468
512
  })]
469
513
  });
470
514
  }
471
- function z({ catalogId: e, tr: n }) {
472
- let { data: r, loading: i, error: a, refetch: o } = t({
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__ */ N(A.div, {
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__ */ N("div", {
537
+ /* @__PURE__ */ P("div", {
494
538
  className: "flex items-center justify-between",
495
- children: [/* @__PURE__ */ N("h3", {
539
+ children: [/* @__PURE__ */ P("h3", {
496
540
  className: "font-semibold text-text-primary flex items-center gap-2",
497
- children: [/* @__PURE__ */ M(w, { className: "w-5 h-5" }), n("catalog.dependencyGraph", "Dependency Graph")]
498
- }), /* @__PURE__ */ M("button", {
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: n("common.refresh", "Refresh"),
503
- children: /* @__PURE__ */ M(D, { className: `w-4 h-4 ${i ? "animate-spin" : ""}` })
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__ */ M(l, { message: n("catalog.loadingGraph", "Loading dependency graph...") }),
507
- a && !s && /* @__PURE__ */ M(u, {
508
- title: n("catalog.graphError", "Failed to load graph"),
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__ */ M(d, {
513
- icon: /* @__PURE__ */ M(w, { className: "w-8 h-8 text-text-secondary" }),
514
- title: n("catalog.noGraphNodes", "No dependency data"),
515
- description: n("catalog.noGraphNodesDesc", "Add components with dependencies to this catalog to visualize the dependency graph")
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__ */ N(j, { children: [
518
- /* @__PURE__ */ N("div", {
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__ */ N(f, {
564
+ children: [/* @__PURE__ */ P(m, {
521
565
  padding: "md",
522
- children: [/* @__PURE__ */ M("p", {
566
+ children: [/* @__PURE__ */ N("p", {
523
567
  className: "text-sm text-text-secondary",
524
- children: n("catalog.graphNodes", "Components")
525
- }), /* @__PURE__ */ M("p", {
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__ */ N(f, {
573
+ }), /* @__PURE__ */ P(m, {
530
574
  padding: "md",
531
- children: [/* @__PURE__ */ M("p", {
575
+ children: [/* @__PURE__ */ N("p", {
532
576
  className: "text-sm text-text-secondary",
533
- children: n("catalog.graphEdges", "Dependencies")
534
- }), /* @__PURE__ */ M("p", {
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__ */ N(f, { children: [/* @__PURE__ */ M("div", {
584
+ /* @__PURE__ */ P(m, { children: [/* @__PURE__ */ N("div", {
541
585
  className: "p-4 border-b border-border-default",
542
- children: /* @__PURE__ */ M("h4", {
586
+ children: /* @__PURE__ */ N("h4", {
543
587
  className: "font-medium text-text-primary",
544
- children: n("catalog.graphNodesList", "Components")
588
+ children: t("catalog.graphNodesList", "Components")
545
589
  })
546
- }), /* @__PURE__ */ M("div", {
590
+ }), /* @__PURE__ */ N("div", {
547
591
  className: "divide-y divide-border-default",
548
- children: s.nodes.map((e) => /* @__PURE__ */ N("div", {
592
+ children: s.nodes.map((e) => /* @__PURE__ */ P("div", {
549
593
  className: "p-3 flex items-center justify-between",
550
- children: [/* @__PURE__ */ N("div", {
594
+ children: [/* @__PURE__ */ P("div", {
551
595
  className: "flex items-center gap-3",
552
- children: [/* @__PURE__ */ M(T, { className: "w-4 h-4 text-text-secondary" }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
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__ */ N("p", {
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__ */ N("span", {
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__ */ N(f, { children: [/* @__PURE__ */ M("div", {
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__ */ M("h4", {
611
+ children: /* @__PURE__ */ N("h4", {
568
612
  className: "font-medium text-text-primary",
569
- children: n("catalog.graphEdgesList", "Dependencies")
613
+ children: t("catalog.graphEdgesList", "Dependencies")
570
614
  })
571
- }), /* @__PURE__ */ M("div", {
615
+ }), /* @__PURE__ */ N("div", {
572
616
  className: "divide-y divide-border-default",
573
- children: s.edges.map((e, t) => /* @__PURE__ */ N("div", {
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__ */ M("span", {
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__ */ M(y, { className: "w-4 h-4 text-text-muted flex-shrink-0" }),
581
- /* @__PURE__ */ M("span", {
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__ */ M("span", {
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__ */ M("span", {
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 B({ catalogId: e, tr: t }) {
601
- let { data: n, loading: i, error: a, refetch: o } = r({
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__ */ N(A.div, {
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__ */ N("div", {
666
+ /* @__PURE__ */ P("div", {
623
667
  className: "flex items-center justify-between",
624
- children: [/* @__PURE__ */ N("h3", {
668
+ children: [/* @__PURE__ */ P("h3", {
625
669
  className: "font-semibold text-text-primary flex items-center gap-2",
626
- children: [/* @__PURE__ */ M(O, { className: "w-5 h-5" }), t("catalog.sbom", "Software Bill of Materials")]
627
- }), /* @__PURE__ */ N("div", {
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__ */ N("button", {
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__ */ M(x, { className: "w-4 h-4" }), t("catalog.downloadSBOM", "Download JSON")]
637
- }), /* @__PURE__ */ M("button", {
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: i,
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__ */ M(D, { className: `w-4 h-4 ${i ? "animate-spin" : ""}` })
686
+ children: /* @__PURE__ */ N(O, { className: `w-4 h-4 ${r ? "animate-spin" : ""}` })
643
687
  })]
644
688
  })]
645
689
  }),
646
- i && !s && /* @__PURE__ */ M(l, { message: t("catalog.loadingSBOM", "Generating SBOM...") }),
647
- a && !s && /* @__PURE__ */ M(u, {
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__ */ N(j, { children: [/* @__PURE__ */ N("div", {
696
+ s && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("div", {
653
697
  className: "grid grid-cols-3 gap-4",
654
698
  children: [
655
- /* @__PURE__ */ N(f, {
699
+ /* @__PURE__ */ P(m, {
656
700
  padding: "md",
657
- children: [/* @__PURE__ */ M("p", {
701
+ children: [/* @__PURE__ */ N("p", {
658
702
  className: "text-sm text-text-secondary",
659
703
  children: t("catalog.sbomFormat", "Format")
660
- }), /* @__PURE__ */ M("p", {
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__ */ N(f, {
709
+ /* @__PURE__ */ P(m, {
666
710
  padding: "md",
667
- children: [/* @__PURE__ */ M("p", {
711
+ children: [/* @__PURE__ */ N("p", {
668
712
  className: "text-sm text-text-secondary",
669
713
  children: t("catalog.sbomEntries", "Entries")
670
- }), /* @__PURE__ */ M("p", {
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__ */ N(f, {
719
+ /* @__PURE__ */ P(m, {
676
720
  padding: "md",
677
- children: [/* @__PURE__ */ M("p", {
721
+ children: [/* @__PURE__ */ N("p", {
678
722
  className: "text-sm text-text-secondary",
679
723
  children: t("catalog.sbomGenerated", "Generated")
680
- }), /* @__PURE__ */ M("p", {
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__ */ M(f, { children: /* @__PURE__ */ M("div", {
730
+ }), s.components.length > 0 ? /* @__PURE__ */ N(m, { children: /* @__PURE__ */ N("div", {
687
731
  className: "overflow-x-auto",
688
- children: /* @__PURE__ */ N("table", {
732
+ children: /* @__PURE__ */ P("table", {
689
733
  className: "w-full text-sm",
690
- children: [/* @__PURE__ */ M("thead", { children: /* @__PURE__ */ N("tr", {
734
+ children: [/* @__PURE__ */ N("thead", { children: /* @__PURE__ */ P("tr", {
691
735
  className: "border-b border-border-default",
692
736
  children: [
693
- /* @__PURE__ */ M("th", {
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__ */ M("th", {
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__ */ M("th", {
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__ */ M("th", {
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__ */ M("th", {
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__ */ M("tbody", {
758
+ }) }), /* @__PURE__ */ N("tbody", {
715
759
  className: "divide-y divide-border-default",
716
- children: s.components.map((e, t) => /* @__PURE__ */ N("tr", {
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__ */ M("td", {
763
+ /* @__PURE__ */ N("td", {
720
764
  className: "p-3 font-medium text-text-primary",
721
765
  children: e.name
722
766
  }),
723
- /* @__PURE__ */ M("td", {
767
+ /* @__PURE__ */ N("td", {
724
768
  className: "p-3 text-text-secondary",
725
769
  children: e.version || "-"
726
770
  }),
727
- /* @__PURE__ */ M("td", {
771
+ /* @__PURE__ */ N("td", {
728
772
  className: "p-3 text-text-secondary",
729
773
  children: e.type || "-"
730
774
  }),
731
- /* @__PURE__ */ M("td", {
775
+ /* @__PURE__ */ N("td", {
732
776
  className: "p-3",
733
- children: e.license ? /* @__PURE__ */ M("span", {
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__ */ M("td", {
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__ */ M(d, {
747
- icon: /* @__PURE__ */ M(O, { className: "w-8 h-8 text-text-secondary" }),
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 V({ catalogId: e, existingComponentIds: t, onAdd: n, onClose: r, tr: a }) {
755
- let [o, s] = g(!1), [c, u] = g(""), { data: d, loading: f } = i({ fetchPolicy: "cache-and-network" }), p = h(() => {
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__ */ M("div", {
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__ */ N(A.div, {
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__ */ N("div", {
829
+ /* @__PURE__ */ P("div", {
786
830
  className: "p-4 border-b border-border-default",
787
- children: [/* @__PURE__ */ M("h2", {
831
+ children: [/* @__PURE__ */ N("h2", {
788
832
  className: "text-lg font-semibold text-text-primary",
789
- children: a("catalog.addComponentTitle", "Add Component to Catalog")
790
- }), /* @__PURE__ */ M("div", {
833
+ children: i("catalog.addComponentTitle", "Add Component to Catalog")
834
+ }), /* @__PURE__ */ N("div", {
791
835
  className: "mt-3",
792
- children: /* @__PURE__ */ M("input", {
836
+ children: /* @__PURE__ */ N("input", {
793
837
  type: "text",
794
838
  value: c,
795
- onChange: (e) => u(e.target.value),
796
- placeholder: a("catalog.searchComponents", "Search components..."),
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__ */ N("div", {
845
+ /* @__PURE__ */ P("div", {
802
846
  className: "flex-1 overflow-y-auto p-2",
803
847
  children: [
804
- f && /* @__PURE__ */ M(l, { message: a("common.loading", "Loading...") }),
805
- !f && p.length === 0 && /* @__PURE__ */ M("div", {
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: a("catalog.noAvailableComponents", "No available components to add")
851
+ children: i("catalog.noAvailableComponents", "No available components to add")
808
852
  }),
809
- p.map((e) => /* @__PURE__ */ N("button", {
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__ */ N("div", { children: [/* @__PURE__ */ M("p", {
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__ */ N("p", {
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__ */ M(E, { className: "w-4 h-4 text-text-secondary" })]
867
+ })] }), /* @__PURE__ */ N(D, { className: "w-4 h-4 text-text-secondary" })]
824
868
  }, e.id))
825
869
  ]
826
870
  }),
827
- /* @__PURE__ */ M("div", {
871
+ /* @__PURE__ */ N("div", {
828
872
  className: "p-4 border-t border-border-default",
829
- children: /* @__PURE__ */ M("button", {
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: a("common.close", "Close")
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 { R as CatalogDetailPage };
884
+ export { z as CatalogDetailPage };
841
885
 
842
886
  //# sourceMappingURL=CatalogDetailPage.js.map