@alxxsck/ai-assistant 2.26.0 → 3.0.0

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 (48) hide show
  1. package/dist/{Avatar-Cr3PsHzw.js → Avatar-Bsv7Y3ZQ.js} +19082 -18842
  2. package/dist/{ChatWidgetContent-DJ2Y9kKV.js → ChatWidgetContent-Cq2Y5IHt.js} +2837 -2578
  3. package/dist/api/audio.api.d.ts +1 -1
  4. package/dist/avatar/AnimationManager.d.ts +7 -3
  5. package/dist/avatar/Avatar.d.ts +20 -3
  6. package/dist/avatar/avatarMeshes.d.ts +8 -0
  7. package/dist/avatar/loaders.d.ts +16 -0
  8. package/dist/bridge-ai-chat-widget.es.js +1 -1
  9. package/dist/constants.d.ts +1 -0
  10. package/dist/context/ChatWidgetContext.d.ts +0 -2
  11. package/dist/domain/message/message.store.d.ts +3 -0
  12. package/dist/domain/speech/SpeechPlayer.d.ts +2 -0
  13. package/dist/domain/ui/widget-geometry.d.ts +7 -5
  14. package/dist/domain/voice/media/ReliableVoiceUplink.d.ts +4 -0
  15. package/dist/domain/voice/voice-audio-meter.d.ts +12 -0
  16. package/dist/domain/voice/voice.store.d.ts +5 -1
  17. package/dist/i18n/messages.d.ts +5 -2
  18. package/dist/index-DY_Y_QHI.js +2825 -0
  19. package/dist/index.d.ts +1 -0
  20. package/dist/inter-cyrillic-wght-italic.woff2 +0 -0
  21. package/dist/inter-cyrillic-wght-normal.woff2 +0 -0
  22. package/dist/inter-latin-ext-wght-italic.woff2 +0 -0
  23. package/dist/inter-latin-ext-wght-normal.woff2 +0 -0
  24. package/dist/inter-latin-wght-italic.woff2 +0 -0
  25. package/dist/inter-latin-wght-normal.woff2 +0 -0
  26. package/dist/{mount-DCjHLj_e.js → mount-RA3wsImP.js} +6415 -5939
  27. package/dist/roboto-cyrillic-400-normal.woff2 +0 -0
  28. package/dist/roboto-cyrillic-700-normal.woff2 +0 -0
  29. package/dist/roboto-latin-400-normal.woff2 +0 -0
  30. package/dist/roboto-latin-700-normal.woff2 +0 -0
  31. package/dist/roboto-latin-ext-400-normal.woff2 +0 -0
  32. package/dist/roboto-latin-ext-700-normal.woff2 +0 -0
  33. package/dist/ui/components/ChatListItem.d.ts +4 -1
  34. package/dist/ui/components/ChatSurfaceFrameContext.d.ts +6 -0
  35. package/dist/ui/components/ChatTopControls.d.ts +5 -5
  36. package/dist/ui/components/ChatVoiceMode.d.ts +5 -1
  37. package/dist/ui/components/ChatWidgetFrame.d.ts +3 -3
  38. package/dist/ui/components/VoiceComposer.d.ts +18 -0
  39. package/dist/ui/components/voice-waveform.d.ts +15 -0
  40. package/dist/ui/responder-visual-state.d.ts +7 -0
  41. package/dist/widget-fonts-CFulYNmT.js +16 -0
  42. package/dist/widget-fonts.d.ts +1 -0
  43. package/package.json +6 -2
  44. package/dist/avatar/consolidateMaterialGroups.d.ts +0 -2
  45. package/dist/index-D01wjcEK.js +0 -2809
  46. package/dist/ui/chat-composer-layout.d.ts +0 -1
  47. package/dist/ui/components/overlays/ChatBlurOverlayTop.d.ts +0 -1
  48. package/dist/ui/components/overlays/ChatDarkOverlay.d.ts +0 -1
@@ -1,7 +1,10 @@
1
- import type { MessageData } from "@/api/messages.api.types";
1
+ import { type MessageData } from "@/api/messages.api.types";
2
+ import type { SafeResponderPresentation } from "@/domain/support-presentation/support-presentation.types";
2
3
  export interface ChatListItemProps {
3
4
  threadId: string;
5
+ title: string | null;
4
6
  message: MessageData;
7
+ responderPresentation: SafeResponderPresentation;
5
8
  isSelected?: boolean;
6
9
  onSelect: (threadId: string) => void;
7
10
  }
