@botonic/webchat-react 2.28.0 → 2.30.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.
Files changed (93) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/index.d.ts +6 -3
  3. package/index.js +61 -57
  4. package/lib/components/message/index.d.ts +1 -0
  5. package/lib/components/message/message/message.d.ts +2 -0
  6. package/lib/components/message/message/use-message.d.ts +2 -0
  7. package/lib/components/message/rating-message/icons/face-angry.d.ts +2 -0
  8. package/lib/components/message/rating-message/icons/face-frown.d.ts +2 -0
  9. package/lib/components/message/rating-message/icons/face-grin-beam.d.ts +2 -0
  10. package/lib/components/message/rating-message/icons/face-meh.d.ts +2 -0
  11. package/lib/components/message/rating-message/icons/face-smile.d.ts +2 -0
  12. package/lib/components/message/rating-message/icons/index.d.ts +7 -0
  13. package/lib/components/message/rating-message/icons/rating-icon-types.d.ts +5 -0
  14. package/lib/components/message/rating-message/icons/star.d.ts +2 -0
  15. package/lib/components/message/rating-message/index.d.ts +1 -0
  16. package/lib/components/message/rating-message/rating-message.d.ts +4 -0
  17. package/lib/components/message/rating-message/use-rating-message.d.ts +34 -0
  18. package/lib/components/message-machine-renderer/message-machine-renderer.d.ts +3 -2
  19. package/lib/components/preview-events/events/ai-agent/ai-agent.d.ts +3 -0
  20. package/lib/components/preview-events/events/ai-agent/executed-tools.d.ts +7 -0
  21. package/lib/components/preview-events/events/ai-agent/index.d.ts +1 -0
  22. package/lib/components/preview-events/events/ai-agent/parse-tools.d.ts +9 -0
  23. package/lib/components/preview-events/events/ai-agent-router/ai-agent-router.d.ts +3 -0
  24. package/lib/components/preview-events/events/ai-agent-router/index.d.ts +1 -0
  25. package/lib/components/preview-events/events/bot-action.d.ts +3 -0
  26. package/lib/components/preview-events/events/components/guardrail-item.d.ts +14 -0
  27. package/lib/components/preview-events/events/components/index.d.ts +2 -0
  28. package/lib/components/preview-events/events/components/sources-section.d.ts +11 -0
  29. package/lib/components/preview-events/events/conditional-channel.d.ts +3 -0
  30. package/lib/components/preview-events/events/conditional-country.d.ts +3 -0
  31. package/lib/components/preview-events/events/conditional-custom.d.ts +3 -0
  32. package/lib/components/preview-events/events/conditional-queue-status.d.ts +3 -0
  33. package/lib/components/preview-events/events/constants.d.ts +32 -0
  34. package/lib/components/preview-events/events/fallback.d.ts +3 -0
  35. package/lib/components/preview-events/events/handoff-success.d.ts +3 -0
  36. package/lib/components/preview-events/events/index.d.ts +15 -0
  37. package/lib/components/preview-events/events/keyword.d.ts +3 -0
  38. package/lib/components/preview-events/events/knowledge-base.d.ts +3 -0
  39. package/lib/components/preview-events/events/redirect-flow.d.ts +3 -0
  40. package/lib/components/preview-events/events/smart-intent.d.ts +3 -0
  41. package/lib/components/preview-events/events/types.d.ts +112 -0
  42. package/lib/components/preview-events/events/webview-action-triggered.d.ts +3 -0
  43. package/lib/components/preview-events/hooks/use-knowledge-base-info.d.ts +19 -0
  44. package/lib/components/preview-events/hooks/use-last-label-position.d.ts +9 -0
  45. package/lib/components/preview-events/icons/ai-router-icon.d.ts +1 -0
  46. package/lib/components/preview-events/icons/ai-specialist-icon.d.ts +1 -0
  47. package/lib/components/preview-events/icons/arrow-progress-icon.d.ts +1 -0
  48. package/lib/components/preview-events/icons/brain-icon.d.ts +1 -0
  49. package/lib/components/preview-events/icons/caret-down-icon.d.ts +1 -0
  50. package/lib/components/preview-events/icons/caret-up-icon.d.ts +1 -0
  51. package/lib/components/preview-events/icons/circle-check-icon.d.ts +1 -0
  52. package/lib/components/preview-events/icons/code-icon.d.ts +1 -0
  53. package/lib/components/preview-events/icons/file-pdf-icon.d.ts +1 -0
  54. package/lib/components/preview-events/icons/file-word-icon.d.ts +1 -0
  55. package/lib/components/preview-events/icons/hand-icon.d.ts +1 -0
  56. package/lib/components/preview-events/icons/head-set-icon.d.ts +1 -0
  57. package/lib/components/preview-events/icons/index.d.ts +19 -0
  58. package/lib/components/preview-events/icons/life-ring-icon.d.ts +1 -0
  59. package/lib/components/preview-events/icons/link-icon.d.ts +1 -0
  60. package/lib/components/preview-events/icons/quote-right-icon.d.ts +1 -0
  61. package/lib/components/preview-events/icons/screwdriver-wrench-icon.d.ts +1 -0
  62. package/lib/components/preview-events/icons/split-icon.d.ts +1 -0
  63. package/lib/components/preview-events/icons/wand-icon.d.ts +1 -0
  64. package/lib/components/preview-events/icons/window-restore-icon.d.ts +1 -0
  65. package/lib/components/preview-events/index.d.ts +3 -0
  66. package/lib/components/preview-events/preview-event-message/index.d.ts +1 -0
  67. package/lib/components/preview-events/preview-event-message/preview-event-message.d.ts +20 -0
  68. package/lib/components/preview-events/preview-event-message/use-preview-event-message.d.ts +17 -0
  69. package/lib/components/preview-events/preview-events-types.d.ts +12 -0
  70. package/lib/components/shared/index.d.ts +4 -2
  71. package/lib/components/shared/markdown-text/index.d.ts +2 -0
  72. package/lib/components/shared/markdown-text/markdown-text.d.ts +6 -0
  73. package/lib/components/shared/quick-reply/index.d.ts +2 -0
  74. package/lib/components/shared/{button-component/button-component.d.ts → quick-reply/quick-reply.d.ts} +4 -4
  75. package/lib/components/webchat-app/webchat-app.d.ts +1 -4
  76. package/lib/components/webchat-messages/use-webchat-messages.d.ts +6 -0
  77. package/lib/components/webchat-overlay/base/index.d.ts +0 -1
  78. package/lib/components/webchat-overlay/base/overlay/use-overlay.d.ts +0 -4
  79. package/lib/components/webchat-overlay/base/overlay-context.d.ts +0 -2
  80. package/lib/components/webchat-overlay/index.d.ts +1 -1
  81. package/lib/components/webchat-provider/webchat-context.d.ts +2 -0
  82. package/lib/hooks/use-update-custom-message-props.d.ts +1 -0
  83. package/lib/hooks/use-webchat-state.d.ts +6 -2
  84. package/lib/types/webchat-props.d.ts +19 -0
  85. package/package.json +8 -4
  86. package/styles.css +52 -1
  87. package/trigger.js +1 -1
  88. package/webchat-app-Cxzk8Q-q.js +5437 -0
  89. package/lib/components/shared/button-component/index.d.ts +0 -2
  90. package/lib/components/webchat-overlay/base/confirm-modal/confirm-modal.d.ts +0 -8
  91. package/lib/components/webchat-overlay/base/confirm-modal/index.d.ts +0 -2
  92. package/webchat-app-I5AArwfY.js +0 -4122
  93. /package/lib/components/shared/{button-component → quick-reply}/external-link-icon.d.ts +0 -0
