@burdenoff/microfe-vibecontrols 2026.1115.3 → 2026.1115.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,10 +10,17 @@ export declare const DEFAULT_COMPONENT_SORT: ComponentTableSort;
|
|
|
10
10
|
/** True when the column is ordered by the server across the whole catalogue. */
|
|
11
11
|
export declare function isServerSortable(column: ComponentColumn): column is Exclude<ComponentColumn, 'tier'>;
|
|
12
12
|
/**
|
|
13
|
-
* The `filter.sort` value for ListComponents.
|
|
14
|
-
*
|
|
13
|
+
* The `filter.sort` value for ListComponents. Tier has no server ordering, so
|
|
14
|
+
* it asks for the default order (name, A to Z): once every row is loaded the
|
|
15
|
+
* table re-sorts by tier, and while rows remain the table shows that default.
|
|
15
16
|
*/
|
|
16
|
-
export declare function toServerSort(sort: ComponentTableSort): ComponentSortInput
|
|
17
|
+
export declare function toServerSort(sort: ComponentTableSort): ComponentSortInput;
|
|
18
|
+
/**
|
|
19
|
+
* The sort the table shows. A tier sort is only meaningful over the whole
|
|
20
|
+
* catalogue, so while more rows remain the table shows the default order,
|
|
21
|
+
* which is also the order the server returns for a tier request.
|
|
22
|
+
*/
|
|
23
|
+
export declare function displayedSort(sort: ComponentTableSort, hasMore: boolean): ComponentTableSort;
|
|
17
24
|
/**
|
|
18
25
|
* Clicking a header: the same column flips direction; a new column starts in
|
|
19
26
|
* the direction that reads best (names A to Z; scores, tiers and versions best first).
|
|
@@ -14,12 +14,16 @@ function a(e) {
|
|
|
14
14
|
return e !== "tier";
|
|
15
15
|
}
|
|
16
16
|
function o(t) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
let n = a(t.column) ? t.column : "name", o = n === t.column ? t.direction : r.direction;
|
|
18
|
+
return {
|
|
19
|
+
field: i[n],
|
|
20
|
+
direction: o === "asc" ? e.Asc : e.Desc
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
function s(e, t) {
|
|
24
|
+
return e.column === "tier" && t ? r : e;
|
|
25
|
+
}
|
|
26
|
+
function c(e, t) {
|
|
23
27
|
return e.column === t ? {
|
|
24
28
|
column: t,
|
|
25
29
|
direction: e.direction === "asc" ? "desc" : "asc"
|
|
@@ -28,19 +32,19 @@ function s(e, t) {
|
|
|
28
32
|
direction: t === "name" || t === "owner" ? "asc" : "desc"
|
|
29
33
|
};
|
|
30
34
|
}
|
|
31
|
-
var
|
|
35
|
+
var l = {
|
|
32
36
|
[n.Bronze]: 0,
|
|
33
37
|
[n.Silver]: 1,
|
|
34
38
|
[n.Gold]: 2
|
|
35
39
|
};
|
|
36
|
-
function
|
|
40
|
+
function u(e, t) {
|
|
37
41
|
let n = t === "asc" ? 1 : -1;
|
|
38
42
|
return [...e].sort((e, t) => {
|
|
39
43
|
if (e.securityTier === null && t.securityTier === null) return e.name.localeCompare(t.name);
|
|
40
44
|
if (e.securityTier === null) return 1;
|
|
41
45
|
if (t.securityTier === null) return -1;
|
|
42
|
-
let r = (
|
|
46
|
+
let r = (l[e.securityTier] - l[t.securityTier]) * n;
|
|
43
47
|
return r === 0 ? e.name.localeCompare(t.name) : r;
|
|
44
48
|
});
|
|
45
49
|
}
|
|
46
|
-
export { r as DEFAULT_COMPONENT_SORT, a as isServerSortable,
|
|
50
|
+
export { r as DEFAULT_COMPONENT_SORT, s as displayedSort, a as isServerSortable, c as nextSort, u as sortRowsByTier, o as toServerSort };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { ComponentsTable } from './ComponentsTable';
|
|
2
2
|
export type { ComponentsTableProps, ComponentTableRowData } from './ComponentsTable';
|
|
3
|
-
export { DEFAULT_COMPONENT_SORT, isServerSortable, nextSort, sortRowsByTier, toServerSort, } from './componentSort';
|
|
3
|
+
export { DEFAULT_COMPONENT_SORT, displayedSort, isServerSortable, nextSort, sortRowsByTier, toServerSort, } from './componentSort';
|
|
4
4
|
export type { ComponentColumn, ComponentTableSort, SortDirection } from './componentSort';
|
|
5
5
|
export { ComponentTierBadge } from './ComponentTierBadge';
|
|
6
6
|
export type { ComponentTierBadgeProps } from './ComponentTierBadge';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentsTable as e } from "./ComponentsTable.js";
|
|
2
|
-
import { DEFAULT_COMPONENT_SORT as t,
|
|
2
|
+
import { DEFAULT_COMPONENT_SORT as t, displayedSort as n, toServerSort as r } from "./componentSort.js";
|
|
3
3
|
import "./ComponentTierBadge.js";
|
|
4
4
|
import "./ComponentHealthCell.js";
|
|
5
|
-
export { e as ComponentsTable, t as DEFAULT_COMPONENT_SORT, n as toServerSort };
|
|
5
|
+
export { e as ComponentsTable, t as DEFAULT_COMPONENT_SORT, n as displayedSort, r as toServerSort };
|
|
@@ -13,131 +13,131 @@ import { GetHelpButton as re } from "../components/shared/GetHelpButton.js";
|
|
|
13
13
|
import { useDraftEntityTags as ie } from "../hooks/useDraftEntityTags.js";
|
|
14
14
|
import "../components/shared/index.js";
|
|
15
15
|
import { isQuotaExhaustedError as o } from "../utils/quotaUtils.js";
|
|
16
|
-
import { ComponentCard as
|
|
17
|
-
import { ComponentForm as
|
|
18
|
-
import { BILLING_PLANS_ROUTE as
|
|
19
|
-
import { DEFAULT_COMPONENT_SORT as
|
|
20
|
-
import { ComponentsTable as
|
|
21
|
-
import { useCreateComponentMutation as
|
|
22
|
-
import { useCallback as
|
|
16
|
+
import { ComponentCard as s } from "../components/idp-components/ComponentCard.js";
|
|
17
|
+
import { ComponentForm as ae } from "../components/idp-components/ComponentForm.js";
|
|
18
|
+
import { BILLING_PLANS_ROUTE as oe, useVibeNavigate as c } from "../providers/VibeControlsProvider.js";
|
|
19
|
+
import { DEFAULT_COMPONENT_SORT as se, displayedSort as ce, toServerSort as le } from "../components/components/componentSort.js";
|
|
20
|
+
import { ComponentsTable as ue } from "../components/components/ComponentsTable.js";
|
|
21
|
+
import { useCreateComponentMutation as de, useListComponentsQuery as fe } from "../generated/wspace-operations.js";
|
|
22
|
+
import { useCallback as l, useEffect as pe, useMemo as u, useState as d } from "react";
|
|
23
23
|
import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
|
-
import { ArrowRight as he, Box as
|
|
24
|
+
import { ArrowRight as he, Box as f, Grid as ge, List as _e, Network as ve, Plus as p, RefreshCw as ye } from "lucide-react";
|
|
25
25
|
import { usePermissions as be } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
26
26
|
import { AnimatePresence as xe } from "framer-motion";
|
|
27
|
-
import { jsx as
|
|
27
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
28
28
|
import { CTAOverflowMenu as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
|
|
29
|
-
import { MotionItem as we, MotionList as Te, MotionPage as
|
|
29
|
+
import { MotionItem as we, MotionList as Te, MotionPage as g } from "@burdenoff/fe-libs/shared/motion";
|
|
30
30
|
import { useAssistantPageControls as Ee } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
31
|
-
import { enumFilter as
|
|
31
|
+
import { enumFilter as _, filtersOf as De, searchOf as Oe } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
|
|
32
32
|
// src/pages/ComponentsPage.tsx
|
|
33
|
-
function
|
|
34
|
-
let
|
|
35
|
-
let r =
|
|
33
|
+
function v() {
|
|
34
|
+
let v = c(), { t: y } = me(), { hasPermission: b, isLoading: x } = be(), S = b(e.COMPONENT_CREATE), C = b(e.COMPONENT_READ), w = l((e, t, n) => {
|
|
35
|
+
let r = y(e, n), i = r === e ? t : r;
|
|
36
36
|
return n ? Object.entries(n).reduce((e, [t, n]) => e.replace(`{{${t}}}`, String(n)), i) : i;
|
|
37
|
-
}, [
|
|
37
|
+
}, [y]), T = u(() => [
|
|
38
38
|
{
|
|
39
39
|
value: "all",
|
|
40
|
-
label:
|
|
40
|
+
label: w("component.allTypes", "All Types")
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
value: "SERVICE",
|
|
44
|
-
label:
|
|
44
|
+
label: w("component.typeService", "Service")
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
value: "FRONTEND",
|
|
48
|
-
label:
|
|
48
|
+
label: w("component.typeFrontend", "Frontend")
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
value: "LIBRARY",
|
|
52
|
-
label:
|
|
52
|
+
label: w("component.typeLibrary", "Library")
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
value: "API",
|
|
56
|
-
label:
|
|
56
|
+
label: w("component.typeApi", "API")
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
value: "MOBILE",
|
|
60
|
-
label:
|
|
60
|
+
label: w("component.typeMobile", "Mobile")
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
value: "DATABASE",
|
|
64
|
-
label:
|
|
64
|
+
label: w("component.typeDatabase", "Database")
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
value: "INFRASTRUCTURE",
|
|
68
|
-
label:
|
|
68
|
+
label: w("component.typeInfrastructure", "Infrastructure")
|
|
69
69
|
},
|
|
70
70
|
{
|
|
71
71
|
value: "CUSTOM",
|
|
72
|
-
label:
|
|
72
|
+
label: w("component.typeCustom", "Custom")
|
|
73
73
|
}
|
|
74
|
-
], [
|
|
74
|
+
], [w]), E = u(() => [
|
|
75
75
|
{
|
|
76
76
|
value: "all",
|
|
77
|
-
label:
|
|
77
|
+
label: w("component.allLifecycles", "All Lifecycles")
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
value: "EXPERIMENTAL",
|
|
81
|
-
label:
|
|
81
|
+
label: w("component.lifecycleExperimental", "Experimental")
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
value: "ACTIVE",
|
|
85
|
-
label:
|
|
85
|
+
label: w("component.lifecycleActive", "Active")
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
value: "DEPRECATED",
|
|
89
|
-
label:
|
|
89
|
+
label: w("component.lifecycleDeprecated", "Deprecated")
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
92
|
value: "END_OF_LIFE",
|
|
93
|
-
label:
|
|
93
|
+
label: w("component.lifecycleEndOfLife", "End of Life")
|
|
94
94
|
}
|
|
95
|
-
], [
|
|
96
|
-
page:
|
|
97
|
-
filters: De([
|
|
95
|
+
], [w]), [D, O] = d(""), [k, A] = d("all"), [j, M] = d("all"), [N, ke] = d(se), Ae = u(() => ({
|
|
96
|
+
page: w("vibecontrols.assistant.page.components", "Components"),
|
|
97
|
+
filters: De([_({
|
|
98
98
|
id: "type",
|
|
99
|
-
label:
|
|
100
|
-
options:
|
|
99
|
+
label: w("component.filterType", "Type"),
|
|
100
|
+
options: T,
|
|
101
101
|
neutral: "all",
|
|
102
|
-
value:
|
|
103
|
-
set:
|
|
104
|
-
}),
|
|
102
|
+
value: k,
|
|
103
|
+
set: A
|
|
104
|
+
}), _({
|
|
105
105
|
id: "lifecycle",
|
|
106
|
-
label:
|
|
107
|
-
options:
|
|
106
|
+
label: w("component.filterLifecycle", "Lifecycle"),
|
|
107
|
+
options: E,
|
|
108
108
|
neutral: "all",
|
|
109
|
-
value:
|
|
110
|
-
set:
|
|
109
|
+
value: j,
|
|
110
|
+
set: M
|
|
111
111
|
})]),
|
|
112
|
-
search: Oe(
|
|
112
|
+
search: Oe(O)
|
|
113
113
|
}), [
|
|
114
|
-
C,
|
|
115
114
|
w,
|
|
116
115
|
T,
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
E,
|
|
117
|
+
k,
|
|
118
|
+
j
|
|
119
119
|
]);
|
|
120
|
-
Ee(
|
|
121
|
-
let [P, F] =
|
|
120
|
+
Ee(Ae);
|
|
121
|
+
let [P, F] = d("table"), [je, I] = d(!1), [Me, L] = d(!1), [R, z] = d(null), [B, Ne] = d([]), [V, H] = d(!1), { data: U, loading: W, error: G, refetch: K, fetchMore: q } = fe({
|
|
122
122
|
variables: {
|
|
123
123
|
filter: {
|
|
124
|
-
type:
|
|
125
|
-
lifecycle:
|
|
126
|
-
search:
|
|
127
|
-
sort:
|
|
124
|
+
type: k === "all" ? void 0 : k,
|
|
125
|
+
lifecycle: j === "all" ? void 0 : j,
|
|
126
|
+
search: D || void 0,
|
|
127
|
+
sort: le(N)
|
|
128
128
|
},
|
|
129
129
|
pagination: {
|
|
130
130
|
limit: 50,
|
|
131
131
|
offset: 0
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
|
-
skip:
|
|
134
|
+
skip: x || !C,
|
|
135
135
|
fetchPolicy: "cache-and-network",
|
|
136
136
|
notifyOnNetworkStatusChange: !0
|
|
137
|
-
}), [
|
|
137
|
+
}), [Pe] = de({
|
|
138
138
|
refetchQueries: ["ListComponents"],
|
|
139
139
|
awaitRefetchQueries: !0
|
|
140
|
-
}), { setDraftTagIds:
|
|
140
|
+
}), { setDraftTagIds: Fe, flushTags: Ie } = ie("VIBECONTROLS_COMPONENT"), J = l((e) => e.map((e) => ({
|
|
141
141
|
id: e.id,
|
|
142
142
|
name: e.name,
|
|
143
143
|
description: e.description ?? null,
|
|
@@ -153,14 +153,10 @@ function _() {
|
|
|
153
153
|
overallScore: e.scorecard?.overallScore ?? null,
|
|
154
154
|
securityTier: e.scorecard?.securityTier ?? null
|
|
155
155
|
})), []);
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
pe(() => {
|
|
157
|
+
Ne(J(U?.vibecontrolsComponents?.items ?? []));
|
|
158
158
|
}, [U?.vibecontrolsComponents?.items, J]);
|
|
159
|
-
let Y = U?.vibecontrolsComponents?.total ?? 0, X = B.length < Y
|
|
160
|
-
c(() => {
|
|
161
|
-
M.column === "tier" && X && N(le);
|
|
162
|
-
}, [M.column, X]);
|
|
163
|
-
let Z = B, Q = B, Ie = s(async () => {
|
|
159
|
+
let Y = U?.vibecontrolsComponents?.total ?? 0, X = B.length < Y, Le = ce(N, X), Z = B, Q = B, Re = l(async () => {
|
|
164
160
|
if (!V && X) {
|
|
165
161
|
H(!0);
|
|
166
162
|
try {
|
|
@@ -193,231 +189,231 @@ function _() {
|
|
|
193
189
|
V,
|
|
194
190
|
X
|
|
195
191
|
]);
|
|
196
|
-
if (
|
|
192
|
+
if (x) return /* @__PURE__ */ m("div", {
|
|
197
193
|
className: "flex items-center justify-center min-h-[400px]",
|
|
198
|
-
children: /* @__PURE__ */
|
|
194
|
+
children: /* @__PURE__ */ m("p", {
|
|
199
195
|
className: "text-text-secondary",
|
|
200
196
|
children: "Loading permissions…"
|
|
201
197
|
})
|
|
202
198
|
});
|
|
203
|
-
if (!
|
|
199
|
+
if (!C) return /* @__PURE__ */ m("div", {
|
|
204
200
|
className: "flex items-center justify-center min-h-[400px]",
|
|
205
|
-
children: /* @__PURE__ */
|
|
201
|
+
children: /* @__PURE__ */ h("div", {
|
|
206
202
|
className: "text-center space-y-2",
|
|
207
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ m("h2", {
|
|
208
204
|
className: "text-lg font-semibold text-text-primary tracking-tight",
|
|
209
205
|
children: "Access Denied"
|
|
210
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ m("p", {
|
|
211
207
|
className: "text-sm text-text-secondary",
|
|
212
208
|
children: "You don't have permission to access this page."
|
|
213
209
|
})]
|
|
214
210
|
})
|
|
215
211
|
});
|
|
216
212
|
let $ = (e) => {
|
|
217
|
-
|
|
213
|
+
v(`/components/${e.id}`);
|
|
218
214
|
};
|
|
219
|
-
return G && Z.length === 0 ? /* @__PURE__ */
|
|
215
|
+
return G && Z.length === 0 ? /* @__PURE__ */ m(g, {
|
|
220
216
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
221
|
-
children: /* @__PURE__ */
|
|
222
|
-
title:
|
|
217
|
+
children: /* @__PURE__ */ m(r, {
|
|
218
|
+
title: w("component.failedLoad", "Failed to load components"),
|
|
223
219
|
message: G.message,
|
|
224
220
|
onRetry: () => K()
|
|
225
221
|
})
|
|
226
|
-
}) : /* @__PURE__ */
|
|
222
|
+
}) : /* @__PURE__ */ h(g, {
|
|
227
223
|
className: "space-y-6 px-6 lg:px-8 py-6 bg-bg-canvas min-h-screen",
|
|
228
224
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
title:
|
|
231
|
-
description: Y > 0 ?
|
|
232
|
-
actions: /* @__PURE__ */
|
|
233
|
-
primary:
|
|
234
|
-
label:
|
|
225
|
+
/* @__PURE__ */ m(n, {
|
|
226
|
+
title: w("component.title", "Components"),
|
|
227
|
+
description: Y > 0 ? w("component.description", "{{total}} components in your catalog", { total: Z.length }) : w("component.descriptionEmpty", "Track every service, frontend, library, and API in your system — dependencies, owners, and lifecycle in one place"),
|
|
228
|
+
actions: /* @__PURE__ */ m(Se, {
|
|
229
|
+
primary: S ? {
|
|
230
|
+
label: w("component.createComponent", "Create Component"),
|
|
235
231
|
onSelect: () => I(!0),
|
|
236
|
-
icon: /* @__PURE__ */ p
|
|
232
|
+
icon: /* @__PURE__ */ m(p, { className: "size-4" })
|
|
237
233
|
} : void 0,
|
|
238
234
|
actions: [{
|
|
239
|
-
label:
|
|
235
|
+
label: w("common.refresh", "Refresh"),
|
|
240
236
|
onSelect: () => void K(),
|
|
241
237
|
disabled: W,
|
|
242
|
-
icon: /* @__PURE__ */
|
|
238
|
+
icon: /* @__PURE__ */ m(ye, { className: `size-4 ${W ? "animate-spin" : ""}` })
|
|
243
239
|
}]
|
|
244
240
|
})
|
|
245
241
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
icon: /* @__PURE__ */
|
|
248
|
-
children:
|
|
242
|
+
/* @__PURE__ */ m(Ce, {
|
|
243
|
+
icon: /* @__PURE__ */ m(f, { className: "size-4" }),
|
|
244
|
+
children: w("component.purpose", "Components are the individual building blocks of your software — each service, frontend, library or API — tracked with its owner, dependencies and lifecycle. Register your components here to build a living map of your system, so anyone can find what something is, who runs it and what it depends on.")
|
|
249
245
|
}),
|
|
250
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ h("button", {
|
|
251
247
|
type: "button",
|
|
252
|
-
onClick: () =>
|
|
248
|
+
onClick: () => v("/environments"),
|
|
253
249
|
"data-tour": "vibecontrols-component-env-topology",
|
|
254
250
|
className: "w-full flex items-center gap-4 text-left px-4 py-3 bg-bg-surface border border-border-seam rounded-card shadow-elevation-1 hover:bg-bg-sunken hover:border-border-strong transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
255
251
|
children: [
|
|
256
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ m("span", {
|
|
257
253
|
className: "flex-shrink-0 size-9 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
258
|
-
children: /* @__PURE__ */
|
|
254
|
+
children: /* @__PURE__ */ m(ve, {
|
|
259
255
|
className: "size-4 text-action-primary-bg",
|
|
260
256
|
"aria-hidden": "true"
|
|
261
257
|
})
|
|
262
258
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ h("span", {
|
|
264
260
|
className: "min-w-0 flex-1",
|
|
265
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ m("span", {
|
|
266
262
|
className: "block text-sm font-medium text-text-primary",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */
|
|
263
|
+
children: w("component.envTopologyLink", "Environment Topology")
|
|
264
|
+
}), /* @__PURE__ */ m("span", {
|
|
269
265
|
className: "block text-sm text-text-secondary",
|
|
270
|
-
children:
|
|
266
|
+
children: w("component.envTopologyLinkDescription", "See which version of every component is currently deployed across Development, Staging and Production.")
|
|
271
267
|
})]
|
|
272
268
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ m(he, {
|
|
274
270
|
className: "size-4 flex-shrink-0 text-text-muted",
|
|
275
271
|
"aria-hidden": "true"
|
|
276
272
|
})
|
|
277
273
|
]
|
|
278
274
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ h("div", {
|
|
280
276
|
className: "space-y-3",
|
|
281
|
-
children: [/* @__PURE__ */
|
|
277
|
+
children: [/* @__PURE__ */ h("div", {
|
|
282
278
|
className: "flex items-center gap-2",
|
|
283
|
-
children: [/* @__PURE__ */
|
|
279
|
+
children: [/* @__PURE__ */ m("div", {
|
|
284
280
|
"data-tour": "vibecontrols-component-search",
|
|
285
281
|
className: "flex-1 sm:w-64 sm:flex-none",
|
|
286
|
-
children: /* @__PURE__ */
|
|
287
|
-
value:
|
|
288
|
-
onChange:
|
|
289
|
-
placeholder:
|
|
282
|
+
children: /* @__PURE__ */ m(ne, {
|
|
283
|
+
value: D,
|
|
284
|
+
onChange: O,
|
|
285
|
+
placeholder: w("component.searchPlaceholder", "Search components..."),
|
|
290
286
|
className: "w-full"
|
|
291
287
|
})
|
|
292
|
-
}), /* @__PURE__ */
|
|
288
|
+
}), /* @__PURE__ */ h("div", {
|
|
293
289
|
role: "group",
|
|
294
|
-
"aria-label":
|
|
290
|
+
"aria-label": w("component.viewMode", "View mode"),
|
|
295
291
|
className: "flex flex-shrink-0 items-center gap-1 rounded-button border border-border-subtle bg-bg-sunken p-1",
|
|
296
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ m("button", {
|
|
297
293
|
type: "button",
|
|
298
294
|
onClick: () => F("table"),
|
|
299
295
|
"aria-pressed": P === "table",
|
|
300
|
-
"aria-label":
|
|
301
|
-
title:
|
|
296
|
+
"aria-label": w("component.tableViewTitle", "Table view"),
|
|
297
|
+
title: w("component.tableViewTitle", "Table view"),
|
|
302
298
|
className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${P === "table" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
|
|
303
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ m(_e, {
|
|
304
300
|
className: "size-4 text-text-secondary",
|
|
305
301
|
"aria-hidden": "true"
|
|
306
302
|
})
|
|
307
|
-
}), /* @__PURE__ */
|
|
303
|
+
}), /* @__PURE__ */ m("button", {
|
|
308
304
|
type: "button",
|
|
309
305
|
onClick: () => F("grid"),
|
|
310
306
|
"aria-pressed": P === "grid",
|
|
311
|
-
"aria-label":
|
|
312
|
-
title:
|
|
307
|
+
"aria-label": w("component.gridViewTitle", "Grid view"),
|
|
308
|
+
title: w("component.gridViewTitle", "Grid view"),
|
|
313
309
|
className: `flex size-8 max-md:size-9 items-center justify-center rounded transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${P === "grid" ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-surface/60"}`,
|
|
314
|
-
children: /* @__PURE__ */
|
|
310
|
+
children: /* @__PURE__ */ m(ge, {
|
|
315
311
|
className: "size-4 text-text-secondary",
|
|
316
312
|
"aria-hidden": "true"
|
|
317
313
|
})
|
|
318
314
|
})]
|
|
319
315
|
})]
|
|
320
|
-
}), /* @__PURE__ */
|
|
316
|
+
}), /* @__PURE__ */ h("div", {
|
|
321
317
|
className: "flex items-center gap-2 sm:gap-3 flex-wrap",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
318
|
+
children: [/* @__PURE__ */ m("div", {
|
|
323
319
|
"data-tour": "vibecontrols-component-type-filter",
|
|
324
|
-
children: /* @__PURE__ */
|
|
325
|
-
label:
|
|
326
|
-
value:
|
|
327
|
-
options:
|
|
328
|
-
onChange:
|
|
320
|
+
children: /* @__PURE__ */ m(a, {
|
|
321
|
+
label: w("component.filterType", "Type"),
|
|
322
|
+
value: k,
|
|
323
|
+
options: T,
|
|
324
|
+
onChange: A
|
|
329
325
|
})
|
|
330
|
-
}), /* @__PURE__ */
|
|
326
|
+
}), /* @__PURE__ */ m("div", {
|
|
331
327
|
"data-tour": "vibecontrols-component-lifecycle-filter",
|
|
332
|
-
children: /* @__PURE__ */
|
|
333
|
-
label:
|
|
334
|
-
value:
|
|
335
|
-
options:
|
|
336
|
-
onChange:
|
|
328
|
+
children: /* @__PURE__ */ m(a, {
|
|
329
|
+
label: w("component.filterLifecycle", "Lifecycle"),
|
|
330
|
+
value: j,
|
|
331
|
+
options: E,
|
|
332
|
+
onChange: M
|
|
337
333
|
})
|
|
338
334
|
})]
|
|
339
335
|
})]
|
|
340
336
|
}),
|
|
341
|
-
/* @__PURE__ */
|
|
337
|
+
/* @__PURE__ */ h("p", {
|
|
342
338
|
className: "text-sm text-text-secondary",
|
|
343
|
-
children: [
|
|
339
|
+
children: [w("component.showingResults", "Showing {{filtered}} of {{total}} components", {
|
|
344
340
|
filtered: Q.length,
|
|
345
341
|
total: Y
|
|
346
|
-
}), W && /* @__PURE__ */
|
|
342
|
+
}), W && /* @__PURE__ */ m("span", {
|
|
347
343
|
className: "ml-2 text-text-muted",
|
|
348
|
-
children:
|
|
344
|
+
children: w("common.refreshing", "(refreshing...)")
|
|
349
345
|
})]
|
|
350
346
|
}),
|
|
351
|
-
W && Z.length === 0 ? /* @__PURE__ */
|
|
347
|
+
W && Z.length === 0 ? /* @__PURE__ */ m(ee, {
|
|
352
348
|
variant: P === "table" ? "rows" : "cards",
|
|
353
349
|
count: 6
|
|
354
|
-
}) : Q.length > 0 ? P === "table" ? /* @__PURE__ */
|
|
350
|
+
}) : Q.length > 0 ? P === "table" ? /* @__PURE__ */ m("div", {
|
|
355
351
|
"data-tour": "vibecontrols-component-grid",
|
|
356
|
-
children: /* @__PURE__ */
|
|
352
|
+
children: /* @__PURE__ */ m(ue, {
|
|
357
353
|
components: Q,
|
|
358
354
|
onOpen: $,
|
|
359
|
-
sort:
|
|
360
|
-
onSortChange:
|
|
355
|
+
sort: Le,
|
|
356
|
+
onSortChange: ke,
|
|
361
357
|
canSortTier: !X
|
|
362
358
|
})
|
|
363
|
-
}) : /* @__PURE__ */
|
|
359
|
+
}) : /* @__PURE__ */ m(xe, {
|
|
364
360
|
mode: "wait",
|
|
365
|
-
children: /* @__PURE__ */
|
|
361
|
+
children: /* @__PURE__ */ m(Te, {
|
|
366
362
|
stagger: .04,
|
|
367
363
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",
|
|
368
364
|
"data-tour": "vibecontrols-component-grid",
|
|
369
|
-
children: Q.map((e) => /* @__PURE__ */
|
|
365
|
+
children: Q.map((e) => /* @__PURE__ */ m(we, { children: /* @__PURE__ */ m(s, {
|
|
370
366
|
component: e,
|
|
371
367
|
onOpen: $
|
|
372
368
|
}) }, e.id))
|
|
373
369
|
}, "component-grid")
|
|
374
|
-
}) : /* @__PURE__ */
|
|
375
|
-
icon: /* @__PURE__ */
|
|
370
|
+
}) : /* @__PURE__ */ m(te, {
|
|
371
|
+
icon: /* @__PURE__ */ m(f, {
|
|
376
372
|
className: "size-6 text-action-primary-bg",
|
|
377
373
|
"aria-hidden": "true"
|
|
378
374
|
}),
|
|
379
|
-
illustration:
|
|
380
|
-
title:
|
|
381
|
-
description:
|
|
382
|
-
action: !
|
|
375
|
+
illustration: D || k !== "all" || j !== "all" ? "empty-search" : "empty-data",
|
|
376
|
+
title: D || k !== "all" || j !== "all" ? w("component.emptyNoResults", "No components found") : w("component.emptyNoComponents", "No components yet"),
|
|
377
|
+
description: D || k !== "all" || j !== "all" ? w("component.emptyAdjustSearch", "Try adjusting your search or filters") : w("component.emptyCreate", "A component is any piece of software in your system — a backend service, a frontend app, a shared library, an API. Register one to start tracking its dependencies, owner, and lifecycle stage."),
|
|
378
|
+
action: !D && k === "all" && j === "all" ? /* @__PURE__ */ h("div", {
|
|
383
379
|
className: "flex items-center gap-2",
|
|
384
|
-
children: [
|
|
380
|
+
children: [S && /* @__PURE__ */ h("button", {
|
|
385
381
|
type: "button",
|
|
386
382
|
onClick: () => I(!0),
|
|
387
383
|
className: "flex items-center gap-2 px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
388
|
-
children: [/* @__PURE__ */ p
|
|
389
|
-
}), /* @__PURE__ */
|
|
384
|
+
children: [/* @__PURE__ */ m(p, { className: "size-4" }), w("component.createComponent", "Create Component")]
|
|
385
|
+
}), /* @__PURE__ */ m(re, { prompt: "What is a Component in VibeControls and how do I add one?" })]
|
|
390
386
|
}) : void 0
|
|
391
387
|
}),
|
|
392
|
-
X && Q.length > 0 && /* @__PURE__ */
|
|
388
|
+
X && Q.length > 0 && /* @__PURE__ */ m("div", {
|
|
393
389
|
className: "flex justify-center pt-2",
|
|
394
|
-
children: /* @__PURE__ */
|
|
390
|
+
children: /* @__PURE__ */ m("button", {
|
|
395
391
|
type: "button",
|
|
396
|
-
onClick:
|
|
392
|
+
onClick: Re,
|
|
397
393
|
disabled: V,
|
|
398
394
|
className: "flex items-center gap-2 px-4 py-2 bg-bg-sunken text-text-primary rounded-button border border-border-subtle hover:bg-bg-surface hover:border-border-strong transition-colors disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
|
|
399
|
-
children: V ?
|
|
395
|
+
children: V ? w("common.loading", "Loading...") : w("common.loadMore", "Load more")
|
|
400
396
|
})
|
|
401
397
|
}),
|
|
402
|
-
R && /* @__PURE__ */
|
|
398
|
+
R && /* @__PURE__ */ m("div", {
|
|
403
399
|
className: "fixed bottom-4 right-4 z-50 px-4 py-3 bg-status-success-bg-subtle text-status-success-text border border-status-success-border rounded-card shadow-elevation-3 text-sm",
|
|
404
400
|
children: R
|
|
405
401
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
isOpen:
|
|
402
|
+
/* @__PURE__ */ m(t, {
|
|
403
|
+
isOpen: Me,
|
|
408
404
|
onClose: () => L(!1),
|
|
409
405
|
onConfirm: () => {
|
|
410
|
-
L(!1),
|
|
406
|
+
L(!1), v(oe);
|
|
411
407
|
},
|
|
412
408
|
title: "Component Quota Reached",
|
|
413
409
|
message: "You've reached the maximum number of components on your current plan. Upgrade your plan or purchase an add-on to register more components."
|
|
414
410
|
}),
|
|
415
|
-
/* @__PURE__ */
|
|
416
|
-
isOpen:
|
|
411
|
+
/* @__PURE__ */ m(ae, {
|
|
412
|
+
isOpen: je,
|
|
417
413
|
onClose: () => I(!1),
|
|
418
414
|
onSubmit: async (e) => {
|
|
419
415
|
try {
|
|
420
|
-
let t = await
|
|
416
|
+
let t = await Pe({ variables: { input: {
|
|
421
417
|
name: e.name,
|
|
422
418
|
description: e.description || void 0,
|
|
423
419
|
type: e.type,
|
|
@@ -436,9 +432,9 @@ function _() {
|
|
|
436
432
|
I(!1), L(!0);
|
|
437
433
|
return;
|
|
438
434
|
}
|
|
439
|
-
if (!t.data?.createVibecontrolsComponent?.id) throw Error(
|
|
435
|
+
if (!t.data?.createVibecontrolsComponent?.id) throw Error(w("component.failedCreate", "Failed to create component"));
|
|
440
436
|
let n = t.data.createVibecontrolsComponent.id;
|
|
441
|
-
I(!1), z(
|
|
437
|
+
I(!1), z(w("component.createdSuccess", "Component created successfully")), await Ie(n), await K(), setTimeout(() => z(null), 3e3);
|
|
442
438
|
} catch (e) {
|
|
443
439
|
if (o(e)) {
|
|
444
440
|
I(!1), L(!0);
|
|
@@ -447,15 +443,15 @@ function _() {
|
|
|
447
443
|
throw e;
|
|
448
444
|
}
|
|
449
445
|
},
|
|
450
|
-
extraSection: /* @__PURE__ */
|
|
446
|
+
extraSection: /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h3", {
|
|
451
447
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
452
|
-
children:
|
|
453
|
-
}), /* @__PURE__ */
|
|
448
|
+
children: w("component.tags", "Tags")
|
|
449
|
+
}), /* @__PURE__ */ m(i, {
|
|
454
450
|
entityType: "VIBECONTROLS_COMPONENT",
|
|
455
|
-
onDraftChange:
|
|
451
|
+
onDraftChange: Fe
|
|
456
452
|
})] })
|
|
457
453
|
})
|
|
458
454
|
]
|
|
459
455
|
});
|
|
460
456
|
}
|
|
461
|
-
export {
|
|
457
|
+
export { v as ComponentsPage };
|