@burdenoff/microfe-vibecontrols 2026.602.3 → 2026.602.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/ActionCard.js +87 -74
- package/dist/components/actions/ActionCard.js.map +1 -1
- package/dist/components/ai/InstructionFilesManager.js +149 -141
- package/dist/components/ai/InstructionFilesManager.js.map +1 -1
- package/dist/components/shared/EntityVibeLinkControl.js +204 -0
- package/dist/components/shared/EntityVibeLinkControl.js.map +1 -0
- package/dist/components/shared/index.js +1 -0
- package/dist/components/tunnels/TunnelCard.js +51 -43
- package/dist/components/tunnels/TunnelCard.js.map +1 -1
- package/dist/components/vibe/VibeLinkedEntitiesPanel.js +117 -89
- package/dist/components/vibe/VibeLinkedEntitiesPanel.js.map +1 -1
- package/dist/generated/wspace-operations.js +1618 -1593
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.js +3 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.js +10 -10
- package/dist/pages/VibeDeckPage.js +211 -202
- package/dist/pages/VibeDeckPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,66 +7,68 @@ import { useVibeControlsStore as fe } from "../store/vibeControlsStore.js";
|
|
|
7
7
|
import { PageHeader as pe } from "../components/shared/PageHeader.js";
|
|
8
8
|
import { LoadingState as s } from "../components/shared/LoadingState.js";
|
|
9
9
|
import { ErrorState as me } from "../components/shared/ErrorState.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
10
|
+
import { VibeEntityType as he } from "../generated/wspace-types.js";
|
|
11
|
+
import { EntityTagPicker as ge } from "../components/shared/EntityTagPicker.js";
|
|
12
|
+
import { useDraftEntityTags as _e } from "../hooks/useDraftEntityTags.js";
|
|
13
|
+
import { EmptyState as ve } from "../components/shared/EmptyState.js";
|
|
14
|
+
import { EnableRemoteTaskDialog as ye } from "../components/shared/EnableRemoteTaskDialog.js";
|
|
15
|
+
import { LINK_TO_VIBE_DEFAULT as be, LinkToVibePanel as xe, linkToVibeInput as Se } from "../components/shared/LinkToVibePanel.js";
|
|
16
|
+
import { EntityVibeLinkControl as Ce } from "../components/shared/EntityVibeLinkControl.js";
|
|
17
|
+
import { GetHelpButton as we } from "../components/shared/GetHelpButton.js";
|
|
18
|
+
import { SelectionCheckbox as Te } from "../components/shared/SelectionCheckbox.js";
|
|
19
|
+
import { useActiveAgentProfile as Ee } from "../hooks/useActiveAgentProfile.js";
|
|
18
20
|
import "../components/shared/index.js";
|
|
19
|
-
import { isNative as
|
|
21
|
+
import { isNative as De, nativeNotify as Oe } from "../utils/nativeBridge.js";
|
|
20
22
|
import { VIBE_PERMISSIONS as c } from "../constants/permissions.js";
|
|
21
|
-
import { EntityShareButton as
|
|
23
|
+
import { EntityShareButton as ke } from "../components/sharing/EntityShareButton.js";
|
|
22
24
|
import "../components/sharing/index.js";
|
|
23
|
-
import { enableRemoteTaskExecution as
|
|
24
|
-
import { VibeDeckGrid as
|
|
25
|
-
import { VibeDeckSwitcher as
|
|
26
|
-
import { VibeDeckForm as
|
|
27
|
-
import { VibeDeckButtonForm as
|
|
28
|
-
import { VibeDeckShareDialog as
|
|
29
|
-
import { VibeDeckExecutionLog as
|
|
25
|
+
import { enableRemoteTaskExecution as Ae, isRemoteTaskDeniedError as je } from "../services/agentRemoteTaskGates.js";
|
|
26
|
+
import { VibeDeckGrid as Me } from "../components/vibedeck/VibeDeckGrid.js";
|
|
27
|
+
import { VibeDeckSwitcher as Ne } from "../components/vibedeck/VibeDeckSwitcher.js";
|
|
28
|
+
import { VibeDeckForm as Pe } from "../components/vibedeck/VibeDeckForm.js";
|
|
29
|
+
import { VibeDeckButtonForm as Fe } from "../components/vibedeck/VibeDeckButtonForm.js";
|
|
30
|
+
import { VibeDeckShareDialog as Ie } from "../components/vibedeck/VibeDeckShareDialog.js";
|
|
31
|
+
import { VibeDeckExecutionLog as Le } from "../components/vibedeck/VibeDeckExecutionLog.js";
|
|
30
32
|
import "../components/vibedeck/index.js";
|
|
31
|
-
import { useCallback as l, useEffect as
|
|
32
|
-
import { useI18n as
|
|
33
|
-
import { Copy as
|
|
34
|
-
import { usePermissions as
|
|
35
|
-
import { AnimatePresence as
|
|
33
|
+
import { useCallback as l, useEffect as Re, useMemo as ze, useRef as Be, useState as u } from "react";
|
|
34
|
+
import { useI18n as Ve } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
35
|
+
import { Copy as He, Eye as Ue, Pencil as We, Play as Ge, RefreshCw as Ke, Star as qe, Trash2 as Je } from "lucide-react";
|
|
36
|
+
import { usePermissions as Ye } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
37
|
+
import { AnimatePresence as Xe } from "framer-motion";
|
|
36
38
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
37
|
-
import { useEventBus as
|
|
38
|
-
import { AccessDenied as
|
|
39
|
+
import { useEventBus as Ze } from "@burdenoff/fe-libs/shared/events";
|
|
40
|
+
import { AccessDenied as Qe } from "@burdenoff/fe-libs/shared/components";
|
|
39
41
|
import { MotionPage as p } from "@burdenoff/fe-libs/shared/motion";
|
|
40
42
|
//#region src/pages/VibeDeckPage.tsx
|
|
41
|
-
function
|
|
42
|
-
let
|
|
43
|
+
function $e() {
|
|
44
|
+
let $e = de(), { workspaceId: m } = ue(), h = Ze(), { hasPermission: g, isLoading: et, permissions: _ } = Ye(), v = ((e) => (t, n) => {
|
|
43
45
|
let r = e.t(t);
|
|
44
46
|
return r === t ? n : r;
|
|
45
|
-
})(
|
|
46
|
-
|
|
47
|
+
})(Ve()), y = (Array.isArray(_) ? _ : _?.permissionStrings)?.some?.((e) => e.startsWith("vibedeck:")), tt = y ? g(c.VIBEDECK_LIST) : !0, nt = y ? g(c.VIBEDECK_CREATE) : !0, rt = y ? g(c.VIBEDECK_UPDATE) : !0, it = y ? g(c.VIBEDECK_DELETE) : !0, at = y ? g(c.VIBEDECK_EXECUTE) : !0, ot = et, { activeVibeDeckId: b, setActiveVibeDeckId: x, vibeDeckMode: st, setVibeDeckMode: ct } = fe(), S = st === "preview", lt = S ? !1 : nt, ut = S ? !1 : rt, dt = S ? !1 : it, [C, w] = u({ type: "none" }), [ft, pt] = u(null), [T, mt] = u(/* @__PURE__ */ new Set()), [E, D] = u(/* @__PURE__ */ new Set()), [ht, gt] = u(null), [_t, O] = u(null), [k, A] = u(null), [vt, yt] = u([]), j = Be(/* @__PURE__ */ new Map()), [bt, xt] = u(be), [St, Ct] = u([]), [wt, Tt] = u(!0), [Et, Dt] = u(/* @__PURE__ */ new Map()), [Ot, kt] = u(null), [M, At] = u(null), [jt, Mt] = u(!1), { profiles: Nt } = Ee(M?.agentId ?? null), Pt = Nt.find((e) => e.isDefault)?.name ?? "default", N = Be(/* @__PURE__ */ new Map());
|
|
48
|
+
Re(() => {
|
|
47
49
|
let e = N.current;
|
|
48
50
|
return () => {
|
|
49
51
|
for (let t of e.values()) clearTimeout(t);
|
|
50
52
|
};
|
|
51
53
|
}, []);
|
|
52
|
-
let
|
|
54
|
+
let Ft = l((e) => {
|
|
53
55
|
let t = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, n = {
|
|
54
56
|
...e,
|
|
55
57
|
id: t
|
|
56
58
|
};
|
|
57
|
-
return
|
|
59
|
+
return Ct((e) => [...e.slice(-49), n]), t;
|
|
58
60
|
}, []), P = l((e, t) => {
|
|
59
|
-
|
|
61
|
+
Ct((n) => n.map((n) => n.id === e ? {
|
|
60
62
|
...n,
|
|
61
63
|
...t
|
|
62
64
|
} : n));
|
|
63
65
|
}, []), F = l((e, t) => {
|
|
64
|
-
if (
|
|
66
|
+
if (Dt((n) => {
|
|
65
67
|
let r = new Map(n);
|
|
66
68
|
return r.set(e, t), r;
|
|
67
69
|
}), t === "success" || t === "error") {
|
|
68
70
|
let n = setTimeout(() => {
|
|
69
|
-
|
|
71
|
+
Dt((n) => {
|
|
70
72
|
let r = new Map(n);
|
|
71
73
|
return r.get(e) === t && r.delete(e), r;
|
|
72
74
|
}), N.current.delete(e);
|
|
@@ -74,7 +76,7 @@ function Ze() {
|
|
|
74
76
|
r && clearTimeout(r), N.current.set(e, n);
|
|
75
77
|
}
|
|
76
78
|
}, []);
|
|
77
|
-
|
|
79
|
+
Re(() => {
|
|
78
80
|
let e = j.current;
|
|
79
81
|
return () => {
|
|
80
82
|
for (let t of e.values()) clearTimeout(t);
|
|
@@ -82,57 +84,57 @@ function Ze() {
|
|
|
82
84
|
}, []);
|
|
83
85
|
let I = l((e, t, n, r) => {
|
|
84
86
|
let i = Date.now() + Math.random();
|
|
85
|
-
|
|
87
|
+
yt((r) => [...r, {
|
|
86
88
|
message: e,
|
|
87
89
|
variant: t,
|
|
88
90
|
detail: n,
|
|
89
91
|
id: i
|
|
90
92
|
}]);
|
|
91
93
|
let ee = setTimeout(() => {
|
|
92
|
-
|
|
94
|
+
yt((e) => e.filter((e) => e.id !== i)), j.current.delete(i);
|
|
93
95
|
}, r ?? (t === "success" ? 1e4 : 3e4));
|
|
94
96
|
j.current.set(i, ee);
|
|
95
|
-
}, []),
|
|
96
|
-
|
|
97
|
+
}, []), It = l((e) => {
|
|
98
|
+
yt((t) => t.filter((t) => t.id !== e));
|
|
97
99
|
let t = j.current.get(e);
|
|
98
100
|
t && (clearTimeout(t), j.current.delete(e));
|
|
99
101
|
}, []), L = l((e, t) => {
|
|
100
|
-
le(),
|
|
102
|
+
le(), kt({
|
|
101
103
|
title: e,
|
|
102
104
|
message: t
|
|
103
105
|
});
|
|
104
|
-
}, []), { data:
|
|
106
|
+
}, []), { data: Lt, loading: Rt, error: zt, refetch: R } = re({
|
|
105
107
|
variables: { pagination: { limit: 50 } },
|
|
106
|
-
skip:
|
|
107
|
-
}), z =
|
|
108
|
+
skip: ot
|
|
109
|
+
}), z = ze(() => Lt?.vibeDecks?.items || [], [Lt]), B = b || z.find((e) => e.isDefault)?.id || z[0]?.id || null, { data: Bt, loading: Vt, refetch: Ht } = te({
|
|
108
110
|
variables: { id: B },
|
|
109
|
-
skip: !B ||
|
|
110
|
-
}), V =
|
|
111
|
+
skip: !B || ot
|
|
112
|
+
}), V = Bt?.vibeDeck, H = ze(() => z.filter((e) => T.has(e.id)), [z, T]), U = ze(() => V?.buttons?.filter((e) => E.has(e.id)) ?? [], [V?.buttons, E]), Ut = z.length > 0 && z.every((e) => T.has(e.id)), Wt = z.some((e) => T.has(e.id)) && !Ut, Gt = (V?.buttons?.length ?? 0) > 0 && (V?.buttons ?? []).every((e) => E.has(e.id)), Kt = (V?.buttons ?? []).some((e) => E.has(e.id)) && !Gt, { data: qt } = ne({
|
|
111
113
|
variables: { pagination: { limit: 100 } },
|
|
112
114
|
fetchPolicy: "cache-and-network",
|
|
113
|
-
skip:
|
|
114
|
-
}),
|
|
115
|
+
skip: ot
|
|
116
|
+
}), Jt = (qt?.vibecontrolsAgents ?? []).map((e) => ({
|
|
115
117
|
id: e.id,
|
|
116
118
|
name: e.name,
|
|
117
119
|
isActive: e.isActive
|
|
118
|
-
})), [
|
|
119
|
-
|
|
120
|
+
})), [Yt, { loading: Xt }] = t({ refetchQueries: ["ListVibeDecks"] }), { setDraftTagIds: Zt, flushTags: Qt } = _e("VIBECONTROLS_VIBEDECK"), [$t, { loading: en }] = se({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [W] = r({ refetchQueries: ["ListVibeDecks"] }), [G] = ae({ refetchQueries: ["ListVibeDecks", "GetVibeDeck"] }), [K] = i({ refetchQueries: ["ListVibeDecks"] }), [tn, { loading: nn }] = e({ refetchQueries: ["GetVibeDeck"] }), [rn, { loading: an }] = oe({ refetchQueries: ["GetVibeDeck"] }), [q] = n({ refetchQueries: ["GetVibeDeck"] }), [on] = ie({ refetchQueries: ["GetVibeDeck"] }), [J] = ee();
|
|
121
|
+
Re(() => {
|
|
120
122
|
D(/* @__PURE__ */ new Set());
|
|
121
123
|
}, [B]);
|
|
122
|
-
let
|
|
123
|
-
|
|
124
|
+
let sn = l((e, t) => {
|
|
125
|
+
mt((n) => {
|
|
124
126
|
let r = new Set(n);
|
|
125
127
|
return t ? r.add(e) : r.delete(e), r;
|
|
126
128
|
});
|
|
127
|
-
}, []),
|
|
128
|
-
|
|
129
|
+
}, []), cn = l((e) => {
|
|
130
|
+
mt((t) => {
|
|
129
131
|
let n = new Set(t);
|
|
130
132
|
return z.forEach((t) => {
|
|
131
133
|
e ? n.add(t.id) : n.delete(t.id);
|
|
132
134
|
}), n;
|
|
133
135
|
});
|
|
134
136
|
}, [z]), Y = l(() => {
|
|
135
|
-
|
|
137
|
+
mt(/* @__PURE__ */ new Set());
|
|
136
138
|
}, []);
|
|
137
139
|
l((e, t) => {
|
|
138
140
|
D((n) => {
|
|
@@ -140,7 +142,7 @@ function Ze() {
|
|
|
140
142
|
return t ? r.add(e) : r.delete(e), r;
|
|
141
143
|
});
|
|
142
144
|
}, []);
|
|
143
|
-
let
|
|
145
|
+
let ln = l((e) => {
|
|
144
146
|
D((t) => {
|
|
145
147
|
let n = new Set(t);
|
|
146
148
|
return (V?.buttons ?? []).forEach((t) => {
|
|
@@ -149,17 +151,17 @@ function Ze() {
|
|
|
149
151
|
});
|
|
150
152
|
}, [V?.buttons]), X = l(() => {
|
|
151
153
|
D(/* @__PURE__ */ new Set());
|
|
152
|
-
}, []),
|
|
154
|
+
}, []), un = l(async (e) => {
|
|
153
155
|
try {
|
|
154
|
-
let t = (await
|
|
156
|
+
let t = (await Yt({ variables: { input: {
|
|
155
157
|
name: e.name,
|
|
156
158
|
description: e.description || null,
|
|
157
159
|
colorTheme: e.colorTheme || null,
|
|
158
160
|
gridColumns: e.gridColumns,
|
|
159
161
|
gridRows: e.gridRows,
|
|
160
|
-
...
|
|
162
|
+
...Se(bt)
|
|
161
163
|
} } })).data?.createVibeDeck?.id;
|
|
162
|
-
w({ type: "none" }), I("Deck created", "success"),
|
|
164
|
+
w({ type: "none" }), I("Deck created", "success"), xt(be), t && await Qt(t);
|
|
163
165
|
} catch (e) {
|
|
164
166
|
if (o(e)) {
|
|
165
167
|
w({ type: "none" }), L("Vibe Deck Quota Reached", "You have reached the Vibe Deck limit for your current plan. Upgrade to create more decks.");
|
|
@@ -168,14 +170,14 @@ function Ze() {
|
|
|
168
170
|
I(e instanceof Error ? e.message : "Failed to create deck", "error");
|
|
169
171
|
}
|
|
170
172
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
Yt,
|
|
174
|
+
Qt,
|
|
173
175
|
L,
|
|
174
176
|
I,
|
|
175
|
-
|
|
176
|
-
]),
|
|
177
|
+
bt
|
|
178
|
+
]), dn = l(async (e) => {
|
|
177
179
|
if (C.type === "editDeck") try {
|
|
178
|
-
await
|
|
180
|
+
await $t({ variables: {
|
|
179
181
|
id: C.deckId,
|
|
180
182
|
input: {
|
|
181
183
|
name: e.name,
|
|
@@ -189,14 +191,14 @@ function Ze() {
|
|
|
189
191
|
I(e instanceof Error ? e.message : "Failed to update deck", "error");
|
|
190
192
|
}
|
|
191
193
|
}, [
|
|
192
|
-
|
|
194
|
+
$t,
|
|
193
195
|
C,
|
|
194
196
|
I
|
|
195
|
-
]),
|
|
197
|
+
]), fn = l(async () => {
|
|
196
198
|
if (C.type === "confirmDelete") try {
|
|
197
|
-
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" }),
|
|
199
|
+
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" }), De() && Oe("success");
|
|
198
200
|
} catch (e) {
|
|
199
|
-
I(e instanceof Error ? e.message : "Failed to delete", "error"),
|
|
201
|
+
I(e instanceof Error ? e.message : "Failed to delete", "error"), De() && Oe("error");
|
|
200
202
|
}
|
|
201
203
|
}, [
|
|
202
204
|
C,
|
|
@@ -208,7 +210,7 @@ function Ze() {
|
|
|
208
210
|
]), Z = l(async (e, t = !0) => {
|
|
209
211
|
let n = V?.buttons?.find((t) => t.id === e);
|
|
210
212
|
if (!n || !n.action) return;
|
|
211
|
-
let r = n.action, i =
|
|
213
|
+
let r = n.action, i = Ft({
|
|
212
214
|
buttonId: e,
|
|
213
215
|
buttonLabel: n.label,
|
|
214
216
|
actionType: r.actionType,
|
|
@@ -216,16 +218,16 @@ function Ze() {
|
|
|
216
218
|
status: "running",
|
|
217
219
|
startedAt: /* @__PURE__ */ new Date()
|
|
218
220
|
});
|
|
219
|
-
|
|
221
|
+
pt(e), F(e, "executing");
|
|
220
222
|
try {
|
|
221
223
|
let n = (await J({ variables: { id: e } })).data?.executeVibeDeckButton;
|
|
222
|
-
if (n &&
|
|
224
|
+
if (n && je(n) && n.agentId) {
|
|
223
225
|
F(e, "error"), P(i, {
|
|
224
226
|
status: "error",
|
|
225
227
|
error: t ? "Remote task execution is disabled on this agent." : "Remote execution still blocked after enabling — check the agent’s Security settings.",
|
|
226
228
|
output: n.output,
|
|
227
229
|
completedAt: /* @__PURE__ */ new Date()
|
|
228
|
-
}), t &&
|
|
230
|
+
}), t && At({
|
|
229
231
|
buttonId: e,
|
|
230
232
|
agentId: n.agentId
|
|
231
233
|
});
|
|
@@ -261,41 +263,41 @@ function Ze() {
|
|
|
261
263
|
completedAt: /* @__PURE__ */ new Date()
|
|
262
264
|
});
|
|
263
265
|
} finally {
|
|
264
|
-
|
|
266
|
+
pt(null);
|
|
265
267
|
}
|
|
266
268
|
}, [
|
|
267
269
|
V,
|
|
268
270
|
J,
|
|
269
|
-
|
|
271
|
+
Ft,
|
|
270
272
|
P,
|
|
271
273
|
F,
|
|
272
274
|
L,
|
|
273
275
|
h,
|
|
274
276
|
m,
|
|
275
277
|
B
|
|
276
|
-
]),
|
|
278
|
+
]), pn = l(async ({ shell: e, file: t }) => {
|
|
277
279
|
if (!M) return;
|
|
278
280
|
let { buttonId: n, agentId: r } = M;
|
|
279
|
-
|
|
281
|
+
Mt(!0);
|
|
280
282
|
try {
|
|
281
|
-
await
|
|
283
|
+
await Ae({
|
|
282
284
|
id: r,
|
|
283
|
-
profile:
|
|
285
|
+
profile: Pt
|
|
284
286
|
}, {
|
|
285
287
|
shell: e,
|
|
286
288
|
file: t
|
|
287
|
-
}),
|
|
289
|
+
}), At(null), await Z(n, !1);
|
|
288
290
|
} catch (e) {
|
|
289
291
|
I(e instanceof Error ? e.message : "Failed to enable remote execution", "error");
|
|
290
292
|
} finally {
|
|
291
|
-
|
|
293
|
+
Mt(!1);
|
|
292
294
|
}
|
|
293
295
|
}, [
|
|
294
296
|
M,
|
|
295
|
-
|
|
297
|
+
Pt,
|
|
296
298
|
Z,
|
|
297
299
|
I
|
|
298
|
-
]),
|
|
300
|
+
]), mn = l(async (e) => {
|
|
299
301
|
let t = V?.buttons?.find((t) => t.id === e);
|
|
300
302
|
if (t) {
|
|
301
303
|
if (h.emitCustom("vibecontrols.vibedeck.button_executed_clicked", {
|
|
@@ -320,13 +322,13 @@ function Ze() {
|
|
|
320
322
|
h,
|
|
321
323
|
m,
|
|
322
324
|
B
|
|
323
|
-
]),
|
|
325
|
+
]), hn = l(async () => {
|
|
324
326
|
if (C.type !== "confirmExecute") return;
|
|
325
327
|
let e = C.buttonId;
|
|
326
328
|
w({ type: "none" }), await Z(e);
|
|
327
|
-
}, [C, Z]),
|
|
329
|
+
}, [C, Z]), gn = l(async (e) => {
|
|
328
330
|
if (!(C.type !== "createButton" || !B)) try {
|
|
329
|
-
await
|
|
331
|
+
await tn({ variables: { input: {
|
|
330
332
|
vibeDeckId: B,
|
|
331
333
|
label: e.label,
|
|
332
334
|
actionId: e.actionId,
|
|
@@ -344,12 +346,12 @@ function Ze() {
|
|
|
344
346
|
}
|
|
345
347
|
}, [
|
|
346
348
|
C,
|
|
347
|
-
|
|
349
|
+
tn,
|
|
348
350
|
B,
|
|
349
351
|
I
|
|
350
|
-
]),
|
|
352
|
+
]), _n = l(async (e) => {
|
|
351
353
|
if (C.type === "editButton") try {
|
|
352
|
-
await
|
|
354
|
+
await rn({ variables: {
|
|
353
355
|
id: C.buttonId,
|
|
354
356
|
input: {
|
|
355
357
|
label: e.label,
|
|
@@ -367,11 +369,11 @@ function Ze() {
|
|
|
367
369
|
}
|
|
368
370
|
}, [
|
|
369
371
|
C,
|
|
370
|
-
|
|
372
|
+
rn,
|
|
371
373
|
I
|
|
372
|
-
]),
|
|
374
|
+
]), vn = l(async (e, t, n) => {
|
|
373
375
|
try {
|
|
374
|
-
await
|
|
376
|
+
await on({ variables: {
|
|
375
377
|
id: e,
|
|
376
378
|
input: {
|
|
377
379
|
row: t,
|
|
@@ -381,7 +383,7 @@ function Ze() {
|
|
|
381
383
|
} catch (e) {
|
|
382
384
|
I(e instanceof Error ? e.message : "Failed to move button", "error");
|
|
383
385
|
}
|
|
384
|
-
}, [
|
|
386
|
+
}, [on, I]), yn = l(async (e) => {
|
|
385
387
|
let t = z.find((t) => t.id === e);
|
|
386
388
|
if (t) try {
|
|
387
389
|
await K({ variables: {
|
|
@@ -400,13 +402,13 @@ function Ze() {
|
|
|
400
402
|
K,
|
|
401
403
|
L,
|
|
402
404
|
I
|
|
403
|
-
]),
|
|
405
|
+
]), bn = l(async (e) => {
|
|
404
406
|
try {
|
|
405
407
|
await G({ variables: { id: e } }), I("Default deck set", "success");
|
|
406
408
|
} catch (e) {
|
|
407
409
|
I(e instanceof Error ? e.message : "Failed to set default", "error");
|
|
408
410
|
}
|
|
409
|
-
}, [G, I]),
|
|
411
|
+
}, [G, I]), xn = l(async () => {
|
|
410
412
|
if (H.length === 1) {
|
|
411
413
|
A("setDefaultDeck");
|
|
412
414
|
try {
|
|
@@ -423,7 +425,7 @@ function Ze() {
|
|
|
423
425
|
I,
|
|
424
426
|
Y,
|
|
425
427
|
R
|
|
426
|
-
]),
|
|
428
|
+
]), Sn = l(async () => {
|
|
427
429
|
if (H.length !== 0) {
|
|
428
430
|
A("duplicateDeck");
|
|
429
431
|
try {
|
|
@@ -454,12 +456,12 @@ function Ze() {
|
|
|
454
456
|
I,
|
|
455
457
|
Y,
|
|
456
458
|
R
|
|
457
|
-
]),
|
|
459
|
+
]), Cn = l(async () => {
|
|
458
460
|
if (H.length !== 0) {
|
|
459
461
|
A("deleteDeck");
|
|
460
462
|
try {
|
|
461
463
|
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;
|
|
462
|
-
H.some((e) => e.id === b) && x(null), I(`Deleted ${t} deck${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), Y(),
|
|
464
|
+
H.some((e) => e.id === b) && x(null), I(`Deleted ${t} deck${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), Y(), gt(null), await R();
|
|
463
465
|
} catch (e) {
|
|
464
466
|
I(e instanceof Error ? e.message : "Failed to delete decks", "error");
|
|
465
467
|
} finally {
|
|
@@ -474,7 +476,7 @@ function Ze() {
|
|
|
474
476
|
I,
|
|
475
477
|
Y,
|
|
476
478
|
R
|
|
477
|
-
]),
|
|
479
|
+
]), wn = l(async () => {
|
|
478
480
|
if (U.length === 0) return;
|
|
479
481
|
A("executeButton");
|
|
480
482
|
let e = 0, t = 0;
|
|
@@ -500,12 +502,12 @@ function Ze() {
|
|
|
500
502
|
L,
|
|
501
503
|
I,
|
|
502
504
|
X
|
|
503
|
-
]),
|
|
505
|
+
]), Tn = l(async () => {
|
|
504
506
|
if (U.length !== 0) {
|
|
505
507
|
A("deleteButton");
|
|
506
508
|
try {
|
|
507
509
|
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;
|
|
508
|
-
I(`Deleted ${t} button${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), X(), O(null), await
|
|
510
|
+
I(`Deleted ${t} button${t === 1 ? "" : "s"}${n > 0 ? ` • ${n} failed` : ""}`, n > 0 ? "error" : "success"), X(), O(null), await Ht();
|
|
509
511
|
} catch (e) {
|
|
510
512
|
I(e instanceof Error ? e.message : "Failed to delete buttons", "error");
|
|
511
513
|
} finally {
|
|
@@ -517,13 +519,13 @@ function Ze() {
|
|
|
517
519
|
q,
|
|
518
520
|
I,
|
|
519
521
|
X,
|
|
520
|
-
|
|
522
|
+
Ht
|
|
521
523
|
]);
|
|
522
|
-
if (
|
|
523
|
-
if (_ && (_.permissionStrings?.length ?? 0) > 0 &&
|
|
524
|
-
if (
|
|
525
|
-
if (
|
|
526
|
-
message:
|
|
524
|
+
if (et) return /* @__PURE__ */ d(p, { children: /* @__PURE__ */ d(s, { message: "Loading permissions..." }) });
|
|
525
|
+
if (_ && (_.permissionStrings?.length ?? 0) > 0 && !tt) return /* @__PURE__ */ d(p, { children: /* @__PURE__ */ d(Qe, {}) });
|
|
526
|
+
if (Rt) return /* @__PURE__ */ d(p, { children: /* @__PURE__ */ d(s, { message: "Loading Vibe Decks..." }) });
|
|
527
|
+
if (zt) return /* @__PURE__ */ d(p, { children: /* @__PURE__ */ d(me, {
|
|
528
|
+
message: zt.message,
|
|
527
529
|
onRetry: () => R()
|
|
528
530
|
}) });
|
|
529
531
|
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;
|
|
@@ -541,21 +543,21 @@ function Ze() {
|
|
|
541
543
|
className: "flex items-center rounded-lg border border-border-default bg-bg-secondary p-0.5",
|
|
542
544
|
children: [/* @__PURE__ */ f("button", {
|
|
543
545
|
type: "button",
|
|
544
|
-
onClick: () =>
|
|
546
|
+
onClick: () => ct("preview"),
|
|
545
547
|
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"}`,
|
|
546
548
|
title: S ? "Preview mode — execute only" : "Switch to Preview mode",
|
|
547
549
|
"aria-pressed": S,
|
|
548
|
-
children: [/* @__PURE__ */ d(
|
|
550
|
+
children: [/* @__PURE__ */ d(Ue, { size: 14 }), "Preview"]
|
|
549
551
|
}), /* @__PURE__ */ f("button", {
|
|
550
552
|
type: "button",
|
|
551
|
-
onClick: () =>
|
|
553
|
+
onClick: () => ct("edit"),
|
|
552
554
|
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"}`,
|
|
553
555
|
title: S ? "Switch to Edit mode" : "Edit mode — full editing",
|
|
554
556
|
"aria-pressed": !S,
|
|
555
|
-
children: [/* @__PURE__ */ d(
|
|
557
|
+
children: [/* @__PURE__ */ d(We, { size: 14 }), "Edit"]
|
|
556
558
|
})]
|
|
557
559
|
}),
|
|
558
|
-
B && V && /* @__PURE__ */ d(
|
|
560
|
+
B && V && /* @__PURE__ */ d(ke, {
|
|
559
561
|
entity: "vibedeck",
|
|
560
562
|
resource: {
|
|
561
563
|
id: B,
|
|
@@ -563,14 +565,21 @@ function Ze() {
|
|
|
563
565
|
},
|
|
564
566
|
label: v("vibecontrols.vibedeck.share.shareDeck", "Share deck")
|
|
565
567
|
}),
|
|
568
|
+
B && V && /* @__PURE__ */ d(Ce, {
|
|
569
|
+
entityType: he.VibeDeck,
|
|
570
|
+
entityId: B,
|
|
571
|
+
currentVibeId: V.vibeId ?? null,
|
|
572
|
+
currentVisibility: V.visibility ?? null,
|
|
573
|
+
refetchQueries: ["ListVibeDecks", "GetVibeDeck"]
|
|
574
|
+
}),
|
|
566
575
|
/* @__PURE__ */ d("button", {
|
|
567
576
|
type: "button",
|
|
568
577
|
onClick: () => {
|
|
569
|
-
R(), B &&
|
|
578
|
+
R(), B && Ht();
|
|
570
579
|
},
|
|
571
580
|
className: "p-2 rounded-lg hover:bg-bg-tertiary text-text-tertiary hover:text-text-primary transition-colors",
|
|
572
581
|
title: "Refresh",
|
|
573
|
-
children: /* @__PURE__ */ d(
|
|
582
|
+
children: /* @__PURE__ */ d(Ke, { size: 16 })
|
|
574
583
|
})
|
|
575
584
|
]
|
|
576
585
|
})
|
|
@@ -583,10 +592,10 @@ function Ze() {
|
|
|
583
592
|
className: "flex flex-wrap items-center gap-3",
|
|
584
593
|
children: [/* @__PURE__ */ f("div", {
|
|
585
594
|
className: "flex items-center gap-2",
|
|
586
|
-
children: [/* @__PURE__ */ d(
|
|
587
|
-
checked:
|
|
588
|
-
indeterminate:
|
|
589
|
-
onChange:
|
|
595
|
+
children: [/* @__PURE__ */ d(Te, {
|
|
596
|
+
checked: Ut,
|
|
597
|
+
indeterminate: Wt,
|
|
598
|
+
onChange: cn,
|
|
590
599
|
ariaLabel: "Select all vibe decks"
|
|
591
600
|
}), /* @__PURE__ */ d("span", {
|
|
592
601
|
className: "text-sm font-medium text-text-primary",
|
|
@@ -607,23 +616,23 @@ function Ze() {
|
|
|
607
616
|
}),
|
|
608
617
|
/* @__PURE__ */ d("button", {
|
|
609
618
|
type: "button",
|
|
610
|
-
onClick:
|
|
619
|
+
onClick: xn,
|
|
611
620
|
disabled: H.length !== 1 || H[0]?.isDefault || k !== null,
|
|
612
621
|
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",
|
|
613
622
|
children: /* @__PURE__ */ f("span", {
|
|
614
623
|
className: "inline-flex items-center gap-2",
|
|
615
|
-
children: [/* @__PURE__ */ d(
|
|
624
|
+
children: [/* @__PURE__ */ d(qe, { size: 14 }), "Set Selected Default"]
|
|
616
625
|
})
|
|
617
626
|
}),
|
|
618
627
|
/* @__PURE__ */ d("button", {
|
|
619
628
|
type: "button",
|
|
620
|
-
onClick:
|
|
629
|
+
onClick: Sn,
|
|
621
630
|
disabled: H.length === 0 || k !== null,
|
|
622
631
|
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",
|
|
623
632
|
children: /* @__PURE__ */ f("span", {
|
|
624
633
|
className: "inline-flex items-center gap-2",
|
|
625
634
|
children: [
|
|
626
|
-
/* @__PURE__ */ d(
|
|
635
|
+
/* @__PURE__ */ d(He, { size: 14 }),
|
|
627
636
|
"Duplicate Selected",
|
|
628
637
|
H.length > 0 ? ` (${H.length})` : ""
|
|
629
638
|
]
|
|
@@ -631,13 +640,13 @@ function Ze() {
|
|
|
631
640
|
}),
|
|
632
641
|
/* @__PURE__ */ d("button", {
|
|
633
642
|
type: "button",
|
|
634
|
-
onClick: () =>
|
|
643
|
+
onClick: () => gt("delete"),
|
|
635
644
|
disabled: H.length === 0 || k !== null,
|
|
636
645
|
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",
|
|
637
646
|
children: /* @__PURE__ */ f("span", {
|
|
638
647
|
className: "inline-flex items-center gap-2",
|
|
639
648
|
children: [
|
|
640
|
-
/* @__PURE__ */ d(
|
|
649
|
+
/* @__PURE__ */ d(Je, { size: 14 }),
|
|
641
650
|
"Delete Selected",
|
|
642
651
|
H.length > 0 ? ` (${H.length})` : ""
|
|
643
652
|
]
|
|
@@ -649,7 +658,7 @@ function Ze() {
|
|
|
649
658
|
}),
|
|
650
659
|
/* @__PURE__ */ d("div", {
|
|
651
660
|
"data-tour": "vibedeck-switcher",
|
|
652
|
-
children: /* @__PURE__ */ d(
|
|
661
|
+
children: /* @__PURE__ */ d(Ne, {
|
|
653
662
|
decks: z.map((e) => ({
|
|
654
663
|
id: e.id,
|
|
655
664
|
name: e.name,
|
|
@@ -660,10 +669,10 @@ function Ze() {
|
|
|
660
669
|
activeDeckId: B,
|
|
661
670
|
selectedDeckIds: T,
|
|
662
671
|
onSelectDeck: (e) => x(e),
|
|
663
|
-
onToggleSelectDeck:
|
|
672
|
+
onToggleSelectDeck: sn,
|
|
664
673
|
onCreateDeck: () => w({ type: "createDeck" }),
|
|
665
|
-
onSetDefault:
|
|
666
|
-
onDuplicate: (e) =>
|
|
674
|
+
onSetDefault: bn,
|
|
675
|
+
onDuplicate: (e) => yn(e),
|
|
667
676
|
onDelete: (e) => {
|
|
668
677
|
w({
|
|
669
678
|
type: "confirmDelete",
|
|
@@ -684,26 +693,26 @@ function Ze() {
|
|
|
684
693
|
deckName: t.name
|
|
685
694
|
});
|
|
686
695
|
},
|
|
687
|
-
canCreate:
|
|
688
|
-
canUpdate:
|
|
689
|
-
canDelete:
|
|
696
|
+
canCreate: nt,
|
|
697
|
+
canUpdate: ut,
|
|
698
|
+
canDelete: dt
|
|
690
699
|
})
|
|
691
700
|
}),
|
|
692
|
-
/* @__PURE__ */ f(
|
|
701
|
+
/* @__PURE__ */ f(Xe, {
|
|
693
702
|
mode: "wait",
|
|
694
|
-
children: [!V && !
|
|
703
|
+
children: [!V && !Vt && z.length === 0 && /* @__PURE__ */ d(ve, {
|
|
695
704
|
title: "No Vibe Decks yet",
|
|
696
705
|
description: "Create your first Vibe Deck to start organizing your commands and webhooks",
|
|
697
706
|
action: /* @__PURE__ */ f("div", {
|
|
698
707
|
className: "flex items-center gap-2",
|
|
699
|
-
children: [
|
|
708
|
+
children: [nt && /* @__PURE__ */ d("button", {
|
|
700
709
|
type: "button",
|
|
701
710
|
onClick: () => w({ type: "createDeck" }),
|
|
702
711
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:opacity-90 text-sm font-medium",
|
|
703
712
|
children: "Create Vibe Deck"
|
|
704
|
-
}), /* @__PURE__ */ d(
|
|
713
|
+
}), /* @__PURE__ */ d(we, { prompt: "What is a VibeDeck and how do I use it to organise controls?" })]
|
|
705
714
|
})
|
|
706
|
-
}),
|
|
715
|
+
}), Vt && /* @__PURE__ */ d(s, { message: "Loading deck..." })]
|
|
707
716
|
}),
|
|
708
717
|
V && /* @__PURE__ */ f("div", {
|
|
709
718
|
className: "space-y-4",
|
|
@@ -715,10 +724,10 @@ function Ze() {
|
|
|
715
724
|
className: "flex flex-wrap items-center gap-3",
|
|
716
725
|
children: [/* @__PURE__ */ f("div", {
|
|
717
726
|
className: "flex items-center gap-2",
|
|
718
|
-
children: [/* @__PURE__ */ d(
|
|
719
|
-
checked:
|
|
720
|
-
indeterminate:
|
|
721
|
-
onChange:
|
|
727
|
+
children: [/* @__PURE__ */ d(Te, {
|
|
728
|
+
checked: Gt,
|
|
729
|
+
indeterminate: Kt,
|
|
730
|
+
onChange: ln,
|
|
722
731
|
ariaLabel: "Select all buttons in active deck"
|
|
723
732
|
}), /* @__PURE__ */ d("span", {
|
|
724
733
|
className: "text-sm font-medium text-text-primary",
|
|
@@ -745,7 +754,7 @@ function Ze() {
|
|
|
745
754
|
children: /* @__PURE__ */ f("span", {
|
|
746
755
|
className: "inline-flex items-center gap-2",
|
|
747
756
|
children: [
|
|
748
|
-
/* @__PURE__ */ d(
|
|
757
|
+
/* @__PURE__ */ d(Ge, { size: 14 }),
|
|
749
758
|
"Execute Selected",
|
|
750
759
|
U.length > 0 ? ` (${U.length})` : ""
|
|
751
760
|
]
|
|
@@ -759,7 +768,7 @@ function Ze() {
|
|
|
759
768
|
children: /* @__PURE__ */ f("span", {
|
|
760
769
|
className: "inline-flex items-center gap-2",
|
|
761
770
|
children: [
|
|
762
|
-
/* @__PURE__ */ d(
|
|
771
|
+
/* @__PURE__ */ d(Je, { size: 14 }),
|
|
763
772
|
"Delete Selected",
|
|
764
773
|
U.length > 0 ? ` (${U.length})` : ""
|
|
765
774
|
]
|
|
@@ -771,7 +780,7 @@ function Ze() {
|
|
|
771
780
|
}), /* @__PURE__ */ f("div", {
|
|
772
781
|
"data-tour": "vibedeck-grid",
|
|
773
782
|
className: "relative",
|
|
774
|
-
children: [/* @__PURE__ */ d(
|
|
783
|
+
children: [/* @__PURE__ */ d(Me, {
|
|
775
784
|
gridColumns: V.gridColumns,
|
|
776
785
|
gridRows: V.gridRows,
|
|
777
786
|
buttons: (V.buttons || []).map((e) => ({
|
|
@@ -798,7 +807,7 @@ function Ze() {
|
|
|
798
807
|
rowSpan: e.rowSpan,
|
|
799
808
|
colSpan: e.colSpan
|
|
800
809
|
})),
|
|
801
|
-
onExecuteButton:
|
|
810
|
+
onExecuteButton: mn,
|
|
802
811
|
onEditButton: (e) => w({
|
|
803
812
|
type: "editButton",
|
|
804
813
|
buttonId: e
|
|
@@ -812,17 +821,17 @@ function Ze() {
|
|
|
812
821
|
name: t?.label || "this button"
|
|
813
822
|
});
|
|
814
823
|
},
|
|
815
|
-
onDropButton:
|
|
824
|
+
onDropButton: vn,
|
|
816
825
|
onAddButton: (e, t) => w({
|
|
817
826
|
type: "createButton",
|
|
818
827
|
row: e,
|
|
819
828
|
column: t
|
|
820
829
|
}),
|
|
821
|
-
executingButtonId:
|
|
822
|
-
canCreate:
|
|
823
|
-
canUpdate:
|
|
824
|
-
canDelete:
|
|
825
|
-
canExecute:
|
|
830
|
+
executingButtonId: ft,
|
|
831
|
+
canCreate: lt,
|
|
832
|
+
canUpdate: ut,
|
|
833
|
+
canDelete: dt,
|
|
834
|
+
canExecute: at,
|
|
826
835
|
previewMode: S
|
|
827
836
|
}), (V.buttons?.length ?? 0) === 0 && S && /* @__PURE__ */ d("div", {
|
|
828
837
|
className: "absolute inset-0 flex items-center justify-center pointer-events-none",
|
|
@@ -837,9 +846,9 @@ function Ze() {
|
|
|
837
846
|
className: "text-sm text-text-secondary mt-2",
|
|
838
847
|
children: v("vibeDeck.emptyDeckDescription", "Switch to Edit mode to add buttons.")
|
|
839
848
|
}),
|
|
840
|
-
|
|
849
|
+
rt && /* @__PURE__ */ d("button", {
|
|
841
850
|
type: "button",
|
|
842
|
-
onClick: () =>
|
|
851
|
+
onClick: () => ct("edit"),
|
|
843
852
|
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",
|
|
844
853
|
children: v("vibeDeck.editDeck", "Edit deck")
|
|
845
854
|
})
|
|
@@ -848,25 +857,25 @@ function Ze() {
|
|
|
848
857
|
})]
|
|
849
858
|
})]
|
|
850
859
|
}),
|
|
851
|
-
|
|
860
|
+
St.length > 0 && /* @__PURE__ */ d("div", {
|
|
852
861
|
"data-tour": "vibedeck-execution-log",
|
|
853
|
-
children: /* @__PURE__ */ d(
|
|
854
|
-
entries:
|
|
855
|
-
expanded:
|
|
856
|
-
onToggleExpanded: () =>
|
|
857
|
-
onClear: () =>
|
|
862
|
+
children: /* @__PURE__ */ d(Le, {
|
|
863
|
+
entries: St,
|
|
864
|
+
expanded: wt,
|
|
865
|
+
onToggleExpanded: () => Tt((e) => !e),
|
|
866
|
+
onClear: () => Ct([])
|
|
858
867
|
})
|
|
859
868
|
}),
|
|
860
|
-
/* @__PURE__ */ d(
|
|
869
|
+
/* @__PURE__ */ d(Xe, { children: vt.length > 0 && /* @__PURE__ */ d("div", {
|
|
861
870
|
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",
|
|
862
|
-
children:
|
|
871
|
+
children: vt.slice(-3).map((e) => /* @__PURE__ */ f("div", {
|
|
863
872
|
role: "button",
|
|
864
873
|
tabIndex: 0,
|
|
865
874
|
onKeyDown: (t) => {
|
|
866
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
875
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), It(e.id));
|
|
867
876
|
},
|
|
868
877
|
className: `p-4 rounded-xl shadow-lg border cursor-pointer ${e.variant === "success" ? "bg-status-success-bg/10 border-status-success-border/30 text-status-success-text" : "bg-status-error-bg/10 border-status-error-border/30 text-status-error-text"}`,
|
|
869
|
-
onClick: () =>
|
|
878
|
+
onClick: () => It(e.id),
|
|
870
879
|
children: [/* @__PURE__ */ d("div", {
|
|
871
880
|
className: "font-medium text-sm",
|
|
872
881
|
children: e.message
|
|
@@ -876,28 +885,28 @@ function Ze() {
|
|
|
876
885
|
})]
|
|
877
886
|
}, e.id))
|
|
878
887
|
}) }),
|
|
879
|
-
C.type === "createDeck" && /* @__PURE__ */ d(
|
|
888
|
+
C.type === "createDeck" && /* @__PURE__ */ d(Pe, {
|
|
880
889
|
title: "Create Vibe Deck",
|
|
881
|
-
onSubmit:
|
|
890
|
+
onSubmit: un,
|
|
882
891
|
onCancel: () => {
|
|
883
|
-
w({ type: "none" }),
|
|
892
|
+
w({ type: "none" }), xt(be);
|
|
884
893
|
},
|
|
885
|
-
isLoading:
|
|
894
|
+
isLoading: Xt,
|
|
886
895
|
extraSection: /* @__PURE__ */ f("div", {
|
|
887
896
|
className: "space-y-4",
|
|
888
897
|
children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
|
|
889
898
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
890
899
|
children: v("vibeDeck.tags", "Tags")
|
|
891
|
-
}), /* @__PURE__ */ d(
|
|
900
|
+
}), /* @__PURE__ */ d(ge, {
|
|
892
901
|
entityType: "VIBECONTROLS_VIBEDECK",
|
|
893
|
-
onDraftChange:
|
|
894
|
-
})] }), /* @__PURE__ */ d(
|
|
895
|
-
value:
|
|
896
|
-
onChange:
|
|
902
|
+
onDraftChange: Zt
|
|
903
|
+
})] }), /* @__PURE__ */ d(xe, {
|
|
904
|
+
value: bt,
|
|
905
|
+
onChange: xt
|
|
897
906
|
})]
|
|
898
907
|
})
|
|
899
908
|
}),
|
|
900
|
-
C.type === "editDeck" && $ && /* @__PURE__ */ d(
|
|
909
|
+
C.type === "editDeck" && $ && /* @__PURE__ */ d(Pe, {
|
|
901
910
|
title: "Edit Vibe Deck",
|
|
902
911
|
initialData: {
|
|
903
912
|
name: $.name,
|
|
@@ -906,29 +915,29 @@ function Ze() {
|
|
|
906
915
|
gridColumns: $.gridColumns,
|
|
907
916
|
gridRows: $.gridRows
|
|
908
917
|
},
|
|
909
|
-
onSubmit:
|
|
918
|
+
onSubmit: dn,
|
|
910
919
|
onCancel: () => w({ type: "none" }),
|
|
911
|
-
isLoading:
|
|
920
|
+
isLoading: en,
|
|
912
921
|
extraSection: /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d("h3", {
|
|
913
922
|
className: "text-sm font-medium text-text-secondary mb-2",
|
|
914
923
|
children: v("vibeDeck.tags", "Tags")
|
|
915
|
-
}), /* @__PURE__ */ d(
|
|
924
|
+
}), /* @__PURE__ */ d(ge, {
|
|
916
925
|
entityType: "VIBECONTROLS_VIBEDECK",
|
|
917
926
|
entityId: $.id
|
|
918
927
|
})] })
|
|
919
928
|
}),
|
|
920
|
-
C.type === "createButton" && /* @__PURE__ */ d(
|
|
929
|
+
C.type === "createButton" && /* @__PURE__ */ d(Fe, {
|
|
921
930
|
title: "Add Button",
|
|
922
|
-
agents:
|
|
923
|
-
onSubmit:
|
|
931
|
+
agents: Jt,
|
|
932
|
+
onSubmit: gn,
|
|
924
933
|
onCancel: () => w({ type: "none" }),
|
|
925
|
-
isLoading:
|
|
934
|
+
isLoading: nn,
|
|
926
935
|
gridColumns: V?.gridColumns,
|
|
927
936
|
gridRows: V?.gridRows,
|
|
928
937
|
buttonRow: C.row,
|
|
929
938
|
buttonColumn: C.column
|
|
930
939
|
}),
|
|
931
|
-
C.type === "editButton" && Q && /* @__PURE__ */ d(
|
|
940
|
+
C.type === "editButton" && Q && /* @__PURE__ */ d(Fe, {
|
|
932
941
|
title: "Edit Button",
|
|
933
942
|
initialData: {
|
|
934
943
|
label: Q.label,
|
|
@@ -940,10 +949,10 @@ function Ze() {
|
|
|
940
949
|
rowSpan: Q.rowSpan,
|
|
941
950
|
colSpan: Q.colSpan
|
|
942
951
|
},
|
|
943
|
-
agents:
|
|
944
|
-
onSubmit:
|
|
952
|
+
agents: Jt,
|
|
953
|
+
onSubmit: _n,
|
|
945
954
|
onCancel: () => w({ type: "none" }),
|
|
946
|
-
isLoading:
|
|
955
|
+
isLoading: an,
|
|
947
956
|
gridColumns: V?.gridColumns,
|
|
948
957
|
gridRows: V?.gridRows,
|
|
949
958
|
buttonRow: Q.row,
|
|
@@ -955,7 +964,7 @@ function Ze() {
|
|
|
955
964
|
message: `Are you sure you want to delete "${C.name}"?${C.target === "deck" ? " All buttons in this deck will also be deleted." : ""}`,
|
|
956
965
|
confirmLabel: "Delete",
|
|
957
966
|
variant: "danger",
|
|
958
|
-
onConfirm:
|
|
967
|
+
onConfirm: fn,
|
|
959
968
|
onClose: () => w({ type: "none" })
|
|
960
969
|
}),
|
|
961
970
|
C.type === "confirmExecute" && /* @__PURE__ */ d(a, {
|
|
@@ -964,64 +973,64 @@ function Ze() {
|
|
|
964
973
|
message: `Are you sure you want to execute this action?\n\n${C.detail}`,
|
|
965
974
|
confirmLabel: "Execute",
|
|
966
975
|
variant: "warning",
|
|
967
|
-
onConfirm:
|
|
976
|
+
onConfirm: hn,
|
|
968
977
|
onClose: () => w({ type: "none" })
|
|
969
978
|
}),
|
|
970
979
|
/* @__PURE__ */ d(a, {
|
|
971
|
-
isOpen:
|
|
980
|
+
isOpen: ht === "delete",
|
|
972
981
|
title: "Delete Vibe Decks",
|
|
973
982
|
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.`,
|
|
974
983
|
confirmLabel: "Delete Decks",
|
|
975
984
|
variant: "danger",
|
|
976
|
-
onConfirm:
|
|
977
|
-
onClose: () =>
|
|
985
|
+
onConfirm: Cn,
|
|
986
|
+
onClose: () => gt(null),
|
|
978
987
|
isLoading: k === "deleteDeck"
|
|
979
988
|
}),
|
|
980
989
|
/* @__PURE__ */ d(a, {
|
|
981
|
-
isOpen:
|
|
990
|
+
isOpen: _t === "execute",
|
|
982
991
|
title: "Execute Vibe Deck Buttons",
|
|
983
992
|
message: `Execute ${U.length} selected button${U.length === 1 ? "" : "s"}? This may trigger commands, scripts, or webhooks immediately.`,
|
|
984
993
|
confirmLabel: "Execute Buttons",
|
|
985
994
|
variant: "warning",
|
|
986
|
-
onConfirm:
|
|
995
|
+
onConfirm: wn,
|
|
987
996
|
onClose: () => O(null),
|
|
988
997
|
isLoading: k === "executeButton"
|
|
989
998
|
}),
|
|
990
999
|
/* @__PURE__ */ d(a, {
|
|
991
|
-
isOpen:
|
|
1000
|
+
isOpen: _t === "delete",
|
|
992
1001
|
title: "Delete Vibe Deck Buttons",
|
|
993
1002
|
message: `Delete ${U.length} selected button${U.length === 1 ? "" : "s"}? This cannot be undone.`,
|
|
994
1003
|
confirmLabel: "Delete Buttons",
|
|
995
1004
|
variant: "danger",
|
|
996
|
-
onConfirm:
|
|
1005
|
+
onConfirm: Tn,
|
|
997
1006
|
onClose: () => O(null),
|
|
998
1007
|
isLoading: k === "deleteButton"
|
|
999
1008
|
}),
|
|
1000
|
-
C.type === "shareDeck" && /* @__PURE__ */ d(
|
|
1009
|
+
C.type === "shareDeck" && /* @__PURE__ */ d(Ie, {
|
|
1001
1010
|
vibeDeckId: C.deckId,
|
|
1002
1011
|
vibeDeckName: C.deckName,
|
|
1003
1012
|
onClose: () => w({ type: "none" })
|
|
1004
1013
|
}),
|
|
1005
1014
|
/* @__PURE__ */ d(ce, {
|
|
1006
|
-
isOpen:
|
|
1007
|
-
onClose: () =>
|
|
1015
|
+
isOpen: Ot !== null,
|
|
1016
|
+
onClose: () => kt(null),
|
|
1008
1017
|
onConfirm: () => {
|
|
1009
|
-
|
|
1018
|
+
kt(null), $e("/billing/plans");
|
|
1010
1019
|
},
|
|
1011
|
-
title:
|
|
1012
|
-
message:
|
|
1020
|
+
title: Ot?.title || "Quota Reached",
|
|
1021
|
+
message: Ot?.message || "Upgrade your plan to continue."
|
|
1013
1022
|
}),
|
|
1014
|
-
/* @__PURE__ */ d(
|
|
1023
|
+
/* @__PURE__ */ d(ye, {
|
|
1015
1024
|
isOpen: M !== null,
|
|
1016
|
-
agentName: M ?
|
|
1017
|
-
isLoading:
|
|
1018
|
-
onClose: () =>
|
|
1019
|
-
onConfirm:
|
|
1025
|
+
agentName: M ? Jt.find((e) => e.id === M.agentId)?.name : void 0,
|
|
1026
|
+
isLoading: jt,
|
|
1027
|
+
onClose: () => At(null),
|
|
1028
|
+
onConfirm: pn
|
|
1020
1029
|
})
|
|
1021
1030
|
]
|
|
1022
1031
|
});
|
|
1023
1032
|
}
|
|
1024
1033
|
//#endregion
|
|
1025
|
-
export {
|
|
1034
|
+
export { $e as VibeDeckPage };
|
|
1026
1035
|
|
|
1027
1036
|
//# sourceMappingURL=VibeDeckPage.js.map
|