@burdenoff/fe-libs 2026.1113.9 → 2026.1113.11

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 (30) hide show
  1. package/dist/shared/assistant/index.d.ts +4 -0
  2. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +7 -0
  3. package/dist/shared/assistant/ui/AIAssistantPanel.js +278 -250
  4. package/dist/shared/assistant/ui/AssistantChatArea.js +1243 -1241
  5. package/dist/shared/assistant/ui/AssistantConversationList.js +253 -252
  6. package/dist/shared/assistant/ui/AssistantHeader.d.ts +2 -1
  7. package/dist/shared/assistant/ui/AssistantHeader.js +1 -1
  8. package/dist/shared/assistant/ui/AssistantMessageList.js +48 -47
  9. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +46 -2
  10. package/dist/shared/assistant/ui/AssistantOverlay.js +359 -307
  11. package/dist/shared/assistant/ui/AssistantPageHost.d.ts +11 -0
  12. package/dist/shared/assistant/ui/AssistantPageHost.js +17 -0
  13. package/dist/shared/assistant/ui/assistantPageLayout.d.ts +13 -0
  14. package/dist/shared/assistant/ui/assistantPageLayout.js +8 -0
  15. package/dist/shared/assistant/ui/assistantPageSurface.d.ts +11 -0
  16. package/dist/shared/assistant/ui/assistantPageSurface.js +10 -0
  17. package/dist/shared/assistant/ui/avatar/AssistantCompactAvatar.d.ts +6 -0
  18. package/dist/shared/assistant/ui/avatar/AssistantCompactAvatar.js +77 -71
  19. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.d.ts +2 -1
  20. package/dist/shared/assistant/ui/compact/AssistantCompactHeader.js +2 -2
  21. package/dist/shared/assistant/ui/compact/AssistantMenuView.d.ts +5 -2
  22. package/dist/shared/assistant/ui/compact/AssistantMenuView.js +132 -131
  23. package/dist/shared/assistant/ui/compact/AssistantPageBar.d.ts +13 -0
  24. package/dist/shared/assistant/ui/compact/AssistantPageBar.js +46 -0
  25. package/dist/shared/assistant/ui/compact/AssistantViewSwitch.d.ts +5 -0
  26. package/dist/shared/assistant/ui/compact/AssistantViewSwitch.js +11 -11
  27. package/dist/shared/assistant/ui/composer/AssistantCompactFooter.js +15 -11
  28. package/dist/shared/assistant/ui/composer/AssistantComposer.js +258 -257
  29. package/dist/shared-assistant.js +71 -67
  30. package/package.json +1 -1
@@ -5,183 +5,184 @@ import { assistantHistory as r } from "../../history/historyEngine.js";
5
5
  import { useAssistantHistoryStatus as i } from "../../history/historyStatus.js";
6
6
  import { useAssistantProduct as a } from "../../product.js";
7
7
  import { useAssistantStore as o } from "../../store.js";
8
- import { resolveLanguagePair as ee } from "../../voice/languagePair.js";
9
- import { AssistantConversationList as te } from "../AssistantConversationList.js";
10
- import { assistantModeOptionName as ne } from "../composer/AssistantModeMenu.js";
11
- import { useOverlayFocus as re } from "../useOverlayFocus.js";
12
- import { fieldOwnsEscape as ie, menuViewEscape as ae, recentConversations as oe } from "./compactChrome.js";
13
- import { useAssistantNavigate as se } from "../AssistantMarkdownRenderer.js";
14
- import { AssistantVoiceLanguageSettings as s } from "./AssistantVoiceLanguageSettings.js";
15
- import { useEffect as c, useLayoutEffect as l, useMemo as ce, useRef as u, useState as d } from "react";
16
- import { ArrowLeft as f, ChevronRight as p, History as le, Languages as ue, PanelRight as de, Plus as m, UserRound as h, X as g } from "lucide-react";
17
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
8
+ import { resolveLanguagePair as s } from "../../voice/languagePair.js";
9
+ import { AssistantConversationList as ee } from "../AssistantConversationList.js";
10
+ import { assistantModeOptionName as te } from "../composer/AssistantModeMenu.js";
11
+ import { useOverlayFocus as c } from "../useOverlayFocus.js";
12
+ import { fieldOwnsEscape as l, menuViewEscape as u, recentConversations as d } from "./compactChrome.js";
13
+ import { useAssistantNavigate as f } from "../AssistantMarkdownRenderer.js";
14
+ import { AssistantVoiceLanguageSettings as ne } from "./AssistantVoiceLanguageSettings.js";
15
+ import { PAGE_VIEW_GUTTER as re, useAssistantPageLayout as ie } from "../assistantPageLayout.js";
16
+ import { useEffect as p, useLayoutEffect as m, useMemo as ae, useRef as h, useState as oe } from "react";
17
+ import { ArrowLeft as g, ChevronRight as _, History as se, Languages as ce, PanelRight as v, Plus as le, UserRound as ue, X as y } from "lucide-react";
18
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
18
19
  // src/shared/assistant/ui/compact/AssistantMenuView.tsx
