@burdenoff/microfe-vibecontrols 2026.1021.1 → 2026.1022.2

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.
@@ -1,50 +1,50 @@
1
- import { useCompileDocsSiteMutation as e, useCreateDocsPageMutation as t, useCreateDocsSiteMutation as n, useDeleteDocsPageMutation as r, useDeleteDocsSiteMutation as ee, useDocsContentQuery as te, useGenerateDocsSignedUrlMutation as ne, useGetDocsRevisionLazyQuery as re, useGetDocsSiteQuery as i, useRollbackDocsRevisionMutation as ie, useUpdateDocsPageMutation as ae, useUpdateDocsSiteMutation as oe, useUpdateDocsSiteVisibilityMutation as se } from "../../generated/wspace-operations.js";
1
+ import { useCompileDocsSiteMutation as e, useCreateDocsPageMutation as t, useCreateDocsSiteMutation as n, useDeleteDocsPageMutation as r, useDeleteDocsSiteMutation as ee, useDocsContentQuery as te, useGenerateDocsSignedUrlMutation as ne, useGetDocsRevisionLazyQuery as re, useGetDocsSiteQuery as ie, useRollbackDocsRevisionMutation as i, useUpdateDocsPageMutation as ae, useUpdateDocsSiteMutation as oe, useUpdateDocsSiteVisibilityMutation as se } from "../../generated/wspace-operations.js";
2
2
  import { useTr as ce } from "../../shared/hooks/useTr.js";
3
3
  import { QuotaExhaustedDialog as a } from "../shared/QuotaExhaustedDialog.js";
