@sendbird/ai-agent-messenger-react 1.22.0 → 1.23.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/dist/index.d.ts CHANGED
@@ -973,6 +973,8 @@ declare interface AIAgentStringSet {
973
973
  failed_message_remove: string;
974
974
 
975
975
  file_upload_no_supported_files: string;
976
+ file_upload_replace_alert_title: string;
977
+ file_upload_replace_alert_description: string;
976
978
 
977
979
  // Accessibility
978
980
  a11y_message_list: string;
@@ -1008,6 +1010,7 @@ declare interface AIAgentStringSet {
1008
1010
  a11y_screen_conversation: string;
1009
1011
  a11y_screen_conversation_with_agent: (name: string) => string;
1010
1012
  a11y_screen_conversation_list_no_count: string;
1013
+ a11y_screen_conversation_list_with_count: (count: number) => string;
1011
1014
  a11y_csat_displayed: string;
1012
1015
  a11y_empty_conversation: string;
1013
1016
  a11y_input_disabled: string;
@@ -1068,6 +1071,8 @@ declare interface AIAgentStringSet {
1068
1071
  placeholder_no_messages: string;
1069
1072
  placeholder_no_conversations: string;
1070
1073
  placeholder_something_went_wrong_retry_label: string;
1074
+ button_ok: string;
1075
+ button_cancel: string;
1071
1076
  };
1072
1077
 
1073
1078
  feedback: {
@@ -2511,12 +2516,13 @@ declare type IncomingMessageBodyProps<T extends MessageType = MessageType> = Inc
2511
2516
  bubbleContentColor?: string;
2512
2517
  bubbleBackgroundColor?: string;
2513
2518
  };
2519
+ surface?: 'bubble' | 'plain';
2514
2520
  };
2515
2521
 
2516
2522
  export declare const IncomingMessageLayout: {
2517
2523
  (props: PropsWithChildren): ReactNode;
2518
2524
  defaults: {
2519
- template: ComponentType<IncomingMessageProps>;
2525
+ template: ComponentType<IncomingMessageTemplateProps>;
2520
2526
  components: {
2521
2527
  SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
2522
2528
  SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
@@ -2764,10 +2770,10 @@ export declare const IncomingMessageLayout: {
2764
2770
  };
2765
2771
  };
2766
2772
  Template: ({ template, children }: {
2767
- template?: ComponentType<IncomingMessageProps> | undefined;
2773
+ template?: ComponentType<IncomingMessageTemplateProps> | undefined;
2768
2774
  children?: ReactNode;
2769
2775
  }) => JSX.Element;
2770
- Context: Context<LayoutContextValue<IncomingMessageProps, {
2776
+ Context: Context<LayoutContextValue<IncomingMessageTemplateProps, {
2771
2777
  SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
2772
2778
  SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
2773
2779
  SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
@@ -3012,7 +3018,7 @@ export declare const IncomingMessageLayout: {
3012
3018
  Feedback: ({ isBotMessage, isConversationClosed, isStreaming, isFeedbackEnabled, isFeedbackCommentEnabled, extendedMessagePayload, onFeedbackUpdate, }: IncomingMessageProps) => ReactNode;
3013
3019
  MessageLogs: (_: IncomingMessageProps) => ReactNode;
3014
3020
  }>>;
3015
- useContext: () => LayoutContextValue<IncomingMessageProps, {
3021
+ useContext: () => LayoutContextValue<IncomingMessageTemplateProps, {
3016
3022
  SenderName: ({ sender }: Pick<IncomingMessageProps, "sender">) => ReactNode;
3017
3023
  SenderAvatar: ({ sender, isBotMessage, }: Pick<IncomingMessageProps, "sender" | "isBotMessage">) => ReactNode;
3018
3024
  SentTime: ({ createdAt }: Pick<IncomingMessageProps, "createdAt">) => ReactNode;
@@ -3540,6 +3546,8 @@ export declare const IncomingMessageLayout: {
3540
3546
  export declare type IncomingMessageProps<T extends IncomingMessageUnion['messageType'] = IncomingMessageUnion['messageType']> =
3541
3547
  PickMessageProps<IncomingMessageUnion, T>;
3542
3548
 
3549
+ declare type IncomingMessageTemplateProps = IncomingMessageProps & Partial<InternalExtraProps>;
3550
+
3543
3551
  declare type IncomingMessageUnion =
3544
3552
  | IncomingBaseMessageProps<{
3545
3553
  messageType: 'user';
@@ -3566,7 +3574,10 @@ declare type IncomingMessageUnion =
3566
3574
 
3567
3575
  declare function IncomingTextBody(props: IncomingMessageBodyProps): JSX.Element | null;
3568
3576
 
3577
+ declare type InputMode = 'enabled' | 'readOnly' | 'disabled';
3578
+
3569
3579
  declare type InputState = {
3580
+ _mode: InputMode;
3570
3581
  disabled: boolean;
3571
3582
  disabledBy:
3572
3583
  | 'unavailable'
@@ -3581,6 +3592,11 @@ declare type InputState = {
3581
3592
  | (string & {});
3582
3593
  };
3583
3594
 
3595
+ declare type InternalExtraProps = {
3596
+ maxBodyWidth?: number;
3597
+ testerMode?: boolean;
3598
+ };
3599
+
3584
3600
  declare interface InternalMessageTemplateVariables {
3585
3601
  carousel_padding_left?: number;
3586
3602
  carousel_padding_right?: number;
@@ -3682,7 +3698,7 @@ export declare const MessageListUILayout: {
3682
3698
  template: ComponentType<unknown>;
3683
3699
  components: {
3684
3700
  DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
3685
- ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
3701
+ ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
3686
3702
  };
3687
3703
  };
3688
3704
  Template: ({ template, children }: {
@@ -3691,18 +3707,18 @@ export declare const MessageListUILayout: {
3691
3707
  }) => JSX.Element;
3692
3708
  Context: Context<LayoutContextValue<unknown, {
3693
3709
  DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
3694
- ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
3710
+ ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
3695
3711
  }>>;
3696
3712
  useContext: () => LayoutContextValue<unknown, {
3697
3713
  DateSeparator: ({ className, date, style }: DateSeparatorProps) => ReactNode;
3698
- ScrollToBottomButton: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
3714
+ ScrollToBottomButton: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
3699
3715
  }>;
3700
3716
  } & {
3701
3717
  DateSeparator: (props: {
3702
3718
  component: ({ className, date, style }: DateSeparatorProps) => ReactNode;
3703
3719
  }) => null;
3704
3720
  ScrollToBottomButton: (props: {
3705
- component: ({ className, style, onClick, ariaLabel, }: ScrollToBottomButtonProps) => ReactNode;
3721
+ component: ({ className, style, onClick }: ScrollToBottomButtonProps) => ReactNode;
3706
3722
  }) => null;
3707
3723
  };
3708
3724
 
@@ -4246,7 +4262,6 @@ declare type SBUFoundationProps<T = NonNullable<unknown>> = T & {
4246
4262
 
4247
4263
  export declare type ScrollToBottomButtonProps = SBUFoundationProps<{
4248
4264
  onClick: () => void;
4249
- ariaLabel?: string;
4250
4265
  }>;
4251
4266
 
4252
4267
  declare interface SearchConversationParams {
@@ -4315,6 +4330,7 @@ declare type StringSet = {
4315
4330
  MESSAGE_INPUT__PLACE_HOLDER__DISABLED: string;
4316
4331
  MESSAGE_INPUT__PLACE_HOLDER__STEWARD: string;
4317
4332
  MESSAGE_INPUT__PLACE_HOLDER__RECONNECTING: string;
4333
+ BUTTON__OK: string;
4318
4334
  BUTTON__CANCEL: string;
4319
4335
  BUTTON__SUBMIT: string;
4320
4336
  RETRY: string;
@@ -4334,6 +4350,8 @@ declare type StringSet = {
4334
4350
  FILE_UPLOAD_NO_SUPPORTED_FILES: string;
4335
4351
  FILE_UPLOAD_PHOTOS: string;
4336
4352
  FILE_UPLOAD_FILES: string;
4353
+ FILE_UPLOAD_REPLACE_ALERT__TITLE: string;
4354
+ FILE_UPLOAD_REPLACE_ALERT__DESCRIPTION: string;
4337
4355
  FILE_VIEWER__UNSUPPORT: string;
4338
4356
  IMAGE_VIEWER__DEFAULT_TITLE: string;
4339
4357
  CSAT_TITLE_UNSUBMITTED: string;
@@ -4413,6 +4431,7 @@ declare type StringSet = {
4413
4431
  A11Y_FILE_UPLOAD_OPTIONS: string;
4414
4432
  A11Y_FAILED_MESSAGE_OPTIONS: string;
4415
4433
  A11Y_FEEDBACK_OPTIONS: string;
4434
+ A11Y_CSAT_TEXT_INPUT_LABEL: string;
4416
4435
  A11Y_TYPING_FORMAT: (name: string) => string;
4417
4436
  A11Y_MESSAGE_FAILED: string;
4418
4437
  A11Y_NEW_MESSAGES_RECEIVED: (count: number) => string;
@@ -4427,6 +4446,7 @@ declare type StringSet = {
4427
4446
  A11Y_SCREEN_CONVERSATION: string;
4428
4447
  A11Y_SCREEN_CONVERSATION_WITH_AGENT: (name: string) => string;
4429
4448
  A11Y_SCREEN_CONVERSATION_LIST_NO_COUNT: string;
4449
+ A11Y_SCREEN_CONVERSATION_LIST_WITH_COUNT: (count: number) => string;
4430
4450
  A11Y_CSAT_DISPLAYED: string;
4431
4451
  A11Y_EMPTY_CONVERSATION: string;
4432
4452
  A11Y_INPUT_DISABLED: string;
@@ -4470,8 +4490,6 @@ declare type StringSet = {
4470
4490
  /** @deprecated Unused string **/
4471
4491
  BUTTON__SAVE: string;
4472
4492
  /** @deprecated Unused string **/
4473
- BUTTON__OK: string;
4474
- /** @deprecated Unused string **/
4475
4493
  NO_NAME: string;
4476
4494
  /** @deprecated Unused string **/
4477
4495
  CHANNEL_FROZEN: string;