@burdenoff/fe-libs 2026.1114.13 → 2026.1114.15

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.
Files changed (37) hide show
  1. package/dist/shared/assistant/conversation.d.ts +16 -0
  2. package/dist/shared/assistant/i18nManifest.d.ts +30 -0
  3. package/dist/shared/assistant/i18nManifest.js +30 -0
  4. package/dist/shared/assistant/index.d.ts +6 -0
  5. package/dist/shared/assistant/store.d.ts +7 -0
  6. package/dist/shared/assistant/store.js +3 -0
  7. package/dist/shared/assistant/ui/AssistantChatArea.js +1269 -1188
  8. package/dist/shared/assistant/ui/AssistantMessageList.d.ts +14 -0
  9. package/dist/shared/assistant/ui/AssistantMessageList.js +55 -52
  10. package/dist/shared/assistant/ui/composer/AssistantComposer.js +348 -362
  11. package/dist/shared/assistant/ui/composer/AssistantDictation.d.ts +42 -0
  12. package/dist/shared/assistant/ui/composer/AssistantDictation.js +127 -0
  13. package/dist/shared/assistant/ui/composer/AssistantMicMenu.d.ts +23 -0
  14. package/dist/shared/assistant/ui/composer/AssistantMicMenu.js +176 -0
  15. package/dist/shared/assistant/ui/composer/microphones.d.ts +13 -0
  16. package/dist/shared/assistant/ui/composer/microphones.js +15 -0
  17. package/dist/shared/assistant/ui/composer/useCompactDictation.d.ts +70 -0
  18. package/dist/shared/assistant/ui/composer/useCompactDictation.js +136 -0
  19. package/dist/shared/assistant/ui/useVoiceSession.js +166 -164
  20. package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.d.ts +20 -17
  21. package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.js +230 -123
  22. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +2 -0
  23. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +227 -229
  24. package/dist/shared/assistant/ui/voice/LiveWaveform.d.ts +4 -3
  25. package/dist/shared/assistant/ui/voice/LiveWaveform.js +1 -1
  26. package/dist/shared/assistant/ui/voice/VoiceTurnMarks.d.ts +15 -0
  27. package/dist/shared/assistant/ui/voice/VoiceTurnMarks.js +43 -0
  28. package/dist/shared/assistant/ui/voice/formatClock.d.ts +2 -0
  29. package/dist/shared/assistant/ui/voice/formatClock.js +3 -0
  30. package/dist/shared/assistant/ui/voice/useLiveLevel.d.ts +3 -1
  31. package/dist/shared/assistant/ui/voice/useLiveLevel.js +23 -19
  32. package/dist/shared/assistant/voice/liveLevel.d.ts +4 -3
  33. package/dist/shared/assistant/voice/liveLevel.js +18 -15
  34. package/dist/shared/assistant/voice/useVoiceInput.d.ts +27 -1
  35. package/dist/shared/assistant/voice/useVoiceInput.js +141 -71
  36. package/dist/shared-assistant.js +383 -377
  37. package/package.json +1 -1
@@ -61,6 +61,20 @@ interface Props {
61
61
  onStopTurn?: () => void;
62
62
  /** The platform shell label for the Stop control (`assistantChrome.stopTurn`). */
63
63
  stopTurnLabel?: string;
64
+ /**
65
+ * ★ BOFF-13461 (page): what a message shows, and what is drawn under it. The
66
+ * page's voice chat uses it for the reply being spoken (its text in step with
67
+ * the audio), a reply cut off (the words that were spoken), the "Spoken" tags
68
+ * and "Voice chat ended". Absent, every message is drawn as it is.
69
+ */
70
+ decorate?: (message: Message, index: number, list: readonly Message[]) => MessageDecoration | undefined;
71
+ }
72
+ /** See `decorate`. */
73
+ export interface MessageDecoration {
74
+ /** Shown in place of the message's text. */
75
+ content?: string;
76
+ /** Drawn under the message. */
77
+ below?: ReactNode;
64
78
  }
