@elevenlabs/convai-widget-core 0.2.0 → 0.5.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.
@@ -7,6 +7,9 @@ export declare const AGENTS: {
7
7
  readonly placement: import("../types/config").Placement;
8
8
  readonly avatar: import("../types/config").AvatarConfig;
9
9
  readonly feedback_mode: import("../types/config").FeedbackMode;
10
+ readonly end_feedback?: {
11
+ type: import("../types/config").FeedbackType;
12
+ };
10
13
  readonly language: import("@elevenlabs/client").Language;
11
14
  readonly supported_language_overrides?: import("@elevenlabs/client").Language[];
12
15
  readonly terms_html?: string;
@@ -28,6 +31,36 @@ export declare const AGENTS: {
28
31
  readonly first_message?: string;
29
32
  readonly use_rtc?: boolean;
30
33
  };
34
+ readonly webrtc: {
35
+ readonly use_rtc: true;
36
+ readonly variant: import("../types/config").Variant;
37
+ readonly placement: import("../types/config").Placement;
38
+ readonly avatar: import("../types/config").AvatarConfig;
39
+ readonly feedback_mode: import("../types/config").FeedbackMode;
40
+ readonly end_feedback?: {
41
+ type: import("../types/config").FeedbackType;
42
+ };
43
+ readonly language: import("@elevenlabs/client").Language;
44
+ readonly supported_language_overrides?: import("@elevenlabs/client").Language[];
45
+ readonly terms_html?: string;
46
+ readonly terms_key?: string;
47
+ readonly mic_muting_enabled: boolean;
48
+ readonly transcript_enabled: boolean;
49
+ readonly text_input_enabled: boolean;
50
+ readonly default_expanded: boolean;
51
+ readonly always_expanded: boolean;
52
+ readonly text_contents: Partial<import("../types/config").TextContents>;
53
+ readonly styles?: Partial<import("../types/config").Styles>;
54
+ readonly language_presets: Partial<Record<import("@elevenlabs/client").Language, {
55
+ text_contents?: Partial<import("../types/config").TextContents>;
56
+ first_message?: string;
57
+ }>>;
58
+ readonly disable_banner: boolean;
59
+ readonly override_link?: string;
60
+ readonly text_only: boolean;
61
+ readonly supports_text_only: boolean;
62
+ readonly first_message?: string;
63
+ };
31
64
  readonly fail: WidgetConfig;
32
65
  };
33
66
  export declare const Worker: import("msw/lib/browser").SetupWorker;
@@ -1,5 +1,5 @@
1
1
  export declare function parseBoolAttribute(value: string | undefined): boolean | null;
2
- export declare const CustomAttributeList: readonly ["variant", "placement", "override-config", "avatar-image-url", "avatar-orb-color-1", "avatar-orb-color-2", "agent-id", "signed-url", "terms-key", "server-location", "language", "dynamic-variables", "show-avatar-when-collapsed", "override-prompt", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "user-id"];
2
+ export declare const CustomAttributeList: readonly ["variant", "placement", "override-config", "avatar-image-url", "avatar-orb-color-1", "avatar-orb-color-2", "agent-id", "signed-url", "terms-key", "server-location", "language", "dynamic-variables", "show-avatar-when-collapsed", "override-prompt", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "user-id", "use-rtc", "collect-feedback"];
3
3
  export type CustomAttributes = {
4
4
  [key in (typeof CustomAttributeList)[number]]?: string;
5
5
  };
@@ -6,11 +6,15 @@ export declare const Placements: readonly ["top-left", "top", "top-right", "bott
6
6
  export type Placement = (typeof Placements)[number];
7
7
  export declare function parsePlacement(placement: string | undefined): Placement;
8
8
  export type FeedbackMode = "none" | "during" | "end";
9
+ export type FeedbackType = "rating";
9
10
  export interface WidgetConfig {
10
11
  variant: Variant;
11
12
  placement: Placement;
12
13
  avatar: AvatarConfig;
13
14
  feedback_mode: FeedbackMode;
15
+ end_feedback?: {
16
+ type: FeedbackType;
17
+ };
14
18
  language: Language;
15
19
  supported_language_overrides?: Language[];
16
20
  terms_html?: string;
@@ -71,6 +75,13 @@ export declare const DefaultTextContents: {
71
75
  conversation_id: string;
72
76
  error_occurred: string;
73
77
  copy_id: string;
78
+ initiate_feedback: string;
79
+ request_follow_up_feedback: string;
80
+ thanks_for_feedback: string;
81
+ thanks_for_feedback_details: string;
82
+ follow_up_feedback_placeholder: string;
83
+ submit: string;
84
+ go_back: string;
74
85
  };
75
86
  export declare const TextKeys: (keyof typeof DefaultTextContents)[];
76
87
  export type TextContents = typeof DefaultTextContents;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "0.2.0";
1
+ export declare const PACKAGE_VERSION = "0.5.0";
@@ -0,0 +1 @@
1
+ export declare function FeedbackActions(): import("react-dom/src").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FeedbackPage(): import("react-dom/src").JSX.Element;
@@ -0,0 +1,9 @@
1
+ interface SheetHeaderProps {
2
+ showBackButton: boolean;
3
+ onBackClick?: () => void;
4
+ showStatusLabel: boolean;
5
+ showShadow: boolean;
6
+ showLanguageSelector: boolean;
7
+ }
8
+ export declare function SheetHeader({ showBackButton, onBackClick, showStatusLabel, showShadow, showLanguageSelector, }: SheetHeaderProps): import("preact").JSX.Element;
9
+ export {};
@@ -1,4 +1,4 @@
1
- import { TranscriptEntry } from "../contexts/conversation";
1
+ import type { TranscriptEntry } from "../contexts/conversation";
2
2
  interface TranscriptMessageProps {
3
3
  entry: TranscriptEntry;
4
4
  animateIn: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevenlabs/convai-widget-core",
3
- "version": "0.2.0",
3
+ "version": "0.5.0",
4
4
  "description": "The common library for the Conversational AI Widget.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -31,7 +31,10 @@
31
31
  "clsx": "^2.1.1",
32
32
  "preact": "^10.26.5",
33
33
  "preact-custom-element": "^4.3.0",
34
- "@elevenlabs/client": "0.5.0"
34
+ "@elevenlabs/client": "0.9.2"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
35
38
  },
36
39
  "repository": {
37
40
  "type": "git",
@@ -40,12 +43,13 @@
40
43
  },
41
44
  "scripts": {
42
45
  "generate-version": "printf \"// This file is auto-generated during build\\nexport const PACKAGE_VERSION = \\\"%s\\\";\\n\" \"$npm_package_version\" > src/version.ts",
46
+ "postinstall": "npm run generate-version",
43
47
  "prebuild": "npm run generate-version",
44
48
  "build": "vite build && tsc --declaration --emitDeclarationOnly",
45
49
  "dev": "npm run generate-version && vite",
46
- "lint": "npm run lint:ts && npm run lint:es && npm run lint:prettier",
47
- "lint:ts": "tsc --noEmit --skipLibCheck",
48
- "lint:es": "npx eslint .",
50
+ "lint": "npm run check-types && npm run lint:es && npm run lint:prettier",
51
+ "check-types": "tsc --noEmit --skipLibCheck",
52
+ "lint:es": "pnpm exec eslint .",
49
53
  "lint:prettier": "prettier 'src/**/*.ts' --check",
50
54
  "test": "vitest"
51
55
  }