@alxxsck/ai-assistant 2.23.0 → 2.24.2

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 (29) hide show
  1. package/README.md +16 -1
  2. package/dist/App.d.ts +5 -0
  3. package/dist/{Avatar-BiRx7xkN.js → Avatar-BA284XB-.js} +1 -1
  4. package/dist/{ChatWidgetContent-CtUehfbL.js → ChatWidgetContent-CdHhVe7P.js} +2327 -2408
  5. package/dist/bridge-ai-chat-widget.es.js +3 -3
  6. package/dist/context/ChatWidgetContext.d.ts +12 -3
  7. package/dist/domain/command/CommandRuntime.d.ts +10 -4
  8. package/dist/domain/command/command.types.d.ts +12 -0
  9. package/dist/domain/compact-preview/CompactPreviewController.d.ts +120 -0
  10. package/dist/domain/message/cable/CableContext.d.ts +16 -1
  11. package/dist/domain/message/cable/widget-frame.d.ts +9 -0
  12. package/dist/domain/message/message.store.d.ts +3 -2
  13. package/dist/domain/message/unread.d.ts +1 -0
  14. package/dist/domain/scenario/ScenarioChoiceSubmissionController.d.ts +49 -0
  15. package/dist/domain/scenario/scenario-choice.d.ts +6 -0
  16. package/dist/domain/scenario-interaction/ScenarioInteractionRuntime.d.ts +7 -1
  17. package/dist/domain/scenario-interaction/presentation-observer.d.ts +6 -1
  18. package/dist/domain/scenario-interaction/scenario-interaction.types.d.ts +10 -0
  19. package/dist/domain/ui/ui.service.d.ts +6 -5
  20. package/dist/domain/ui/widget-geometry.d.ts +28 -0
  21. package/dist/i18n/messages.d.ts +25 -2
  22. package/dist/index-Daw1CgNA.js +2208 -0
  23. package/dist/{index-DMOAaoVj.js → mount-CpU1-kfK.js} +8983 -8326
  24. package/dist/ui/components/ChatUnreadIndicator.d.ts +3 -1
  25. package/dist/ui/components/ChatWidgetFrame.d.ts +9 -1
  26. package/dist/ui/components/CompactPreviewSurface.d.ts +8 -0
  27. package/dist/ui/components/CompactScenarioPreview.d.ts +24 -0
  28. package/dist/ui/components/compact-preview-content.d.ts +10 -0
  29. package/package.json +1 -1
@@ -1 +1,3 @@
1
- export declare function ChatUnreadIndicator(): import("react/jsx-runtime").JSX.Element;
1
+ export declare function ChatUnreadIndicator({ descriptionId, }: {
2
+ descriptionId: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -8,6 +8,14 @@ type ChatWidgetFrameProps = PropsWithChildren<{
8
8
  loadingProgress: number;
9
9
  launcherImageSrc: string;
10
10
  unreadIndicator?: React.ReactNode;
11
+ launcherDescriptionId?: string;
12
+ compactPreview?: React.ReactNode;
13
+ compactPreviewAnnouncement?: string;
14
+ compactPreviewCollapsible?: boolean;
15
+ compactPreviewSuspended?: boolean;
16
+ storageScope?: string | null;
17
+ onLauncherDragSuspended?: (suspended: boolean) => void;
18
+ onCompactPreviewCollapse?: () => void;
11
19
  }>;
12
- export declare function ChatWidgetFrame({ open, onOpenChange, isMobile, fullscreen, hideOpenButton, loadingProgress, launcherImageSrc, unreadIndicator, children, }: ChatWidgetFrameProps): import("react/jsx-runtime").JSX.Element;
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;
13
21
  export {};
@@ -0,0 +1,8 @@
1
+ import type { CompactPreviewController, CompactPreviewSnapshot } from "@/domain/compact-preview/CompactPreviewController";
2
+ type CompactPreviewSurfaceProps = {
3
+ controller: CompactPreviewController;
4
+ snapshot: CompactPreviewSnapshot;
5
+ onOpenChat: () => void;
6
+ };
7
+ export declare function CompactPreviewSurface({ controller, snapshot, onOpenChat, }: CompactPreviewSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
8
+ export {};
@@ -0,0 +1,24 @@
1
+ import type { CompactPreviewCandidate, CompactPreviewPhase } from "@/domain/compact-preview/CompactPreviewController";
2
+ export type CompactScenarioPreviewLabels = {
3
+ region: string;
4
+ dismiss: string;
5
+ openChat: string;
6
+ choices: string;
7
+ };
8
+ export type CompactScenarioPreviewProps = {
9
+ candidate: CompactPreviewCandidate;
10
+ phase: CompactPreviewPhase;
11
+ onDismiss: () => void;
12
+ onOpenChat: () => void;
13
+ onChoice: (optionId: string) => void | Promise<void>;
14
+ onCta: () => void | Promise<void>;
15
+ onRenderedOverflow?: () => void;
16
+ disabled?: boolean;
17
+ busy?: boolean;
18
+ ctaLabel?: string | null;
19
+ coalescedLabel?: string | null;
20
+ selectedChoiceOptionId?: string | null;
21
+ feedback?: string | null;
22
+ labels?: Partial<CompactScenarioPreviewLabels>;
23
+ };
24
+ export declare const CompactScenarioPreview: import("react").NamedExoticComponent<CompactScenarioPreviewProps>;
@@ -0,0 +1,10 @@
1
+ import type { CompactPreviewCandidate } from "@/domain/compact-preview/CompactPreviewController";
2
+ export type PreparedCompactPreviewCopy = {
3
+ html: string;
4
+ phraseCount: number;
5
+ actionsDelayMs: number;
6
+ visuallyHidden: boolean;
7
+ };
8
+ export declare function prepareCompactPreviewCopy(candidate: CompactPreviewCandidate): PreparedCompactPreviewCopy;
9
+ export declare const compactPreviewCandidateHasActions: (candidate: CompactPreviewCandidate) => boolean;
10
+ export declare const getCompactPreviewEntranceDurationMs: (candidate: CompactPreviewCandidate) => number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alxxsck/ai-assistant",
3
3
  "private": false,
4
- "version": "2.23.0",
4
+ "version": "2.24.2",
5
5
  "description": "Embeddable Lola AI assistant library",
6
6
  "type": "module",
7
7
  "main": "dist/bridge-ai-chat-widget.es.js",