65
79
  /** At most one auto-scroll per this long while a reply is streaming in live. */
66
80
  export declare const LIVE_SCROLL_GAP_MS = 250;
@@ -5,69 +5,72 @@ import { useLiveOverlay as r } from "../liveOverlay.js";
5
5
  import { approvalFollowUpReplyIds as i, approvedPendingWriteIds as a, goAheadSentReplyIds as o } from "../liveTurns.js";
6
6
  import { scrollToEndWithin as s } from "./scrollWithin.js";
7
7
  import { PAGE_SCROLL_GUTTER as c, useAssistantPageLayout as l } from "./assistantPageLayout.js";
8
- import { useEffect as u, useRef as d } from "react";
9
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
8
+ import { Fragment as u, useEffect as d, useRef as f } from "react";
9
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
10
10
  // src/shared/assistant/ui/AssistantMessageList.tsx
11
- var m = 250, h = ({ onApprovePendingWrite: m, approvingWriteRef: h = null, approvableMessageId: g = null, retryableMessageId: _ = null, messages: v, processing: y, streamingMessageId: b, failedMessageId: x, onRetry: S, renderWriteProposals: C, hidesLegacyWriteCard: w, renderUiOffers: T, onStopTurn: E, stopTurnLabel: D }) => {
12
- let O = n(), k = l(), A = (() => {
13
- for (let e = v.length - 1; e >= 0; --e) if (v[e].role === "assistant") return v[e].id;
11
+ var h = 250, g = ({ onApprovePendingWrite: h, approvingWriteRef: g = null, approvableMessageId: _ = null, retryableMessageId: v = null, messages: y, processing: b, streamingMessageId: x, failedMessageId: S, onRetry: C, renderWriteProposals: w, hidesLegacyWriteCard: T, renderUiOffers: E, onStopTurn: D, stopTurnLabel: O, decorate: k }) => {
12
+ let A = n(), j = l(), M = (() => {
13
+ for (let e = y.length - 1; e >= 0; --e) if (y[e].role === "assistant") return y[e].id;
14
14
  return null;
15
- })(), j = a(v), M = o(v), N = i(v), P = d(null);
16
- u(() => {
17
- let e = P.current;
15
+ })(), N = a(y), P = o(y), F = i(y), I = f(null);
16
+ d(() => {
17
+ let e = I.current;
18
18
  if (e && e.scrollHeight - e.scrollTop - e.clientHeight < 100) {
19
19
  let n = t();
20
20
  s(e, { behavior: n ? "auto" : "smooth" });
21
21
  }
22
- }, [v, b]);
23
- let F = r((e) => e.byMessageId), I = b === null ? null : F[b]?.content ?? null, L = d(0), R = d(null);
24
- return u(() => {
25
- if (I === null) return;
22
+ }, [y, x]);
23
+ let L = r((e) => e.byMessageId), R = x === null ? null : L[x]?.content ?? null, z = k ? y.map((e, t) => k(e, t, y)) : null, B = z?.[z.length - 1]?.content ?? null, V = f(0), H = f(null), U = R ?? B;
24
+ return d(() => {
25
+ if (U === null) return;
26
26
  let e = () => {
27
- R.current = null, L.current = Date.now();
28
- let e = P.current;
27
+ H.current = null, V.current = Date.now();
28
+ let e = I.current;
29
29
  e && e.scrollHeight - e.scrollTop - e.clientHeight < 100 && s(e, { behavior: "auto" });
30
- }, t = L.current + 250 - Date.now();
31
- t <= 0 ? e() : R.current === null && (R.current = setTimeout(e, t));
32
- }, [I]), u(() => () => {
33
- R.current !== null && clearTimeout(R.current);
34
- }, []), u(() => {
35
- P.current && s(P.current, { behavior: "instant" });
36
- }, []), /* @__PURE__ */ p("div", {
37
- ref: P,
38
- className: k ? `scrollbar-slim flex-1 space-y-4 overflow-y-auto py-3 ${c}` : "scrollbar-slim flex-1 space-y-4 overflow-y-auto p-3",
30
+ }, t = V.current + 250 - Date.now();
31
+ t <= 0 ? e() : H.current === null && (H.current = setTimeout(e, t));
32
+ }, [U]), d(() => () => {
33
+ H.current !== null && clearTimeout(H.current);
34
+ }, []), d(() => {
35
+ I.current && s(I.current, { behavior: "instant" });
36
+ }, []), /* @__PURE__ */ m("div", {
37
+ ref: I,
38
+ className: j ? `scrollbar-slim flex-1 space-y-4 overflow-y-auto py-3 ${c}` : "scrollbar-slim flex-1 space-y-4 overflow-y-auto p-3",
39
39
  role: "log",
40
40
  "aria-live": "polite",
41
41
  "aria-relevant": "additions",
42
- "aria-busy": b !== null,
43
- "aria-label": O("messageList.ariaLabel", "Conversation messages"),
44
- children: [v.map((t) => {
45
- let n = j.has(t.id), r = !n && (t.id === g || t.id === b);
46
- return /* @__PURE__ */ f(e, {
47
- onApprovePendingWrite: r ? m : void 0,
48
- approvingWriteRef: h,
49
- pendingWriteApproved: n,
50
- pendingWriteGoAheadSent: M.has(t.id),
51
- pendingWriteExpired: !n && !r,
52
- message: t.id === b && I !== null ? {
53
- ...t,
54
- content: I
55
- } : t,
56
- processing: y,
57
- isStreaming: t.id === b,
58
- isFailed: t.id === x,
59
- isLastAssistant: t.id === _,
60
- isNewestAssistant: t.id === A,
61
- onRetry: N.has(t.id) ? void 0 : S,
62
- legacyWriteCardHidden: w?.(t) ?? !1,
63
- writeProposals: C?.(t),
64
- uiOffers: T?.(t),
65
- ...t.id === b && E !== void 0 ? {
66
- onStopTurn: E,
67
- stopTurnLabel: D
42
+ "aria-busy": x !== null,
43
+ "aria-label": A("messageList.ariaLabel", "Conversation messages"),
44
+ children: [y.map((t, n) => {
45
+ let r = z?.[n], i = r?.content === void 0 ? t : {
46
+ ...t,
47
+ content: r.content
48
+ }, a = r?.content === void 0 ? R : null, o = N.has(i.id), s = !o && (i.id === _ || i.id === x);
49
+ return /* @__PURE__ */ m(u, { children: [/* @__PURE__ */ p(e, {
50
+ onApprovePendingWrite: s ? h : void 0,
51
+ approvingWriteRef: g,
52
+ pendingWriteApproved: o,
53
+ pendingWriteGoAheadSent: P.has(i.id),
54
+ pendingWriteExpired: !o && !s,
55
+ message: i.id === x && a !== null ? {
56
+ ...i,
57
+ content: a
58
+ } : i,
59
+ processing: b,
60
+ isStreaming: i.id === x,
61
+ isFailed: i.id === S,
62
+ isLastAssistant: i.id === v,
63
+ isNewestAssistant: i.id === M,
64
+ onRetry: F.has(i.id) ? void 0 : C,
65
+ legacyWriteCardHidden: T?.(i) ?? !1,
66
+ writeProposals: w?.(i),
67
+ uiOffers: E?.(i),
68
+ ...i.id === x && D !== void 0 ? {
69
+ onStopTurn: D,
70
+ stopTurnLabel: O
68
71
  } : {}
69
- }, t.id);
70
- }), /* @__PURE__ */ f("div", {})]
72
+ }), r?.below] }, i.id);
73
+ }), /* @__PURE__ */ p("div", {})]
71
74
  });
72
75
  };
73
- export { h as AssistantMessageList, m as LIVE_SCROLL_GAP_MS };
76
+ export { g as AssistantMessageList, h as LIVE_SCROLL_GAP_MS };