@burdenoff/microfe-vibecontrols 2026.601.21 → 2026.601.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/ActionCard.js +77 -66
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/AIContextsTab.js +186 -173
- package/dist/components/ai/AIContextsTab.js.map +1 -1
- package/dist/components/ai/AITemplatesTab.js +135 -125
- package/dist/components/ai/AITemplatesTab.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +151 -137
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +17 -16
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPreviewPanel.js +25 -24
- package/dist/components/docs/DocsPreviewPanel.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +110 -94
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +8 -8
- package/dist/components/scorecard/ScorecardPanel.js +271 -257
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sharing/EntityShareButton.js +58 -0
- package/dist/components/sharing/EntityShareButton.js.map +1 -0
- package/dist/components/sharing/entityShareOps.js +603 -0
- package/dist/components/sharing/entityShareOps.js.map +1 -0
- package/dist/components/sharing/index.js +3 -0
- package/dist/components/sharing/shareRegistry.js +37 -12
- package/dist/components/sharing/shareRegistry.js.map +1 -1
- package/dist/components/sharing/useEntityShareController.js +88 -0
- package/dist/components/sharing/useEntityShareController.js.map +1 -0
- package/dist/constants/permissions.js +11 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +162 -162
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/CatalogDetailPage.js +264 -250
- package/dist/pages/CatalogDetailPage.js.map +1 -1
- package/dist/pages/ComponentDetailPage.js +124 -113
- package/dist/pages/ComponentDetailPage.js.map +1 -1
- package/dist/pages/TargetDetailsPage.js +139 -126
- package/dist/pages/TargetDetailsPage.js.map +1 -1
- package/dist/pages/TemplateDetailPage.js +78 -67
- package/dist/pages/TemplateDetailPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +1 -1
- package/dist/pages/VibeDetailsPage.js +484 -484
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/tunnels/TunnelDetailsPage.js +91 -77
- package/dist/pages/tunnels/TunnelDetailsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,15 +10,17 @@ import { EmptyState as te } from "../components/shared/EmptyState.js";
|
|
|
10
10
|
import { Card as f } from "../components/shared/Card.js";
|
|
11
11
|
import "../components/shared/index.js";
|
|
12
12
|
import { VIBE_PERMISSIONS as ne } from "../constants/permissions.js";
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
13
|
+
import { EntityShareButton as re } from "../components/sharing/EntityShareButton.js";
|
|
14
|
+
import "../components/sharing/index.js";
|
|
15
|
+
import { PageSkeleton as ie } from "../components/shared/PageSkeleton.js";
|
|
16
|
+
import { TemplateWizard as p } from "../components/templates/TemplateWizard.js";
|
|
15
17
|
import "../components/templates/index.js";
|
|
16
|
-
import { useCallback as
|
|
17
|
-
import { useI18n as
|
|
18
|
-
import { ArrowLeft as
|
|
19
|
-
import { useParams as
|
|
20
|
-
import { usePermissions as
|
|
21
|
-
import { Fragment as
|
|
18
|
+
import { useCallback as m, useState as h } from "react";
|
|
19
|
+
import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
import { ArrowLeft as _, CheckCircle2 as v, Clock as ae, Copy as y, FileCode as b, FolderTree as oe, Github as se, Layers as ce, Loader2 as le, RefreshCw as ue, Tag as x, Trash2 as de, Variable as fe, XCircle as pe } from "lucide-react";
|
|
21
|
+
import { useParams as me } from "react-router-dom";
|
|
22
|
+
import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
|
+
import { Fragment as ge, jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
22
24
|
import { MotionPage as w } from "@burdenoff/fe-libs/shared/motion";
|
|
23
25
|
//#region src/pages/TemplateDetailPage.tsx
|
|
24
26
|
function T(e, t) {
|
|
@@ -89,14 +91,14 @@ var O = {
|
|
|
89
91
|
CUSTOM: "bg-bg-sunken text-text-secondary"
|
|
90
92
|
};
|
|
91
93
|
function k() {
|
|
92
|
-
let { t: T } =
|
|
94
|
+
let { t: T } = g(), { id: k } = me(), A = l(), { hasPermission: j, isLoading: M } = he(), N = m((e, t) => {
|
|
93
95
|
let n = T(e);
|
|
94
96
|
return n === e ? t : n;
|
|
95
|
-
}, [T]), [P, F] =
|
|
97
|
+
}, [T]), [P, F] = h(!1), [I, L] = h(!1), [_e, R] = h(!1), [ve, z] = h(!1), [B, V] = h(null), [H, ye] = h(null), [U, W] = h(null), [G, K] = h(null), { data: q, loading: J, error: Y, refetch: X } = n({
|
|
96
98
|
variables: { id: k || "" },
|
|
97
99
|
skip: !k,
|
|
98
100
|
fetchPolicy: "cache-and-network"
|
|
99
|
-
}), [
|
|
101
|
+
}), [be] = r({ refetchQueries: ["ListComponents"] }), [xe] = e({ refetchQueries: ["ListTemplates"] }), [Z] = a(), [Se] = t(), { data: Ce } = i({
|
|
100
102
|
variables: {
|
|
101
103
|
filter: { status: "ACTIVE" },
|
|
102
104
|
pagination: {
|
|
@@ -105,7 +107,7 @@ function k() {
|
|
|
105
107
|
}
|
|
106
108
|
},
|
|
107
109
|
fetchPolicy: "cache-first"
|
|
108
|
-
}),
|
|
110
|
+
}), we = (Ce?.getConnections?.items ?? []).filter((e) => e.provider?.key === "github").map((e) => ({
|
|
109
111
|
id: e.id,
|
|
110
112
|
name: e.name,
|
|
111
113
|
externalAccountEmail: e.externalAccountEmail,
|
|
@@ -114,7 +116,7 @@ function k() {
|
|
|
114
116
|
key: e.provider.key,
|
|
115
117
|
name: e.provider.name
|
|
116
118
|
}
|
|
117
|
-
})), Q =
|
|
119
|
+
})), Q = q?.vibecontrolsTemplate ?? null;
|
|
118
120
|
if (M) return /* @__PURE__ */ S("div", {
|
|
119
121
|
className: "flex items-center justify-center min-h-[400px]",
|
|
120
122
|
children: /* @__PURE__ */ S("p", {
|
|
@@ -144,15 +146,15 @@ function k() {
|
|
|
144
146
|
type: "button",
|
|
145
147
|
onClick: $,
|
|
146
148
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
147
|
-
children: [/* @__PURE__ */ S(
|
|
148
|
-
}), /* @__PURE__ */ S(
|
|
149
|
+
children: [/* @__PURE__ */ S(_, { className: "size-4" }), N("template.backToTemplates", "Back to Templates")]
|
|
150
|
+
}), /* @__PURE__ */ S(ie, { variant: "detail" })]
|
|
149
151
|
}) : Y && !Q ? /* @__PURE__ */ C(w, {
|
|
150
152
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
151
153
|
children: [/* @__PURE__ */ C("button", {
|
|
152
154
|
type: "button",
|
|
153
155
|
onClick: $,
|
|
154
156
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
155
|
-
children: [/* @__PURE__ */ S(
|
|
157
|
+
children: [/* @__PURE__ */ S(_, { className: "size-4" }), N("template.backToTemplates", "Back to Templates")]
|
|
156
158
|
}), /* @__PURE__ */ S(u, {
|
|
157
159
|
title: N("template.failedLoad", "Failed to load template"),
|
|
158
160
|
message: Y.message,
|
|
@@ -161,26 +163,26 @@ function k() {
|
|
|
161
163
|
}) : Q ? /* @__PURE__ */ C(w, {
|
|
162
164
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
163
165
|
children: [
|
|
164
|
-
|
|
166
|
+
B && /* @__PURE__ */ S("div", {
|
|
165
167
|
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",
|
|
166
|
-
children:
|
|
168
|
+
children: B
|
|
167
169
|
}),
|
|
168
|
-
|
|
170
|
+
U && /* @__PURE__ */ S("div", {
|
|
169
171
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-warning-bg text-status-warning-text px-4 py-3 rounded-md shadow-lg text-sm max-w-sm",
|
|
170
|
-
children:
|
|
172
|
+
children: U
|
|
171
173
|
}),
|
|
172
|
-
|
|
174
|
+
H && /* @__PURE__ */ S("div", {
|
|
173
175
|
className: "fixed top-4 left-4 right-4 sm:left-auto z-50 bg-status-error-bg text-status-error-text px-4 py-3 rounded-md shadow-lg",
|
|
174
|
-
children:
|
|
176
|
+
children: H
|
|
175
177
|
}),
|
|
176
|
-
|
|
178
|
+
G && /* @__PURE__ */ S("div", {
|
|
177
179
|
className: "fixed inset-0 z-[9999] flex items-center justify-center p-4",
|
|
178
180
|
style: { backgroundColor: "rgba(0,0,0,0.55)" },
|
|
179
181
|
children: /* @__PURE__ */ C("div", {
|
|
180
182
|
className: "bg-bg-surface border border-border-default rounded-xl shadow-2xl p-8 flex flex-col items-center gap-4 max-w-xs w-full",
|
|
181
|
-
children: [
|
|
183
|
+
children: [G.done ? /* @__PURE__ */ S(v, { className: "size-10 text-status-success-text" }) : G.error ? /* @__PURE__ */ S(pe, { className: "size-10 text-status-error-text" }) : /* @__PURE__ */ S(le, { className: "size-10 text-action-primary-bg animate-spin" }), /* @__PURE__ */ S("p", {
|
|
182
184
|
className: "text-sm font-medium text-text-primary text-center",
|
|
183
|
-
children:
|
|
185
|
+
children: G.stage
|
|
184
186
|
})]
|
|
185
187
|
})
|
|
186
188
|
}),
|
|
@@ -188,7 +190,7 @@ function k() {
|
|
|
188
190
|
type: "button",
|
|
189
191
|
onClick: $,
|
|
190
192
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
191
|
-
children: [/* @__PURE__ */ S(
|
|
193
|
+
children: [/* @__PURE__ */ S(_, { className: "size-4" }), N("template.backToTemplates", "Back to Templates")]
|
|
192
194
|
}),
|
|
193
195
|
/* @__PURE__ */ S(ee, {
|
|
194
196
|
title: Q.name,
|
|
@@ -196,6 +198,15 @@ function k() {
|
|
|
196
198
|
actions: /* @__PURE__ */ C("div", {
|
|
197
199
|
className: "flex items-center gap-2 flex-wrap",
|
|
198
200
|
children: [
|
|
201
|
+
/* @__PURE__ */ S(re, {
|
|
202
|
+
entity: "template",
|
|
203
|
+
resource: {
|
|
204
|
+
id: Q.id,
|
|
205
|
+
name: Q.name
|
|
206
|
+
},
|
|
207
|
+
label: N("template.share", "Share"),
|
|
208
|
+
variant: "button"
|
|
209
|
+
}),
|
|
199
210
|
/* @__PURE__ */ S("button", {
|
|
200
211
|
type: "button",
|
|
201
212
|
onClick: () => X(),
|
|
@@ -208,15 +219,15 @@ function k() {
|
|
|
208
219
|
type: "button",
|
|
209
220
|
onClick: () => F(!0),
|
|
210
221
|
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",
|
|
211
|
-
children: [/* @__PURE__ */ S(
|
|
222
|
+
children: [/* @__PURE__ */ S(y, { className: "size-4" }), N("template.useTemplate", "Use Template")]
|
|
212
223
|
}),
|
|
213
224
|
/* @__PURE__ */ C("button", {
|
|
214
225
|
type: "button",
|
|
215
226
|
"data-testid": "template-delete-button",
|
|
216
|
-
onClick: () =>
|
|
227
|
+
onClick: () => R(!0),
|
|
217
228
|
className: "flex items-center gap-2 px-4 py-2 bg-status-error-bg text-status-error-text rounded-md hover:opacity-90 transition-opacity",
|
|
218
229
|
"aria-label": N("template.deleteTemplate", "Delete Template"),
|
|
219
|
-
children: [/* @__PURE__ */ S(
|
|
230
|
+
children: [/* @__PURE__ */ S(de, {
|
|
220
231
|
className: "size-4",
|
|
221
232
|
"aria-hidden": "true"
|
|
222
233
|
}), N("common.delete", "Delete")]
|
|
@@ -245,7 +256,7 @@ function k() {
|
|
|
245
256
|
/* @__PURE__ */ C("span", {
|
|
246
257
|
className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
|
|
247
258
|
children: [
|
|
248
|
-
/* @__PURE__ */ S(
|
|
259
|
+
/* @__PURE__ */ S(y, { className: "size-3.5" }),
|
|
249
260
|
Q.cloneCount,
|
|
250
261
|
" ",
|
|
251
262
|
N("template.clones", "clones")
|
|
@@ -261,7 +272,7 @@ function k() {
|
|
|
261
272
|
}),
|
|
262
273
|
/* @__PURE__ */ C("span", {
|
|
263
274
|
className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
|
|
264
|
-
children: [/* @__PURE__ */ S(
|
|
275
|
+
children: [/* @__PURE__ */ S(ae, { className: "size-3.5" }), new Date(Q.createdAt).toLocaleDateString()]
|
|
265
276
|
})
|
|
266
277
|
]
|
|
267
278
|
}),
|
|
@@ -269,12 +280,12 @@ function k() {
|
|
|
269
280
|
className: "flex flex-wrap gap-2",
|
|
270
281
|
children: Q.tags.map((e) => /* @__PURE__ */ C("span", {
|
|
271
282
|
className: "inline-flex items-center gap-1 px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
272
|
-
children: [/* @__PURE__ */ S(
|
|
283
|
+
children: [/* @__PURE__ */ S(x, { className: "size-3" }), e]
|
|
273
284
|
}, e))
|
|
274
285
|
}),
|
|
275
286
|
/* @__PURE__ */ C(f, { children: [/* @__PURE__ */ C("div", {
|
|
276
287
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
277
|
-
children: [/* @__PURE__ */ S(
|
|
288
|
+
children: [/* @__PURE__ */ S(x, { className: "size-5" }), /* @__PURE__ */ S("h3", {
|
|
278
289
|
className: "font-semibold text-text-primary",
|
|
279
290
|
children: N("template.tags", "Tags")
|
|
280
291
|
})]
|
|
@@ -299,7 +310,7 @@ function k() {
|
|
|
299
310
|
className: "flex items-center gap-3 text-left hover:bg-bg-sunken p-2 -m-2 rounded-md transition-colors",
|
|
300
311
|
children: [/* @__PURE__ */ S("div", {
|
|
301
312
|
className: "size-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center flex-shrink-0",
|
|
302
|
-
children: /* @__PURE__ */ S(
|
|
313
|
+
children: /* @__PURE__ */ S(b, { className: "size-5 text-action-primary-bg" })
|
|
303
314
|
}), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
|
|
304
315
|
className: "font-medium text-text-primary",
|
|
305
316
|
children: Q.sourceComponent.name
|
|
@@ -316,7 +327,7 @@ function k() {
|
|
|
316
327
|
Q.clonedComponents && Q.clonedComponents.length > 0 && /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ C("div", {
|
|
317
328
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
318
329
|
children: [
|
|
319
|
-
/* @__PURE__ */ S(
|
|
330
|
+
/* @__PURE__ */ S(y, { className: "size-5" }),
|
|
320
331
|
/* @__PURE__ */ S("h3", {
|
|
321
332
|
className: "font-semibold text-text-primary",
|
|
322
333
|
children: N("template.createdComponents", "Created Components")
|
|
@@ -339,7 +350,7 @@ function k() {
|
|
|
339
350
|
children: [
|
|
340
351
|
/* @__PURE__ */ S("div", {
|
|
341
352
|
className: "size-8 rounded-md bg-action-primary-bg/10 flex items-center justify-center flex-shrink-0",
|
|
342
|
-
children: /* @__PURE__ */ S(
|
|
353
|
+
children: /* @__PURE__ */ S(b, { className: "size-4 text-action-primary-bg" })
|
|
343
354
|
}),
|
|
344
355
|
/* @__PURE__ */ C("div", {
|
|
345
356
|
className: "flex-1 min-w-0",
|
|
@@ -352,7 +363,7 @@ function k() {
|
|
|
352
363
|
e.type,
|
|
353
364
|
" · ",
|
|
354
365
|
e.lifecycle,
|
|
355
|
-
e.repositoryUrl && /* @__PURE__ */ C(
|
|
366
|
+
e.repositoryUrl && /* @__PURE__ */ C(ge, { children: [
|
|
356
367
|
" ",
|
|
357
368
|
"·",
|
|
358
369
|
" ",
|
|
@@ -374,7 +385,7 @@ function k() {
|
|
|
374
385
|
Array.isArray(Q.variables) && Q.variables.length > 0 && /* @__PURE__ */ C(f, { children: [/* @__PURE__ */ C("div", {
|
|
375
386
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
376
387
|
children: [
|
|
377
|
-
/* @__PURE__ */ S(
|
|
388
|
+
/* @__PURE__ */ S(fe, { className: "size-5" }),
|
|
378
389
|
/* @__PURE__ */ S("h3", {
|
|
379
390
|
className: "font-semibold text-text-primary",
|
|
380
391
|
children: N("template.variables", "Template Variables")
|
|
@@ -462,19 +473,19 @@ function k() {
|
|
|
462
473
|
children: typeof Q.fileTree == "string" ? Q.fileTree : JSON.stringify(Q.fileTree, null, 2)
|
|
463
474
|
})
|
|
464
475
|
})] }),
|
|
465
|
-
P && /* @__PURE__ */ S(
|
|
476
|
+
P && /* @__PURE__ */ S(p, {
|
|
466
477
|
templateName: Q.name,
|
|
467
478
|
variables: Array.isArray(Q.variables) ? Q.variables : [],
|
|
468
479
|
sourceRepoUrl: Q.sourceRepositoryUrl || Q.componentSnapshot?.repositoryUrl || Q.sourceComponent?.repositoryUrl || null,
|
|
469
|
-
githubConnections:
|
|
480
|
+
githubConnections: we,
|
|
470
481
|
onClose: () => F(!1),
|
|
471
482
|
onSubmit: async (e) => {
|
|
472
|
-
F(!1),
|
|
483
|
+
F(!1), K({
|
|
473
484
|
stage: "Creating component…",
|
|
474
485
|
done: !1,
|
|
475
486
|
error: !1
|
|
476
487
|
});
|
|
477
|
-
let t = await
|
|
488
|
+
let t = await be({ variables: {
|
|
478
489
|
templateId: k,
|
|
479
490
|
input: {
|
|
480
491
|
name: e.name,
|
|
@@ -483,7 +494,7 @@ function k() {
|
|
|
483
494
|
}
|
|
484
495
|
} });
|
|
485
496
|
if (t.error && c(t.error)) {
|
|
486
|
-
|
|
497
|
+
K(null), L(!0);
|
|
487
498
|
return;
|
|
488
499
|
}
|
|
489
500
|
let n = t.data?.instantiateVibecontrolsTemplate?.id;
|
|
@@ -495,12 +506,12 @@ function k() {
|
|
|
495
506
|
let t = e.githubConfig, r = Q?.componentSnapshot?.repositoryUrl, i = Q?.sourceRepositoryUrl || r || Q?.sourceComponent?.repositoryUrl || void 0;
|
|
496
507
|
try {
|
|
497
508
|
if (t.connectionId) {
|
|
498
|
-
|
|
509
|
+
K({
|
|
499
510
|
stage: i ? "Forking repository via connected account…" : "Creating GitHub repository via connected account…",
|
|
500
511
|
done: !1,
|
|
501
512
|
error: !1
|
|
502
513
|
});
|
|
503
|
-
let r = (await
|
|
514
|
+
let r = (await Se({ variables: { input: {
|
|
504
515
|
connectionId: t.connectionId,
|
|
505
516
|
sourceRepoUrl: i || void 0,
|
|
506
517
|
repoName: t.repoName,
|
|
@@ -509,18 +520,18 @@ function k() {
|
|
|
509
520
|
orgName: t.orgName || void 0,
|
|
510
521
|
description: e.description || `Created from VibeControls template: ${Q?.name}`
|
|
511
522
|
} } })).data?.forkVibecontrolsGitHubRepo;
|
|
512
|
-
r ? (
|
|
523
|
+
r ? (K({
|
|
513
524
|
stage: r.isForked ? "Repository forked!" : "Repository created!",
|
|
514
525
|
done: !0,
|
|
515
526
|
error: !1
|
|
516
527
|
}), await Z({ variables: {
|
|
517
528
|
id: n,
|
|
518
529
|
input: { repositoryUrl: r.repoUrl }
|
|
519
|
-
} }), await new Promise((e) => setTimeout(e, 1200))) : (
|
|
530
|
+
} }), await new Promise((e) => setTimeout(e, 1200))) : (K({
|
|
520
531
|
stage: "GitHub repo creation failed — check your connected account",
|
|
521
532
|
done: !1,
|
|
522
533
|
error: !0
|
|
523
|
-
}), setTimeout(() =>
|
|
534
|
+
}), setTimeout(() => K(null), 6e3));
|
|
524
535
|
} else {
|
|
525
536
|
let r = {
|
|
526
537
|
Authorization: `Bearer ${t.token}`,
|
|
@@ -529,7 +540,7 @@ function k() {
|
|
|
529
540
|
"X-GitHub-Api-Version": "2022-11-28"
|
|
530
541
|
}, a = "https://api.github.com", o = i ? E(i) : null, s = null, c = !1;
|
|
531
542
|
if (o) {
|
|
532
|
-
|
|
543
|
+
K({
|
|
533
544
|
stage: `Forking ${o.owner}/${o.repo}…`,
|
|
534
545
|
done: !1,
|
|
535
546
|
error: !1
|
|
@@ -546,11 +557,11 @@ function k() {
|
|
|
546
557
|
if (e.ok) s = await e.json(), c = !0;
|
|
547
558
|
else {
|
|
548
559
|
let t = await e.json();
|
|
549
|
-
|
|
560
|
+
K(null), W(`Could not fork ${i} (${e.status}: ${t.message ?? e.statusText}) — creating a new empty repository instead.`), setTimeout(() => W(null), 1e4);
|
|
550
561
|
}
|
|
551
562
|
}
|
|
552
563
|
if (!s) {
|
|
553
|
-
|
|
564
|
+
K({
|
|
554
565
|
stage: "Creating GitHub repository…",
|
|
555
566
|
done: !1,
|
|
556
567
|
error: !1
|
|
@@ -565,34 +576,34 @@ function k() {
|
|
|
565
576
|
description: e.description || `Created from VibeControls template: ${Q?.name}`
|
|
566
577
|
})
|
|
567
578
|
});
|
|
568
|
-
i.ok ? s = await i.json() : (
|
|
579
|
+
i.ok ? s = await i.json() : (K({
|
|
569
580
|
stage: `GitHub repo failed: ${(await i.json()).message ?? i.statusText}`,
|
|
570
581
|
done: !1,
|
|
571
582
|
error: !0
|
|
572
|
-
}), setTimeout(() =>
|
|
583
|
+
}), setTimeout(() => K(null), 6e3));
|
|
573
584
|
}
|
|
574
|
-
s ? (c || (
|
|
585
|
+
s ? (c || (K({
|
|
575
586
|
stage: "Scaffolding README…",
|
|
576
587
|
done: !1,
|
|
577
588
|
error: !1
|
|
578
|
-
}), await D(s.full_name, r, e, Q)),
|
|
589
|
+
}), await D(s.full_name, r, e, Q)), K({
|
|
579
590
|
stage: c ? "Repository forked!" : "Repository created!",
|
|
580
591
|
done: !0,
|
|
581
592
|
error: !1
|
|
582
593
|
}), await Z({ variables: {
|
|
583
594
|
id: n,
|
|
584
595
|
input: { repositoryUrl: s.html_url }
|
|
585
|
-
} }), await new Promise((e) => setTimeout(e, 1200)),
|
|
596
|
+
} }), await new Promise((e) => setTimeout(e, 1200)), K(null)) : (await new Promise((e) => setTimeout(e, 3e3)), K(null));
|
|
586
597
|
}
|
|
587
598
|
} catch {
|
|
588
|
-
|
|
599
|
+
K({
|
|
589
600
|
stage: "GitHub repo creation failed — check your credentials",
|
|
590
601
|
done: !1,
|
|
591
602
|
error: !0
|
|
592
|
-
}), setTimeout(() =>
|
|
603
|
+
}), setTimeout(() => K(null), 6e3);
|
|
593
604
|
}
|
|
594
605
|
}
|
|
595
|
-
|
|
606
|
+
K(null), n ? A(`/components/${n}`) : (V(N("template.clonedSuccess", "Component created — check Components list")), setTimeout(() => V(null), 4e3));
|
|
596
607
|
}
|
|
597
608
|
}),
|
|
598
609
|
/* @__PURE__ */ S(s, {
|
|
@@ -605,15 +616,15 @@ function k() {
|
|
|
605
616
|
message: "You've reached the maximum number of components on your current plan. Upgrade your plan or purchase an add-on to create more components."
|
|
606
617
|
}),
|
|
607
618
|
/* @__PURE__ */ S(o, {
|
|
608
|
-
isOpen:
|
|
609
|
-
onClose: () =>
|
|
619
|
+
isOpen: _e,
|
|
620
|
+
onClose: () => R(!1),
|
|
610
621
|
onConfirm: async () => {
|
|
611
622
|
if (k) {
|
|
612
|
-
|
|
623
|
+
z(!0);
|
|
613
624
|
try {
|
|
614
|
-
await
|
|
625
|
+
await xe({ variables: { id: k } }), R(!1), A("/templates");
|
|
615
626
|
} finally {
|
|
616
|
-
|
|
627
|
+
z(!1);
|
|
617
628
|
}
|
|
618
629
|
}
|
|
619
630
|
},
|
|
@@ -621,7 +632,7 @@ function k() {
|
|
|
621
632
|
message: N("template.deleteConfirmMessage", `Are you sure you want to delete template "${Q.name}"? Existing instantiated components are unaffected, but the template will no longer be available for cloning. This cannot be undone.`),
|
|
622
633
|
confirmLabel: N("common.delete", "Delete"),
|
|
623
634
|
variant: "danger",
|
|
624
|
-
isLoading:
|
|
635
|
+
isLoading: ve
|
|
625
636
|
})
|
|
626
637
|
]
|
|
627
638
|
}) : /* @__PURE__ */ C(w, {
|
|
@@ -630,9 +641,9 @@ function k() {
|
|
|
630
641
|
type: "button",
|
|
631
642
|
onClick: $,
|
|
632
643
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
633
|
-
children: [/* @__PURE__ */ S(
|
|
644
|
+
children: [/* @__PURE__ */ S(_, { className: "size-4" }), N("template.backToTemplates", "Back to Templates")]
|
|
634
645
|
}), /* @__PURE__ */ S(te, {
|
|
635
|
-
icon: /* @__PURE__ */ S(
|
|
646
|
+
icon: /* @__PURE__ */ S(b, { className: "size-8 text-text-secondary" }),
|
|
636
647
|
title: N("template.notFound", "Template not found"),
|
|
637
648
|
description: `No template with ID "${k}" exists`,
|
|
638
649
|
action: /* @__PURE__ */ S("button", {
|