@burdenoff/fe-libs 2026.1029.10 → 2026.1030.1

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 (43) hide show
  1. package/dist/shared/assistant/i18nManifest.d.ts +22 -0
  2. package/dist/shared/assistant/i18nManifest.js +22 -0
  3. package/dist/shared/assistant/index.d.ts +6 -0
  4. package/dist/shared/assistant/ui/AIAssistantPanel.d.ts +26 -0
  5. package/dist/shared/assistant/ui/AIAssistantPanel.js +197 -160
  6. package/dist/shared/assistant/ui/AssistantChatArea.d.ts +33 -0
  7. package/dist/shared/assistant/ui/AssistantChatArea.js +1463 -1397
  8. package/dist/shared/assistant/ui/AssistantLanguageMenu.d.ts +9 -1
  9. package/dist/shared/assistant/ui/AssistantLanguageMenu.js +22 -22
  10. package/dist/shared/assistant/ui/AssistantOverlay.d.ts +91 -3
  11. package/dist/shared/assistant/ui/AssistantOverlay.js +347 -127
  12. package/dist/shared/assistant/ui/assistantOverlayState.d.ts +224 -0
  13. package/dist/shared/assistant/ui/assistantOverlayState.js +116 -29
  14. package/dist/shared/assistant/ui/compact/AssistantConversationMenu.js +53 -52
  15. package/dist/shared/assistant/ui/compact/AssistantDiscardDraftDialog.js +3 -4
  16. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.d.ts +29 -0
  17. package/dist/shared/assistant/ui/compact/AssistantLanguagePill.js +98 -0
  18. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.d.ts +31 -0
  19. package/dist/shared/assistant/ui/compact/AssistantVoiceReady.js +41 -0
  20. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.d.ts +6 -0
  21. package/dist/shared/assistant/ui/compact/AssistantWaitingChangeRow.js +5 -5
  22. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.d.ts +36 -0
  23. package/dist/shared/assistant/ui/compact/AssistantWindowHeader.js +68 -0
  24. package/dist/shared/assistant/ui/compact/windowView.d.ts +50 -0
  25. package/dist/shared/assistant/ui/compact/windowView.js +31 -0
  26. package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.d.ts +8 -0
  27. package/dist/shared/assistant/ui/composer/AssistantAttachmentButton.js +34 -34
  28. package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +6 -0
  29. package/dist/shared/assistant/ui/composer/AssistantComposer.js +92 -90
  30. package/dist/shared/assistant/ui/composer/AssistantModeMenu.d.ts +6 -0
  31. package/dist/shared/assistant/ui/composer/AssistantModeMenu.js +83 -83
  32. package/dist/shared/assistant/ui/useAssistantVisualViewport.d.ts +3 -0
  33. package/dist/shared/assistant/ui/useAssistantVisualViewport.js +24 -0
  34. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +31 -0
  35. package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +270 -166
  36. package/dist/shared/assistant/ui/voice/VoiceStage.d.ts +8 -0
  37. package/dist/shared/assistant/ui/voice/VoiceStage.js +10 -10
  38. package/dist/shared/assistant/voice/voiceStartedCue.d.ts +11 -0
  39. package/dist/shared/assistant/voice/voiceStartedCue.js +7 -0
  40. package/dist/shared-assistant.js +266 -260
  41. package/dist/ui/modal-shell.d.ts +6 -1
  42. package/dist/ui/modal-shell.js +7 -6
  43. package/package.json +1 -1
@@ -23,4 +23,12 @@ import { FC } from 'react';
23
23
  * already scrolls, searches and localises itself — worth far more across nine
24
24
  * Indic languages than a custom dropdown that reimplements all three badly.
25
25
  */
26
- export declare const AssistantLanguageMenu: FC;
26
+ export interface AssistantLanguageMenuProps {
27
+ /**
28
+ * BOFF-10180 (the Quick assistant window's language pill, CW-L): the input
29
+ * language ONLY. A pinned reply language stays in the full assistant, so its
30
+ * row is not drawn. Absent: both rows, exactly as before.
31
+ */
32
+ inputOnly?: boolean;
33
+ }
34
+ export declare const AssistantLanguageMenu: FC<AssistantLanguageMenuProps>;
@@ -7,17 +7,17 @@ import { useMemo as a } from "react";
7
7
  import { Languages as o } from "lucide-react";
8
8
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
9
  //#region src/shared/assistant/ui/AssistantLanguageMenu.tsx