4
4
  import { getQuotaDialogContent as o, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../../utils/quotaUtils.js";
5
- import { useVibeNavigate as le } from "../../providers/VibeControlsProvider.js";
5
+ import { BILLING_PLANS_ROUTE as l, useVibeNavigate as le } from "../../providers/VibeControlsProvider.js";
6
6
  import { LoadingState as ue } from "../shared/LoadingState.js";
7
- import { ErrorState as l } from "../shared/ErrorState.js";
7
+ import { ErrorState as u } from "../shared/ErrorState.js";
8
8
  import "../shared/index.js";
9
- import { VIBE_PERMISSIONS as u } from "../../constants/permissions.js";
10
- import { EntityShareButton as d } from "../sharing/EntityShareButton.js";
9
+ import { VIBE_PERMISSIONS as d } from "../../constants/permissions.js";
10
+ import { EntityShareButton as f } from "../sharing/EntityShareButton.js";
11
11
  import "../sharing/index.js";
12
- import { DocsEmptyState as f } from "./DocsEmptyState.js";
13
- import { DocsPreviewPanel as p } from "./DocsPreviewPanel.js";
14
- import { DocsEditPanel as m } from "./DocsEditPanel.js";
15
- import { useEffect as h, useRef as g, useState as _ } from "react";
16
- import { AlertCircle as de, X as fe } from "lucide-react";
17
- import { usePermissions as pe } from "@burdenoff/fe-libs/shared/providers/shell";
12
+ import { DocsEmptyState as p } from "./DocsEmptyState.js";
13
+ import { DocsPreviewPanel as m } from "./DocsPreviewPanel.js";
14
+ import { DocsEditPanel as h } from "./DocsEditPanel.js";
15
+ import { useEffect as g, useRef as de, useState as _ } from "react";
16
+ import { AlertCircle as fe, X as pe } from "lucide-react";
17
+ import { usePermissions as me } from "@burdenoff/fe-libs/shared/providers/shell";
18
18
  import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
19
- import { resolveGatewayUrls as me } from "@burdenoff/fe-libs/shared/config";
19
+ import { resolveGatewayUrls as he } from "@burdenoff/fe-libs/shared/config";
20
20
  //#region src/components/docs/DocsTabPanel.tsx
21
- function x({ vibeId: x, ownerType: he, ownerId: ge }) {
22
- let S = ce(), { hasPermission: C, permissions: w } = pe(), T = C(u.DOCS_SITE_DELETE), _e = (Array.isArray(w) ? w : w?.permissionStrings)?.some?.((e) => e.startsWith("docs_page:")) ? C(u.DOCS_PAGE_DELETE) : T, E = he || "VIBE", D = ge || x || "", [O, k] = _("preview"), [A, j] = _(null), [M, N] = _(!1), [P, F] = _(null), [I, L] = _(""), [ve, R] = _(null), z = le(), [B, V] = _(!1), [ye, H] = _(!1), { data: be, loading: xe, error: U, refetch: W } = i({
21
+ function x({ vibeId: x, ownerType: ge, ownerId: _e }) {
22
+ let S = ce(), { hasPermission: C, permissions: w } = me(), T = C(d.DOCS_SITE_DELETE), ve = (Array.isArray(w) ? w : w?.permissionStrings)?.some?.((e) => e.startsWith("docs_page:")) ? C(d.DOCS_PAGE_DELETE) : T, E = ge || "VIBE", D = _e || x || "", [O, k] = _("preview"), [A, j] = _(null), [M, N] = _(!1), [P, F] = _(null), [I, L] = _(""), [ye, R] = _(null), z = le(), [B, V] = _(!1), [be, H] = _(!1), { data: xe, loading: Se, error: U, refetch: W } = ie({
23
23
  variables: {
24
24
  ownerType: E,
25
25
  ownerId: D
26
26
  },
27
27
  skip: !D,
28
28
  fetchPolicy: "cache-and-network"
29
- }), G = be?.vibecontrolsDocsSiteByOwner ?? null, K = G?.pages || [], { data: Se, loading: Ce, refetch: we } = te({
29
+ }), G = xe?.vibecontrolsDocsSiteByOwner ?? null, K = G?.pages || [], { data: Ce, loading: we, refetch: Te } = te({
30
30
  variables: {
31
31
  siteId: G?.id || "",
32
32
  path: I
33
33
  },
34
34
  skip: !G?.id || !G.currentRevisionId,
35
35
  fetchPolicy: "network-only"
36
- }), Te = Se?.docsContent?.html ?? null, q = g(void 0);
37
- h(() => {
36
+ }), Ee = Ce?.docsContent?.html ?? null, q = de(void 0);
37
+ g(() => {
38
38
  let e = G?.currentRevisionId ?? null;
39
39
  if (q.current === void 0) {
40
40
  q.current = e;
41
41
  return;
42
42
  }
43
- e && e !== q.current && (q.current = e, we());
43
+ e && e !== q.current && (q.current = e, Te());
44
44
  }, [G?.currentRevisionId]);
45
- let Ee = me(), De = G?.workspaceId ? `${Ee.workspaceBaseUrl}/workspaces/static/${G.workspaceId}/docs/${D}/` : null, [Oe, { loading: ke }] = n(), [Ae] = oe(), [je] = se(), [Me, { loading: Ne }] = t(), [Pe] = ae(), [Fe] = r(), [Ie] = e(), [Le] = ne(), [Re] = ie(), [ze] = ee(), [J] = re({ fetchPolicy: "network-only" }), Be = async (e = "DOCUSAURUS") => {
45
+ let De = he(), Oe = G?.workspaceId ? `${De.workspaceBaseUrl}/workspaces/static/${G.workspaceId}/docs/${D}/` : null, [ke, { loading: Ae }] = n(), [je] = oe(), [Me] = se(), [Ne, { loading: Pe }] = t(), [Fe] = ae(), [Ie] = r(), [Le] = e(), [Re] = ne(), [ze] = i(), [J] = ee(), [Be] = re({ fetchPolicy: "network-only" }), Ve = async (e = "DOCUSAURUS") => {
46
46
  try {
47
- await Oe({
47
+ await ke({
48
48
  variables: { input: {
49
49
  ownerType: E,
50
50
  ownerId: D,
@@ -61,18 +61,18 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
61
61
  }
62
62
  throw e;
63
63
  }
64
- }, Ve = async (e, t) => {
65
- await Pe({
64
+ }, He = async (e, t) => {
65
+ await Fe({
66
66
  variables: {
67
67
  id: e,
68
68
  input: t
69
69
  },
70
70
  context: { autoRefreshAfterMutation: !1 }
71
71
  });
72
- }, He = async (e, t) => {
72
+ }, Ue = async (e, t) => {
73
73
  if (!G) return;
74
74
  let n = K.length, r = `page-${n + 1}`;
75
- await Me({ variables: { input: {
75
+ await Ne({ variables: { input: {
76
76
  siteId: G.id,
77
77
  parentId: e || null,
78
78
  slug: r,
@@ -82,13 +82,13 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
82
82
  sidebarPosition: n,
83
83
  category: t || null
84
84
  } } }), await W();
85
- }, Ue = async (e) => {
86
- confirm("Delete this page?") && (await Fe({ variables: { id: e } }), await W());
85
+ }, We = async (e) => {
86
+ confirm("Delete this page?") && (await Ie({ variables: { id: e } }), await W());
87
87
  }, Y = async () => {
88
88
  if (G) {
89
89
  N(!0), F(null);
90
90
  try {
91
- let e = await Ie({ variables: {
91
+ let e = await Le({ variables: {
92
92
  siteId: G.id,
93
93
  publish: !0
94
94
  } });
@@ -106,15 +106,15 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
106
106
  }
107
107
  }
108
108
  }, X = async (e) => {
109
- let { data: t } = await J({ variables: { id: e } }), n = t?.docsRevision;
109
+ let { data: t } = await Be({ variables: { id: e } }), n = t?.docsRevision;
110
110
  return n && (j(n), [
111
111
  "SUCCEEDED",
112
112
  "PUBLISHED",
113
113
  "FAILED"
114
114
  ].includes(n.status) && (N(!1), (n.status === "PUBLISHED" || n.status === "SUCCEEDED") && (L(""), await W()))), n;
115
- }, We = async (e) => {
115
+ }, Ge = async (e) => {
116
116
  if (!G) return;
117
- e.visibility && e.visibility !== G.visibility && await je({ variables: {
117
+ e.visibility && e.visibility !== G.visibility && await Me({ variables: {
118
118
  id: G.id,
119
119
  visibility: e.visibility
120
120
  } });
@@ -123,23 +123,23 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
123
123
  provider: e.provider,
124
124
  providerConfig: e.providerConfig
125
125
  };
126
- Object.keys(t).length > 0 && await Ae({ variables: {
126
+ Object.keys(t).length > 0 && await je({ variables: {
127
127
  id: G.id,
128
128
  input: t
129
129
  } }), await W();
130
- }, Ge = async () => {
130
+ }, Ke = async () => {
131
131
  if (!G?.currentRevisionId) return null;
132
132
  try {
133
- let { data: e } = await Le({ variables: { siteId: G.id } });
133
+ let { data: e } = await Re({ variables: { siteId: G.id } });
134
134
  return e?.generateDocsSignedUrl?.url ?? null;
135
135
  } catch {
136
136
  return null;
137
137
  }
138
- }, Ke = async (e) => {
138
+ }, qe = async (e) => {
139
139
  if (G && confirm("Roll back to this revision? The current published docs will be replaced.")) {
140
140
  R(e);
141
141
  try {
142
- await Re({ variables: {
142
+ await ze({ variables: {
143
143
  siteId: G.id,
144
144
  revisionId: e
145
145
  } }), await W();
@@ -147,23 +147,23 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
147
147
  R(null);
148
148
  }
149
149
  }
150
- }, qe = async () => {
151
- G && confirm("Delete this docs site and all its pages and revisions? This cannot be undone.") && (await ze({ variables: { id: G.id } }), await W());
150
+ }, Je = async () => {
151
+ G && confirm("Delete this docs site and all its pages and revisions? This cannot be undone.") && (await J({ variables: { id: G.id } }), await W());
152
152
  };
153
- if (xe && !G) return /* @__PURE__ */ y(ue, { message: S("vibecontrols.docs.tab.loading", "Loading documentation...") });
154
- if (U && !G) return /* @__PURE__ */ y(l, {
153
+ if (Se && !G) return /* @__PURE__ */ y(ue, { message: S("vibecontrols.docs.tab.loading", "Loading documentation...") });
154
+ if (U && !G) return /* @__PURE__ */ y(u, {
155
155
  title: S("vibecontrols.docs.tab.loadFailed", "Failed to load docs"),
156
156
  message: U.message,
157
157
  onRetry: () => W()
158
158
  });
159
- if (!G) return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(f, {
160
- onCreate: Be,
161
- loading: ke
159
+ if (!G) return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(p, {
160
+ onCreate: Ve,
161
+ loading: Ae
162
162
  }), /* @__PURE__ */ y(a, {
163
163
  isOpen: B,
164
164
  onClose: () => V(!1),
165
165
  onConfirm: () => {
166
- V(!1), z("/billing/plans");
166
+ V(!1), z(l);
167
167
  },
168
168
  title: "Docs Site Quota Reached",
169
169
  message: "You have reached the documentation site limit for your current plan. Upgrade to create more docs sites."
@@ -171,7 +171,7 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
171
171
  let Z = P ? /* @__PURE__ */ b("div", {
172
172
  className: "flex items-center gap-2 px-4 py-2 mb-2 bg-status-error-bg-subtle text-status-error-text text-sm rounded-md",
173
173
  children: [
174
- /* @__PURE__ */ y(de, { className: "size-4 shrink-0" }),
174
+ /* @__PURE__ */ y(fe, { className: "size-4 shrink-0" }),
175
175
  /* @__PURE__ */ y("span", {
176
176
  className: "flex-1",
177
177
  children: P
@@ -180,18 +180,18 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
180
180
  type: "button",
181
181
  onClick: () => F(null),
182
182
  className: "p-0.5 hover:opacity-70",
183
- children: /* @__PURE__ */ y(fe, { className: "size-3.5" })
183
+ children: /* @__PURE__ */ y(pe, { className: "size-3.5" })
184
184
  })
185
185
  ]
186
186
  }) : null, Q = /* @__PURE__ */ y(a, {
187
- isOpen: ye,
187
+ isOpen: be,
188
188
  onClose: () => H(!1),
189
189
  onConfirm: () => {
190
- H(!1), z("/billing/plans");
190
+ H(!1), z(l);
191
191
  },
192
192
  title: o("docs-compilation").title,
193
193
  message: o("docs-compilation").message
194
- }), $ = /* @__PURE__ */ y(d, {
194
+ }), $ = /* @__PURE__ */ y(f, {
195
195
  entity: "docs",
196
196
  resource: {
197
197
  id: G.id,
@@ -207,20 +207,20 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
207
207
  return O === "edit" ? /* @__PURE__ */ b(v, { children: [
208
208
  Z,
209
209
  Q,
210
- /* @__PURE__ */ y(m, {
210
+ /* @__PURE__ */ y(h, {
211
211
  site: G,
212
212
  pages: K,
213
213
  shareSlot: $,
214
214
  onBack: () => k("preview"),
215
- onSavePage: Ve,
216
- onAddPage: He,
217
- pageAdding: Ne,
218
- onDeletePage: _e ? Ue : void 0,
215
+ onSavePage: He,
216
+ onAddPage: Ue,
217
+ pageAdding: Pe,
218
+ onDeletePage: ve ? We : void 0,
219
219
  onCompile: Y,
220
- onSaveSettings: We,
221
- onRollback: Ke,
222
- onDeleteSite: T ? qe : void 0,
223
- rollingBack: ve,
220
+ onSaveSettings: Ge,
221
+ onRollback: qe,
222
+ onDeleteSite: T ? Je : void 0,
223
+ rollingBack: ye,
224
224
  compileRevision: A,
225
225
  onPollRevision: X,
226
226
  compiling: M
@@ -228,19 +228,19 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
228
228
  ] }) : /* @__PURE__ */ b(v, { children: [
229
229
  Z,
230
230
  Q,
231
- /* @__PURE__ */ y(p, {
231
+ /* @__PURE__ */ y(m, {
232
232
  site: G,
233
233
  pages: K,
234
234
  shareSlot: $,
235
235
  selectedPageSlug: I,
236
236
  onSelectPage: L,
237
- docsBaseUrl: G.currentRevisionId ? De ?? null : null,
238
- docsHtml: G.currentRevisionId ? Te : null,
239
- docsContentLoading: Ce,
237
+ docsBaseUrl: G.currentRevisionId ? Oe ?? null : null,
238
+ docsHtml: G.currentRevisionId ? Ee : null,
239
+ docsContentLoading: we,
240
240
  onEdit: () => k("edit"),
241
241
  onCompile: Y,
242
242
  onSettings: () => k("edit"),
243
- onGetShareUrl: Ge,
243
+ onGetShareUrl: Ke,
244
244
  onOpenFullScreen: () => {
245
245
  z(`/${{
246
246
  VIBE: "vibes",
@@ -256,7 +256,7 @@ function x({ vibeId: x, ownerType: he, ownerId: ge }) {
256
256
  isOpen: B,
257
257
  onClose: () => V(!1),
258
258
  onConfirm: () => {
259
- V(!1), z("/billing/plans");
259
+ V(!1), z(l);
260
260
  },
261
261
  title: "Docs Site Quota Reached",
262
262
  message: "You have reached the documentation site limit for your current plan. Upgrade to create more docs sites."
@@ -1,12 +1,12 @@
1
1
  import { QuotaExhaustedDialog as e } from "./QuotaExhaustedDialog.js";
2
- import { useVibeNavigate as t } from "../../providers/VibeControlsProvider.js";
3
- import { usePluginAvailability as n } from "../../hooks/usePluginAvailability.js";
4
- import { getPluginMeta as r } from "../../constants/pluginCatalog.js";
5
- import { useCallback as i, useEffect as a, useMemo as o, useRef as s } from "react";
6
- import { AlertCircle as c, Clock as l, Download as u, Loader2 as d, Puzzle as f, RefreshCw as p, Server as m } from "lucide-react";
7
- import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
2
+ import { BILLING_PLANS_ROUTE as t, useVibeNavigate as n } from "../../providers/VibeControlsProvider.js";
3
+ import { usePluginAvailability as r } from "../../hooks/usePluginAvailability.js";
4
+ import { getPluginMeta as i } from "../../constants/pluginCatalog.js";
5
+ import { useCallback as a, useEffect as o, useMemo as s, useRef as c } from "react";
6
+ import { AlertCircle as l, Clock as u, Download as d, Loader2 as f, Puzzle as p, RefreshCw as m, Server as h } from "lucide-react";
7
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
8
8
  //#region src/components/shared/PluginGate.tsx
9
- function v(e) {
9
+ function y(e) {
10
10
  return e.requirements && e.requirements.length > 0 ? e.requirements.map((e) => ({
11
11
  packages: e.packages,
12
12
  mode: e.mode ?? "all",
@@ -21,56 +21,56 @@ function v(e) {
21
21
  description: e.description
22
22
  }] : [];
23
23
  }
24
- function y(y) {
25
- let { agentId: b, compact: x = !1, onInstalled: S, children: C } = y, w = o(() => v(y), [y]), { loading: T, initialLoading: E, installed: D, installing: O, install: k, error: A, errorIsAgentState: j, quotaExhausted: M, clearQuotaExhausted: N, refetch: P } = n(o(() => {
24
+ function b(b) {
25
+ let { agentId: x, compact: S = !1, onInstalled: C, children: w } = b, T = s(() => y(b), [b]), { loading: E, initialLoading: D, installed: O, installing: k, install: A, error: j, errorIsAgentState: M, quotaExhausted: N, clearQuotaExhausted: P, refetch: F } = r(s(() => {
26
26
  let e = /* @__PURE__ */ new Set();
27
- for (let t of w) for (let n of t.packages) e.add(n);
27
+ for (let t of T) for (let n of t.packages) e.add(n);
28
28
  return [...e];
29
- }, [w]), b), F = t(), I = o(() => w.map((e) => e.mode === "any" ? e.packages.some((e) => !!D[e]) : e.packages.every((e) => !!D[e])), [w, D]), L = w.length > 0 && I.every(Boolean), R = s(L);
30
- a(() => {
31
- L && !R.current && S?.(), R.current = L;
32
- }, [L, S]);
33
- let z = i(async (e) => {
34
- await k(e);
35
- }, [k]);
36
- return b ? L ? /* @__PURE__ */ g(h, { children: C }) : E ? /* @__PURE__ */ g("div", {
37
- className: `rounded-lg border border-border-default bg-bg-surface ${x ? "p-4" : "p-6"}`,
29
+ }, [T]), x), I = n(), L = s(() => T.map((e) => e.mode === "any" ? e.packages.some((e) => !!O[e]) : e.packages.every((e) => !!O[e])), [T, O]), R = T.length > 0 && L.every(Boolean), z = c(R);
30
+ o(() => {
31
+ R && !z.current && C?.(), z.current = R;
32
+ }, [R, C]);
33
+ let B = a(async (e) => {
34
+ await A(e);
35
+ }, [A]);
36
+ return x ? R ? /* @__PURE__ */ _(g, { children: w }) : D ? /* @__PURE__ */ _("div", {
37
+ className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
38
38
  "data-testid": "plugin-gate-initial-loading",
39
- children: /* @__PURE__ */ _("div", {
39
+ children: /* @__PURE__ */ v("div", {
40
40
  className: "flex items-center gap-2 text-sm text-text-secondary",
41
- children: [/* @__PURE__ */ g(d, { className: "size-4 animate-spin" }), "Checking plugin availability on the agent…"]
41
+ children: [/* @__PURE__ */ _(f, { className: "size-4 animate-spin" }), "Checking plugin availability on the agent…"]
42
42
  })
43
- }) : j ? /* @__PURE__ */ g("div", {
44
- className: `rounded-lg border border-border-default bg-bg-surface ${x ? "p-4" : "p-6"}`,
45
- children: /* @__PURE__ */ _("div", {
43
+ }) : M ? /* @__PURE__ */ _("div", {
44
+ className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
45
+ children: /* @__PURE__ */ v("div", {
46
46
  className: "flex items-start gap-3",
47
- children: [/* @__PURE__ */ g(l, { className: "size-5 text-status-warning-text shrink-0 mt-0.5" }), /* @__PURE__ */ _("div", {
47
+ children: [/* @__PURE__ */ _(u, { className: "size-5 text-status-warning-text shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
48
48
  className: "flex-1 min-w-0 space-y-2",
49
49
  children: [
50
- /* @__PURE__ */ g("p", {
50
+ /* @__PURE__ */ _("p", {
51
51
  className: "text-sm font-semibold text-text-primary",
52
52
  children: "Agent is not ready yet"
53
53
  }),
54
- /* @__PURE__ */ g("p", {
54
+ /* @__PURE__ */ _("p", {
55
55
  className: "text-sm text-text-secondary",
56
56
  children: "Your agent is still starting up or waiting for gateway credentials. Plugin install is only available once the agent reaches the ready state."
57
57
  }),
58
- /* @__PURE__ */ g("p", {
58
+ /* @__PURE__ */ _("p", {
59
59
  className: "text-xs font-mono text-text-placeholder break-all",
60
- children: A
60
+ children: j
61
61
  }),
62
- /* @__PURE__ */ _("div", {
62
+ /* @__PURE__ */ v("div", {
63
63
  className: "flex flex-wrap items-center gap-2 pt-1",
64
- children: [/* @__PURE__ */ _("button", {
64
+ children: [/* @__PURE__ */ v("button", {
65
65
  type: "button",
66
- onClick: () => void P(),
67
- disabled: T,
66
+ onClick: () => void F(),
67
+ disabled: E,
68
68
  className: "inline-flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
69
69
  "data-testid": "plugin-gate-retry",
70
- children: [/* @__PURE__ */ g(p, { className: `size-3.5 ${T ? "animate-spin" : ""}` }), "Retry"]
71
- }), /* @__PURE__ */ g("button", {
70
+ children: [/* @__PURE__ */ _(m, { className: `size-3.5 ${E ? "animate-spin" : ""}` }), "Retry"]
71
+ }), /* @__PURE__ */ _("button", {
72
72
  type: "button",
73
- onClick: () => F("/agents"),
73
+ onClick: () => I("/agents"),
74
74
  className: "rounded-md border border-border-default px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:border-border-strong transition-colors",
75
75
  children: "Manage agents"
76
76
  })]
@@ -78,104 +78,104 @@ function y(y) {
78
78
  ]
79
79
  })]
80
80
  })
81
- }) : /* @__PURE__ */ _("div", {
81
+ }) : /* @__PURE__ */ v("div", {
82
82
  className: "space-y-3",
83
- children: [w.map((e, t) => {
84
- if (I[t]) return null;
85
- let n = (e.mode, e.packages.filter((e) => !D[e])), i = e.mode === "any" ? "Install a plugin to continue" : e.packages.length === 1 ? "Plugin required" : "Plugins required", a = e.mode === "any" ? "Pick any one of the plugins below. Once installed, this surface will render automatically." : e.packages.length === 1 ? "This surface needs the following agent plugin installed." : "This surface needs the following agent plugins installed.";
86
- return /* @__PURE__ */ g("div", {
87
- className: `rounded-lg border border-border-default bg-bg-surface ${x ? "p-4" : "p-6"}`,
88
- children: /* @__PURE__ */ _("div", {
83
+ children: [T.map((e, t) => {
84
+ if (L[t]) return null;
85
+ let n = (e.mode, e.packages.filter((e) => !O[e])), r = e.mode === "any" ? "Install a plugin to continue" : e.packages.length === 1 ? "Plugin required" : "Plugins required", a = e.mode === "any" ? "Pick any one of the plugins below. Once installed, this surface will render automatically." : e.packages.length === 1 ? "This surface needs the following agent plugin installed." : "This surface needs the following agent plugins installed.";
86
+ return /* @__PURE__ */ _("div", {
87
+ className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
88
+ children: /* @__PURE__ */ v("div", {
89
89
  className: "flex items-start gap-3",
90
- children: [/* @__PURE__ */ g(f, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ _("div", {
90
+ children: [/* @__PURE__ */ _(p, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
91
91
  className: "flex-1 min-w-0",
92
92
  children: [
93
- e.eyebrow && /* @__PURE__ */ g("p", {
93
+ e.eyebrow && /* @__PURE__ */ _("p", {
94
94
  className: "text-xs uppercase tracking-wide text-text-secondary mb-1",
95
95
  children: e.eyebrow
96
96
  }),
97
- /* @__PURE__ */ g("p", {
97
+ /* @__PURE__ */ _("p", {
98
98
  className: "text-sm font-semibold text-text-primary",
99
- children: e.title ?? i
99
+ children: e.title ?? r
100
100
  }),
101
- /* @__PURE__ */ g("p", {
101
+ /* @__PURE__ */ _("p", {
102
102
  className: "mt-1 text-sm text-text-secondary",
103
103
  children: e.description ?? a
104
104
  }),
105
- A && /* @__PURE__ */ _("div", {
105
+ j && /* @__PURE__ */ v("div", {
106
106
  role: "alert",
107
107
  className: "mt-3 flex items-start gap-2 rounded-md border border-status-error-border bg-status-error-bg px-3 py-2 text-xs text-status-error-text",
108
- children: [/* @__PURE__ */ g(c, { className: "size-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ g("span", { children: A })]
108
+ children: [/* @__PURE__ */ _(l, { className: "size-3.5 mt-0.5 shrink-0" }), /* @__PURE__ */ _("span", { children: j })]
109
109
  }),
110
- /* @__PURE__ */ g("ul", {
110
+ /* @__PURE__ */ _("ul", {
111
111
  className: "mt-4 space-y-2",
112
112
  children: n.map((e) => {
113
- let t = r(e), n = O === e, i = O !== null;
114
- return /* @__PURE__ */ _("li", {
113
+ let t = i(e), n = k === e, r = k !== null;
114
+ return /* @__PURE__ */ v("li", {
115
115
  className: "flex items-center justify-between gap-3 rounded-md border border-border-default bg-bg-sunken px-3 py-2",
116
- children: [/* @__PURE__ */ _("div", {
116
+ children: [/* @__PURE__ */ v("div", {
117
117
  className: "min-w-0",
118
118
  children: [
119
- /* @__PURE__ */ g("p", {
119
+ /* @__PURE__ */ _("p", {
120
120
  className: "text-sm font-medium text-text-primary truncate",
121
121
  children: t.displayName
122
122
  }),
123
- /* @__PURE__ */ g("p", {
123
+ /* @__PURE__ */ _("p", {
124
124
  className: "text-xs text-text-secondary truncate",
125
125
  children: t.description
126
126
  }),
127
- /* @__PURE__ */ g("p", {
127
+ /* @__PURE__ */ _("p", {
128
128
  className: "text-[10px] font-mono text-text-placeholder truncate",
129
129
  title: e,
130
130
  children: e
131
131
  })
132
132
  ]
133
- }), /* @__PURE__ */ g("button", {
133
+ }), /* @__PURE__ */ _("button", {
134
134
  type: "button",
135
- onClick: () => void z(e),
136
- disabled: i || T,
135
+ onClick: () => void B(e),
136
+ disabled: r || E,
137
137
  className: "inline-flex items-center gap-1.5 whitespace-nowrap rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
138
138
  "data-testid": `plugin-install-${e}`,
139
- children: n ? /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, { className: "size-3.5 animate-spin" }), "Installing…"] }) : /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, { className: "size-3.5" }), "Install"] })
139
+ children: n ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(f, { className: "size-3.5 animate-spin" }), "Installing…"] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(d, { className: "size-3.5" }), "Install"] })
140
140
  })]
141
141
  }, e);
142
142
  })
143
143
  }),
144
- T && n.length === 0 && /* @__PURE__ */ _("div", {
144
+ E && n.length === 0 && /* @__PURE__ */ v("div", {
145
145
  className: "mt-4 flex items-center gap-2 text-xs text-text-secondary",
146
- children: [/* @__PURE__ */ g(d, { className: "size-3.5 animate-spin" }), "Checking plugins…"]
146
+ children: [/* @__PURE__ */ _(f, { className: "size-3.5 animate-spin" }), "Checking plugins…"]
147
147
  })
148
148
  ]
149
149
  })]
150
150
  })
151
151
  }, t);
152
- }), /* @__PURE__ */ g(e, {
153
- isOpen: M,
154
- onClose: N,
152
+ }), /* @__PURE__ */ _(e, {
153
+ isOpen: N,
154
+ onClose: P,
155
155
  onConfirm: () => {
156
- N(), F("/billing/plans");
156
+ P(), I(t);
157
157
  },
158
158
  title: "Plugin quota reached",
159
159
  message: "You've used all plugin install quota on your current plan. Upgrade to install more plugins."
160
160
  })]
161
- }) : /* @__PURE__ */ g("div", {
162
- className: `rounded-lg border border-border-default bg-bg-surface ${x ? "p-4" : "p-6"}`,
163
- children: /* @__PURE__ */ _("div", {
161
+ }) : /* @__PURE__ */ _("div", {
162
+ className: `rounded-lg border border-border-default bg-bg-surface ${S ? "p-4" : "p-6"}`,
163
+ children: /* @__PURE__ */ v("div", {
164
164
  className: "flex items-start gap-3",
165
- children: [/* @__PURE__ */ g(m, { className: "size-5 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ _("div", {
165
+ children: [/* @__PURE__ */ _(h, { className: "size-5 text-text-secondary shrink-0 mt-0.5" }), /* @__PURE__ */ v("div", {
166
166
  className: "flex-1 space-y-2",
167
167
  children: [
168
- /* @__PURE__ */ g("p", {
168
+ /* @__PURE__ */ _("p", {
169
169
  className: "text-sm font-semibold text-text-primary",
170
170
  children: "No active agent"
171
171
  }),
172
- /* @__PURE__ */ g("p", {
172
+ /* @__PURE__ */ _("p", {
173
173
  className: "text-sm text-text-secondary",
174
174
  children: "This surface needs an active vibecontrols agent with a tunnel URL and API key."
175
175
  }),
176
- /* @__PURE__ */ g("button", {
176
+ /* @__PURE__ */ _("button", {
177
177
  type: "button",
178
- onClick: () => F("/agents"),
178
+ onClick: () => I("/agents"),
179
179
  className: "px-3 py-1.5 text-xs font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover transition-colors",
180
180
  children: "Go to Agents"
181
181
  })
@@ -185,4 +185,4 @@ function y(y) {
185
185
  });
186
186
  }
187
187
  //#endregion
188
- export { y as PluginGate };
188
+ export { b as PluginGate };