@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
|
@@ -4,32 +4,32 @@ import { QuotaExhaustedDialog as s } from "../components/shared/QuotaExhaustedDi
|
|
|
4
4
|
import { isQuotaExhaustedError as c } from "../utils/quotaUtils.js";
|
|
5
5
|
import { useVibeNavigate as l } from "../providers/VibeControlsProvider.js";
|
|
6
6
|
import { PageHeader as ee } from "../components/shared/PageHeader.js";
|
|
7
|
-
import { ErrorState as
|
|
8
|
-
import { EntityTagPicker as
|
|
9
|
-
import { EmptyState as
|
|
7
|
+
import { ErrorState as te } from "../components/shared/ErrorState.js";
|
|
8
|
+
import { EntityTagPicker as u } from "../components/shared/EntityTagPicker.js";
|
|
9
|
+
import { EmptyState as d } from "../components/shared/EmptyState.js";
|
|
10
10
|
import { Card as f } from "../components/shared/Card.js";
|
|
11
11
|
import "../components/shared/index.js";
|
|
12
|
-
import { VIBE_PERMISSIONS as
|
|
13
|
-
import { EntityShareButton as
|
|
12
|
+
import { VIBE_PERMISSIONS as p } from "../constants/permissions.js";
|
|
13
|
+
import { EntityShareButton as ne } from "../components/sharing/EntityShareButton.js";
|
|
14
14
|
import "../components/sharing/index.js";
|
|
15
|
-
import { PageSkeleton as
|
|
16
|
-
import { TemplateWizard as
|
|
15
|
+
import { PageSkeleton as re } from "../components/shared/PageSkeleton.js";
|
|
16
|
+
import { TemplateWizard as ie } from "../components/templates/TemplateWizard.js";
|
|
17
17
|
import "../components/templates/index.js";
|
|
18
|
-
import { useCallback as
|
|
19
|
-
import { useI18n as
|
|
20
|
-
import { ArrowLeft as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import { usePermissions as
|
|
23
|
-
import { Fragment as
|
|
24
|
-
import { MotionPage as
|
|
18
|
+
import { useCallback as ae, useState as m } from "react";
|
|
19
|
+
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
20
|
+
import { ArrowLeft as g, CheckCircle2 as oe, Clock as se, Copy as _, FileCode as v, FolderTree as y, Github as b, Layers as x, Loader2 as ce, RefreshCw as le, Tag as S, Trash2 as ue, Variable as de, XCircle as fe } from "lucide-react";
|
|
21
|
+
import { useParams as pe } from "react-router-dom";
|
|
22
|
+
import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
23
|
+
import { Fragment as he, jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
24
|
+
import { MotionPage as T } from "@burdenoff/fe-libs/shared/motion";
|
|
25
25
|
//#region src/pages/TemplateDetailPage.tsx
|
|
26
|
-
function
|
|
26
|
+
function E(e, t) {
|
|
27
27
|
return e.replace(/\{\{(\w+)\}\}|\{(\w+)\}/g, (e, n, r) => {
|
|
28
28
|
let i = n ?? r;
|
|
29
29
|
return i in t ? String(t[i]) : e;
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function ge(e) {
|
|
33
33
|
try {
|
|
34
34
|
let t = e.match(/^https?:\/\/github\.com\/([^/]+)\/([^/]+?)(?:\.git)?(?:\/.*)?$/);
|
|
35
35
|
return t ? {
|
|
@@ -40,7 +40,7 @@ function E(e) {
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
async function
|
|
43
|
+
async function _e(e, t, n, r) {
|
|
44
44
|
if (!r) return;
|
|
45
45
|
let i = n.variableValues, a = Array.isArray(r.variables) ? r.variables : [], o = [];
|
|
46
46
|
if (o.push(`# ${n.name}`), o.push(""), n.description && (o.push(n.description), o.push("")), o.push(`> Scaffolded from VibeControls template: **${r.name}**`), o.push(""), a.length > 0 && Object.keys(i).length > 0) {
|
|
@@ -51,7 +51,7 @@ async function D(e, t, n, r) {
|
|
|
51
51
|
}
|
|
52
52
|
o.push("");
|
|
53
53
|
}
|
|
54
|
-
r.setupInstructions && (o.push("## Getting Started"), o.push(""), o.push(
|
|
54
|
+
r.setupInstructions && (o.push("## Getting Started"), o.push(""), o.push(E(r.setupInstructions, i)), o.push("")), r.fileTree && (o.push("## Project Structure"), o.push(""), o.push("```"), o.push(typeof r.fileTree == "string" ? r.fileTree : JSON.stringify(r.fileTree, null, 2)), o.push("```"), o.push(""));
|
|
55
55
|
let s = o.join("\n"), c = await fetch(`https://api.github.com/repos/${e}/contents/README.md`, { headers: t }), l;
|
|
56
56
|
if (c.ok && (l = (await c.json()).sha), await fetch(`https://api.github.com/repos/${e}/contents/README.md`, {
|
|
57
57
|
method: "PUT",
|
|
@@ -63,7 +63,7 @@ async function D(e, t, n, r) {
|
|
|
63
63
|
})
|
|
64
64
|
}), r.setupInstructions || a.length > 0 && Object.keys(i).length > 0) {
|
|
65
65
|
let n = ["# Getting Started", ""];
|
|
66
|
-
if (r.setupInstructions && (n.push(
|
|
66
|
+
if (r.setupInstructions && (n.push(E(r.setupInstructions, i)), n.push("")), a.length > 0 && Object.keys(i).length > 0) {
|
|
67
67
|
n.push("---"), n.push(""), n.push("## Template Variable Values"), n.push(""), n.push("These are the values you chose when creating this project:"), n.push("");
|
|
68
68
|
for (let e of a) {
|
|
69
69
|
let t = i[e.name];
|
|
@@ -80,7 +80,7 @@ async function D(e, t, n, r) {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
var
|
|
83
|
+
var ve = {
|
|
84
84
|
STARTER: "bg-bg-sunken text-text-secondary",
|
|
85
85
|
MICROSERVICE: "bg-action-primary-bg/10 text-action-primary-bg",
|
|
86
86
|
FRONTEND: "bg-status-info-bg text-status-info-text",
|
|
@@ -90,15 +90,15 @@ var O = {
|
|
|
90
90
|
LIBRARY: "bg-status-warning-bg text-status-warning-text",
|
|
91
91
|
CUSTOM: "bg-bg-sunken text-text-secondary"
|
|
92
92
|
};
|
|
93
|
-
function
|
|
94
|
-
let { t:
|
|
95
|
-
let n =
|
|
93
|
+
function D() {
|
|
94
|
+
let { t: E } = h(), { id: D } = pe(), O = l(), { hasPermission: k, isLoading: A } = me(), j = k(p.TEMPLATE_READ), M = k(p.TEMPLATE_CREATE), N = k(p.TEMPLATE_DELETE), P = k(p.INTEGRATION_CONNECTION_READ), F = ae((e, t) => {
|
|
95
|
+
let n = E(e);
|
|
96
96
|
return n === e ? t : n;
|
|
97
|
-
}, [
|
|
98
|
-
variables: { id:
|
|
99
|
-
skip: !
|
|
97
|
+
}, [E]), [I, L] = m(!1), [ye, R] = m(!1), [be, z] = m(!1), [xe, B] = m(!1), [V, H] = m(null), [U, Se] = m(null), [W, G] = m(null), [K, q] = m(null), { data: Ce, loading: J, error: Y, refetch: X } = n({
|
|
98
|
+
variables: { id: D || "" },
|
|
99
|
+
skip: !D || A || !j,
|
|
100
100
|
fetchPolicy: "cache-and-network"
|
|
101
|
-
}), [
|
|
101
|
+
}), [we] = r({ refetchQueries: ["ListComponents"] }), [Te] = e({ refetchQueries: ["ListTemplates"] }), [Z] = a(), [Ee] = t(), { data: De } = i({
|
|
102
102
|
variables: {
|
|
103
103
|
filter: { status: "ACTIVE" },
|
|
104
104
|
pagination: {
|
|
@@ -106,8 +106,9 @@ function k() {
|
|
|
106
106
|
offset: 0
|
|
107
107
|
}
|
|
108
108
|
},
|
|
109
|
-
fetchPolicy: "cache-first"
|
|
110
|
-
|
|
109
|
+
fetchPolicy: "cache-first",
|
|
110
|
+
skip: !M || !P
|
|
111
|
+
}), Oe = (De?.getConnections?.items ?? []).filter((e) => e.provider?.key === "github").map((e) => ({
|
|
111
112
|
id: e.id,
|
|
112
113
|
name: e.name,
|
|
113
114
|
externalAccountEmail: e.externalAccountEmail,
|
|
@@ -116,205 +117,205 @@ function k() {
|
|
|
116
117
|
key: e.provider.key,
|
|
117
118
|
name: e.provider.name
|
|
118
119
|
}
|
|
119
|
-
})), Q =
|
|
120
|
-
if (
|
|
120
|
+
})), Q = Ce?.vibecontrolsTemplate ?? null;
|
|
121
|
+
if (A) return /* @__PURE__ */ C("div", {
|
|
121
122
|
className: "flex items-center justify-center min-h-[400px]",
|
|
122
|
-
children: /* @__PURE__ */
|
|
123
|
+
children: /* @__PURE__ */ C("p", {
|
|
123
124
|
className: "text-text-secondary",
|
|
124
125
|
children: "Loading permissions…"
|
|
125
126
|
})
|
|
126
127
|
});
|
|
127
|
-
if (!j
|
|
128
|
+
if (!j) return /* @__PURE__ */ C("div", {
|
|
128
129
|
className: "flex items-center justify-center min-h-[400px]",
|
|
129
|
-
children: /* @__PURE__ */
|
|
130
|
+
children: /* @__PURE__ */ w("div", {
|
|
130
131
|
className: "text-center space-y-2",
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
132
133
|
className: "text-lg font-semibold text-foreground",
|
|
133
134
|
children: "Access Denied"
|
|
134
|
-
}), /* @__PURE__ */
|
|
135
|
+
}), /* @__PURE__ */ C("p", {
|
|
135
136
|
className: "text-sm text-text-secondary",
|
|
136
137
|
children: "You don't have permission to access this page."
|
|
137
138
|
})]
|
|
138
139
|
})
|
|
139
140
|
});
|
|
140
141
|
let $ = () => {
|
|
141
|
-
|
|
142
|
+
O("/templates");
|
|
142
143
|
};
|
|
143
|
-
return J && !Q ? /* @__PURE__ */
|
|
144
|
+
return J && !Q ? /* @__PURE__ */ w(T, {
|
|
144
145
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
145
|
-
children: [/* @__PURE__ */
|
|
146
|
+
children: [/* @__PURE__ */ w("button", {
|
|
146
147
|
type: "button",
|
|
147
148
|
onClick: $,
|
|
148
149
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
150
|
-
}), /* @__PURE__ */
|
|
151
|
-
}) : Y && !Q ? /* @__PURE__ */
|
|
150
|
+
children: [/* @__PURE__ */ C(g, { className: "size-4" }), F("template.backToTemplates", "Back to Templates")]
|
|
151
|
+
}), /* @__PURE__ */ C(re, { variant: "detail" })]
|
|
152
|
+
}) : Y && !Q ? /* @__PURE__ */ w(T, {
|
|
152
153
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ w("button", {
|
|
154
155
|
type: "button",
|
|
155
156
|
onClick: $,
|
|
156
157
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
157
|
-
children: [/* @__PURE__ */
|
|
158
|
-
}), /* @__PURE__ */
|
|
159
|
-
title:
|
|
158
|
+
children: [/* @__PURE__ */ C(g, { className: "size-4" }), F("template.backToTemplates", "Back to Templates")]
|
|
159
|
+
}), /* @__PURE__ */ C(te, {
|
|
160
|
+
title: F("template.failedLoad", "Failed to load template"),
|
|
160
161
|
message: Y.message,
|
|
161
162
|
onRetry: () => X()
|
|
162
163
|
})]
|
|
163
|
-
}) : Q ? /* @__PURE__ */
|
|
164
|
+
}) : Q ? /* @__PURE__ */ w(T, {
|
|
164
165
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
165
166
|
children: [
|
|
166
|
-
|
|
167
|
+
V && /* @__PURE__ */ C("div", {
|
|
167
168
|
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",
|
|
168
|
-
children:
|
|
169
|
+
children: V
|
|
169
170
|
}),
|
|
170
|
-
|
|
171
|
+
W && /* @__PURE__ */ C("div", {
|
|
171
172
|
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",
|
|
172
|
-
children:
|
|
173
|
+
children: W
|
|
173
174
|
}),
|
|
174
|
-
|
|
175
|
+
U && /* @__PURE__ */ C("div", {
|
|
175
176
|
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",
|
|
176
|
-
children:
|
|
177
|
+
children: U
|
|
177
178
|
}),
|
|
178
|
-
|
|
179
|
+
K && /* @__PURE__ */ C("div", {
|
|
179
180
|
className: "fixed inset-0 z-[9999] flex items-center justify-center p-4",
|
|
180
181
|
style: { backgroundColor: "rgba(0,0,0,0.55)" },
|
|
181
|
-
children: /* @__PURE__ */
|
|
182
|
+
children: /* @__PURE__ */ w("div", {
|
|
182
183
|
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",
|
|
183
|
-
children: [
|
|
184
|
+
children: [K.done ? /* @__PURE__ */ C(oe, { className: "size-10 text-status-success-text" }) : K.error ? /* @__PURE__ */ C(fe, { className: "size-10 text-status-error-text" }) : /* @__PURE__ */ C(ce, { className: "size-10 text-action-primary-bg animate-spin" }), /* @__PURE__ */ C("p", {
|
|
184
185
|
className: "text-sm font-medium text-text-primary text-center",
|
|
185
|
-
children:
|
|
186
|
+
children: K.stage
|
|
186
187
|
})]
|
|
187
188
|
})
|
|
188
189
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ w("button", {
|
|
190
191
|
type: "button",
|
|
191
192
|
onClick: $,
|
|
192
193
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
193
|
-
children: [/* @__PURE__ */
|
|
194
|
+
children: [/* @__PURE__ */ C(g, { className: "size-4" }), F("template.backToTemplates", "Back to Templates")]
|
|
194
195
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ C(ee, {
|
|
196
197
|
title: Q.name,
|
|
197
|
-
description: Q.description ||
|
|
198
|
-
actions: /* @__PURE__ */
|
|
198
|
+
description: Q.description || F("template.noDescription", "No description"),
|
|
199
|
+
actions: /* @__PURE__ */ w("div", {
|
|
199
200
|
className: "flex items-center gap-2 flex-wrap",
|
|
200
201
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ C(ne, {
|
|
202
203
|
entity: "template",
|
|
203
204
|
resource: {
|
|
204
205
|
id: Q.id,
|
|
205
206
|
name: Q.name
|
|
206
207
|
},
|
|
207
|
-
label:
|
|
208
|
+
label: F("template.share", "Share"),
|
|
208
209
|
variant: "button"
|
|
209
210
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ C("button", {
|
|
211
212
|
type: "button",
|
|
212
213
|
onClick: () => X(),
|
|
213
214
|
disabled: J,
|
|
214
215
|
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",
|
|
215
|
-
title:
|
|
216
|
-
children: /* @__PURE__ */
|
|
216
|
+
title: F("common.refresh", "Refresh"),
|
|
217
|
+
children: /* @__PURE__ */ C(le, { className: `size-4 ${J ? "animate-spin" : ""}` })
|
|
217
218
|
}),
|
|
218
|
-
/* @__PURE__ */
|
|
219
|
+
M && /* @__PURE__ */ w("button", {
|
|
219
220
|
type: "button",
|
|
220
|
-
onClick: () =>
|
|
221
|
+
onClick: () => L(!0),
|
|
221
222
|
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",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
223
|
+
children: [/* @__PURE__ */ C(_, { className: "size-4" }), F("template.useTemplate", "Use Template")]
|
|
223
224
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
+
N && /* @__PURE__ */ w("button", {
|
|
225
226
|
type: "button",
|
|
226
227
|
"data-testid": "template-delete-button",
|
|
227
|
-
onClick: () =>
|
|
228
|
+
onClick: () => z(!0),
|
|
228
229
|
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",
|
|
229
|
-
"aria-label":
|
|
230
|
-
children: [/* @__PURE__ */
|
|
230
|
+
"aria-label": F("template.deleteTemplate", "Delete Template"),
|
|
231
|
+
children: [/* @__PURE__ */ C(ue, {
|
|
231
232
|
className: "size-4",
|
|
232
233
|
"aria-hidden": "true"
|
|
233
|
-
}),
|
|
234
|
+
}), F("common.delete", "Delete")]
|
|
234
235
|
})
|
|
235
236
|
]
|
|
236
237
|
})
|
|
237
238
|
}),
|
|
238
|
-
/* @__PURE__ */
|
|
239
|
+
M && /* @__PURE__ */ w("p", {
|
|
239
240
|
className: "text-sm text-text-muted",
|
|
240
241
|
children: [
|
|
241
242
|
"Click ",
|
|
242
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ C("span", {
|
|
243
244
|
className: "font-medium text-text-secondary",
|
|
244
245
|
children: "Use Template"
|
|
245
246
|
}),
|
|
246
247
|
" to open a short wizard — give your new component a name, fill in any variables, and optionally create a GitHub repository. The whole thing takes under a minute."
|
|
247
248
|
]
|
|
248
249
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ w("div", {
|
|
250
251
|
className: "flex items-center gap-3 flex-wrap",
|
|
251
252
|
children: [
|
|
252
|
-
Q.category && /* @__PURE__ */
|
|
253
|
-
className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-sm font-medium rounded ${
|
|
254
|
-
children: [/* @__PURE__ */
|
|
253
|
+
Q.category && /* @__PURE__ */ w("span", {
|
|
254
|
+
className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-sm font-medium rounded ${ve[Q.category] || "bg-bg-sunken text-text-secondary"}`,
|
|
255
|
+
children: [/* @__PURE__ */ C(x, { className: "size-3.5" }), Q.category]
|
|
255
256
|
}),
|
|
256
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ w("span", {
|
|
257
258
|
className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
|
|
258
259
|
children: [
|
|
259
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ C(_, { className: "size-3.5" }),
|
|
260
261
|
Q.cloneCount,
|
|
261
262
|
" ",
|
|
262
|
-
|
|
263
|
+
F("template.clones", "clones")
|
|
263
264
|
]
|
|
264
265
|
}),
|
|
265
|
-
Q.sourceRepositoryUrl && /* @__PURE__ */
|
|
266
|
+
Q.sourceRepositoryUrl && /* @__PURE__ */ w("a", {
|
|
266
267
|
href: Q.sourceRepositoryUrl,
|
|
267
268
|
target: "_blank",
|
|
268
269
|
rel: "noopener noreferrer",
|
|
269
270
|
onClick: (e) => e.stopPropagation(),
|
|
270
271
|
className: "inline-flex items-center gap-1.5 text-sm text-action-primary-bg hover:underline",
|
|
271
|
-
children: [/* @__PURE__ */
|
|
272
|
+
children: [/* @__PURE__ */ C(b, { className: "size-3.5" }), Q.sourceRepositoryUrl.replace("https://github.com/", "")]
|
|
272
273
|
}),
|
|
273
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ w("span", {
|
|
274
275
|
className: "inline-flex items-center gap-1.5 text-sm text-text-secondary",
|
|
275
|
-
children: [/* @__PURE__ */
|
|
276
|
+
children: [/* @__PURE__ */ C(se, { className: "size-3.5" }), new Date(Q.createdAt).toLocaleDateString()]
|
|
276
277
|
})
|
|
277
278
|
]
|
|
278
279
|
}),
|
|
279
|
-
Q.tags?.length > 0 && /* @__PURE__ */
|
|
280
|
+
Q.tags?.length > 0 && /* @__PURE__ */ C("div", {
|
|
280
281
|
className: "flex flex-wrap gap-2",
|
|
281
|
-
children: Q.tags.map((e) => /* @__PURE__ */
|
|
282
|
+
children: Q.tags.map((e) => /* @__PURE__ */ w("span", {
|
|
282
283
|
className: "inline-flex items-center gap-1 px-2.5 py-1 text-sm bg-bg-sunken text-text-secondary rounded-md",
|
|
283
|
-
children: [/* @__PURE__ */ S
|
|
284
|
+
children: [/* @__PURE__ */ C(S, { className: "size-3" }), e]
|
|
284
285
|
}, e))
|
|
285
286
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ w(f, { children: [/* @__PURE__ */ w("div", {
|
|
287
288
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
288
|
-
children: [/* @__PURE__ */ S
|
|
289
|
+
children: [/* @__PURE__ */ C(S, { className: "size-5" }), /* @__PURE__ */ C("h3", {
|
|
289
290
|
className: "font-semibold text-text-primary",
|
|
290
|
-
children:
|
|
291
|
+
children: F("template.tags", "Tags")
|
|
291
292
|
})]
|
|
292
|
-
}), /* @__PURE__ */
|
|
293
|
+
}), /* @__PURE__ */ C("div", {
|
|
293
294
|
className: "p-4",
|
|
294
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ C(u, {
|
|
295
296
|
entityType: "VIBECONTROLS_TEMPLATE",
|
|
296
297
|
entityId: Q.id
|
|
297
298
|
})
|
|
298
299
|
})] }),
|
|
299
|
-
Q.sourceComponent && /* @__PURE__ */
|
|
300
|
+
Q.sourceComponent && /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C("div", {
|
|
300
301
|
className: "p-4 border-b border-border-default",
|
|
301
|
-
children: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ C("h3", {
|
|
302
303
|
className: "font-semibold text-text-primary",
|
|
303
|
-
children:
|
|
304
|
+
children: F("template.sourceComponent", "Source Component")
|
|
304
305
|
})
|
|
305
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ C("div", {
|
|
306
307
|
className: "p-4",
|
|
307
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ w("button", {
|
|
308
309
|
type: "button",
|
|
309
|
-
onClick: () =>
|
|
310
|
+
onClick: () => O(`/components/${Q.sourceComponent.id}`),
|
|
310
311
|
className: "flex items-center gap-3 text-left hover:bg-bg-sunken p-2 -m-2 rounded-md transition-colors",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
312
|
+
children: [/* @__PURE__ */ C("div", {
|
|
312
313
|
className: "size-10 rounded-lg bg-action-primary-bg/10 flex items-center justify-center flex-shrink-0",
|
|
313
|
-
children: /* @__PURE__ */
|
|
314
|
-
}), /* @__PURE__ */
|
|
314
|
+
children: /* @__PURE__ */ C(v, { className: "size-5 text-action-primary-bg" })
|
|
315
|
+
}), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
|
|
315
316
|
className: "font-medium text-text-primary",
|
|
316
317
|
children: Q.sourceComponent.name
|
|
317
|
-
}), /* @__PURE__ */
|
|
318
|
+
}), /* @__PURE__ */ w("p", {
|
|
318
319
|
className: "text-xs text-text-secondary",
|
|
319
320
|
children: [
|
|
320
321
|
Q.sourceComponent.type,
|
|
@@ -324,15 +325,15 @@ function k() {
|
|
|
324
325
|
})] })]
|
|
325
326
|
})
|
|
326
327
|
})] }),
|
|
327
|
-
Q.clonedComponents && Q.clonedComponents.length > 0 && /* @__PURE__ */
|
|
328
|
+
Q.clonedComponents && Q.clonedComponents.length > 0 && /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ w("div", {
|
|
328
329
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
329
330
|
children: [
|
|
330
|
-
/* @__PURE__ */
|
|
331
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ C(_, { className: "size-5" }),
|
|
332
|
+
/* @__PURE__ */ C("h3", {
|
|
332
333
|
className: "font-semibold text-text-primary",
|
|
333
|
-
children:
|
|
334
|
+
children: F("template.createdComponents", "Created Components")
|
|
334
335
|
}),
|
|
335
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ w("span", {
|
|
336
337
|
className: "ml-auto text-xs text-text-muted",
|
|
337
338
|
children: [
|
|
338
339
|
Q.clonedComponents.length,
|
|
@@ -341,33 +342,33 @@ function k() {
|
|
|
341
342
|
]
|
|
342
343
|
})
|
|
343
344
|
]
|
|
344
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ C("div", {
|
|
345
346
|
className: "divide-y divide-border-default",
|
|
346
|
-
children: Q.clonedComponents.map((e) => /* @__PURE__ */
|
|
347
|
+
children: Q.clonedComponents.map((e) => /* @__PURE__ */ w("button", {
|
|
347
348
|
type: "button",
|
|
348
|
-
onClick: () =>
|
|
349
|
+
onClick: () => O(`/components/${e.id}`),
|
|
349
350
|
className: "flex items-center gap-3 w-full text-left px-4 py-3 hover:bg-bg-sunken transition-colors",
|
|
350
351
|
children: [
|
|
351
|
-
/* @__PURE__ */
|
|
352
|
+
/* @__PURE__ */ C("div", {
|
|
352
353
|
className: "size-8 rounded-md bg-action-primary-bg/10 flex items-center justify-center flex-shrink-0",
|
|
353
|
-
children: /* @__PURE__ */
|
|
354
|
+
children: /* @__PURE__ */ C(v, { className: "size-4 text-action-primary-bg" })
|
|
354
355
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
+
/* @__PURE__ */ w("div", {
|
|
356
357
|
className: "flex-1 min-w-0",
|
|
357
|
-
children: [/* @__PURE__ */
|
|
358
|
+
children: [/* @__PURE__ */ C("p", {
|
|
358
359
|
className: "text-sm font-medium text-text-primary truncate",
|
|
359
360
|
children: e.name
|
|
360
|
-
}), /* @__PURE__ */
|
|
361
|
+
}), /* @__PURE__ */ w("p", {
|
|
361
362
|
className: "text-xs text-text-secondary",
|
|
362
363
|
children: [
|
|
363
364
|
e.type,
|
|
364
365
|
" · ",
|
|
365
366
|
e.lifecycle,
|
|
366
|
-
e.repositoryUrl && /* @__PURE__ */
|
|
367
|
+
e.repositoryUrl && /* @__PURE__ */ w(he, { children: [
|
|
367
368
|
" ",
|
|
368
369
|
"·",
|
|
369
370
|
" ",
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ C("span", {
|
|
371
372
|
className: "font-mono",
|
|
372
373
|
children: e.repositoryUrl.replace("https://github.com/", "")
|
|
373
374
|
})
|
|
@@ -375,22 +376,22 @@ function k() {
|
|
|
375
376
|
]
|
|
376
377
|
})]
|
|
377
378
|
}),
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ C("span", {
|
|
379
380
|
className: "text-xs text-text-muted flex-shrink-0",
|
|
380
381
|
children: new Date(e.createdAt).toLocaleDateString()
|
|
381
382
|
})
|
|
382
383
|
]
|
|
383
384
|
}, e.id))
|
|
384
385
|
})] }),
|
|
385
|
-
Array.isArray(Q.variables) && Q.variables.length > 0 && /* @__PURE__ */
|
|
386
|
+
Array.isArray(Q.variables) && Q.variables.length > 0 && /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ w("div", {
|
|
386
387
|
className: "p-4 border-b border-border-default flex items-center gap-2",
|
|
387
388
|
children: [
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
/* @__PURE__ */
|
|
389
|
+
/* @__PURE__ */ C(de, { className: "size-5" }),
|
|
390
|
+
/* @__PURE__ */ C("h3", {
|
|
390
391
|
className: "font-semibold text-text-primary",
|
|
391
|
-
children:
|
|
392
|
+
children: F("template.variables", "Template Variables")
|
|
392
393
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ w("span", {
|
|
394
395
|
className: "ml-auto text-xs text-text-muted",
|
|
395
396
|
children: [
|
|
396
397
|
Q.variables.length,
|
|
@@ -399,94 +400,95 @@ function k() {
|
|
|
399
400
|
]
|
|
400
401
|
})
|
|
401
402
|
]
|
|
402
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ C("div", {
|
|
403
404
|
className: "divide-y divide-border-default",
|
|
404
|
-
children: Q.variables.map((e) => /* @__PURE__ */
|
|
405
|
+
children: Q.variables.map((e) => /* @__PURE__ */ w("div", {
|
|
405
406
|
className: "px-4 py-3 flex items-start gap-4",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ w("div", {
|
|
407
408
|
className: "flex-1 min-w-0",
|
|
408
409
|
children: [
|
|
409
|
-
/* @__PURE__ */
|
|
410
|
+
/* @__PURE__ */ w("div", {
|
|
410
411
|
className: "flex items-center gap-2",
|
|
411
412
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ C("span", {
|
|
413
414
|
className: "text-sm font-medium text-text-primary font-mono",
|
|
414
415
|
children: e.name
|
|
415
416
|
}),
|
|
416
|
-
e.required && /* @__PURE__ */
|
|
417
|
+
e.required && /* @__PURE__ */ C("span", {
|
|
417
418
|
className: "text-xs bg-status-error-bg text-status-error-text px-1.5 py-0.5 rounded",
|
|
418
419
|
children: "required"
|
|
419
420
|
}),
|
|
420
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ C("span", {
|
|
421
422
|
className: "text-xs bg-bg-sunken text-text-muted px-1.5 py-0.5 rounded",
|
|
422
423
|
children: e.type
|
|
423
424
|
})
|
|
424
425
|
]
|
|
425
426
|
}),
|
|
426
|
-
e.title && e.title !== e.name && /* @__PURE__ */
|
|
427
|
+
e.title && e.title !== e.name && /* @__PURE__ */ C("p", {
|
|
427
428
|
className: "text-xs text-text-secondary mt-0.5",
|
|
428
429
|
children: e.title
|
|
429
430
|
}),
|
|
430
|
-
e.default && /* @__PURE__ */
|
|
431
|
+
e.default && /* @__PURE__ */ w("p", {
|
|
431
432
|
className: "text-xs text-text-muted mt-0.5",
|
|
432
|
-
children: ["Default: ", /* @__PURE__ */
|
|
433
|
+
children: ["Default: ", /* @__PURE__ */ C("span", {
|
|
433
434
|
className: "font-mono",
|
|
434
435
|
children: e.default
|
|
435
436
|
})]
|
|
436
437
|
})
|
|
437
438
|
]
|
|
438
|
-
}), e.options.length > 0 && /* @__PURE__ */
|
|
439
|
+
}), e.options.length > 0 && /* @__PURE__ */ C("div", {
|
|
439
440
|
className: "flex flex-wrap gap-1",
|
|
440
|
-
children: e.options.map((e) => /* @__PURE__ */
|
|
441
|
+
children: e.options.map((e) => /* @__PURE__ */ C("span", {
|
|
441
442
|
className: "text-xs bg-bg-sunken text-text-secondary px-1.5 py-0.5 rounded",
|
|
442
443
|
children: e
|
|
443
444
|
}, e))
|
|
444
445
|
})]
|
|
445
446
|
}, e.name))
|
|
446
447
|
})] }),
|
|
447
|
-
Q.setupInstructions && /* @__PURE__ */
|
|
448
|
+
Q.setupInstructions && /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C("div", {
|
|
448
449
|
className: "p-4 border-b border-border-default",
|
|
449
|
-
children: /* @__PURE__ */
|
|
450
|
+
children: /* @__PURE__ */ C("h3", {
|
|
450
451
|
className: "font-semibold text-text-primary",
|
|
451
|
-
children:
|
|
452
|
+
children: F("template.setupInstructions", "Setup Instructions")
|
|
452
453
|
})
|
|
453
|
-
}), /* @__PURE__ */
|
|
454
|
+
}), /* @__PURE__ */ C("div", {
|
|
454
455
|
className: "p-4",
|
|
455
|
-
children: /* @__PURE__ */
|
|
456
|
+
children: /* @__PURE__ */ C("div", {
|
|
456
457
|
className: "prose prose-sm max-w-none text-text-primary",
|
|
457
|
-
children: /* @__PURE__ */
|
|
458
|
+
children: /* @__PURE__ */ C("pre", {
|
|
458
459
|
className: "bg-bg-sunken rounded-md p-4 text-xs sm:text-sm overflow-x-auto whitespace-pre-wrap font-mono text-text-primary",
|
|
459
460
|
children: Q.setupInstructions
|
|
460
461
|
})
|
|
461
462
|
})
|
|
462
463
|
})] }),
|
|
463
|
-
Q.fileTree && /* @__PURE__ */
|
|
464
|
+
Q.fileTree && /* @__PURE__ */ w(f, { children: [/* @__PURE__ */ C("div", {
|
|
464
465
|
className: "p-4 border-b border-border-default",
|
|
465
|
-
children: /* @__PURE__ */
|
|
466
|
+
children: /* @__PURE__ */ w("h3", {
|
|
466
467
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
468
|
+
children: [/* @__PURE__ */ C(y, { className: "size-5" }), F("template.fileTree", "File Tree")]
|
|
468
469
|
})
|
|
469
|
-
}), /* @__PURE__ */
|
|
470
|
+
}), /* @__PURE__ */ C("div", {
|
|
470
471
|
className: "p-4",
|
|
471
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ C("pre", {
|
|
472
473
|
className: "bg-bg-sunken rounded-md p-4 text-xs sm:text-sm overflow-x-auto font-mono text-text-primary",
|
|
473
474
|
children: typeof Q.fileTree == "string" ? Q.fileTree : JSON.stringify(Q.fileTree, null, 2)
|
|
474
475
|
})
|
|
475
476
|
})] }),
|
|
476
|
-
|
|
477
|
+
I && M && /* @__PURE__ */ C(ie, {
|
|
477
478
|
templateName: Q.name,
|
|
478
479
|
variables: Array.isArray(Q.variables) ? Q.variables : [],
|
|
479
480
|
sourceRepoUrl: Q.sourceRepositoryUrl || Q.componentSnapshot?.repositoryUrl || Q.sourceComponent?.repositoryUrl || null,
|
|
480
|
-
githubConnections:
|
|
481
|
-
onClose: () =>
|
|
481
|
+
githubConnections: Oe,
|
|
482
|
+
onClose: () => L(!1),
|
|
482
483
|
onSubmit: async (e) => {
|
|
483
|
-
|
|
484
|
+
if (!M) return;
|
|
485
|
+
L(!1), q({
|
|
484
486
|
stage: "Creating component…",
|
|
485
487
|
done: !1,
|
|
486
488
|
error: !1
|
|
487
489
|
});
|
|
488
|
-
let t = await
|
|
489
|
-
templateId:
|
|
490
|
+
let t = await we({ variables: {
|
|
491
|
+
templateId: D,
|
|
490
492
|
input: {
|
|
491
493
|
name: e.name,
|
|
492
494
|
description: e.description || void 0,
|
|
@@ -494,7 +496,7 @@ function k() {
|
|
|
494
496
|
}
|
|
495
497
|
} });
|
|
496
498
|
if (t.error && c(t.error)) {
|
|
497
|
-
|
|
499
|
+
q(null), R(!0);
|
|
498
500
|
return;
|
|
499
501
|
}
|
|
500
502
|
let n = t.data?.instantiateVibecontrolsTemplate?.id;
|
|
@@ -506,12 +508,12 @@ function k() {
|
|
|
506
508
|
let t = e.githubConfig, r = Q?.componentSnapshot?.repositoryUrl, i = Q?.sourceRepositoryUrl || r || Q?.sourceComponent?.repositoryUrl || void 0;
|
|
507
509
|
try {
|
|
508
510
|
if (t.connectionId) {
|
|
509
|
-
|
|
511
|
+
q({
|
|
510
512
|
stage: i ? "Forking repository via connected account…" : "Creating GitHub repository via connected account…",
|
|
511
513
|
done: !1,
|
|
512
514
|
error: !1
|
|
513
515
|
});
|
|
514
|
-
let r = (await
|
|
516
|
+
let r = (await Ee({ variables: { input: {
|
|
515
517
|
connectionId: t.connectionId,
|
|
516
518
|
sourceRepoUrl: i || void 0,
|
|
517
519
|
repoName: t.repoName,
|
|
@@ -520,27 +522,27 @@ function k() {
|
|
|
520
522
|
orgName: t.orgName || void 0,
|
|
521
523
|
description: e.description || `Created from VibeControls template: ${Q?.name}`
|
|
522
524
|
} } })).data?.forkVibecontrolsGitHubRepo;
|
|
523
|
-
r ? (
|
|
525
|
+
r ? (q({
|
|
524
526
|
stage: r.isForked ? "Repository forked!" : "Repository created!",
|
|
525
527
|
done: !0,
|
|
526
528
|
error: !1
|
|
527
529
|
}), await Z({ variables: {
|
|
528
530
|
id: n,
|
|
529
531
|
input: { repositoryUrl: r.repoUrl }
|
|
530
|
-
} }), await new Promise((e) => setTimeout(e, 1200))) : (
|
|
532
|
+
} }), await new Promise((e) => setTimeout(e, 1200))) : (q({
|
|
531
533
|
stage: "GitHub repo creation failed — check your connected account",
|
|
532
534
|
done: !1,
|
|
533
535
|
error: !0
|
|
534
|
-
}), setTimeout(() =>
|
|
536
|
+
}), setTimeout(() => q(null), 6e3));
|
|
535
537
|
} else {
|
|
536
538
|
let r = {
|
|
537
539
|
Authorization: `Bearer ${t.token}`,
|
|
538
540
|
"Content-Type": "application/json",
|
|
539
541
|
Accept: "application/vnd.github+json",
|
|
540
542
|
"X-GitHub-Api-Version": "2022-11-28"
|
|
541
|
-
}, a = "https://api.github.com", o = i ?
|
|
543
|
+
}, a = "https://api.github.com", o = i ? ge(i) : null, s = null, c = !1;
|
|
542
544
|
if (o) {
|
|
543
|
-
|
|
545
|
+
q({
|
|
544
546
|
stage: `Forking ${o.owner}/${o.repo}…`,
|
|
545
547
|
done: !1,
|
|
546
548
|
error: !1
|
|
@@ -557,11 +559,11 @@ function k() {
|
|
|
557
559
|
if (e.ok) s = await e.json(), c = !0;
|
|
558
560
|
else {
|
|
559
561
|
let t = await e.json();
|
|
560
|
-
|
|
562
|
+
q(null), G(`Could not fork ${i} (${e.status}: ${t.message ?? e.statusText}) — creating a new empty repository instead.`), setTimeout(() => G(null), 1e4);
|
|
561
563
|
}
|
|
562
564
|
}
|
|
563
565
|
if (!s) {
|
|
564
|
-
|
|
566
|
+
q({
|
|
565
567
|
stage: "Creating GitHub repository…",
|
|
566
568
|
done: !1,
|
|
567
569
|
error: !1
|
|
@@ -576,86 +578,86 @@ function k() {
|
|
|
576
578
|
description: e.description || `Created from VibeControls template: ${Q?.name}`
|
|
577
579
|
})
|
|
578
580
|
});
|
|
579
|
-
i.ok ? s = await i.json() : (
|
|
581
|
+
i.ok ? s = await i.json() : (q({
|
|
580
582
|
stage: `GitHub repo failed: ${(await i.json()).message ?? i.statusText}`,
|
|
581
583
|
done: !1,
|
|
582
584
|
error: !0
|
|
583
|
-
}), setTimeout(() =>
|
|
585
|
+
}), setTimeout(() => q(null), 6e3));
|
|
584
586
|
}
|
|
585
|
-
s ? (c || (
|
|
587
|
+
s ? (c || (q({
|
|
586
588
|
stage: "Scaffolding README…",
|
|
587
589
|
done: !1,
|
|
588
590
|
error: !1
|
|
589
|
-
}), await
|
|
591
|
+
}), await _e(s.full_name, r, e, Q)), q({
|
|
590
592
|
stage: c ? "Repository forked!" : "Repository created!",
|
|
591
593
|
done: !0,
|
|
592
594
|
error: !1
|
|
593
595
|
}), await Z({ variables: {
|
|
594
596
|
id: n,
|
|
595
597
|
input: { repositoryUrl: s.html_url }
|
|
596
|
-
} }), await new Promise((e) => setTimeout(e, 1200)),
|
|
598
|
+
} }), await new Promise((e) => setTimeout(e, 1200)), q(null)) : (await new Promise((e) => setTimeout(e, 3e3)), q(null));
|
|
597
599
|
}
|
|
598
600
|
} catch {
|
|
599
|
-
|
|
601
|
+
q({
|
|
600
602
|
stage: "GitHub repo creation failed — check your credentials",
|
|
601
603
|
done: !1,
|
|
602
604
|
error: !0
|
|
603
|
-
}), setTimeout(() =>
|
|
605
|
+
}), setTimeout(() => q(null), 6e3);
|
|
604
606
|
}
|
|
605
607
|
}
|
|
606
|
-
|
|
608
|
+
q(null), n ? O(`/components/${n}`) : (H(F("template.clonedSuccess", "Component created — check Components list")), setTimeout(() => H(null), 4e3));
|
|
607
609
|
}
|
|
608
610
|
}),
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
isOpen:
|
|
611
|
-
onClose: () =>
|
|
611
|
+
/* @__PURE__ */ C(s, {
|
|
612
|
+
isOpen: ye,
|
|
613
|
+
onClose: () => R(!1),
|
|
612
614
|
onConfirm: () => {
|
|
613
|
-
|
|
615
|
+
R(!1), O("/billing/plans");
|
|
614
616
|
},
|
|
615
617
|
title: "Component Quota Reached",
|
|
616
618
|
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."
|
|
617
619
|
}),
|
|
618
|
-
/* @__PURE__ */
|
|
619
|
-
isOpen:
|
|
620
|
-
onClose: () =>
|
|
620
|
+
/* @__PURE__ */ C(o, {
|
|
621
|
+
isOpen: be,
|
|
622
|
+
onClose: () => z(!1),
|
|
621
623
|
onConfirm: async () => {
|
|
622
|
-
if (
|
|
623
|
-
|
|
624
|
+
if (D) {
|
|
625
|
+
B(!0);
|
|
624
626
|
try {
|
|
625
|
-
await
|
|
627
|
+
await Te({ variables: { id: D } }), z(!1), O("/templates");
|
|
626
628
|
} finally {
|
|
627
|
-
|
|
629
|
+
B(!1);
|
|
628
630
|
}
|
|
629
631
|
}
|
|
630
632
|
},
|
|
631
|
-
title:
|
|
632
|
-
message:
|
|
633
|
-
confirmLabel:
|
|
633
|
+
title: F("template.deleteTemplate", "Delete Template"),
|
|
634
|
+
message: F("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.`),
|
|
635
|
+
confirmLabel: F("common.delete", "Delete"),
|
|
634
636
|
variant: "danger",
|
|
635
|
-
isLoading:
|
|
637
|
+
isLoading: xe
|
|
636
638
|
})
|
|
637
639
|
]
|
|
638
|
-
}) : /* @__PURE__ */
|
|
640
|
+
}) : /* @__PURE__ */ w(T, {
|
|
639
641
|
className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
|
|
640
|
-
children: [/* @__PURE__ */
|
|
642
|
+
children: [/* @__PURE__ */ w("button", {
|
|
641
643
|
type: "button",
|
|
642
644
|
onClick: $,
|
|
643
645
|
className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
645
|
-
}), /* @__PURE__ */
|
|
646
|
-
icon: /* @__PURE__ */
|
|
647
|
-
title:
|
|
648
|
-
description: `No template with ID "${
|
|
649
|
-
action: /* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ C(g, { className: "size-4" }), F("template.backToTemplates", "Back to Templates")]
|
|
647
|
+
}), /* @__PURE__ */ C(d, {
|
|
648
|
+
icon: /* @__PURE__ */ C(v, { className: "size-8 text-text-secondary" }),
|
|
649
|
+
title: F("template.notFound", "Template not found"),
|
|
650
|
+
description: `No template with ID "${D}" exists`,
|
|
651
|
+
action: /* @__PURE__ */ C("button", {
|
|
650
652
|
type: "button",
|
|
651
653
|
onClick: $,
|
|
652
654
|
className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover transition-colors",
|
|
653
|
-
children:
|
|
655
|
+
children: F("template.backToTemplates", "Back to Templates")
|
|
654
656
|
})
|
|
655
657
|
})]
|
|
656
658
|
});
|
|
657
659
|
}
|
|
658
660
|
//#endregion
|
|
659
|
-
export {
|
|
661
|
+
export { D as TemplateDetailPage };
|
|
660
662
|
|
|
661
663
|
//# sourceMappingURL=TemplateDetailPage.js.map
|