@botonic/webchat-react 2.23.2 → 2.25.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.
- package/CHANGELOG.md +20 -0
- package/README.md +6 -4
- package/index.d.ts +5 -27
- package/index.js +20 -36
- package/lib/components/webchat-app/webchat-app.d.ts +6 -1
- package/lib/components/webchat-input/use-webchat-input.d.ts +1 -0
- package/lib/components/webchat-messages/use-custom-scrollbar.d.ts +11 -0
- package/lib/types/webchat-props.d.ts +2 -0
- package/package.json +3 -5
- package/styles.css +27 -301
- package/trigger.js +2 -2
- package/webchat-app-BUGnjp8Q.js +2408 -0
- package/webchat-app-CtAHJapU.js +0 -2285
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## 2.25.0 (2026-03-27)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **webchat:** webchat base component refinement #BLT-2274 ([#777](https://github.com/metis-ai/hubtype-product/pull/777))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- David Hidalgo @Davidhidalgo
|
|
10
|
+
|
|
11
|
+
## 2.24.0 (2026-03-27)
|
|
12
|
+
|
|
13
|
+
### 🚀 Features
|
|
14
|
+
|
|
15
|
+
- **botonic:** remove webchat-react Lilara gateway and decouple CSS #BLT-2288 ([#770](https://github.com/metis-ai/hubtype-product/pull/770))
|
|
16
|
+
|
|
17
|
+
### ❤️ Thank You
|
|
18
|
+
|
|
19
|
+
- David Hidalgo @Davidhidalgo
|
|
20
|
+
|
|
1
21
|
## 2.23.2 (2026-03-23)
|
|
2
22
|
|
|
3
23
|
This was a version bump only for @botonic/webchat-react to align it with other projects, there were no code changes.
|
package/README.md
CHANGED
|
@@ -30,19 +30,21 @@ This package requires:
|
|
|
30
30
|
|
|
31
31
|
### Basic Setup
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Load foundations (reset + tokens), then Lilara component CSS, then webchat overrides (shared CSS layers control cascade):
|
|
34
34
|
|
|
35
35
|
```css
|
|
36
|
-
|
|
36
|
+
@import '@lilara/foundations/base.css';
|
|
37
|
+
@import '@lilara/ui-web-react/styles.css';
|
|
37
38
|
@import '@botonic/webchat-react/styles.css';
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
```tsx
|
|
41
|
-
|
|
42
|
+
import '@lilara/foundations/base.css'
|
|
43
|
+
import '@lilara/ui-web-react/styles.css'
|
|
42
44
|
import '@botonic/webchat-react/styles.css'
|
|
43
45
|
```
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
Import `@lilara/ui-web-react` components from that package, not from `@botonic/webchat-react`.
|
|
46
48
|
|
|
47
49
|
### Components
|
|
48
50
|
|
package/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
* ## Embedded Webchat (full control)
|
|
7
7
|
* ```tsx
|
|
8
8
|
* import { WebchatProvider, WebchatContainer, WebchatMessages, WebchatInput } from '@botonic/webchat-react'
|
|
9
|
+
* import { Button } from '@lilara/ui-web-react'
|
|
10
|
+
* import '@lilara/foundations/base.css'
|
|
11
|
+
* import '@lilara/ui-web-react/styles.css'
|
|
9
12
|
* import '@botonic/webchat-react/styles.css'
|
|
10
13
|
*
|
|
11
14
|
* <WebchatProvider appId="your-app-id">
|
|
@@ -21,6 +24,8 @@
|
|
|
21
24
|
* For a floating trigger button that lazy-loads the webchat:
|
|
22
25
|
* ```tsx
|
|
23
26
|
* import { WebchatTrigger } from '@botonic/webchat-react/trigger'
|
|
27
|
+
* import '@lilara/foundations/base.css'
|
|
28
|
+
* import '@lilara/ui-web-react/styles.css'
|
|
24
29
|
* import '@botonic/webchat-react/styles.css'
|
|
25
30
|
*
|
|
26
31
|
* <WebchatTrigger appId="your-app-id" />
|
|
@@ -52,30 +57,3 @@ export { ButtonComponent, type ButtonComponentProps, } from './lib/components/sh
|
|
|
52
57
|
export * from './lib/types/primitives';
|
|
53
58
|
export * from './lib/types/webchat-props';
|
|
54
59
|
export type { WebchatConfig, WebchatController, WebchatEmittedEvent, } from '@botonic/webchat-core';
|
|
55
|
-
export { Button, Spinner } from '@lilara/ui-web-react';
|
|
56
|
-
export type { TextInputProps } from '@lilara/ui-web-react';
|
|
57
|
-
export type { TextAreaProps } from '@lilara/ui-web-react';
|
|
58
|
-
export type { CheckboxProps } from '@lilara/ui-web-react';
|
|
59
|
-
export type { SwitchProps } from '@lilara/ui-web-react';
|
|
60
|
-
export type { SelectItem, SelectProps } from '@lilara/ui-web-react';
|
|
61
|
-
export type { SelectWithSectionsProps } from '@lilara/ui-web-react';
|
|
62
|
-
export type { MultiselectProps } from '@lilara/ui-web-react';
|
|
63
|
-
export type { MultiselectWithSectionsProps } from '@lilara/ui-web-react';
|
|
64
|
-
export type { SliderProps } from '@lilara/ui-web-react';
|
|
65
|
-
export { TextInput } from '@lilara/ui-web-react';
|
|
66
|
-
export { TextArea } from '@lilara/ui-web-react';
|
|
67
|
-
export { Checkbox } from '@lilara/ui-web-react';
|
|
68
|
-
export { Switch } from '@lilara/ui-web-react';
|
|
69
|
-
export { Select } from '@lilara/ui-web-react';
|
|
70
|
-
export { SelectWithSections } from '@lilara/ui-web-react';
|
|
71
|
-
export { Multiselect } from '@lilara/ui-web-react';
|
|
72
|
-
export { MultiselectWithSections } from '@lilara/ui-web-react';
|
|
73
|
-
export { Slider } from '@lilara/ui-web-react';
|
|
74
|
-
export type { BannerProps } from '@lilara/ui-web-react';
|
|
75
|
-
export type { TooltipProps } from '@lilara/ui-web-react';
|
|
76
|
-
export { Banner } from '@lilara/ui-web-react';
|
|
77
|
-
export { Tooltip } from '@lilara/ui-web-react';
|
|
78
|
-
export type { BadgeProps } from '@lilara/ui-web-react';
|
|
79
|
-
export type { TagProps } from '@lilara/ui-web-react';
|
|
80
|
-
export { Badge } from '@lilara/ui-web-react';
|
|
81
|
-
export { Tag } from '@lilara/ui-web-react';
|
package/index.js
CHANGED
|
@@ -1,46 +1,30 @@
|
|
|
1
|
-
import { B as s, M as t, a as r, b as n, O as o, c, d as
|
|
2
|
-
import { Badge as k, Banner as w, Button as A, Checkbox as F, Multiselect as j, MultiselectWithSections as q, Select as P, SelectWithSections as R, Slider as z, Spinner as D, Switch as E, Tag as G, TextArea as J, TextInput as K, Tooltip as L } from "@lilara/ui-web-react";
|
|
1
|
+
import { B as s, M as t, a as r, b as n, O as o, c as b, d as c, e as h, f as u, g as v, h as W, T as l, W as y, i as O, j as d, k as i, l as C, m as p, u as M, n as g, o as m, p as x, q as H, r as f, s as B, t as I, v as F } from "./webchat-app-BUGnjp8Q.js";
|
|
3
2
|
export {
|
|
4
|
-
k as Badge,
|
|
5
|
-
w as Banner,
|
|
6
|
-
A as Button,
|
|
7
3
|
s as ButtonComponent,
|
|
8
|
-
F as Checkbox,
|
|
9
4
|
t as Message,
|
|
10
5
|
r as MessageBubble,
|
|
11
6
|
n as MessageMachineRenderer,
|
|
12
|
-
j as Multiselect,
|
|
13
|
-
q as MultiselectWithSections,
|
|
14
7
|
o as Overlay,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
D as Spinner,
|
|
25
|
-
E as Switch,
|
|
26
|
-
G as Tag,
|
|
27
|
-
J as TextArea,
|
|
28
|
-
K as TextInput,
|
|
29
|
-
L as Tooltip,
|
|
30
|
-
W as TypingIndicator,
|
|
31
|
-
v as WebchatApp,
|
|
32
|
-
p as WebchatContainer,
|
|
8
|
+
b as OverlayConfirmModal,
|
|
9
|
+
c as OverlayContent,
|
|
10
|
+
h as OverlayContext,
|
|
11
|
+
u as OverlayCoverFrame,
|
|
12
|
+
v as OverlayHeader,
|
|
13
|
+
W as OverlayWebviewFrame,
|
|
14
|
+
l as TypingIndicator,
|
|
15
|
+
y as WebchatApp,
|
|
16
|
+
O as WebchatContainer,
|
|
33
17
|
d as WebchatHeader,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
18
|
+
i as WebchatInput,
|
|
19
|
+
C as WebchatMessages,
|
|
20
|
+
p as WebchatProvider,
|
|
37
21
|
M as useOverlay,
|
|
38
22
|
g as useOverlayContext,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
23
|
+
m as useOverlayHeader,
|
|
24
|
+
x as useWebchatContainer,
|
|
25
|
+
H as useWebchatContext,
|
|
26
|
+
f as useWebchatHeader,
|
|
27
|
+
B as useWebchatInput,
|
|
28
|
+
I as useWebchatMessages,
|
|
29
|
+
F as useWebchatState
|
|
46
30
|
};
|
|
@@ -14,6 +14,11 @@ export interface WebchatAppProps extends Omit<WebchatStateProps, 'customMessages
|
|
|
14
14
|
title?: string;
|
|
15
15
|
/** Placeholder text for input */
|
|
16
16
|
placeholder?: string;
|
|
17
|
+
/**
|
|
18
|
+
* When true, shows "Powered by Hubtype" under the input.
|
|
19
|
+
* Can also be set via WebchatTrigger `webchatConfig.showBranding`. Default: true.
|
|
20
|
+
*/
|
|
21
|
+
showBranding?: boolean;
|
|
17
22
|
/** Custom messages registry */
|
|
18
23
|
customMessages?: Record<string, React.ComponentType<any>>;
|
|
19
24
|
/** Cover components registry */
|
|
@@ -38,4 +43,4 @@ export interface WebchatAppProps extends Omit<WebchatStateProps, 'customMessages
|
|
|
38
43
|
* />
|
|
39
44
|
* ```
|
|
40
45
|
*/
|
|
41
|
-
export declare function WebchatApp({ appId, isOpen, onClose, onControllerReady, title, placeholder, customMessages, avatarConfig, coverRegistry, ...restConfig }: WebchatAppProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare function WebchatApp({ appId, isOpen, onClose, onControllerReady, title, placeholder, showBranding, customMessages, avatarConfig, coverRegistry, ...restConfig }: WebchatAppProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
export interface CustomScrollbarState {
|
|
3
|
+
thumbHeight: number;
|
|
4
|
+
thumbTop: number;
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
trackRef: RefObject<HTMLDivElement>;
|
|
7
|
+
thumbRef: RefObject<HTMLDivElement>;
|
|
8
|
+
onTrackMouseDown: (e: React.MouseEvent) => void;
|
|
9
|
+
onThumbMouseDown: (e: React.MouseEvent) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function useCustomScrollbar(scrollRef: RefObject<HTMLDivElement>): CustomScrollbarState;
|
|
@@ -62,6 +62,8 @@ export interface WebchatInputProps extends BaseWebchatProps {
|
|
|
62
62
|
placeholder?: string;
|
|
63
63
|
variant?: 'default';
|
|
64
64
|
disabled?: boolean;
|
|
65
|
+
/** When true, shows the "Powered by Hubtype" line below the input. Default: true. */
|
|
66
|
+
showBranding?: boolean;
|
|
65
67
|
}
|
|
66
68
|
export interface WebchatHeaderProps extends BaseWebchatProps {
|
|
67
69
|
title?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botonic/webchat-react",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
"./styles.css": "./styles.css"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@lilara/foundations": ">=0.3.1",
|
|
23
|
-
"@lilara/ui-web-react": ">=0.3.1",
|
|
24
22
|
"class-variance-authority": "^0.7.0",
|
|
25
23
|
"react-aria": "3.33.1",
|
|
26
24
|
"@xstate/react": "^5.0.4"
|
|
@@ -28,8 +26,8 @@
|
|
|
28
26
|
"peerDependencies": {
|
|
29
27
|
"react": "^18.0.0",
|
|
30
28
|
"react-dom": "^18.0.0",
|
|
31
|
-
"@botonic/webchat-core": "2.
|
|
32
|
-
"@botonic/shared": "2.
|
|
29
|
+
"@botonic/webchat-core": "2.25.0",
|
|
30
|
+
"@botonic/shared": "2.25.0"
|
|
33
31
|
},
|
|
34
32
|
"publishConfig": {
|
|
35
33
|
"access": "public"
|