10
- var l = "__match__", u = () => {
11
- let u = t(), { locale: d } = e(), f = n((e) => e.assistantLanguage), p = n((e) => e.setAssistantLanguage), m = n((e) => e.replyLanguage), h = n((e) => e.setReplyLanguage), g = a(() => i(f, m, d), [
12
- f,
13
- m,
14
- d
15
- ]), _ = u("language.inputLabel", "Language"), v = u("language.replyLabel", "Assistant replies in"), y = f ?? "";
10
+ var l = "__match__", u = ({ inputOnly: u = !1 }) => {
11
+ let d = t(), { locale: f } = e(), p = n((e) => e.assistantLanguage), m = n((e) => e.setAssistantLanguage), h = n((e) => e.replyLanguage), g = n((e) => e.setReplyLanguage), _ = a(() => i(p, h, f), [
12
+ p,
13
+ h,
14
+ f
15
+ ]), v = d("language.inputLabel", "Language"), y = d("language.replyLabel", "Assistant replies in"), b = p ?? "";
16
16
  return /* @__PURE__ */ c("div", {
17
17
  "data-testid": "assistant-language-menu",
18
18
  children: [/* @__PURE__ */ c("label", {
19
19
  className: "relative flex cursor-pointer items-center gap-2.5 px-3 py-2 text-xs text-text-primary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
20
- title: `${_}: ${g.input.label}`,
20
+ title: `${v}: ${_.input.label}`,
21
21
  "data-testid": "assistant-input-language",
22
22
  children: [
23
23
  /* @__PURE__ */ s(o, {
@@ -26,56 +26,56 @@ var l = "__match__", u = () => {
26
26
  }),
27
27
  /* @__PURE__ */ s("span", {
28
28
  className: "flex-1",
29
- children: _
29
+ children: v
30
30
  }),
31
31
  /* @__PURE__ */ s("span", {
32
32
  className: "text-text-muted",
33
- children: g.input.label
33
+ children: _.input.label
34
34
  }),
35
35
  /* @__PURE__ */ c("select", {
36
- "aria-label": _,
37
- value: y,
36
+ "aria-label": v,
37
+ value: b,
38
38
  onChange: (e) => {
39
39
  let t = e.target.value;
40
- p(t === "" ? null : t);
40
+ m(t === "" ? null : t);
41
41
  },
42
42
  className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
43
43
  children: [/* @__PURE__ */ s("option", {
44
44
  value: "",
45
- children: u("voice.languageFollowApp", "Same as interface")
45
+ children: d("voice.languageFollowApp", "Same as interface")
46
46
  }), r.map((e) => /* @__PURE__ */ s("option", {
47
47
  value: e.code,
48
48
  children: e.label
49
49
  }, e.code))]
50
50
  })
51
51
  ]
52
- }), /* @__PURE__ */ c("label", {
52
+ }), u ? null : /* @__PURE__ */ c("label", {
53
53
  className: "relative flex cursor-pointer items-center gap-2.5 py-2 pl-9 pr-3 text-xs text-text-secondary transition-colors hover:bg-bg-elevated focus-within:ring-2 focus-within:ring-border-strong",
54
- title: `${v}: ${g.reply.english}`,
54
+ title: `${y}: ${_.reply.english}`,
55
55
  "data-testid": "assistant-reply-language",
56
56
  children: [
57
57
  /* @__PURE__ */ s("span", {
58
58
  className: "flex-1",
59
- children: v
59
+ children: y
60
60
  }),
61
61
  /* @__PURE__ */ s("span", {
62
62
  className: "text-text-muted",
63
- children: m === null ? `${u("language.replyMatch", "Match my language")} (${g.reply.label})` : g.reply.label
63
+ children: h === null ? `${d("language.replyMatch", "Match my language")} (${_.reply.label})` : _.reply.label
64
64
  }),
65
65
  /* @__PURE__ */ c("select", {
66
- "aria-label": v,
67
- value: m ?? l,
66
+ "aria-label": y,
67
+ value: h ?? l,
68
68
  onChange: (e) => {
69
69
  let t = e.target.value;
70
- h(t === l ? null : t);
70
+ g(t === l ? null : t);
71
71
  },
72
72
  className: "absolute inset-0 cursor-pointer opacity-0 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
73
73
  children: [/* @__PURE__ */ c("option", {
74
74
  value: l,
75
75
  children: [
76
- u("language.replyMatch", "Match my language"),
76
+ d("language.replyMatch", "Match my language"),
77
77
  " (",
78
- g.input.label,
78
+ _.input.label,
79
79
  ")"
80
80
  ]
81
81
  }), r.map((e) => /* @__PURE__ */ s("option", {
@@ -2,7 +2,8 @@ import { ReactNode } from 'react';
2
2
  import { QuotaKind } from '../quota';
3
3
  import { AIAssistantPanelProps } from './AIAssistantPanel';
4
4
  import { AssistantNavigate } from './AssistantMarkdownRenderer';
5
- import { AssistantOverlayKeys } from './assistantOverlayState';
5
+ import { AssistantPresentation } from './composer/AssistantComposer';
6
+ import { AssistantOverlayKeys, AssistantSurface, AssistantWindowView } from './assistantOverlayState';
6
7
  export interface AssistantOverlayContextValue {
7
8
  isOpen: boolean;
8
9
  open: () => void;
@@ -29,6 +30,53 @@ export interface AssistantOverlayContextValue {
29
30
  * that builds this value itself keeps compiling.
30
31
  */
31
32
  registerCloseGuard?: (guard: () => boolean) => () => void;
33
+ /** How the assistant is presented. `classic` unless the provider was given `compact`. */
34
+ presentation: AssistantPresentation;
35
+ /**
36
+ * BOFF-10178: what the open assistant is showing, in the ONE container it
37
+ * always renders: the Quick assistant `window` or the full `panel`. Always
38
+ * `panel` in the classic presentation. Session-scoped, like `isOpen`.
39
+ */
40
+ surface: AssistantSurface;
41
+ /** The Quick assistant window is hidden but mounted (compact only; false in classic). */
42
+ minimized: boolean;
43
+ /**
44
+ * The FULL assistant is open and showing: the state a header button that
45
+ * opens it reports as `aria-expanded`. In classic: the same as `isOpen`.
46
+ */
47
+ fullOpen: boolean;
48
+ /**
49
+ * Open the FULL assistant, whatever it is doing now: closed, the Quick
50
+ * window, or minimized. The same instance is kept, so a draft and a turn in
51
+ * flight carry over. Idempotent. This is what Ctrl/Cmd+Shift+A, the
52
+ * `<prefix>:toggle-ai-assistant` event with `detail.open: true`, and a
53
+ * product's own header button call. In classic it is `open()`.
54
+ */
55
+ openFull: () => void;
56
+ /**
57
+ * Open the Quick assistant window — or, when it is minimized, bring it back.
58
+ * The launcher calls it. Does nothing to a full panel that is already open
59
+ * and, in classic, is `open()`.
60
+ */
61
+ openWindow: () => void;
62
+ /** Hide the Quick assistant window, keeping everything in it. A no-op for the full panel and in classic. */
63
+ minimize: () => void;
64
+ /**
65
+ * The full panel is Expanded to its fixed 760 px (compact, N2). Reported by
66
+ * the panel itself; per session, never stored. Always false in classic.
67
+ */
68
+ expanded: boolean;
69
+ setExpanded: (expanded: boolean) => void;
70
+ /**
71
+ * BOFF-10180 (CW-V): the Quick assistant window's LAST USED view, or null
72
+ * when none was ever chosen (the window then opens on Voice where voice is
73
+ * available, else on Chat). Remembered in localStorage, per profile, like the
74
+ * Dock/Float pick. Always null in classic. Optional, like `registerCloseGuard`, so a
75
+ * host that builds this value itself keeps compiling.
76
+ */
77
+ windowView?: AssistantWindowView | null;
78
+ /** Remember the window's view. A no-op in classic. */
79
+ setWindowView?: (view: AssistantWindowView) => void;
32
80
  }
33
81
  /** The overlay state in force, or null when no provider is mounted. */
34
82
  export declare function useAssistantOverlayOrNull(): AssistantOverlayContextValue | null;
@@ -73,6 +121,19 @@ export interface AssistantOverlayProviderProps {
73
121
  product: string;
74
122
  onExhausted: (kind: QuotaKind, event: Event) => void;
75
123
  };
124
+ /**
125
+ * BOFF-10178: how the overlay is presented. Absent or `classic`: the overlay
126
+ * of before, attribute for attribute (the eager write of the legacy dock key
127
+ * included). `compact` opts this product into the Quick assistant window, the
128
+ * `surface`, the N2 geometry, the D1-A layout rule, the published insets of
129
+ * the new geometry and the keyboard-aware sheet.
130
+ *
131
+ * ★ On the PROVIDER, not the overlay, because the provider owns what it
132
+ * changes (the open and layout state, the shortcut and the published
133
+ * variables). The overlay reads it from here and hands the panel
134
+ * `presentation="compact"` itself, so the two cannot disagree.
135
+ */
136
+ presentation?: AssistantPresentation;
76
137
  children: ReactNode;
77
138
  }
78
139
  /**
@@ -88,7 +149,7 @@ export interface AssistantOverlayProviderProps {
88
149
  * Mount ONE per page: the published dock width and panel inset are single
89
150
  * `<html>` variables.
90
151
  */
91
- export declare function AssistantOverlayProvider({ keyPrefix, quota, children, }: AssistantOverlayProviderProps): import('react/jsx-runtime').JSX.Element;
152
+ export declare function AssistantOverlayProvider({ keyPrefix, quota, presentation, children, }: AssistantOverlayProviderProps): import('react/jsx-runtime').JSX.Element;
92
153
  /** What the overlay hands the panel it renders. */
93
154
  export interface AssistantOverlayPanelProps {
94
155
  panelId: string;
@@ -99,7 +160,33 @@ export interface AssistantOverlayPanelProps {
99
160
  onNavigate?: AssistantNavigate;
100
161
  /** Opens in a new tab, leaving this page alone: a tap on it asks nothing (BOFF-8060 N4). */
101
162
  isShellLessTarget?: (path: string) => boolean;
163
+ /**
164
+ * Compact presentation only (BOFF-10178) — absent in classic, so a product's
165
+ * own `renderPanel` wrapper that spreads these onto the shared panel passes
166
+ * exactly what it passed before. The overlay's own values win over
167
+ * `panelProps`.
168
+ */
169
+ presentation?: AssistantPresentation;
170
+ /** Which surface this one panel is shown in. */
171
+ surface?: AssistantSurface;
172
+ /** The window's "Open full assistant": the same instance, shown as the full panel. */
173
+ onOpenFull?: () => void;
174
+ /** The window's "Minimize" (and its Escape): hidden, mounted, `visible` false. */
175
+ onMinimize?: () => void;
176
+ /** Told when Expand/Restore is pressed, so the container takes the N2 width. */
177
+ onExpandedChange?: (expanded: boolean) => void;
178
+ /** The window's last used view (CW-V), or null when none was ever chosen. */
179
+ windowView?: AssistantWindowView | null;
180
+ /** The window's view was chosen: remember it. */
181
+ onWindowViewChange?: (view: AssistantWindowView) => void;
102
182
  }
183
+ /**
184
+ * The props the overlay itself decides, which a product's `panelProps` may not
185
+ * set. `presentation` and `onExpandedChange` are NOT in it: both were already
186
+ * accepted in `panelProps` (Slice 2), and the overlay's value is merged over
187
+ * them only in the compact presentation.
188
+ */
189
+ type AssistantOverlayOwnedPanelProp = 'panelId' | 'visible' | 'onClose' | 'docked' | 'onToggleDock' | 'onNavigate' | 'isShellLessTarget' | 'surface' | 'onOpenFull' | 'onMinimize' | 'windowView' | 'onWindowViewChange';
103
190
  export interface AssistantOverlayProps {
104
191
  /** Panel id handed to the panel. */
105
192
  panelId?: string;
@@ -118,7 +205,7 @@ export interface AssistantOverlayProps {
118
205
  * closed panel's turns and deletes queued keeps going out, and a reopened
119
206
  * panel finds the list already current.
120
207
  */
121
- panelProps?: Omit<AIAssistantPanelProps, keyof AssistantOverlayPanelProps>;
208
+ panelProps?: Omit<AIAssistantPanelProps, AssistantOverlayOwnedPanelProp>;
122
209
  /**
123
210
  * Render something other than the shared `AIAssistantPanel` — a product
124
211
  * wrapper around it. Receives the props the overlay owns; spread them.
@@ -158,3 +245,4 @@ export interface AssistantOverlayProps {
158
245
  * `AssistantOverlayProvider` above it — there is no state to show.
159
246
  */
160
247
  export declare function AssistantOverlay(props: AssistantOverlayProps): import('react/jsx-runtime').JSX.Element | null;
248
+ export {};