@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.23
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/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +17 -16
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPreviewPanel.js +25 -24
- package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +110 -94
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/scorecard/ScorecardPanel.js +271 -257
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +603 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +37 -12
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +11 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +264 -250
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +124 -113
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +139 -126
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +78 -67
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -11,21 +11,23 @@ import { Card as d } from "../components/shared/Card.js";
|
|
|
11
11
|
import { StatCard as f } from "../components/shared/StatCard.js";
|
|
12
12
|
import "../components/shared/index.js";
|
|
13
13
|
import { VIBE_PERMISSIONS as ie } from "../constants/permissions.js";
|
|
14
|
-
import {
|
|
15
|
-
import
|
|
16
|
-
import {
|
|
14
|
+
import { EntityShareButton as ae } from "../components/sharing/EntityShareButton.js";
|
|
15
|
+
import "../components/sharing/index.js";
|
|
16
|
+
import { PageSkeleton as oe } from "../components/shared/PageSkeleton.js";
|
|
17
|
+
import { useQueryBackedTab as se } from "../hooks/useQueryBackedTab.js";
|
|
18
|
+
import { DocsTabPanel as ce } from "../components/docs/DocsTabPanel.js";
|
|
17
19
|
import "../components/docs/index.js";
|
|
18
|
-
import { ComponentForm as
|
|
19
|
-
import { DependencyGraphTab as
|
|
20
|
+
import { ComponentForm as le } from "../components/idp-components/ComponentForm.js";
|
|
21
|
+
import { DependencyGraphTab as ue } from "../components/idp-components/DependencyGraphTab.js";
|
|
20
22
|
import "../components/idp-components/index.js";
|
|
21
|
-
import { CatalogCard as
|
|
23
|
+
import { CatalogCard as de } from "../components/catalog/CatalogCard.js";
|
|
22
24
|
import "../components/catalog/index.js";
|
|
23
|
-
import { PublishTemplateForm as
|
|
25
|
+
import { PublishTemplateForm as fe } from "../components/templates/PublishTemplateForm.js";
|
|
24
26
|
import "../components/templates/index.js";
|
|
25
|
-
import { useCallback as
|
|
26
|
-
import { useI18n as
|
|
27
|
-
import { ArrowLeft as m, BookOpen as h, Box as g, FileCode as _, FileText as
|
|
28
|
-
import { useParams as
|
|
27
|
+
import { useCallback as pe, useMemo as me, useState as p } from "react";
|
|
28
|
+
import { useI18n as he } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
29
|
+
import { ArrowLeft as m, BookOpen as h, Box as g, FileCode as _, FileText as ge, Layers as v, Plus as y, RefreshCw as _e, Settings as ve, Share2 as ye, Tag as be, Trash2 as xe, Upload as b, X as Se } from "lucide-react";
|
|
30
|
+
import { useParams as x } from "react-router-dom";
|
|
29
31
|
import { usePermissions as S } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
30
32
|
import { AnimatePresence as C, motion as w } from "framer-motion";
|
|
31
33
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
@@ -40,21 +42,21 @@ var A = [
|
|
|
40
42
|
"settings"
|
|
41
43
|
];
|
|
42
44
|
function j() {
|
|
43
|
-
let { t: j } =
|
|
45
|
+
let { t: j } = he(), { id: M } = x(), N = o(), { hasPermission: Ce, isLoading: we } = S(), P = pe((e, t) => {
|
|
44
46
|
let n = j(e);
|
|
45
47
|
return n === e ? t : n;
|
|
46
|
-
}, [j]), [F,
|
|
48
|
+
}, [j]), [F, Te] = se(A, "overview"), [Ee, I] = p(!1), [De, L] = p(!1), [Oe, R] = p(!1), [z, B] = p(null), [ke, V] = p(!1), [Ae, H] = p(!1), [U, W] = p(!1), { data: je, loading: G, error: K, refetch: q } = n({
|
|
47
49
|
variables: { id: M || "" },
|
|
48
50
|
skip: !M,
|
|
49
51
|
fetchPolicy: "cache-and-network"
|
|
50
|
-
}), [
|
|
52
|
+
}), [Me] = ee({ refetchQueries: ["GetComponent"] }), [Ne] = t({ refetchQueries: ["ListComponents"] }), [Pe] = i({ refetchQueries: ["GetComponent"] }), [Fe] = e({ refetchQueries: ["GetComponent"] }), { data: J } = r({
|
|
51
53
|
variables: { pagination: {
|
|
52
54
|
limit: 100,
|
|
53
55
|
offset: 0
|
|
54
56
|
} },
|
|
55
57
|
skip: !U,
|
|
56
58
|
fetchPolicy: "cache-and-network"
|
|
57
|
-
}),
|
|
59
|
+
}), Y = je?.vibecontrolsComponent ?? null, X = me(() => (Y?.catalogs ?? []).map((e) => {
|
|
58
60
|
let t = e.catalog || {};
|
|
59
61
|
return {
|
|
60
62
|
id: t.id,
|
|
@@ -67,15 +69,15 @@ function j() {
|
|
|
67
69
|
createdAt: t.createdAt,
|
|
68
70
|
updatedAt: t.updatedAt
|
|
69
71
|
};
|
|
70
|
-
}), [
|
|
71
|
-
if (
|
|
72
|
+
}), [Y?.catalogs]);
|
|
73
|
+
if (we) return /* @__PURE__ */ T("div", {
|
|
72
74
|
className: "flex items-center justify-center min-h-[400px]",
|
|
73
75
|
children: /* @__PURE__ */ T("p", {
|
|
74
76
|
className: "text-text-secondary",
|
|
75
77
|
children: "Loading permissions…"
|
|
76
78
|
})
|
|
77
79
|
});
|
|
78
|
-
if (!
|
|
80
|
+
if (!Ce(ie.VIBE_READ)) return /* @__PURE__ */ T("div", {
|
|
79
81
|
className: "flex items-center justify-center min-h-[400px]",
|
|
80
82
|
children: /* @__PURE__ */ E("div", {
|
|
81
83
|
className: "text-center space-y-2",
|
|
@@ -88,12 +90,12 @@ function j() {
|
|
|
88
90
|
})]
|
|
89
91
|
})
|
|
90
92
|
});
|
|
91
|
-
let
|
|
93
|
+
let Z = () => {
|
|
92
94
|
N("/components");
|
|
93
|
-
},
|
|
95
|
+
}, Ie = (e) => {
|
|
94
96
|
N(`/catalogs/${e.id}`);
|
|
95
|
-
},
|
|
96
|
-
M && (await
|
|
97
|
+
}, Le = async (e) => {
|
|
98
|
+
M && (await Me({ variables: {
|
|
97
99
|
id: M,
|
|
98
100
|
input: {
|
|
99
101
|
name: e.name,
|
|
@@ -111,18 +113,18 @@ function j() {
|
|
|
111
113
|
sbomData: e.sbomData ?? void 0
|
|
112
114
|
}
|
|
113
115
|
} }), B(P("component.updatedSuccess", "Component updated successfully")), setTimeout(() => B(null), 3e3));
|
|
114
|
-
},
|
|
116
|
+
}, Re = async () => {
|
|
115
117
|
if (M) {
|
|
116
118
|
R(!0);
|
|
117
119
|
try {
|
|
118
|
-
await
|
|
120
|
+
await Ne({ variables: { id: M } }), L(!1), N("/components");
|
|
119
121
|
} finally {
|
|
120
122
|
R(!1);
|
|
121
123
|
}
|
|
122
124
|
}
|
|
123
|
-
},
|
|
125
|
+
}, Q = async (e) => {
|
|
124
126
|
if (M) try {
|
|
125
|
-
let t = await
|
|
127
|
+
let t = await Pe({ variables: {
|
|
126
128
|
componentId: M,
|
|
127
129
|
input: {
|
|
128
130
|
name: e.name,
|
|
@@ -146,12 +148,12 @@ function j() {
|
|
|
146
148
|
}
|
|
147
149
|
throw e;
|
|
148
150
|
}
|
|
149
|
-
},
|
|
151
|
+
}, ze = {
|
|
150
152
|
EXPERIMENTAL: "bg-status-warning-bg text-status-warning-text",
|
|
151
153
|
ACTIVE: "bg-status-success-bg text-status-success-text",
|
|
152
154
|
DEPRECATED: "bg-status-error-bg text-status-error-text",
|
|
153
155
|
END_OF_LIFE: "bg-status-error-bg text-status-error-text"
|
|
154
|
-
}, $ = Array.isArray(
|
|
156
|
+
}, $ = Array.isArray(Y?.dependencies) ? Y.dependencies : [], Be = [
|
|
155
157
|
{
|
|
156
158
|
id: "overview",
|
|
157
159
|
label: P("nav.overview", "Overview"),
|
|
@@ -161,17 +163,17 @@ function j() {
|
|
|
161
163
|
id: "catalogs",
|
|
162
164
|
label: P("component.catalogs", "Catalogs"),
|
|
163
165
|
icon: h,
|
|
164
|
-
badge: `${
|
|
166
|
+
badge: `${X.length}`
|
|
165
167
|
},
|
|
166
168
|
{
|
|
167
169
|
id: "docs",
|
|
168
170
|
label: P("component.docs", "Docs"),
|
|
169
|
-
icon:
|
|
171
|
+
icon: ge
|
|
170
172
|
},
|
|
171
173
|
{
|
|
172
174
|
id: "dependencies",
|
|
173
175
|
label: P("component.dependencies", "Dependencies"),
|
|
174
|
-
icon:
|
|
176
|
+
icon: ye,
|
|
175
177
|
badge: $.length > 0 ? `${$.length}` : void 0
|
|
176
178
|
},
|
|
177
179
|
{
|
|
@@ -182,22 +184,22 @@ function j() {
|
|
|
182
184
|
{
|
|
183
185
|
id: "settings",
|
|
184
186
|
label: P("common.settings", "Settings"),
|
|
185
|
-
icon:
|
|
187
|
+
icon: ve
|
|
186
188
|
}
|
|
187
189
|
];
|
|
188
|
-
return G && !
|
|
190
|
+
return G && !Y ? /* @__PURE__ */ E(k, {
|
|
189
191
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
190
192
|
children: [/* @__PURE__ */ E("button", {
|
|
191
193
|
type: "button",
|
|
192
|
-
onClick:
|
|
194
|
+
onClick: Z,
|
|
193
195
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
194
196
|
children: [/* @__PURE__ */ T(m, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
195
|
-
}), /* @__PURE__ */ T(
|
|
196
|
-
}) : K && !
|
|
197
|
+
}), /* @__PURE__ */ T(oe, { variant: "detail" })]
|
|
198
|
+
}) : K && !Y ? /* @__PURE__ */ E(k, {
|
|
197
199
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
198
200
|
children: [/* @__PURE__ */ E("button", {
|
|
199
201
|
type: "button",
|
|
200
|
-
onClick:
|
|
202
|
+
onClick: Z,
|
|
201
203
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
202
204
|
children: [/* @__PURE__ */ T(m, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
203
205
|
}), /* @__PURE__ */ T(c, {
|
|
@@ -205,7 +207,7 @@ function j() {
|
|
|
205
207
|
message: K.message,
|
|
206
208
|
onRetry: () => q()
|
|
207
209
|
})]
|
|
208
|
-
}) :
|
|
210
|
+
}) : Y ? /* @__PURE__ */ E(k, {
|
|
209
211
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
210
212
|
children: [
|
|
211
213
|
z && /* @__PURE__ */ T("div", {
|
|
@@ -214,31 +216,40 @@ function j() {
|
|
|
214
216
|
}),
|
|
215
217
|
/* @__PURE__ */ E("button", {
|
|
216
218
|
type: "button",
|
|
217
|
-
onClick:
|
|
219
|
+
onClick: Z,
|
|
218
220
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
219
221
|
children: [/* @__PURE__ */ T(m, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
220
222
|
}),
|
|
221
223
|
/* @__PURE__ */ T(s, {
|
|
222
|
-
title:
|
|
223
|
-
description:
|
|
224
|
+
title: Y.name,
|
|
225
|
+
description: Y.description || P("component.noDescription", "No description"),
|
|
224
226
|
actions: /* @__PURE__ */ E("div", {
|
|
225
227
|
className: "flex items-center gap-2 flex-wrap",
|
|
226
228
|
children: [
|
|
229
|
+
/* @__PURE__ */ T(ae, {
|
|
230
|
+
entity: "component",
|
|
231
|
+
resource: {
|
|
232
|
+
id: Y.id,
|
|
233
|
+
name: Y.name
|
|
234
|
+
},
|
|
235
|
+
label: P("component.share", "Share"),
|
|
236
|
+
variant: "button"
|
|
237
|
+
}),
|
|
227
238
|
/* @__PURE__ */ T("button", {
|
|
228
239
|
type: "button",
|
|
229
240
|
onClick: () => q(),
|
|
230
241
|
disabled: G,
|
|
231
242
|
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",
|
|
232
243
|
title: P("common.refresh", "Refresh"),
|
|
233
|
-
children: /* @__PURE__ */ T(
|
|
244
|
+
children: /* @__PURE__ */ T(_e, { className: `size-4 ${G ? "animate-spin" : ""}` })
|
|
234
245
|
}),
|
|
235
246
|
/* @__PURE__ */ T("span", {
|
|
236
247
|
className: "inline-flex items-center px-2.5 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
|
|
237
|
-
children:
|
|
248
|
+
children: Y.type
|
|
238
249
|
}),
|
|
239
250
|
/* @__PURE__ */ T("span", {
|
|
240
|
-
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${
|
|
241
|
-
children:
|
|
251
|
+
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${ze[Y.lifecycle] || "bg-bg-sunken text-text-secondary"}`,
|
|
252
|
+
children: Y.lifecycle
|
|
242
253
|
})
|
|
243
254
|
]
|
|
244
255
|
})
|
|
@@ -249,30 +260,30 @@ function j() {
|
|
|
249
260
|
children: [
|
|
250
261
|
/* @__PURE__ */ T(D, { children: /* @__PURE__ */ T(f, {
|
|
251
262
|
title: P("component.type", "Type"),
|
|
252
|
-
value:
|
|
263
|
+
value: Y.type,
|
|
253
264
|
icon: /* @__PURE__ */ T(g, { className: "size-4" })
|
|
254
265
|
}) }),
|
|
255
266
|
/* @__PURE__ */ T(D, { children: /* @__PURE__ */ T(f, {
|
|
256
267
|
title: P("component.lifecycle", "Lifecycle"),
|
|
257
|
-
value:
|
|
258
|
-
icon: /* @__PURE__ */ T(
|
|
259
|
-
variant:
|
|
268
|
+
value: Y.lifecycle,
|
|
269
|
+
icon: /* @__PURE__ */ T(v, { className: "size-4" }),
|
|
270
|
+
variant: Y.lifecycle === "ACTIVE" ? "success" : Y.lifecycle === "DEPRECATED" || Y.lifecycle === "END_OF_LIFE" ? "error" : "warning"
|
|
260
271
|
}) }),
|
|
261
272
|
/* @__PURE__ */ T(D, { children: /* @__PURE__ */ T(f, {
|
|
262
273
|
title: P("component.version", "Version"),
|
|
263
|
-
value:
|
|
274
|
+
value: Y.version || "-",
|
|
264
275
|
icon: /* @__PURE__ */ T(_, { className: "size-4" })
|
|
265
276
|
}) }),
|
|
266
277
|
/* @__PURE__ */ T(D, { children: /* @__PURE__ */ T(f, {
|
|
267
278
|
title: P("component.catalogs", "Catalogs"),
|
|
268
|
-
value:
|
|
279
|
+
value: X.length,
|
|
269
280
|
icon: /* @__PURE__ */ T(h, { className: "size-4" })
|
|
270
281
|
}) })
|
|
271
282
|
]
|
|
272
283
|
}),
|
|
273
284
|
/* @__PURE__ */ E(d, { children: [/* @__PURE__ */ E("div", {
|
|
274
285
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
275
|
-
children: [/* @__PURE__ */ T(
|
|
286
|
+
children: [/* @__PURE__ */ T(be, { className: "size-5" }), /* @__PURE__ */ T("h3", {
|
|
276
287
|
className: "font-semibold text-text-primary",
|
|
277
288
|
children: P("component.tags", "Tags")
|
|
278
289
|
})]
|
|
@@ -280,7 +291,7 @@ function j() {
|
|
|
280
291
|
className: "p-4",
|
|
281
292
|
children: /* @__PURE__ */ T(l, {
|
|
282
293
|
entityType: "VIBECONTROLS_COMPONENT",
|
|
283
|
-
entityId:
|
|
294
|
+
entityId: Y.id
|
|
284
295
|
})
|
|
285
296
|
})] }),
|
|
286
297
|
/* @__PURE__ */ T("div", {
|
|
@@ -288,11 +299,11 @@ function j() {
|
|
|
288
299
|
children: /* @__PURE__ */ T("nav", {
|
|
289
300
|
className: "flex gap-1 -mb-px overflow-x-auto pb-1",
|
|
290
301
|
"aria-label": P("component.tabsAriaLabel", "Component tabs"),
|
|
291
|
-
children:
|
|
302
|
+
children: Be.map((e) => {
|
|
292
303
|
let t = e.icon, n = F === e.id;
|
|
293
304
|
return /* @__PURE__ */ E("button", {
|
|
294
305
|
type: "button",
|
|
295
|
-
onClick: () =>
|
|
306
|
+
onClick: () => Te(e.id),
|
|
296
307
|
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"}`,
|
|
297
308
|
"aria-selected": n,
|
|
298
309
|
role: "tab",
|
|
@@ -327,11 +338,11 @@ function j() {
|
|
|
327
338
|
transition: { duration: .2 },
|
|
328
339
|
className: "space-y-6",
|
|
329
340
|
children: [
|
|
330
|
-
|
|
341
|
+
Y.description && /* @__PURE__ */ T(d, { children: /* @__PURE__ */ T("div", {
|
|
331
342
|
className: "p-4",
|
|
332
343
|
children: /* @__PURE__ */ T("p", {
|
|
333
344
|
className: "text-text-primary",
|
|
334
|
-
children:
|
|
345
|
+
children: Y.description
|
|
335
346
|
})
|
|
336
347
|
}) }),
|
|
337
348
|
/* @__PURE__ */ E(d, { children: [/* @__PURE__ */ T("div", {
|
|
@@ -350,40 +361,40 @@ function j() {
|
|
|
350
361
|
children: P("component.ownerNameLabel", "Owner")
|
|
351
362
|
}), /* @__PURE__ */ T("p", {
|
|
352
363
|
className: "font-medium text-text-primary",
|
|
353
|
-
children:
|
|
364
|
+
children: Y.ownerName || P("common.unset", "Unset")
|
|
354
365
|
})] }),
|
|
355
366
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
356
367
|
className: "text-text-secondary",
|
|
357
368
|
children: P("component.languageLabel", "Language")
|
|
358
369
|
}), /* @__PURE__ */ T("p", {
|
|
359
370
|
className: "font-medium text-text-primary",
|
|
360
|
-
children:
|
|
371
|
+
children: Y.language || P("common.unset", "Unset")
|
|
361
372
|
})] }),
|
|
362
373
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
363
374
|
className: "text-text-secondary",
|
|
364
375
|
children: P("component.frameworkLabel", "Framework")
|
|
365
376
|
}), /* @__PURE__ */ T("p", {
|
|
366
377
|
className: "font-medium text-text-primary",
|
|
367
|
-
children:
|
|
378
|
+
children: Y.framework || P("common.unset", "Unset")
|
|
368
379
|
})] }),
|
|
369
380
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
370
381
|
className: "text-text-secondary",
|
|
371
382
|
children: P("component.versionLabel", "Version")
|
|
372
383
|
}), /* @__PURE__ */ T("p", {
|
|
373
384
|
className: "font-medium text-text-primary",
|
|
374
|
-
children:
|
|
385
|
+
children: Y.version || P("common.unset", "Unset")
|
|
375
386
|
})] }),
|
|
376
|
-
|
|
387
|
+
Y.repositoryUrl && /* @__PURE__ */ E("div", {
|
|
377
388
|
className: "sm:col-span-2",
|
|
378
389
|
children: [/* @__PURE__ */ T("p", {
|
|
379
390
|
className: "text-text-secondary",
|
|
380
391
|
children: P("component.repository", "Repository")
|
|
381
392
|
}), /* @__PURE__ */ T("a", {
|
|
382
|
-
href:
|
|
393
|
+
href: Y.repositoryUrl,
|
|
383
394
|
target: "_blank",
|
|
384
395
|
rel: "noopener noreferrer",
|
|
385
396
|
className: "font-medium text-action-primary-bg hover:underline break-all",
|
|
386
|
-
children:
|
|
397
|
+
children: Y.repositoryUrl
|
|
387
398
|
})]
|
|
388
399
|
}),
|
|
389
400
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
@@ -391,26 +402,26 @@ function j() {
|
|
|
391
402
|
children: P("common.created", "Created")
|
|
392
403
|
}), /* @__PURE__ */ T("p", {
|
|
393
404
|
className: "font-medium text-text-primary",
|
|
394
|
-
children: new Date(
|
|
405
|
+
children: new Date(Y.createdAt).toLocaleDateString()
|
|
395
406
|
})] }),
|
|
396
407
|
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
|
|
397
408
|
className: "text-text-secondary",
|
|
398
409
|
children: P("common.updated", "Updated")
|
|
399
410
|
}), /* @__PURE__ */ T("p", {
|
|
400
411
|
className: "font-medium text-text-primary",
|
|
401
|
-
children: new Date(
|
|
412
|
+
children: new Date(Y.updatedAt).toLocaleDateString()
|
|
402
413
|
})] })
|
|
403
414
|
]
|
|
404
415
|
})
|
|
405
416
|
})] }),
|
|
406
|
-
|
|
417
|
+
Y.tags?.length > 0 && /* @__PURE__ */ T(d, { children: /* @__PURE__ */ E("div", {
|
|
407
418
|
className: "p-4",
|
|
408
419
|
children: [/* @__PURE__ */ T("h3", {
|
|
409
420
|
className: "font-semibold text-text-primary mb-3",
|
|
410
421
|
children: P("component.tags", "Tags")
|
|
411
422
|
}), /* @__PURE__ */ T("div", {
|
|
412
423
|
className: "flex flex-wrap gap-2",
|
|
413
|
-
children:
|
|
424
|
+
children: Y.tags.map((e) => /* @__PURE__ */ T("span", {
|
|
414
425
|
className: "px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
415
426
|
children: e
|
|
416
427
|
}, e))
|
|
@@ -438,7 +449,7 @@ function j() {
|
|
|
438
449
|
children: [/* @__PURE__ */ E("p", {
|
|
439
450
|
className: "text-sm text-text-secondary",
|
|
440
451
|
children: [
|
|
441
|
-
|
|
452
|
+
X.length,
|
|
442
453
|
" ",
|
|
443
454
|
P("component.catalogsContaining", "catalogs containing this component")
|
|
444
455
|
]
|
|
@@ -448,12 +459,12 @@ function j() {
|
|
|
448
459
|
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",
|
|
449
460
|
children: [/* @__PURE__ */ T(y, { className: "size-4" }), P("component.addToCatalog", "Add to Catalog")]
|
|
450
461
|
})]
|
|
451
|
-
}),
|
|
462
|
+
}), X.length > 0 ? /* @__PURE__ */ T(O, {
|
|
452
463
|
stagger: .04,
|
|
453
464
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
454
|
-
children:
|
|
465
|
+
children: X.map((e) => /* @__PURE__ */ T(D, { children: /* @__PURE__ */ T(de, {
|
|
455
466
|
catalog: e,
|
|
456
|
-
onOpen:
|
|
467
|
+
onOpen: Ie
|
|
457
468
|
}) }, e.id))
|
|
458
469
|
}) : /* @__PURE__ */ T(u, {
|
|
459
470
|
icon: /* @__PURE__ */ T(h, { className: "size-8 text-text-secondary" }),
|
|
@@ -482,7 +493,7 @@ function j() {
|
|
|
482
493
|
},
|
|
483
494
|
transition: { duration: .2 },
|
|
484
495
|
className: "space-y-6",
|
|
485
|
-
children: /* @__PURE__ */ T(
|
|
496
|
+
children: /* @__PURE__ */ T(ce, {
|
|
486
497
|
ownerType: "COMPONENT",
|
|
487
498
|
ownerId: M || ""
|
|
488
499
|
})
|
|
@@ -501,9 +512,9 @@ function j() {
|
|
|
501
512
|
y: -8
|
|
502
513
|
},
|
|
503
514
|
transition: { duration: .2 },
|
|
504
|
-
children: /* @__PURE__ */ T(
|
|
505
|
-
componentName:
|
|
506
|
-
componentType:
|
|
515
|
+
children: /* @__PURE__ */ T(ue, {
|
|
516
|
+
componentName: Y.name,
|
|
517
|
+
componentType: Y.type,
|
|
507
518
|
dependencies: $
|
|
508
519
|
})
|
|
509
520
|
}, "dependencies"),
|
|
@@ -522,7 +533,7 @@ function j() {
|
|
|
522
533
|
},
|
|
523
534
|
transition: { duration: .2 },
|
|
524
535
|
className: "space-y-4",
|
|
525
|
-
children: (
|
|
536
|
+
children: (Y.templates?.length ?? 0) === 0 ? /* @__PURE__ */ T(d, {
|
|
526
537
|
padding: "lg",
|
|
527
538
|
children: /* @__PURE__ */ E("div", {
|
|
528
539
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
@@ -540,7 +551,7 @@ function j() {
|
|
|
540
551
|
type: "button",
|
|
541
552
|
onClick: () => H(!0),
|
|
542
553
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
543
|
-
children: [/* @__PURE__ */ T(
|
|
554
|
+
children: [/* @__PURE__ */ T(b, { className: "size-4" }), P("component.publishAsTemplate", "Publish as Template")]
|
|
544
555
|
})
|
|
545
556
|
]
|
|
546
557
|
})
|
|
@@ -552,7 +563,7 @@ function j() {
|
|
|
552
563
|
})
|
|
553
564
|
}), /* @__PURE__ */ E("div", {
|
|
554
565
|
className: "p-4 space-y-3",
|
|
555
|
-
children: [
|
|
566
|
+
children: [Y.templates.map((e) => /* @__PURE__ */ E("div", {
|
|
556
567
|
className: "flex items-center justify-between p-3 bg-bg-sunken rounded-lg",
|
|
557
568
|
children: [/* @__PURE__ */ E("div", {
|
|
558
569
|
className: "flex items-center gap-3",
|
|
@@ -577,7 +588,7 @@ function j() {
|
|
|
577
588
|
type: "button",
|
|
578
589
|
onClick: () => H(!0),
|
|
579
590
|
className: "flex items-center gap-2 px-3 py-2 text-sm text-text-secondary border border-dashed border-border-default hover:border-border-strong rounded-lg w-full justify-center transition-colors",
|
|
580
|
-
children: [/* @__PURE__ */ T(
|
|
591
|
+
children: [/* @__PURE__ */ T(b, { className: "size-4" }), "Update template"]
|
|
581
592
|
})]
|
|
582
593
|
})] })
|
|
583
594
|
}, "template"),
|
|
@@ -624,7 +635,7 @@ function j() {
|
|
|
624
635
|
"data-testid": "component-delete-button",
|
|
625
636
|
onClick: () => L(!0),
|
|
626
637
|
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",
|
|
627
|
-
children: [/* @__PURE__ */ T(
|
|
638
|
+
children: [/* @__PURE__ */ T(xe, {
|
|
628
639
|
className: "size-4",
|
|
629
640
|
"aria-hidden": "true"
|
|
630
641
|
}), P("component.deleteComponent", "Delete Component")]
|
|
@@ -635,39 +646,39 @@ function j() {
|
|
|
635
646
|
}, "settings")
|
|
636
647
|
]
|
|
637
648
|
}),
|
|
638
|
-
/* @__PURE__ */ T(
|
|
639
|
-
isOpen:
|
|
649
|
+
/* @__PURE__ */ T(le, {
|
|
650
|
+
isOpen: Ee,
|
|
640
651
|
onClose: () => I(!1),
|
|
641
|
-
onSubmit:
|
|
652
|
+
onSubmit: Le,
|
|
642
653
|
initialData: {
|
|
643
|
-
name:
|
|
644
|
-
description:
|
|
645
|
-
type:
|
|
646
|
-
lifecycle:
|
|
647
|
-
language:
|
|
648
|
-
framework:
|
|
649
|
-
version:
|
|
650
|
-
ownerName:
|
|
651
|
-
tags:
|
|
652
|
-
repositoryUrl:
|
|
653
|
-
documentationUrl:
|
|
654
|
-
dependencies: Array.isArray(
|
|
655
|
-
sbomData:
|
|
654
|
+
name: Y.name,
|
|
655
|
+
description: Y.description || "",
|
|
656
|
+
type: Y.type,
|
|
657
|
+
lifecycle: Y.lifecycle,
|
|
658
|
+
language: Y.language || "",
|
|
659
|
+
framework: Y.framework || "",
|
|
660
|
+
version: Y.version || "",
|
|
661
|
+
ownerName: Y.ownerName || "",
|
|
662
|
+
tags: Y.tags || [],
|
|
663
|
+
repositoryUrl: Y.repositoryUrl || "",
|
|
664
|
+
documentationUrl: Y.documentationUrl || "",
|
|
665
|
+
dependencies: Array.isArray(Y.dependencies) ? Y.dependencies : null,
|
|
666
|
+
sbomData: Y.sbomData && typeof Y.sbomData == "object" ? Y.sbomData : null
|
|
656
667
|
},
|
|
657
668
|
title: P("component.editComponent", "Edit Component")
|
|
658
669
|
}),
|
|
659
670
|
/* @__PURE__ */ T(te, {
|
|
660
|
-
isOpen:
|
|
671
|
+
isOpen: De,
|
|
661
672
|
onClose: () => L(!1),
|
|
662
|
-
onConfirm:
|
|
673
|
+
onConfirm: Re,
|
|
663
674
|
title: P("component.deleteComponent", "Delete Component"),
|
|
664
|
-
message: P("component.deleteConfirmMessage", `Are you sure you want to delete "${
|
|
675
|
+
message: P("component.deleteConfirmMessage", `Are you sure you want to delete "${Y.name}"? This action cannot be undone.`),
|
|
665
676
|
confirmLabel: P("common.delete", "Delete"),
|
|
666
677
|
variant: "danger",
|
|
667
|
-
isLoading:
|
|
678
|
+
isLoading: Oe
|
|
668
679
|
}),
|
|
669
680
|
/* @__PURE__ */ T(ne, {
|
|
670
|
-
isOpen:
|
|
681
|
+
isOpen: ke,
|
|
671
682
|
onClose: () => V(!1),
|
|
672
683
|
onConfirm: () => {
|
|
673
684
|
V(!1), N("/billing/plans");
|
|
@@ -675,11 +686,11 @@ function j() {
|
|
|
675
686
|
title: "Template Quota Reached",
|
|
676
687
|
message: "You've reached the maximum number of published templates on your current plan. Upgrade your plan or purchase an add-on to publish more templates."
|
|
677
688
|
}),
|
|
678
|
-
|
|
679
|
-
componentName:
|
|
680
|
-
componentRepositoryUrl:
|
|
689
|
+
Ae && /* @__PURE__ */ T(fe, {
|
|
690
|
+
componentName: Y.name,
|
|
691
|
+
componentRepositoryUrl: Y.repositoryUrl,
|
|
681
692
|
onClose: () => H(!1),
|
|
682
|
-
onSubmit:
|
|
693
|
+
onSubmit: Q
|
|
683
694
|
}),
|
|
684
695
|
U && /* @__PURE__ */ T("div", {
|
|
685
696
|
className: "fixed inset-0 flex items-center justify-center z-50 p-4",
|
|
@@ -703,11 +714,11 @@ function j() {
|
|
|
703
714
|
type: "button",
|
|
704
715
|
onClick: () => W(!1),
|
|
705
716
|
className: "p-1.5 text-text-secondary hover:text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
|
|
706
|
-
children: /* @__PURE__ */ T(
|
|
717
|
+
children: /* @__PURE__ */ T(Se, { className: "size-4" })
|
|
707
718
|
})]
|
|
708
719
|
}), /* @__PURE__ */ T("div", {
|
|
709
720
|
className: "p-2 max-h-80 overflow-y-auto",
|
|
710
|
-
children: (
|
|
721
|
+
children: (J?.vibecontrolsCatalogs?.items ?? []).length === 0 ? /* @__PURE__ */ E("p", {
|
|
711
722
|
className: "text-sm text-text-secondary text-center py-6",
|
|
712
723
|
children: [
|
|
713
724
|
"No catalogs found.",
|
|
@@ -721,14 +732,14 @@ function j() {
|
|
|
721
732
|
children: "Create one first."
|
|
722
733
|
})
|
|
723
734
|
]
|
|
724
|
-
}) : (
|
|
725
|
-
let t =
|
|
735
|
+
}) : (J?.vibecontrolsCatalogs?.items ?? []).map((e) => {
|
|
736
|
+
let t = X.some((t) => t.id === e.id);
|
|
726
737
|
return /* @__PURE__ */ E("button", {
|
|
727
738
|
type: "button",
|
|
728
739
|
disabled: t,
|
|
729
740
|
onClick: async () => {
|
|
730
741
|
if (!(!M || t)) try {
|
|
731
|
-
await
|
|
742
|
+
await Fe({ variables: {
|
|
732
743
|
catalogId: e.id,
|
|
733
744
|
componentId: M
|
|
734
745
|
} }), W(!1), B(`Added to ${e.name}`), setTimeout(() => B(null), 3e3);
|
|
@@ -755,7 +766,7 @@ function j() {
|
|
|
755
766
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
756
767
|
children: [/* @__PURE__ */ E("button", {
|
|
757
768
|
type: "button",
|
|
758
|
-
onClick:
|
|
769
|
+
onClick: Z,
|
|
759
770
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
760
771
|
children: [/* @__PURE__ */ T(m, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
761
772
|
}), /* @__PURE__ */ T(u, {
|
|
@@ -764,7 +775,7 @@ function j() {
|
|
|
764
775
|
description: `No component with ID "${M}" exists`,
|
|
765
776
|
action: /* @__PURE__ */ T("button", {
|
|
766
777
|
type: "button",
|
|
767
|
-
onClick:
|
|
778
|
+
onClick: Z,
|
|
768
779
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
769
780
|
children: P("component.backToComponents", "Back to Components")
|
|
770
781
|
})
|