@burdenoff/fe-libs 2026.1023.3 → 2026.1023.5

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.
@@ -11,7 +11,7 @@ import { assistantUsageLedger as _, hasPendingUsageReports as v, reportUsageWith
11
11
  var S = 42e4, C = 400, w = 2e3, T = 5e3;
12
12
  function E() {
13
13
  return typeof window > "u" ? {} : {
14
- currentUrl: window.location.href,
14
+ currentUrl: `${window.location.origin}${window.location.pathname}`,
15
15
  currentPage: window.location.pathname.split("/").filter(Boolean).slice(0, 3).join("/") || "home",
16
16
  viewportSize: `${window.innerWidth}x${window.innerHeight}`
17
17
  };
@@ -35,9 +35,22 @@ export type AssistantPageContextKey = (typeof ASSISTANT_MODEL_CONTEXT_KEYS)[numb
35
35
  export declare const ASSISTANT_PAGE_CONTEXT_KEYS: readonly AssistantPageContextKey[];
36
36
  /** Whether the sandbox reads `key` from `pageContext`. */
37
37
  export declare function isAssistantPageContextKey(key: string): key is AssistantPageContextKey;
38
+ /**
39
+ * `currentUrl` without the parts that carry credentials (G87): the query string,
40
+ * the fragment, and any `user:password@` userinfo.
41
+ *
42
+ * Straight after sign-in a shell URL holds live tokens in its `#sso=` fragment,
43
+ * and share links hold bearer tokens in their query string. Hosts are expected
44
+ * to send origin + path already; this is the backstop for one that forwards
45
+ * `window.location.href`. The cut is unconditional rather than a deny-list of
46
+ * parameter names, so a new token parameter cannot slip past it.
47
+ */
48
+ export declare function credentialFreeContextUrl(value: string): string;
38
49
  /**
39
50
  * The part of a host's page context that goes on the wire: only allow-listed
40
- * keys, with their values untouched. `undefined` stays `undefined`, so a turn
51
+ * keys, with their values untouched — except `currentUrl`, which loses its
52
+ * query string, fragment and userinfo (`credentialFreeContextUrl`).
53
+ * `undefined` stays `undefined`, so a turn
41
54
  * with no context still produces the body it always did; a context with no
42
55
  * allow-listed key becomes `{}`, which the sandbox treats as "no context".
43
56
  *
@@ -37,10 +37,19 @@ function i(e) {
37
37
  return r.has(e);
38
38
  }
39
39
  function a(e) {
40
+ let t = e.split(/[?#]/, 1)[0] ?? "", n;
41
+ try {
42
+ n = new URL(t);
43
+ } catch {
44
+ return t;
45
+ }
46
+ return n.username === "" && n.password === "" ? t : `${n.origin}${n.pathname}`;
47
+ }
48
+ function o(e) {
40
49
  if (e === void 0) return;
41
50
  let t = {};
42
- for (let [n, i] of Object.entries(e)) r.has(n) && (t[n] = i);
51
+ for (let [n, i] of Object.entries(e)) r.has(n) && (t[n] = n === "currentUrl" && typeof i == "string" ? a(i) : i);
43
52
  return t;
44
53
  }
45
54
  //#endregion
46
- export { e as ASSISTANT_MODEL_CONTEXT_KEYS, n as ASSISTANT_PAGE_CONTEXT_KEYS, t as ASSISTANT_REDACTED_CONTEXT_ID_KEYS, a as filterAssistantPageContext, i as isAssistantPageContextKey };
55
+ export { e as ASSISTANT_MODEL_CONTEXT_KEYS, n as ASSISTANT_PAGE_CONTEXT_KEYS, t as ASSISTANT_REDACTED_CONTEXT_ID_KEYS, a as credentialFreeContextUrl, o as filterAssistantPageContext, i as isAssistantPageContextKey };
@@ -128,6 +128,19 @@ export interface AssistantOverlayProps {
128
128
  launcherBottomInset?: string;
129
129
  /** Hide the launcher when the product opens the assistant from its own chrome. */
130
130
  showLauncher?: boolean;
131
+ /**
132
+ * Let the overlay close itself on Escape. Default `true`.
133
+ *
134
+ * ★ A host that already decides Escape for the assistant passes `false` and
135
+ * closes it through `useAssistantOverlayOrNull().close`. VibeControls does:
136
+ * its `useAssistantEscape` records the key on `window` in the capture phase
137
+ * and decides once the whole dispatch is over (BOFF-8677), with the same
138
+ * `assistantOverlayEscapeAction`, so a layer opened after the assistant, or
139
+ * a page listener on `window`, still gets the key first. Two listeners
140
+ * deciding the same key would let the earlier one close the assistant under
141
+ * a layer that had not reacted yet.
142
+ */
143
+ closeOnEscape?: boolean;
131
144
  }
132
145
  /**
133
146
  * The launcher and the window. Renders nothing without an
@@ -2,193 +2,200 @@ import { quotaExhaustedEventName as e } from "../quota.js";
2
2
  import { useAssistantTr as t } from "../i18n.js";
3
3
  import { assistantPanelOwnsEscape as n } from "./panelOverlays.js";
4
4
  import { AssistantPreviewBridgeHost as r } from "../preview/bridgeHost.js";
5
- import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s, ASSISTANT_SHEET_BOTTOM_VAR as c, assistantLauncherBottom as l, assistantOverlayClassName as u, assistantOverlayEscapeAction as d, assistantOverlayKeys as f, assistantQuotaKindOf as p, closestAround as m, createAssistantNavigate as h, isAssistantToggleShortcut as g, nextAssistantOpenState as _, publishedAssistantDockWidth as v, publishedAssistantPanelInset as y, readAssistantOverlayFlag as b, requestedAssistantOpenState as x, writeAssistantOverlayFlag as S } from "./assistantOverlayState.js";
6
- import { useAssistantServerHistory as C } from "../history/useAssistantServerHistory.js";
7
- import { AIAssistantPanel as w } from "./AIAssistantPanel.js";
8
- import { createContext as T, useCallback as E, useContext as D, useEffect as O, useMemo as k, useRef as A, useState as j, useSyncExternalStore as M } from "react";
9
- import { Sparkles as N } from "lucide-react";
10
- import { jsx as P, jsxs as F } from "react/jsx-runtime";
5
+ import { ASSISTANT_DOCK_WIDTH_VAR as i, ASSISTANT_OVERLAY_DESKTOP_QUERY as a, ASSISTANT_OVERLAY_TOP_VAR as o, ASSISTANT_PANEL_INSET_VAR as s, ASSISTANT_SHEET_BOTTOM_VAR as c, assistantLauncherBottom as l, assistantLauncherRight as u, assistantOverlayClassName as d, assistantOverlayEscapeAction as f, assistantOverlayKeys as p, assistantQuotaKindOf as m, closestAround as h, createAssistantNavigate as g, isAssistantToggleShortcut as _, nextAssistantOpenState as v, publishedAssistantDockWidth as y, publishedAssistantPanelInset as b, readAssistantOverlayFlag as x, requestedAssistantOpenState as S, writeAssistantOverlayFlag as C } from "./assistantOverlayState.js";
6
+ import { useAssistantServerHistory as w } from "../history/useAssistantServerHistory.js";
7
+ import { AIAssistantPanel as T } from "./AIAssistantPanel.js";
8
+ import { createContext as E, useCallback as D, useContext as O, useEffect as k, useMemo as A, useRef as j, useState as M, useSyncExternalStore as N } from "react";
9
+ import { Sparkles as P } from "lucide-react";
10
+ import { jsx as F, jsxs as I } from "react/jsx-runtime";
11
11
  //#region src/shared/assistant/ui/AssistantOverlay.tsx
12
- var I = T(null);
13
- function L() {
14
- return D(I);
15
- }
12
+ var L = E(null);
16
13
  function R() {
17
- return D(I)?.dockWidthPx ?? 0;
14
+ return O(L);
18
15
  }
19
16
  function z() {
20
- return D(I)?.panelInsetPx ?? 0;
17
+ return O(L)?.dockWidthPx ?? 0;
18
+ }
19
+ function B() {
20
+ return O(L)?.panelInsetPx ?? 0;
21
21
  }
22
- var B = () => typeof window > "u" ? void 0 : window.sessionStorage, V = () => typeof window > "u" ? void 0 : window.localStorage;
23
- function H(e) {
22
+ var V = () => typeof window > "u" ? void 0 : window.sessionStorage, H = () => typeof window > "u" ? void 0 : window.localStorage;
23
+ function U(e) {
24
24
  if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
25
25
  let t = window.matchMedia(a);
26
26
  return t.addEventListener("change", e), () => t.removeEventListener("change", e);
27
27
  }
28
- function U() {
28
+ function W() {
29
29
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(min-width: 640px)").matches;
30
30
  }
31
- function W() {
32
- return M(H, U, () => !1);
31
+ function G() {
32
+ return N(U, W, () => !1);
33
33
  }
34
- function G(t, n) {
35
- let r = A(n);
36
- O(() => {
34
+ function K(t, n) {
35
+ let r = j(n);
36
+ k(() => {
37
37
  r.current = n;
38
- }, [n]), O(() => {
38
+ }, [n]), k(() => {
39
39
  if (!t || typeof window > "u") return;
40
- let n = e(t), i = (e) => r.current(p(e), e);
40
+ let n = e(t), i = (e) => r.current(m(e), e);
41
41
  return window.addEventListener(n, i), () => window.removeEventListener(n, i);
42
42
  }, [t]);
43
43
  }
44
- var K = () => {};
45
- function q({ keyPrefix: e, quota: t, children: n }) {
46
- let r = k(() => f(e), [e]), [a, o] = j(() => b(B, r.openStorageKey)), [c, l] = j(() => b(V, r.dockStorageKey)), u = E(() => o(!0), []), d = E(() => o(!1), []), p = E(() => o((e) => !e), []), m = E(() => l((e) => !e), []);
47
- O(() => {
48
- S(B, r.openStorageKey, a);
49
- }, [r.openStorageKey, a]), O(() => {
50
- S(V, r.dockStorageKey, c);
51
- }, [r.dockStorageKey, c]), O(() => {
44
+ var q = () => {};
45
+ function J({ keyPrefix: e, quota: t, children: n }) {
46
+ let r = A(() => p(e), [e]), [a, o] = M(() => x(V, r.openStorageKey)), [c, l] = M(() => x(H, r.dockStorageKey)), u = D(() => o(!0), []), d = D(() => o(!1), []), f = D(() => o((e) => !e), []), m = D(() => l((e) => !e), []);
47
+ k(() => {
48
+ C(V, r.openStorageKey, a);
49
+ }, [r.openStorageKey, a]), k(() => {
50
+ C(H, r.dockStorageKey, c);
51
+ }, [r.dockStorageKey, c]), k(() => {
52
52
  if (typeof window > "u") return;
53
53
  let e = (e) => {
54
- let t = x(e);
55
- o((e) => _(e, t));
54
+ let t = S(e);
55
+ o((e) => v(e, t));
56
56
  };
57
57
  return window.addEventListener(r.toggleEvent, e), () => window.removeEventListener(r.toggleEvent, e);
58
- }, [r.toggleEvent]), O(() => {
58
+ }, [r.toggleEvent]), k(() => {
59
59
  if (typeof document > "u") return;
60
60
  let e = (e) => {
61
- g(e) && (e.preventDefault(), o((e) => !e));
61
+ _(e) && (e.preventDefault(), o((e) => !e));
62
62
  };
63
63
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
64
- }, []), G(t?.product ?? null, t?.onExhausted ?? K);
65
- let h = W(), C = v({
64
+ }, []), K(t?.product ?? null, t?.onExhausted ?? q);
65
+ let h = G(), g = y({
66
66
  isOpen: a,
67
67
  docked: c,
68
68
  isDesktop: h
69
- }), w = y({
69
+ }), w = b({
70
70
  isOpen: a,
71
71
  docked: c,
72
72
  isDesktop: h
73
73
  });
74
- O(() => {
74
+ k(() => {
75
75
  if (typeof document > "u") return;
76
76
  let e = document.documentElement.style;
77
- return e.setProperty(i, `${C}px`), () => {
77
+ return e.setProperty(i, `${g}px`), () => {
78
78
  e.removeProperty(i);
79
79
  };
80
- }, [C]), O(() => {
80
+ }, [g]), k(() => {
81
81
  if (typeof document > "u") return;
82
82
  let e = document.documentElement.style;
83
83
  return e.setProperty(s, `${w}px`), () => {
84
84
  e.removeProperty(s);
85
85
  };
86
86
  }, [w]);
87
- let T = k(() => ({
87
+ let T = A(() => ({
88
88
  isOpen: a,
89
89
  open: u,
90
90
  close: d,
91
- toggle: p,
91
+ toggle: f,
92
92
  docked: c,
93
93
  toggleDock: m,
94
- dockWidthPx: C,
94
+ dockWidthPx: g,
95
95
  panelInsetPx: w,
96
96
  keys: r
97
97
  }), [
98
98
  a,
99
99
  u,
100
100
  d,
101
- p,
101
+ f,
102
102
  c,
103
103
  m,
104
- C,
104
+ g,
105
105
  w,
106
106
  r
107
107
  ]);
108
- return /* @__PURE__ */ P(I.Provider, {
108
+ return /* @__PURE__ */ F(L.Provider, {
109
109
  value: T,
110
110
  children: n
111
111
  });
112
112
  }
113
- var J = (e, t) => /* @__PURE__ */ P(w, {
113
+ var Y = (e, t) => /* @__PURE__ */ F(T, {
114
114
  ...e,
115
115
  ...t
116
116
  });
117
- function Y(e) {
118
- let t = L();
119
- return t ? /* @__PURE__ */ P(X, {
117
+ function X(e) {
118
+ let t = R();
119
+ return t ? /* @__PURE__ */ F(Z, {
120
120
  state: t,
121
121
  ...e
122
122
  }) : null;
123
123
  }
124
- function X({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel: s, navigate: f, isShellLessTarget: p, topOffsetPx: g = 56, launcherIcon: _, launcherBottomInset: v = "1.5rem", showLauncher: y = !0 }) {
125
- let { isOpen: b, close: x, toggle: S, docked: w, toggleDock: T } = e, E = t();
126
- C(a?.serverHistory === !0);
127
- let [D, A] = j(!1), M = k(() => f ? h({
128
- navigate: f,
129
- isShellLessTarget: p,
130
- isDesktop: U,
131
- collapseSheet: () => A(!1),
124
+ function Z({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel: s, navigate: p, isShellLessTarget: m, topOffsetPx: _ = 56, launcherIcon: v, launcherBottomInset: y = "1.5rem", showLauncher: b = !0, closeOnEscape: x = !0 }) {
125
+ let { isOpen: S, close: C, toggle: T, docked: E, toggleDock: D, dockWidthPx: O } = e, j = t();
126
+ w(a?.serverHistory === !0);
127
+ let [N, L] = M(!1), R = A(() => p ? g({
128
+ navigate: p,
129
+ isShellLessTarget: m,
130
+ isDesktop: W,
131
+ collapseSheet: () => L(!1),
132
132
  openInNewTab: (e) => window.open(e, "_blank", "noopener,noreferrer")
133
- }) : void 0, [f, p]);
134
- O(() => {
135
- if (!b) return;
133
+ }) : void 0, [p, m]);
134
+ k(() => {
135
+ if (!S || !x) return;
136
136
  let e = (e) => {
137
- d({
137
+ f({
138
138
  key: e.key,
139
- isOpen: b,
139
+ isOpen: S,
140
140
  alreadyHandled: e.defaultPrevented,
141
141
  dialogOpen: document.querySelector("[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
142
- pressedInsideDialog: m(e.target, "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
142
+ pressedInsideDialog: h(e.target, "[role=\"dialog\"],[role=\"alertdialog\"],dialog[open]") !== null,
143
143
  panelOwnsEscape: n()
144
- }) === "close" && (e.preventDefault(), x());
144
+ }) === "close" && (e.preventDefault(), C());
145
145
  };
146
146
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
147
- }, [b, x]);
148
- let I = {
147
+ }, [
148
+ S,
149
+ C,
150
+ x
151
+ ]);
152
+ let z = {
149
153
  panelId: i,
150
154
  visible: !0,
151
- onClose: x,
152
- docked: w,
153
- onToggleDock: T,
154
- onNavigate: M,
155
- isShellLessTarget: p
156
- }, L = E("overlay.launcher", "AI Assistant"), R = {
157
- [o]: `${g}px`,
155
+ onClose: C,
156
+ docked: E,
157
+ onToggleDock: D,
158
+ onNavigate: R,
159
+ isShellLessTarget: m
160
+ }, B = j("overlay.launcher", "AI Assistant"), V = {
161
+ [o]: `${_}px`,
158
162
  [c]: "var(--mobile-tabbar-height, 0px)"
159
163
  };
160
- return /* @__PURE__ */ F(r, {
164
+ return /* @__PURE__ */ I(r, {
161
165
  preview: a?.preview,
162
- children: [b && /* @__PURE__ */ F("div", {
163
- className: u({
164
- expanded: D,
165
- docked: w
166
+ children: [S && /* @__PURE__ */ I("div", {
167
+ className: d({
168
+ expanded: N,
169
+ docked: E
166
170
  }),
167
- style: R,
171
+ style: V,
168
172
  "data-testid": "assistant-overlay",
169
- children: [/* @__PURE__ */ P("button", {
173
+ children: [/* @__PURE__ */ F("button", {
170
174
  type: "button",
171
- onClick: () => A((e) => !e),
175
+ onClick: () => L((e) => !e),
172
176
  className: "flex w-full shrink-0 justify-center pt-2 pb-1 sm:hidden",
173
- "aria-label": D ? E("sheet.collapse", "Shrink the assistant") : E("sheet.expand", "Expand the assistant"),
174
- "aria-expanded": D,
177
+ "aria-label": N ? j("sheet.collapse", "Shrink the assistant") : j("sheet.expand", "Expand the assistant"),
178
+ "aria-expanded": N,
175
179
  "data-testid": "assistant-sheet-handle",
176
- children: /* @__PURE__ */ P("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
177
- }), /* @__PURE__ */ P("div", {
180
+ children: /* @__PURE__ */ F("span", { className: "h-1.5 w-10 rounded-full bg-border-strong" })
181
+ }), /* @__PURE__ */ F("div", {
178
182
  className: "flex min-h-0 flex-1 flex-col",
179
- children: s ? s(I) : J(a, I)
183
+ children: s ? s(z) : Y(a, z)
180
184
  })]
181
- }), y && /* @__PURE__ */ P("button", {
185
+ }), b && /* @__PURE__ */ F("button", {
182
186
  type: "button",
183
- onClick: S,
184
- title: E("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
185
- "aria-label": L,
187
+ onClick: T,
188
+ title: j("overlay.launcherTitle", "AI Assistant ({{shortcut}})", { shortcut: "Ctrl+Shift+A" }),
189
+ "aria-label": B,
186
190
  "aria-haspopup": "dialog",
187
- "aria-expanded": b,
191
+ "aria-expanded": S,
188
192
  "data-testid": "assistant-fab",
189
- style: { bottom: l(v) },
190
- className: "fixed right-6 z-30 size-14 items-center justify-center rounded-full border border-border-strong bg-[var(--color-accent-soft)] text-action-primary-bg shadow-float transition-colors duration-200 hover:border-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] cursor-pointer " + (b ? "hidden sm:inline-flex" : "inline-flex"),
191
- children: _ ?? /* @__PURE__ */ P(N, {
193
+ style: {
194
+ bottom: l(y),
195
+ right: u(O)
196
+ },
197
+ className: "fixed z-30 size-14 items-center justify-center rounded-full border border-border-strong bg-[var(--color-accent-soft)] text-action-primary-bg shadow-float transition-colors duration-200 hover:border-action-primary-bg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] cursor-pointer " + (S ? "hidden sm:inline-flex" : "inline-flex"),
198
+ children: v ?? /* @__PURE__ */ F(P, {
192
199
  className: "size-6",
193
200
  "aria-hidden": "true"
194
201
  })
@@ -196,4 +203,4 @@ function X({ state: e, panelId: i = "ai-assistant", panelProps: a, renderPanel:
196
203
  });
197
204
  }
198
205
  //#endregion
199
- export { Y as AssistantOverlay, q as AssistantOverlayProvider, R as useAssistantDockWidth, L as useAssistantOverlayOrNull, z as useAssistantPanelInset, G as useAssistantQuotaExhausted };
206
+ export { X as AssistantOverlay, J as AssistantOverlayProvider, z as useAssistantDockWidth, R as useAssistantOverlayOrNull, B as useAssistantPanelInset, K as useAssistantQuotaExhausted };
@@ -124,6 +124,23 @@ export declare function aboveAssistantBottomChrome(inset: string): string;
124
124
  export declare const ASSISTANT_LAUNCHER_LIFT_VAR = "--assistant-launcher-lift";
125
125
  /** The launcher's CSS `bottom`: clears the chrome, then the page's own lift. */
126
126
  export declare function assistantLauncherBottom(inset: string): string;
127
+ /** The launcher's gap from the right edge of the viewport (`right-6`). */
128
+ export declare const ASSISTANT_LAUNCHER_RIGHT_INSET = "1.5rem";
129
+ /**
130
+ * The launcher's CSS `right`: its 1.5rem gap, plus the docked panel's width
131
+ * while the panel is docked and open on a desktop viewport.
132
+ *
133
+ * ★★ The launcher stays visible on desktop while the panel is open, and the
134
+ * docked panel is flush right. With a fixed `right-6` the launcher sat UNDER
135
+ * the docked panel (z-30 against z-50): invisible, and the dock covered the
136
+ * page-discussion and other floating buttons a host stacks above it.
137
+ * VibeControls' own overlay fixed this (and HealthyBowl hit the same defect,
138
+ * BOFF-7534); it lives here so every product shell gets it. Floating needs no
139
+ * offset: the window rises from the launcher by design. Pass the published
140
+ * dock width (`publishedAssistantDockWidth`), which is already 0 when closed,
141
+ * floating or on a phone.
142
+ */
143
+ export declare function assistantLauncherRight(dockWidthPx: number): string;
127
144
  /** Width of the docked side panel. Must match `sm:w-[440px]` below. */
128
145
  export declare const ASSISTANT_DOCK_WIDTH_PX = 440;
129
146
  /**
@@ -37,23 +37,27 @@ var f = "--assistant-launcher-lift";
37
37
  function p(e) {
38
38
  return `calc(var(${f}, 0px) + ${d(e)})`;
39
39
  }
40
- var m = 440, h = "--assistant-dock-width", g = "--assistant-sheet-bottom", _ = "--assistant-overlay-top", v = 56, y = "(min-width: 640px)";
41
- function b(e) {
40
+ var m = "1.5rem";
41
+ function h(e) {
42
+ return e > 0 ? `calc(${m} + ${e}px)` : m;
43
+ }
44
+ var g = 440, _ = "--assistant-dock-width", v = "--assistant-sheet-bottom", y = "--assistant-overlay-top", b = 56, x = "(min-width: 640px)";
45
+ function S(e) {
42
46
  return e.isOpen && e.docked && e.isDesktop ? 440 : 0;
43
47
  }
44
- var x = 520, S = 24, C = "--assistant-panel-inset";
45
- function w(e) {
48
+ var C = 520, w = 24, T = "--assistant-panel-inset";
49
+ function E(e) {
46
50
  return !e.isOpen || !e.isDesktop ? 0 : e.docked ? 440 : 544;
47
51
  }
48
- var T = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-[var(--assistant-sheet-bottom,0px)] top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", E = "h-[60vh] max-h-[60vh]", D = "h-[88vh] max-h-[88vh]", O = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-6rem-var(--assistant-overlay-top,56px)-0.5rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", k = "sm:left-auto sm:right-0 sm:top-[var(--assistant-overlay-top)] sm:bottom-0 sm:rounded-none sm:h-auto sm:max-h-none sm:w-[440px] sm:max-w-[calc(100vw-2rem)]";
49
- function A(e) {
52
+ var D = "fixed z-50 flex flex-col overflow-hidden border border-border-default bg-bg-surface shadow-2xl inset-x-0 bottom-[var(--assistant-sheet-bottom,0px)] top-auto rounded-t-2xl animate-in slide-in-from-bottom-4 fade-in duration-200", O = "h-[60vh] max-h-[60vh]", k = "h-[88vh] max-h-[88vh]", A = "sm:inset-auto sm:top-auto sm:bottom-24 sm:right-6 sm:rounded-2xl sm:h-[680px] sm:max-h-[calc(100vh-6rem-var(--assistant-overlay-top,56px)-0.5rem)] sm:w-[520px] sm:max-w-[calc(100vw-2rem)]", j = "sm:left-auto sm:right-0 sm:top-[var(--assistant-overlay-top)] sm:bottom-0 sm:rounded-none sm:h-auto sm:max-h-none sm:w-[440px] sm:max-w-[calc(100vw-2rem)]";
53
+ function M(e) {
50
54
  return [
51
- T,
52
- e.expanded ? D : E,
53
- e.docked ? k : O
55
+ D,
56
+ e.expanded ? k : O,
57
+ e.docked ? j : A
54
58
  ].join(" ");
55
59
  }
56
- function j(t) {
60
+ function N(t) {
57
61
  return (n, r) => {
58
62
  if (t.isShellLessTarget?.(n)) return t.openInNewTab(n), { kind: "new-tab" };
59
63
  let i = e(r);
@@ -64,22 +68,22 @@ function j(t) {
64
68
  } : (t.navigate(n), t.isDesktop() || t.collapseSheet(), { kind: "routed" });
65
69
  };
66
70
  }
67
- function M(e) {
71
+ function P(e) {
68
72
  if (typeof CustomEvent > "u" || !(e instanceof CustomEvent)) return "generic";
69
73
  let t = e.detail;
70
74
  return typeof t != "object" || !t || !("kind" in t) ? "generic" : t.kind === "sandbox" || t.kind === "ai-credits" ? t.kind : "generic";
71
75
  }
72
- function N(e, t) {
76
+ function F(e, t) {
73
77
  try {
74
78
  return e()?.getItem(t) === "1";
75
79
  } catch {
76
80
  return !1;
77
81
  }
78
82
  }
79
- function P(e, t, n) {
83
+ function I(e, t, n) {
80
84
  try {
81
85
  e()?.setItem(t, n ? "1" : "0");
82
86
  } catch {}
83
87
  }
84
88
  //#endregion
85
- export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR, k as ASSISTANT_DOCKED_DESKTOP_CLASS, m as ASSISTANT_DOCK_WIDTH_PX, h as ASSISTANT_DOCK_WIDTH_VAR, O as ASSISTANT_FLOATING_DESKTOP_CLASS, S as ASSISTANT_FLOATING_RIGHT_PX, x as ASSISTANT_FLOATING_WIDTH_PX, f as ASSISTANT_LAUNCHER_LIFT_VAR, v as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, y as ASSISTANT_OVERLAY_DESKTOP_QUERY, _ as ASSISTANT_OVERLAY_TOP_VAR, C as ASSISTANT_PANEL_INSET_VAR, T as ASSISTANT_SHEET_BASE_CLASS, g as ASSISTANT_SHEET_BOTTOM_VAR, E as ASSISTANT_SHEET_COMPACT_CLASS, D as ASSISTANT_SHEET_EXPANDED_CLASS, i as ASSISTANT_TOGGLE_SHORTCUT_LABEL, d as aboveAssistantBottomChrome, p as assistantLauncherBottom, A as assistantOverlayClassName, l as assistantOverlayEscapeAction, t as assistantOverlayKeys, M as assistantQuotaKindOf, s as closestAround, j as createAssistantNavigate, a as isAssistantToggleShortcut, r as nextAssistantOpenState, b as publishedAssistantDockWidth, w as publishedAssistantPanelInset, N as readAssistantOverlayFlag, n as requestedAssistantOpenState, P as writeAssistantOverlayFlag };
89
+ export { u as ASSISTANT_BOTTOM_CHROME_CLEARANCE, o as ASSISTANT_DIALOG_SELECTOR, j as ASSISTANT_DOCKED_DESKTOP_CLASS, g as ASSISTANT_DOCK_WIDTH_PX, _ as ASSISTANT_DOCK_WIDTH_VAR, A as ASSISTANT_FLOATING_DESKTOP_CLASS, w as ASSISTANT_FLOATING_RIGHT_PX, C as ASSISTANT_FLOATING_WIDTH_PX, f as ASSISTANT_LAUNCHER_LIFT_VAR, m as ASSISTANT_LAUNCHER_RIGHT_INSET, b as ASSISTANT_OVERLAY_DEFAULT_TOP_PX, x as ASSISTANT_OVERLAY_DESKTOP_QUERY, y as ASSISTANT_OVERLAY_TOP_VAR, T as ASSISTANT_PANEL_INSET_VAR, D as ASSISTANT_SHEET_BASE_CLASS, v as ASSISTANT_SHEET_BOTTOM_VAR, O as ASSISTANT_SHEET_COMPACT_CLASS, k as ASSISTANT_SHEET_EXPANDED_CLASS, i as ASSISTANT_TOGGLE_SHORTCUT_LABEL, d as aboveAssistantBottomChrome, p as assistantLauncherBottom, h as assistantLauncherRight, M as assistantOverlayClassName, l as assistantOverlayEscapeAction, t as assistantOverlayKeys, P as assistantQuotaKindOf, s as closestAround, N as createAssistantNavigate, a as isAssistantToggleShortcut, r as nextAssistantOpenState, S as publishedAssistantDockWidth, E as publishedAssistantPanelInset, F as readAssistantOverlayFlag, n as requestedAssistantOpenState, I as writeAssistantOverlayFlag };
@@ -28,7 +28,7 @@ var f = " self-stretch justify-end pb-8.5 [container-type:size] [@container_(min
28
28
  rotating: v
29
29
  })]
30
30
  }), p === "mic-error" ? /* @__PURE__ */ u("p", {
31
- className: "line-clamp-2 text-xs text-status-warning",
31
+ className: "break-words text-xs text-status-warning",
32
32
  role: "alert",
33
33
  "data-testid": "assistant-voice-mini-error",
34
34
  children: b
@@ -88,4 +88,18 @@ export interface AssistantWidgetProps {
88
88
  }
89
89
  /** External toggle hook so command palettes / plugins can open the widget. */
90
90
  export declare const ASSISTANT_WIDGET_TOGGLE_EVENT = "bf:toggle-assistant-widget";
91
+ /**
92
+ * The legacy floating chat widget.
93
+ *
94
+ * @deprecated Mount the shared assistant instead: `AssistantProductProvider`
95
+ * (from `@burdenoff/fe-libs/shared/assistant/product`) around
96
+ * `AssistantOverlayProvider` + `AssistantOverlay` (from
97
+ * `@burdenoff/fe-libs/shared/assistant/ui/AssistantOverlay`), keyed by the
98
+ * active organization. That panel brings history, attachments, voice, the
99
+ * confirm-before-write flow and the product seam; this widget has none of them
100
+ * and takes a product-supplied transport instead. FluidGrids
101
+ * (`FluidGridsAssistant.tsx`) and VibeControls (`AIAssistantOverlay.tsx`) are
102
+ * the reference hosts. Kept, not removed, while the product shells that still
103
+ * render it move over.
104
+ */
91
105
  export declare const AssistantWidget: FC<AssistantWidgetProps>;