@burdenoff/fe-libs 2026.1115.10 → 2026.1115.12

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/avatar/live/createLiveAvatarSeam.d.ts +8 -1
  2. package/dist/shared/assistant/avatar/live/createLiveAvatarSeam.js +126 -123
  3. package/dist/shared/assistant/avatar/live/liveAvatarController.d.ts +7 -0
  4. package/dist/shared/assistant/avatar/live/liveAvatarController.js +3 -2
  5. package/dist/shared/assistant/index.d.ts +1 -0
  6. package/dist/shared/assistant/ui/AssistantAvatar.js +18 -14
  7. package/dist/shared/assistant/ui/AssistantChatArea.js +1 -0
  8. package/dist/shared/assistant/ui/AssistantMessageItem.d.ts +5 -0
  9. package/dist/shared/assistant/ui/AssistantMessageItem.js +57 -56
  10. package/dist/shared/assistant/ui/AssistantMessageList.js +57 -44
  11. package/dist/shared/assistant/ui/AssistantTurnActivity.d.ts +2 -0
  12. package/dist/shared/assistant/ui/AssistantTurnActivity.js +20 -17
  13. package/dist/shared/assistant/ui/assistantLiveAvatarSeam.d.ts +26 -0
  14. package/dist/shared/assistant/ui/assistantLiveAvatarSeam.js +87 -79
  15. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +5 -0
  16. package/dist/shared/assistant/ui/composer/AssistantComposer.js +348 -343
  17. package/dist/shared/assistant/ui/composer/AssistantDictation.js +57 -56
  18. package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.d.ts +4 -0
  19. package/dist/shared/assistant/ui/composer/AssistantHandsFreeInterruptToggle.js +22 -22
  20. package/dist/shared/assistant/ui/composer/pageBoxClass.d.ts +13 -0
  21. package/dist/shared/assistant/ui/composer/pageBoxClass.js +5 -0
  22. package/dist/shared/assistant/ui/useVoiceSession.js +223 -223
  23. package/dist/shared/assistant/ui/voice/AssistantPageVoiceBar.js +41 -35
  24. package/dist/shared/assistant/ui/voice/AssistantVoiceSessionButton.js +13 -12
  25. package/dist/shared/assistant/ui/voice/LiveWaveform.js +28 -27
  26. package/dist/shared/assistant/voice/handsfree/handsFreeController.js +79 -79
  27. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.d.ts +6 -1
  28. package/dist/shared/assistant/voice/handsfree/handsFreeSetting.js +2 -2
  29. package/dist/shared/assistant/voice/handsfree/playbackReference.d.ts +45 -3
  30. package/dist/shared/assistant/voice/handsfree/playbackReference.js +62 -15
  31. package/dist/shared-assistant.js +371 -370
  32. package/package.json +1 -1
  33. package/src/shared/styles/app-shell.css +5 -0
  34. package/src/shared/tokens/build/semantic.css +12 -0
  35. package/src/shared/tokens/build/tailwind.preset.js +5 -0
  36. package/src/shared/tokens/build/themes.css +14 -0
  37. package/src/shared/tokens/tokens.css +268 -0
@@ -1,99 +1,107 @@
1
1
  import { useAvatarCopy as e } from "../avatar/useAvatarCopy.js";
2
2
  import { getSpeechEngine as t, subscribeSpeechEngine as n } from "../speech/createSpeechEngine.js";
3
3
  import { useAssistantStore as r } from "../store.js";