19
- var b = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", x = `flex size-10 shrink-0 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary ${b}`, S = `flex min-h-11 w-full items-center gap-3 px-4 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken ${b} focus-visible:ring-inset`, C = typeof document > "u" ? c : l, w = ({ icon: e, label: t, trailing: n, onClick: r, buttonRef: i, testId: a, describedBy: o }) => /* @__PURE__ */ y("button", {
20
+ var C = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", w = `flex size-10 shrink-0 items-center justify-center rounded-button text-text-secondary transition-colors hover:bg-bg-sunken hover:text-text-primary ${C}`, T = `flex min-h-11 w-full items-center gap-3 px-4 py-2 text-start text-sm text-text-primary transition-colors hover:bg-bg-sunken ${C} focus-visible:ring-inset`, de = typeof document > "u" ? p : m, E = ({ icon: e, label: t, trailing: n, onClick: r, buttonRef: i, testId: a, describedBy: o }) => /* @__PURE__ */ S("button", {
20
21
  ref: i,
21
22
  type: "button",
22
23
  onClick: r,
23
- className: S,
24
+ className: T,
24
25
  "aria-describedby": o,
25
26
  "data-testid": a,
26
27
  children: [
27
- /* @__PURE__ */ v("span", {
28
+ /* @__PURE__ */ x("span", {
28
29
  className: "flex size-5 shrink-0 items-center justify-center text-text-secondary",
29
30
  children: e
30
31
  }),
31
- /* @__PURE__ */ v("span", {
32
+ /* @__PURE__ */ x("span", {
32
33
  className: "min-w-0 flex-1 truncate",
33
34
  children: t
34
35
  }),
35
36
  n
36
37
  ]
37
- }), T = ({ id: e, children: t }) => /* @__PURE__ */ v("h3", {
38
+ }), D = ({ id: e, children: t }) => /* @__PURE__ */ x("h3", {
38
39
  id: e,
39
40
  className: "px-4 pb-1 pt-4 text-xs font-semibold uppercase tracking-wide text-text-muted",
40
41
  children: t
41
- }), fe = ({ title: e, tr: t, onBack: n, backRef: r }) => /* @__PURE__ */ y("div", {
42
+ }), fe = ({ title: e, tr: t, onBack: n, backRef: r }) => /* @__PURE__ */ S("div", {
42
43
  className: "flex items-center gap-1 border-b border-border-default bg-bg-elevated px-2 py-2",
43
- children: [/* @__PURE__ */ v("button", {
44
+ children: [/* @__PURE__ */ x("button", {
44
45
  ref: r,
45
46
  type: "button",
46
47
  onClick: n,
47
- className: x,
48
+ className: w,
48
49
  "aria-label": t("menuView.back", "Back"),
49
50
  "data-testid": "assistant-menu-subview-back",
50
- children: /* @__PURE__ */ v(f, {
51
+ children: /* @__PURE__ */ x(g, {
51
52
  className: "size-5",
52
53
  "aria-hidden": "true"
53
54
  })
54
- }), /* @__PURE__ */ v("h2", {
55
+ }), /* @__PURE__ */ x("h2", {
55
56
  className: "min-w-0 flex-1 truncate text-base font-semibold text-text-primary",
56
57
  children: e
57
58
  })]
58
- }), E = ({ id: c, onClose: l, onRequestClosePanel: E, onNewConversation: pe, AvatarSettings: D, initialView: O = "root", docked: k, onToggleDock: A }) => {
59
- let j = n(), { locale: M } = t(), { modes: N } = a(), { conversations: P, activeConversationId: F, assistantLanguage: I, replyLanguage: L, setActiveConversation: R, setMode: z } = o(), me = i((e) => e.product !== null), [B, V] = d(O === "avatar" && D ? "avatar" : "root");
60
- B === "avatar" && !D && V("root");
61
- let he = se(), H = u(null), U = u(null), ge = re("assistant-menu"), W = u(null), G = u(null), K = u(null), q = u(null), J = u(O === "avatar" ? "avatar" : "back"), Y = (e) => {
59
+ }), O = ({ id: p, onClose: m, onRequestClosePanel: O, onNewConversation: pe, AvatarSettings: k, initialView: A = "root", docked: j, onToggleDock: M }) => {
60
+ let N = n(), P = ie(), { locale: F } = t(), { modes: I } = a(), { conversations: L, activeConversationId: R, assistantLanguage: z, replyLanguage: me, setActiveConversation: he, setMode: ge } = o(), _e = i((e) => e.product !== null), [B, V] = oe(A === "avatar" && k ? "avatar" : "root");
61
+ B === "avatar" && !k && V("root");
62
+ let ve = f(), H = h(null), U = h(null), ye = c("assistant-menu"), W = h(null), G = h(null), K = h(null), q = h(null), J = h(A === "avatar" ? "avatar" : "back"), Y = (e) => {
62
63
  J.current = e, V(e);
63
64
  }, X = () => V("root");
64
- C(() => {
65
+ de(() => {
65
66
  B !== "history" && (B === "avatar" ? H.current?.focus({ preventScroll: !0 }) : B === "voice-language" ? G.current?.focus({ preventScroll: !0 }) : (((J.current === "voice-language" ? K.current : J.current === "history" ? q.current : J.current === "avatar" ? U.current : null) ?? W.current)?.focus({ preventScroll: !0 }), J.current = "back"));
66
67
  }, [B]);
67
- let Z = ce(() => oe(P), [P]), _e = j("history.untitled", "Untitled conversation"), ve = (e) => {
68
- if (me) r.openConversation(e, { modes: N });
68
+ let Z = ae(() => d(L), [L]), be = N("history.untitled", "Untitled conversation"), xe = (e) => {
69
+ if (_e) r.openConversation(e, { modes: I });
69
70
  else {
70
- let t = P.find((t) => t.id === e);
71
- R(e), t && z(t.mode);
71
+ let t = L.find((t) => t.id === e);
72
+ he(e), t && ge(t.mode);
72
73
  }
73
- l();
74
- }, ye = ee(I, L, M).input.label, Q = `${c}-settings`, $ = `${c}-recent`;
75
- return /* @__PURE__ */ v(e, {
74
+ m();
75
+ }, Se = s(z, me, F).input.label, Q = `${p}-settings`, $ = `${p}-recent`;
76
+ return /* @__PURE__ */ x(e, {
76
77
  onDismiss: () => {
77
- B === "history" && ie(document.activeElement) || (ae(B) === "back" ? X() : l());
78
+ B === "history" && l(document.activeElement) || (u(B) === "back" ? X() : m());
78
79
  },
79
- children: /* @__PURE__ */ v("div", {
80
- ref: ge,
81
- id: c,
80
+ children: /* @__PURE__ */ x("div", {
81
+ ref: ye,
82
+ id: p,
82
83
  tabIndex: -1,
83
84
  role: "region",
84
- "aria-label": j("menuView.title", "Assistant menu"),
85
- className: "absolute inset-0 z-10 flex flex-col bg-bg-surface outline-none animate-in slide-in-from-left-2 fade-in duration-200 motion-reduce:animate-none",
85
+ "aria-label": N("menuView.title", "Assistant menu"),
86
+ className: `absolute inset-0 z-10 flex flex-col bg-bg-surface outline-none animate-in slide-in-from-left-2 fade-in duration-200 motion-reduce:animate-none${P ? ` ${re}` : ""}`,
86
87
  "data-testid": "assistant-menu-view",
87
88
  "data-menu-view": B,
88
- children: B === "root" ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
89
+ children: B === "root" ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
89
90
  className: "flex items-center gap-1 border-b border-border-default bg-bg-elevated px-2 py-2",
90
91
  children: [
91
- /* @__PURE__ */ y("button", {
92
+ /* @__PURE__ */ S("button", {
92
93
  ref: W,
93
94
  type: "button",
94
- onClick: l,
95
- className: `flex min-h-10 items-center gap-1.5 rounded-button px-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken ${b}`,
95
+ onClick: m,
96
+ className: `flex min-h-10 items-center gap-1.5 rounded-button px-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken ${C}`,
96
97
  "data-testid": "assistant-menu-back",
97
- children: [/* @__PURE__ */ v(f, {
98
+ children: [/* @__PURE__ */ x(g, {
98
99
  className: "size-5",
99
100
  "aria-hidden": "true"
100
- }), j("menuView.backToConversation", "Back to conversation")]
101
+ }), N("menuView.backToConversation", "Back to conversation")]
101
102
  }),
102
- /* @__PURE__ */ v("h2", {
103
+ /* @__PURE__ */ x("h2", {
103
104
  className: "sr-only",
104
- children: j("menuView.title", "Assistant menu")
105
+ children: N("menuView.title", "Assistant menu")
105
106
  }),
106
- /* @__PURE__ */ v("span", { className: "flex-1" }),
107
- /* @__PURE__ */ v("button", {
107
+ /* @__PURE__ */ x("span", { className: "flex-1" }),
108
+ O ? /* @__PURE__ */ x("button", {
108
109
  type: "button",
109
- onClick: E,
110
- className: x,
111
- "aria-label": j("header.close", "Close assistant"),
110
+ onClick: O,
111
+ className: w,
112
+ "aria-label": N("header.close", "Close assistant"),
112
113
  "data-testid": "assistant-menu-close",
113
- children: /* @__PURE__ */ v(g, {
114
+ children: /* @__PURE__ */ x(y, {
114
115
  className: "size-5",
115
116
  "aria-hidden": "true"
116
117
  })
117
- })
118
+ }) : null
118
119
  ]
119
- }), /* @__PURE__ */ y("div", {
120
+ }), /* @__PURE__ */ S("div", {
120
121
  className: "scrollbar-slim min-h-0 flex-1 overflow-y-auto pb-2",
121
122
  children: [
122
- /* @__PURE__ */ y("button", {
123
+ /* @__PURE__ */ S("button", {
123
124
  type: "button",
124
125
  onClick: pe,
125
- className: `${S} mt-2`,
126
+ className: `${T} mt-2`,
126
127
  "aria-keyshortcuts": "Control+Shift+N Meta+Shift+N",
127
128
  "data-testid": "assistant-new-conversation",
128
129
  children: [
129
- /* @__PURE__ */ v("span", {
130
+ /* @__PURE__ */ x("span", {
130
131
  className: "flex size-5 shrink-0 items-center justify-center text-text-secondary",
131
- children: /* @__PURE__ */ v(m, {
132
+ children: /* @__PURE__ */ x(le, {
132
133
  className: "size-5",
133
134
  "aria-hidden": "true"
134
135
  })
135
136
  }),
136
- /* @__PURE__ */ v("span", {
137
+ /* @__PURE__ */ x("span", {
137
138
  className: "min-w-0 flex-1 truncate",
138
- children: j("header.newConversation", "New conversation")
139
+ children: N("header.newConversation", "New conversation")
139
140
  }),
140
- /* @__PURE__ */ v("kbd", {
141
+ /* @__PURE__ */ x("kbd", {
141
142
  className: "shrink-0 text-xs text-text-muted",
142
143
  children: "Ctrl+Shift+N"
143
144
  })
144
145
  ]
145
146
  }),
146
- /* @__PURE__ */ y("section", {
147
+ /* @__PURE__ */ S("section", {
147
148
  "aria-labelledby": $,
148
149
  "data-testid": "assistant-menu-recent",
149
150
  children: [
150
- /* @__PURE__ */ v(T, {
151
+ /* @__PURE__ */ x(D, {
151
152
  id: $,
152
- children: j("menuView.recent", "Recent")
153
+ children: N("menuView.recent", "Recent")
153
154
  }),
154
- Z.length === 0 ? /* @__PURE__ */ v("p", {
155
+ Z.length === 0 ? /* @__PURE__ */ x("p", {
155
156
  className: "px-4 py-2 text-sm text-text-muted",
156
- children: j("conversations.empty", "No conversations yet")
157
- }) : /* @__PURE__ */ v("ul", { children: Z.map((e) => {
158
- let t = N.find((t) => t.id === e.mode);
159
- return /* @__PURE__ */ v("li", { children: /* @__PURE__ */ v("button", {
157
+ children: N("conversations.empty", "No conversations yet")
158
+ }) : /* @__PURE__ */ x("ul", { children: Z.map((e) => {
159
+ let t = I.find((t) => t.id === e.mode);
160
+ return /* @__PURE__ */ x("li", { children: /* @__PURE__ */ x("button", {
160
161
  type: "button",
161
- onClick: () => ve(e.id),
162
- className: `${S} ${e.id === F ? "bg-bg-elevated" : ""}`,
163
- "aria-current": e.id === F ? "true" : void 0,
162
+ onClick: () => xe(e.id),
163
+ className: `${T} ${e.id === R ? "bg-bg-elevated" : ""}`,
164
+ "aria-current": e.id === R ? "true" : void 0,
164
165
  "data-testid": "assistant-menu-recent-row",
165
- children: /* @__PURE__ */ y("span", {
166
+ children: /* @__PURE__ */ S("span", {
166
167
  className: "min-w-0 flex-1",
167
- children: [/* @__PURE__ */ v("span", {
168
+ children: [/* @__PURE__ */ x("span", {
168
169
  className: "block truncate",
169
- children: e.title || _e
170
- }), t ? /* @__PURE__ */ v("span", {
170
+ children: e.title || be
171
+ }), t ? /* @__PURE__ */ x("span", {
171
172
  className: "block truncate text-xs text-text-muted",
172
- children: ne(j, t)
173
+ children: te(N, t)
173
174
  }) : null]
174
175
  })
175
176
  }) }, e.id);
176
177
  }) }),
177
- /* @__PURE__ */ v(w, {
178
+ /* @__PURE__ */ x(E, {
178
179
  buttonRef: q,
179
- icon: /* @__PURE__ */ v(le, {
180
+ icon: /* @__PURE__ */ x(se, {
180
181
  className: "size-5",
181
182
  "aria-hidden": "true"
182
183
  }),
183
- label: j("menuView.viewAllHistory", "View all history"),
184
- trailing: /* @__PURE__ */ v(p, {
184
+ label: N("menuView.viewAllHistory", "View all history"),
185
+ trailing: /* @__PURE__ */ x(_, {
185
186
  className: "size-4 text-text-muted",
186
187
  "aria-hidden": "true"
187
188
  }),
@@ -190,38 +191,38 @@ var b = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color
190
191
  })
191
192
  ]
192
193
  }),
193
- /* @__PURE__ */ y("section", {
194
+ /* @__PURE__ */ S("section", {
194
195
  "aria-labelledby": Q,
195
196
  "data-testid": "assistant-menu-settings",
196
197
  children: [
197
- /* @__PURE__ */ v(T, {
198
+ /* @__PURE__ */ x(D, {
198
199
  id: Q,
199
- children: j("menuView.settings", "Settings")
200
+ children: N("menuView.settings", "Settings")
200
201
  }),
201
- /* @__PURE__ */ v(w, {
202
+ /* @__PURE__ */ x(E, {
202
203
  buttonRef: K,
203
- icon: /* @__PURE__ */ v(ue, {
204
+ icon: /* @__PURE__ */ x(ce, {
204
205
  className: "size-5",
205
206
  "aria-hidden": "true"
206
207
  }),
207
- label: j("menuView.voiceLanguage", "Voice & language"),
208
- trailing: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
208
+ label: N("menuView.voiceLanguage", "Voice & language"),
209
+ trailing: /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", {
209
210
  className: "max-w-[40%] truncate text-xs text-text-muted",
210
- children: ye
211
- }), /* @__PURE__ */ v(p, {
211
+ children: Se
212
+ }), /* @__PURE__ */ x(_, {
212
213
  className: "size-4 shrink-0 text-text-muted",
213
214
  "aria-hidden": "true"
214
215
  })] }),
215
216
  onClick: () => Y("voice-language"),
216
217
  testId: "assistant-menu-voice-language-row"
217
218
  }),
218
- D ? /* @__PURE__ */ v(w, {
219
- icon: /* @__PURE__ */ v(h, {
219
+ k ? /* @__PURE__ */ x(E, {
220
+ icon: /* @__PURE__ */ x(ue, {
220
221
  className: "size-5",
221
222
  "aria-hidden": "true"
222
223
  }),
223
- label: j("menuView.avatar", "Avatar"),
224
- trailing: /* @__PURE__ */ v(p, {
224
+ label: N("menuView.avatar", "Avatar"),
225
+ trailing: /* @__PURE__ */ x(_, {
225
226
  className: "size-4 text-text-muted",
226
227
  "aria-hidden": "true"
227
228
  }),
@@ -229,31 +230,31 @@ var b = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color
229
230
  onClick: () => Y("avatar"),
230
231
  testId: "assistant-menu-avatar-row"
231
232
  }) : null,
232
- A ? /* @__PURE__ */ y("fieldset", {
233
+ M ? /* @__PURE__ */ S("fieldset", {
233
234
  className: "hidden min-w-0 border-0 px-4 py-2 sm:block",
234
235
  "data-testid": "assistant-menu-panel-layout",
235
- children: [/* @__PURE__ */ y("legend", {
236
+ children: [/* @__PURE__ */ S("legend", {
236
237
  className: "flex items-center gap-3 py-1 text-sm text-text-primary",
237
- children: [/* @__PURE__ */ v(de, {
238
+ children: [/* @__PURE__ */ x(v, {
238
239
  className: "size-5 shrink-0 text-text-secondary",
239
240
  "aria-hidden": "true"
240
- }), j("menuView.panelLayout", "Panel layout")]
241
+ }), N("menuView.panelLayout", "Panel layout")]
241
242
  }), [[
242
243
  !0,
243
- j("menuView.layoutDocked", "Docked side panel"),
244
+ N("menuView.layoutDocked", "Docked side panel"),
244
245
  "docked"
245
246
  ], [
246
247
  !1,
247
- j("menuView.layoutFloating", "Floating window"),
248
+ N("menuView.layoutFloating", "Floating window"),
248
249
  "floating"
249
- ]].map(([e, t, n]) => /* @__PURE__ */ y("label", {
250
+ ]].map(([e, t, n]) => /* @__PURE__ */ S("label", {
250
251
  className: "flex min-h-11 cursor-pointer items-center gap-3 ps-8 text-sm text-text-primary focus-within:ring-2 focus-within:ring-[var(--color-focus-ring)]",
251
- children: [/* @__PURE__ */ v("input", {
252
+ children: [/* @__PURE__ */ x("input", {
252
253
  type: "radio",
253
- name: `${c}-layout`,
254
- checked: !!k === e,
254
+ name: `${p}-layout`,
255
+ checked: !!j === e,
255
256
  onChange: () => {
256
- !!k !== e && A();
257
+ !!j !== e && M();
257
258
  },
258
259
  className: "size-4 accent-current",
259
260
  "data-testid": `assistant-panel-layout-${n}`
@@ -263,63 +264,63 @@ var b = "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color
263
264
  ]
264
265
  })
265
266
  ]
266
- })] }) : B === "avatar" && D ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
267
+ })] }) : B === "avatar" && k ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
267
268
  className: "flex shrink-0 items-center gap-1 border-b border-border-default bg-bg-elevated px-1 py-2",
268
269
  children: [
269
- /* @__PURE__ */ v("button", {
270
+ /* @__PURE__ */ x("button", {
270
271
  type: "button",
271
272
  onClick: X,
272
- className: `${x} size-11`,
273
- "aria-label": j("menuView.back", "Back"),
273
+ className: `${w} size-11`,
274
+ "aria-label": N("menuView.back", "Back"),
274
275
  "data-testid": "assistant-menu-subview-back",
275
- children: /* @__PURE__ */ v(f, {
276
+ children: /* @__PURE__ */ x(g, {
276
277
  className: "size-5",
277
278
  "aria-hidden": "true"
278
279
  })
279
280
  }),
280
- /* @__PURE__ */ y("div", {
281
+ /* @__PURE__ */ S("div", {
281
282
  className: "min-w-0 flex-1",
282
- children: [/* @__PURE__ */ v("p", {
283
+ children: [/* @__PURE__ */ x("p", {
283
284
  className: "text-xs text-text-secondary",
284
- children: j("menuView.settings", "Settings")
285
- }), /* @__PURE__ */ v("h2", {
285
+ children: N("menuView.settings", "Settings")
286
+ }), /* @__PURE__ */ x("h2", {
286
287
  ref: H,
287
288
  tabIndex: -1,
288
289
  className: "text-base font-semibold text-text-primary outline-none",
289
290
  "data-testid": "assistant-avatar-settings-heading",
290
- children: j("menuView.avatar", "Avatar")
291
+ children: N("menuView.avatar", "Avatar")
291
292
  })]
292
293
  }),
293
- /* @__PURE__ */ v("button", {
294
+ O ? /* @__PURE__ */ x("button", {
294
295
  type: "button",
295
- onClick: E,
296
- className: `${x} size-11`,
297
- "aria-label": j("header.close", "Close assistant"),
296
+ onClick: O,
297
+ className: `${w} size-11`,
298
+ "aria-label": N("header.close", "Close assistant"),
298
299
  "data-testid": "assistant-avatar-settings-close",
299
- children: /* @__PURE__ */ v(g, {
300
+ children: /* @__PURE__ */ x(y, {
300
301
  className: "size-5",
301
302
  "aria-hidden": "true"
302
303
  })
303
- })
304
+ }) : null
304
305
  ]
305
- }), /* @__PURE__ */ v("div", {
306
+ }), /* @__PURE__ */ x("div", {
306
307
  className: "scrollbar-slim min-h-0 min-w-0 flex-1 overflow-y-auto",
307
308
  "data-testid": "assistant-avatar-settings-scroll",
308
- children: /* @__PURE__ */ v(D, { navigate: he })
309
- })] }) : B === "voice-language" ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(fe, {
310
- title: j("menuView.voiceLanguage", "Voice & language"),
311
- tr: j,
309
+ children: /* @__PURE__ */ x(k, { navigate: ve })
310
+ })] }) : B === "voice-language" ? /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(fe, {
311
+ title: N("menuView.voiceLanguage", "Voice & language"),
312
+ tr: N,
312
313
  onBack: X,
313
314
  backRef: G
314
- }), /* @__PURE__ */ v("div", {
315
+ }), /* @__PURE__ */ x("div", {
315
316
  className: "scrollbar-slim min-h-0 flex-1 overflow-y-auto",
316
- children: /* @__PURE__ */ v(s, {})
317
- })] }) : /* @__PURE__ */ v(te, {
317
+ children: /* @__PURE__ */ x(ne, {})
318
+ })] }) : /* @__PURE__ */ x(ee, {
318
319
  presentation: "compact",
319
320
  onBack: X,
320
- onDone: l
321
+ onDone: m
321
322
  })
322
323
  })
323
324
  });
324
325
  };
325
- export { E as AssistantMenuView };
326
+ export { O as AssistantMenuView };
@@ -0,0 +1,13 @@
1
+ import { FC, ReactNode, Ref } from 'react';
2
+ export interface AssistantPageBarProps {
3
+ menuOpen: boolean;
4
+ menuViewId?: string;
5
+ onOpenMenu: () => void;
6
+ menuButtonRef?: Ref<HTMLButtonElement>;
7
+ /** The Chat | Avatar switch, or nothing where the avatar is not offered. */
8
+ viewSwitch?: ReactNode;
9
+ conversationMenu: ReactNode;
10
+ onTogglePreview?: () => void;
11
+ previewOpen?: boolean;
12
+ }
13
+ export declare const AssistantPageBar: FC<AssistantPageBarProps>;
@@ -0,0 +1,46 @@
1
+ import { useAssistantTr as e } from "../../i18n.js";
2
+ import { useAssistantPreview as t } from "../../preview/context.js";
3
+ import { hasAssistantPreviewSurface as n } from "../../preview/types.js";
4
+ import { Eye as r, Menu as i } from "lucide-react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
6
+ // src/shared/assistant/ui/compact/AssistantPageBar.tsx
7
+ var s = "flex size-10 shrink-0 items-center justify-center rounded-button transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", c = "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", l = "bg-action-primary-bg/15 text-action-primary-bg", u = ({ menuOpen: u, menuViewId: d, onOpenMenu: f, menuButtonRef: p, viewSwitch: m, conversationMenu: h, onTogglePreview: g, previewOpen: _ }) => {
8
+ let v = e(), y = t();
9
+ return /* @__PURE__ */ o("div", {
10
+ className: "flex min-h-14 shrink-0 items-center gap-1 px-2 py-2 sm:px-3",
11
+ "data-testid": "assistant-page-bar",
12
+ "data-presentation": "page",
13
+ children: [
14
+ /* @__PURE__ */ a("button", {
15
+ ref: p,
16
+ type: "button",
17
+ onClick: f,
18
+ className: `${s} ${c}`,
19
+ "aria-label": v("header.menu", "Assistant menu"),
20
+ "aria-expanded": u,
21
+ "aria-controls": u ? d : void 0,
22
+ "data-testid": "assistant-menu",
23
+ children: /* @__PURE__ */ a(i, {
24
+ className: "size-5",
25
+ "aria-hidden": "true"
26
+ })
27
+ }),
28
+ m ?? null,
29
+ /* @__PURE__ */ a("span", { className: "flex-1" }),
30
+ n(y) && g ? /* @__PURE__ */ a("button", {
31
+ type: "button",
32
+ onClick: g,
33
+ className: `${s} ${_ ? l : c}`,
34
+ "aria-label": y.label ?? v("header.preview", "Preview"),
35
+ "aria-pressed": !!_,
36
+ "data-testid": "assistant-toggle-preview",
37
+ children: /* @__PURE__ */ a(r, {
38
+ className: "size-5",
39
+ "aria-hidden": "true"
40
+ })
41
+ }) : null,
42
+ h
43
+ ]
44
+ });
45
+ };
46
+ export { u as AssistantPageBar };
@@ -14,5 +14,10 @@ export interface AssistantViewSwitchProps {
14
14
  readonly ids: LiveAvatarTabIds;
15
15
  /** Where this instance sits: the composer (`chat`), or inside the Avatar view (`avatar`, ids with a suffix). */
16
16
  readonly instance: 'chat' | 'avatar';
17
+ /**
18
+ * BOFF-13461: `bar` is the page's bar (`AssistantPageBar`), where it is the one instance (`chat` ids) and needs no row of its own.
19
+ * Absent or `row`: the centred row above the composer, as before.
20
+ */
21
+ readonly placement?: 'row' | 'bar';
17
22
  }
18
23
  export declare const AssistantViewSwitch: FC<AssistantViewSwitchProps>;
@@ -11,17 +11,17 @@ function s(e) {
11
11
  avatarTab: `${e.avatarTab}${o}`
12
12
  };
13
13
  }
14
- var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-center rounded-full px-5 text-base font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10 sm:min-w-[5.75rem] sm:text-[15px]", u = ({ selected: o, onSelect: u, ids: d, instance: f }) => {
15
- let p = e(), m = n(r()), h = i({}), g = f === "avatar" ? s(d) : d, _ = o === "avatar" && m, v = (e, n) => {
14
+ var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-center rounded-full px-5 text-base font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] sm:h-10 sm:min-w-[5.75rem] sm:text-[15px]", u = ({ selected: o, onSelect: u, ids: d, instance: f, placement: p = "row" }) => {
15
+ let m = e(), h = n(r()), g = i({}), _ = f === "avatar" ? s(d) : d, v = o === "avatar" && h, y = (e, n) => {
16
16
  let r = getComputedStyle(e.currentTarget).direction === "rtl", i = t(e.key, c, n, r), a = c.find((e) => e === i);
17
- a !== void 0 && (e.preventDefault(), h.current[a]?.focus());
17
+ a !== void 0 && (e.preventDefault(), g.current[a]?.focus());
18
18
  };
19
19
  return /* @__PURE__ */ a("div", {
20
- className: "flex shrink-0 justify-center px-3 pb-2.5 pt-1",
20
+ className: p === "bar" ? "flex shrink-0" : "flex shrink-0 justify-center px-3 pb-2.5 pt-1",
21
21
  "data-testid": `assistant-view-switch-row-${f}`,
22
22
  children: /* @__PURE__ */ a("div", {
23
23
  role: "tablist",
24
- "aria-label": p.tabsLabel,
24
+ "aria-label": m.tabsLabel,
25
25
  className: "inline-flex gap-0.5 rounded-full border border-action-primary-bg/45 bg-[var(--color-accent-soft)] p-1",
26
26
  "data-testid": "assistant-view-switch",
27
27
  "data-instance": f,
@@ -29,23 +29,23 @@ var c = ["chat", "avatar"], l = "inline-flex h-11 min-w-24 items-center justify-
29
29
  let t = e === o, n = e === "chat";
30
30
  return /* @__PURE__ */ a("button", {
31
31
  ref: (t) => {
32
- h.current[e] = t;
32
+ g.current[e] = t;
33
33
  },
34
34
  type: "button",
35
35
  role: "tab",
36
- id: n ? g.chatTab : g.avatarTab,
36
+ id: n ? _.chatTab : _.avatarTab,
37
37
  "aria-selected": t,
38
38
  "aria-controls": n ? d.chatPanel : d.avatarPanel,
39
- "aria-describedby": n && _ ? d.leaveHint : void 0,
40
- title: n && _ ? p.tabLeaveHint : void 0,
39
+ "aria-describedby": n && v ? d.leaveHint : void 0,
40
+ title: n && v ? m.tabLeaveHint : void 0,
41
41
  tabIndex: t ? 0 : -1,
42
42
  onClick: () => {
43
43
  t || u(e);
44
44
  },
45
- onKeyDown: (t) => v(t, e),
45
+ onKeyDown: (t) => y(t, e),
46
46
  className: `${l} ${t ? "bg-bg-sunken text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
47
47
  "data-testid": n ? "assistant-view-chat" : "assistant-view-avatar",
48
- children: n ? p.tabChat : p.tabAvatar
48
+ children: n ? m.tabChat : m.tabAvatar
49
49
  }, e);
50
50
  })
51
51
  })
@@ -1,13 +1,17 @@
1
1
  import { AssistantAiDisclaimer as e } from "../AssistantAiDisclaimer.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
+ import { PAGE_COLUMN as t, useAssistantPageLayout as n } from "../assistantPageLayout.js";
3
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
3
4
  // src/shared/assistant/ui/composer/AssistantCompactFooter.tsx
4
- var r = ({ children: r }) => /* @__PURE__ */ t("div", {
5
- className: "mx-3 mb-2 mt-1.5 shrink-0",
6
- "data-testid": "assistant-composer-footer",
7
- children: /* @__PURE__ */ n("div", {
8
- className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5 text-center [&_p]:max-w-full [&_p]:text-xs [&_p]:leading-4",
9
- "data-testid": "assistant-composer-footer-content",
10
- children: [/* @__PURE__ */ t(e, {}), r]
11
- })
12
- });
13
- export { r as AssistantCompactFooter };
5
+ var a = ({ children: a }) => {
6
+ let o = n();
7
+ return /* @__PURE__ */ r("div", {
8
+ className: o ? `mb-2 mt-1.5 shrink-0 px-3 ${t}` : "mx-3 mb-2 mt-1.5 shrink-0",
9
+ "data-testid": "assistant-composer-footer",
10
+ children: /* @__PURE__ */ i("div", {
11
+ className: "flex flex-wrap items-center justify-center gap-x-2 gap-y-0.5 text-center [&_p]:max-w-full [&_p]:text-xs [&_p]:leading-4",
12
+ "data-testid": "assistant-composer-footer-content",
13
+ children: [/* @__PURE__ */ r(e, {}), a]
14
+ })
15
+ });
16
+ };
17
+ export { a as AssistantCompactFooter };