bridgeapp-ai-chat-widget 0.2.11 → 0.2.12
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.
- package/dist/App.d.ts +5 -0
- package/dist/avatar/AnimationManager.d.ts +1 -0
- package/dist/avatar/Avatar.d.ts +4 -1
- package/dist/bridge-ai-chat-widget.es.js +8711 -8654
- package/dist/bridge-ai-chat-widget.umd.js +222 -222
- package/dist/context/ChatWidgetContext.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/ui/components/VoiceModeMessage.d.ts +9 -0
- package/package.json +1 -1
- package/dist/ui/components/VoiceMessage.d.ts +0 -9
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AppApi } from "@/App";
|
|
2
|
+
import type { Avatar } from "@/avatar/Avatar";
|
|
2
3
|
import type { WidgetConfig } from "@/index.types";
|
|
3
4
|
type ChatWidgetContextValue = {
|
|
4
5
|
open: boolean;
|
|
@@ -9,11 +10,14 @@ type ChatWidgetContextValue = {
|
|
|
9
10
|
setWidgetHeight: (h: number) => void;
|
|
10
11
|
widgetWidth: number;
|
|
11
12
|
setWidgetWidth: (w: number) => void;
|
|
13
|
+
reactionMessage: string | null;
|
|
14
|
+
setReactionMessage: (message: string | null) => void;
|
|
12
15
|
isMobile: boolean;
|
|
13
16
|
config: WidgetConfig;
|
|
14
17
|
api: AppApi;
|
|
15
18
|
loadingProgress: number;
|
|
16
19
|
setLoadingProgress: (p: number) => void;
|
|
20
|
+
assistantRef: React.RefObject<Avatar | null>;
|
|
17
21
|
};
|
|
18
22
|
export declare const ChatWidgetContextProvider: ({ children, config, api, }: {
|
|
19
23
|
children: React.ReactNode;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,14 @@ export declare class ChatWidgetInstance extends EventTarget {
|
|
|
6
6
|
private root;
|
|
7
7
|
private shadowRoot;
|
|
8
8
|
private config;
|
|
9
|
+
private gui;
|
|
9
10
|
private setOpenImpl;
|
|
10
11
|
private sendServiceMessageImpl;
|
|
11
12
|
private playAnimationImpl;
|
|
13
|
+
private executeReactionImpl;
|
|
12
14
|
private resolveAssetPath;
|
|
13
15
|
constructor(config: WidgetConfig);
|
|
16
|
+
private initGui;
|
|
14
17
|
private init;
|
|
15
18
|
private fetchAndMergeRemoteConfig;
|
|
16
19
|
private onAvatarReady;
|
|
@@ -19,6 +22,11 @@ export declare class ChatWidgetInstance extends EventTarget {
|
|
|
19
22
|
setOpen(open: boolean): void;
|
|
20
23
|
playAnimation(name: ExternallyAvailableActions): void;
|
|
21
24
|
setCustomerInteractionSession(session: CustomerInteractionSession): void;
|
|
25
|
+
executeReaction(params: {
|
|
26
|
+
animation: ExternallyAvailableActions;
|
|
27
|
+
voice: string;
|
|
28
|
+
text: string;
|
|
29
|
+
}): void;
|
|
22
30
|
sendServiceMessage(message: string, animationName: ExternallyAvailableActions): void;
|
|
23
31
|
destroy(): void;
|
|
24
32
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ParticipantType } from "@/api/messages.api.types";
|
|
2
|
+
import { type ComponentProps } from "react";
|
|
3
|
+
export type VoiceModeMessageSource = ParticipantType | "REACTION_MESSAGE";
|
|
4
|
+
type ChatMessageProps = ComponentProps<"div"> & {
|
|
5
|
+
message: string;
|
|
6
|
+
source: VoiceModeMessageSource;
|
|
7
|
+
};
|
|
8
|
+
export declare function VoiceModeMessage({ message, source, className, ...props }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ParticipantType } from "@/api/messages.api.types";
|
|
2
|
-
import { type ComponentProps } from "react";
|
|
3
|
-
export type MessageAuthor = "me" | "them";
|
|
4
|
-
type ChatMessageProps = ComponentProps<"div"> & {
|
|
5
|
-
message: string;
|
|
6
|
-
author: ParticipantType;
|
|
7
|
-
};
|
|
8
|
-
export declare function VoiceMessage({ message, author, className, ...props }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|