@elia-assistant/chatui 1.0.22 → 1.0.25

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 CHANGED
@@ -65,11 +65,12 @@ const instance = createChat({
65
65
 
66
66
  - **n8n webhook compatible** — same parameters as `@n8n/chat`; works with any Chat Trigger out of the box
67
67
  - **Three display modes** — `fullscreen`, `window` (floating button + popup), or `mixed` (window on desktop, fullscreen on mobile)
68
+ - **Left/right positioning** — `position: 'left'` anchors the floating button and chat window to the left side of the screen
68
69
  - **Bottom-sheet style** — opt-in `fullscreenSheet` mode covers ~3/4 of the screen with a rounded top instead of going edge-to-edge
69
70
  - **Optional tabs** — surface a Notifications feed (URL or inline JSON) and a searchable FAQ alongside the chat
70
71
  - **SSE streaming** — optional word-by-word bot responses
71
72
  - **10 built-in themes** — Midnight, Ivory, Sunrise, Cosmos, Forest, Ocean, Cherry, Navy, Lavender, Amber; switch at runtime
72
- - **12 built-in avatars** + file upload (max 500 KB) or URL — same picker for the floating button icon
73
+ - **30 built-in avatars** + file upload (max 500 KB) or URL — same picker for the floating button icon
73
74
  - **CTA popup** — timed speech-bubble with optional Web Audio notification, window mode only
74
75
  - **Conversation history** — optional sidebar with persistent multi-session history
75
76
  - **Per-language content** — initial messages, bot name, CTA text, welcome subtitle, tab titles, all configurable per language
@@ -107,7 +108,8 @@ All options live on `ChatConfig`. Set them once at boot via `setConfig()` (or pa
107
108
 
108
109
  | Parameter | Type | Default | Description |
109
110
  |---|---|---|---|
110
- | `mode` | `'fullscreen' \| 'window' \| 'mixed'` | `'fullscreen'` | Display mode |
111
+ | `mode` | `'fullscreen' \| 'window' \| 'mixed'` | `'window'` | Display mode |
112
+ | `position` | `'right' \| 'left'` | `'right'` | Side of the screen the floating widget is anchored to (window / mixed mode) |
111
113
  | `fullscreenSheet` | `boolean` | `false` | Render fullscreen as a bottom sheet (rounded top, dimmed backdrop) |
112
114
  | `fullscreenSheetHeight` | `string` | `'75vh'` | Sheet height as any CSS length |
113
115
  | `showWelcomeScreen` | `boolean` | `true` | Show welcome screen when no messages |
@@ -1,4 +1,13 @@
1
1
  export declare const builtInAvatars: Record<string, string>;
2
2
  export declare const builtInAvatarIds: string[];
3
- /** Resolve a user-supplied value to a URL suitable for <img src>. */
3
+ export declare const WHITE_BG_AVATARS: Set<string>;
4
+ export declare const THEME_BG_AVATARS: Set<string>;
5
+ /** Returns the CSS background value for an avatar container based on the avatar type. */
6
+ export declare function avatarContainerBg(key: string | undefined): string;
7
+ /** Returns the effective avatar key after resolving fallbacks.
8
+ * Unknown built-in IDs (e.g. a removed avatar) normalise to 'bubble'.
9
+ * External URLs are returned as-is. */
10
+ export declare function effectiveAvatarKey(value: string | undefined): string | undefined;
11
+ /** Resolve a user-supplied value to a URL suitable for <img src>.
12
+ * Unknown built-in IDs fall back to the 'bubble' icon. */
4
13
  export declare function resolveAvatarUrl(value: string | undefined): string | undefined;