@burdenoff/microfe-vibecontrols 2026.518.2 → 2026.519.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/pages/AgentsPage.js +7 -4
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +333 -289
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +243 -199
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +104 -71
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useVibeNavigate as
|
|
3
|
-
import { PageHeader as
|
|
4
|
-
import { LoadingState as
|
|
5
|
-
import { ErrorState as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useDeleteComponentMutation as e, useGetComponentQuery as t, usePublishComponentAsTemplateMutation as n, useUpdateComponentMutation as r } from "../generated/wspace-operations.js";
|
|
2
|
+
import { useVibeNavigate as i } from "../providers/VibeControlsProvider.js";
|
|
3
|
+
import { PageHeader as a } from "../components/shared/PageHeader.js";
|
|
4
|
+
import { LoadingState as o } from "../components/shared/LoadingState.js";
|
|
5
|
+
import { ErrorState as ee } from "../components/shared/ErrorState.js";
|
|
6
|
+
import { ConfirmDialog as te } from "../components/shared/ConfirmDialog.js";
|
|
7
|
+
import { QuotaExhaustedDialog as ne } from "../components/shared/QuotaExhaustedDialog.js";
|
|
8
|
+
import { isQuotaExhaustedError as re } from "../utils/quotaUtils.js";
|
|
8
9
|
import { EmptyState as s } from "../components/shared/EmptyState.js";
|
|
9
10
|
import { Card as c } from "../components/shared/Card.js";
|
|
10
11
|
import { StatCard as l } from "../components/shared/StatCard.js";
|
|
@@ -20,15 +21,15 @@ import "../components/idp-components/index.js";
|
|
|
20
21
|
import { CatalogCard as h } from "../components/catalog/CatalogCard.js";
|
|
21
22
|
import "../components/catalog/index.js";
|
|
22
23
|
import { useCallback as g, useMemo as _, useState as v } from "react";
|
|
23
|
-
import { useI18n as
|
|
24
|
-
import { ArrowLeft as
|
|
25
|
-
import { useParams as
|
|
26
|
-
import { usePermissions as
|
|
27
|
-
import { AnimatePresence as
|
|
28
|
-
import { jsx as
|
|
29
|
-
import { MotionItem as
|
|
24
|
+
import { useI18n as ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
25
|
+
import { ArrowLeft as y, BarChart3 as ae, BookOpen as b, Box as x, FileCode as S, FileText as oe, Layers as se, RefreshCw as ce, Settings as le, Trash2 as ue, Upload as de } from "lucide-react";
|
|
26
|
+
import { useParams as fe } from "react-router-dom";
|
|
27
|
+
import { usePermissions as C } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
28
|
+
import { AnimatePresence as w, motion as T } from "framer-motion";
|
|
29
|
+
import { jsx as E, jsxs as D } from "react/jsx-runtime";
|
|
30
|
+
import { MotionItem as O, MotionList as k, MotionPage as A } from "@burdenoff/fe-libs/shared/motion";
|
|
30
31
|
//#region src/pages/ComponentDetailPage.tsx
|
|
31
|
-
var
|
|
32
|
+
var j = [
|
|
32
33
|
"overview",
|
|
33
34
|
"catalogs",
|
|
34
35
|
"docs",
|
|
@@ -36,15 +37,15 @@ var N = [
|
|
|
36
37
|
"template",
|
|
37
38
|
"settings"
|
|
38
39
|
];
|
|
39
|
-
function
|
|
40
|
-
let { t:
|
|
41
|
-
let n =
|
|
40
|
+
function M() {
|
|
41
|
+
let { t: M } = ie(), { id: N } = fe(), P = i(), { hasPermission: F, isLoading: I } = C(), L = g((e, t) => {
|
|
42
|
+
let n = M(e);
|
|
42
43
|
return n === e ? t : n;
|
|
43
|
-
}, [
|
|
44
|
-
variables: { id:
|
|
45
|
-
skip: !
|
|
44
|
+
}, [M]), [R, z] = d(j, "overview"), [B, V] = v(!1), [pe, H] = v(!1), [me, U] = v(!1), [W, G] = v(null), [he, K] = v(!1), { data: ge, loading: q, error: J, refetch: Y } = t({
|
|
45
|
+
variables: { id: N || "" },
|
|
46
|
+
skip: !N,
|
|
46
47
|
fetchPolicy: "cache-and-network"
|
|
47
|
-
}), [X] =
|
|
48
|
+
}), [X] = r({ refetchQueries: ["GetComponent"] }), [_e] = e({ refetchQueries: ["ListComponents"] }), [ve] = n({ refetchQueries: ["GetComponent"] }), Z = ge?.vibecontrolsComponent ?? null, Q = _(() => (Z?.catalogs ?? []).map((e) => {
|
|
48
49
|
let t = e.catalog || {};
|
|
49
50
|
return {
|
|
50
51
|
id: t.id,
|
|
@@ -58,33 +59,33 @@ function P() {
|
|
|
58
59
|
updatedAt: t.updatedAt
|
|
59
60
|
};
|
|
60
61
|
}), [Z?.catalogs]);
|
|
61
|
-
if (
|
|
62
|
+
if (I) return /* @__PURE__ */ E("div", {
|
|
62
63
|
className: "flex items-center justify-center min-h-[400px]",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ E("p", {
|
|
64
65
|
className: "text-text-secondary",
|
|
65
66
|
children: "Loading permissions..."
|
|
66
67
|
})
|
|
67
68
|
});
|
|
68
|
-
if (!
|
|
69
|
+
if (!F(u.VIBE_READ)) return /* @__PURE__ */ E("div", {
|
|
69
70
|
className: "flex items-center justify-center min-h-[400px]",
|
|
70
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ D("div", {
|
|
71
72
|
className: "text-center space-y-2",
|
|
72
|
-
children: [/* @__PURE__ */
|
|
73
|
+
children: [/* @__PURE__ */ E("h2", {
|
|
73
74
|
className: "text-lg font-semibold text-foreground",
|
|
74
75
|
children: "Access Denied"
|
|
75
|
-
}), /* @__PURE__ */
|
|
76
|
+
}), /* @__PURE__ */ E("p", {
|
|
76
77
|
className: "text-sm text-text-secondary",
|
|
77
78
|
children: "You don't have permission to access this page."
|
|
78
79
|
})]
|
|
79
80
|
})
|
|
80
81
|
});
|
|
81
82
|
let $ = () => {
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
id:
|
|
83
|
+
P("/components");
|
|
84
|
+
}, ye = (e) => {
|
|
85
|
+
P(`/catalogs/${e.id}`);
|
|
86
|
+
}, be = async (e) => {
|
|
87
|
+
N && (await X({ variables: {
|
|
88
|
+
id: N,
|
|
88
89
|
input: {
|
|
89
90
|
name: e.name,
|
|
90
91
|
description: e.description || void 0,
|
|
@@ -96,154 +97,163 @@ function P() {
|
|
|
96
97
|
ownerName: e.owner || void 0,
|
|
97
98
|
tags: e.tags.length > 0 ? e.tags : void 0
|
|
98
99
|
}
|
|
99
|
-
} }),
|
|
100
|
-
},
|
|
101
|
-
if (
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
} }), G(L("component.updatedSuccess", "Component updated successfully")), setTimeout(() => G(null), 3e3));
|
|
101
|
+
}, xe = async () => {
|
|
102
|
+
if (N) {
|
|
103
|
+
U(!0);
|
|
104
|
+
try {
|
|
105
|
+
await _e({ variables: { id: N } }), H(!1), P("/components");
|
|
106
|
+
} finally {
|
|
107
|
+
U(!1);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, Se = async () => {
|
|
111
|
+
if (N) try {
|
|
112
|
+
await ve({ variables: {
|
|
113
|
+
componentId: N,
|
|
104
114
|
input: { name: Z?.name || "Template" }
|
|
105
|
-
} }),
|
|
115
|
+
} }), G(L("component.publishedAsTemplate", "Published as template successfully")), setTimeout(() => G(null), 3e3);
|
|
106
116
|
} catch (e) {
|
|
107
|
-
if (
|
|
117
|
+
if (re(e)) {
|
|
108
118
|
K(!0);
|
|
109
119
|
return;
|
|
110
120
|
}
|
|
111
|
-
|
|
121
|
+
G(e instanceof Error ? e.message : L("component.failedPublish", "Failed to publish")), setTimeout(() => G(null), 3e3);
|
|
112
122
|
}
|
|
113
|
-
},
|
|
123
|
+
}, Ce = {
|
|
114
124
|
EXPERIMENTAL: "bg-status-warning-bg text-status-warning-text",
|
|
115
125
|
PRODUCTION: "bg-status-success-bg text-status-success-text",
|
|
116
126
|
DEPRECATED: "bg-status-error-bg text-status-error-text"
|
|
117
|
-
},
|
|
127
|
+
}, we = [
|
|
118
128
|
{
|
|
119
129
|
id: "overview",
|
|
120
|
-
label:
|
|
121
|
-
icon:
|
|
130
|
+
label: L("nav.overview", "Overview"),
|
|
131
|
+
icon: x
|
|
122
132
|
},
|
|
123
133
|
{
|
|
124
134
|
id: "catalogs",
|
|
125
|
-
label:
|
|
126
|
-
icon:
|
|
135
|
+
label: L("component.catalogs", "Catalogs"),
|
|
136
|
+
icon: b,
|
|
127
137
|
badge: `${Q.length}`
|
|
128
138
|
},
|
|
129
139
|
{
|
|
130
140
|
id: "docs",
|
|
131
|
-
label:
|
|
132
|
-
icon:
|
|
141
|
+
label: L("component.docs", "Docs"),
|
|
142
|
+
icon: oe
|
|
133
143
|
},
|
|
134
144
|
{
|
|
135
145
|
id: "scorecard",
|
|
136
|
-
label:
|
|
137
|
-
icon:
|
|
146
|
+
label: L("component.scorecard", "Scorecard"),
|
|
147
|
+
icon: ae
|
|
138
148
|
},
|
|
139
149
|
{
|
|
140
150
|
id: "template",
|
|
141
|
-
label:
|
|
142
|
-
icon:
|
|
151
|
+
label: L("component.template", "Template"),
|
|
152
|
+
icon: S
|
|
143
153
|
},
|
|
144
154
|
{
|
|
145
155
|
id: "settings",
|
|
146
|
-
label:
|
|
147
|
-
icon:
|
|
156
|
+
label: L("common.settings", "Settings"),
|
|
157
|
+
icon: le
|
|
148
158
|
}
|
|
149
159
|
];
|
|
150
|
-
return q && !Z ? /* @__PURE__ */
|
|
160
|
+
return q && !Z ? /* @__PURE__ */ D(A, {
|
|
151
161
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
152
|
-
children: [/* @__PURE__ */
|
|
162
|
+
children: [/* @__PURE__ */ D("button", {
|
|
153
163
|
onClick: $,
|
|
154
164
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
155
|
-
children: [/* @__PURE__ */
|
|
156
|
-
}), /* @__PURE__ */
|
|
157
|
-
}) : J && !Z ? /* @__PURE__ */
|
|
165
|
+
children: [/* @__PURE__ */ E(y, { className: "w-4 h-4" }), L("component.backToComponents", "Back to Components")]
|
|
166
|
+
}), /* @__PURE__ */ E(o, { message: L("component.loadingDetails", "Loading component details...") })]
|
|
167
|
+
}) : J && !Z ? /* @__PURE__ */ D(A, {
|
|
158
168
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
169
|
+
children: [/* @__PURE__ */ D("button", {
|
|
160
170
|
onClick: $,
|
|
161
171
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
162
|
-
children: [/* @__PURE__ */
|
|
163
|
-
}), /* @__PURE__ */
|
|
164
|
-
title:
|
|
172
|
+
children: [/* @__PURE__ */ E(y, { className: "w-4 h-4" }), L("component.backToComponents", "Back to Components")]
|
|
173
|
+
}), /* @__PURE__ */ E(ee, {
|
|
174
|
+
title: L("component.failedLoad", "Failed to load component"),
|
|
165
175
|
message: J.message,
|
|
166
176
|
onRetry: () => Y()
|
|
167
177
|
})]
|
|
168
|
-
}) : Z ? /* @__PURE__ */
|
|
178
|
+
}) : Z ? /* @__PURE__ */ D(A, {
|
|
169
179
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
170
180
|
children: [
|
|
171
|
-
|
|
181
|
+
W && /* @__PURE__ */ E("div", {
|
|
172
182
|
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",
|
|
173
|
-
children:
|
|
183
|
+
children: W
|
|
174
184
|
}),
|
|
175
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ D("button", {
|
|
176
186
|
onClick: $,
|
|
177
187
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
178
|
-
children: [/* @__PURE__ */
|
|
188
|
+
children: [/* @__PURE__ */ E(y, { className: "w-4 h-4" }), L("component.backToComponents", "Back to Components")]
|
|
179
189
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ E(a, {
|
|
181
191
|
title: Z.name,
|
|
182
|
-
description: Z.description ||
|
|
183
|
-
actions: /* @__PURE__ */
|
|
192
|
+
description: Z.description || L("component.noDescription", "No description"),
|
|
193
|
+
actions: /* @__PURE__ */ D("div", {
|
|
184
194
|
className: "flex items-center gap-2 flex-wrap",
|
|
185
195
|
children: [
|
|
186
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ E("button", {
|
|
187
197
|
onClick: () => Y(),
|
|
188
198
|
disabled: q,
|
|
189
199
|
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",
|
|
190
|
-
title:
|
|
191
|
-
children: /* @__PURE__ */
|
|
200
|
+
title: L("common.refresh", "Refresh"),
|
|
201
|
+
children: /* @__PURE__ */ E(ce, { className: `w-4 h-4 ${q ? "animate-spin" : ""}` })
|
|
192
202
|
}),
|
|
193
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ E("span", {
|
|
194
204
|
className: "inline-flex items-center px-2.5 py-1 text-xs font-medium bg-bg-sunken text-text-secondary rounded",
|
|
195
205
|
children: Z.type
|
|
196
206
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${
|
|
207
|
+
/* @__PURE__ */ E("span", {
|
|
208
|
+
className: `inline-flex items-center px-2.5 py-1 text-xs font-medium rounded ${Ce[Z.lifecycle] || "bg-bg-sunken text-text-secondary"}`,
|
|
199
209
|
children: Z.lifecycle
|
|
200
210
|
})
|
|
201
211
|
]
|
|
202
212
|
})
|
|
203
213
|
}),
|
|
204
|
-
/* @__PURE__ */ k
|
|
214
|
+
/* @__PURE__ */ D(k, {
|
|
205
215
|
stagger: .04,
|
|
206
216
|
className: "grid grid-cols-2 sm:grid-cols-4 gap-3 sm:gap-4",
|
|
207
217
|
children: [
|
|
208
|
-
/* @__PURE__ */ O
|
|
209
|
-
title:
|
|
218
|
+
/* @__PURE__ */ E(O, { children: /* @__PURE__ */ E(l, {
|
|
219
|
+
title: L("component.type", "Type"),
|
|
210
220
|
value: Z.type,
|
|
211
|
-
icon: /* @__PURE__ */
|
|
221
|
+
icon: /* @__PURE__ */ E(x, { className: "w-4 h-4" })
|
|
212
222
|
}) }),
|
|
213
|
-
/* @__PURE__ */ O
|
|
214
|
-
title:
|
|
223
|
+
/* @__PURE__ */ E(O, { children: /* @__PURE__ */ E(l, {
|
|
224
|
+
title: L("component.lifecycle", "Lifecycle"),
|
|
215
225
|
value: Z.lifecycle,
|
|
216
|
-
icon: /* @__PURE__ */
|
|
226
|
+
icon: /* @__PURE__ */ E(se, { className: "w-4 h-4" }),
|
|
217
227
|
variant: Z.lifecycle === "PRODUCTION" ? "success" : Z.lifecycle === "DEPRECATED" ? "error" : "warning"
|
|
218
228
|
}) }),
|
|
219
|
-
/* @__PURE__ */ O
|
|
220
|
-
title:
|
|
229
|
+
/* @__PURE__ */ E(O, { children: /* @__PURE__ */ E(l, {
|
|
230
|
+
title: L("component.version", "Version"),
|
|
221
231
|
value: Z.version || "-",
|
|
222
|
-
icon: /* @__PURE__ */
|
|
232
|
+
icon: /* @__PURE__ */ E(S, { className: "w-4 h-4" })
|
|
223
233
|
}) }),
|
|
224
|
-
/* @__PURE__ */ O
|
|
225
|
-
title:
|
|
234
|
+
/* @__PURE__ */ E(O, { children: /* @__PURE__ */ E(l, {
|
|
235
|
+
title: L("component.catalogs", "Catalogs"),
|
|
226
236
|
value: Q.length,
|
|
227
|
-
icon: /* @__PURE__ */
|
|
237
|
+
icon: /* @__PURE__ */ E(b, { className: "w-4 h-4" })
|
|
228
238
|
}) })
|
|
229
239
|
]
|
|
230
240
|
}),
|
|
231
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ E("div", {
|
|
232
242
|
className: "border-b border-border-default",
|
|
233
|
-
children: /* @__PURE__ */
|
|
243
|
+
children: /* @__PURE__ */ E("nav", {
|
|
234
244
|
className: "flex gap-1 -mb-px overflow-x-auto pb-1",
|
|
235
|
-
"aria-label":
|
|
236
|
-
children:
|
|
237
|
-
let t = e.icon, n =
|
|
238
|
-
return /* @__PURE__ */
|
|
239
|
-
onClick: () =>
|
|
245
|
+
"aria-label": L("component.tabsAriaLabel", "Component tabs"),
|
|
246
|
+
children: we.map((e) => {
|
|
247
|
+
let t = e.icon, n = R === e.id;
|
|
248
|
+
return /* @__PURE__ */ D("button", {
|
|
249
|
+
onClick: () => z(e.id),
|
|
240
250
|
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"}`,
|
|
241
251
|
"aria-selected": n,
|
|
242
252
|
role: "tab",
|
|
243
253
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
254
|
+
/* @__PURE__ */ E(t, { className: "w-4 h-4" }),
|
|
245
255
|
e.label,
|
|
246
|
-
e.badge && /* @__PURE__ */
|
|
256
|
+
e.badge && /* @__PURE__ */ E("span", {
|
|
247
257
|
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"}`,
|
|
248
258
|
children: e.badge
|
|
249
259
|
})
|
|
@@ -252,10 +262,10 @@ function P() {
|
|
|
252
262
|
})
|
|
253
263
|
})
|
|
254
264
|
}),
|
|
255
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ D(w, {
|
|
256
266
|
mode: "wait",
|
|
257
267
|
children: [
|
|
258
|
-
|
|
268
|
+
R === "overview" && /* @__PURE__ */ D(T.div, {
|
|
259
269
|
initial: {
|
|
260
270
|
opacity: 0,
|
|
261
271
|
y: 8
|
|
@@ -271,58 +281,58 @@ function P() {
|
|
|
271
281
|
transition: { duration: .2 },
|
|
272
282
|
className: "space-y-6",
|
|
273
283
|
children: [
|
|
274
|
-
Z.description && /* @__PURE__ */
|
|
284
|
+
Z.description && /* @__PURE__ */ E(c, { children: /* @__PURE__ */ E("div", {
|
|
275
285
|
className: "p-4",
|
|
276
|
-
children: /* @__PURE__ */
|
|
286
|
+
children: /* @__PURE__ */ E("p", {
|
|
277
287
|
className: "text-text-primary",
|
|
278
288
|
children: Z.description
|
|
279
289
|
})
|
|
280
290
|
}) }),
|
|
281
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ D(c, { children: [/* @__PURE__ */ E("div", {
|
|
282
292
|
className: "p-4 border-b border-border-default",
|
|
283
|
-
children: /* @__PURE__ */
|
|
293
|
+
children: /* @__PURE__ */ E("h3", {
|
|
284
294
|
className: "font-semibold text-text-primary",
|
|
285
|
-
children:
|
|
295
|
+
children: L("component.metadata", "Metadata")
|
|
286
296
|
})
|
|
287
|
-
}), /* @__PURE__ */
|
|
297
|
+
}), /* @__PURE__ */ E("div", {
|
|
288
298
|
className: "p-4",
|
|
289
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ D("div", {
|
|
290
300
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",
|
|
291
301
|
children: [
|
|
292
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
293
303
|
className: "text-text-secondary",
|
|
294
|
-
children:
|
|
295
|
-
}), /* @__PURE__ */
|
|
304
|
+
children: L("component.ownerNameLabel", "Owner")
|
|
305
|
+
}), /* @__PURE__ */ E("p", {
|
|
296
306
|
className: "font-medium text-text-primary",
|
|
297
|
-
children: Z.ownerName ||
|
|
307
|
+
children: Z.ownerName || L("common.unset", "Unset")
|
|
298
308
|
})] }),
|
|
299
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
300
310
|
className: "text-text-secondary",
|
|
301
|
-
children:
|
|
302
|
-
}), /* @__PURE__ */
|
|
311
|
+
children: L("component.languageLabel", "Language")
|
|
312
|
+
}), /* @__PURE__ */ E("p", {
|
|
303
313
|
className: "font-medium text-text-primary",
|
|
304
|
-
children: Z.language ||
|
|
314
|
+
children: Z.language || L("common.unset", "Unset")
|
|
305
315
|
})] }),
|
|
306
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
307
317
|
className: "text-text-secondary",
|
|
308
|
-
children:
|
|
309
|
-
}), /* @__PURE__ */
|
|
318
|
+
children: L("component.frameworkLabel", "Framework")
|
|
319
|
+
}), /* @__PURE__ */ E("p", {
|
|
310
320
|
className: "font-medium text-text-primary",
|
|
311
|
-
children: Z.framework ||
|
|
321
|
+
children: Z.framework || L("common.unset", "Unset")
|
|
312
322
|
})] }),
|
|
313
|
-
/* @__PURE__ */
|
|
323
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
314
324
|
className: "text-text-secondary",
|
|
315
|
-
children:
|
|
316
|
-
}), /* @__PURE__ */
|
|
325
|
+
children: L("component.versionLabel", "Version")
|
|
326
|
+
}), /* @__PURE__ */ E("p", {
|
|
317
327
|
className: "font-medium text-text-primary",
|
|
318
|
-
children: Z.version ||
|
|
328
|
+
children: Z.version || L("common.unset", "Unset")
|
|
319
329
|
})] }),
|
|
320
|
-
Z.repositoryUrl && /* @__PURE__ */
|
|
330
|
+
Z.repositoryUrl && /* @__PURE__ */ D("div", {
|
|
321
331
|
className: "sm:col-span-2",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
332
|
+
children: [/* @__PURE__ */ E("p", {
|
|
323
333
|
className: "text-text-secondary",
|
|
324
|
-
children:
|
|
325
|
-
}), /* @__PURE__ */
|
|
334
|
+
children: L("component.repository", "Repository")
|
|
335
|
+
}), /* @__PURE__ */ E("a", {
|
|
326
336
|
href: Z.repositoryUrl,
|
|
327
337
|
target: "_blank",
|
|
328
338
|
rel: "noopener noreferrer",
|
|
@@ -330,31 +340,31 @@ function P() {
|
|
|
330
340
|
children: Z.repositoryUrl
|
|
331
341
|
})]
|
|
332
342
|
}),
|
|
333
|
-
/* @__PURE__ */
|
|
343
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
334
344
|
className: "text-text-secondary",
|
|
335
|
-
children:
|
|
336
|
-
}), /* @__PURE__ */
|
|
345
|
+
children: L("common.created", "Created")
|
|
346
|
+
}), /* @__PURE__ */ E("p", {
|
|
337
347
|
className: "font-medium text-text-primary",
|
|
338
348
|
children: new Date(Z.createdAt).toLocaleDateString()
|
|
339
349
|
})] }),
|
|
340
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ D("div", { children: [/* @__PURE__ */ E("p", {
|
|
341
351
|
className: "text-text-secondary",
|
|
342
|
-
children:
|
|
343
|
-
}), /* @__PURE__ */
|
|
352
|
+
children: L("common.updated", "Updated")
|
|
353
|
+
}), /* @__PURE__ */ E("p", {
|
|
344
354
|
className: "font-medium text-text-primary",
|
|
345
355
|
children: new Date(Z.updatedAt).toLocaleDateString()
|
|
346
356
|
})] })
|
|
347
357
|
]
|
|
348
358
|
})
|
|
349
359
|
})] }),
|
|
350
|
-
Z.tags?.length > 0 && /* @__PURE__ */
|
|
360
|
+
Z.tags?.length > 0 && /* @__PURE__ */ E(c, { children: /* @__PURE__ */ D("div", {
|
|
351
361
|
className: "p-4",
|
|
352
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
353
363
|
className: "font-semibold text-text-primary mb-3",
|
|
354
|
-
children:
|
|
355
|
-
}), /* @__PURE__ */
|
|
364
|
+
children: L("component.tags", "Tags")
|
|
365
|
+
}), /* @__PURE__ */ E("div", {
|
|
356
366
|
className: "flex flex-wrap gap-2",
|
|
357
|
-
children: Z.tags.map((e) => /* @__PURE__ */
|
|
367
|
+
children: Z.tags.map((e) => /* @__PURE__ */ E("span", {
|
|
358
368
|
className: "px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
359
369
|
children: e
|
|
360
370
|
}, e))
|
|
@@ -362,7 +372,7 @@ function P() {
|
|
|
362
372
|
}) })
|
|
363
373
|
]
|
|
364
374
|
}, "overview"),
|
|
365
|
-
|
|
375
|
+
R === "catalogs" && /* @__PURE__ */ D(T.div, {
|
|
366
376
|
initial: {
|
|
367
377
|
opacity: 0,
|
|
368
378
|
y: 8
|
|
@@ -377,27 +387,27 @@ function P() {
|
|
|
377
387
|
},
|
|
378
388
|
transition: { duration: .2 },
|
|
379
389
|
className: "space-y-4",
|
|
380
|
-
children: [/* @__PURE__ */
|
|
390
|
+
children: [/* @__PURE__ */ D("p", {
|
|
381
391
|
className: "text-sm text-text-secondary",
|
|
382
392
|
children: [
|
|
383
393
|
Q.length,
|
|
384
394
|
" ",
|
|
385
|
-
|
|
395
|
+
L("component.catalogsContaining", "catalogs containing this component")
|
|
386
396
|
]
|
|
387
|
-
}), Q.length > 0 ? /* @__PURE__ */
|
|
397
|
+
}), Q.length > 0 ? /* @__PURE__ */ E(k, {
|
|
388
398
|
stagger: .04,
|
|
389
399
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
390
|
-
children: Q.map((e) => /* @__PURE__ */ O
|
|
400
|
+
children: Q.map((e) => /* @__PURE__ */ E(O, { children: /* @__PURE__ */ E(h, {
|
|
391
401
|
catalog: e,
|
|
392
|
-
onOpen:
|
|
402
|
+
onOpen: ye
|
|
393
403
|
}) }, e.id))
|
|
394
|
-
}) : /* @__PURE__ */
|
|
395
|
-
icon: /* @__PURE__ */
|
|
396
|
-
title:
|
|
397
|
-
description:
|
|
404
|
+
}) : /* @__PURE__ */ E(s, {
|
|
405
|
+
icon: /* @__PURE__ */ E(b, { className: "w-8 h-8 text-text-secondary" }),
|
|
406
|
+
title: L("component.noCatalogs", "Not in any catalogs"),
|
|
407
|
+
description: L("component.noCatalogsDescription", "This component has not been added to any catalogs yet")
|
|
398
408
|
})]
|
|
399
409
|
}, "catalogs"),
|
|
400
|
-
|
|
410
|
+
R === "docs" && /* @__PURE__ */ E(T.div, {
|
|
401
411
|
initial: {
|
|
402
412
|
opacity: 0,
|
|
403
413
|
y: 8
|
|
@@ -412,12 +422,12 @@ function P() {
|
|
|
412
422
|
},
|
|
413
423
|
transition: { duration: .2 },
|
|
414
424
|
className: "space-y-6",
|
|
415
|
-
children: /* @__PURE__ */
|
|
425
|
+
children: /* @__PURE__ */ E(p, {
|
|
416
426
|
ownerType: "COMPONENT",
|
|
417
|
-
ownerId:
|
|
427
|
+
ownerId: N || ""
|
|
418
428
|
})
|
|
419
429
|
}, "docs"),
|
|
420
|
-
|
|
430
|
+
R === "scorecard" && /* @__PURE__ */ E(T.div, {
|
|
421
431
|
initial: {
|
|
422
432
|
opacity: 0,
|
|
423
433
|
y: 8
|
|
@@ -431,12 +441,12 @@ function P() {
|
|
|
431
441
|
y: -8
|
|
432
442
|
},
|
|
433
443
|
transition: { duration: .2 },
|
|
434
|
-
children: /* @__PURE__ */
|
|
444
|
+
children: /* @__PURE__ */ E(f, {
|
|
435
445
|
ownerType: "COMPONENT",
|
|
436
|
-
ownerId:
|
|
446
|
+
ownerId: N || ""
|
|
437
447
|
})
|
|
438
448
|
}, "scorecard"),
|
|
439
|
-
|
|
449
|
+
R === "template" && /* @__PURE__ */ E(T.div, {
|
|
440
450
|
initial: {
|
|
441
451
|
opacity: 0,
|
|
442
452
|
y: 8
|
|
@@ -450,35 +460,35 @@ function P() {
|
|
|
450
460
|
y: -8
|
|
451
461
|
},
|
|
452
462
|
transition: { duration: .2 },
|
|
453
|
-
children: /* @__PURE__ */
|
|
463
|
+
children: /* @__PURE__ */ E(c, {
|
|
454
464
|
padding: "lg",
|
|
455
|
-
children: /* @__PURE__ */
|
|
465
|
+
children: /* @__PURE__ */ D("div", {
|
|
456
466
|
className: "flex flex-col items-center justify-center py-12 text-center",
|
|
457
467
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ E(S, { className: "w-12 h-12 text-text-muted mb-4" }),
|
|
469
|
+
/* @__PURE__ */ E("h3", {
|
|
460
470
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
461
|
-
children:
|
|
471
|
+
children: L("component.template", "Template")
|
|
462
472
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ E("p", {
|
|
464
474
|
className: "text-sm text-text-secondary max-w-md mb-4",
|
|
465
|
-
children: (Z.templates?.length ?? 0) > 0 ?
|
|
475
|
+
children: (Z.templates?.length ?? 0) > 0 ? L("component.alreadyPublished", "This component has been published as a template.") : L("component.publishDescription", "Publish this component as a reusable template that others can clone.")
|
|
466
476
|
}),
|
|
467
|
-
(Z.templates?.length ?? 0) === 0 && /* @__PURE__ */
|
|
468
|
-
onClick:
|
|
477
|
+
(Z.templates?.length ?? 0) === 0 && /* @__PURE__ */ D("button", {
|
|
478
|
+
onClick: Se,
|
|
469
479
|
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",
|
|
470
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ E(de, { className: "w-4 h-4" }), L("component.publishAsTemplate", "Publish as Template")]
|
|
471
481
|
}),
|
|
472
|
-
(Z.templates?.length ?? 0) > 0 && /* @__PURE__ */
|
|
473
|
-
onClick: () =>
|
|
482
|
+
(Z.templates?.length ?? 0) > 0 && /* @__PURE__ */ E("button", {
|
|
483
|
+
onClick: () => P(`/templates/${Z.templates[0].id}`),
|
|
474
484
|
className: "flex items-center gap-2 px-4 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
|
|
475
|
-
children:
|
|
485
|
+
children: L("component.viewTemplate", "View Template")
|
|
476
486
|
})
|
|
477
487
|
]
|
|
478
488
|
})
|
|
479
489
|
})
|
|
480
490
|
}, "template"),
|
|
481
|
-
|
|
491
|
+
R === "settings" && /* @__PURE__ */ E(T.div, {
|
|
482
492
|
initial: {
|
|
483
493
|
opacity: 0,
|
|
484
494
|
y: 8
|
|
@@ -492,24 +502,48 @@ function P() {
|
|
|
492
502
|
y: -8
|
|
493
503
|
},
|
|
494
504
|
transition: { duration: .2 },
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
-
|
|
497
|
-
children: [/* @__PURE__ */
|
|
498
|
-
|
|
499
|
-
children:
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
505
|
+
children: /* @__PURE__ */ D("div", {
|
|
506
|
+
className: "space-y-4",
|
|
507
|
+
children: [/* @__PURE__ */ D(c, {
|
|
508
|
+
padding: "lg",
|
|
509
|
+
children: [/* @__PURE__ */ E("h3", {
|
|
510
|
+
className: "font-semibold text-text-primary mb-4",
|
|
511
|
+
children: L("component.editComponent", "Edit Component")
|
|
512
|
+
}), /* @__PURE__ */ E("button", {
|
|
513
|
+
onClick: () => V(!0),
|
|
514
|
+
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
515
|
+
children: L("component.editDetails", "Edit Details")
|
|
516
|
+
})]
|
|
517
|
+
}), /* @__PURE__ */ D(c, {
|
|
518
|
+
padding: "lg",
|
|
519
|
+
children: [
|
|
520
|
+
/* @__PURE__ */ E("h3", {
|
|
521
|
+
className: "font-semibold text-status-error-text mb-2",
|
|
522
|
+
children: L("component.dangerZone", "Danger Zone")
|
|
523
|
+
}),
|
|
524
|
+
/* @__PURE__ */ E("p", {
|
|
525
|
+
className: "text-sm text-text-secondary mb-4",
|
|
526
|
+
children: L("component.deleteWarning", "Deleting this component will remove it from all catalogs and break any templates derived from it. This cannot be undone.")
|
|
527
|
+
}),
|
|
528
|
+
/* @__PURE__ */ D("button", {
|
|
529
|
+
"data-testid": "component-delete-button",
|
|
530
|
+
onClick: () => H(!0),
|
|
531
|
+
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",
|
|
532
|
+
children: [/* @__PURE__ */ E(ue, {
|
|
533
|
+
className: "w-4 h-4",
|
|
534
|
+
"aria-hidden": "true"
|
|
535
|
+
}), L("component.deleteComponent", "Delete Component")]
|
|
536
|
+
})
|
|
537
|
+
]
|
|
504
538
|
})]
|
|
505
539
|
})
|
|
506
540
|
}, "settings")
|
|
507
541
|
]
|
|
508
542
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
isOpen:
|
|
511
|
-
onClose: () =>
|
|
512
|
-
onSubmit:
|
|
543
|
+
/* @__PURE__ */ E(m, {
|
|
544
|
+
isOpen: B,
|
|
545
|
+
onClose: () => V(!1),
|
|
546
|
+
onSubmit: be,
|
|
513
547
|
initialData: {
|
|
514
548
|
name: Z.name,
|
|
515
549
|
description: Z.description || "",
|
|
@@ -521,37 +555,47 @@ function P() {
|
|
|
521
555
|
owner: Z.ownerName || "",
|
|
522
556
|
tags: Z.tags || []
|
|
523
557
|
},
|
|
524
|
-
title:
|
|
558
|
+
title: L("component.editComponent", "Edit Component")
|
|
559
|
+
}),
|
|
560
|
+
/* @__PURE__ */ E(te, {
|
|
561
|
+
isOpen: pe,
|
|
562
|
+
onClose: () => H(!1),
|
|
563
|
+
onConfirm: xe,
|
|
564
|
+
title: L("component.deleteComponent", "Delete Component"),
|
|
565
|
+
message: L("component.deleteConfirmMessage", `Are you sure you want to delete "${Z.name}"? This action cannot be undone.`),
|
|
566
|
+
confirmLabel: L("common.delete", "Delete"),
|
|
567
|
+
variant: "danger",
|
|
568
|
+
isLoading: me
|
|
525
569
|
}),
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
isOpen:
|
|
570
|
+
/* @__PURE__ */ E(ne, {
|
|
571
|
+
isOpen: he,
|
|
528
572
|
onClose: () => K(!1),
|
|
529
573
|
onConfirm: () => {
|
|
530
|
-
K(!1),
|
|
574
|
+
K(!1), P("/billing");
|
|
531
575
|
},
|
|
532
576
|
title: "Template Publish Quota Reached",
|
|
533
577
|
message: "You have used the template publishing quota for your current plan. Upgrade to publish more templates."
|
|
534
578
|
})
|
|
535
579
|
]
|
|
536
|
-
}) : /* @__PURE__ */
|
|
580
|
+
}) : /* @__PURE__ */ D(A, {
|
|
537
581
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
538
|
-
children: [/* @__PURE__ */
|
|
582
|
+
children: [/* @__PURE__ */ D("button", {
|
|
539
583
|
onClick: $,
|
|
540
584
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
541
|
-
children: [/* @__PURE__ */
|
|
542
|
-
}), /* @__PURE__ */
|
|
543
|
-
icon: /* @__PURE__ */
|
|
544
|
-
title:
|
|
545
|
-
description: `No component with ID "${
|
|
546
|
-
action: /* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ E(y, { className: "w-4 h-4" }), L("component.backToComponents", "Back to Components")]
|
|
586
|
+
}), /* @__PURE__ */ E(s, {
|
|
587
|
+
icon: /* @__PURE__ */ E(x, { className: "w-8 h-8 text-text-secondary" }),
|
|
588
|
+
title: L("component.notFound", "Component not found"),
|
|
589
|
+
description: `No component with ID "${N}" exists`,
|
|
590
|
+
action: /* @__PURE__ */ E("button", {
|
|
547
591
|
onClick: $,
|
|
548
592
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
549
|
-
children:
|
|
593
|
+
children: L("component.backToComponents", "Back to Components")
|
|
550
594
|
})
|
|
551
595
|
})]
|
|
552
596
|
});
|
|
553
597
|
}
|
|
554
598
|
//#endregion
|
|
555
|
-
export {
|
|
599
|
+
export { M as ComponentDetailPage };
|
|
556
600
|
|
|
557
601
|
//# sourceMappingURL=ComponentDetailPage.js.map
|