@botonic/webchat-react 2.27.0 → 2.28.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 2.28.0 (2026-05-06)
2
+
3
+ ### 🚀 Features
4
+
5
+ - **webchat:** message grouping, responsive layout, and token refinements (BLT-2359) ([#880](https://github.com/metis-ai/hubtype-product/pull/880))
6
+ - **lilara:** semantic token layer — primary/secondary scales, text/surface/radius tokens, component CSS migration ([#879](https://github.com/metis-ai/hubtype-product/pull/879))
7
+ - **foundations:** semantic token layer — PR 1 foundations (BLT-2358) ([#874](https://github.com/metis-ai/hubtype-product/pull/874))
8
+
9
+ ### ❤️ Thank You
10
+
11
+ - David Hidalgo @Davidhidalgo
12
+
1
13
  ## 2.27.0 (2026-04-29)
2
14
 
3
15
  ### 🚀 Features
package/CLAUDE.md CHANGED
@@ -71,8 +71,8 @@ The cascade stack, from lowest to highest priority:
71
71
  /* webchat-tokens.css */
72
72
  @layer overrides {
73
73
  :root {
74
- --webchat-input-bg: var(--color-neutral-white);
75
- --webchat-send-button-color: var(--color-primary-500);
74
+ --webchat-input-bg: var(--surface-foreground);
75
+ --webchat-send-button-color: var(--primary-500);
76
76
  }
77
77
  }
78
78
  ```
@@ -83,13 +83,17 @@ The cascade stack, from lowest to highest priority:
83
83
 
84
84
  Every value a consumer might want to customize must be a `--webchat-*` token defined in `webchat-tokens.css`.
85
85
 
86
- Pattern: `--webchat-{component}-{property}` with fallback to a foundations token:
86
+ Pattern: `--webchat-{component}-{property}` with fallback to a semantic foundations token:
87
87
 
88
88
  ```css
89
- --webchat-input-bg: var(--color-neutral-white);
90
- --webchat-bubble-bot-bg: var(--color-neutral-100);
89
+ --webchat-input-bg: var(--surface-foreground);
90
+ --webchat-send-button-color: var(--primary-500);
91
+ --webchat-bubble-bot-bg: var(--primary-50);
91
92
  ```
92
93
 
94
+ Prefer `--primary-*` / `--secondary-*` over raw `--color-purple-*` / `--color-aqua-*`.
95
+ Prefer `--color-focus` over `--secondary-600` directly.
96
+
93
97
  ## Message Components
94
98
 
95
99
  ```
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as s, a as t, C as o, D as r, b as n, c as u, d as i, e as c, f as l, g as d, h, M as b, i as g, j as W, k as p, O as C, l as v, m as M, n as y, o as O, p as m, q as D, T as H, W as T, r as x, s as B, t as I, u as S, v as w, w as A, x as E, y as f, z as F, A as L, E as R, F as _, G as k, H as G, I as P, J as U, K as j, L as q } from "./webchat-app-DSDMjE-m.js";
1
+ import { B as s, a as t, C as o, D as r, b as n, c as u, d as i, e as c, f as l, g as d, h, M as b, i as g, j as W, k as p, O as C, l as v, m as M, n as y, o as O, p as m, q as D, T as H, W as T, r as x, s as B, t as I, u as S, v as w, w as A, x as E, y as f, z as F, A as L, E as R, F as _, G as k, H as G, I as P, J as U, K as j, L as q } from "./webchat-app-I5AArwfY.js";
2
2
  import { Badge as J, Banner as K, Button as N, Checkbox as Y, Multiselect as Q, MultiselectWithSections as V, Select as X, SelectWithSections as Z, Slider as $, Spinner as ee, Switch as ae, Tag as se, TextArea as te, TextInput as oe, Tooltip as re } from "@lilara/ui-web-react";
3
3
  export {
4
4
  s as Backdrop,
@@ -4,6 +4,10 @@ export interface MessageBubbleProps {
4
4
  variant?: 'user' | 'bot' | 'system' | 'agent';
5
5
  /** The status of the message. */
6
6
  status?: 'sending' | 'sent' | 'error';
7
+ /** Flatten the near-side top corner (continuation of a group). */
8
+ flatTopCorner?: boolean;
9
+ /** Flatten the near-side bottom corner (more messages follow in the group). */
10
+ flatBottomCorner?: boolean;
7
11
  /** A class name to apply to the bubble. */
8
12
  className?: string;
9
13
  /** The content to render inside the bubble. */
@@ -19,6 +19,14 @@ export interface MessageProps {
19
19
  className?: string;
20
20
  /** The content to render inside the message bubble. */
21
21
  children: React.ReactNode;
22
+ /** Hide the footer when the next message belongs to the same group. */
23
+ hideFooter?: boolean;
24
+ /** Whether this message continues a group started by the previous message. */
25
+ isContinuation?: boolean;
26
+ /** Expand the bubble to the full max-width (e.g. carousel, media). */
27
+ isFullWidth?: boolean;
28
+ /** Bot interaction ID, rendered as a data attribute for grouping. */
29
+ botInteractionId?: string;
22
30
  }
23
31
  /** Message component with common functionality for all message types. */
24
32
  export declare const Message: React.ForwardRefExoticComponent<MessageProps & React.RefAttributes<HTMLDivElement>>;
@@ -21,6 +21,14 @@ export interface UseMessageProps {
21
21
  className?: string;
22
22
  /** The content to render inside the bubble. */
23
23
  children: React.ReactNode;
24
+ /** Hide the footer when this message is grouped with the next. */
25
+ hideFooter?: boolean;
26
+ /** Whether this message continues a group started by the previous message. */
27
+ isContinuation?: boolean;
28
+ /** Whether this message has action buttons below the bubble. */
29
+ hasActions?: boolean;
30
+ /** Expand the bubble to the full max-width (e.g. carousel, media). */
31
+ isFullWidth?: boolean;
24
32
  /** Additional props to pass through. */
25
33
  [key: string]: any;
26
34
  }
@@ -1,5 +1,5 @@
1
- import { BotonicButtonContent, WebchatMessage } from '@botonic/shared';
2
- import { WebchatMessageMachine } from '@botonic/webchat-core';
1
+ import { BotonicButtonContent } from '@botonic/shared';
2
+ import { WebchatMessage, WebchatMessageMachine } from '@botonic/webchat-core';
3
3
  import { ActorRefFrom } from 'xstate';
4
4
  import { AvatarConfigResult } from './use-avatar';
5
5
  export interface MessageMachineData {
@@ -12,7 +12,7 @@ export declare function useWebchatMessages(props: WebchatMessagesProps, state: W
12
12
  };
13
13
  messageListProps: {
14
14
  messageActors: import('xstate').ActorRef<import('xstate').MachineSnapshot<{
15
- message: import('@botonic/shared').WebchatMessage;
15
+ message: import('@botonic/webchat-core').WebchatMessage;
16
16
  user: import('@botonic/shared').HubtypeUser;
17
17
  status: import('@botonic/webchat-core').WebchatMessageStatus;
18
18
  file?: File;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/webchat-react",
3
- "version": "2.27.0",
3
+ "version": "2.28.0",
4
4
  "type": "module",
5
5
  "types": "./index.d.ts",
6
6
  "module": "./index.js",
@@ -26,9 +26,9 @@
26
26
  "peerDependencies": {
27
27
  "react": "^18.0.0",
28
28
  "react-dom": "^18.0.0",
29
- "@botonic/webchat-core": "2.27.0",
30
- "@botonic/shared": "2.27.0",
31
- "@lilara/ui-web-react": ">=0.6.0"
29
+ "@botonic/webchat-core": "2.28.0",
30
+ "@botonic/shared": "2.28.0",
31
+ "@lilara/ui-web-react": ">=0.7.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"