@alxxsck/ai-assistant 3.8.0 → 3.9.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 (38) hide show
  1. package/dist/{Avatar-BVcB0FXs.js → Avatar-CFd9Otwo.js} +1 -1
  2. package/dist/ChatWidgetContent-M0SYdZ2j.js +6859 -0
  3. package/dist/MediaVideoPlayer-BlJVnBw2.js +7695 -0
  4. package/dist/MediaVideoViewer-D6FNvdwQ.js +75 -0
  5. package/dist/ai-assistant.css +1 -1
  6. package/dist/api/messages.api.d.ts +11 -0
  7. package/dist/api/messages.api.types.d.ts +38 -2
  8. package/dist/api/messenger-link.api.d.ts +45 -0
  9. package/dist/bridge-ai-chat-widget.es.js +1 -1
  10. package/dist/config/media-sharing.d.ts +1 -0
  11. package/dist/context/ChatWidgetContext.d.ts +7 -0
  12. package/dist/domain/command/CommandRuntime.d.ts +1 -0
  13. package/dist/domain/command/command.types.d.ts +2 -2
  14. package/dist/domain/message/message.store.d.ts +13 -0
  15. package/dist/domain/support-presentation/support-presentation.types.d.ts +1 -1
  16. package/dist/i18n/media-chrome.d.ts +1 -0
  17. package/dist/i18n/messages.d.ts +54 -1
  18. package/dist/i18n/support-messages.d.ts +25 -0
  19. package/dist/index-_XUrpFzQ.js +3062 -0
  20. package/dist/{mount-KKMc9WTH.js → mount-DNkE0lYL.js} +9131 -8092
  21. package/dist/photoswipe.esm-Bc05x7rO.js +2952 -0
  22. package/dist/ui/components/MediaPhotoViewer.d.ts +17 -0
  23. package/dist/ui/components/MediaVideoPlayer.d.ts +9 -0
  24. package/dist/ui/components/MediaVideoViewer.d.ts +7 -0
  25. package/dist/ui/components/MessengerConnectionNotice.d.ts +1 -0
  26. package/dist/ui/components/SupportAssignmentTimeline.d.ts +4 -0
  27. package/dist/ui/components/SupportConversationControls.d.ts +4 -0
  28. package/dist/ui/components/SupportHistory.d.ts +5 -0
  29. package/dist/ui/components/UserMediaLibrary.d.ts +4 -2
  30. package/dist/ui/components/VideoTeaser.d.ts +5 -0
  31. package/dist/ui/components/usePhotoVeilExclusions.d.ts +3 -0
  32. package/dist/ui/hooks/useSupportAssignmentEvents.d.ts +2 -0
  33. package/dist/ui/hooks/useSupportConversationSync.d.ts +1 -0
  34. package/dist/ui/hooks/useSupportReadOnly.d.ts +2 -0
  35. package/dist/ui/responder-visual-state.d.ts +1 -1
  36. package/package.json +4 -1
  37. package/dist/ChatWidgetContent-6mPzQaga.js +0 -5496
  38. package/dist/index-CoNRUH9c.js +0 -2913