4
- import { ASSISTANT_VOICE_SESSION_ATTR as i } from "./panelOverlays.js";
5
- import { createContext as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d, useSyncExternalStore as f } from "react";
6
- import { VideoOff as p } from "lucide-react";
7
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
- var g = a({
4
+ import { isAvatarVoiceReferenceSupported as i } from "../voice/handsfree/playbackReference.js";
5
+ import { ASSISTANT_VOICE_SESSION_ATTR as a } from "./panelOverlays.js";
6
+ import { createContext as o, useContext as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
7
+ import { VideoOff as m } from "lucide-react";
8
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ var _ = o({
9
10
  open: !1,
10
11
  close: () => {},
11
12
  ids: null,
12
13
  covered: !1
13
14
  });
14
- function _() {
15
- return o(g);
16
- }
17
15
  function v() {
18
- return o(T)?.tab ?? null;
16
+ return s(_);
17
+ }
18
+ function y() {
19
+ return s(E)?.tab ?? null;
19
20
  }
20
- var y = {
21
+ var b = {
21
22
  subscribe: () => () => {},
22
23
  getSnapshot: () => !1
23
24
  };
24
- function b(e) {
25
- let t = e ?? x;
26
- return f(t.subscribe, t.getSnapshot, t.getSnapshot);
25
+ function x(e) {
26
+ let t = e ?? S;
27
+ return p(t.subscribe, t.getSnapshot, t.getSnapshot);
27
28
  }
28
- var x = {
29
+ var S = {
29
30
  subscribe: () => () => {},
30
31
  getSnapshot: () => !1
31
32
  };
32
- function S(e) {
33
- return b(e?.running);
34
- }
35
33
  function C(e) {
36
- return b(e?.endsOnLeave);
34
+ return x(e?.running);
37
35
  }
38
36
  function w(e) {
39
- let t = e?.offered ?? y;
40
- return f(t.subscribe, t.getSnapshot, t.getSnapshot);
37
+ return x(e?.endsOnLeave);
41
38
  }
42
- var T = a(null), E = ({ value: e, children: t }) => /* @__PURE__ */ m(T.Provider, {
39
+ function T(e) {
40
+ let t = e?.offered ?? b;
41
+ return p(t.subscribe, t.getSnapshot, t.getSnapshot);
42
+ }
43
+ var E = o(null), D = ({ value: e, children: t }) => /* @__PURE__ */ h(E.Provider, {
43
44
  value: e ?? null,
44
45
  children: t
45
46
  });
46
- function D() {
47
- let e = o(T)?.Stage ?? null;
48
- return _().open ? null : e;
47
+ function O() {
48
+ let e = s(E)?.Stage ?? null;
49
+ return v().open ? null : e;
49
50
  }
50
- function O(e) {
51
- let r = f(n, t, t), i = e?.decorateSpeechEngine;
52
- return l(() => i ? i(r) : void 0, [i, r]);
51
+ function k(e) {
52
+ let r = p(n, t, t), i = e?.decorateSpeechEngine;
53
+ return u(() => i ? i(r) : void 0, [i, r]);
53
54
  }
54
- var k = {
55
+ var A = {
55
56
  subscribe: () => () => {},
56
57
  getSnapshot: () => !1,
57
58
  switchOff: () => {},
58
59
  voiceLive: () => {}
59
60
  };
60
- function A(e) {
61
- return e?.Stage ? e.enabled : void 0;
62
- }
63
61
  function j(e) {
64
- let t = e ?? k;
65
- return f(t.subscribe, t.getSnapshot, t.getSnapshot);
62
+ return e?.Stage ? e.enabled : void 0;
66
63
  }
67
- function M() {
68
- return j(o(T)?.enabled);
64
+ function M(e) {
65
+ let t = e ?? A;
66
+ return p(t.subscribe, t.getSnapshot, t.getSnapshot);
69
67
  }
70
68
  function N() {
71
- let e = o(T)?.enabled, t = e ? I(e) : P, n = f(t.subscribe, t.isShown, t.isShown);
72
- return s(() => {
69
+ return M(s(E)?.enabled);
70
+ }
71
+ function P() {
72
+ return s(E)?.handsFreeWithAvatar === !0 && i();
73
+ }
74
+ function F() {
75
+ let e = s(E)?.enabled, t = P(), n = e ? R(e) : I, i = p(n.subscribe, n.isShown, n.isShown);
76
+ return c(() => {
73
77
  if (!e) return;
74
- let n = () => {
75
- if (!e.getSnapshot()) {
76
- t.set(!1);
78
+ let i = () => {
79
+ if (!e.getSnapshot() || t) {
80
+ n.set(!1);
77
81
  return;
78
82
  }
79
- let n = r.getState();
80
- n.handsFreeInterrupt && (n.setHandsFreeInterrupt(!1), t.set(!0));
81
- }, i = t.hold();
82
- n();
83
- let a = e.subscribe(n), o = r.subscribe(n);
83
+ let i = r.getState();
84
+ i.handsFreeInterrupt && (i.setHandsFreeInterrupt(!1), n.set(!0));
85
+ }, a = n.hold();
86
+ i();
87
+ let o = e.subscribe(i), s = r.subscribe(i);
84
88
  return () => {
85
- a(), o(), i();
89
+ o(), s(), a();
86
90
  };
87
- }, [e, t]), n;
91
+ }, [
92
+ e,
93
+ n,
94
+ t
95
+ ]), i;
88
96
  }
89
- var P = {
97
+ var I = {
90
98
  subscribe: () => () => {},
91
99
  isShown: () => !1,
92
100
  set: () => {},
93
101
  hold: () => () => {}
94
- }, F = /* @__PURE__ */ new WeakMap();
95
- function I(e) {
96
- let t = F.get(e);
102
+ }, L = /* @__PURE__ */ new WeakMap();
103
+ function R(e) {
104
+ let t = L.get(e);
97
105
  if (t) return t;
98
106
  let n = !1, r = 0, i = /* @__PURE__ */ new Set(), a = (e) => {
99
107
  if (n !== e) {
@@ -116,31 +124,31 @@ function I(e) {
116
124
  };
117
125
  }
118
126
  };
119
- return F.set(e, o), o;
127
+ return L.set(e, o), o;
120
128
  }
121
- function L(e, t) {
122
- let n = o(T), r = _().open;
123
- R(n?.enabled, t, r);
124
- let i = A(n), a = j(i), [s, c] = d(() => ({
129
+ function z(e, t) {
130
+ let n = s(E), r = v().open;
131
+ B(n?.enabled, t, r);
132
+ let i = j(n), a = M(i), [o, c] = f(() => ({
125
133
  on: a,
126
134
  chosen: e,
127
135
  tabOpen: r,
128
136
  open: a && e === "mini" && !r
129
137
  }));
130
138
  if (!i) return e;
131
- let l = s.open;
132
- return (s.on !== a || s.chosen !== e || s.tabOpen !== r) && (l = r ? !1 : s.tabOpen ? a && e === "mini" && n?.tab?.heldByVoice() === !0 : s.on !== a && a && e === "mini", c({
139
+ let l = o.open;
140
+ return (o.on !== a || o.chosen !== e || o.tabOpen !== r) && (l = r ? !1 : o.tabOpen ? a && e === "mini" && n?.tab?.heldByVoice() === !0 : o.on !== a && a && e === "mini", c({
133
141
  on: a,
134
142
  chosen: e,
135
143
  tabOpen: r,
136
144
  open: l
137
145
  })), l && !t && !r ? "panel" : e;
138
146
  }
139
- function R(e, t, n) {
140
- let r = u(0), i = u(n);
141
- c(() => {
147
+ function B(e, t, n) {
148
+ let r = d(0), i = d(n);
149
+ l(() => {
142
150
  i.current = n;
143
- }, [n]), s(() => {
151
+ }, [n]), c(() => {
144
152
  if (!e) return;
145
153
  let n = ++r.current, a = (e) => queueMicrotask(() => {
146
154
  r.current === n && e();
@@ -158,43 +166,43 @@ function R(e, t, n) {
158
166
  });
159
167
  }, [e, t]);
160
168
  }
161
- function z() {
162
- let e = j(A(o(T))), t = _().open;
169
+ function V() {
170
+ let e = M(j(s(E))), t = v().open;
163
171
  return e && !t;
164
172
  }
165
- var B = () => {
166
- let e = A(o(T)), t = j(e), n = _().open;
167
- return e && t && !n ? /* @__PURE__ */ m(U, {
173
+ var H = () => {
174
+ let e = j(s(E)), t = M(e), n = v().open;
175
+ return e && t && !n ? /* @__PURE__ */ h(G, {
168
176
  onStop: e.switchOff,
169
177
  isOn: e.getSnapshot
170
178
  }) : null;
171
- }, V = "[data-testid=\"assistant-voice-orb\"]", H = "[data-testid=\"assistant-voice-end\"]", U = ({ onStop: t, isOn: n }) => {
172
- let r = e(), a = u(null), o = u(n);
173
- return c(() => {
174
- let e = a.current, t = o.current;
179
+ }, U = "[data-testid=\"assistant-voice-orb\"]", W = "[data-testid=\"assistant-voice-end\"]", G = ({ onStop: t, isOn: n }) => {
180
+ let r = e(), i = d(null), o = d(n);
181
+ return l(() => {
182
+ let e = i.current, t = o.current;
175
183
  return () => {
176
184
  if (!e?.contains(e.ownerDocument.activeElement)) return;
177
- let n = e.closest(`[${i}]`), r = t() ? null : n?.querySelector(V);
178
- (r && !r.hasAttribute("disabled") ? r : n?.querySelector(H))?.focus();
185
+ let n = e.closest(`[${a}]`), r = t() ? null : n?.querySelector(U);
186
+ (r && !r.hasAttribute("disabled") ? r : n?.querySelector(W))?.focus();
179
187
  };
180
- }, []), /* @__PURE__ */ h("div", {
181
- ref: a,
188
+ }, []), /* @__PURE__ */ g("div", {
189
+ ref: i,
182
190
  className: "absolute bottom-1.5 start-7 flex h-8 max-w-[calc(100%-13.875rem)] items-center gap-1 rounded-full border border-border-default bg-bg-elevated ps-2.5 pe-0.5 text-xs font-medium text-text-secondary",
183
191
  "data-testid": "assistant-voice-avatar",
184
- children: [/* @__PURE__ */ m("span", {
192
+ children: [/* @__PURE__ */ h("span", {
185
193
  className: "truncate",
186
194
  children: r.stateOn
187
- }), /* @__PURE__ */ m("button", {
195
+ }), /* @__PURE__ */ h("button", {
188
196
  type: "button",
189
197
  onClick: () => t(),
190
198
  className: "relative flex size-7 shrink-0 items-center justify-center rounded-full transition-colors after:absolute after:-inset-2 after:-ms-1.5 after:me-1.5 hover:bg-bg-raised hover:text-text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
191
199
  "aria-label": r.stop,
192
200
  "data-testid": "assistant-voice-avatar-stop",
193
- children: /* @__PURE__ */ m(p, {
201
+ children: /* @__PURE__ */ h(m, {
194
202
  className: "size-4",
195
203
  "aria-hidden": "true"
196
204
  })
197
205
  })]
198
206
  });
199
207
  };
200
- export { B as LiveAvatarMiniIndicator, E as LiveAvatarSeamProvider, g as LiveAvatarTabContext, N as useLiveAvatarHandsFreeGuard, z as useLiveAvatarMiniIndicatorShown, M as useLiveAvatarOn, O as useLiveAvatarSpeechEngine, D as useLiveAvatarStage, _ as useLiveAvatarTab, C as useLiveAvatarTabEndsOnLeave, w as useLiveAvatarTabOffered, S as useLiveAvatarTabRunning, v as useLiveAvatarTabSeam, L as useLiveAvatarVoiceView };
208
+ export { H as LiveAvatarMiniIndicator, D as LiveAvatarSeamProvider, _ as LiveAvatarTabContext, P as useLiveAvatarEchoReference, F as useLiveAvatarHandsFreeGuard, V as useLiveAvatarMiniIndicatorShown, N as useLiveAvatarOn, k as useLiveAvatarSpeechEngine, O as useLiveAvatarStage, v as useLiveAvatarTab, w as useLiveAvatarTabEndsOnLeave, T as useLiveAvatarTabOffered, C as useLiveAvatarTabRunning, y as useLiveAvatarTabSeam, z as useLiveAvatarVoiceView };
@@ -71,6 +71,11 @@ interface Props {
71
71
  * problem, and the tab's own voice conversation needs the microphone.
72
72
  */
73
73
  suspendDictation?: boolean;
74
+ /**
75
+ * ★ BOFF-14753: the page's new chat — the box rises in with the start page (M1).
76
+ * Only meaningful with the page layout; the panel never animates in.
77
+ */
78
+ entrance?: boolean;
74
79
  /**
75
80
  * Told what holds the voice conversation back here (BOFF-9341): a Send
76
81
  * saving its attachments, and dictation holding the microphone. The rest of