@sendbird/ai-agent-messenger-react 1.0.0 → 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 "./BuKsDakz.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 "./BuKsDakz.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 "./BuKsDakz.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 "./BuKsDakz.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/jey3pckv.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
@@ -70,12 +70,13 @@ export declare interface AgentPreviewConfigs {
70
70
  agentAttributes?: {
71
71
  ai?: Record<string, unknown>;
72
72
  safeguard?: Record<string, unknown>;
73
+ use_prompt_cache?: boolean;
73
74
  };
74
75
  }
75
76
 
76
77
  export declare function AgentProviderContainer({ rootElement, logLevel, language, userSessionInfo, children, ...props }: AIAgentProps): JSX.Element;
77
78
 
78
- 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;
79
80
 
80
81
  declare interface AIAgentContextValue {
81
82
  appId: string;
@@ -116,6 +117,16 @@ export declare type AIAgentProps = PropsWithChildren<{
116
117
  expanded?: boolean;
117
118
  setExpanded?: (value: boolean) => void;
118
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
+ };
119
130
  /**
120
131
  * @public
121
132
  * @description Custom User session information to be used in connecting to the agent.
@@ -208,7 +219,7 @@ declare abstract class BaseCommand {
208
219
  }
209
220
 
210
221
  declare type BaseMessageProps<T> = T & {
211
- createdAt: number;
222
+ createdAt?: number;
212
223
  extendedMessagePayload?: Partial<ExtendedMessagePayload>;
213
224
  groupType?: MessageGroupType;
214
225
  maxBodyWidth?: number;
@@ -216,6 +227,10 @@ declare type BaseMessageProps<T> = T & {
216
227
  url: string;
217
228
  type: string;
218
229
  }) => void;
230
+ onClickFile?: (params: {
231
+ url: string;
232
+ type: string;
233
+ }) => void;
219
234
  children?: ReactNode;
220
235
  };
221
236
 
@@ -233,8 +248,101 @@ declare enum CommandType {
233
248
 
234
249
  export declare const Conversation: ({ children, onNavigateToConversationList, closedChannelUrl, onClearClosedChannelUrl, }: Props_4) => JSX.Element;
235
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
+
236
287
  export declare const ConversationList: ({ children, onOpenConversationView }: Props_5) => JSX.Element;
237
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
+
238
346
  declare type CSATSubmitParams = {
239
347
  csatType: string;
240
348
  csat?: number;
@@ -373,6 +481,7 @@ declare type IncomingBaseMessageProps<T> = T & BaseMessageProps<{
373
481
  suggestedRepliesVisible?: boolean;
374
482
  suggestedRepliesDirection?: 'vertical' | 'horizontal';
375
483
  isBotMessage?: boolean;
484
+ isTyping?: boolean;
376
485
  onGetCachedMessageTemplate?: (templateKey: string) => string | null;
377
486
  onRequestMessageTemplate?: (templateKey: string) => Promise<string>;
378
487
  onClickSuggestedReply?: (params: {
@@ -385,7 +494,14 @@ declare type IncomingBaseMessageProps<T> = T & BaseMessageProps<{
385
494
  messageTemplateLoadingFallback?: ReactNode;
386
495
  }>;
387
496
 
388
- declare function IncomingMessageBody(props: IncomingMessageProps): JSX.Element;
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
+ };
389
505
 
390
506
  export declare const IncomingMessageLayout: {
391
507
  (props: PropsWithChildren): ReactNode;
@@ -396,6 +512,7 @@ export declare const IncomingMessageLayout: {
396
512
  SenderAvatar: typeof IncomingSenderAvatar;
397
513
  SentTime: typeof IncomingSentTime;
398
514
  MessageBody: typeof IncomingMessageBody;
515
+ TypingIndicator: typeof IncomingTypingIndicator;
399
516
  SuggestedReplies: typeof ExtendedSuggestedReplies;
400
517
  MessageTemplate: typeof ExtendedMessageTemplate;
401
518
  CTAButton: typeof ExtendedCTAButton;
@@ -411,6 +528,7 @@ export declare const IncomingMessageLayout: {
411
528
  SenderAvatar: typeof IncomingSenderAvatar;
412
529
  SentTime: typeof IncomingSentTime;
413
530
  MessageBody: typeof IncomingMessageBody;
531
+ TypingIndicator: typeof IncomingTypingIndicator;
414
532
  SuggestedReplies: typeof ExtendedSuggestedReplies;
415
533
  MessageTemplate: typeof ExtendedMessageTemplate;
416
534
  CTAButton: typeof ExtendedCTAButton;
@@ -421,6 +539,7 @@ export declare const IncomingMessageLayout: {
421
539
  SenderAvatar: typeof IncomingSenderAvatar;
422
540
  SentTime: typeof IncomingSentTime;
423
541
  MessageBody: typeof IncomingMessageBody;
542
+ TypingIndicator: typeof IncomingTypingIndicator;
424
543
  SuggestedReplies: typeof ExtendedSuggestedReplies;
425
544
  MessageTemplate: typeof ExtendedMessageTemplate;
426
545
  CTAButton: typeof ExtendedCTAButton;
@@ -442,6 +561,9 @@ export declare const IncomingMessageLayout: {
442
561
  MessageBody: (props: {
443
562
  component: typeof IncomingMessageBody;
444
563
  }) => null;
564
+ TypingIndicator: (props: {
565
+ component: typeof IncomingTypingIndicator;
566
+ }) => null;
445
567
  SuggestedReplies: (props: {
446
568
  component: typeof ExtendedSuggestedReplies;
447
569
  }) => null;
@@ -472,7 +594,9 @@ declare function IncomingSenderAvatar({ sender, isBotMessage }: Pick<IncomingMes
472
594
 
473
595
  declare function IncomingSenderName({ sender }: Pick<IncomingMessageProps, 'sender'>): JSX.Element;
474
596
 
475
- 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;
476
600
 
477
601
  declare interface InternalMessageTemplateVariables {
478
602
  carousel_padding_left?: number;
@@ -559,6 +683,10 @@ declare interface MessageTemplateShapeAtom {
559
683
  variables?: Record<string, any>;
560
684
  }
561
685
 
686
+ declare type MessageType = IncomingMessageProps['messageType'];
687
+
688
+ declare type MessageType_2 = OutgoingMessageProps['messageType'];
689
+
562
690
  declare interface MessengerContextValue extends AIAgentContextValue {
563
691
  rootElement: HTMLElement;
564
692
  agentPreviewConfigs?: AgentPreviewConfigs;
@@ -638,7 +766,14 @@ declare type OutgoingBaseMessageProps<T> = T & BaseMessageProps<{
638
766
  sendingStatus: 'pending' | 'failed' | 'succeeded' | 'canceled' | 'scheduled';
639
767
  }>;
640
768
 
641
- 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
+ };
642
777
 
643
778
  export declare const OutgoingMessageLayout: {
644
779
  (props: PropsWithChildren): ReactNode;
@@ -697,7 +832,43 @@ declare type OutgoingMessageUnion = OutgoingBaseMessageProps<{
697
832
 
698
833
  declare function OutgoingSendingStatus({ sendingStatus }: OutgoingMessageProps): JSX.Element | null;
699
834
 
700
- 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
+ }
701
872
 
702
873
  declare type PickMessageProps<Union, T extends Union extends {
703
874
  messageType: infer MT;
@@ -714,6 +885,13 @@ declare type Props = {
714
885
  logger?: Loggable;
715
886
  stringSet?: Partial<StringSet>;
716
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 **/
717
895
  messageTemplate?: {
718
896
  /** @internal DO NOT USE THIS **/
719
897
  __internalVariables?: InternalMessageTemplateVariables;
@@ -807,6 +985,34 @@ declare type SystemMessageUnion = SystemBaseMessageProps<{
807
985
  onSubmitCSAT: (params: CSATSubmitParams) => void;
808
986
  }>;
809
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
+
810
1016
  export declare const useLocalizationContext: {
811
1017
  (): LocalizationContextValue;
812
1018
  displayName: string;
@@ -832,6 +1038,6 @@ export { }
832
1038
 
833
1039
 
834
1040
  declare module 'styled-components' {
835
- interface DefaultTheme extends AgentTheme {
1041
+ interface DefaultTheme extends AIAgentTheme {
836
1042
  }
837
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/BuKsDakz.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.0",
3
+ "version": "1.1.0",
4
4
  "description": "Sendbird AI Agent Messenger for React",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,23 +20,23 @@
20
20
  "sideEffects": false,
21
21
  "dependencies": {
22
22
  "@emotion/is-prop-valid": "^1.3.1",
23
- "@sendbird/react-uikit-message-template-view": "0.0.8",
24
- "@sendbird/uikit-message-template": "0.0.8",
25
- "@sendbird/uikit-tools": "0.0.8",
23
+ "@sendbird/react-uikit-message-template-view": "0.0.9",
24
+ "@sendbird/uikit-message-template": "0.0.9",
25
+ "@sendbird/uikit-tools": "0.0.9",
26
26
  "date-fns": "^4.1.0",
27
27
  "dompurify": "^3.2.4",
28
28
  "markdown-to-jsx": "^7.7.2",
29
29
  "react-syntax-highlighter": "^15.6.1"
30
30
  },
31
31
  "peerDependencies": {
32
- "@sendbird/chat": "^4.19.0",
32
+ "@sendbird/chat": "^4.19.2",
33
33
  "react": ">=18.0.0",
34
34
  "react-dom": ">=18.0.0",
35
35
  "styled-components": ">=5.0.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@monaco-editor/react": "^4.7.0",
39
- "@sendbird/chat": "^4.19.0",
39
+ "@sendbird/chat": "^4.19.2",
40
40
  "@types/react": "^19.0.2",
41
41
  "@types/react-dom": "^19.0.2",
42
42
  "@types/react-syntax-highlighter": "^15.5.13",
@@ -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.0",
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("./jey3pckv.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;