@@ -0,0 +1,6 @@
1
+ export type ChatSurfacePresentation = "viewport" | "windowed";
2
+ export type ChatSurfaceFrameValue = {
3
+ presentation: ChatSurfacePresentation;
4
+ };
5
+ export declare const ChatSurfaceFrameContext: import("react").Context<ChatSurfaceFrameValue>;
6
+ export declare function useChatSurfaceFrame(): ChatSurfaceFrameValue;
@@ -1,9 +1,9 @@
1
1
  type ChatTopControlsLayoutProps = {
2
- left: React.ReactNode;
3
- center: React.ReactNode;
4
- right: React.ReactNode;
5
- isMobile: boolean;
2
+ identity: React.ReactNode;
3
+ actions: React.ReactNode;
4
+ draggable?: boolean;
5
+ dragLabel?: string;
6
6
  };
7
- export declare function ChatTopControlsLayout({ left, center, right, isMobile, }: ChatTopControlsLayoutProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function ChatTopControlsLayout({ identity, actions, draggable, dragLabel, }: ChatTopControlsLayoutProps): import("react/jsx-runtime").JSX.Element;
8
8
  export declare function ChatTopControls({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1 +1,5 @@
1
- export declare function ChatVoiceMode({ className }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
1
+ type ChatVoiceModeProps = React.ComponentProps<"div"> & {
2
+ freezePresentation?: boolean;
3
+ };
4
+ export declare function ChatVoiceMode({ className, freezePresentation, }: ChatVoiceModeProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -1,9 +1,9 @@
1
1
  import type { PropsWithChildren } from "react";
2
+ import { type ChatSurfacePresentation } from "./ChatSurfaceFrameContext";
2
3
  type ChatWidgetFrameProps = PropsWithChildren<{
3
4
  open: boolean;
4
5
  onOpenChange: (open: boolean) => void;
5
- isMobile: boolean;
6
- fullscreen: boolean;
6
+ presentation: ChatSurfacePresentation;
7
7
  hideOpenButton: boolean;
8
8
  loadingProgress: number;
9
9
  launcherImageSrc: string;
@@ -17,5 +17,5 @@ type ChatWidgetFrameProps = PropsWithChildren<{
17
17
  onLauncherDragSuspended?: (suspended: boolean) => void;
18
18
  onCompactPreviewCollapse?: () => void;
19
19
  }>;
20
- export declare function ChatWidgetFrame({ open, onOpenChange, isMobile, fullscreen, hideOpenButton, loadingProgress, launcherImageSrc, unreadIndicator, launcherDescriptionId, compactPreview, compactPreviewAnnouncement, compactPreviewCollapsible, compactPreviewSuspended, storageScope, onLauncherDragSuspended, onCompactPreviewCollapse, children, }: ChatWidgetFrameProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function ChatWidgetFrame({ open, onOpenChange, presentation, hideOpenButton, loadingProgress, launcherImageSrc, unreadIndicator, launcherDescriptionId, compactPreview, compactPreviewAnnouncement, compactPreviewCollapsible, compactPreviewSuspended, storageScope, onLauncherDragSuspended, onCompactPreviewCollapse, children, }: ChatWidgetFrameProps): import("react/jsx-runtime").JSX.Element;
21
21
  export {};
@@ -0,0 +1,18 @@
1
+ import { type VoiceAudioMeter } from "@/domain/voice/voice-audio-meter";
2
+ import { type VoiceAssistantActivity, type VoiceComposerPhase } from "./voice-waveform";
3
+ export type { VoiceAssistantActivity, VoiceComposerPhase, } from "./voice-waveform";
4
+ type VoiceComposerProps = {
5
+ phase?: VoiceComposerPhase;
6
+ assistantActivity?: VoiceAssistantActivity;
7
+ microphoneEnabled?: boolean;
8
+ statusLabel: string;
9
+ microphoneLabel: string;
10
+ closeLabel: string;
11
+ disabled?: boolean;
12
+ frozen?: boolean;
13
+ onToggleMicrophone: () => void;
14
+ onClose: () => void;
15
+ className?: string;
16
+ meter?: Pick<VoiceAudioMeter, "read" | "subscribe">;
17
+ };
18
+ export declare function VoiceComposer({ phase, assistantActivity, microphoneEnabled, statusLabel, microphoneLabel, closeLabel, disabled, frozen, onToggleMicrophone, onClose, className, meter, }: VoiceComposerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ export type VoiceComposerPhase = "connecting" | "ready";
2
+ export type VoiceAssistantActivity = "idle" | "thinking" | "speaking";
3
+ export declare const VOICE_SIDE_BAR_HEIGHTS: readonly [12, 5, 9, 18, 20, 5, 3, 7, 18, 9, 3];
4
+ export declare const VOICE_CENTER_BAR_HEIGHTS: readonly [5, 18, 32, 24, 5];
5
+ export type VoiceWaveformFrame = Readonly<{
6
+ sideHeights: readonly number[];
7
+ centerHeights: readonly number[];
8
+ }>;
9
+ type VoiceWaveformLevels = Readonly<{
10
+ inputLevel: number;
11
+ outputLevel: number;
12
+ microphoneEnabled: boolean;
13
+ }>;
14
+ export declare function createVoiceWaveformFrame({ inputLevel, outputLevel, microphoneEnabled, }: VoiceWaveformLevels): VoiceWaveformFrame;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { ResponderDisplayModel } from "@/ui/hooks/usePresentedResponderPresentation";
2
+ /**
3
+ * The visual handoff starts as soon as human support is routing or assigned.
4
+ * AI suspension is kept as an independent authority signal, but produces the
5
+ * same quiet, avatar-free chat presentation.
6
+ */
7
+ export declare function usesHumanSupportVisualState(presentation: Pick<ResponderDisplayModel, "contractState" | "humanSupport" | "ai">, assistantSuspended?: boolean): boolean;
@@ -0,0 +1,16 @@
1
+ const n = "@font-face{font-family:Lola Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(" + new URL("./inter-cyrillic-wght-normal.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Lola Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(' + new URL("./inter-latin-ext-wght-normal.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lola Inter;font-style:normal;font-display:swap;font-weight:100 900;src:url(' + new URL("./inter-latin-wght-normal.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lola Inter;font-style:italic;font-display:swap;font-weight:100 900;src:url(' + new URL("./inter-cyrillic-wght-italic.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Lola Inter;font-style:italic;font-display:swap;font-weight:100 900;src:url(' + new URL("./inter-latin-ext-wght-italic.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lola Inter;font-style:italic;font-display:swap;font-weight:100 900;src:url(' + new URL("./inter-latin-wght-italic.woff2", import.meta.url).href + ') format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(' + new URL("./roboto-cyrillic-400-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(' + new URL("./roboto-latin-ext-400-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:400;src:url(' + new URL("./roboto-latin-400-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(' + new URL("./roboto-cyrillic-700-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(' + new URL("./roboto-latin-ext-700-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Lola Roboto;font-style:normal;font-display:swap;font-weight:700;src:url(' + new URL("./roboto-latin-700-normal.woff2", import.meta.url).href + ') format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}', r = "data-lola-widget-fonts", f = /* @__PURE__ */ new WeakMap();
2
+ function a(o) {
3
+ let t = f.get(o);
4
+ if (!t) {
5
+ const U = o.createElement("style");
6
+ U.setAttribute(r, ""), U.textContent = n, o.head.appendChild(U), t = { references: 0, style: U }, f.set(o, t);
7
+ }
8
+ t.references += 1;
9
+ let e = !1;
10
+ return () => {
11
+ e || (e = !0, t.references -= 1, !(t.references > 0) && (t.style.remove(), f.delete(o)));
12
+ };
13
+ }
14
+ export {
15
+ a as installWidgetFontStyles
16
+ };
@@ -0,0 +1 @@
1
+ export declare function installWidgetFontStyles(document: Document): () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alxxsck/ai-assistant",
3
3
  "private": false,
4
- "version": "2.26.0",
4
+ "version": "3.0.0",
5
5
  "description": "Embeddable Lola AI assistant library",
6
6
  "type": "module",
7
7
  "main": "dist/bridge-ai-chat-widget.es.js",
@@ -39,7 +39,9 @@
39
39
  "build-lib": "vite build --config vite.config.lib.ts --mode production && tsc -p tsconfig.build.json && npm run verify:release-bundle",
40
40
  "verify:release-bundle": "node scripts/verify-library-release.mjs",
41
41
  "prepublishOnly": "npm run build-lib",
42
- "push-assets-metamediastatic": "bash scripts/push-assets-to-metamediastatic.sh"
42
+ "push-assets-metamediastatic": "bash scripts/push-assets-to-metamediastatic.sh",
43
+ "assets:optimize": "node scripts/asset-pipeline/optimize-assets.mjs",
44
+ "assets:verify": "node scripts/asset-pipeline/verify-animations.mjs && node scripts/asset-pipeline/verify-render.mjs"
43
45
  },
44
46
  "dependencies": {
45
47
  "@anycable/web": "^1.1.0",
@@ -64,6 +66,8 @@
64
66
  "devDependencies": {
65
67
  "@axe-core/playwright": "^4.11.1",
66
68
  "@eslint/js": "^9.39.1",
69
+ "@fontsource-variable/inter": "^5.3.0",
70
+ "@fontsource/roboto": "^5.3.0",
67
71
  "@playwright/test": "^1.62.0",
68
72
  "@tailwindcss/postcss": "^4.1.18",
69
73
  "@tailwindcss/vite": "^4.1.18",
@@ -1,2 +0,0 @@
1
- import type { BufferGeometry } from "three";
2
- export declare function consolidateMaterialGroups(geometry: BufferGeometry): boolean;