@burdenoff/microfe-vibecontrols 2026.613.1 → 2026.618.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/agents/AgentConnectionRecovery.js +100 -94
- package/dist/components/agents/AgentConnectionRecovery.js.map +1 -1
- package/dist/components/agents/AgentMaintenanceTab.js +177 -160
- package/dist/components/agents/AgentMaintenanceTab.js.map +1 -1
- package/dist/components/agents/OpenInBrowserEditorButton.js +102 -94
- package/dist/components/agents/OpenInBrowserEditorButton.js.map +1 -1
- package/dist/components/assistant/AssistantChatArea.js +1 -0
- package/dist/components/assistant/AssistantChatArea.js.map +1 -1
- package/dist/components/assistant/AssistantModeSelector.js +20 -19
- package/dist/components/assistant/AssistantModeSelector.js.map +1 -1
- package/dist/components/tunnels/TunnelCard.js +3 -3
- package/dist/components/tunnels/TunnelCard.js.map +1 -1
- package/dist/components/tunnels/TunnelPublicAccessPanel.js +36 -36
- package/dist/components/tunnels/TunnelPublicAccessPanel.js.map +1 -1
- package/dist/config/assistantUsecases.js +11 -0
- package/dist/config/assistantUsecases.js.map +1 -1
- package/dist/constants/permissions.js +38 -6
- package/dist/constants/permissions.js.map +1 -1
- package/dist/index.js +4 -3
- package/dist/pages/CatalogDetailPage.js +155 -155
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +110 -109
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +338 -338
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +104 -103
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +140 -132
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +201 -199
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +62 -61
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +568 -555
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/ai/AIBookmarksPage.js +104 -89
- package/dist/pages/ai/AIBookmarksPage.js.map +1 -1
- package/dist/pages/ai/AIPage.js +116 -107
- package/dist/pages/ai/AIPage.js.map +1 -1
- package/dist/pages/ai/AISessionDetailPage.js +46 -34
- package/dist/pages/ai/AISessionDetailPage.js.map +1 -1
- package/dist/pages/ai/AgentManagerPage.js +112 -100
- package/dist/pages/ai/AgentManagerPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +177 -153
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelsTab.js +119 -111
- package/dist/pages/tunnels/TunnelsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelDomainsTab.js +24 -24
- package/dist/pages/tunnels/tabs/TunnelDomainsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelOverviewTab.js +9 -8
- package/dist/pages/tunnels/tabs/TunnelOverviewTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelSessionsTab.js +13 -13
- package/dist/pages/tunnels/tabs/TunnelSessionsTab.js.map +1 -1
- package/dist/pages/tunnels/tabs/TunnelSettingsTab.js +19 -15
- package/dist/pages/tunnels/tabs/TunnelSettingsTab.js.map +1 -1
- package/dist/services/assistantApi.js +9 -3
- package/dist/services/assistantApi.js.map +1 -1
- package/dist/services/createSandboxAssistantTransport.js +120 -0
- package/dist/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/store/assistantStore.js +1 -1
- package/dist/store/assistantStore.js.map +1 -1
- package/package.json +5 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { useAddComponentToCatalogMutation as e, useDeleteComponentMutation as t, useGetComponentQuery as n, useListCatalogsQuery as ee, usePublishComponentAsTemplateMutation as
|
|
2
|
-
import { ConfirmDialog as
|
|
3
|
-
import { QuotaExhaustedDialog as
|
|
4
|
-
import { isQuotaExhaustedError as
|
|
5
|
-
import { useVibeNavigate as
|
|
6
|
-
import { PageHeader as
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { EntityTagPicker as
|
|
9
|
-
import { EmptyState as
|
|
10
|
-
import { Card as
|
|
11
|
-
import { StatCard as
|
|
1
|
+
import { useAddComponentToCatalogMutation as e, useDeleteComponentMutation as t, useGetComponentQuery as n, useListCatalogsQuery as ee, usePublishComponentAsTemplateMutation as te, useUpdateComponentMutation as ne } from "../generated/wspace-operations.js";
|
|
2
|
+
import { ConfirmDialog as re } from "../components/shared/ConfirmDialog.js";
|
|
3
|
+
import { QuotaExhaustedDialog as r } from "../components/shared/QuotaExhaustedDialog.js";
|
|
4
|
+
import { isQuotaExhaustedError as i, markQuotaHandledLocally as ie } from "../utils/quotaUtils.js";
|
|
5
|
+
import { useVibeNavigate as ae } from "../providers/VibeControlsProvider.js";
|
|
6
|
+
import { PageHeader as oe } from "../components/shared/PageHeader.js";
|
|
7
|
+
import { ErrorState as se } from "../components/shared/ErrorState.js";
|
|
8
|
+
import { EntityTagPicker as ce } from "../components/shared/EntityTagPicker.js";
|
|
9
|
+
import { EmptyState as a } from "../components/shared/EmptyState.js";
|
|
10
|
+
import { Card as o } from "../components/shared/Card.js";
|
|
11
|
+
import { StatCard as s } from "../components/shared/StatCard.js";
|
|
12
12
|
import "../components/shared/index.js";
|
|
13
|
-
import { VIBE_PERMISSIONS as
|
|
14
|
-
import { EntityShareButton as
|
|
13
|
+
import { VIBE_PERMISSIONS as c } from "../constants/permissions.js";
|
|
14
|
+
import { EntityShareButton as l } from "../components/sharing/EntityShareButton.js";
|
|
15
15
|
import "../components/sharing/index.js";
|
|
16
|
-
import { PageSkeleton as
|
|
17
|
-
import { useQueryBackedTab as
|
|
18
|
-
import { DocsTabPanel as
|
|
16
|
+
import { PageSkeleton as u } from "../components/shared/PageSkeleton.js";
|
|
17
|
+
import { useQueryBackedTab as d } from "../hooks/useQueryBackedTab.js";
|
|
18
|
+
import { DocsTabPanel as le } from "../components/docs/DocsTabPanel.js";
|
|
19
19
|
import "../components/docs/index.js";
|
|
20
|
-
import { ScorecardPanel as
|
|
20
|
+
import { ScorecardPanel as ue } from "../components/scorecard/ScorecardPanel.js";
|
|
21
21
|
import "../components/scorecard/index.js";
|
|
22
|
-
import { ComponentForm as
|
|
23
|
-
import { DependencyGraphTab as
|
|
22
|
+
import { ComponentForm as de } from "../components/idp-components/ComponentForm.js";
|
|
23
|
+
import { DependencyGraphTab as fe } from "../components/idp-components/DependencyGraphTab.js";
|
|
24
24
|
import "../components/idp-components/index.js";
|
|
25
|
-
import { CatalogCard as
|
|
25
|
+
import { CatalogCard as pe } from "../components/catalog/CatalogCard.js";
|
|
26
26
|
import "../components/catalog/index.js";
|
|
27
|
-
import { PublishTemplateForm as
|
|
27
|
+
import { PublishTemplateForm as me } from "../components/templates/PublishTemplateForm.js";
|
|
28
28
|
import "../components/templates/index.js";
|
|
29
|
-
import { useCallback as
|
|
30
|
-
import { useI18n as
|
|
31
|
-
import { ArrowLeft as
|
|
32
|
-
import { useParams as
|
|
33
|
-
import { usePermissions as
|
|
34
|
-
import { AnimatePresence as
|
|
35
|
-
import { jsx as
|
|
36
|
-
import { MotionItem as
|
|
29
|
+
import { useCallback as he, useMemo as ge, useState as f } from "react";
|
|
30
|
+
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
31
|
+
import { ArrowLeft as p, BarChart3 as ve, BookOpen as m, Box as h, FileCode as g, FileText as ye, Layers as be, Plus as _, RefreshCw as xe, Settings as Se, Share2 as Ce, Tag as we, Trash2 as Te, Upload as v, X as Ee } from "lucide-react";
|
|
32
|
+
import { useParams as De } from "react-router-dom";
|
|
33
|
+
import { usePermissions as Oe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
34
|
+
import { AnimatePresence as ke, motion as y } from "framer-motion";
|
|
35
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
36
|
+
import { MotionItem as S, MotionList as C, MotionPage as w } from "@burdenoff/fe-libs/shared/motion";
|
|
37
37
|
//#region src/pages/ComponentDetailPage.tsx
|
|
38
|
-
var
|
|
38
|
+
var Ae = [
|
|
39
39
|
"overview",
|
|
40
40
|
"catalogs",
|
|
41
41
|
"scorecard",
|
|
@@ -44,22 +44,22 @@ var j = [
|
|
|
44
44
|
"template",
|
|
45
45
|
"settings"
|
|
46
46
|
];
|
|
47
|
-
function
|
|
48
|
-
let { t:
|
|
49
|
-
let n =
|
|
47
|
+
function T() {
|
|
48
|
+
let { t: T } = _e(), { id: E } = De(), D = ae(), { hasPermission: O, isLoading: k } = Oe(), A = O(c.COMPONENT_READ), j = O(c.COMPONENT_UPDATE), je = O(c.COMPONENT_DELETE), Me = O(c.CATALOG_READ), Ne = O(c.CATALOG_UPDATE), M = Me && Ne, N = O(c.TEMPLATE_CREATE), P = he((e, t) => {
|
|
49
|
+
let n = T(e);
|
|
50
50
|
return n === e ? t : n;
|
|
51
|
-
}, [
|
|
52
|
-
variables: { id:
|
|
53
|
-
skip: !
|
|
51
|
+
}, [T]), [F, Pe] = d(Ae, "overview"), [Fe, I] = f(!1), [Ie, L] = f(!1), [Le, R] = f(!1), [z, B] = f(null), [Re, V] = f(!1), [ze, H] = f(!1), [U, W] = f(!1), { data: Be, loading: G, error: K, refetch: q } = n({
|
|
52
|
+
variables: { id: E || "" },
|
|
53
|
+
skip: !E || k || !A,
|
|
54
54
|
fetchPolicy: "cache-and-network"
|
|
55
|
-
}), [
|
|
55
|
+
}), [Ve] = ne({ refetchQueries: ["GetComponent"] }), [He] = t({ refetchQueries: ["ListComponents"] }), [Ue] = te({ refetchQueries: ["GetComponent"] }), [We] = e({ refetchQueries: ["GetComponent"] }), { data: J } = ee({
|
|
56
56
|
variables: { pagination: {
|
|
57
57
|
limit: 100,
|
|
58
58
|
offset: 0
|
|
59
59
|
} },
|
|
60
|
-
skip: !
|
|
60
|
+
skip: !U || !M,
|
|
61
61
|
fetchPolicy: "cache-and-network"
|
|
62
|
-
}),
|
|
62
|
+
}), Y = Be?.vibecontrolsComponent ?? null, X = ge(() => (Y?.catalogs ?? []).map((e) => {
|
|
63
63
|
let t = e.catalog || {};
|
|
64
64
|
return {
|
|
65
65
|
id: t.id,
|
|
@@ -72,34 +72,34 @@ function M() {
|
|
|
72
72
|
createdAt: t.createdAt,
|
|
73
73
|
updatedAt: t.updatedAt
|
|
74
74
|
};
|
|
75
|
-
}), [
|
|
76
|
-
if (
|
|
75
|
+
}), [Y?.catalogs]);
|
|
76
|
+
if (k) return /* @__PURE__ */ b("div", {
|
|
77
77
|
className: "flex items-center justify-center min-h-[400px]",
|
|
78
|
-
children: /* @__PURE__ */
|
|
78
|
+
children: /* @__PURE__ */ b("p", {
|
|
79
79
|
className: "text-text-secondary",
|
|
80
80
|
children: "Loading permissions…"
|
|
81
81
|
})
|
|
82
82
|
});
|
|
83
|
-
if (!
|
|
83
|
+
if (!A) return /* @__PURE__ */ b("div", {
|
|
84
84
|
className: "flex items-center justify-center min-h-[400px]",
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ x("div", {
|
|
86
86
|
className: "text-center space-y-2",
|
|
87
|
-
children: [/* @__PURE__ */
|
|
87
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
88
88
|
className: "text-lg font-semibold text-foreground",
|
|
89
89
|
children: "Access Denied"
|
|
90
|
-
}), /* @__PURE__ */
|
|
90
|
+
}), /* @__PURE__ */ b("p", {
|
|
91
91
|
className: "text-sm text-text-secondary",
|
|
92
92
|
children: "You don't have permission to access this page."
|
|
93
93
|
})]
|
|
94
94
|
})
|
|
95
95
|
});
|
|
96
|
-
let
|
|
97
|
-
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
id:
|
|
96
|
+
let Z = () => {
|
|
97
|
+
D("/components");
|
|
98
|
+
}, Ge = (e) => {
|
|
99
|
+
D(`/catalogs/${e.id}`);
|
|
100
|
+
}, Q = async (e) => {
|
|
101
|
+
!E || !j || (await Ve({ variables: {
|
|
102
|
+
id: E,
|
|
103
103
|
input: {
|
|
104
104
|
name: e.name,
|
|
105
105
|
description: e.description || void 0,
|
|
@@ -115,20 +115,20 @@ function M() {
|
|
|
115
115
|
dependencies: e.dependencies ?? void 0,
|
|
116
116
|
sbomData: e.sbomData ?? void 0
|
|
117
117
|
}
|
|
118
|
-
} }),
|
|
119
|
-
},
|
|
120
|
-
if (
|
|
121
|
-
|
|
118
|
+
} }), B(P("component.updatedSuccess", "Component updated successfully")), setTimeout(() => B(null), 3e3));
|
|
119
|
+
}, Ke = async () => {
|
|
120
|
+
if (E) {
|
|
121
|
+
R(!0);
|
|
122
122
|
try {
|
|
123
|
-
await
|
|
123
|
+
await He({ variables: { id: E } }), L(!1), D("/components");
|
|
124
124
|
} finally {
|
|
125
|
-
|
|
125
|
+
R(!1);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
},
|
|
129
|
-
if (N) try {
|
|
130
|
-
let t = await
|
|
131
|
-
componentId:
|
|
128
|
+
}, qe = async (e) => {
|
|
129
|
+
if (!(!E || !N)) try {
|
|
130
|
+
let t = await Ue({ variables: {
|
|
131
|
+
componentId: E,
|
|
132
132
|
input: {
|
|
133
133
|
name: e.name,
|
|
134
134
|
description: e.description || void 0,
|
|
@@ -139,186 +139,186 @@ function M() {
|
|
|
139
139
|
sourceRepositoryUrl: e.sourceRepositoryUrl
|
|
140
140
|
}
|
|
141
141
|
} });
|
|
142
|
-
if (t.error &&
|
|
143
|
-
|
|
142
|
+
if (t.error && i(t.error)) {
|
|
143
|
+
H(!1), V(!0);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
|
|
146
|
+
H(!1), B(P("component.publishedAsTemplate", "Published as template successfully")), setTimeout(() => B(null), 3e3);
|
|
147
147
|
} catch (e) {
|
|
148
|
-
if (
|
|
149
|
-
|
|
148
|
+
if (i(e)) {
|
|
149
|
+
H(!1), ie(), V(!0);
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
152
152
|
throw e;
|
|
153
153
|
}
|
|
154
|
-
},
|
|
154
|
+
}, Je = {
|
|
155
155
|
EXPERIMENTAL: "bg-status-warning-bg text-status-warning-text",
|
|
156
156
|
ACTIVE: "bg-status-success-bg text-status-success-text",
|
|
157
157
|
DEPRECATED: "bg-status-error-bg text-status-error-text",
|
|
158
158
|
END_OF_LIFE: "bg-status-error-bg text-status-error-text"
|
|
159
|
-
}, $ = Array.isArray(
|
|
159
|
+
}, $ = Array.isArray(Y?.dependencies) ? Y.dependencies : [], Ye = [
|
|
160
160
|
{
|
|
161
161
|
id: "overview",
|
|
162
|
-
label:
|
|
163
|
-
icon:
|
|
162
|
+
label: P("nav.overview", "Overview"),
|
|
163
|
+
icon: h
|
|
164
164
|
},
|
|
165
165
|
{
|
|
166
166
|
id: "catalogs",
|
|
167
|
-
label:
|
|
168
|
-
icon:
|
|
169
|
-
badge: `${
|
|
167
|
+
label: P("component.catalogs", "Catalogs"),
|
|
168
|
+
icon: m,
|
|
169
|
+
badge: `${X.length}`
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
id: "scorecard",
|
|
173
|
-
label:
|
|
174
|
-
icon:
|
|
173
|
+
label: P("component.scorecard", "Scorecard"),
|
|
174
|
+
icon: ve
|
|
175
175
|
},
|
|
176
176
|
{
|
|
177
177
|
id: "docs",
|
|
178
|
-
label:
|
|
179
|
-
icon:
|
|
178
|
+
label: P("component.docs", "Docs"),
|
|
179
|
+
icon: ye
|
|
180
180
|
},
|
|
181
181
|
{
|
|
182
182
|
id: "dependencies",
|
|
183
|
-
label:
|
|
184
|
-
icon:
|
|
183
|
+
label: P("component.dependencies", "Dependencies"),
|
|
184
|
+
icon: Ce,
|
|
185
185
|
badge: $.length > 0 ? `${$.length}` : void 0
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
id: "template",
|
|
189
|
-
label:
|
|
190
|
-
icon:
|
|
189
|
+
label: P("component.template", "Template"),
|
|
190
|
+
icon: g
|
|
191
191
|
},
|
|
192
192
|
{
|
|
193
193
|
id: "settings",
|
|
194
|
-
label:
|
|
195
|
-
icon:
|
|
194
|
+
label: P("common.settings", "Settings"),
|
|
195
|
+
icon: Se
|
|
196
196
|
}
|
|
197
197
|
];
|
|
198
|
-
return
|
|
198
|
+
return G && !Y ? /* @__PURE__ */ x(w, {
|
|
199
199
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
children: [/* @__PURE__ */ x("button", {
|
|
201
201
|
type: "button",
|
|
202
|
-
onClick:
|
|
202
|
+
onClick: Z,
|
|
203
203
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
205
|
-
}), /* @__PURE__ */
|
|
206
|
-
}) :
|
|
204
|
+
children: [/* @__PURE__ */ b(p, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
205
|
+
}), /* @__PURE__ */ b(u, { variant: "detail" })]
|
|
206
|
+
}) : K && !Y ? /* @__PURE__ */ x(w, {
|
|
207
207
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
208
|
-
children: [/* @__PURE__ */
|
|
208
|
+
children: [/* @__PURE__ */ x("button", {
|
|
209
209
|
type: "button",
|
|
210
|
-
onClick:
|
|
210
|
+
onClick: Z,
|
|
211
211
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
212
|
-
children: [/* @__PURE__ */
|
|
213
|
-
}), /* @__PURE__ */
|
|
214
|
-
title:
|
|
215
|
-
message:
|
|
216
|
-
onRetry: () =>
|
|
212
|
+
children: [/* @__PURE__ */ b(p, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
213
|
+
}), /* @__PURE__ */ b(se, {
|
|
214
|
+
title: P("component.failedLoad", "Failed to load component"),
|
|
215
|
+
message: K.message,
|
|
216
|
+
onRetry: () => q()
|
|
217
217
|
})]
|
|
218
|
-
}) :
|
|
218
|
+
}) : Y ? /* @__PURE__ */ x(w, {
|
|
219
219
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
220
220
|
children: [
|
|
221
|
-
|
|
221
|
+
z && /* @__PURE__ */ b("div", {
|
|
222
222
|
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",
|
|
223
|
-
children:
|
|
223
|
+
children: z
|
|
224
224
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ x("button", {
|
|
226
226
|
type: "button",
|
|
227
|
-
onClick:
|
|
227
|
+
onClick: Z,
|
|
228
228
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
229
|
+
children: [/* @__PURE__ */ b(p, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
230
230
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
title:
|
|
233
|
-
description:
|
|
234
|
-
actions: /* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ b(oe, {
|
|
232
|
+
title: Y.name,
|
|
233
|
+
description: Y.description || P("component.noDescription", "No description"),
|
|
234
|
+
actions: /* @__PURE__ */ x("div", {
|
|
235
235
|
className: "flex items-center gap-2 flex-wrap",
|
|
236
236
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ b(l, {
|
|
238
238
|
entity: "component",
|
|
239
239
|
resource: {
|
|
240
|
-
id:
|
|
241
|
-
name:
|
|
240
|
+
id: Y.id,
|
|
241
|
+
name: Y.name
|
|
242
242
|
},
|
|
243
|
-
label:
|
|
243
|
+
label: P("component.share", "Share"),
|
|
244
244
|
variant: "button"
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ b("button", {
|
|
247
247
|
type: "button",
|
|
248
|
-
onClick: () =>
|
|
249
|
-
disabled:
|
|
248
|
+
onClick: () => q(),
|
|
249
|
+
disabled: G,
|
|
250
250
|
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",
|
|
251
|
-
title:
|
|
252
|
-
children: /* @__PURE__ */
|
|
251
|
+
title: P("common.refresh", "Refresh"),
|
|
252
|
+
children: /* @__PURE__ */ b(xe, { className: `size-4 ${G ? "animate-spin" : ""}` })
|
|
253
253
|
}),
|
|
254
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ b("span", {
|
|
255
255
|
className: "inline-flex items-center px-2.5 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
|
|
256
|
-
children:
|
|
256
|
+
children: Y.type
|
|
257
257
|
}),
|
|
258
|
-
/* @__PURE__ */
|
|
259
|
-
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${
|
|
260
|
-
children:
|
|
258
|
+
/* @__PURE__ */ b("span", {
|
|
259
|
+
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${Je[Y.lifecycle] || "bg-bg-sunken text-text-secondary"}`,
|
|
260
|
+
children: Y.lifecycle
|
|
261
261
|
})
|
|
262
262
|
]
|
|
263
263
|
})
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ x(C, {
|
|
266
266
|
stagger: .04,
|
|
267
267
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4",
|
|
268
268
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
title:
|
|
271
|
-
value:
|
|
272
|
-
icon: /* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(s, {
|
|
270
|
+
title: P("component.type", "Type"),
|
|
271
|
+
value: Y.type,
|
|
272
|
+
icon: /* @__PURE__ */ b(h, { className: "size-4" })
|
|
273
273
|
}) }),
|
|
274
|
-
/* @__PURE__ */
|
|
275
|
-
title:
|
|
276
|
-
value:
|
|
277
|
-
icon: /* @__PURE__ */
|
|
278
|
-
variant:
|
|
274
|
+
/* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(s, {
|
|
275
|
+
title: P("component.lifecycle", "Lifecycle"),
|
|
276
|
+
value: Y.lifecycle,
|
|
277
|
+
icon: /* @__PURE__ */ b(be, { className: "size-4" }),
|
|
278
|
+
variant: Y.lifecycle === "ACTIVE" ? "success" : Y.lifecycle === "DEPRECATED" || Y.lifecycle === "END_OF_LIFE" ? "error" : "warning"
|
|
279
279
|
}) }),
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
title:
|
|
282
|
-
value:
|
|
283
|
-
icon: /* @__PURE__ */
|
|
280
|
+
/* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(s, {
|
|
281
|
+
title: P("component.version", "Version"),
|
|
282
|
+
value: Y.version || "-",
|
|
283
|
+
icon: /* @__PURE__ */ b(g, { className: "size-4" })
|
|
284
284
|
}) }),
|
|
285
|
-
/* @__PURE__ */
|
|
286
|
-
title:
|
|
287
|
-
value:
|
|
288
|
-
icon: /* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(s, {
|
|
286
|
+
title: P("component.catalogs", "Catalogs"),
|
|
287
|
+
value: X.length,
|
|
288
|
+
icon: /* @__PURE__ */ b(m, { className: "size-4" })
|
|
289
289
|
}) })
|
|
290
290
|
]
|
|
291
291
|
}),
|
|
292
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ x("div", {
|
|
293
293
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
294
|
+
children: [/* @__PURE__ */ b(we, { className: "size-5" }), /* @__PURE__ */ b("h3", {
|
|
295
295
|
className: "font-semibold text-text-primary",
|
|
296
|
-
children:
|
|
296
|
+
children: P("component.tags", "Tags")
|
|
297
297
|
})]
|
|
298
|
-
}), /* @__PURE__ */
|
|
298
|
+
}), /* @__PURE__ */ b("div", {
|
|
299
299
|
className: "p-4",
|
|
300
|
-
children: /* @__PURE__ */
|
|
300
|
+
children: /* @__PURE__ */ b(ce, {
|
|
301
301
|
entityType: "VIBECONTROLS_COMPONENT",
|
|
302
|
-
entityId:
|
|
302
|
+
entityId: Y.id
|
|
303
303
|
})
|
|
304
304
|
})] }),
|
|
305
|
-
/* @__PURE__ */
|
|
305
|
+
/* @__PURE__ */ b("div", {
|
|
306
306
|
className: "border-b border-border-default",
|
|
307
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ b("nav", {
|
|
308
308
|
className: "flex gap-1 -mb-px overflow-x-auto pb-1",
|
|
309
|
-
"aria-label":
|
|
310
|
-
children:
|
|
311
|
-
let t = e.icon, n =
|
|
312
|
-
return /* @__PURE__ */
|
|
309
|
+
"aria-label": P("component.tabsAriaLabel", "Component tabs"),
|
|
310
|
+
children: Ye.map((e) => {
|
|
311
|
+
let t = e.icon, n = F === e.id;
|
|
312
|
+
return /* @__PURE__ */ x("button", {
|
|
313
313
|
type: "button",
|
|
314
|
-
onClick: () =>
|
|
314
|
+
onClick: () => Pe(e.id),
|
|
315
315
|
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"}`,
|
|
316
316
|
"aria-selected": n,
|
|
317
317
|
role: "tab",
|
|
318
318
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
319
|
+
/* @__PURE__ */ b(t, { className: "size-4" }),
|
|
320
320
|
e.label,
|
|
321
|
-
e.badge && /* @__PURE__ */
|
|
321
|
+
e.badge && /* @__PURE__ */ b("span", {
|
|
322
322
|
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"}`,
|
|
323
323
|
children: e.badge
|
|
324
324
|
})
|
|
@@ -327,10 +327,10 @@ function M() {
|
|
|
327
327
|
})
|
|
328
328
|
})
|
|
329
329
|
}),
|
|
330
|
-
/* @__PURE__ */
|
|
330
|
+
/* @__PURE__ */ x(ke, {
|
|
331
331
|
mode: "wait",
|
|
332
332
|
children: [
|
|
333
|
-
|
|
333
|
+
F === "overview" && /* @__PURE__ */ x(y.div, {
|
|
334
334
|
initial: {
|
|
335
335
|
opacity: 0,
|
|
336
336
|
y: 8
|
|
@@ -346,90 +346,90 @@ function M() {
|
|
|
346
346
|
transition: { duration: .2 },
|
|
347
347
|
className: "space-y-6",
|
|
348
348
|
children: [
|
|
349
|
-
|
|
349
|
+
Y.description && /* @__PURE__ */ b(o, { children: /* @__PURE__ */ b("div", {
|
|
350
350
|
className: "p-4",
|
|
351
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ b("p", {
|
|
352
352
|
className: "text-text-primary",
|
|
353
|
-
children:
|
|
353
|
+
children: Y.description
|
|
354
354
|
})
|
|
355
355
|
}) }),
|
|
356
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ x(o, { children: [/* @__PURE__ */ b("div", {
|
|
357
357
|
className: "p-4 border-b border-border-default",
|
|
358
|
-
children: /* @__PURE__ */
|
|
358
|
+
children: /* @__PURE__ */ b("h3", {
|
|
359
359
|
className: "font-semibold text-text-primary",
|
|
360
|
-
children:
|
|
360
|
+
children: P("component.metadata", "Metadata")
|
|
361
361
|
})
|
|
362
|
-
}), /* @__PURE__ */
|
|
362
|
+
}), /* @__PURE__ */ b("div", {
|
|
363
363
|
className: "p-4",
|
|
364
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ x("div", {
|
|
365
365
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
|
|
366
366
|
children: [
|
|
367
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
368
368
|
className: "text-text-secondary",
|
|
369
|
-
children:
|
|
370
|
-
}), /* @__PURE__ */
|
|
369
|
+
children: P("component.ownerNameLabel", "Owner")
|
|
370
|
+
}), /* @__PURE__ */ b("p", {
|
|
371
371
|
className: "font-medium text-text-primary",
|
|
372
|
-
children:
|
|
372
|
+
children: Y.ownerName || P("common.unset", "Unset")
|
|
373
373
|
})] }),
|
|
374
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
375
375
|
className: "text-text-secondary",
|
|
376
|
-
children:
|
|
377
|
-
}), /* @__PURE__ */
|
|
376
|
+
children: P("component.languageLabel", "Language")
|
|
377
|
+
}), /* @__PURE__ */ b("p", {
|
|
378
378
|
className: "font-medium text-text-primary",
|
|
379
|
-
children:
|
|
379
|
+
children: Y.language || P("common.unset", "Unset")
|
|
380
380
|
})] }),
|
|
381
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
382
382
|
className: "text-text-secondary",
|
|
383
|
-
children:
|
|
384
|
-
}), /* @__PURE__ */
|
|
383
|
+
children: P("component.frameworkLabel", "Framework")
|
|
384
|
+
}), /* @__PURE__ */ b("p", {
|
|
385
385
|
className: "font-medium text-text-primary",
|
|
386
|
-
children:
|
|
386
|
+
children: Y.framework || P("common.unset", "Unset")
|
|
387
387
|
})] }),
|
|
388
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
389
389
|
className: "text-text-secondary",
|
|
390
|
-
children:
|
|
391
|
-
}), /* @__PURE__ */
|
|
390
|
+
children: P("component.versionLabel", "Version")
|
|
391
|
+
}), /* @__PURE__ */ b("p", {
|
|
392
392
|
className: "font-medium text-text-primary",
|
|
393
|
-
children:
|
|
393
|
+
children: Y.version || P("common.unset", "Unset")
|
|
394
394
|
})] }),
|
|
395
|
-
|
|
395
|
+
Y.repositoryUrl && /* @__PURE__ */ x("div", {
|
|
396
396
|
className: "sm:col-span-2",
|
|
397
|
-
children: [/* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ b("p", {
|
|
398
398
|
className: "text-text-secondary",
|
|
399
|
-
children:
|
|
400
|
-
}), /* @__PURE__ */
|
|
401
|
-
href:
|
|
399
|
+
children: P("component.repository", "Repository")
|
|
400
|
+
}), /* @__PURE__ */ b("a", {
|
|
401
|
+
href: Y.repositoryUrl,
|
|
402
402
|
target: "_blank",
|
|
403
403
|
rel: "noopener noreferrer",
|
|
404
404
|
className: "font-medium text-action-primary-bg hover:underline break-all",
|
|
405
|
-
children:
|
|
405
|
+
children: Y.repositoryUrl
|
|
406
406
|
})]
|
|
407
407
|
}),
|
|
408
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
409
409
|
className: "text-text-secondary",
|
|
410
|
-
children:
|
|
411
|
-
}), /* @__PURE__ */
|
|
410
|
+
children: P("common.created", "Created")
|
|
411
|
+
}), /* @__PURE__ */ b("p", {
|
|
412
412
|
className: "font-medium text-text-primary",
|
|
413
|
-
children: new Date(
|
|
413
|
+
children: new Date(Y.createdAt).toLocaleDateString()
|
|
414
414
|
})] }),
|
|
415
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
416
416
|
className: "text-text-secondary",
|
|
417
|
-
children:
|
|
418
|
-
}), /* @__PURE__ */
|
|
417
|
+
children: P("common.updated", "Updated")
|
|
418
|
+
}), /* @__PURE__ */ b("p", {
|
|
419
419
|
className: "font-medium text-text-primary",
|
|
420
|
-
children: new Date(
|
|
420
|
+
children: new Date(Y.updatedAt).toLocaleDateString()
|
|
421
421
|
})] })
|
|
422
422
|
]
|
|
423
423
|
})
|
|
424
424
|
})] }),
|
|
425
|
-
|
|
425
|
+
Y.tags?.length > 0 && /* @__PURE__ */ b(o, { children: /* @__PURE__ */ x("div", {
|
|
426
426
|
className: "p-4",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
428
428
|
className: "font-semibold text-text-primary mb-3",
|
|
429
|
-
children:
|
|
430
|
-
}), /* @__PURE__ */
|
|
429
|
+
children: P("component.tags", "Tags")
|
|
430
|
+
}), /* @__PURE__ */ b("div", {
|
|
431
431
|
className: "flex flex-wrap gap-2",
|
|
432
|
-
children:
|
|
432
|
+
children: Y.tags.map((e) => /* @__PURE__ */ b("span", {
|
|
433
433
|
className: "px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
434
434
|
children: e
|
|
435
435
|
}, e))
|
|
@@ -437,7 +437,7 @@ function M() {
|
|
|
437
437
|
}) })
|
|
438
438
|
]
|
|
439
439
|
}, "overview"),
|
|
440
|
-
|
|
440
|
+
F === "catalogs" && /* @__PURE__ */ x(y.div, {
|
|
441
441
|
initial: {
|
|
442
442
|
opacity: 0,
|
|
443
443
|
y: 8
|
|
@@ -452,41 +452,41 @@ function M() {
|
|
|
452
452
|
},
|
|
453
453
|
transition: { duration: .2 },
|
|
454
454
|
className: "space-y-4",
|
|
455
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ x("div", {
|
|
456
456
|
className: "flex items-center justify-between",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
457
|
+
children: [/* @__PURE__ */ x("p", {
|
|
458
458
|
className: "text-sm text-text-secondary",
|
|
459
459
|
children: [
|
|
460
|
-
|
|
460
|
+
X.length,
|
|
461
461
|
" ",
|
|
462
|
-
|
|
462
|
+
P("component.catalogsContaining", "catalogs containing this component")
|
|
463
463
|
]
|
|
464
|
-
}), /* @__PURE__ */
|
|
464
|
+
}), M && /* @__PURE__ */ x("button", {
|
|
465
465
|
type: "button",
|
|
466
|
-
onClick: () =>
|
|
466
|
+
onClick: () => W(!0),
|
|
467
467
|
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",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), P("component.addToCatalog", "Add to Catalog")]
|
|
469
469
|
})]
|
|
470
|
-
}),
|
|
470
|
+
}), X.length > 0 ? /* @__PURE__ */ b(C, {
|
|
471
471
|
stagger: .04,
|
|
472
472
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
473
|
-
children:
|
|
473
|
+
children: X.map((e) => /* @__PURE__ */ b(S, { children: /* @__PURE__ */ b(pe, {
|
|
474
474
|
catalog: e,
|
|
475
|
-
onOpen:
|
|
475
|
+
onOpen: Ge
|
|
476
476
|
}) }, e.id))
|
|
477
|
-
}) : /* @__PURE__ */
|
|
478
|
-
icon: /* @__PURE__ */
|
|
479
|
-
title:
|
|
480
|
-
description:
|
|
481
|
-
action: /* @__PURE__ */
|
|
477
|
+
}) : /* @__PURE__ */ b(a, {
|
|
478
|
+
icon: /* @__PURE__ */ b(m, { className: "size-8 text-text-secondary" }),
|
|
479
|
+
title: P("component.noCatalogs", "Not in any catalogs"),
|
|
480
|
+
description: P("component.noCatalogsDescription", "This component has not been added to any catalogs yet"),
|
|
481
|
+
action: M ? /* @__PURE__ */ x("button", {
|
|
482
482
|
type: "button",
|
|
483
|
-
onClick: () =>
|
|
483
|
+
onClick: () => W(!0),
|
|
484
484
|
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",
|
|
485
|
-
children: [/* @__PURE__ */
|
|
486
|
-
})
|
|
485
|
+
children: [/* @__PURE__ */ b(_, { className: "size-4" }), P("component.addToCatalog", "Add to Catalog")]
|
|
486
|
+
}) : void 0
|
|
487
487
|
})]
|
|
488
488
|
}, "catalogs"),
|
|
489
|
-
|
|
489
|
+
F === "scorecard" && /* @__PURE__ */ b(y.div, {
|
|
490
490
|
initial: {
|
|
491
491
|
opacity: 0,
|
|
492
492
|
y: 8
|
|
@@ -501,12 +501,12 @@ function M() {
|
|
|
501
501
|
},
|
|
502
502
|
transition: { duration: .2 },
|
|
503
503
|
className: "space-y-6",
|
|
504
|
-
children: /* @__PURE__ */
|
|
504
|
+
children: /* @__PURE__ */ b(ue, {
|
|
505
505
|
ownerType: "COMPONENT",
|
|
506
|
-
ownerId:
|
|
506
|
+
ownerId: E || ""
|
|
507
507
|
})
|
|
508
508
|
}, "scorecard"),
|
|
509
|
-
|
|
509
|
+
F === "docs" && /* @__PURE__ */ b(y.div, {
|
|
510
510
|
initial: {
|
|
511
511
|
opacity: 0,
|
|
512
512
|
y: 8
|
|
@@ -521,12 +521,12 @@ function M() {
|
|
|
521
521
|
},
|
|
522
522
|
transition: { duration: .2 },
|
|
523
523
|
className: "space-y-6",
|
|
524
|
-
children: /* @__PURE__ */
|
|
524
|
+
children: /* @__PURE__ */ b(le, {
|
|
525
525
|
ownerType: "COMPONENT",
|
|
526
|
-
ownerId:
|
|
526
|
+
ownerId: E || ""
|
|
527
527
|
})
|
|
528
528
|
}, "docs"),
|
|
529
|
-
|
|
529
|
+
F === "dependencies" && /* @__PURE__ */ b(y.div, {
|
|
530
530
|
initial: {
|
|
531
531
|
opacity: 0,
|
|
532
532
|
y: 8
|
|
@@ -540,13 +540,13 @@ function M() {
|
|
|
540
540
|
y: -8
|
|
541
541
|
},
|
|
542
542
|
transition: { duration: .2 },
|
|
543
|
-
children: /* @__PURE__ */
|
|
544
|
-
componentName:
|
|
545
|
-
componentType:
|
|
543
|
+
children: /* @__PURE__ */ b(fe, {
|
|
544
|
+
componentName: Y.name,
|
|
545
|
+
componentType: Y.type,
|
|
546
546
|
dependencies: $
|
|
547
547
|
})
|
|
548
548
|
}, "dependencies"),
|
|
549
|
-
|
|
549
|
+
F === "template" && /* @__PURE__ */ b(y.div, {
|
|
550
550
|
initial: {
|
|
551
551
|
opacity: 0,
|
|
552
552
|
y: 8
|
|
@@ -561,44 +561,44 @@ function M() {
|
|
|
561
561
|
},
|
|
562
562
|
transition: { duration: .2 },
|
|
563
563
|
className: "space-y-4",
|
|
564
|
-
children: (
|
|
564
|
+
children: (Y.templates?.length ?? 0) === 0 ? /* @__PURE__ */ b(o, {
|
|
565
565
|
padding: "lg",
|
|
566
|
-
children: /* @__PURE__ */
|
|
566
|
+
children: /* @__PURE__ */ x("div", {
|
|
567
567
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
568
568
|
children: [
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
569
|
+
/* @__PURE__ */ b(g, { className: "size-12 text-text-muted mb-4" }),
|
|
570
|
+
/* @__PURE__ */ b("h3", {
|
|
571
571
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
572
|
-
children:
|
|
572
|
+
children: P("component.template", "Publish as Template")
|
|
573
573
|
}),
|
|
574
|
-
/* @__PURE__ */
|
|
574
|
+
/* @__PURE__ */ b("p", {
|
|
575
575
|
className: "text-sm text-text-secondary max-w-md mb-6",
|
|
576
|
-
children:
|
|
576
|
+
children: P("component.publishDescription", "Turn this component into a reusable template. Others can clone it and fill in configuration variables to create new components.")
|
|
577
577
|
}),
|
|
578
|
-
/* @__PURE__ */
|
|
578
|
+
N && /* @__PURE__ */ x("button", {
|
|
579
579
|
type: "button",
|
|
580
|
-
onClick: () =>
|
|
580
|
+
onClick: () => H(!0),
|
|
581
581
|
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",
|
|
582
|
-
children: [/* @__PURE__ */
|
|
582
|
+
children: [/* @__PURE__ */ b(v, { className: "size-4" }), P("component.publishAsTemplate", "Publish as Template")]
|
|
583
583
|
})
|
|
584
584
|
]
|
|
585
585
|
})
|
|
586
|
-
}) : /* @__PURE__ */
|
|
586
|
+
}) : /* @__PURE__ */ x(o, { children: [/* @__PURE__ */ b("div", {
|
|
587
587
|
className: "p-4 border-b border-border-default",
|
|
588
|
-
children: /* @__PURE__ */
|
|
588
|
+
children: /* @__PURE__ */ b("h3", {
|
|
589
589
|
className: "font-semibold text-text-primary",
|
|
590
590
|
children: "Published Templates"
|
|
591
591
|
})
|
|
592
|
-
}), /* @__PURE__ */
|
|
592
|
+
}), /* @__PURE__ */ x("div", {
|
|
593
593
|
className: "p-4 space-y-3",
|
|
594
|
-
children: [
|
|
594
|
+
children: [Y.templates.map((e) => /* @__PURE__ */ x("div", {
|
|
595
595
|
className: "flex items-center justify-between p-3 bg-bg-sunken rounded-lg",
|
|
596
|
-
children: [/* @__PURE__ */
|
|
596
|
+
children: [/* @__PURE__ */ x("div", {
|
|
597
597
|
className: "flex items-center gap-3",
|
|
598
|
-
children: [/* @__PURE__ */
|
|
598
|
+
children: [/* @__PURE__ */ b(g, { className: "size-5 text-action-primary-bg" }), /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("p", {
|
|
599
599
|
className: "text-sm font-medium text-text-primary",
|
|
600
600
|
children: e.name
|
|
601
|
-
}), /* @__PURE__ */
|
|
601
|
+
}), /* @__PURE__ */ x("p", {
|
|
602
602
|
className: "text-xs text-text-muted",
|
|
603
603
|
children: [
|
|
604
604
|
e.category,
|
|
@@ -606,21 +606,21 @@ function M() {
|
|
|
606
606
|
e.version || "—"
|
|
607
607
|
]
|
|
608
608
|
})] })]
|
|
609
|
-
}), /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ b("button", {
|
|
610
610
|
type: "button",
|
|
611
|
-
onClick: () =>
|
|
611
|
+
onClick: () => D(`/templates/${e.id}`),
|
|
612
612
|
className: "text-xs text-action-primary-bg hover:underline",
|
|
613
613
|
children: "View Template →"
|
|
614
614
|
})]
|
|
615
|
-
}, e.id)), /* @__PURE__ */
|
|
615
|
+
}, e.id)), N && /* @__PURE__ */ x("button", {
|
|
616
616
|
type: "button",
|
|
617
|
-
onClick: () =>
|
|
617
|
+
onClick: () => H(!0),
|
|
618
618
|
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",
|
|
619
|
-
children: [/* @__PURE__ */
|
|
619
|
+
children: [/* @__PURE__ */ b(v, { className: "size-4" }), "Update template"]
|
|
620
620
|
})]
|
|
621
621
|
})] })
|
|
622
622
|
}, "template"),
|
|
623
|
-
|
|
623
|
+
F === "settings" && /* @__PURE__ */ b(y.div, {
|
|
624
624
|
initial: {
|
|
625
625
|
opacity: 0,
|
|
626
626
|
y: 8
|
|
@@ -634,39 +634,39 @@ function M() {
|
|
|
634
634
|
y: -8
|
|
635
635
|
},
|
|
636
636
|
transition: { duration: .2 },
|
|
637
|
-
children: /* @__PURE__ */
|
|
637
|
+
children: /* @__PURE__ */ x("div", {
|
|
638
638
|
className: "space-y-4",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
639
|
+
children: [j && /* @__PURE__ */ x(o, {
|
|
640
640
|
padding: "lg",
|
|
641
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ b("h3", {
|
|
642
642
|
className: "font-semibold text-text-primary mb-4",
|
|
643
|
-
children:
|
|
644
|
-
}), /* @__PURE__ */
|
|
643
|
+
children: P("component.editComponent", "Edit Component")
|
|
644
|
+
}), /* @__PURE__ */ b("button", {
|
|
645
645
|
type: "button",
|
|
646
|
-
onClick: () =>
|
|
646
|
+
onClick: () => I(!0),
|
|
647
647
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
648
|
-
children:
|
|
648
|
+
children: P("component.editDetails", "Edit Details")
|
|
649
649
|
})]
|
|
650
|
-
}), /* @__PURE__ */
|
|
650
|
+
}), je && /* @__PURE__ */ x(o, {
|
|
651
651
|
padding: "lg",
|
|
652
652
|
children: [
|
|
653
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ b("h3", {
|
|
654
654
|
className: "font-semibold text-status-error-text mb-2",
|
|
655
|
-
children:
|
|
655
|
+
children: P("component.dangerZone", "Danger Zone")
|
|
656
656
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
657
|
+
/* @__PURE__ */ b("p", {
|
|
658
658
|
className: "text-sm text-text-secondary mb-4",
|
|
659
|
-
children:
|
|
659
|
+
children: P("component.deleteWarning", "Deleting this component will remove it from all catalogs and break any templates derived from it. This cannot be undone.")
|
|
660
660
|
}),
|
|
661
|
-
/* @__PURE__ */
|
|
661
|
+
/* @__PURE__ */ x("button", {
|
|
662
662
|
type: "button",
|
|
663
663
|
"data-testid": "component-delete-button",
|
|
664
|
-
onClick: () =>
|
|
664
|
+
onClick: () => L(!0),
|
|
665
665
|
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",
|
|
666
|
-
children: [/* @__PURE__ */
|
|
666
|
+
children: [/* @__PURE__ */ b(Te, {
|
|
667
667
|
className: "size-4",
|
|
668
668
|
"aria-hidden": "true"
|
|
669
|
-
}),
|
|
669
|
+
}), P("component.deleteComponent", "Delete Component")]
|
|
670
670
|
})
|
|
671
671
|
]
|
|
672
672
|
})]
|
|
@@ -674,56 +674,56 @@ function M() {
|
|
|
674
674
|
}, "settings")
|
|
675
675
|
]
|
|
676
676
|
}),
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
isOpen:
|
|
679
|
-
onClose: () =>
|
|
680
|
-
onSubmit:
|
|
677
|
+
j && /* @__PURE__ */ b(de, {
|
|
678
|
+
isOpen: Fe,
|
|
679
|
+
onClose: () => I(!1),
|
|
680
|
+
onSubmit: Q,
|
|
681
681
|
initialData: {
|
|
682
|
-
name:
|
|
683
|
-
description:
|
|
684
|
-
type:
|
|
685
|
-
lifecycle:
|
|
686
|
-
language:
|
|
687
|
-
framework:
|
|
688
|
-
version:
|
|
689
|
-
ownerName:
|
|
690
|
-
tags:
|
|
691
|
-
repositoryUrl:
|
|
692
|
-
documentationUrl:
|
|
693
|
-
dependencies: Array.isArray(
|
|
694
|
-
sbomData:
|
|
682
|
+
name: Y.name,
|
|
683
|
+
description: Y.description || "",
|
|
684
|
+
type: Y.type,
|
|
685
|
+
lifecycle: Y.lifecycle,
|
|
686
|
+
language: Y.language || "",
|
|
687
|
+
framework: Y.framework || "",
|
|
688
|
+
version: Y.version || "",
|
|
689
|
+
ownerName: Y.ownerName || "",
|
|
690
|
+
tags: Y.tags || [],
|
|
691
|
+
repositoryUrl: Y.repositoryUrl || "",
|
|
692
|
+
documentationUrl: Y.documentationUrl || "",
|
|
693
|
+
dependencies: Array.isArray(Y.dependencies) ? Y.dependencies : null,
|
|
694
|
+
sbomData: Y.sbomData && typeof Y.sbomData == "object" ? Y.sbomData : null
|
|
695
695
|
},
|
|
696
|
-
title:
|
|
696
|
+
title: P("component.editComponent", "Edit Component")
|
|
697
697
|
}),
|
|
698
|
-
/* @__PURE__ */
|
|
699
|
-
isOpen:
|
|
700
|
-
onClose: () =>
|
|
701
|
-
onConfirm:
|
|
702
|
-
title:
|
|
703
|
-
message:
|
|
704
|
-
confirmLabel:
|
|
698
|
+
/* @__PURE__ */ b(re, {
|
|
699
|
+
isOpen: Ie,
|
|
700
|
+
onClose: () => L(!1),
|
|
701
|
+
onConfirm: Ke,
|
|
702
|
+
title: P("component.deleteComponent", "Delete Component"),
|
|
703
|
+
message: P("component.deleteConfirmMessage", `Are you sure you want to delete "${Y.name}"? This action cannot be undone.`),
|
|
704
|
+
confirmLabel: P("common.delete", "Delete"),
|
|
705
705
|
variant: "danger",
|
|
706
|
-
isLoading:
|
|
706
|
+
isLoading: Le
|
|
707
707
|
}),
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
isOpen:
|
|
710
|
-
onClose: () =>
|
|
708
|
+
/* @__PURE__ */ b(r, {
|
|
709
|
+
isOpen: Re,
|
|
710
|
+
onClose: () => V(!1),
|
|
711
711
|
onConfirm: () => {
|
|
712
|
-
|
|
712
|
+
V(!1), D("/billing/plans");
|
|
713
713
|
},
|
|
714
714
|
title: "Template Quota Reached",
|
|
715
715
|
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."
|
|
716
716
|
}),
|
|
717
|
-
|
|
718
|
-
componentName:
|
|
719
|
-
componentRepositoryUrl:
|
|
720
|
-
onClose: () =>
|
|
721
|
-
onSubmit:
|
|
717
|
+
ze && N && /* @__PURE__ */ b(me, {
|
|
718
|
+
componentName: Y.name,
|
|
719
|
+
componentRepositoryUrl: Y.repositoryUrl,
|
|
720
|
+
onClose: () => H(!1),
|
|
721
|
+
onSubmit: qe
|
|
722
722
|
}),
|
|
723
|
-
|
|
723
|
+
U && M && /* @__PURE__ */ b("div", {
|
|
724
724
|
className: "fixed inset-0 flex items-center justify-center z-50 p-4",
|
|
725
725
|
style: { backgroundColor: "rgba(0,0,0,0.55)" },
|
|
726
|
-
children: /* @__PURE__ */
|
|
726
|
+
children: /* @__PURE__ */ x(y.div, {
|
|
727
727
|
initial: {
|
|
728
728
|
opacity: 0,
|
|
729
729
|
scale: .95
|
|
@@ -733,54 +733,54 @@ function M() {
|
|
|
733
733
|
scale: 1
|
|
734
734
|
},
|
|
735
735
|
className: "bg-bg-surface rounded-lg w-full max-w-md shadow-xl",
|
|
736
|
-
children: [/* @__PURE__ */
|
|
736
|
+
children: [/* @__PURE__ */ x("div", {
|
|
737
737
|
className: "flex items-center justify-between px-4 py-3 border-b border-border-default",
|
|
738
|
-
children: [/* @__PURE__ */
|
|
738
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
739
739
|
className: "text-base font-semibold text-text-primary",
|
|
740
|
-
children:
|
|
741
|
-
}), /* @__PURE__ */
|
|
740
|
+
children: P("component.addToCatalog", "Add to Catalog")
|
|
741
|
+
}), /* @__PURE__ */ b("button", {
|
|
742
742
|
type: "button",
|
|
743
|
-
onClick: () =>
|
|
743
|
+
onClick: () => W(!1),
|
|
744
744
|
className: "p-1.5 text-text-secondary hover:text-text-primary rounded-md hover:bg-bg-sunken transition-colors",
|
|
745
|
-
children: /* @__PURE__ */
|
|
745
|
+
children: /* @__PURE__ */ b(Ee, { className: "size-4" })
|
|
746
746
|
})]
|
|
747
|
-
}), /* @__PURE__ */
|
|
747
|
+
}), /* @__PURE__ */ b("div", {
|
|
748
748
|
className: "p-2 max-h-80 overflow-y-auto",
|
|
749
|
-
children: (
|
|
749
|
+
children: (J?.vibecontrolsCatalogs?.items ?? []).length === 0 ? /* @__PURE__ */ x("p", {
|
|
750
750
|
className: "text-sm text-text-secondary text-center py-6",
|
|
751
751
|
children: [
|
|
752
752
|
"No catalogs found.",
|
|
753
753
|
" ",
|
|
754
|
-
/* @__PURE__ */
|
|
754
|
+
/* @__PURE__ */ b("button", {
|
|
755
755
|
type: "button",
|
|
756
756
|
onClick: () => {
|
|
757
|
-
|
|
757
|
+
W(!1), D("/catalogs");
|
|
758
758
|
},
|
|
759
759
|
className: "text-action-primary-bg hover:underline",
|
|
760
760
|
children: "Create one first."
|
|
761
761
|
})
|
|
762
762
|
]
|
|
763
|
-
}) : (
|
|
764
|
-
let t =
|
|
765
|
-
return /* @__PURE__ */
|
|
763
|
+
}) : (J?.vibecontrolsCatalogs?.items ?? []).map((e) => {
|
|
764
|
+
let t = X.some((t) => t.id === e.id);
|
|
765
|
+
return /* @__PURE__ */ x("button", {
|
|
766
766
|
type: "button",
|
|
767
767
|
disabled: t,
|
|
768
768
|
onClick: async () => {
|
|
769
|
-
if (!(!
|
|
770
|
-
await
|
|
769
|
+
if (!(!E || t)) try {
|
|
770
|
+
await We({ variables: {
|
|
771
771
|
catalogId: e.id,
|
|
772
|
-
componentId:
|
|
773
|
-
} }),
|
|
772
|
+
componentId: E
|
|
773
|
+
} }), W(!1), B(`Added to ${e.name}`), setTimeout(() => B(null), 3e3);
|
|
774
774
|
} catch {}
|
|
775
775
|
},
|
|
776
776
|
className: `flex items-center justify-between w-full px-3 py-2.5 text-left rounded-md transition-colors ${t ? "opacity-40 cursor-not-allowed" : "hover:bg-bg-sunken cursor-pointer"}`,
|
|
777
|
-
children: [/* @__PURE__ */
|
|
777
|
+
children: [/* @__PURE__ */ x("div", {
|
|
778
778
|
className: "flex items-center gap-2",
|
|
779
|
-
children: [/* @__PURE__ */
|
|
779
|
+
children: [/* @__PURE__ */ b(m, { className: "size-4 text-action-primary-bg flex-shrink-0" }), /* @__PURE__ */ b("span", {
|
|
780
780
|
className: "text-sm text-text-primary",
|
|
781
781
|
children: e.name
|
|
782
782
|
})]
|
|
783
|
-
}), t && /* @__PURE__ */
|
|
783
|
+
}), t && /* @__PURE__ */ b("span", {
|
|
784
784
|
className: "text-xs text-text-muted",
|
|
785
785
|
children: "already added"
|
|
786
786
|
})]
|
|
@@ -790,27 +790,27 @@ function M() {
|
|
|
790
790
|
})
|
|
791
791
|
})
|
|
792
792
|
]
|
|
793
|
-
}) : /* @__PURE__ */
|
|
793
|
+
}) : /* @__PURE__ */ x(w, {
|
|
794
794
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
795
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ x("button", {
|
|
796
796
|
type: "button",
|
|
797
|
-
onClick:
|
|
797
|
+
onClick: Z,
|
|
798
798
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
799
|
-
children: [/* @__PURE__ */
|
|
800
|
-
}), /* @__PURE__ */
|
|
801
|
-
icon: /* @__PURE__ */
|
|
802
|
-
title:
|
|
803
|
-
description: `No component with ID "${
|
|
804
|
-
action: /* @__PURE__ */
|
|
799
|
+
children: [/* @__PURE__ */ b(p, { className: "size-4" }), P("component.backToComponents", "Back to Components")]
|
|
800
|
+
}), /* @__PURE__ */ b(a, {
|
|
801
|
+
icon: /* @__PURE__ */ b(h, { className: "size-8 text-text-secondary" }),
|
|
802
|
+
title: P("component.notFound", "Component not found"),
|
|
803
|
+
description: `No component with ID "${E}" exists`,
|
|
804
|
+
action: /* @__PURE__ */ b("button", {
|
|
805
805
|
type: "button",
|
|
806
|
-
onClick:
|
|
806
|
+
onClick: Z,
|
|
807
807
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
808
|
-
children:
|
|
808
|
+
children: P("component.backToComponents", "Back to Components")
|
|
809
809
|
})
|
|
810
810
|
})]
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
813
|
//#endregion
|
|
814
|
-
export {
|
|
814
|
+
export { T as ComponentDetailPage };
|
|
815
815
|
|
|
816
816
|
//# sourceMappingURL=ComponentDetailPage.js.map
|