@paramms/chat-widget 1.0.43 → 1.0.45
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 +5 -4
- package/dist/chatlist.d.ts +2 -1
- package/dist/chatlist.js +137 -115
- package/dist/chatlist.js.map +1 -1
- package/dist/chatlist.styles.d.ts +1 -0
- package/dist/codec.js +191 -157
- package/dist/codec.js.map +1 -1
- package/dist/core.js.map +1 -1
- package/dist/e2e.d.ts +21 -2
- package/dist/e2e.js +50 -40
- package/dist/e2e.js.map +1 -1
- package/dist/embed-lite.js +242 -0
- package/dist/embed-lite.js.map +1 -0
- package/dist/embed.d.ts +8 -0
- package/dist/embed.js +87 -78
- package/dist/embed.js.map +1 -1
- package/dist/history.d.ts +7 -4
- package/dist/index.d.ts +20 -0
- package/dist/index.js +632 -723
- package/dist/index.js.map +1 -1
- package/dist/outbox.js +65 -75
- package/dist/outbox.js.map +1 -1
- package/dist/protocol/entities.d.ts +0 -11
- package/dist/protocol/frames.d.ts +1 -17
- package/dist/react.d.ts +13 -5
- package/dist/react.js +225 -211
- package/dist/react.js.map +1 -1
- package/dist/renderer.d.ts +14 -19
- package/dist/renderer.styles.d.ts +1 -0
- package/dist/store.d.ts +1 -5
- package/dist/theme-tokens.d.ts +4 -0
- package/package.json +2 -2
- package/dist/annotations.d.ts +0 -11
package/dist/history.d.ts
CHANGED
|
@@ -25,9 +25,12 @@ export declare function httpBaseFromWsUrl(wsUrl: string): string;
|
|
|
25
25
|
/** Initial history restore on conversation open.
|
|
26
26
|
*
|
|
27
27
|
* Fetches the latest PAGE messages and sets up scroll-triggered loading for
|
|
28
|
-
* older messages
|
|
29
|
-
*
|
|
28
|
+
* older messages: a `scroll` listener on the container's own scrollTop (see
|
|
29
|
+
* below), not an IntersectionObserver sentinel. No buttons — scrolling up
|
|
30
|
+
* loads more automatically.
|
|
30
31
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
32
|
+
* Does NOT return a cleanup function — the scroll-listener teardown is
|
|
33
|
+
* registered internally via `renderer.setScrollCleanup()` and runs whenever
|
|
34
|
+
* the renderer tears down the conversation view. Callers just `void` this
|
|
35
|
+
* call (see index.ts). */
|
|
33
36
|
export declare function restoreHistory(wsUrl: string, token: string, conversationId: ConversationId, store: ChatStore, renderer: Renderer, apiBase?: string): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ export interface MountOptions {
|
|
|
47
47
|
subject?: WidgetConfig['subject'];
|
|
48
48
|
quickReplies?: string[];
|
|
49
49
|
accent?: string;
|
|
50
|
+
/** Secondary accent (guest bubble + send button). Defaults to the design
|
|
51
|
+
* blue; omit and it follows `accent` for a cohesive single-token retheme. */
|
|
52
|
+
accent2?: string;
|
|
53
|
+
/** Colour scheme: 'auto' (follow OS, default), 'light', or 'dark'. */
|
|
54
|
+
theme?: 'auto' | 'light' | 'dark';
|
|
50
55
|
/** Stack navigation: when set, the chatroom header shows a back chevron that
|
|
51
56
|
* calls this. Used by `<ChatApp>` so tapping a conversation opens the room and
|
|
52
57
|
* the back arrow returns to the list — native-app style. */
|
|
@@ -74,6 +79,16 @@ export interface MountOptions {
|
|
|
74
79
|
* The token still controls identity — this is display metadata only.
|
|
75
80
|
* Anonymous users (no token, no user) remain fully anonymous. */
|
|
76
81
|
user?: UserInfo;
|
|
82
|
+
/** Optional per-tenant feature switches. All default to ON (omit for current
|
|
83
|
+
* behavior). Set a flag to `false` to disable the feature — the widget then
|
|
84
|
+
* does no work for it (no reaction picker built per message, no CSAT panel,
|
|
85
|
+
* no KB-deflection lookups). Gating is by not wiring the handler, so the
|
|
86
|
+
* renderer skips the feature entirely. */
|
|
87
|
+
features?: {
|
|
88
|
+
reactions?: boolean;
|
|
89
|
+
csat?: boolean;
|
|
90
|
+
deflection?: boolean;
|
|
91
|
+
};
|
|
77
92
|
/** i18n: override UI strings. All keys are optional — omitted keys fall
|
|
78
93
|
* back to English defaults. */
|
|
79
94
|
i18n?: {
|
|
@@ -81,6 +96,11 @@ export interface MountOptions {
|
|
|
81
96
|
send?: string;
|
|
82
97
|
offline?: string;
|
|
83
98
|
poweredBy?: string;
|
|
99
|
+
online?: string;
|
|
100
|
+
away?: string;
|
|
101
|
+
aiAssistant?: string;
|
|
102
|
+
resolved?: string;
|
|
103
|
+
reopen?: string;
|
|
84
104
|
};
|
|
85
105
|
}
|
|
86
106
|
export interface WidgetHandle {
|