@elia-assistant/chatui 1.0.24 → 1.0.26
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 +16 -8
- package/dist/assets/avatars/index.d.ts +4 -0
- package/dist/chatui.iife.js +27 -26
- package/dist/chunks/{i18n-i-innm6M.js → i18n-DS9aLar5.js} +4 -3
- package/dist/chunks/{settingsStore-ReOi8RP1.js → settingsStore-JRogtJV3.js} +55 -43
- package/dist/chunks/{translation-8S88rsh2.js → translation-B0QPZgVW.js} +4 -1
- package/dist/chunks/translation-BL8dP5qm.js +94 -0
- package/dist/chunks/{translation-B2rvHkw2.js → translation-BYSHywcB.js} +4 -1
- package/dist/components/ChatView.d.ts +3 -1
- package/dist/components/CtaPopup.d.ts +2 -1
- package/dist/index.js +977 -859
- package/dist/store.js +1 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,10 +65,11 @@ 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
|
+
- **16 built-in themes** — Sunrise, Ivory, Cherry, Sky, Lavender, Nice, Navy, Amber, Slate, Graphite, Stone, Cosmos, Forest, Ocean, Cherry Dark, Midnight; switch at runtime
|
|
72
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
|
|
@@ -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'` | `'
|
|
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 |
|
|
@@ -170,16 +172,22 @@ Resolution chain: `i18n[activeLang].X` -> `i18n['en'].X` -> global `config.X`.
|
|
|
170
172
|
|
|
171
173
|
| ID | Name | Style | Accent |
|
|
172
174
|
|---|---|---|---|
|
|
173
|
-
| `midnight` | Midnight | Dark | Indigo `#6366f1` |
|
|
174
|
-
| `ivory` | Ivory | Light | Indigo `#4338ca` |
|
|
175
175
|
| `sunrise` | Sunrise | Light | Orange `#f97316` |
|
|
176
|
-
| `
|
|
177
|
-
| `forest` | Forest | Dark | Green `#22c55e` |
|
|
178
|
-
| `ocean` | Ocean | Dark | Cyan `#06b6d4` |
|
|
176
|
+
| `ivory` | Ivory | Light | Indigo `#4338ca` |
|
|
179
177
|
| `cherry` | Cherry | Light | Red `#ef4444` |
|
|
180
|
-
| `
|
|
178
|
+
| `sky` | Sky | Light | Blue `#5ba1da` |
|
|
181
179
|
| `lavender` | Lavender | Light | Violet `#8b5cf6` |
|
|
180
|
+
| `nice` | Nice | Light | Cyan `#3f7e83` |
|
|
181
|
+
| `navy` | Navy | Light | Blue `#ebf3f2` |
|
|
182
182
|
| `amber` | Amber | Dark | Amber `#f59e0b` |
|
|
183
|
+
| `slate` | Slate | Light | Blue `#38bdf8` |
|
|
184
|
+
| `graphite` | Graphite | Blue `#4185eb` |
|
|
185
|
+
| `stone` | Stone | Light | Orange `#fbbf24` |
|
|
186
|
+
| `cosmos` | Cosmos | Dark | Purple `#a855f7` |
|
|
187
|
+
| `forest` | Forest | Dark | Green `#22c55e` |
|
|
188
|
+
| `ocean` | Ocean | Dark | Cyan `#06b6d4` |
|
|
189
|
+
| `cherryDark` | Cherry Dark | Dark | Red `#ef4444` |
|
|
190
|
+
| `midnight` | Midnight | Dark | Indigo `#6366f1` |
|
|
183
191
|
|
|
184
192
|
Defined in `src/themes.ts` — add your own by appending to the array.
|
|
185
193
|
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export declare const builtInAvatars: Record<string, string>;
|
|
2
2
|
export declare const builtInAvatarIds: string[];
|
|
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;
|
|
3
7
|
/** Returns the effective avatar key after resolving fallbacks.
|
|
4
8
|
* Unknown built-in IDs (e.g. a removed avatar) normalise to 'bubble'.
|
|
5
9
|
* External URLs are returned as-is. */
|