@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/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 via IntersectionObserver on a sentinel at the top of the
29
- * scroll container. No buttons — scrolling up loads more automatically.
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
- * Returns a cleanup function — call it when the conversation is closed to
32
- * disconnect the observer and prevent stale updates. */
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 {