@alxxsck/ai-assistant 2.6.0 → 2.8.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.
- package/README.md +33 -2
- package/dist/App.d.ts +1 -0
- package/dist/{Avatar-DAuV3Kht.js → Avatar-B278inn9.js} +1 -1
- package/dist/{ChatWidgetContent-BGznb_xm.js → ChatWidgetContent-S39KB8Nh.js} +2113 -2028
- package/dist/avatar/publicAnimations.d.ts +1 -1
- package/dist/bridge-ai-chat-widget.es.js +5 -4
- package/dist/domain/voice/voice.store.d.ts +2 -0
- package/dist/i18n/I18nProvider.d.ts +4 -0
- package/dist/i18n/i18n-context.d.ts +9 -0
- package/dist/i18n/i18n.d.ts +3 -0
- package/dist/i18n/messages.d.ts +101 -0
- package/dist/i18n/useI18n.d.ts +2 -0
- package/dist/{index-DBlYyJlj.js → index-B0v_r0So.js} +4548 -3362
- package/dist/index.d.ts +4 -0
- package/dist/index.types.d.ts +2 -0
- package/dist/ui/chat-composer-layout.d.ts +1 -0
- package/dist/ui/components/chat-list-timestamp.d.ts +2 -0
- package/dist/ui/error-messages.d.ts +15 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export type { CustomerInteractionSession, CommandEventDetail, HighlightCommandCo
|
|
|
6
6
|
export { EXTERNALLY_AVAILABLE_ACTIONS, isExternallyAvailableAction, } from "./avatar/publicAnimations";
|
|
7
7
|
export type { ExternallyAvailableActions } from "./avatar/publicAnimations";
|
|
8
8
|
export type { TrackEvent } from "./domain/tracking/LolaEventTracker";
|
|
9
|
+
export type { SupportedLocale } from "./i18n/i18n";
|
|
10
|
+
export { SUPPORTED_LOCALES } from "./i18n/i18n";
|
|
9
11
|
type WidgetEventMap = {
|
|
10
12
|
command_received: CustomEvent<CommandEventDetail>;
|
|
11
13
|
command_succeeded: CustomEvent<CommandEventDetail>;
|
|
@@ -28,6 +30,7 @@ export declare class ChatWidgetInstance extends EventTarget {
|
|
|
28
30
|
private disableDebugLogging;
|
|
29
31
|
private resolveAssetPath;
|
|
30
32
|
private setSessionImpl;
|
|
33
|
+
private setLocaleImpl;
|
|
31
34
|
private readonly commandRuntime;
|
|
32
35
|
private readonly eventTracker;
|
|
33
36
|
private readonly onSessionExpired;
|
|
@@ -45,6 +48,7 @@ export declare class ChatWidgetInstance extends EventTarget {
|
|
|
45
48
|
private validateCustomerInteractionSession;
|
|
46
49
|
setOpen(open: boolean): void;
|
|
47
50
|
setCustomerInteractionSession(session: CustomerInteractionSession): void;
|
|
51
|
+
setLocale(locale: string): void;
|
|
48
52
|
track(event: TrackEvent): Promise<void>;
|
|
49
53
|
destroy(): void;
|
|
50
54
|
}
|
package/dist/index.types.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { CustomerInteractionSession } from "./types";
|
|
|
2
2
|
import type { HostCommandHandlers } from "./domain/command/command.types";
|
|
3
3
|
export type WidgetConfig = {
|
|
4
4
|
customerInteractionSession: CustomerInteractionSession;
|
|
5
|
+
/** Product locale tag used for widget-owned text. Defaults to English. */
|
|
6
|
+
locale?: string;
|
|
5
7
|
/** Refreshes the interaction session after expiry or authentication failure. */
|
|
6
8
|
onRenewSession?: () => void | Promise<void>;
|
|
7
9
|
/** Hides the built-in launcher while preserving programmatic `setOpen`. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function updateTalkButtonLayout(composer: HTMLElement, label: HTMLElement, direction: "ltr" | "rtl"): void;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
import type { TranslationKey } from "@/i18n/messages";
|
|
1
2
|
export declare const CHAT_ERROR_MESSAGES: {
|
|
2
|
-
readonly connectionFailed: "
|
|
3
|
-
readonly offline: "
|
|
4
|
-
readonly agentResponseFailed: "
|
|
5
|
-
readonly sendMessageFallback: "
|
|
6
|
-
readonly conversationClosed: "
|
|
3
|
+
readonly connectionFailed: "error.connectionFailed";
|
|
4
|
+
readonly offline: "error.offline";
|
|
5
|
+
readonly agentResponseFailed: "error.agentResponseFailed";
|
|
6
|
+
readonly sendMessageFallback: "error.sendMessageFailed";
|
|
7
|
+
readonly conversationClosed: "error.conversationClosed";
|
|
8
|
+
};
|
|
9
|
+
export declare const translateChatError: (error: string, t: (key: TranslationKey) => string) => string;
|
|
10
|
+
export declare const VOICE_ERROR_MESSAGES: {
|
|
11
|
+
audio_playback_failed: "voice.audioPlaybackFailed";
|
|
12
|
+
session_failed: "voice.sessionFailed";
|
|
13
|
+
connection_closed: "voice.connectionClosed";
|
|
14
|
+
connection_timed_out: "voice.connectionTimedOut";
|
|
15
|
+
microphone_blocked: "voice.microphoneBlocked";
|
|
16
|
+
microphone_unsupported: "voice.microphoneUnsupported";
|
|
7
17
|
};
|