@burdenoff/microfe-vibecontrols 2026.709.2 → 2026.710.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/agent-manager/AgentManagerBookmarksDrawer.js +87 -85
- package/dist/components/agent-manager/AgentManagerBookmarksDrawer.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +138 -136
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/ai/PluginHarnessPicker.js +70 -64
- package/dist/components/ai/PluginHarnessPicker.js.map +1 -1
- package/dist/components/docs/DocsEditPanel.js +1 -1
- package/dist/components/docs/DocsEditPanel.js.map +1 -1
- package/dist/components/docs/DocsPageTree.js +1 -1
- package/dist/components/docs/DocsPageTree.js.map +1 -1
- package/dist/components/docs/DocsTabPanel.js +108 -106
- package/dist/components/docs/DocsTabPanel.js.map +1 -1
- package/dist/components/notes/NotesTabPanel.js +99 -99
- package/dist/components/notes/NotesTabPanel.js.map +1 -1
- package/dist/components/scorecard/ScorecardPanel.js +309 -308
- package/dist/components/scorecard/ScorecardPanel.js.map +1 -1
- package/dist/components/sessions/SessionPublicLinkPanel.js +104 -102
- package/dist/components/sessions/SessionPublicLinkPanel.js.map +1 -1
- package/dist/components/settings/AdvancedSection.js +92 -90
- package/dist/components/settings/AdvancedSection.js.map +1 -1
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js +104 -102
- package/dist/components/vibedeck/VibeDeckPublicLinkPanel.js.map +1 -1
- package/dist/constants/permissions.js +7 -0
- package/dist/constants/permissions.js.map +1 -1
- package/dist/pages/ActionsPage.js +303 -303
- package/dist/pages/ActionsPage.js.map +1 -1
- package/dist/pages/AgentDetailsPage.js +520 -516
- package/dist/pages/AgentDetailsPage.js.map +1 -1
- package/dist/pages/AgentsPage.js +287 -283
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/TargetsPage.js +554 -549
- package/dist/pages/TargetsPage.js.map +1 -1
- package/dist/pages/VibeAuditPage.js +2 -2
- package/dist/pages/VibeAuditPage.js.map +1 -1
- package/dist/pages/VibeDeckPage.js +257 -257
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/dist/pages/VibeDetailsPage.js +688 -693
- package/dist/pages/VibeDetailsPage.js.map +1 -1
- package/dist/pages/VibesPage.js +49 -41
- package/dist/pages/VibesPage.js.map +1 -1
- package/dist/pages/WebhooksPage.js +162 -138
- package/dist/pages/WebhooksPage.js.map +1 -1
- package/dist/pages/tunnels/DomainsTab.js +54 -47
- package/dist/pages/tunnels/DomainsTab.js.map +1 -1
- package/package.json +1 -1
|
@@ -31,46 +31,46 @@ import { VibeDeckShareDialog as Le } from "../components/vibedeck/VibeDeckShareD
|
|
|
31
31
|
import { VibeDeckPublicLinkPanel as Re } from "../components/vibedeck/VibeDeckPublicLinkPanel.js";
|
|
32
32
|
import { VibeDeckExecutionLog as ze } from "../components/vibedeck/VibeDeckExecutionLog.js";
|
|
33
33
|
import "../components/vibedeck/index.js";
|
|
34
|
-
import { useCallback as c, useEffect as
|
|
35
|
-
import { useI18n as
|
|
36
|
-
import { Copy as
|
|
37
|
-
import { usePermissions as
|
|
38
|
-
import { AnimatePresence as
|
|
39
|
-
import { jsx as
|
|
40
|
-
import { PagePurpose as
|
|
41
|
-
import { useEventBus as
|
|
42
|
-
import { AccessDenied as
|
|
43
|
-
import { MotionPage as
|
|
34
|
+
import { useCallback as c, useEffect as Be, useMemo as Ve, useRef as He, useState as l } from "react";
|
|
35
|
+
import { useI18n as Ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
36
|
+
import { Copy as We, Eye as Ge, LayoutGrid as Ke, Link2 as qe, Pencil as Je, Play as Ye, RefreshCw as Xe, Star as Ze, Trash2 as Qe } from "lucide-react";
|
|
37
|
+
import { usePermissions as $e } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
38
|
+
import { AnimatePresence as et } from "framer-motion";
|
|
39
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
40
|
+
import { PagePurpose as tt } from "@burdenoff/fe-libs/ui";
|
|
41
|
+
import { useEventBus as nt } from "@burdenoff/fe-libs/shared/events";
|
|
42
|
+
import { AccessDenied as rt } from "@burdenoff/fe-libs/shared/components";
|
|
43
|
+
import { MotionPage as f } from "@burdenoff/fe-libs/shared/motion";
|
|
44
44
|
//#region src/pages/VibeDeckPage.tsx
|
|
45
|
-
function
|
|
46
|
-
let
|
|
45
|
+
function it() {
|
|
46
|
+
let it = de(), { workspaceId: p } = ue(), m = nt(), { hasPermission: h, isLoading: at, permissions: g } = $e(), _ = ((e) => (t, n) => {
|
|
47
47
|
let r = e.t(t);
|
|
48
48
|
return r === t ? n : r;
|
|
49
|
-
})(
|
|
50
|
-
|
|
49
|
+
})(Ue()), v = (Array.isArray(g) ? g : g?.permissionStrings)?.some?.((e) => e.startsWith("vibedeck:")), ot = v ? h(s.VIBEDECK_LIST) : !0, y = v ? h(s.VIBEDECK_CREATE) : !0, st = v ? h(s.VIBEDECK_UPDATE) : !0, ct = v ? h(s.VIBEDECK_DELETE) : !0, lt = v ? h(s.VIBEDECK_EXECUTE) : !0, ut = (Array.isArray(g) ? g : g?.permissionStrings)?.some?.((e) => e.startsWith("vibedeck-button:")), dt = ut ? h(s.VIBEDECK_BUTTON_CREATE) : y, ft = ut ? h(s.VIBEDECK_BUTTON_UPDATE) : st, pt = ut ? h(s.VIBEDECK_BUTTON_DELETE) : ct, mt = ut ? h(s.VIBEDECK_BUTTON_EXECUTE) : lt, ht = at, { activeVibeDeckId: b, setActiveVibeDeckId: x, vibeDeckMode: gt, setVibeDeckMode: _t } = fe(), S = gt === "preview", vt = S ? !1 : y, yt = S ? !1 : st, bt = S ? !1 : ct, xt = S ? !1 : dt, St = S ? !1 : ft, Ct = S ? !1 : pt, [C, w] = l({ type: "none" }), [wt, Tt] = l(null), [T, Et] = l(/* @__PURE__ */ new Set()), [E, D] = l(/* @__PURE__ */ new Set()), [Dt, Ot] = l(null), [kt, O] = l(null), [k, A] = l(null), [At, jt] = l([]), j = He(/* @__PURE__ */ new Map()), [Mt, Nt] = l(xe), [Pt, Ft] = l([]), [It, Lt] = l(!0), [Rt, zt] = l(/* @__PURE__ */ new Map()), [Bt, Vt] = l(null), [M, Ht] = l(null), [Ut, Wt] = l(!1), { profiles: Gt } = De(M?.agentId ?? null), Kt = Gt.find((e) => e.isDefault)?.name ?? "default", N = He(/* @__PURE__ */ new Map());
|
|
50
|
+
Be(() => {
|
|
51
51
|
let e = N.current;
|
|
52
52
|
return () => {
|
|
53
53
|
for (let t of e.values()) clearTimeout(t);
|
|
54
54
|
};
|
|
55
55
|
}, []);
|
|
56
|
-
let
|
|
56
|
+
let qt = c((e) => {
|
|
57
57
|
let t = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, n = {
|
|
58
58
|
...e,
|
|
59
59
|
id: t
|
|
60
60
|
};
|
|
61
|
-
return
|
|
61
|
+
return Ft((e) => [...e.slice(-49), n]), t;
|
|
62
62
|
}, []), P = c((e, t) => {
|
|
63
|
-
|
|
63
|
+
Ft((n) => n.map((n) => n.id === e ? {
|
|
64
64
|
...n,
|
|
65
65
|
...t
|
|
66
66
|
} : n));
|
|
67
67
|
}, []), F = c((e, t) => {
|
|
68
|
-
if (
|
|
68
|
+
if (zt((n) => {
|
|
69
69
|
let r = new Map(n);
|
|
70
70
|
return r.set(e, t), r;
|
|
71
71
|
}), t === "success" || t === "error") {
|
|
72
72
|
let n = setTimeout(() => {
|
|
73
|
-
|
|
73
|
+
zt((n) => {
|
|
74
74
|
let r = new Map(n);
|
|
75
75
|
return r.get(e) === t && r.delete(e), r;
|
|
76
76
|
}), N.current.delete(e);
|
|
@@ -78,7 +78,7 @@ function rt() {
|
|
|
78
78
|
r && clearTimeout(r), N.current.set(e, n);
|
|
79
79
|
}
|
|
80
80
|
}, []);
|
|
81
|
-
|
|
81
|
+
Be(() => {
|
|
82
82
|
let e = j.current;
|
|
83
83
|
return () => {
|
|
84
84
|
for (let t of e.values()) clearTimeout(t);
|
|
@@ -86,57 +86,57 @@ function rt() {
|
|
|
86
86
|
}, []);
|
|
87
87
|
let I = c((e, t, n, r) => {
|
|
88
88
|
let i = Date.now() + Math.random();
|
|
89
|
-
|
|
89
|
+
jt((r) => [...r, {
|
|
90
90
|
message: e,
|
|
91
91
|
variant: t,
|
|
92
92
|
detail: n,
|
|
93
93
|
id: i
|
|
94
94
|
}]);
|
|
95
95
|
let ee = setTimeout(() => {
|
|
96
|
-
|
|
96
|
+
jt((e) => e.filter((e) => e.id !== i)), j.current.delete(i);
|
|
97
97
|
}, r ?? (t === "success" ? 1e4 : 3e4));
|
|
98
98
|
j.current.set(i, ee);
|
|
99
|
-
}, []),
|
|
100
|
-
|
|
99
|
+
}, []), Jt = c((e) => {
|
|
100
|
+
jt((t) => t.filter((t) => t.id !== e));
|
|
101
101
|
let t = j.current.get(e);
|
|
102
102
|
t && (clearTimeout(t), j.current.delete(e));
|
|
103
103
|
}, []), L = c((e, t) => {
|
|
104
|
-
le(),
|
|
104
|
+
le(), Vt({
|
|
105
105
|
title: e,
|
|
106
106
|
message: t
|
|
107
107
|
});
|
|
108
|
-
}, []), { data:
|
|
108
|
+
}, []), { data: Yt, loading: Xt, error: Zt, refetch: R } = re({
|
|
109
109
|
variables: { pagination: { limit: 50 } },
|
|
110
|
-
skip:
|
|
111
|
-
}), z =
|
|
110
|
+
skip: ht
|
|
111
|
+
}), z = Ve(() => Yt?.vibeDecks?.items || [], [Yt]), B = b || z.find((e) => e.isDefault)?.id || z[0]?.id || null, { data: Qt, loading: $t, refetch: en } = te({
|
|
112
112
|
variables: { id: B },
|
|
113
|
-
skip: !B ||
|
|
114
|
-
}), V =
|
|
113
|
+
skip: !B || ht
|
|
114
|
+
}), V = Qt?.vibeDeck, H = Ve(() => z.filter((e) => T.has(e.id)), [z, T]), U = Ve(() => V?.buttons?.filter((e) => E.has(e.id)) ?? [], [V?.buttons, E]), tn = z.length > 0 && z.every((e) => T.has(e.id)), nn = z.some((e) => T.has(e.id)) && !tn, rn = (V?.buttons?.length ?? 0) > 0 && (V?.buttons ?? []).every((e) => E.has(e.id)), an = (V?.buttons ?? []).some((e) => E.has(e.id)) && !rn, { data: on } = ne({
|
|
115
115
|
variables: { pagination: { limit: 100 } },
|
|
116
116
|
fetchPolicy: "cache-and-network",
|
|
117
|
-
skip:
|
|
118
|
-
}),
|
|
117
|
+
skip: ht
|
|
118
|
+
}), sn = (on?.vibecontrolsAgents ?? []).map((e) => ({
|
|
119
119
|
id: e.id,
|
|
120
120
|
name: e.name,
|
|
121
121
|
isActive: e.isActive
|
|
122
|
-
})), [
|
|
123
|
-
|
|
122
|
+
})), [cn, { loading: ln }] = t({ refetchQueries: ["ListVibeDecks"] }), { setDraftTagIds: un, flushTags: dn } = ve("VIBECONTROLS_VIBEDECK"), [fn, { loading: pn }] = se({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [W] = r({ refetchQueries: ["ListVibeDecks"] }), [G] = ae({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [K] = i({ refetchQueries: ["ListVibeDecks"] }), [mn, { loading: hn }] = e({ refetchQueries: ["GetVibeDeck"] }), [gn, { loading: _n }] = oe({ refetchQueries: ["GetVibeDeck"] }), [q] = n({ refetchQueries: ["GetVibeDeck"] }), [vn] = ie({ refetchQueries: ["GetVibeDeck"] }), [J] = ee();
|
|
123
|
+
Be(() => {
|
|
124
124
|
D(/* @__PURE__ */ new Set());
|
|
125
125
|
}, [B]);
|
|
126
|
-
let
|
|
127
|
-
|
|
126
|
+
let yn = c((e, t) => {
|
|
127
|
+
Et((n) => {
|
|
128
128
|
let r = new Set(n);
|
|
129
129
|
return t ? r.add(e) : r.delete(e), r;
|
|
130
130
|
});
|
|
131
|
-
}, []),
|
|
132
|
-
|
|
131
|
+
}, []), bn = c((e) => {
|
|
132
|
+
Et((t) => {
|
|
133
133
|
let n = new Set(t);
|
|
134
134
|
return z.forEach((t) => {
|
|
135
135
|
e ? n.add(t.id) : n.delete(t.id);
|
|
136
136
|
}), n;
|
|
137
137
|
});
|
|
138
138
|
}, [z]), Y = c(() => {
|
|
139
|
-
|
|
139
|
+
Et(/* @__PURE__ */ new Set());
|
|
140
140
|
}, []);
|
|
141
141
|
c((e, t) => {
|
|
142
142
|
D((n) => {
|
|
@@ -144,7 +144,7 @@ function rt() {
|
|
|
144
144
|
return t ? r.add(e) : r.delete(e), r;
|
|
145
145
|
});
|
|
146
146
|
}, []);
|
|
147
|
-
let
|
|
147
|
+
let xn = c((e) => {
|
|
148
148
|
D((t) => {
|
|
149
149
|
let n = new Set(t);
|
|
150
150
|
return (V?.buttons ?? []).forEach((t) => {
|
|
@@ -153,17 +153,17 @@ function rt() {
|
|
|
153
153
|
});
|
|
154
154
|
}, [V?.buttons]), X = c(() => {
|
|
155
155
|
D(/* @__PURE__ */ new Set());
|
|
156
|
-
}, []),
|
|
156
|
+
}, []), Sn = c(async (e) => {
|
|
157
157
|
try {
|
|
158
|
-
let t = (await
|
|
158
|
+
let t = (await cn({ variables: { input: {
|
|
159
159
|
name: e.name,
|
|
160
160
|
description: e.description || null,
|
|
161
161
|
colorTheme: e.colorTheme || null,
|
|
162
162
|
gridColumns: e.gridColumns,
|
|
163
163
|
gridRows: e.gridRows,
|
|
164
|
-
...Ce(
|
|
164
|
+
...Ce(Mt)
|
|
165
165
|
} } })).data?.createVibeDeck?.id;
|
|
166
|
-
w({ type: "none" }), I("Deck created", "success"),
|
|
166
|
+
w({ type: "none" }), I("Deck created", "success"), Nt(xe), t && await dn(t);
|
|
167
167
|
} catch (e) {
|
|
168
168
|
if (o(e)) {
|
|
169
169
|
w({ type: "none" }), L("Vibe Deck Quota Reached", "You have reached the Vibe Deck limit for your current plan. Upgrade to create more decks.");
|
|
@@ -172,14 +172,14 @@ function rt() {
|
|
|
172
172
|
I(e instanceof Error ? e.message : "Failed to create deck", "error");
|
|
173
173
|
}
|
|
174
174
|
}, [
|
|
175
|
-
|
|
176
|
-
|
|
175
|
+
cn,
|
|
176
|
+
dn,
|
|
177
177
|
L,
|
|
178
178
|
I,
|
|
179
|
-
|
|
180
|
-
]),
|
|
179
|
+
Mt
|
|
180
|
+
]), Cn = c(async (e) => {
|
|
181
181
|
if (C.type === "editDeck") try {
|
|
182
|
-
await
|
|
182
|
+
await fn({ variables: {
|
|
183
183
|
id: C.deckId,
|
|
184
184
|
input: {
|
|
185
185
|
name: e.name,
|
|
@@ -193,10 +193,10 @@ function rt() {
|
|
|
193
193
|
I(e instanceof Error ? e.message : "Failed to update deck", "error");
|
|
194
194
|
}
|
|
195
195
|
}, [
|
|
196
|
-
|
|
196
|
+
fn,
|
|
197
197
|
C,
|
|
198
198
|
I
|
|
199
|
-
]),
|
|
199
|
+
]), wn = c(async () => {
|
|
200
200
|
if (C.type === "confirmDelete") try {
|
|
201
201
|
C.target === "deck" ? (await W({ variables: { id: C.id } }), b === C.id && x(null), I("Deck deleted", "success")) : (await q({ variables: { id: C.id } }), I("Button deleted", "success")), w({ type: "none" }), Oe() && ke("success");
|
|
202
202
|
} catch (e) {
|
|
@@ -212,7 +212,7 @@ function rt() {
|
|
|
212
212
|
]), Z = c(async (e, t = !0) => {
|
|
213
213
|
let n = V?.buttons?.find((t) => t.id === e);
|
|
214
214
|
if (!n || !n.action) return;
|
|
215
|
-
let r = n.action, i =
|
|
215
|
+
let r = n.action, i = qt({
|
|
216
216
|
buttonId: e,
|
|
217
217
|
buttonLabel: n.label,
|
|
218
218
|
actionType: r.actionType,
|
|
@@ -220,7 +220,7 @@ function rt() {
|
|
|
220
220
|
status: "running",
|
|
221
221
|
startedAt: /* @__PURE__ */ new Date()
|
|
222
222
|
});
|
|
223
|
-
|
|
223
|
+
Tt(e), F(e, "executing");
|
|
224
224
|
try {
|
|
225
225
|
let n = (await J({ variables: { id: e } })).data?.executeVibeDeckButton;
|
|
226
226
|
if (n && Me(n) && n.agentId) {
|
|
@@ -229,7 +229,7 @@ function rt() {
|
|
|
229
229
|
error: t ? "Remote task execution is disabled on this agent." : "Remote execution still blocked after enabling — check the agent’s Security settings.",
|
|
230
230
|
output: n.output,
|
|
231
231
|
completedAt: /* @__PURE__ */ new Date()
|
|
232
|
-
}), t &&
|
|
232
|
+
}), t && Ht({
|
|
233
233
|
buttonId: e,
|
|
234
234
|
agentId: n.agentId
|
|
235
235
|
});
|
|
@@ -243,8 +243,8 @@ function rt() {
|
|
|
243
243
|
exitCode: n.exitCode,
|
|
244
244
|
webhookStatusCode: n.webhookStatusCode,
|
|
245
245
|
completedAt: /* @__PURE__ */ new Date()
|
|
246
|
-
}), t &&
|
|
247
|
-
workspaceId:
|
|
246
|
+
}), t && m.emitCustom("vibecontrols.vibedeck.button_executed", {
|
|
247
|
+
workspaceId: p ?? void 0,
|
|
248
248
|
buttonId: e,
|
|
249
249
|
deckId: B ?? void 0
|
|
250
250
|
});
|
|
@@ -265,45 +265,45 @@ function rt() {
|
|
|
265
265
|
completedAt: /* @__PURE__ */ new Date()
|
|
266
266
|
});
|
|
267
267
|
} finally {
|
|
268
|
-
|
|
268
|
+
Tt(null);
|
|
269
269
|
}
|
|
270
270
|
}, [
|
|
271
271
|
V,
|
|
272
272
|
J,
|
|
273
|
-
|
|
273
|
+
qt,
|
|
274
274
|
P,
|
|
275
275
|
F,
|
|
276
276
|
L,
|
|
277
|
-
h,
|
|
278
277
|
m,
|
|
278
|
+
p,
|
|
279
279
|
B
|
|
280
|
-
]),
|
|
280
|
+
]), Tn = c(async ({ shell: e, file: t }) => {
|
|
281
281
|
if (!M) return;
|
|
282
282
|
let { buttonId: n, agentId: r } = M;
|
|
283
|
-
|
|
283
|
+
Wt(!0);
|
|
284
284
|
try {
|
|
285
285
|
await je({
|
|
286
286
|
id: r,
|
|
287
|
-
profile:
|
|
287
|
+
profile: Kt
|
|
288
288
|
}, {
|
|
289
289
|
shell: e,
|
|
290
290
|
file: t
|
|
291
|
-
}),
|
|
291
|
+
}), Ht(null), await Z(n, !1);
|
|
292
292
|
} catch (e) {
|
|
293
293
|
I(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
|
|
294
294
|
} finally {
|
|
295
|
-
|
|
295
|
+
Wt(!1);
|
|
296
296
|
}
|
|
297
297
|
}, [
|
|
298
298
|
M,
|
|
299
|
-
|
|
299
|
+
Kt,
|
|
300
300
|
Z,
|
|
301
301
|
I
|
|
302
|
-
]),
|
|
302
|
+
]), En = c(async (e) => {
|
|
303
303
|
let t = V?.buttons?.find((t) => t.id === e);
|
|
304
304
|
if (t) {
|
|
305
|
-
if (
|
|
306
|
-
workspaceId:
|
|
305
|
+
if (m.emitCustom("vibecontrols.vibedeck.button_executed_clicked", {
|
|
306
|
+
workspaceId: p ?? void 0,
|
|
307
307
|
buttonId: e,
|
|
308
308
|
deckId: B ?? void 0
|
|
309
309
|
}), t.confirmationRequired) {
|
|
@@ -321,16 +321,16 @@ function rt() {
|
|
|
321
321
|
}, [
|
|
322
322
|
V,
|
|
323
323
|
Z,
|
|
324
|
-
h,
|
|
325
324
|
m,
|
|
325
|
+
p,
|
|
326
326
|
B
|
|
327
|
-
]),
|
|
327
|
+
]), Dn = c(async () => {
|
|
328
328
|
if (C.type !== "confirmExecute") return;
|
|
329
329
|
let e = C.buttonId;
|
|
330
330
|
w({ type: "none" }), await Z(e);
|
|
331
|
-
}, [C, Z]),
|
|
331
|
+
}, [C, Z]), On = c(async (e) => {
|
|
332
332
|
if (!(C.type !== "createButton" || !B)) try {
|
|
333
|
-
await
|
|
333
|
+
await mn({ variables: { input: {
|
|
334
334
|
vibeDeckId: B,
|
|
335
335
|
label: e.label,
|
|
336
336
|
actionId: e.actionId,
|
|
@@ -348,12 +348,12 @@ function rt() {
|
|
|
348
348
|
}
|
|
349
349
|
}, [
|
|
350
350
|
C,
|
|
351
|
-
|
|
351
|
+
mn,
|
|
352
352
|
B,
|
|
353
353
|
I
|
|
354
|
-
]),
|
|
354
|
+
]), kn = c(async (e) => {
|
|
355
355
|
if (C.type === "editButton") try {
|
|
356
|
-
await
|
|
356
|
+
await gn({ variables: {
|
|
357
357
|
id: C.buttonId,
|
|
358
358
|
input: {
|
|
359
359
|
label: e.label,
|
|
@@ -371,11 +371,11 @@ function rt() {
|
|
|
371
371
|
}
|
|
372
372
|
}, [
|
|
373
373
|
C,
|
|
374
|
-
|
|
374
|
+
gn,
|
|
375
375
|
I
|
|
376
|
-
]),
|
|
376
|
+
]), An = c(async (e, t, n) => {
|
|
377
377
|
try {
|
|
378
|
-
await
|
|
378
|
+
await vn({ variables: {
|
|
379
379
|
id: e,
|
|
380
380
|
input: {
|
|
381
381
|
row: t,
|
|
@@ -385,7 +385,7 @@ function rt() {
|
|
|
385
385
|
} catch (e) {
|
|
386
386
|
I(e instanceof Error ? e.message : "Failed to move button", "error");
|
|
387
387
|
}
|
|
388
|
-
}, [
|
|
388
|
+
}, [vn, I]), jn = c(async (e) => {
|
|
389
389
|
let t = z.find((t) => t.id === e);
|
|
390
390
|
if (t) try {
|
|
391
391
|
await K({ variables: {
|
|
@@ -404,13 +404,13 @@ function rt() {
|
|
|
404
404
|
K,
|
|
405
405
|
L,
|
|
406
406
|
I
|
|
407
|
-
]),
|
|
407
|
+
]), Mn = c(async (e) => {
|
|
408
408
|
try {
|
|
409
409
|
await G({ variables: { id: e } }), I("Default deck set", "success");
|
|
410
410
|
} catch (e) {
|
|
411
411
|
I(e instanceof Error ? e.message : "Failed to set default", "error");
|
|
412
412
|
}
|
|
413
|
-
}, [G, I]),
|
|
413
|
+
}, [G, I]), Nn = c(async () => {
|
|
414
414
|
if (H.length === 1) {
|
|
415
415
|
A("setDefaultDeck");
|
|
416
416
|
try {
|
|
@@ -427,7 +427,7 @@ function rt() {
|
|
|
427
427
|
I,
|
|
428
428
|
Y,
|
|
429
429
|
R
|
|
430
|
-
]),
|
|
430
|
+
]), Pn = c(async () => {
|
|
431
431
|
if (H.length !== 0) {
|
|
432
432
|
A("duplicateDeck");
|
|
433
433
|
try {
|
|
@@ -458,12 +458,12 @@ function rt() {
|
|
|
458
458
|
I,
|
|
459
459
|
Y,
|
|
460
460
|
R
|
|
461
|
-
]),
|
|
461
|
+
]), Fn = c(async () => {
|
|
462
462
|
if (H.length !== 0) {
|
|
463
463
|
A("deleteDeck");
|
|
464
464
|
try {
|
|
465
465
|
let e = await Promise.allSettled(H.map((e) => W({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
466
|
-
H.some((e) => e.id === b) && x(null), I(`Deleted ${t} deck${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), Y(),
|
|
466
|
+
H.some((e) => e.id === b) && x(null), I(`Deleted ${t} deck${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), Y(), Ot(null), await R();
|
|
467
467
|
} catch (e) {
|
|
468
468
|
I(e instanceof Error ? e.message : "Failed to delete decks", "error");
|
|
469
469
|
} finally {
|
|
@@ -478,7 +478,7 @@ function rt() {
|
|
|
478
478
|
I,
|
|
479
479
|
Y,
|
|
480
480
|
R
|
|
481
|
-
]),
|
|
481
|
+
]), In = c(async () => {
|
|
482
482
|
if (U.length === 0) return;
|
|
483
483
|
A("executeButton");
|
|
484
484
|
let e = 0, t = 0;
|
|
@@ -504,12 +504,12 @@ function rt() {
|
|
|
504
504
|
L,
|
|
505
505
|
I,
|
|
506
506
|
X
|
|
507
|
-
]),
|
|
507
|
+
]), Ln = c(async () => {
|
|
508
508
|
if (U.length !== 0) {
|
|
509
509
|
A("deleteButton");
|
|
510
510
|
try {
|
|
511
511
|
let e = await Promise.allSettled(U.map((e) => q({ variables: { id: e.id } }))), t = e.filter((e) => e.status === "fulfilled").length, n = e.length - t;
|
|
512
|
-
I(`Deleted ${t} button${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), X(), O(null), await
|
|
512
|
+
I(`Deleted ${t} button${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), X(), O(null), await en();
|
|
513
513
|
} catch (e) {
|
|
514
514
|
I(e instanceof Error ? e.message : "Failed to delete buttons", "error");
|
|
515
515
|
} finally {
|
|
@@ -521,53 +521,53 @@ function rt() {
|
|
|
521
521
|
q,
|
|
522
522
|
I,
|
|
523
523
|
X,
|
|
524
|
-
|
|
524
|
+
en
|
|
525
525
|
]);
|
|
526
|
-
if (
|
|
527
|
-
if (
|
|
528
|
-
if (
|
|
529
|
-
if (
|
|
530
|
-
message:
|
|
526
|
+
if (at) return /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(me, { message: "Loading permissions..." }) });
|
|
527
|
+
if (g && (g.permissionStrings?.length ?? 0) > 0 && !ot) return /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(rt, {}) });
|
|
528
|
+
if (Xt) return /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(me, { message: "Loading Vibe Decks..." }) });
|
|
529
|
+
if (Zt) return /* @__PURE__ */ u(f, { children: /* @__PURE__ */ u(he, {
|
|
530
|
+
message: Zt.message,
|
|
531
531
|
onRetry: () => R()
|
|
532
532
|
}) });
|
|
533
533
|
let Q = C.type === "editButton" ? V?.buttons?.find((e) => e.id === C.buttonId) : null, $ = C.type === "editDeck" ? z.find((e) => e.id === C.deckId) : null;
|
|
534
|
-
return /* @__PURE__ */ f
|
|
534
|
+
return /* @__PURE__ */ d(f, {
|
|
535
535
|
className: "p-4 sm:p-6 space-y-6",
|
|
536
536
|
children: [
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
title:
|
|
537
|
+
/* @__PURE__ */ u(pe, {
|
|
538
|
+
title: _("nav.vibeDeck", "Vibe Deck"),
|
|
539
539
|
description: "Your digital command board — execute commands or trigger webhooks with one click",
|
|
540
|
-
actions: /* @__PURE__ */
|
|
540
|
+
actions: /* @__PURE__ */ d("div", {
|
|
541
541
|
className: "flex items-center gap-2",
|
|
542
542
|
children: [
|
|
543
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ d("div", {
|
|
544
544
|
"data-tour": "vibedeck-mode-switcher",
|
|
545
545
|
className: "flex items-center rounded-lg border border-border-default bg-bg-surface p-0.5",
|
|
546
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ d("button", {
|
|
547
547
|
type: "button",
|
|
548
|
-
onClick: () =>
|
|
548
|
+
onClick: () => _t("preview"),
|
|
549
549
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-all ${S ? "bg-action-primary-bg text-action-primary-text shadow-sm" : "text-text-tertiary hover:text-text-primary"}`,
|
|
550
550
|
title: S ? "Preview mode — execute only" : "Switch to Preview mode",
|
|
551
551
|
"aria-pressed": S,
|
|
552
|
-
children: [/* @__PURE__ */
|
|
553
|
-
}), /* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ u(Ge, { size: 14 }), "Preview"]
|
|
553
|
+
}), /* @__PURE__ */ d("button", {
|
|
554
554
|
type: "button",
|
|
555
|
-
onClick: () =>
|
|
555
|
+
onClick: () => _t("edit"),
|
|
556
556
|
className: `flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-all ${S ? "text-text-tertiary hover:text-text-primary" : "bg-action-primary-bg text-action-primary-text shadow-sm"}`,
|
|
557
557
|
title: S ? "Switch to Edit mode" : "Edit mode — full editing",
|
|
558
558
|
"aria-pressed": !S,
|
|
559
|
-
children: [/* @__PURE__ */
|
|
559
|
+
children: [/* @__PURE__ */ u(Je, { size: 14 }), "Edit"]
|
|
560
560
|
})]
|
|
561
561
|
}),
|
|
562
|
-
B && V && /* @__PURE__ */
|
|
562
|
+
B && V && /* @__PURE__ */ u(Ae, {
|
|
563
563
|
entity: "vibedeck",
|
|
564
564
|
resource: {
|
|
565
565
|
id: B,
|
|
566
566
|
name: V.name
|
|
567
567
|
},
|
|
568
|
-
label:
|
|
568
|
+
label: _("vibecontrols.vibedeck.share.shareDeck", "Share deck")
|
|
569
569
|
}),
|
|
570
|
-
B && V && /* @__PURE__ */
|
|
570
|
+
B && V && /* @__PURE__ */ d("button", {
|
|
571
571
|
type: "button",
|
|
572
572
|
onClick: () => w({
|
|
573
573
|
type: "publicLink",
|
|
@@ -575,95 +575,95 @@ function rt() {
|
|
|
575
575
|
deckName: V.name
|
|
576
576
|
}),
|
|
577
577
|
className: "inline-flex items-center gap-1.5 rounded-md border border-border-default px-3 py-1.5 text-sm text-text-primary hover:bg-bg-sunken",
|
|
578
|
-
title:
|
|
579
|
-
children: [/* @__PURE__ */
|
|
578
|
+
title: _("vibecontrols.vibedeck.share.publicLinkHint", "Create a public link with optional execution, expiry and password"),
|
|
579
|
+
children: [/* @__PURE__ */ u(qe, { className: "size-4" }), _("vibecontrols.vibedeck.share.publicLink", "Public link")]
|
|
580
580
|
}),
|
|
581
|
-
B && V && /* @__PURE__ */
|
|
581
|
+
B && V && /* @__PURE__ */ u(we, {
|
|
582
582
|
entityType: ge.VibeDeck,
|
|
583
583
|
entityId: B,
|
|
584
584
|
currentVibeId: V.vibeId ?? null,
|
|
585
585
|
currentVisibility: V.visibility ?? null,
|
|
586
586
|
refetchQueries: ["ListVibeDecks", "GetVibeDeck"]
|
|
587
587
|
}),
|
|
588
|
-
/* @__PURE__ */
|
|
588
|
+
/* @__PURE__ */ u("button", {
|
|
589
589
|
type: "button",
|
|
590
590
|
onClick: () => {
|
|
591
|
-
R(), B &&
|
|
591
|
+
R(), B && en();
|
|
592
592
|
},
|
|
593
593
|
className: "p-2 rounded-lg hover:bg-bg-sunken text-text-tertiary hover:text-text-primary transition-colors",
|
|
594
594
|
title: "Refresh",
|
|
595
|
-
children: /* @__PURE__ */
|
|
595
|
+
children: /* @__PURE__ */ u(Xe, { size: 16 })
|
|
596
596
|
})
|
|
597
597
|
]
|
|
598
598
|
})
|
|
599
599
|
}),
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
icon: /* @__PURE__ */
|
|
602
|
-
children:
|
|
600
|
+
/* @__PURE__ */ u(tt, {
|
|
601
|
+
icon: /* @__PURE__ */ u(Ke, { className: "size-4" }),
|
|
602
|
+
children: _("vibeDeck.purpose", "The Vibe Deck is your one-click command board: arrange the actions and webhooks you run most into tiles, then fire them with a single tap. Build a deck for a workflow (deploy, restart, run tests) so the whole team can execute the same operations consistently — Preview mode lets you try a layout safely before going live.")
|
|
603
603
|
}),
|
|
604
|
-
!S && z.length > 0 && /* @__PURE__ */
|
|
604
|
+
!S && z.length > 0 && /* @__PURE__ */ u("div", {
|
|
605
605
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
606
|
-
children: /* @__PURE__ */
|
|
606
|
+
children: /* @__PURE__ */ d("div", {
|
|
607
607
|
className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
|
|
608
|
-
children: [/* @__PURE__ */
|
|
608
|
+
children: [/* @__PURE__ */ d("div", {
|
|
609
609
|
className: "flex flex-wrap items-center gap-3",
|
|
610
|
-
children: [/* @__PURE__ */
|
|
610
|
+
children: [/* @__PURE__ */ d("div", {
|
|
611
611
|
className: "flex items-center gap-2",
|
|
612
|
-
children: [/* @__PURE__ */
|
|
613
|
-
checked:
|
|
614
|
-
indeterminate:
|
|
615
|
-
onChange:
|
|
612
|
+
children: [/* @__PURE__ */ u(Ee, {
|
|
613
|
+
checked: tn,
|
|
614
|
+
indeterminate: nn,
|
|
615
|
+
onChange: bn,
|
|
616
616
|
ariaLabel: "Select all vibe decks"
|
|
617
|
-
}), /* @__PURE__ */
|
|
617
|
+
}), /* @__PURE__ */ u("span", {
|
|
618
618
|
className: "text-sm font-medium text-text-primary",
|
|
619
619
|
children: "Select all decks"
|
|
620
620
|
})]
|
|
621
|
-
}), T.size > 0 && /* @__PURE__ */
|
|
621
|
+
}), T.size > 0 && /* @__PURE__ */ u("button", {
|
|
622
622
|
type: "button",
|
|
623
623
|
onClick: Y,
|
|
624
624
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
625
625
|
children: "Clear selection"
|
|
626
626
|
})]
|
|
627
|
-
}), /* @__PURE__ */
|
|
627
|
+
}), /* @__PURE__ */ d("div", {
|
|
628
628
|
className: "flex flex-wrap items-center gap-2",
|
|
629
629
|
children: [
|
|
630
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ d("span", {
|
|
631
631
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
632
632
|
children: [T.size, " selected"]
|
|
633
633
|
}),
|
|
634
|
-
/* @__PURE__ */
|
|
634
|
+
yt && /* @__PURE__ */ u("button", {
|
|
635
635
|
type: "button",
|
|
636
|
-
onClick:
|
|
636
|
+
onClick: Nn,
|
|
637
637
|
disabled: H.length !== 1 || H[0]?.isDefault || k !== null,
|
|
638
638
|
className: "rounded-md border border-status-warning-border px-3 py-2 text-sm font-medium text-status-warning-text hover:bg-status-warning-bg-subtle disabled:cursor-not-allowed disabled:opacity-50",
|
|
639
|
-
children: /* @__PURE__ */
|
|
639
|
+
children: /* @__PURE__ */ d("span", {
|
|
640
640
|
className: "inline-flex items-center gap-2",
|
|
641
|
-
children: [/* @__PURE__ */
|
|
641
|
+
children: [/* @__PURE__ */ u(Ze, { size: 14 }), "Set Selected Default"]
|
|
642
642
|
})
|
|
643
643
|
}),
|
|
644
|
-
/* @__PURE__ */
|
|
644
|
+
vt && /* @__PURE__ */ u("button", {
|
|
645
645
|
type: "button",
|
|
646
|
-
onClick:
|
|
646
|
+
onClick: Pn,
|
|
647
647
|
disabled: H.length === 0 || k !== null,
|
|
648
648
|
className: "rounded-md border border-border-default px-3 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken disabled:cursor-not-allowed disabled:opacity-50",
|
|
649
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ d("span", {
|
|
650
650
|
className: "inline-flex items-center gap-2",
|
|
651
651
|
children: [
|
|
652
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ u(We, { size: 14 }),
|
|
653
653
|
"Duplicate Selected",
|
|
654
654
|
H.length > 0 ? ` (${H.length})` : ""
|
|
655
655
|
]
|
|
656
656
|
})
|
|
657
657
|
}),
|
|
658
|
-
/* @__PURE__ */
|
|
658
|
+
bt && /* @__PURE__ */ u("button", {
|
|
659
659
|
type: "button",
|
|
660
|
-
onClick: () =>
|
|
660
|
+
onClick: () => Ot("delete"),
|
|
661
661
|
disabled: H.length === 0 || k !== null,
|
|
662
662
|
className: "rounded-md border border-status-error-border px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
663
|
-
children: /* @__PURE__ */
|
|
663
|
+
children: /* @__PURE__ */ d("span", {
|
|
664
664
|
className: "inline-flex items-center gap-2",
|
|
665
665
|
children: [
|
|
666
|
-
/* @__PURE__ */
|
|
666
|
+
/* @__PURE__ */ u(Qe, { size: 14 }),
|
|
667
667
|
"Delete Selected",
|
|
668
668
|
H.length > 0 ? ` (${H.length})` : ""
|
|
669
669
|
]
|
|
@@ -673,9 +673,9 @@ function rt() {
|
|
|
673
673
|
})]
|
|
674
674
|
})
|
|
675
675
|
}),
|
|
676
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ u("div", {
|
|
677
677
|
"data-tour": "vibedeck-switcher",
|
|
678
|
-
children: /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ u(Pe, {
|
|
679
679
|
decks: z.map((e) => ({
|
|
680
680
|
id: e.id,
|
|
681
681
|
name: e.name,
|
|
@@ -686,10 +686,10 @@ function rt() {
|
|
|
686
686
|
activeDeckId: B,
|
|
687
687
|
selectedDeckIds: T,
|
|
688
688
|
onSelectDeck: (e) => x(e),
|
|
689
|
-
onToggleSelectDeck:
|
|
689
|
+
onToggleSelectDeck: yn,
|
|
690
690
|
onCreateDeck: () => w({ type: "createDeck" }),
|
|
691
|
-
onSetDefault:
|
|
692
|
-
onDuplicate: (e) =>
|
|
691
|
+
onSetDefault: Mn,
|
|
692
|
+
onDuplicate: (e) => jn(e),
|
|
693
693
|
onDelete: (e) => {
|
|
694
694
|
w({
|
|
695
695
|
type: "confirmDelete",
|
|
@@ -710,82 +710,82 @@ function rt() {
|
|
|
710
710
|
deckName: t.name
|
|
711
711
|
});
|
|
712
712
|
},
|
|
713
|
-
canCreate:
|
|
714
|
-
canUpdate:
|
|
715
|
-
canDelete:
|
|
713
|
+
canCreate: y,
|
|
714
|
+
canUpdate: yt,
|
|
715
|
+
canDelete: bt
|
|
716
716
|
})
|
|
717
717
|
}),
|
|
718
|
-
/* @__PURE__ */
|
|
718
|
+
/* @__PURE__ */ d(et, {
|
|
719
719
|
mode: "wait",
|
|
720
|
-
children: [!V &&
|
|
720
|
+
children: [!V && !$t && z.length === 0 && /* @__PURE__ */ u(ye, {
|
|
721
721
|
title: "No Vibe Decks yet",
|
|
722
722
|
description: "Create your first Vibe Deck to start organizing your commands and webhooks",
|
|
723
|
-
action: /* @__PURE__ */
|
|
723
|
+
action: /* @__PURE__ */ d("div", {
|
|
724
724
|
className: "flex items-center gap-2",
|
|
725
|
-
children: [
|
|
725
|
+
children: [y && /* @__PURE__ */ u("button", {
|
|
726
726
|
type: "button",
|
|
727
727
|
onClick: () => w({ type: "createDeck" }),
|
|
728
728
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
|
|
729
729
|
children: "Create Vibe Deck"
|
|
730
|
-
}), /* @__PURE__ */
|
|
730
|
+
}), /* @__PURE__ */ u(Te, { prompt: "What is a VibeDeck and how do I use it to organise controls?" })]
|
|
731
731
|
})
|
|
732
|
-
}),
|
|
732
|
+
}), $t && /* @__PURE__ */ u(me, { message: "Loading deck..." })]
|
|
733
733
|
}),
|
|
734
|
-
V && /* @__PURE__ */
|
|
734
|
+
V && /* @__PURE__ */ d("div", {
|
|
735
735
|
className: "space-y-4",
|
|
736
|
-
children: [!S && (V.buttons?.length ?? 0) > 0 && /* @__PURE__ */
|
|
736
|
+
children: [!S && (V.buttons?.length ?? 0) > 0 && /* @__PURE__ */ u("div", {
|
|
737
737
|
className: "rounded-lg border border-border-default bg-bg-surface p-4",
|
|
738
|
-
children: /* @__PURE__ */
|
|
738
|
+
children: /* @__PURE__ */ d("div", {
|
|
739
739
|
className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
|
|
740
|
-
children: [/* @__PURE__ */
|
|
740
|
+
children: [/* @__PURE__ */ d("div", {
|
|
741
741
|
className: "flex flex-wrap items-center gap-3",
|
|
742
|
-
children: [/* @__PURE__ */
|
|
742
|
+
children: [/* @__PURE__ */ d("div", {
|
|
743
743
|
className: "flex items-center gap-2",
|
|
744
|
-
children: [/* @__PURE__ */
|
|
745
|
-
checked:
|
|
746
|
-
indeterminate:
|
|
747
|
-
onChange:
|
|
744
|
+
children: [/* @__PURE__ */ u(Ee, {
|
|
745
|
+
checked: rn,
|
|
746
|
+
indeterminate: an,
|
|
747
|
+
onChange: xn,
|
|
748
748
|
ariaLabel: "Select all buttons in active deck"
|
|
749
|
-
}), /* @__PURE__ */
|
|
749
|
+
}), /* @__PURE__ */ u("span", {
|
|
750
750
|
className: "text-sm font-medium text-text-primary",
|
|
751
751
|
children: "Select all buttons in this deck"
|
|
752
752
|
})]
|
|
753
|
-
}), E.size > 0 && /* @__PURE__ */
|
|
753
|
+
}), E.size > 0 && /* @__PURE__ */ u("button", {
|
|
754
754
|
type: "button",
|
|
755
755
|
onClick: X,
|
|
756
756
|
className: "text-sm text-text-secondary hover:text-text-primary",
|
|
757
757
|
children: "Clear selection"
|
|
758
758
|
})]
|
|
759
|
-
}), /* @__PURE__ */
|
|
759
|
+
}), /* @__PURE__ */ d("div", {
|
|
760
760
|
className: "flex flex-wrap items-center gap-2",
|
|
761
761
|
children: [
|
|
762
|
-
/* @__PURE__ */
|
|
762
|
+
/* @__PURE__ */ d("span", {
|
|
763
763
|
className: "rounded-full bg-bg-sunken px-3 py-1 text-sm font-medium text-text-secondary",
|
|
764
764
|
children: [E.size, " selected"]
|
|
765
765
|
}),
|
|
766
|
-
/* @__PURE__ */
|
|
766
|
+
mt && /* @__PURE__ */ u("button", {
|
|
767
767
|
type: "button",
|
|
768
768
|
onClick: () => O("execute"),
|
|
769
769
|
disabled: U.length === 0 || k !== null,
|
|
770
770
|
className: "rounded-md border border-status-success-border px-3 py-2 text-sm font-medium text-status-success-text hover:bg-status-success-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
771
|
-
children: /* @__PURE__ */
|
|
771
|
+
children: /* @__PURE__ */ d("span", {
|
|
772
772
|
className: "inline-flex items-center gap-2",
|
|
773
773
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
774
|
+
/* @__PURE__ */ u(Ye, { size: 14 }),
|
|
775
775
|
"Execute Selected",
|
|
776
776
|
U.length > 0 ? ` (${U.length})` : ""
|
|
777
777
|
]
|
|
778
778
|
})
|
|
779
779
|
}),
|
|
780
|
-
/* @__PURE__ */
|
|
780
|
+
Ct && /* @__PURE__ */ u("button", {
|
|
781
781
|
type: "button",
|
|
782
782
|
onClick: () => O("delete"),
|
|
783
783
|
disabled: U.length === 0 || k !== null,
|
|
784
784
|
className: "rounded-md border border-status-error-border px-3 py-2 text-sm font-medium text-status-error-text hover:bg-status-error-bg disabled:cursor-not-allowed disabled:opacity-50",
|
|
785
|
-
children: /* @__PURE__ */
|
|
785
|
+
children: /* @__PURE__ */ d("span", {
|
|
786
786
|
className: "inline-flex items-center gap-2",
|
|
787
787
|
children: [
|
|
788
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ u(Qe, { size: 14 }),
|
|
789
789
|
"Delete Selected",
|
|
790
790
|
U.length > 0 ? ` (${U.length})` : ""
|
|
791
791
|
]
|
|
@@ -794,10 +794,10 @@ function rt() {
|
|
|
794
794
|
]
|
|
795
795
|
})]
|
|
796
796
|
})
|
|
797
|
-
}), /* @__PURE__ */
|
|
797
|
+
}), /* @__PURE__ */ d("div", {
|
|
798
798
|
"data-tour": "vibedeck-grid",
|
|
799
799
|
className: "relative",
|
|
800
|
-
children: [/* @__PURE__ */
|
|
800
|
+
children: [/* @__PURE__ */ u(Ne, {
|
|
801
801
|
gridColumns: V.gridColumns,
|
|
802
802
|
gridRows: V.gridRows,
|
|
803
803
|
buttons: (V.buttons || []).map((e) => ({
|
|
@@ -824,7 +824,7 @@ function rt() {
|
|
|
824
824
|
rowSpan: e.rowSpan,
|
|
825
825
|
colSpan: e.colSpan
|
|
826
826
|
})),
|
|
827
|
-
onExecuteButton:
|
|
827
|
+
onExecuteButton: En,
|
|
828
828
|
onEditButton: (e) => w({
|
|
829
829
|
type: "editButton",
|
|
830
830
|
buttonId: e
|
|
@@ -838,92 +838,92 @@ function rt() {
|
|
|
838
838
|
name: t?.label || "this button"
|
|
839
839
|
});
|
|
840
840
|
},
|
|
841
|
-
onDropButton:
|
|
841
|
+
onDropButton: An,
|
|
842
842
|
onAddButton: (e, t) => w({
|
|
843
843
|
type: "createButton",
|
|
844
844
|
row: e,
|
|
845
845
|
column: t
|
|
846
846
|
}),
|
|
847
|
-
executingButtonId:
|
|
848
|
-
canCreate:
|
|
849
|
-
canUpdate:
|
|
850
|
-
canDelete:
|
|
851
|
-
canExecute:
|
|
847
|
+
executingButtonId: wt,
|
|
848
|
+
canCreate: xt,
|
|
849
|
+
canUpdate: St,
|
|
850
|
+
canDelete: Ct,
|
|
851
|
+
canExecute: mt,
|
|
852
852
|
previewMode: S
|
|
853
|
-
}), (V.buttons?.length ?? 0) === 0 && S && /* @__PURE__ */
|
|
853
|
+
}), (V.buttons?.length ?? 0) === 0 && S && /* @__PURE__ */ u("div", {
|
|
854
854
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
855
|
-
children: /* @__PURE__ */
|
|
855
|
+
children: /* @__PURE__ */ d("div", {
|
|
856
856
|
className: "bg-bg-elevated/90 backdrop-blur-md border border-border-default rounded-lg p-6 max-w-md pointer-events-auto shadow-xl text-center",
|
|
857
857
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ u("h3", {
|
|
859
859
|
className: "text-lg font-semibold text-text-primary",
|
|
860
|
-
children:
|
|
860
|
+
children: _("vibeDeck.emptyDeckTitle", "This deck is empty")
|
|
861
861
|
}),
|
|
862
|
-
/* @__PURE__ */
|
|
862
|
+
/* @__PURE__ */ u("p", {
|
|
863
863
|
className: "text-sm text-text-secondary mt-2",
|
|
864
|
-
children:
|
|
864
|
+
children: _("vibeDeck.emptyDeckDescription", "Switch to Edit mode to add buttons.")
|
|
865
865
|
}),
|
|
866
|
-
st && /* @__PURE__ */
|
|
866
|
+
st && /* @__PURE__ */ u("button", {
|
|
867
867
|
type: "button",
|
|
868
|
-
onClick: () =>
|
|
868
|
+
onClick: () => _t("edit"),
|
|
869
869
|
className: "mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-md bg-action-primary-bg text-action-primary-text text-sm font-medium hover:opacity-90 transition-opacity",
|
|
870
|
-
children:
|
|
870
|
+
children: _("vibeDeck.editDeck", "Edit deck")
|
|
871
871
|
})
|
|
872
872
|
]
|
|
873
873
|
})
|
|
874
874
|
})]
|
|
875
875
|
})]
|
|
876
876
|
}),
|
|
877
|
-
|
|
877
|
+
Pt.length > 0 && /* @__PURE__ */ u("div", {
|
|
878
878
|
"data-tour": "vibedeck-execution-log",
|
|
879
|
-
children: /* @__PURE__ */
|
|
880
|
-
entries:
|
|
881
|
-
expanded:
|
|
882
|
-
onToggleExpanded: () =>
|
|
883
|
-
onClear: () =>
|
|
879
|
+
children: /* @__PURE__ */ u(ze, {
|
|
880
|
+
entries: Pt,
|
|
881
|
+
expanded: It,
|
|
882
|
+
onToggleExpanded: () => Lt((e) => !e),
|
|
883
|
+
onClear: () => Ft([])
|
|
884
884
|
})
|
|
885
885
|
}),
|
|
886
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ u(et, { children: At.length > 0 && /* @__PURE__ */ u("div", {
|
|
887
887
|
className: "fixed bottom-4 left-4 right-4 sm:left-auto sm:bottom-6 sm:right-6 z-50 flex flex-col gap-2 max-w-[calc(100vw-2rem)] sm:max-w-md",
|
|
888
|
-
children:
|
|
888
|
+
children: At.slice(-3).map((e) => /* @__PURE__ */ d("div", {
|
|
889
889
|
role: "button",
|
|
890
890
|
tabIndex: 0,
|
|
891
891
|
onKeyDown: (t) => {
|
|
892
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
892
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), Jt(e.id));
|
|
893
893
|
},
|
|
894
894
|
className: `p-4 rounded-xl shadow-lg border cursor-pointer ${e.variant === "success" ? "bg-status-success-bg-subtle border-status-success-border text-status-success-text" : "bg-status-error-bg-subtle border-status-error-border text-status-error-text"}`,
|
|
895
|
-
onClick: () =>
|
|
896
|
-
children: [/* @__PURE__ */
|
|
895
|
+
onClick: () => Jt(e.id),
|
|
896
|
+
children: [/* @__PURE__ */ u("div", {
|
|
897
897
|
className: "font-medium text-sm",
|
|
898
898
|
children: e.message
|
|
899
|
-
}), e.detail && /* @__PURE__ */
|
|
899
|
+
}), e.detail && /* @__PURE__ */ u("pre", {
|
|
900
900
|
className: "text-xs font-mono opacity-80 mt-1 max-h-20 overflow-y-auto whitespace-pre-wrap",
|
|
901
901
|
children: e.detail
|
|
902
902
|
})]
|
|
903
903
|
}, e.id))
|
|
904
904
|
}) }),
|
|
905
|
-
C.type === "createDeck" && /* @__PURE__ */
|
|
905
|
+
C.type === "createDeck" && /* @__PURE__ */ u(Fe, {
|
|
906
906
|
title: "Create Vibe Deck",
|
|
907
|
-
onSubmit:
|
|
907
|
+
onSubmit: Sn,
|
|
908
908
|
onCancel: () => {
|
|
909
|
-
w({ type: "none" }),
|
|
909
|
+
w({ type: "none" }), Nt(xe);
|
|
910
910
|
},
|
|
911
|
-
isLoading:
|
|
912
|
-
extraSection: /* @__PURE__ */
|
|
911
|
+
isLoading: ln,
|
|
912
|
+
extraSection: /* @__PURE__ */ d("div", {
|
|
913
913
|
className: "space-y-4",
|
|
914
|
-
children: [/* @__PURE__ */
|
|
914
|
+
children: [/* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
|
|
915
915
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
916
|
-
children:
|
|
917
|
-
}), /* @__PURE__ */
|
|
916
|
+
children: _("vibeDeck.tags", "Tags")
|
|
917
|
+
}), /* @__PURE__ */ u(_e, {
|
|
918
918
|
entityType: "VIBECONTROLS_VIBEDECK",
|
|
919
|
-
onDraftChange:
|
|
920
|
-
})] }), /* @__PURE__ */
|
|
921
|
-
value:
|
|
922
|
-
onChange:
|
|
919
|
+
onDraftChange: un
|
|
920
|
+
})] }), /* @__PURE__ */ u(Se, {
|
|
921
|
+
value: Mt,
|
|
922
|
+
onChange: Nt
|
|
923
923
|
})]
|
|
924
924
|
})
|
|
925
925
|
}),
|
|
926
|
-
C.type === "editDeck" && $ && /* @__PURE__ */
|
|
926
|
+
C.type === "editDeck" && $ && /* @__PURE__ */ u(Fe, {
|
|
927
927
|
title: "Edit Vibe Deck",
|
|
928
928
|
initialData: {
|
|
929
929
|
name: $.name,
|
|
@@ -932,29 +932,29 @@ function rt() {
|
|
|
932
932
|
gridColumns: $.gridColumns,
|
|
933
933
|
gridRows: $.gridRows
|
|
934
934
|
},
|
|
935
|
-
onSubmit:
|
|
935
|
+
onSubmit: Cn,
|
|
936
936
|
onCancel: () => w({ type: "none" }),
|
|
937
|
-
isLoading:
|
|
938
|
-
extraSection: /* @__PURE__ */
|
|
937
|
+
isLoading: pn,
|
|
938
|
+
extraSection: /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("h3", {
|
|
939
939
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
940
|
-
children:
|
|
941
|
-
}), /* @__PURE__ */
|
|
940
|
+
children: _("vibeDeck.tags", "Tags")
|
|
941
|
+
}), /* @__PURE__ */ u(_e, {
|
|
942
942
|
entityType: "VIBECONTROLS_VIBEDECK",
|
|
943
943
|
entityId: $.id
|
|
944
944
|
})] })
|
|
945
945
|
}),
|
|
946
|
-
C.type === "createButton" && /* @__PURE__ */
|
|
946
|
+
C.type === "createButton" && /* @__PURE__ */ u(Ie, {
|
|
947
947
|
title: "Add Button",
|
|
948
|
-
agents:
|
|
949
|
-
onSubmit:
|
|
948
|
+
agents: sn,
|
|
949
|
+
onSubmit: On,
|
|
950
950
|
onCancel: () => w({ type: "none" }),
|
|
951
|
-
isLoading:
|
|
951
|
+
isLoading: hn,
|
|
952
952
|
gridColumns: V?.gridColumns,
|
|
953
953
|
gridRows: V?.gridRows,
|
|
954
954
|
buttonRow: C.row,
|
|
955
955
|
buttonColumn: C.column
|
|
956
956
|
}),
|
|
957
|
-
C.type === "editButton" && Q && /* @__PURE__ */
|
|
957
|
+
C.type === "editButton" && Q && /* @__PURE__ */ u(Ie, {
|
|
958
958
|
title: "Edit Button",
|
|
959
959
|
initialData: {
|
|
960
960
|
label: Q.label,
|
|
@@ -966,93 +966,93 @@ function rt() {
|
|
|
966
966
|
rowSpan: Q.rowSpan,
|
|
967
967
|
colSpan: Q.colSpan
|
|
968
968
|
},
|
|
969
|
-
agents:
|
|
970
|
-
onSubmit:
|
|
969
|
+
agents: sn,
|
|
970
|
+
onSubmit: kn,
|
|
971
971
|
onCancel: () => w({ type: "none" }),
|
|
972
|
-
isLoading:
|
|
972
|
+
isLoading: _n,
|
|
973
973
|
gridColumns: V?.gridColumns,
|
|
974
974
|
gridRows: V?.gridRows,
|
|
975
975
|
buttonRow: Q.row,
|
|
976
976
|
buttonColumn: Q.column
|
|
977
977
|
}),
|
|
978
|
-
C.type === "confirmDelete" && /* @__PURE__ */
|
|
978
|
+
C.type === "confirmDelete" && /* @__PURE__ */ u(a, {
|
|
979
979
|
isOpen: !0,
|
|
980
980
|
title: `Delete ${C.target === "deck" ? "Vibe Deck" : "Button"}`,
|
|
981
981
|
message: `Are you sure you want to delete "${C.name}"?${C.target === "deck" ? " All buttons in this deck will also be deleted." : ""}`,
|
|
982
982
|
confirmLabel: "Delete",
|
|
983
983
|
variant: "danger",
|
|
984
|
-
onConfirm:
|
|
984
|
+
onConfirm: wn,
|
|
985
985
|
onClose: () => w({ type: "none" })
|
|
986
986
|
}),
|
|
987
|
-
C.type === "confirmExecute" && /* @__PURE__ */
|
|
987
|
+
C.type === "confirmExecute" && /* @__PURE__ */ u(a, {
|
|
988
988
|
isOpen: !0,
|
|
989
989
|
title: `Execute: ${C.label}`,
|
|
990
990
|
message: `Are you sure you want to execute this action?\n\n${C.detail}`,
|
|
991
991
|
confirmLabel: "Execute",
|
|
992
992
|
variant: "warning",
|
|
993
|
-
onConfirm:
|
|
993
|
+
onConfirm: Dn,
|
|
994
994
|
onClose: () => w({ type: "none" })
|
|
995
995
|
}),
|
|
996
|
-
/* @__PURE__ */
|
|
997
|
-
isOpen:
|
|
996
|
+
/* @__PURE__ */ u(a, {
|
|
997
|
+
isOpen: Dt === "delete",
|
|
998
998
|
title: "Delete Vibe Decks",
|
|
999
999
|
message: `Are you sure you want to delete ${H.length} selected deck${H.length === 1 ? "" : "s"}? All buttons in those decks will also be deleted.`,
|
|
1000
1000
|
confirmLabel: "Delete Decks",
|
|
1001
1001
|
variant: "danger",
|
|
1002
|
-
onConfirm:
|
|
1003
|
-
onClose: () =>
|
|
1002
|
+
onConfirm: Fn,
|
|
1003
|
+
onClose: () => Ot(null),
|
|
1004
1004
|
isLoading: k === "deleteDeck"
|
|
1005
1005
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
isOpen:
|
|
1006
|
+
/* @__PURE__ */ u(a, {
|
|
1007
|
+
isOpen: kt === "execute",
|
|
1008
1008
|
title: "Execute Vibe Deck Buttons",
|
|
1009
1009
|
message: `Execute ${U.length} selected button${U.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
|
|
1010
1010
|
confirmLabel: "Execute Buttons",
|
|
1011
1011
|
variant: "warning",
|
|
1012
|
-
onConfirm:
|
|
1012
|
+
onConfirm: In,
|
|
1013
1013
|
onClose: () => O(null),
|
|
1014
1014
|
isLoading: k === "executeButton"
|
|
1015
1015
|
}),
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
isOpen:
|
|
1016
|
+
/* @__PURE__ */ u(a, {
|
|
1017
|
+
isOpen: kt === "delete",
|
|
1018
1018
|
title: "Delete Vibe Deck Buttons",
|
|
1019
1019
|
message: `Delete ${U.length} selected button${U.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
1020
1020
|
confirmLabel: "Delete Buttons",
|
|
1021
1021
|
variant: "danger",
|
|
1022
|
-
onConfirm:
|
|
1022
|
+
onConfirm: Ln,
|
|
1023
1023
|
onClose: () => O(null),
|
|
1024
1024
|
isLoading: k === "deleteButton"
|
|
1025
1025
|
}),
|
|
1026
|
-
C.type === "shareDeck" && /* @__PURE__ */
|
|
1026
|
+
C.type === "shareDeck" && /* @__PURE__ */ u(Le, {
|
|
1027
1027
|
vibeDeckId: C.deckId,
|
|
1028
1028
|
vibeDeckName: C.deckName,
|
|
1029
1029
|
onClose: () => w({ type: "none" })
|
|
1030
1030
|
}),
|
|
1031
|
-
C.type === "publicLink" && /* @__PURE__ */
|
|
1031
|
+
C.type === "publicLink" && /* @__PURE__ */ u(Re, {
|
|
1032
1032
|
vibeDeckId: C.deckId,
|
|
1033
1033
|
vibeDeckName: C.deckName,
|
|
1034
1034
|
onClose: () => w({ type: "none" })
|
|
1035
1035
|
}),
|
|
1036
|
-
/* @__PURE__ */
|
|
1037
|
-
isOpen:
|
|
1038
|
-
onClose: () =>
|
|
1036
|
+
/* @__PURE__ */ u(ce, {
|
|
1037
|
+
isOpen: Bt !== null,
|
|
1038
|
+
onClose: () => Vt(null),
|
|
1039
1039
|
onConfirm: () => {
|
|
1040
|
-
|
|
1040
|
+
Vt(null), it("/billing/plans");
|
|
1041
1041
|
},
|
|
1042
|
-
title:
|
|
1043
|
-
message:
|
|
1042
|
+
title: Bt?.title || "Quota Reached",
|
|
1043
|
+
message: Bt?.message || "Upgrade your plan to continue."
|
|
1044
1044
|
}),
|
|
1045
|
-
/* @__PURE__ */
|
|
1045
|
+
/* @__PURE__ */ u(be, {
|
|
1046
1046
|
isOpen: M !== null,
|
|
1047
|
-
agentName: M ?
|
|
1048
|
-
isLoading:
|
|
1049
|
-
onClose: () =>
|
|
1050
|
-
onConfirm:
|
|
1047
|
+
agentName: M ? sn.find((e) => e.id === M.agentId)?.name : void 0,
|
|
1048
|
+
isLoading: Ut,
|
|
1049
|
+
onClose: () => Ht(null),
|
|
1050
|
+
onConfirm: Tn
|
|
1051
1051
|
})
|
|
1052
1052
|
]
|
|
1053
1053
|
});
|
|
1054
1054
|
}
|
|
1055
1055
|
//#endregion
|
|
1056
|
-
export {
|
|
1056
|
+
export { it as VibeDeckPage };
|
|
1057
1057
|
|
|
1058
1058
|
//# sourceMappingURL=VibeDeckPage.js.map
|