@xapp/stentor-chat-widget 1.79.0 → 1.81.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.
@@ -1,4 +1,5 @@
1
1
  /*! Copyright (c) 2021, XAPPmedia */
2
+ import type { ReactNode } from "react";
2
3
  import { Response } from "stentor-models";
3
4
  import { WidgetTheme } from "./WidgetTheme";
4
5
  import { ChatUserInfo } from "./UserInfo";
@@ -82,6 +83,10 @@ export interface ServerConfig {
82
83
  * Timeout in milliseconds to wait for a response from the serverUrl, defaults to 15,000.
83
84
  */
84
85
  readonly timeout?: number;
86
+ /**
87
+ * Optional nonce used to trigger reconnection when the chat is reset
88
+ */
89
+ readonly nonce?: string;
85
90
  }
86
91
  /**
87
92
  * Environment settings for the Widget
@@ -336,7 +341,17 @@ export interface WidgetMenuItemOpenURL {
336
341
  }
337
342
  export interface WidgetHeaderSubtitleConfig {
338
343
  readonly enabled?: boolean;
339
- readonly text?: string;
344
+ /**
345
+ * Subtitle text to display below the header title.
346
+ * Supports plain strings or JSX elements for custom formatting.
347
+ * @example
348
+ * // String
349
+ * text: "Always Active"
350
+ *
351
+ * // JSX with status indicator
352
+ * text: <span><StatusDot /> Always Active</span>
353
+ */
354
+ readonly text?: ReactNode;
340
355
  }
341
356
  export interface WidgetTypingStatusConfig {
342
357
  readonly textTypingStatusEnabled?: boolean;
@@ -103,6 +103,7 @@ export interface WidgetMessagesTheme {
103
103
  readonly others?: WidgetMessageTheme;
104
104
  readonly padding?: WidgetMarginsTheme;
105
105
  readonly maxWidth?: string;
106
+ readonly avatarPosition?: string;
106
107
  }
107
108
  export interface WidgetHeaderTheme {
108
109
  readonly background?: WidgetBackgroundTheme;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.79.0",
7
+ "version": "1.81.0",
8
8
  "description": "Chat Widget channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -16,6 +16,7 @@
16
16
  },
17
17
  "devDependencies": {
18
18
  "@types/chai": "4.3.20",
19
+ "@types/react": "^19.0.0",
19
20
  "@types/sinon": "10.0.20",
20
21
  "@types/sinon-chai": "3.2.12",
21
22
  "@xapp/config": "0.2.3",
@@ -23,20 +24,21 @@
23
24
  "mocha": "9.2.2",
24
25
  "sinon": "13.0.2",
25
26
  "sinon-chai": "3.7.0",
26
- "stentor-models": "1.66.0",
27
+ "stentor-models": "1.66.25",
27
28
  "ts-node": "10.9.2",
28
- "typescript": "5.8.3"
29
+ "typescript": "5.9.3"
29
30
  },
30
31
  "dependencies": {
31
- "stentor-constants": "1.66.0",
32
- "stentor-guards": "1.66.0"
32
+ "stentor-constants": "1.66.25",
33
+ "stentor-guards": "1.66.25"
33
34
  },
34
35
  "peerDependencies": {
36
+ "react": ">=16.8.0",
35
37
  "stentor-models": "1.x"
36
38
  },
37
39
  "scripts": {
38
40
  "build": "tsc -d true -p .",
39
41
  "clean": "rm -rf ./lib/*"
40
42
  },
41
- "gitHead": "daa7d64fcc7df54b9dfc3a9f763e790b144428d1"
43
+ "gitHead": "a568a993d4a16b6f87eea5c8870e0888f883959b"
42
44
  }