@@ -0,0 +1,17 @@
1
+ import { type ReactNode } from "react";
2
+ export type MediaSlide = {
3
+ id: string;
4
+ src: string;
5
+ width: number;
6
+ height: number;
7
+ date?: string;
8
+ download?: string;
9
+ };
10
+ /** Receives only images already authorized by the server; never locked previews. */
11
+ export declare function MediaPhotoViewer({ slides, initialIndex, close, renderShare, onDownload, }: {
12
+ slides: MediaSlide[];
13
+ initialIndex?: number;
14
+ close: () => void;
15
+ renderShare?: (slide: MediaSlide) => ReactNode;
16
+ onDownload?: (slide: MediaSlide) => void | Promise<void>;
17
+ }): import("react").ReactPortal;
@@ -0,0 +1,9 @@
1
+ import "@/i18n/media-chrome";
2
+ /** Only accepts an authorized original. Teasers use a separate, silent video element. */
3
+ export default function MediaVideoPlayer({ src, poster, onReady, active, onError, }: {
4
+ active?: boolean;
5
+ src: string;
6
+ poster?: string;
7
+ onReady?: () => void;
8
+ onError?: () => void;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ export default function MediaVideoViewer({ src, poster, download, onDownload, close, }: {
2
+ src: string;
3
+ poster?: string;
4
+ download?: string;
5
+ onDownload?: () => Promise<void>;
6
+ close: () => void;
7
+ }): import("react").ReactPortal;
@@ -0,0 +1 @@
1
+ export declare function MessengerConnectionNotice(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ import type { SupportAssignmentEvent } from "@/api/messages.api.types";
2
+ export declare function SupportAssignmentDivider({ event, }: {
3
+ event: SupportAssignmentEvent;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function SupportQuickAccess({ className, }: {
2
+ className?: string;
3
+ }): import("react/jsx-runtime").JSX.Element | null;
4
+ export declare function SupportHandoffOffer(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export declare function SupportHistoryTabs({ support, onChange, }: {
2
+ support: boolean;
3
+ onChange: (support: boolean) => void;
4
+ }): import("react/jsx-runtime").JSX.Element | null;
5
+ export declare function SupportHistory(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,6 @@
1
1
  import "./UserMediaLibrary.css";
2
- export declare function MediaLibraryButton({ entitlementId, }: {
2
+ export declare function MediaLibraryButton({ entitlementId, previewUrl, label, }: {
3
3
  entitlementId?: string;
4
- }): import("react/jsx-runtime").JSX.Element;
4
+ previewUrl?: string;
5
+ label?: boolean;
6
+ }): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,5 @@
1
+ export declare function VideoTeaser({ src, poster, active, }: {
2
+ src: string;
3
+ poster?: string;
4
+ active: boolean;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type RefObject } from "react";
2
+ /** Add opaque photo rectangles to the existing viewport gradient, without unmasking text. */
3
+ export declare function usePhotoVeilExclusions(viewportRef: RefObject<HTMLElement | null>): void;
@@ -0,0 +1,2 @@
1
+ import type { SupportAssignmentEvent } from "@/api/messages.api.types";
2
+ export declare function useSupportAssignmentEvents(): SupportAssignmentEvent[];
@@ -0,0 +1 @@
1
+ export declare function useSupportConversationSync(): void;
@@ -0,0 +1,2 @@
1
+ /** Capabilities and the server clock own the reopen window, never the device clock. */
2
+ export declare function useSupportReadOnly(): boolean;
@@ -1,6 +1,6 @@
1
1
  import type { ResponderDisplayModel } from "@/ui/hooks/usePresentedResponderPresentation";
2
2
  /**
3
- * The visual handoff starts as soon as human support is routing or assigned.
3
+ * The visual handoff starts as soon as human support is routing, assigned, or waiting for external work.
4
4
  * AI suspension is kept as an independent authority signal, but produces the
5
5
  * same quiet, avatar-free chat presentation.
6
6
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alxxsck/ai-assistant",
3
3
  "private": false,
4
- "version": "3.8.0",
4
+ "version": "3.9.0",
5
5
  "description": "Embeddable Lola AI assistant library",
6
6
  "type": "module",
7
7
  "main": "dist/bridge-ai-chat-widget.es.js",
@@ -51,11 +51,14 @@
51
51
  "@types/lodash-es": "^4.17.12",
52
52
  "class-variance-authority": "^0.7.1",
53
53
  "clsx": "^2.1.1",
54
+ "fflate": "0.8.2",
54
55
  "gsap": "^3.14.2",
55
56
  "howler": "^2.2.4",
56
57
  "lodash-es": "^4.17.23",
57
58
  "lucide-react": "^0.562.0",
58
59
  "markdown-it": "^14.3.0",
60
+ "media-chrome": "^4.19.2",
61
+ "photoswipe": "^5.4.4",
59
62
  "react-error-boundary": "^6.1.1",
60
63
  "react-router-dom": "^7.13.1",
61
64
  "socket.io-client": "^4.8.3",