@burdenoff/fe-libs 2026.730.1 → 2026.731.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.
@@ -75,6 +75,16 @@ export interface AssistantWidgetProps {
75
75
  * BigConsole assistant understands.
76
76
  */
77
77
  attachmentAccept?: string;
78
+ /**
79
+ * Show a "Connect a source" button in the composer that navigates to the
80
+ * platform's Connected Systems page (via `onNavigate`), so users can create a
81
+ * vault-backed connection (REST/API-key/basic-auth) instead of pasting secrets
82
+ * into the chat. Off by default → other product shells are unchanged. Requires
83
+ * `onNavigate` to actually route.
84
+ */
85
+ enableConnectSource?: boolean;
86
+ /** In-app route the "Connect a source" button navigates to. */
87
+ connectSourceHref?: string;
78
88
  }
79
89
  /** External toggle hook so command palettes / plugins can open the widget. */
80
90
  export declare const ASSISTANT_WIDGET_TOGGLE_EVENT = "bf:toggle-assistant-widget";
@@ -1 +1 @@
1
- {"version":3,"file":"AssistantWidget.d.ts","sourceRoot":"","sources":["../../../../src/shared/components/assistantWidget/AssistantWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAoBf,OAAO,KAAK,EAGV,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AA0D1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA22BpD,CAAC"}
1
+ {"version":3,"file":"AssistantWidget.d.ts","sourceRoot":"","sources":["../../../../src/shared/components/assistantWidget/AssistantWidget.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAML,KAAK,EAAE,EAER,MAAM,OAAO,CAAC;AAqBf,OAAO,KAAK,EAGV,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAEjB;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,qCAAqC;IACrC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,iFAAiF;IACjF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,8EAA8E;AAC9E,eAAO,MAAM,6BAA6B,+BAA+B,CAAC;AA0D1E,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAy3BpD,CAAC"}
@@ -2,11 +2,11 @@ import { cn as e } from "../../utils/cn.js";
2
2
  import { useVoiceInput as t } from "./useVoiceInput.js";
3
3
  import { MessageContent as n } from "./MessageContent.js";
4
4
  import { useCallback as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
5
- import { Download as ee, FileArchive as te, History as ne, Loader2 as c, MessageCircle as re, Mic as ie, PanelLeftClose as ae, PanelLeftOpen as oe, Paperclip as se, Plus as ce, Send as le, Sparkles as ue, Trash2 as de, X as l } from "lucide-react";
6
- import { Fragment as fe, jsx as u, jsxs as d } from "react/jsx-runtime";
5
+ import { Download as ee, FileArchive as te, History as ne, Link2 as re, Loader2 as c, MessageCircle as ie, Mic as ae, PanelLeftClose as oe, PanelLeftOpen as se, Paperclip as ce, Plus as le, Send as ue, Sparkles as de, Trash2 as fe, X as l } from "lucide-react";
6
+ import { Fragment as pe, jsx as u, jsxs as d } from "react/jsx-runtime";
7
7
  //#region src/shared/components/assistantWidget/AssistantWidget.tsx
8
8
  var f = "bf:toggle-assistant-widget", p = "bf:assistant-widget:isOpen", m = "bf:assistant-widget:railOpen";
9
- function pe() {
9
+ function me() {
10
10
  if (typeof window > "u") return !0;
11
11
  try {
12
12
  return window.sessionStorage.getItem(m) !== "0";
@@ -14,12 +14,12 @@ function pe() {
14
14
  return !0;
15
15
  }
16
16
  }
17
- function me(e) {
17
+ function he(e) {
18
18
  if (!(typeof window > "u")) try {
19
19
  window.sessionStorage.setItem(m, e ? "1" : "0");
20
20
  } catch {}
21
21
  }
22
- function he() {
22
+ function ge() {
23
23
  if (typeof window > "u") return !1;
24
24
  try {
25
25
  return window.sessionStorage.getItem(p) === "1";
@@ -32,10 +32,10 @@ function h(e) {
32
32
  window.sessionStorage.setItem(p, e ? "1" : "0");
33
33
  } catch {}
34
34
  }
35
- function ge() {
35
+ function _e() {
36
36
  return `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`;
37
37
  }
38
- function _e(e) {
38
+ function ve(e) {
39
39
  if (!Number.isFinite(e) || e <= 0) return "";
40
40
  let t = [
41
41
  "B",
@@ -46,7 +46,7 @@ function _e(e) {
46
46
  for (; n >= 1024 && r < t.length - 1;) n /= 1024, r += 1;
47
47
  return `${n >= 10 || r === 0 ? Math.round(n) : n.toFixed(1)} ${t[r]}`;
48
48
  }
49
- var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant", subtitle: _ = "Ask me to do things on this screen — I can run them for you.", placeholder: v = "Ask anything, or describe what to create…", launcherClassName: ye, voiceLang: be = "en-US", layout: xe = "floating", showSessionPanel: Se = !1, onNavigate: Ce, topOffsetPx: we = 0, enableAttachments: y = !1, attachmentAccept: Te = ".json,.csv,.xlsx,.xls,.pdf,application/json,text/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf" }) => {
49
+ var ye = ({ transport: p, modes: m, defaultModeId: ye, title: g = "AI Assistant", subtitle: _ = "Ask me to do things on this screen — I can run them for you.", placeholder: v = "Ask anything, or describe what to create…", launcherClassName: be, voiceLang: xe = "en-US", layout: Se = "floating", showSessionPanel: Ce = !1, onNavigate: we, topOffsetPx: Te = 0, enableAttachments: y = !1, attachmentAccept: Ee = ".json,.csv,.xlsx,.xls,.pdf,application/json,text/csv,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/pdf", enableConnectSource: De = !1, connectSourceHref: Oe = "/integrations/connections" }) => {
50
50
  let b = a(() => m && m.length > 0 ? m : [{
51
51
  id: "__default__",
52
52
  label: g,
@@ -60,20 +60,20 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
60
60
  g,
61
61
  _,
62
62
  v
63
- ]), [x, Ee] = s(() => ve ?? b[0]?.id ?? "__default__"), S = b.find((e) => e.id === x) ?? b[0], C = S.transport, De = S.title ?? g, Oe = S.subtitle ?? _, ke = S.placeholder ?? v;
63
+ ]), [x, ke] = s(() => ye ?? b[0]?.id ?? "__default__"), S = b.find((e) => e.id === x) ?? b[0], C = S.transport, Ae = S.title ?? g, je = S.subtitle ?? _, Me = S.placeholder ?? v;
64
64
  i(() => {
65
- b.some((e) => e.id === x) || Ee(b[0]?.id ?? "__default__");
65
+ b.some((e) => e.id === x) || ke(b[0]?.id ?? "__default__");
66
66
  }, [b, x]);
67
67
  let w = !!C;
68
68
  i(() => {
69
69
  w || console.error("[AssistantWidget] No transport available — supply `transport`, or a non-empty `modes` where each entry has a transport.");
70
70
  }, [w]);
71
- let [T, E] = s(() => he()), [D, O] = s([]), [k, A] = s(""), [j, M] = s([]), [N, P] = s(!1), [Ae, F] = s(!1), [I, L] = s([]), [R, z] = s(!1), [je, Me] = s(!1), [Ne, Pe] = s(() => pe()), [Fe, B] = s([]), [V, Ie] = s(null), H = o(null), U = o(null), W = o(null), G = o(!1), Le = o(null), K = xe === "sidebar", Re = Se && !!C?.newSession, ze = r(() => {
72
- Pe((e) => {
71
+ let [T, E] = s(() => ge()), [D, O] = s([]), [k, A] = s(""), [j, M] = s([]), [N, P] = s(!1), [Ne, F] = s(!1), [I, L] = s([]), [R, z] = s(!1), [Pe, Fe] = s(!1), [Ie, Le] = s(() => me()), [Re, B] = s([]), [V, ze] = s(null), H = o(null), U = o(null), W = o(null), G = o(!1), Be = o(null), K = Se === "sidebar", Ve = Ce && !!C?.newSession, He = r(() => {
72
+ Le((e) => {
73
73
  let t = !e;
74
- return me(t), t;
74
+ return he(t), t;
75
75
  });
76
- }, []), q = t(be), Be = r(() => {
76
+ }, []), q = t(xe), Ue = r(() => {
77
77
  h(!0), E(!0), C.prewarm?.("full");
78
78
  }, [C]), J = r(() => {
79
79
  h(!1), E(!1), C.suspend?.();
@@ -86,11 +86,11 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
86
86
  i(() => {
87
87
  let e = (e) => {
88
88
  let t = e.detail;
89
- t?.open === !0 ? Be() : t?.open === !1 ? J() : Y();
89
+ t?.open === !0 ? Ue() : t?.open === !1 ? J() : Y();
90
90
  };
91
91
  return window.addEventListener(f, e), () => window.removeEventListener(f, e);
92
92
  }, [
93
- Be,
93
+ Ue,
94
94
  J,
95
95
  Y
96
96
  ]), i(() => {
@@ -102,9 +102,9 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
102
102
  } catch {
103
103
  B([]);
104
104
  }
105
- }, [C]), Ve = o(x);
105
+ }, [C]), We = o(x);
106
106
  i(() => {
107
- Ve.current !== x && (Ve.current = x, W.current?.abort(), W.current = null, P(!1), O([]), A(""), L([]), z(!1), F(!1), B([]), G.current = !1);
107
+ We.current !== x && (We.current = x, W.current?.abort(), W.current = null, P(!1), O([]), A(""), L([]), z(!1), F(!1), B([]), G.current = !1);
108
108
  }, [x]), i(() => {
109
109
  if (!T || G.current) return;
110
110
  let e = C.loadHistory;
@@ -138,27 +138,27 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
138
138
  } : n));
139
139
  }, []), Q = r(async () => {
140
140
  if (C.listSessions) {
141
- Me(!0);
141
+ Fe(!0);
142
142
  try {
143
143
  L(await C.listSessions());
144
144
  } catch {
145
145
  L([]);
146
146
  } finally {
147
- Me(!1);
147
+ Fe(!1);
148
148
  }
149
149
  }
150
- }, [C]), He = r(async (e) => {
150
+ }, [C]), Ge = r(async (e) => {
151
151
  if (!(!C.downloadArtifact || V)) {
152
- Ie(e.path);
152
+ ze(e.path);
153
153
  try {
154
154
  await C.downloadArtifact(e);
155
155
  } catch {} finally {
156
- Ie(null);
156
+ ze(null);
157
157
  }
158
158
  }
159
- }, [C, V]), Ue = r(async () => {
159
+ }, [C, V]), Ke = r(async () => {
160
160
  !C.newSession || N || (O([]), A(""), z(!1), B([]), await C.newSession());
161
- }, [C, N]), We = r(async (e, t) => {
161
+ }, [C, N]), qe = r(async (e, t) => {
162
162
  if (!(!C.deleteSession || N)) {
163
163
  L((t) => t.filter((t) => t.id !== e)), t && (O([]), A(""));
164
164
  try {
@@ -171,9 +171,9 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
171
171
  C,
172
172
  N,
173
173
  Q
174
- ]), Ge = r(() => {
174
+ ]), Je = r(() => {
175
175
  z((e) => (e || Q(), !e));
176
- }, [Q]), Ke = r(async (e) => {
176
+ }, [Q]), Ye = r(async (e) => {
177
177
  if (!(!C.selectSession || N)) {
178
178
  F(!0);
179
179
  try {
@@ -192,10 +192,10 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
192
192
  if (!e && t.length === 0 || N) return;
193
193
  q.isListening && q.stop(), q.reset(), A(""), M([]), H.current && (H.current.style.height = "auto");
194
194
  let n = t.length > 0 ? `📎 ${t.map((e) => e.name).join(", ")}` : "", r = {
195
- id: ge(),
195
+ id: _e(),
196
196
  role: "user",
197
197
  content: [e, n].filter(Boolean).join("\n")
198
- }, i = ge();
198
+ }, i = _e();
199
199
  O((e) => [
200
200
  ...e,
201
201
  r,
@@ -238,14 +238,14 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
238
238
  R,
239
239
  Q,
240
240
  X
241
- ]), qe = r((e) => {
241
+ ]), Xe = r((e) => {
242
242
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), $());
243
- }, [$]), Je = r(() => {
243
+ }, [$]), Ze = r(() => {
244
244
  let e = H.current;
245
245
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 120)}px`);
246
- }, []), Ye = r(() => {
246
+ }, []), Qe = r(() => {
247
247
  q.isListening ? q.stop() : q.start();
248
- }, [q]), Xe = a(() => /* @__PURE__ */ u("button", {
248
+ }, [q]), $e = a(() => /* @__PURE__ */ u("button", {
249
249
  type: "button",
250
250
  onClick: Y,
251
251
  onMouseEnter: () => !T && C.prewarm?.("probe"),
@@ -253,49 +253,49 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
253
253
  "aria-label": T ? "Close AI assistant" : "Open AI assistant",
254
254
  "aria-expanded": T,
255
255
  "data-testid": "assistant-widget-launcher",
256
- className: e("fixed bottom-6 right-6 z-[100] inline-flex size-14 items-center justify-center rounded-full", "bg-action-primary-bg text-action-primary-text shadow-xl transition-transform duration-200", "hover:scale-105 hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer", ye),
257
- children: u(T ? l : ue, { className: "size-6" })
256
+ className: e("fixed bottom-6 right-6 z-[100] inline-flex size-14 items-center justify-center rounded-full", "bg-action-primary-bg text-action-primary-text shadow-xl transition-transform duration-200", "hover:scale-105 hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer", be),
257
+ children: u(T ? l : de, { className: "size-6" })
258
258
  }), [
259
259
  T,
260
260
  Y,
261
- ye,
261
+ be,
262
262
  C
263
263
  ]);
264
- return w ? /* @__PURE__ */ d(fe, { children: [Xe, T ? /* @__PURE__ */ d("div", {
264
+ return w ? /* @__PURE__ */ d(pe, { children: [$e, T ? /* @__PURE__ */ d("div", {
265
265
  role: "dialog",
266
- "aria-label": De,
266
+ "aria-label": Ae,
267
267
  "data-testid": "assistant-widget-window",
268
- "data-layout": xe,
268
+ "data-layout": Se,
269
269
  style: K ? {
270
- top: we,
271
- height: `calc(100vh - ${String(we)}px)`
270
+ top: Te,
271
+ height: `calc(100vh - ${String(Te)}px)`
272
272
  } : void 0,
273
273
  className: e("fixed z-[100] flex overflow-hidden border-border-default bg-bg-surface shadow-2xl", K ? "bottom-0 right-0 w-full border-l sm:w-[480px] lg:w-[560px] animate-in slide-in-from-right duration-200" : "flex-col rounded-xl border bottom-24 right-6 h-[560px] max-h-[calc(100vh-7rem)] w-[calc(100vw-3rem)] sm:w-[400px] animate-in slide-in-from-bottom-2 fade-in duration-200"),
274
- children: [K && Re && Ne ? /* @__PURE__ */ d("aside", {
274
+ children: [K && Ve && Ie ? /* @__PURE__ */ d("aside", {
275
275
  "data-testid": "assistant-session-panel",
276
276
  className: "flex w-[168px] shrink-0 flex-col gap-1 border-r border-border-subtle bg-bg-sunken p-2",
277
277
  children: [
278
278
  /* @__PURE__ */ d("button", {
279
279
  type: "button",
280
- onClick: ze,
280
+ onClick: He,
281
281
  "aria-label": "Hide chats",
282
282
  "aria-expanded": !0,
283
283
  title: "Hide chats",
284
284
  "data-testid": "assistant-rail-toggle",
285
285
  className: "mb-1 flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-surface hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
286
- children: [/* @__PURE__ */ u(ae, { className: "size-4 shrink-0" }), "Hide chats"]
286
+ children: [/* @__PURE__ */ u(oe, { className: "size-4 shrink-0" }), "Hide chats"]
287
287
  }),
288
288
  /* @__PURE__ */ d("button", {
289
289
  type: "button",
290
- onClick: () => void Ue(),
290
+ onClick: () => void Ke(),
291
291
  disabled: N,
292
292
  "data-testid": "assistant-new-chat",
293
293
  className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface disabled:opacity-50 cursor-pointer",
294
- children: [/* @__PURE__ */ u(ce, { className: "size-4 shrink-0" }), "New chat"]
294
+ children: [/* @__PURE__ */ u(le, { className: "size-4 shrink-0" }), "New chat"]
295
295
  }),
296
296
  /* @__PURE__ */ d("button", {
297
297
  type: "button",
298
- onClick: Ge,
298
+ onClick: Je,
299
299
  "aria-expanded": R,
300
300
  "data-testid": "assistant-history-toggle",
301
301
  className: "flex items-center gap-2 rounded-md px-2 py-2 text-xs font-medium text-text-primary transition-colors hover:bg-bg-surface cursor-pointer",
@@ -304,7 +304,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
304
304
  R ? /* @__PURE__ */ u("div", {
305
305
  "data-testid": "assistant-history-list",
306
306
  className: "mt-1 flex-1 space-y-0.5 overflow-y-auto border-t border-border-subtle pt-2",
307
- children: je && I.length === 0 ? /* @__PURE__ */ d("p", {
307
+ children: Pe && I.length === 0 ? /* @__PURE__ */ d("p", {
308
308
  className: "flex items-center gap-1.5 px-2 py-1 text-[11px] text-text-muted",
309
309
  children: [/* @__PURE__ */ u(c, { className: "size-3 animate-spin" }), "Loading…"]
310
310
  }) : I.length === 0 ? /* @__PURE__ */ u("p", {
@@ -315,20 +315,20 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
315
315
  className: e("group flex items-center gap-1 rounded pr-1 transition-colors", t.active ? "bg-bg-surface" : "hover:bg-bg-surface"),
316
316
  children: [/* @__PURE__ */ u("button", {
317
317
  type: "button",
318
- onClick: () => void Ke(t.id),
318
+ onClick: () => void Ye(t.id),
319
319
  title: t.title,
320
320
  "data-testid": "assistant-history-item",
321
321
  className: e("min-w-0 flex-1 truncate rounded px-2 py-1.5 text-left text-[11px] leading-relaxed cursor-pointer", t.active ? "font-medium text-text-primary" : "text-text-secondary group-hover:text-text-primary"),
322
322
  children: t.title
323
323
  }), C.deleteSession ? /* @__PURE__ */ u("button", {
324
324
  type: "button",
325
- onClick: () => void We(t.id, !!t.active),
325
+ onClick: () => void qe(t.id, !!t.active),
326
326
  disabled: N,
327
327
  "aria-label": `Delete chat: ${t.title}`,
328
328
  title: "Delete this chat",
329
329
  "data-testid": "assistant-delete-chat",
330
330
  className: "inline-flex size-6 shrink-0 items-center justify-center rounded text-text-muted opacity-0 transition-opacity hover:text-status-error-bg focus-visible:opacity-100 group-hover:opacity-100 disabled:opacity-30 cursor-pointer",
331
- children: /* @__PURE__ */ u(de, { className: "size-3.5" })
331
+ children: /* @__PURE__ */ u(fe, { className: "size-3.5" })
332
332
  }) : null]
333
333
  }, t.id))
334
334
  }) : null
@@ -340,21 +340,21 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
340
340
  className: "flex shrink-0 items-center justify-between gap-2 border-b border-border-subtle bg-bg-surface px-4 py-3",
341
341
  children: [/* @__PURE__ */ d("div", {
342
342
  className: "flex min-w-0 items-center gap-2",
343
- children: [K && Re && !Ne ? /* @__PURE__ */ d("button", {
343
+ children: [K && Ve && !Ie ? /* @__PURE__ */ d("button", {
344
344
  type: "button",
345
- onClick: ze,
345
+ onClick: He,
346
346
  "aria-label": "Show chats",
347
347
  "aria-expanded": !1,
348
348
  title: "Show chats",
349
349
  "data-testid": "assistant-rail-toggle",
350
350
  className: "inline-flex shrink-0 items-center gap-1.5 rounded-md border border-border-subtle px-2 py-1.5 text-xs font-medium text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
351
- children: [/* @__PURE__ */ u(oe, { className: "size-4" }), "Chats"]
351
+ children: [/* @__PURE__ */ u(se, { className: "size-4" }), "Chats"]
352
352
  }) : /* @__PURE__ */ u("span", {
353
353
  className: "inline-flex size-7 shrink-0 items-center justify-center rounded-full bg-action-primary-bg/10 text-action-primary-bg",
354
- children: /* @__PURE__ */ u(ue, { className: "size-4" })
354
+ children: /* @__PURE__ */ u(de, { className: "size-4" })
355
355
  }), /* @__PURE__ */ u("h2", {
356
356
  className: "truncate text-sm font-semibold text-text-primary",
357
- children: De
357
+ children: Ae
358
358
  })]
359
359
  }), /* @__PURE__ */ u("button", {
360
360
  type: "button",
@@ -377,7 +377,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
377
377
  role: "tab",
378
378
  "aria-selected": n,
379
379
  tabIndex: n ? 0 : -1,
380
- onClick: () => Ee(t.id),
380
+ onClick: () => ke(t.id),
381
381
  disabled: N,
382
382
  title: N ? "Finish the current turn before switching" : t.label,
383
383
  "data-testid": `assistant-mode-${t.id}`,
@@ -390,7 +390,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
390
390
  ref: U,
391
391
  className: "min-h-0 flex-1 space-y-3 overflow-y-auto px-4 py-4",
392
392
  "data-testid": "assistant-widget-messages",
393
- children: D.length === 0 && Ae ? /* @__PURE__ */ d("div", {
393
+ children: D.length === 0 && Ne ? /* @__PURE__ */ d("div", {
394
394
  "data-testid": "assistant-widget-restoring",
395
395
  className: "flex h-full flex-col items-center justify-center gap-3 text-center",
396
396
  children: [/* @__PURE__ */ u(c, { className: "size-5 animate-spin text-text-secondary" }), /* @__PURE__ */ u("p", {
@@ -401,10 +401,10 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
401
401
  className: "flex h-full flex-col items-center justify-center gap-3 text-center",
402
402
  children: [/* @__PURE__ */ u("span", {
403
403
  className: "inline-flex size-12 items-center justify-center rounded-full bg-bg-sunken text-action-primary-bg",
404
- children: /* @__PURE__ */ u(re, { className: "size-6" })
404
+ children: /* @__PURE__ */ u(ie, { className: "size-6" })
405
405
  }), /* @__PURE__ */ u("p", {
406
406
  className: "max-w-[16rem] text-xs leading-relaxed text-text-secondary",
407
- children: Oe
407
+ children: je
408
408
  })]
409
409
  }) : D.map((t) => /* @__PURE__ */ u("div", {
410
410
  className: e("flex", t.role === "user" ? "justify-end" : "justify-start"),
@@ -413,7 +413,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
413
413
  className: e("whitespace-pre-wrap break-words rounded-lg px-3 py-2 text-xs leading-relaxed", K ? "max-w-[92%]" : "max-w-[85%]", t.role === "user" ? "bg-action-primary-bg text-action-primary-text" : t.error ? "bg-status-error-bg/10 text-status-error-bg" : "bg-bg-sunken text-text-primary"),
414
414
  children: [t.content ? /* @__PURE__ */ u(n, {
415
415
  content: t.content,
416
- onNavigate: Ce
416
+ onNavigate: we
417
417
  }) : null, t.pending ? /* @__PURE__ */ d("span", {
418
418
  "data-testid": "assistant-widget-working",
419
419
  className: e("inline-flex items-center gap-1 text-text-secondary", t.content ? "mt-1" : ""),
@@ -422,16 +422,16 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
422
422
  })
423
423
  }, t.id))
424
424
  }),
425
- C.downloadArtifact && Fe.length > 0 ? /* @__PURE__ */ u("div", {
425
+ C.downloadArtifact && Re.length > 0 ? /* @__PURE__ */ u("div", {
426
426
  "data-testid": "assistant-widget-artifacts",
427
427
  className: "flex shrink-0 flex-wrap gap-1.5 border-t border-border-subtle bg-bg-sunken px-3 py-2",
428
- children: Fe.map((e) => {
428
+ children: Re.map((e) => {
429
429
  let t = V === e.path;
430
430
  return /* @__PURE__ */ d("button", {
431
431
  type: "button",
432
- onClick: () => void He(e),
432
+ onClick: () => void Ge(e),
433
433
  disabled: !!V,
434
- title: `Download ${e.name}${e.size ? ` (${_e(e.size)})` : ""}`,
434
+ title: `Download ${e.name}${e.size ? ` (${ve(e.size)})` : ""}`,
435
435
  "data-testid": "assistant-widget-artifact",
436
436
  className: "inline-flex max-w-full items-center gap-1.5 rounded-md border border-border-default bg-bg-surface px-2 py-1 text-[11px] font-medium text-text-primary transition-colors hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
437
437
  children: [t ? /* @__PURE__ */ u(c, { className: "size-3.5 shrink-0 animate-spin" }) : e.type === "directory" ? /* @__PURE__ */ u(te, { className: "size-3.5 shrink-0 text-action-primary-bg" }) : /* @__PURE__ */ u(ee, { className: "size-3.5 shrink-0 text-action-primary-bg" }), /* @__PURE__ */ u("span", {
@@ -447,7 +447,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
447
447
  "data-testid": "assistant-widget-attachment",
448
448
  className: "flex items-center gap-1 rounded-md bg-bg-sunken px-2 py-1 text-[11px] text-text-secondary",
449
449
  children: [
450
- /* @__PURE__ */ u(se, { className: "size-3" }),
450
+ /* @__PURE__ */ u(ce, { className: "size-3" }),
451
451
  /* @__PURE__ */ u("span", {
452
452
  className: "max-w-[140px] truncate",
453
453
  children: e.name
@@ -465,10 +465,10 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
465
465
  /* @__PURE__ */ d("div", {
466
466
  className: e("flex shrink-0 items-end gap-2 bg-bg-surface px-3 py-2.5", y && j.length > 0 ? "" : "border-t border-border-default"),
467
467
  children: [
468
- y ? /* @__PURE__ */ d(fe, { children: [/* @__PURE__ */ u("input", {
469
- ref: Le,
468
+ y ? /* @__PURE__ */ d(pe, { children: [/* @__PURE__ */ u("input", {
469
+ ref: Be,
470
470
  type: "file",
471
- accept: Te,
471
+ accept: Ee,
472
472
  multiple: !0,
473
473
  className: "hidden",
474
474
  onChange: (e) => {
@@ -477,29 +477,38 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
477
477
  }
478
478
  }), /* @__PURE__ */ u("button", {
479
479
  type: "button",
480
- onClick: () => Le.current?.click(),
480
+ onClick: () => Be.current?.click(),
481
481
  "aria-label": "Attach a data file",
482
482
  "data-testid": "assistant-widget-upload",
483
483
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary transition-colors hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
484
- children: /* @__PURE__ */ u(se, { className: "size-4" })
484
+ children: /* @__PURE__ */ u(ce, { className: "size-4" })
485
485
  })] }) : null,
486
+ De ? /* @__PURE__ */ u("button", {
487
+ type: "button",
488
+ onClick: () => we?.(Oe),
489
+ "aria-label": "Connect a data source",
490
+ title: "Connect a source (REST API / connection)",
491
+ "data-testid": "assistant-widget-connect-source",
492
+ className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-bg-sunken text-text-secondary transition-colors hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer",
493
+ children: /* @__PURE__ */ u(re, { className: "size-4" })
494
+ }) : null,
486
495
  q.isSupported ? /* @__PURE__ */ u("button", {
487
496
  type: "button",
488
- onClick: Ye,
497
+ onClick: Qe,
489
498
  "aria-label": q.isListening ? "Stop voice input" : "Start voice input",
490
499
  "aria-pressed": q.isListening,
491
500
  "data-testid": "assistant-widget-mic",
492
501
  className: e("flex size-9 shrink-0 items-center justify-center rounded-lg transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong cursor-pointer", q.isListening ? "animate-pulse bg-status-error-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
493
- children: /* @__PURE__ */ u(ie, { className: "size-4" })
502
+ children: /* @__PURE__ */ u(ae, { className: "size-4" })
494
503
  }) : null,
495
504
  /* @__PURE__ */ u("textarea", {
496
505
  ref: H,
497
506
  value: k,
498
507
  onChange: (e) => A(e.target.value),
499
- onKeyDown: qe,
500
- onInput: Je,
508
+ onKeyDown: Xe,
509
+ onInput: Ze,
501
510
  rows: 1,
502
- placeholder: ke,
511
+ placeholder: Me,
503
512
  "aria-label": "Message the assistant",
504
513
  "data-testid": "assistant-widget-input",
505
514
  className: "flex-1 resize-none rounded-lg border border-border-default bg-bg-sunken px-3 py-2 text-xs leading-relaxed text-text-primary placeholder:text-text-muted focus:border-action-primary-bg focus:outline-none"
@@ -511,7 +520,7 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
511
520
  "aria-label": "Send message",
512
521
  "data-testid": "assistant-widget-send",
513
522
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg text-action-primary-text transition-colors hover:bg-action-primary-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong disabled:opacity-50 cursor-pointer",
514
- children: N ? /* @__PURE__ */ u(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(le, { className: "size-4" })
523
+ children: N ? /* @__PURE__ */ u(c, { className: "size-4 animate-spin" }) : /* @__PURE__ */ u(ue, { className: "size-4" })
515
524
  })
516
525
  ]
517
526
  })
@@ -520,4 +529,4 @@ var ve = ({ transport: p, modes: m, defaultModeId: ve, title: g = "AI Assistant"
520
529
  }) : null] }) : null;
521
530
  };
522
531
  //#endregion
523
- export { f as ASSISTANT_WIDGET_TOGGLE_EVENT, ve as AssistantWidget };
532
+ export { f as ASSISTANT_WIDGET_TOGGLE_EVENT, ye as AssistantWidget };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.730.1",
3
+ "version": "2026.731.2",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "bin": {
@@ -275,13 +275,13 @@
275
275
  ],
276
276
  "scripts": {
277
277
  "dev": "vite",
278
- "build": "tsc && MFE_DTS=1 vite build",
278
+ "build": "tsc && MFE_DTS=1 bash scripts/build-limits.sh --gate vite build",
279
279
  "lint": "eslint .",
280
280
  "lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",
281
281
  "format": "prettier --config shared/config/prettier.config.mjs --write \"src/**/*.{ts,tsx}\" \"!src/config/*.config.ts\"",
282
- "type:check": "tsc --noEmit",
282
+ "type:check": "bash scripts/build-limits.sh tsc --noEmit",
283
283
  "test": "bun test scripts/graphql-schema-drift/__tests__",
284
- "sanity": "bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build",
284
+ "sanity": "bash scripts/build-limits.sh --gate bash -c 'bun run lint:sanity && bun run format && bun run type:check && bun run test && bun run build'",
285
285
  "switch:status": "bun scripts/deps-mode.ts status",
286
286
  "switch:remote": "bun scripts/deps-mode.ts remote",
287
287
  "switch:local": "bun scripts/deps-mode.ts local",