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