@sendbird/ai-agent-messenger-react 1.0.1 → 1.1.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,5 +1,5 @@
1
1
  import * as o from "react";
2
- import { P as r } from "./Cz-8n_J0.js";
2
+ import { P as r } from "./B_yFQNmk.js";
3
3
  const c = ({ label: e = "No channels", ...a }) => /* @__PURE__ */ o.createElement(r, { icon: "chat", label: e, ...a });
4
4
  export {
5
5
  c as default
@@ -0,0 +1,22 @@
1
+ import * as r from "react";
2
+ import a from "dompurify";
3
+ import l, { RuleType as p } from "markdown-to-jsx";
4
+ import s from "styled-components";
5
+ import { A as h, c as t } from "./B_yFQNmk.js";
6
+ const x = (d, e, o, i) => e.type === p.textStrikethroughed ? /* @__PURE__ */ r.createElement("span", { key: i.key }, `~~${o(e.children, i)}~~`) : d(), f = ({ className: d, children: e, style: o }) => /* @__PURE__ */ r.createElement(g, { className: d, style: o }, /* @__PURE__ */ r.createElement(
7
+ l,
8
+ {
9
+ options: {
10
+ renderRule: x,
11
+ overrides: {
12
+ a: {
13
+ component: ({ children: i, ...n }) => /* @__PURE__ */ r.createElement("a", { ...n, target: "_blank", rel: h }, i)
14
+ }
15
+ }
16
+ }
17
+ },
18
+ a.sanitize(e)
19
+ )), g = s.div`*{&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}}hr{border-top:1px solid ${t.themedColor.textDisabled};margin:21px 0;}h1{margin-top:0;margin-bottom:12.4px;padding:0;font-size:22.4px;line-height:27.6px;font-weight:700;letter-spacing:-0.6px;}h2{font-weight:600;margin:24px 0 12px;font-size:18.2px;line-height:22.3px;}& :where(h3 + *){margin-top:0;}h3,h4,h5,h6{font-weight:600;margin:16px 0 8px;font-size:15.4px;line-height:22.4px;}p{font-size:14px;line-height:20px;margin-bottom:8px;margin-top:0;&:not(:first-child){margin-top:8px;}}a{color:inherit;font-weight:700;text-decoration:underline;}code{white-space:pre-wrap;border-radius:0.25rem;font-size:0.875em;font-weight:500;padding:2.4px 4.8px;background-color:${t.themedColor.textDisabled};}menu{list-style:none;}ul{list-style-type:disc;}ol{list-style-type:decimal;}ul,ol{padding-inline-start:16px;margin:8px 0;& > li{padding-inline-start:0;margin:8px 0;& > ul,& > ol{margin-top:8px;& > li{margin:4px 0;}}}}p + ul,p + ol{margin-top:0;}blockquote{line-height:20px;margin:0;padding:4.8px 0;margin-inline-start:8px;padding-inline-start:16px;box-sizing:border-box;position:relative;font-style:normal;font-weight:500;border-inline-start-width:4px;&::before{border-radius:100px;content:'';position:absolute;top:0;left:0;height:100%;width:4px;background-color:${t.themedColor.textDisabled};}}input[type='checkbox']{vertical-align:middle;margin:0;}table{unicode-bidi:isolate;overflow-wrap:break-word;white-space:normal;display:block;overflow-x:scroll;max-width:100%;text-indent:0;border-collapse:separate;border-spacing:0;margin:4px 0;text-align:start;font-size:12.3px;table-layout:auto;width:100%;*,&:after,&:before{border:0 solid;box-sizing:border-box;}}th:first-child{border-start-start-radius:6px;padding-inline-start:10.5px;}th:last-child{border-inline-end-width:1px;border-start-end-radius:6px;padding-inline-end:10.5px;}th{border-inline-start-width:1px;background-color:rgba(0,0,0,0.1);border-bottom-width:1px;border-color:${t.themedColor.textDisabled};border-top-width:1px;padding:4px 10.5px;text-align:start;}& :where(thead th:first-child){padding-inline-start:0;}& :where(thead th:last-child){padding-inline-end:0;}& :where(thead th){padding-bottom:8px;padding-inline:8px;vertical-align:bottom;}& :where(tbody tr){border-bottom-width:1px;}& :where(tbody tr:last-child){border-bottom-width:0;}td:first-child{padding-inline-start:10.5px;}td:last-child{border-inline-end-width:1px;padding-inline-end:10.5px;}& :where(tbody td:first-child,tfoot td:first-child){padding-inline-start:0;}& :where(tbody td:last-child,tfoot td:last-child){padding-inline-end:0;}td{border-inline-start-width:1px;border-bottom-width:1px;border-color:${t.themedColor.textDisabled};padding:4px 10.5px;text-align:start;}& :where(tbody td,tfoot td){padding:8px;}& :where(tbody td){vertical-align:baseline;}tbody tr:last-child td:first-child{border-end-start-radius:6px;}tbody tr:last-child td:last-child{border-end-end-radius:6px;}`;
20
+ export {
21
+ f as MarkdownText
22
+ };
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { P as o } from "./Cz-8n_J0.js";
2
+ import { P as o } from "./B_yFQNmk.js";
3
3
  const t = ({ label: e = "No messages", ...s }) => /* @__PURE__ */ a.createElement(o, { icon: "message", label: e, ...s });
4
4
  export {
5
5
  t as default
@@ -1,6 +1,6 @@
1
1
  import * as t from "react";
2
2
  import n from "styled-components";
3
- import { P as a, I as l, a as c, c as s } from "./Cz-8n_J0.js";
3
+ import { P as a, I as l, a as c, c as s } from "./B_yFQNmk.js";
4
4
  const d = ({ label: r = "Something went wrong", action: e, ...o }) => /* @__PURE__ */ t.createElement(a, { icon: "error", label: r, ...o }, e && /* @__PURE__ */ t.createElement(i, { onClick: e.onClick, label: e.label ?? "Retry" })), i = ({ label: r, onClick: e }) => /* @__PURE__ */ t.createElement(m, { tabIndex: 0, onClick: e }, /* @__PURE__ */ t.createElement(l, { type: "refresh", size: 20 }), /* @__PURE__ */ t.createElement(c, { variant: "button", color: s.color.primary.main }, r)), m = n.button`all:unset;display:flex;cursor:pointer;gap:4px;align-items:center;justify-content:center;`;
5
5
  export {
6
6
  d as default
@@ -1,5 +1,5 @@
1
1
  import * as a from "react";
2
- import { L as o } from "./Cz-8n_J0.js";
2
+ import { L as o } from "./B_yFQNmk.js";
3
3
  const m = ({ iconSize: e = 48, className: r }) => /* @__PURE__ */ a.createElement(o, { size: e, className: r });
4
4
  export {
5
5
  m as default
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/DIiuihu-.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.CSATType=e.CSATType;exports.Commands=e.Commands;exports.Conversation=e.Conversation;exports.ConversationList=e.ConversationList;exports.DefaultMessenger=e.DefaultMessenger;exports.FixedMessenger=e.FixedMessenger;exports.IncomingMessageLayout=e.IncomingMessageLayout;exports.LauncherBase=e.LauncherBase;exports.LogLevel=e.LogLevel;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/DR--J0iY.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.CSATType=e.CSATType;exports.Commands=e.Commands;exports.Conversation=e.Conversation;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListItemLayout=e.ConversationListItemLayout;exports.ConversationListLayout=e.ConversationListLayout;exports.DefaultMessenger=e.DefaultMessenger;exports.FixedMessenger=e.FixedMessenger;exports.IncomingMessageLayout=e.IncomingMessageLayout;exports.LauncherBase=e.LauncherBase;exports.LogLevel=e.LogLevel;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;
package/dist/index.d.ts CHANGED
@@ -76,7 +76,7 @@ export declare interface AgentPreviewConfigs {
76
76
 
77
77
  export declare function AgentProviderContainer({ rootElement, logLevel, language, userSessionInfo, children, ...props }: AIAgentProps): JSX.Element;
78
78
 
79
- export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, stringSet, children, messageTemplate, }: Props): JSX.Element;
79
+ export declare function AgentUIProviderContainer({ appearance, rootElement, logger, language, stringSet, children, messageTemplate, theme, }: Props): JSX.Element;
80
80
 
81
81
  declare interface AIAgentContextValue {
82
82
  appId: string;
@@ -117,6 +117,16 @@ export declare type AIAgentProps = PropsWithChildren<{
117
117
  expanded?: boolean;
118
118
  setExpanded?: (value: boolean) => void;
119
119
  };
120
+ /**
121
+ * @public
122
+ * @description AIAgent Messenger theme
123
+ * */
124
+ theme?: {
125
+ palette?: Partial<PaletteShape>;
126
+ typography?: Partial<{
127
+ [K in keyof TypographyShape]: Partial<TypographyShape[K]>;
128
+ }>;
129
+ };
120
130
  /**
121
131
  * @public
122
132
  * @description Custom User session information to be used in connecting to the agent.
@@ -209,7 +219,7 @@ declare abstract class BaseCommand {
209
219
  }
210
220
 
211
221
  declare type BaseMessageProps<T> = T & {
212
- createdAt: number;
222
+ createdAt?: number;
213
223
  extendedMessagePayload?: Partial<ExtendedMessagePayload>;
214
224
  groupType?: MessageGroupType;
215
225
  maxBodyWidth?: number;
@@ -238,8 +248,101 @@ declare enum CommandType {
238
248
 
239
249
  export declare const Conversation: ({ children, onNavigateToConversationList, closedChannelUrl, onClearClosedChannelUrl, }: Props_4) => JSX.Element;
240
250
 
251
+ export declare const ConversationLayout: {
252
+ (props: PropsWithChildren): ReactNode;
253
+ defaults: {
254
+ template: ComponentType<unknown>;
255
+ components: {
256
+ Header: () => JSX.Element | null;
257
+ Body: () => JSX.Element;
258
+ Footer: () => JSX.Element;
259
+ };
260
+ };
261
+ Template: ({ template, children }: {
262
+ template?: ComponentType<unknown> | undefined;
263
+ children?: ReactNode;
264
+ }) => JSX.Element;
265
+ Context: Context<LayoutContextValue< {
266
+ Header: () => JSX.Element | null;
267
+ Body: () => JSX.Element;
268
+ Footer: () => JSX.Element;
269
+ }, unknown>>;
270
+ useContext: () => LayoutContextValue< {
271
+ Header: () => JSX.Element | null;
272
+ Body: () => JSX.Element;
273
+ Footer: () => JSX.Element;
274
+ }, unknown>;
275
+ } & {
276
+ Header: (props: {
277
+ component: () => JSX.Element | null;
278
+ }) => null;
279
+ Body: (props: {
280
+ component: () => JSX.Element;
281
+ }) => null;
282
+ Footer: (props: {
283
+ component: () => JSX.Element;
284
+ }) => null;
285
+ };
286
+
241
287
  export declare const ConversationList: ({ children, onOpenConversationView }: Props_5) => JSX.Element;
242
288
 
289
+ export declare const ConversationListItemLayout: {
290
+ (props: PropsWithChildren): ReactNode;
291
+ defaults: {
292
+ template: ComponentType<ConversationListItemProps>;
293
+ components: {};
294
+ };
295
+ Template: ({ template, children }: {
296
+ template?: ComponentType<ConversationListItemProps> | undefined;
297
+ children?: ReactNode;
298
+ }) => JSX.Element;
299
+ Context: Context<LayoutContextValue< {}, ConversationListItemProps>>;
300
+ useContext: () => LayoutContextValue< {}, ConversationListItemProps>;
301
+ } & {};
302
+
303
+ export declare interface ConversationListItemProps {
304
+ channelUrl: string;
305
+ title?: string;
306
+ lastMessageTimestamp?: number;
307
+ onClick?: () => void;
308
+ }
309
+
310
+ export declare const ConversationListLayout: {
311
+ (props: PropsWithChildren): ReactNode;
312
+ defaults: {
313
+ template: ComponentType<unknown>;
314
+ components: {
315
+ Header: () => JSX.Element;
316
+ Body: () => JSX.Element;
317
+ Footer: () => JSX.Element;
318
+ };
319
+ };
320
+ Template: ({ template, children }: {
321
+ template?: ComponentType<unknown> | undefined;
322
+ children?: ReactNode;
323
+ }) => JSX.Element;
324
+ Context: Context<LayoutContextValue< {
325
+ Header: () => JSX.Element;
326
+ Body: () => JSX.Element;
327
+ Footer: () => JSX.Element;
328
+ }, unknown>>;
329
+ useContext: () => LayoutContextValue< {
330
+ Header: () => JSX.Element;
331
+ Body: () => JSX.Element;
332
+ Footer: () => JSX.Element;
333
+ }, unknown>;
334
+ } & {
335
+ Header: (props: {
336
+ component: () => JSX.Element;
337
+ }) => null;
338
+ Body: (props: {
339
+ component: () => JSX.Element;
340
+ }) => null;
341
+ Footer: (props: {
342
+ component: () => JSX.Element;
343
+ }) => null;
344
+ };
345
+
243
346
  declare type CSATSubmitParams = {
244
347
  csatType: string;
245
348
  csat?: number;
@@ -378,6 +481,7 @@ declare type IncomingBaseMessageProps<T> = T & BaseMessageProps<{
378
481
  suggestedRepliesVisible?: boolean;
379
482
  suggestedRepliesDirection?: 'vertical' | 'horizontal';
380
483
  isBotMessage?: boolean;
484
+ isTyping?: boolean;
381
485
  onGetCachedMessageTemplate?: (templateKey: string) => string | null;
382
486
  onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
383
487
  onClickSuggestedReply?: (params: {
@@ -390,7 +494,14 @@ declare type IncomingBaseMessageProps<T> = T & BaseMessageProps<{
390
494
  messageTemplateLoadingFallback?: ReactNode;
391
495
  }>;
392
496
 
393
- declare function IncomingMessageBody(props: IncomingMessageProps): JSX.Element | null;
497
+ declare function IncomingMessageBody(props: IncomingMessageBodyProps): JSX.Element | null;
498
+
499
+ declare type IncomingMessageBodyProps<T extends MessageType = MessageType> = IncomingMessageProps<T> & {
500
+ customStyle?: {
501
+ bubbleContentColor?: string;
502
+ bubbleBackgroundColor?: string;
503
+ };
504
+ };
394
505
 
395
506
  export declare const IncomingMessageLayout: {
396
507
  (props: PropsWithChildren): ReactNode;
@@ -401,6 +512,7 @@ export declare const IncomingMessageLayout: {
401
512
  SenderAvatar: typeof IncomingSenderAvatar;
402
513
  SentTime: typeof IncomingSentTime;
403
514
  MessageBody: typeof IncomingMessageBody;
515
+ TypingIndicator: typeof IncomingTypingIndicator;
404
516
  SuggestedReplies: typeof ExtendedSuggestedReplies;
405
517
  MessageTemplate: typeof ExtendedMessageTemplate;
406
518
  CTAButton: typeof ExtendedCTAButton;
@@ -416,6 +528,7 @@ export declare const IncomingMessageLayout: {
416
528
  SenderAvatar: typeof IncomingSenderAvatar;
417
529
  SentTime: typeof IncomingSentTime;
418
530
  MessageBody: typeof IncomingMessageBody;
531
+ TypingIndicator: typeof IncomingTypingIndicator;
419
532
  SuggestedReplies: typeof ExtendedSuggestedReplies;
420
533
  MessageTemplate: typeof ExtendedMessageTemplate;
421
534
  CTAButton: typeof ExtendedCTAButton;
@@ -426,6 +539,7 @@ export declare const IncomingMessageLayout: {
426
539
  SenderAvatar: typeof IncomingSenderAvatar;
427
540
  SentTime: typeof IncomingSentTime;
428
541
  MessageBody: typeof IncomingMessageBody;
542
+ TypingIndicator: typeof IncomingTypingIndicator;
429
543
  SuggestedReplies: typeof ExtendedSuggestedReplies;
430
544
  MessageTemplate: typeof ExtendedMessageTemplate;
431
545
  CTAButton: typeof ExtendedCTAButton;
@@ -447,6 +561,9 @@ export declare const IncomingMessageLayout: {
447
561
  MessageBody: (props: {
448
562
  component: typeof IncomingMessageBody;
449
563
  }) => null;
564
+ TypingIndicator: (props: {
565
+ component: typeof IncomingTypingIndicator;
566
+ }) => null;
450
567
  SuggestedReplies: (props: {
451
568
  component: typeof ExtendedSuggestedReplies;
452
569
  }) => null;
@@ -477,7 +594,9 @@ declare function IncomingSenderAvatar({ sender, isBotMessage }: Pick<IncomingMes
477
594
 
478
595
  declare function IncomingSenderName({ sender }: Pick<IncomingMessageProps, 'sender'>): JSX.Element;
479
596
 
480
- declare function IncomingSentTime({ createdAt }: Pick<IncomingMessageProps, 'createdAt'>): JSX.Element;
597
+ declare function IncomingSentTime({ createdAt }: Pick<IncomingMessageProps, 'createdAt'>): JSX.Element | null;
598
+
599
+ declare function IncomingTypingIndicator({ customStyle }: TypingIndicatorProps): JSX.Element;
481
600
 
482
601
  declare interface InternalMessageTemplateVariables {
483
602
  carousel_padding_left?: number;
@@ -564,6 +683,10 @@ declare interface MessageTemplateShapeAtom {
564
683
  variables?: Record<string, any>;
565
684
  }
566
685
 
686
+ declare type MessageType = IncomingMessageProps['messageType'];
687
+
688
+ declare type MessageType_2 = OutgoingMessageProps['messageType'];
689
+
567
690
  declare interface MessengerContextValue extends AIAgentContextValue {
568
691
  rootElement: HTMLElement;
569
692
  agentPreviewConfigs?: AgentPreviewConfigs;
@@ -643,7 +766,14 @@ declare type OutgoingBaseMessageProps<T> = T & BaseMessageProps<{
643
766
  sendingStatus: 'pending' | 'failed' | 'succeeded' | 'canceled' | 'scheduled';
644
767
  }>;
645
768
 
646
- declare function OutgoingMessageBody(props: OutgoingMessageProps): JSX.Element | null;
769
+ declare function OutgoingMessageBody(props: OutgoingMessageBodyProps): JSX.Element | null;
770
+
771
+ declare type OutgoingMessageBodyProps<T extends MessageType_2 = MessageType_2> = OutgoingMessageProps<T> & {
772
+ customStyle?: {
773
+ bubbleContentColor?: string;
774
+ bubbleBackgroundColor?: string;
775
+ };
776
+ };
647
777
 
648
778
  export declare const OutgoingMessageLayout: {
649
779
  (props: PropsWithChildren): ReactNode;
@@ -702,7 +832,43 @@ declare type OutgoingMessageUnion = OutgoingBaseMessageProps<{
702
832
 
703
833
  declare function OutgoingSendingStatus({ sendingStatus }: OutgoingMessageProps): JSX.Element | null;
704
834
 
705
- declare function OutgoingSentTime({ createdAt }: OutgoingMessageProps): JSX.Element;
835
+ declare function OutgoingSentTime({ createdAt }: OutgoingMessageProps): JSX.Element | null;
836
+
837
+ declare interface PaletteColor {
838
+ extraDark: string;
839
+ dark: string;
840
+ main: string;
841
+ light: string;
842
+ extraLight: string;
843
+ }
844
+
845
+ declare interface PaletteShape {
846
+ primary: PaletteColor;
847
+ secondary: PaletteColor;
848
+ error: PaletteColor;
849
+ information: PaletteColor;
850
+ background700: string;
851
+ background600: string;
852
+ background500: string;
853
+ background400: string;
854
+ background300: string;
855
+ background200: string;
856
+ background100: string;
857
+ background50: string;
858
+ onlight: PaletteTextEmphasis;
859
+ ondark: PaletteTextEmphasis;
860
+ overlay: {
861
+ dark: string;
862
+ light: string;
863
+ };
864
+ }
865
+
866
+ declare interface PaletteTextEmphasis {
867
+ textHighEmphasis: string;
868
+ textMidEmphasis: string;
869
+ textLowEmphasis: string;
870
+ textDisabled: string;
871
+ }
706
872
 
707
873
  declare type PickMessageProps<Union, T extends Union extends {
708
874
  messageType: infer MT;
@@ -719,6 +885,13 @@ declare type Props = {
719
885
  logger?: Loggable;
720
886
  stringSet?: Partial<StringSet>;
721
887
  language?: string;
888
+ theme?: {
889
+ palette?: Partial<PaletteShape>;
890
+ typography?: Partial<{
891
+ [K in keyof TypographyShape]: Partial<TypographyShape[K]>;
892
+ }>;
893
+ };
894
+ /** @internal DO NOT USE THIS **/
722
895
  messageTemplate?: {
723
896
  /** @internal DO NOT USE THIS **/
724
897
  __internalVariables?: InternalMessageTemplateVariables;
@@ -812,6 +985,34 @@ declare type SystemMessageUnion = SystemBaseMessageProps<{
812
985
  onSubmitCSAT: (params: CSATSubmitParams) => void;
813
986
  }>;
814
987
 
988
+ declare type TypingIndicatorProps = IncomingMessageProps & {
989
+ customStyle?: {
990
+ bubbleContentColor?: string;
991
+ bubbleBackgroundColor?: string;
992
+ };
993
+ };
994
+
995
+ declare interface TypographyShape {
996
+ h1: TypographyVariant;
997
+ h2: TypographyVariant;
998
+ subtitle1: TypographyVariant;
999
+ subtitle2: TypographyVariant;
1000
+ body1: TypographyVariant;
1001
+ body2: TypographyVariant;
1002
+ body3: TypographyVariant;
1003
+ button: TypographyVariant;
1004
+ caption1: TypographyVariant;
1005
+ caption2: TypographyVariant;
1006
+ caption3: TypographyVariant;
1007
+ caption4: TypographyVariant;
1008
+ }
1009
+
1010
+ declare interface TypographyVariant {
1011
+ fontSize: number | string;
1012
+ fontWeight: number | string;
1013
+ fontFamily?: string;
1014
+ }
1015
+
815
1016
  export declare const useLocalizationContext: {
816
1017
  (): LocalizationContextValue;
817
1018
  displayName: string;
@@ -837,6 +1038,6 @@ export { }
837
1038
 
838
1039
 
839
1040
  declare module 'styled-components' {
840
- interface DefaultTheme extends AgentTheme {
1041
+ interface DefaultTheme extends AIAgentTheme {
841
1042
  }
842
1043
  }
package/dist/index.js CHANGED
@@ -1,22 +1,25 @@
1
- import { b as n, d as o, i as t, C as r, j as g, k as i, D as u, F as C, h as L, g as M, l as m, M as d, O as v, S as x, m as y, f as c, u as l, e as p } from "./es/Cz-8n_J0.js";
1
+ import { b as o, d as n, i as t, C as i, k as r, l as g, n as L, j as u, o as C, D as m, F as M, h as v, g as y, p as d, M as p, O as x, S as c, m as l, f as S, u as f, e as h } from "./es/B_yFQNmk.js";
2
2
  import "react";
3
3
  export {
4
- n as AgentProviderContainer,
5
- o as AgentUIProviderContainer,
4
+ o as AgentProviderContainer,
5
+ n as AgentUIProviderContainer,
6
6
  t as CSATType,
7
- r as Commands,
8
- g as Conversation,
9
- i as ConversationList,
10
- u as DefaultMessenger,
11
- C as FixedMessenger,
12
- L as IncomingMessageLayout,
13
- M as LauncherBase,
14
- m as LogLevel,
15
- d as MessageLogs,
16
- v as OutgoingMessageLayout,
17
- x as SystemMessageLayout,
18
- y as messengerDispatcher,
19
- c as useLocalizationContext,
20
- l as useMessengerContext,
21
- p as useMessengerSessionContext
7
+ i as Commands,
8
+ r as Conversation,
9
+ g as ConversationLayout,
10
+ L as ConversationList,
11
+ u as ConversationListItemLayout,
12
+ C as ConversationListLayout,
13
+ m as DefaultMessenger,
14
+ M as FixedMessenger,
15
+ v as IncomingMessageLayout,
16
+ y as LauncherBase,
17
+ d as LogLevel,
18
+ p as MessageLogs,
19
+ x as OutgoingMessageLayout,
20
+ c as SystemMessageLayout,
21
+ l as messengerDispatcher,
22
+ S as useLocalizationContext,
23
+ f as useMessengerContext,
24
+ h as useMessengerSessionContext
22
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendbird/ai-agent-messenger-react",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "Sendbird AI Agent Messenger for React",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -45,7 +45,7 @@
45
45
  "react-dom": "^19.0.0",
46
46
  "strip-json-comments": "^5.0.1",
47
47
  "styled-components": "^6.1.15",
48
- "@sendbird/ai-agent-core": "1.0.1",
48
+ "@sendbird/ai-agent-core": "1.1.0",
49
49
  "@sendbird/vite-tools": "0.0.1"
50
50
  },
51
51
  "msw": {
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),p=require("dompurify"),d=require("markdown-to-jsx"),s=require("styled-components"),n=require("./DIiuihu-.cjs");function h(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const o=h(l),c=(t,e,r,i)=>e.type===d.RuleType.textStrikethroughed?o.createElement("span",{key:i.key},`~~${r(e.children,i)}~~`):t(),g=({className:t,children:e,style:r})=>o.createElement(b,{className:t,style:r},o.createElement(d,{options:{renderRule:c,overrides:{a:{component:({children:i,...a})=>o.createElement("a",{...a,target:"_blank",rel:n.ANCHOR_REL},i)}}}},p.sanitize(e))),b=s.div`*{&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}}hr{border-top:1px solid ${n.cssVars.themedColor.onbackground4};margin:21px 0;}h1{margin-top:0;margin-bottom:12.4px;padding:0;font-size:22.4px;line-height:27.6px;font-weight:700;letter-spacing:-0.6px;}h2{font-weight:600;margin:24px 0 12px;font-size:18.2px;line-height:22.3px;}& :where(h3 + *){margin-top:0;}h3,h4,h5,h6{font-weight:600;margin:16px 0 8px;font-size:15.4px;line-height:22.4px;}p{font-size:14px;line-height:20px;margin-bottom:8px;margin-top:0;&:not(:first-child){margin-top:8px;}}a{color:inherit;font-weight:700;text-decoration:underline;}code{white-space:pre-wrap;border-radius:0.25rem;font-size:0.875em;font-weight:500;padding:2.4px 4.8px;background-color:${n.cssVars.themedColor.onbackground4};}menu{list-style:none;}ul{list-style-type:disc;}ol{list-style-type:decimal;}ul,ol{padding-inline-start:16px;margin:8px 0;& > li{padding-inline-start:0;margin:8px 0;& > ul,& > ol{margin-top:8px;& > li{margin:4px 0;}}}}p + ul,p + ol{margin-top:0;}blockquote{line-height:20px;margin:0;padding:4.8px 0;margin-inline-start:8px;padding-inline-start:16px;box-sizing:border-box;position:relative;font-style:normal;font-weight:500;border-inline-start-width:4px;&::before{border-radius:100px;content:'';position:absolute;top:0;left:0;height:100%;width:4px;background-color:${n.cssVars.themedColor.onbackground4};}}input[type='checkbox']{vertical-align:middle;margin:0;}table{unicode-bidi:isolate;overflow-wrap:break-word;white-space:normal;display:block;overflow-x:scroll;max-width:100%;text-indent:0;border-collapse:separate;border-spacing:0;margin:4px 0;text-align:start;font-size:12.3px;table-layout:auto;width:100%;*,&:after,&:before{border:0 solid;box-sizing:border-box;}}th:first-child{border-start-start-radius:6px;padding-inline-start:10.5px;}th:last-child{border-inline-end-width:1px;border-start-end-radius:6px;padding-inline-end:10.5px;}th{border-inline-start-width:1px;background-color:rgba(0,0,0,0.1);border-bottom-width:1px;border-color:${n.cssVars.themedColor.onbackground4};border-top-width:1px;padding:4px 10.5px;text-align:start;}& :where(thead th:first-child){padding-inline-start:0;}& :where(thead th:last-child){padding-inline-end:0;}& :where(thead th){padding-bottom:8px;padding-inline:8px;vertical-align:bottom;}& :where(tbody tr){border-bottom-width:1px;}& :where(tbody tr:last-child){border-bottom-width:0;}td:first-child{padding-inline-start:10.5px;}td:last-child{border-inline-end-width:1px;padding-inline-end:10.5px;}& :where(tbody td:first-child,tfoot td:first-child){padding-inline-start:0;}& :where(tbody td:last-child,tfoot td:last-child){padding-inline-end:0;}td{border-inline-start-width:1px;border-bottom-width:1px;border-color:${n.cssVars.themedColor.onbackground4};padding:4px 10.5px;text-align:start;}& :where(tbody td,tfoot td){padding:8px;}& :where(tbody td){vertical-align:baseline;}tbody tr:last-child td:first-child{border-end-start-radius:6px;}tbody tr:last-child td:last-child{border-end-end-radius:6px;}`;exports.MarkdownText=g;