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