@@ -0,0 +1,9 @@
1
+ import { RefObject } from 'react';
2
+ interface UseLastLabelPositionProps {
3
+ wrapperRef: RefObject<HTMLDivElement | null>;
4
+ isExpanded: boolean;
5
+ debugEvent: unknown;
6
+ isCollapsible: boolean;
7
+ }
8
+ export declare function useLastLabelPosition({ wrapperRef, isExpanded, debugEvent, isCollapsible, }: UseLastLabelPositionProps): void;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function AiRouterIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function AiSpecialistIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ArrowProgressIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function BrainIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CaretDownIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CaretUpIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CircleCheckIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function CodeIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FilePdfIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function FileWordIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HandIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function HeadSetIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ export { AiRouterIcon } from './ai-router-icon';
2
+ export { AiSpecialistIcon } from './ai-specialist-icon';
3
+ export { ArrowProgressIcon } from './arrow-progress-icon';
4
+ export { BrainIcon } from './brain-icon';
5
+ export { CaretDownIcon } from './caret-down-icon';
6
+ export { CaretUpIcon } from './caret-up-icon';
7
+ export { CircleCheckIcon } from './circle-check-icon';
8
+ export { CodeIcon } from './code-icon';
9
+ export { FilePdfIcon } from './file-pdf-icon';
10
+ export { FileWordIcon } from './file-word-icon';
11
+ export { HandIcon } from './hand-icon';
12
+ export { HeadSetIcon } from './head-set-icon';
13
+ export { LifeRingIcon } from './life-ring-icon';
14
+ export { LinkIcon } from './link-icon';
15
+ export { QuoteRightIcon } from './quote-right-icon';
16
+ export { ScrewdriverWrenchIcon } from './screwdriver-wrench-icon';
17
+ export { SplitIcon } from './split-icon';
18
+ export { WandIcon } from './wand-icon';
19
+ export { WindowRestoreIcon } from './window-restore-icon';
@@ -0,0 +1 @@
1
+ export declare function LifeRingIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function LinkIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function QuoteRightIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function ScrewdriverWrenchIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SplitIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function WandIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function WindowRestoreIcon(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export type { DebugEvent } from './events/types';
2
+ export { PreviewEventMessage, type PreviewEventMessageProps, SYSTEM_MESSAGE_ROLE, } from './preview-event-message';
3
+ export type { DebugEventConfig } from './preview-events-types';
@@ -0,0 +1 @@
1
+ export { PreviewEventMessage, type PreviewEventMessageProps, SYSTEM_MESSAGE_ROLE, } from './preview-event-message';
@@ -0,0 +1,20 @@
1
+ import { PreviewUtils } from '@botonic/shared';
2
+ import { DebugEvent } from '../events';
3
+ /**
4
+ * DOM `role` stamped on every preview debug-event message.
5
+ *
6
+ * This is a cross-package contract, not a decorative attribute: the dashboard's
7
+ * flow-builder preview panel implements its "show debug system events" toggle by
8
+ * querying `[role="system-message"]` and flipping each match's `display` (see
9
+ * `usePersistedToggleSystemEvents` / `usePersistedToggleSystemEventsV2` in
10
+ * feature-flow-builder). Changing this value silently breaks that toggle, so the
11
+ * dashboard's `SYSTEM_MESSAGE_ROLE` / `SYSTEM_MESSAGE_ROLE_V2` constants must stay
12
+ * in sync with it.
13
+ */
14
+ export declare const SYSTEM_MESSAGE_ROLE = "system-message";
15
+ export interface PreviewEventMessageProps {
16
+ debugEvent: DebugEvent;
17
+ messageId?: string;
18
+ previewUtils?: PreviewUtils;
19
+ }
20
+ export declare const PreviewEventMessage: ({ debugEvent, messageId, previewUtils, }: PreviewEventMessageProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ import { PreviewUtils } from '@botonic/shared';
2
+ import { default as React } from 'react';
3
+ import { DebugEvent } from '../events';
4
+ import { DebugEventConfig } from '../preview-events-types';
5
+ export interface UsePreviewEventMessageProps {
6
+ debugEvent: DebugEvent;
7
+ messageId?: string;
8
+ previewUtils?: PreviewUtils;
9
+ }
10
+ export declare function usePreviewEventMessage({ debugEvent, messageId, previewUtils, }: UsePreviewEventMessageProps): {
11
+ isExpanded: boolean;
12
+ eventConfig: DebugEventConfig | undefined;
13
+ wrapperRef: React.RefObject<HTMLDivElement>;
14
+ messageId: string | undefined;
15
+ previewUtils: PreviewUtils | undefined;
16
+ handleContainerClick: (e: React.MouseEvent) => void;
17
+ };
@@ -0,0 +1,12 @@
1
+ import { default as React } from 'react';
2
+ export interface IconProps {
3
+ color?: string;
4
+ }
5
+ export interface DebugEventConfig {
6
+ action: string;
7
+ title: React.ReactNode;
8
+ component: React.ComponentType<any> | null;
9
+ icon?: React.ReactNode;
10
+ collapsible?: boolean;
11
+ }
12
+ export type { DebugEvent } from './events/types';
@@ -1,2 +1,4 @@
1
- export type { ButtonComponentProps } from './button-component';
2
- export { ButtonComponent } from './button-component';
1
+ export type { MarkdownTextProps } from './markdown-text';
2
+ export { MarkdownText } from './markdown-text';
3
+ export type { QuickReplyProps } from './quick-reply';
4
+ export { QuickReply } from './quick-reply';
@@ -0,0 +1,2 @@
1
+ export type { MarkdownTextProps } from './markdown-text';
2
+ export { MarkdownText } from './markdown-text';
@@ -0,0 +1,6 @@
1
+ export interface MarkdownTextProps {
2
+ text: string;
3
+ className?: string;
4
+ }
5
+ export declare const MarkdownText: ({ text, className, }: MarkdownTextProps) => JSX.Element;
6
+ export default MarkdownText;
@@ -0,0 +1,2 @@
1
+ export type { QuickReplyProps } from './quick-reply';
2
+ export { QuickReply } from './quick-reply';
@@ -1,5 +1,5 @@
1
1
  import { BotonicButtonContent } from '@botonic/shared';
2
- export interface ButtonComponentProps {
2
+ export interface QuickReplyProps {
3
3
  /** The button text. */
4
4
  text: string;
5
5
  /** Whether the button is disabled. */
@@ -19,6 +19,6 @@ export interface ButtonComponentProps {
19
19
  /** Button variant - 'primary' for carousel-style, 'secondary' for button-message-style. */
20
20
  variant?: 'primary' | 'secondary';
21
21
  }
22
- /** Shared button component for use in button messages and carousel messages. */
23
- export declare const ButtonComponent: import('react').ForwardRefExoticComponent<ButtonComponentProps & import('react').RefAttributes<HTMLButtonElement>>;
24
- export default ButtonComponent;
22
+ /** Chat message button for quick replies and carousel CTAs. */
23
+ export declare const QuickReply: import('react').ForwardRefExoticComponent<QuickReplyProps & import('react').RefAttributes<HTMLButtonElement>>;
24
+ export default QuickReply;
@@ -1,10 +1,9 @@
1
1
  import { WebchatController } from '@botonic/webchat-core';
2
- import { ComponentType } from 'react';
3
2
  import { WebchatHeroHeaderLayoutConfig } from '../../hero-header-layout';
4
3
  import { WebchatStateProps } from '../../hooks/use-webchat-state';
5
4
  import { WebchatInputIcons } from '../../types/webchat-props';
6
5
  import { CoverComponentRegistry } from '../webchat-overlay';
7
- export interface WebchatAppProps extends Omit<WebchatStateProps, 'customMessages'> {
6
+ export interface WebchatAppProps extends WebchatStateProps {
8
7
  /** Whether the webchat is open */
9
8
  isOpen: boolean;
10
9
  /** Callback when the webchat is closed */
@@ -22,8 +21,6 @@ export interface WebchatAppProps extends Omit<WebchatStateProps, 'customMessages
22
21
  * Can also be set via WebchatTrigger `webchatConfig.showBranding`. Default: true.
23
22
  */
24
23
  showBranding?: boolean;
25
- /** Custom messages registry */
26
- customMessages?: Record<string, ComponentType<any>>;
27
24
  /** Cover components registry */
28
25
  coverRegistry?: CoverComponentRegistry;
29
26
  /** Override default icons for the input action bar. */
@@ -25,6 +25,9 @@ export declare function useWebchatMessages(props: WebchatMessagesProps, state: W
25
25
  id: string;
26
26
  data: Record<string, string>;
27
27
  };
28
+ } | {
29
+ type: "UPDATE_CUSTOM_PROPS";
30
+ props: Record<string, unknown>;
28
31
  } | {
29
32
  type: "BUTTON_CLICKED";
30
33
  button: import('@botonic/shared').BotonicButtonContent;
@@ -46,6 +49,9 @@ export declare function useWebchatMessages(props: WebchatMessagesProps, state: W
46
49
  id: string;
47
50
  data: Record<string, string>;
48
51
  };
52
+ } | {
53
+ type: "UPDATE_CUSTOM_PROPS";
54
+ props: Record<string, unknown>;
49
55
  } | {
50
56
  type: "BUTTON_CLICKED";
51
57
  button: import('@botonic/shared').BotonicButtonContent;
@@ -2,4 +2,3 @@ export { Overlay, type OverlayProps, useOverlay } from './overlay';
2
2
  export { type CoverComponentRegistry, OverlayContext, type OverlayContextValue, useOverlayContext, } from './overlay-context';
3
3
  export { OverlayHeader, type OverlayHeaderProps, useOverlayHeader, } from './header';
4
4
  export { OverlayContent, type OverlayContentProps } from './content';
5
- export { OverlayConfirmModal, type OverlayConfirmModalProps, } from './confirm-modal';
@@ -11,11 +11,7 @@ export interface OverlayHandlers {
11
11
  export interface UseOverlayResult {
12
12
  isLoading: boolean;
13
13
  setIsLoading: (loading: boolean) => void;
14
- showConfirmModal: boolean;
15
- setShowConfirmModal: (show: boolean) => void;
16
14
  attemptClose: () => void;
17
- handleConfirmClose: () => void;
18
- handleCancelClose: () => void;
19
15
  variants: {
20
16
  isLoading: boolean;
21
17
  };
@@ -17,8 +17,6 @@ export interface OverlayContextValue {
17
17
  isLoading: boolean;
18
18
  setIsLoading: (loading: boolean) => void;
19
19
  attemptClose: () => void;
20
- showConfirmModal: boolean;
21
- setShowConfirmModal: (show: boolean) => void;
22
20
  coverRegistry?: CoverComponentRegistry;
23
21
  }
24
22
  export declare const OverlayContext: import('react').Context<OverlayContextValue | null>;
@@ -1,3 +1,3 @@
1
- export { type CoverComponentRegistry, Overlay, OverlayConfirmModal, type OverlayConfirmModalProps, OverlayContent, type OverlayContentProps, OverlayContext, type OverlayContextValue, OverlayHeader, type OverlayHeaderProps, type OverlayProps, useOverlay, useOverlayContext, useOverlayHeader, } from './base';
1
+ export { type CoverComponentRegistry, Overlay, OverlayContent, type OverlayContentProps, OverlayContext, type OverlayContextValue, OverlayHeader, type OverlayHeaderProps, type OverlayProps, useOverlay, useOverlayContext, useOverlayHeader, } from './base';
2
2
  export { OverlayCoverFrame, type OverlayCoverFrameProps } from './cover';
3
3
  export { OverlayWebviewFrame, type OverlayWebviewFrameProps } from './webview';
@@ -1,8 +1,10 @@
1
+ import { PreviewUtils } from '@botonic/shared';
1
2
  import { WebchatController } from '@botonic/webchat-core';
2
3
  import { WebchatState } from '../../hooks/use-webchat-state';
3
4
  export interface WebchatContextValue {
4
5
  state: WebchatState;
5
6
  controller: WebchatController;
7
+ previewUtils?: PreviewUtils;
6
8
  }
7
9
  export declare const WebchatContext: import('react').Context<WebchatContextValue | null>;
8
10
  export declare function useWebchatContext(): WebchatContextValue;
@@ -0,0 +1 @@
1
+ export declare function useUpdateCustomMessageProps(messageId: string | undefined): (props: Record<string, unknown>) => void;
@@ -1,11 +1,14 @@
1
1
  import { WebchatClientSettings } from '@botonic/shared';
2
2
  import { OverlayState, WebchatConfig, WebchatController, WebchatMessageMachine } from '@botonic/webchat-core';
3
+ import { ComponentType } from 'react';
3
4
  import { ActorRefFrom } from 'xstate';
4
5
  import { AvatarConfig } from '../components/message-machine-renderer/use-avatar';
5
6
  import { WebchatClientSettingsBehaviors } from './webchat-client-settings-behaviors';
7
+ export type WebchatCustomMessageComponents = Record<string, ComponentType<Record<string, unknown>>>;
6
8
  export type WebchatStateProps = WebchatConfig & {
7
9
  avatarConfig?: AvatarConfig;
8
- customMessages: any;
10
+ /** Extra or replacement custom message components. */
11
+ customMessages?: WebchatCustomMessageComponents;
9
12
  };
10
13
  export interface WebchatState {
11
14
  controller: WebchatController;
@@ -23,6 +26,7 @@ export interface WebchatState {
23
26
  avatarConfig?: AvatarConfig;
24
27
  /** Mirrors `WebchatConfig.enableResponsiveHeroHeader`; default true. */
25
28
  enableResponsiveHeroHeader: boolean;
26
- customMessages: any;
29
+ /** Embedder-supplied custom message components. */
30
+ customMessages: WebchatCustomMessageComponents;
27
31
  }
28
32
  export declare function useWebchatState(stateProps: WebchatStateProps): WebchatState;
@@ -1,6 +1,8 @@
1
1
  import { WebchatController } from '@botonic/webchat-core';
2
2
  import { ComponentType, CSSProperties, ReactNode } from 'react';
3
3
  import { CoverComponentRegistry } from '../components/webchat-overlay';
4
+ import { WebchatHeroHeaderLayoutConfig } from '../hero-header-layout';
5
+ import { WebchatStateProps } from '../hooks/use-webchat-state';
4
6
  export interface WebchatInputIcons {
5
7
  emoji?: ReactNode;
6
8
  attachment?: ReactNode;
@@ -46,6 +48,23 @@ export interface WebchatCompositionProps {
46
48
  /** Additional config passed from WebchatTrigger */
47
49
  [key: string]: unknown;
48
50
  }
51
+ /**
52
+ * Optional config a custom webchat composition may read beyond the required
53
+ * `WebchatCompositionProps`. These arrive through `WebchatCompositionProps`'s
54
+ * `[key: string]: unknown` index signature (the trigger spreads them in), so a
55
+ * composition asserts this shape once to read them with concrete types.
56
+ *
57
+ * Fields forwarded to `WebchatProvider` are picked from `WebchatStateProps` so
58
+ * their types stay in lockstep with the provider (no `as any` at the call site);
59
+ * the remaining fields are composition/layout options consumed by the layout itself.
60
+ */
61
+ export type WebchatCompositionExtras = Pick<WebchatStateProps, 'avatarConfig' | 'customMessages' | 'storage' | 'webchatClientSettings' | 'enableResponsiveHeroHeader' | 'previewUtils'> & {
62
+ title?: string;
63
+ placeholder?: string;
64
+ showBranding?: boolean;
65
+ coverRegistry?: CoverComponentRegistry;
66
+ heroHeaderLayout?: Partial<WebchatHeroHeaderLayoutConfig>;
67
+ };
49
68
  /** Loader function type for lazy loading custom webchat compositions */
50
69
  export type WebchatLoader = () => Promise<{
51
70
  default: ComponentType<WebchatCompositionProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botonic/webchat-react",
3
- "version": "2.28.0",
3
+ "version": "2.30.0",
4
4
  "type": "module",
5
5
  "types": "./index.d.ts",
6
6
  "module": "./index.js",
@@ -21,14 +21,18 @@
21
21
  "dependencies": {
22
22
  "class-variance-authority": "^0.7.0",
23
23
  "react-aria": "3.33.1",
24
+ "react-markdown": "^9.0.1",
25
+ "rehype-external-links": "^3.0.0",
26
+ "remark-breaks": "^4.0.0",
27
+ "remark-gfm": "^4.0.0",
24
28
  "@xstate/react": "^5.0.4"
25
29
  },
26
30
  "peerDependencies": {
27
31
  "react": "^18.0.0",
28
32
  "react-dom": "^18.0.0",
29
- "@botonic/webchat-core": "2.28.0",
30
- "@botonic/shared": "2.28.0",
31
- "@lilara/ui-web-react": ">=0.7.0"
33
+ "@botonic/webchat-core": "2.30.0",
34
+ "@botonic/shared": "2.30.0",
35
+ "@lilara/ui-web-react": ">=0.9.0"
32
36
  },
33
37
  "publishConfig": {
34
38
  "access": "public"