@burdenoff/microfe-vibecontrols 2026.1022.2 → 2026.1022.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.
@@ -47,13 +47,7 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
47
47
  icon: h,
48
48
  onSelect: () => P(x)
49
49
  }), /* @__PURE__ */ y("div", {
50
- role: "button",
51
- tabIndex: 0,
52
- className: `bg-bg-surface border rounded-card shadow-elevation-1 p-5 h-full hover:border-border-strong hover:shadow-elevation-2 transition-all duration-200 ease-[var(--motion-easing-out)] cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas ${k ? "border-transparent ring-1 ring-[var(--color-focus-ring)] bg-[var(--color-accent-soft)]" : "border-border-subtle"} ${j}`,
53
- onClick: () => S?.(x),
54
- onKeyDown: (e) => {
55
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), S?.(x));
56
- },
50
+ className: `relative bg-bg-surface border rounded-card shadow-elevation-1 p-5 h-full hover:border-border-strong hover:shadow-elevation-2 transition-all duration-200 ease-[var(--motion-easing-out)] ${S ? "cursor-pointer" : ""} ${k ? "border-transparent ring-1 ring-[var(--color-focus-ring)] bg-[var(--color-accent-soft)]" : "border-border-subtle"} ${j}`,
57
51
  children: [
58
52
  /* @__PURE__ */ y("div", {
59
53
  className: "flex items-start justify-between gap-2",
@@ -61,9 +55,9 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
61
55
  className: "flex items-start gap-2 sm:gap-3 min-w-0 flex-1",
62
56
  children: [
63
57
  A && /* @__PURE__ */ v("span", {
64
- className: "flex flex-shrink-0 items-center justify-center max-md:min-h-11 max-md:min-w-11 max-md:-m-2 md:mt-0.5",
58
+ className: "relative z-10 flex flex-shrink-0 items-center justify-center max-md:min-h-11 max-md:min-w-11 max-md:-m-2 md:mt-0.5",
65
59
  onClick: (e) => {
66
- e.stopPropagation(), e.target === e.currentTarget && A();
60
+ e.target === e.currentTarget && A();
67
61
  },
68
62
  children: /* @__PURE__ */ v(b, {
69
63
  checked: k,
@@ -86,7 +80,12 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
86
80
  children: [
87
81
  /* @__PURE__ */ v("h3", {
88
82
  className: "font-semibold text-text-primary truncate min-w-0 text-sm sm:text-base tracking-tight",
89
- children: x.name
83
+ children: S ? /* @__PURE__ */ v("button", {
84
+ type: "button",
85
+ onClick: () => S(x),
86
+ className: "max-w-full truncate text-left focus-visible:outline-none after:absolute after:inset-0 after:rounded-card after:content-[''] focus-visible:after:ring-2 focus-visible:after:ring-border-focus focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-bg-canvas",
87
+ children: x.name
88
+ }) : x.name
90
89
  }),
91
90
  /* @__PURE__ */ v(n, {
92
91
  platform: x.platform,
@@ -115,14 +114,11 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
115
114
  })
116
115
  ]
117
116
  }), /* @__PURE__ */ y("div", {
118
- className: "flex items-center gap-1 sm:gap-2 flex-shrink-0",
117
+ className: "relative z-10 flex items-center gap-1 sm:gap-2 flex-shrink-0",
119
118
  children: [/* @__PURE__ */ v(a, {
120
119
  status: F,
121
120
  reason: M ?? null,
122
- linkTo: `/vibecontrols/agents/${x.id}?tab=connection`,
123
- onClick: (e) => {
124
- e.stopPropagation();
125
- }
121
+ linkTo: `/vibecontrols/agents/${x.id}?tab=connection`
126
122
  }), (P || T || E) && L.length > 0 && /* @__PURE__ */ v(t, {
127
123
  ariaLabel: N("agentsPage.agentActionsMenu", "Agent actions menu"),
128
124
  title: N("agentsPage.agentActions", "Agent actions"),
@@ -171,7 +167,7 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
171
167
  })]
172
168
  }),
173
169
  x.tunnelUrl && /* @__PURE__ */ y("div", {
174
- className: "mt-4 flex items-center gap-2 text-sm",
170
+ className: "relative z-10 mt-4 flex items-center gap-2 text-sm",
175
171
  children: [
176
172
  /* @__PURE__ */ v(l, {
177
173
  className: "size-4 flex-shrink-0 text-text-secondary",
@@ -185,7 +181,6 @@ var x = ({ agent: x, onSelect: S, onConfigure: C, onSettings: w, onStart: T, onS
185
181
  href: x.tunnelUrl,
186
182
  target: "_blank",
187
183
  rel: "noopener noreferrer",
188
- onClick: (e) => e.stopPropagation(),
189
184
  "aria-label": N("agentsPage.tunnelOpensInNewTab", "{{url}} (opens in new tab)", { url: x.tunnelUrl }),
190
185
  className: "min-w-0 truncate font-mono text-xs text-text-link hover:text-text-linkHover hover:underline",
191
186
  children: x.tunnelUrl
@@ -23,12 +23,12 @@ import { useApolloClient as we } from "@apollo/client/react";
23
23
  import { usePermissions as Te } from "@burdenoff/fe-libs/shared/providers/shell";
24
24
  import { AnimatePresence as Ee } from "framer-motion";
25
25
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
26
- import { useFeatureFlag as De } from "@burdenoff/fe-libs/shared/feature-flags";
27
- import { AccessDenied as Oe, PermissionButton as ke } from "@burdenoff/fe-libs/shared/components";
26
+ import { AccessDenied as De, PermissionButton as Oe } from "@burdenoff/fe-libs/shared/components";
27
+ import { useFeatureFlag as ke } from "@burdenoff/fe-libs/shared/feature-flags";
28
28
  import { MotionItem as Ae, MotionList as je } from "@burdenoff/fe-libs/shared/motion";
29
29
  //#region src/components/notes/NotesTabPanel.tsx
30
30
  function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
31
- let { t: Me } = he(), Ne = Ce(), v = we(), { hasPermission: y, isLoading: b, permissions: Pe } = Te(), x = y(s.NOTE_LIST), Fe = y(s.NOTE_CREATE), S = y(s.NOTE_DELETE), Ie = De(c.note.featureFlag, c.note.defaultEnabled), Le = y(c.note.permission), Re = Ie && Le, [C, w] = u(null), [T, ze] = u(""), [E, Be] = u("all"), [D, Ve] = u("all"), [O, k] = u("all"), [A, He] = u(!1), [j, M] = u("grid"), [Ue, N] = u(!1), [We, P] = u(null), [Ge, F] = u(!1), I = (e) => {
31
+ let { t: Me } = he(), Ne = Ce(), v = we(), { hasPermission: y, isLoading: b, permissions: Pe } = Te(), x = y(s.NOTE_LIST), Fe = y(s.NOTE_CREATE), S = y(s.NOTE_DELETE), Ie = ke(c.note.featureFlag, c.note.defaultEnabled), Le = y(c.note.permission), Re = Ie && Le, [C, w] = u(null), [T, ze] = u(""), [E, Be] = u("all"), [D, Ve] = u("all"), [O, k] = u("all"), [A, He] = u(!1), [j, M] = u("grid"), [Ue, N] = u(!1), [We, P] = u(null), [Ge, F] = u(!1), I = (e) => {
32
32
  v.cache.evict({
33
33
  id: "ROOT_QUERY",
34
34
  fieldName: "notes"
@@ -238,7 +238,7 @@ function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
238
238
  total: G.length,
239
239
  pinned: G.filter((e) => e.isPinned).length
240
240
  }, tt = l(() => m === "vibe" ? [] : _, [m, _]);
241
- if (!b && Pe && !x) return /* @__PURE__ */ f(Oe, {
241
+ if (!b && Pe && !x) return /* @__PURE__ */ f(De, {
242
242
  title: "Access Denied",
243
243
  description: "You don't have permission to view notes.",
244
244
  details: "Required permission: note:list"
@@ -277,7 +277,7 @@ function m({ context: m, vibeId: h, sessionId: g, agentVibes: _ = [] }) {
277
277
  className: "flex items-center gap-2 px-3 py-2 text-text-secondary hover:bg-bg-sunken rounded-md transition-colors disabled:opacity-50",
278
278
  title: "Refresh notes",
279
279
  children: /* @__PURE__ */ f(Se, { className: `size-4 ${V ? "animate-spin" : ""}` })
280
- }), /* @__PURE__ */ f(ke, {
280
+ }), /* @__PURE__ */ f(Oe, {
281
281
  permission: s.NOTE_CREATE,
282
282
  children: /* @__PURE__ */ p("button", {
283
283
  type: "button",
@@ -86,7 +86,7 @@ function _({ label: _, placeholder: v, options: y, value: b, onChange: x, search
86
86
  children: [_, ":"]
87
87
  }),
88
88
  /* @__PURE__ */ f("span", {
89
- className: `flex-1 truncate ${U ? "font-medium" : "text-text-placeholder"}`,
89
+ className: `flex-1 truncate ${U ? "font-medium" : "text-text-secondary"}`,
90
90
  children: U?.label || k
91
91
  }),
92
92
  /* @__PURE__ */ p("span", {
@@ -4,8 +4,8 @@ import { useState as n } from "react";
4
4
  import { Share2 as r } from "lucide-react";
5
5
  import { getStoredWorkspaceId as i } from "@burdenoff/fe-libs/shared/graphql";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- import { useFeatureFlag as s } from "@burdenoff/fe-libs/shared/feature-flags";
8
- import { PermissionGate as c } from "@burdenoff/fe-libs/shared/components";
7
+ import { PermissionGate as s } from "@burdenoff/fe-libs/shared/components";
8
+ import { useFeatureFlag as c } from "@burdenoff/fe-libs/shared/feature-flags";
9
9
  import { ShareDialog as l } from "@burdenoff/fe-libs/sharing";
10
10
  //#region src/components/sharing/EntityShareButton.tsx
11
11
  function u(t) {
@@ -13,9 +13,9 @@ function u(t) {
13
13
  }
14
14
  function d({ entity: e, resource: d, label: f, variant: p = "icon" }) {
15
15
  let [m, h] = n(!1), g = t(e, d), _ = u(e);
16
- if (!s(_.featureFlag, _.defaultEnabled)) return null;
16
+ if (!c(_.featureFlag, _.defaultEnabled)) return null;
17
17
  let v = `${e}-share-button`;
18
- return /* @__PURE__ */ o(c, {
18
+ return /* @__PURE__ */ o(s, {
19
19
  permission: _.permission,
20
20
  children: [p === "button" ? /* @__PURE__ */ o("button", {
21
21
  type: "button",
@@ -4,13 +4,13 @@ import { useState as n } from "react";
4
4
  import { Share2 as r } from "lucide-react";
5
5
  import { getStoredWorkspaceId as i } from "@burdenoff/fe-libs/shared/graphql";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- import { useFeatureFlag as s } from "@burdenoff/fe-libs/shared/feature-flags";
8
- import { PermissionGate as c } from "@burdenoff/fe-libs/shared/components";
7
+ import { PermissionGate as s } from "@burdenoff/fe-libs/shared/components";
8
+ import { useFeatureFlag as c } from "@burdenoff/fe-libs/shared/feature-flags";
9
9
  import { ShareDialog as l } from "@burdenoff/fe-libs/sharing";
10
10
  //#region src/components/sharing/VibeShareButton.tsx
11
11
  function u({ vibe: u, label: d, showLabel: f = !0 }) {
12
12
  let [p, m] = n(!1), h = t(u), g = e.vibe;
13
- return s(g.featureFlag, g.defaultEnabled) ? /* @__PURE__ */ o(c, {
13
+ return c(g.featureFlag, g.defaultEnabled) ? /* @__PURE__ */ o(s, {
14
14
  permission: g.permission,
15
15
  children: [/* @__PURE__ */ o("button", {
16
16
  type: "button",
@@ -21,7 +21,7 @@ var h = {
21
21
  }
22
22
  }, g = "bg-bg-sunken text-text-secondary border border-border-default", _ = ({ target: _, onTest: v, onTerminal: y, onOpenDetail: b, onInstallAgent: x, onUninstallAgent: S, onDelete: C, onEdit: w, selected: T = !1, onToggleSelect: E, highlighted: D = !1, isStartingTerminal: O = !1 }) => {
23
23
  let k = e(), A = _.agents.length > 0, j = () => (b ?? y)?.(_.id), M = [];
24
- return v && M.push({
24
+ v && M.push({
25
25
  key: "test",
26
26
  label: k("vibecontrols.targets.testConnection", "Test Connection"),
27
27
  icon: a,
@@ -56,15 +56,11 @@ var h = {
56
56
  icon: d,
57
57
  onSelect: () => C(_.id),
58
58
  variant: "danger"
59
- }), /* @__PURE__ */ p("div", {
59
+ });
60
+ let N = !!(b ?? y);
61
+ return /* @__PURE__ */ p("div", {
60
62
  id: `target-row-${_.id}`,
61
- role: "button",
62
- tabIndex: 0,
63
- className: `bg-bg-surface border rounded-card p-4 h-full hover:border-border-strong hover:shadow-[var(--shadow-elevation-1)] transition-[colors,box-shadow] duration-150 cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus focus-visible:ring-offset-2 focus-visible:ring-offset-bg-canvas ${T ? "border-action-primary-bg ring-1 ring-action-primary-bg/30" : D ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default"}`,
64
- onClick: j,
65
- onKeyDown: (e) => {
66
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), j());
67
- },
63
+ className: `relative bg-bg-surface border rounded-card p-4 h-full hover:border-border-strong hover:shadow-[var(--shadow-elevation-1)] transition-[colors,box-shadow] duration-150 ${N ? "cursor-pointer" : ""} ${T ? "border-action-primary-bg ring-1 ring-action-primary-bg/30" : D ? "border-action-primary-bg bg-action-primary-bg/5" : "border-border-default"}`,
68
64
  children: [
69
65
  /* @__PURE__ */ p("div", {
70
66
  className: "flex items-start justify-between gap-2",
@@ -72,9 +68,9 @@ var h = {
72
68
  className: "flex items-start gap-2 sm:gap-3 min-w-0 flex-1",
73
69
  children: [
74
70
  E && /* @__PURE__ */ f("span", {
75
- className: "flex flex-shrink-0 items-center justify-center max-md:min-h-11 max-md:min-w-11 max-md:-m-2 md:mt-0.5",
71
+ className: "relative z-10 flex flex-shrink-0 items-center justify-center max-md:min-h-11 max-md:min-w-11 max-md:-m-2 md:mt-0.5",
76
72
  onClick: (e) => {
77
- e.stopPropagation(), e.target === e.currentTarget && E();
73
+ e.target === e.currentTarget && E();
78
74
  },
79
75
  children: /* @__PURE__ */ f(m, {
80
76
  checked: T,
@@ -96,7 +92,12 @@ var h = {
96
92
  className: "flex items-center gap-1.5 sm:gap-2 flex-wrap min-w-0",
97
93
  children: [/* @__PURE__ */ f("h3", {
98
94
  className: "font-semibold text-text-primary truncate min-w-0 text-sm sm:text-base",
99
- children: _.name
95
+ children: N ? /* @__PURE__ */ f("button", {
96
+ type: "button",
97
+ onClick: j,
98
+ className: "max-w-full truncate text-left focus-visible:outline-none after:absolute after:inset-0 after:rounded-card after:content-[''] focus-visible:after:ring-2 focus-visible:after:ring-border-focus focus-visible:after:ring-offset-2 focus-visible:after:ring-offset-bg-canvas",
99
+ children: _.name
100
+ }) : _.name
100
101
  }), /* @__PURE__ */ f("span", {
101
102
  className: `inline-flex items-center px-2 py-0.5 text-xs font-medium uppercase tracking-wide rounded-full ${g}`,
102
103
  children: _.type
@@ -108,7 +109,7 @@ var h = {
108
109
  })
109
110
  ]
110
111
  }), /* @__PURE__ */ p("div", {
111
- className: "flex items-center gap-1 sm:gap-2 flex-shrink-0",
112
+ className: "relative z-10 flex items-center gap-1 sm:gap-2 flex-shrink-0",
112
113
  children: [/* @__PURE__ */ f(t, {
113
114
  status: h[_.status].label,
114
115
  variant: h[_.status].variant
@@ -59,8 +59,8 @@ import { NetworkStatus as Gt } from "@apollo/client";
59
59
  import { usePermissions as Kt } from "@burdenoff/fe-libs/shared/providers/shell";
60
60
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
61
61
  import { Button as _, Checkbox as qt, NextSteps as Jt, PagePurpose as Yt } from "@burdenoff/fe-libs/ui";
62
- import { useFeatureFlagDetails as Xt } from "@burdenoff/fe-libs/shared/feature-flags";
63
62
  import { PermissionButton as v } from "@burdenoff/fe-libs/shared/components";
63
+ import { useFeatureFlagDetails as Xt } from "@burdenoff/fe-libs/shared/feature-flags";
64
64
  import { Tabs as Zt } from "@burdenoff/fe-libs/chrome";
65
65
  import { MotionPage as Qt } from "@burdenoff/fe-libs/shared/motion";
66
66
  import { usePluginContributions as $t } from "@burdenoff/fe-libs/shared/plugins";
@@ -16,13 +16,13 @@ import { ChevronRight as p, RefreshCw as m, RotateCcw as h, Save as g, SlidersHo
16
16
  import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
17
17
  import { Fragment as le, jsx as y, jsxs as b } from "react/jsx-runtime";
18
18
  import { Button as ue, CTAOverflowMenu as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
19
- import { useFeatureFlag as pe } from "@burdenoff/fe-libs/shared/feature-flags";
20
- import { PermissionButton as me } from "@burdenoff/fe-libs/shared/components";
19
+ import { PermissionButton as pe } from "@burdenoff/fe-libs/shared/components";
20
+ import { useFeatureFlag as me } from "@burdenoff/fe-libs/shared/feature-flags";
21
21
  import { MotionItem as x, MotionList as S, MotionPage as C } from "@burdenoff/fe-libs/shared/motion";
22
22
  //#region src/pages/SettingsPage.tsx
23
23
  var he = "vibecontrols.webhooks", ge = "/webhooks";
24
24
  function w() {
25
- let { hasPermission: w, isLoading: T } = ce(), { workspaceId: E } = ne(), D = r(), { t: O } = f(), k = w(s.CONFIG_UPDATE), A = w(s.WEBHOOK_LIST), j = pe(he, !0), [M, N] = d("notifications"), [P, F] = d(!1), [I, L] = d(null), { agents: R } = i(), _e = u(() => R.map((e) => ({
25
+ let { hasPermission: w, isLoading: T } = ce(), { workspaceId: E } = ne(), D = r(), { t: O } = f(), k = w(s.CONFIG_UPDATE), A = w(s.WEBHOOK_LIST), j = me(he, !0), [M, N] = d("notifications"), [P, F] = d(!1), [I, L] = d(null), { agents: R } = i(), _e = u(() => R.map((e) => ({
26
26
  id: e.id,
27
27
  name: e.name,
28
28
  isActive: e.isActive
@@ -189,7 +189,7 @@ function w() {
189
189
  actions: k ? /* @__PURE__ */ b("div", {
190
190
  "data-tour": "settings-actions",
191
191
  className: "flex items-center gap-2",
192
- children: [/* @__PURE__ */ y(me, {
192
+ children: [/* @__PURE__ */ y(pe, {
193
193
  permission: s.CONFIG_UPDATE,
194
194
  children: /* @__PURE__ */ b(ue, {
195
195
  type: "button",
@@ -46,8 +46,8 @@ import { usePermissions as et } from "@burdenoff/fe-libs/shared/providers/shell"
46
46
  import { AnimatePresence as tt, motion as M } from "framer-motion";
47
47
  import { Fragment as nt, jsx as N, jsxs as P } from "react/jsx-runtime";
48
48
  import { NextSteps as rt, PagePurpose as it } from "@burdenoff/fe-libs/ui";
49
- import { useFeatureFlagDetails as F } from "@burdenoff/fe-libs/shared/feature-flags";
50
49
  import { AccessDenied as at, PermissionButton as ot } from "@burdenoff/fe-libs/shared/components";
50
+ import { useFeatureFlagDetails as F } from "@burdenoff/fe-libs/shared/feature-flags";
51
51
  import { MotionItem as I, MotionList as st, MotionPage as L } from "@burdenoff/fe-libs/shared/motion";
52
52
  import { usePluginContributions as ct } from "@burdenoff/fe-libs/shared/plugins";
53
53
  //#region src/pages/VibeDetailsPage.tsx
@@ -1,33 +1,34 @@
1
1
  import { QuotaExhaustedDialog as e } from "../components/shared/QuotaExhaustedDialog.js";
2
- import { QUOTA_EXHAUSTED_EVENT as t, getQuotaDialogContent as n, wasQuotaHandledLocally as r } from "../utils/quotaUtils.js";
3
- import { BILLING_PLANS_ROUTE as i, useVibeNavigate as a } from "./VibeControlsProvider.js";
4
- import { useCallback as o, useEffect as s, useState as c } from "react";
5
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
6
- import { useEventBus as f } from "@burdenoff/fe-libs/shared/events";
2
+ import { QUOTA_EXHAUSTED_EVENT as t, VIBECONTROLS_QUOTA_PRODUCT as n, getQuotaDialogContent as r, wasQuotaHandledLocally as i } from "../utils/quotaUtils.js";
3
+ import { BILLING_PLANS_ROUTE as a, useVibeNavigate as o } from "./VibeControlsProvider.js";
4
+ import { useCallback as s, useEffect as c, useState as l } from "react";
5
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
6
+ import { useEventBus as p } from "@burdenoff/fe-libs/shared/events";
7
+ import { useQuotaDialogOwnership as m } from "@burdenoff/fe-libs/shared/components";
7
8
  //#region src/providers/QuotaExhaustedProvider.tsx
8
- var p = {
9
+ var h = {
9
10
  open: !1,
10
11
  kind: "generic"
11
- }, m = {
12
+ }, g = {
12
13
  agent: "vibecontrols.quota.agent_limit_hit",
13
14
  session: "vibecontrols.quota.session_limit_hit",
14
15
  tunnel: "vibecontrols.quota.tunnel_limit_hit",
15
16
  "tunnel-start": "vibecontrols.quota.tunnel_limit_hit",
16
17
  "tunnel-subdomain": "vibecontrols.quota.tunnel_limit_hit"
17
18
  };
18
- function h({ children: h }) {
19
- let g = a(), _ = f(), [v, y] = c(p);
20
- s(() => {
19
+ function _({ children: _ }) {
20
+ let v = o(), y = p(), [b, x] = l(h);
21
+ m(n), c(() => {
21
22
  let e = /* @__PURE__ */ new Set(), n = (t) => {
22
- let n = t.detail, i = window.setTimeout(() => {
23
- if (e.delete(i), r()) return;
24
- let t = n?.kind ?? "generic", a = m[t];
25
- a && _.emitCustom(a, {}), y({
23
+ let n = t.detail, r = window.setTimeout(() => {
24
+ if (e.delete(r), i()) return;
25
+ let t = n?.kind ?? "generic", a = g[t];
26
+ a && y.emitCustom(a, {}), x({
26
27
  open: !0,
27
28
  kind: t
28
29
  });
29
30
  }, 0);
30
- e.add(i);
31
+ e.add(r);
31
32
  };
32
33
  return window.addEventListener(t, n), () => {
33
34
  window.removeEventListener(t, n);
@@ -35,24 +36,24 @@ function h({ children: h }) {
35
36
  e.clear();
36
37
  };
37
38
  }, []);
38
- let b = o(() => {
39
- y((e) => ({
39
+ let S = s(() => {
40
+ x((e) => ({
40
41
  ...e,
41
42
  open: !1
42
43
  }));
43
- }, []), x = o(() => {
44
- y((e) => ({
44
+ }, []), C = s(() => {
45
+ x((e) => ({
45
46
  ...e,
46
47
  open: !1
47
- })), g(i);
48
- }, [g]), S = n(v.kind);
49
- return /* @__PURE__ */ d(l, { children: [h, /* @__PURE__ */ u(e, {
50
- isOpen: v.open,
51
- onClose: b,
52
- onConfirm: x,
53
- title: S.title,
54
- message: S.message
48
+ })), v(a);
49
+ }, [v]), w = r(b.kind);
50
+ return /* @__PURE__ */ f(u, { children: [_, /* @__PURE__ */ d(e, {
51
+ isOpen: b.open,
52
+ onClose: S,
53
+ onConfirm: C,
54
+ title: w.title,
55
+ message: w.message
55
56
  })] });
56
57
  }
57
58
  //#endregion
58
- export { h as QuotaExhaustedProvider };
59
+ export { _ as QuotaExhaustedProvider };
@@ -1,25 +1,26 @@
1
+ import { quotaExhaustedEventName as e } from "@burdenoff/fe-libs/shared/assistant/quota";
1
2
  //#region src/utils/quotaUtils.ts
2
- function e(e) {
3
+ function t(e) {
3
4
  return e?.some((e) => e.extensions?.code === "QUOTA_EXHAUSTED" || e.extensions?.errorCode === "QUOTA_EXHAUSTED" || e.message?.includes("QUOTA_EXHAUSTED")) ?? !1;
4
5
  }
5
- function t(e, t) {
6
+ function n(e, t) {
6
7
  if (!e || typeof e != "object") return;
7
8
  let n = e[t];
8
9
  return Array.isArray(n) ? n : void 0;
9
10
  }
10
- function n(n) {
11
- if (n instanceof Error && (n.message.includes("QUOTA_EXHAUSTED") || n.message.toLowerCase().includes("quota exhausted"))) return !0;
12
- if (!n || typeof n != "object") return !1;
13
- let r = n.statusCode;
11
+ function r(e) {
12
+ if (e instanceof Error && (e.message.includes("QUOTA_EXHAUSTED") || e.message.toLowerCase().includes("quota exhausted"))) return !0;
13
+ if (!e || typeof e != "object") return !1;
14
+ let r = e.statusCode;
14
15
  if (typeof r == "number" && r === 429) return !0;
15
- let i = n.bodyText;
16
- if (typeof i == "string" && i.includes("QUOTA_EXHAUSTED") || e("graphQLErrors" in n && Array.isArray(n.graphQLErrors) ? n.graphQLErrors : void 0) || e(t(n, "errors"))) return !0;
17
- let a = n.result;
18
- if (e(t(a, "errors"))) return !0;
19
- let o = n.networkError;
16
+ let i = e.bodyText;
17
+ if (typeof i == "string" && i.includes("QUOTA_EXHAUSTED") || t("graphQLErrors" in e && Array.isArray(e.graphQLErrors) ? e.graphQLErrors : void 0) || t(n(e, "errors"))) return !0;
18
+ let a = e.result;
19
+ if (t(n(a, "errors"))) return !0;
20
+ let o = e.networkError;
20
21
  if (o && typeof o == "object") {
21
- let n = o.result;
22
- if (e(t(n, "errors"))) return !0;
22
+ let e = o.result;
23
+ if (t(n(e, "errors"))) return !0;
23
24
  let r = o.statusCode;
24
25
  if (typeof r == "number" && r === 429) return !0;
25
26
  let i = o.bodyText;
@@ -27,7 +28,7 @@ function n(n) {
27
28
  }
28
29
  return !1;
29
30
  }
30
- function r(e) {
31
+ function i(e) {
31
32
  let t = {
32
33
  session: {
33
34
  title: "Session Quota Reached",
@@ -144,7 +145,7 @@ function r(e) {
144
145
  };
145
146
  return t[e] ?? t.generic;
146
147
  }
147
- var i = [
148
+ var a = [
148
149
  [/aicredit|aitoken|checkaicredits|reportaitokenusage/i, "ai-credits"],
149
150
  [/tunneldomain|subdomain|customtunneldomain/i, "tunnel-subdomain"],
150
151
  [/starttunnel|issuetunnelsession/i, "tunnel-start"],
@@ -173,19 +174,19 @@ var i = [
173
174
  [/action/i, "action"],
174
175
  [/secret|vault/i, "secret"]
175
176
  ];
176
- function a(e) {
177
+ function o(e) {
177
178
  if (!e) return "generic";
178
- for (let [t, n] of i) if (t.test(e)) return n;
179
+ for (let [t, n] of a) if (t.test(e)) return n;
179
180
  return "generic";
180
181
  }
181
- var o = "vibecontrols:quota-exhausted", s = "__vibecontrolsQuotaLocalHandled";
182
- function c() {
183
- typeof window > "u" || (window[s] = Date.now());
182
+ var s = "vibecontrols", c = e(s), l = "__vibecontrolsQuotaLocalHandled";
183
+ function u() {
184
+ typeof window > "u" || (window[l] = Date.now());
184
185
  }
185
- function l() {
186
+ function d() {
186
187
  if (typeof window > "u") return !1;
187
- let e = window[s];
188
+ let e = window[l];
188
189
  return e ? Date.now() - e < 250 : !1;
189
190
  }
190
191
  //#endregion
191
- export { o as QUOTA_EXHAUSTED_EVENT, r as getQuotaDialogContent, a as inferQuotaKindFromOperation, n as isQuotaExhaustedError, c as markQuotaHandledLocally, l as wasQuotaHandledLocally };
192
+ export { c as QUOTA_EXHAUSTED_EVENT, s as VIBECONTROLS_QUOTA_PRODUCT, i as getQuotaDialogContent, o as inferQuotaKindFromOperation, r as isQuotaExhaustedError, u as markQuotaHandledLocally, d as wasQuotaHandledLocally };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/microfe-vibecontrols",
3
- "version": "2026.1022.2",
3
+ "version": "2026.1022.4",
4
4
  "description": "VibeControls microfrontend for Burdenoff products",
5
5
  "type": "module",
6
6
  "files": [