@sendbird/ai-agent-messenger-react 1.10.2 → 1.11.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 (37) hide show
  1. package/dist/cjs/B67X1Iqo.cjs +1 -0
  2. package/dist/cjs/CnUoYEuF.cjs +1 -0
  3. package/dist/cjs/DEvSjhk8.cjs +1 -0
  4. package/dist/cjs/DJHcCTBQ.cjs +1 -0
  5. package/dist/cjs/DRHmPssY.cjs +1 -0
  6. package/dist/cjs/DgWOJuCM.cjs +306 -0
  7. package/dist/cjs/DwfLm8cw.cjs +1 -0
  8. package/dist/cjs/EXVCD1YT.cjs +1 -0
  9. package/dist/cjs/YeT3srxs.cjs +1 -0
  10. package/dist/cjs/YtrvrXVz.cjs +1 -0
  11. package/dist/cjs/xdrSyggS.cjs +1 -0
  12. package/dist/es/{CAPycZHB.js → BAV-gHD8.js} +10 -5
  13. package/dist/es/{CtCMo2TS.js → Bf3Vm8Wc.js} +11 -6
  14. package/dist/es/{DCVV5mpw.js → C4gM95cu.js} +2300 -2237
  15. package/dist/es/{SWkYvgHM.js → CaQjuywv.js} +13 -8
  16. package/dist/es/{CcTi8RMT.js → D5rUGMTR.js} +15 -10
  17. package/dist/es/{71nKW4JE.js → DQK4qx1t.js} +9 -4
  18. package/dist/es/{Ck4nAD4B.js → DqXeh6FM.js} +15 -10
  19. package/dist/es/{CNOl7erj.js → DsjXFMRf.js} +15 -10
  20. package/dist/es/{v1TL54QW.js → TEW248Kp.js} +18 -13
  21. package/dist/es/{CvPILy6Q.js → dMeDdhti.js} +13 -8
  22. package/dist/es/{TAdObZan.js → sfhJJXtA.js} +32 -18
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.ts +40 -6
  25. package/dist/index.js +1 -1
  26. package/package.json +10 -8
  27. package/dist/cjs/1ACj2pIu.cjs +0 -1
  28. package/dist/cjs/39Vu-gp1.cjs +0 -1
  29. package/dist/cjs/8LgPimFK.cjs +0 -1
  30. package/dist/cjs/B6HiuRPt.cjs +0 -1
  31. package/dist/cjs/BVlVEisk.cjs +0 -1
  32. package/dist/cjs/CbSJ7GnB.cjs +0 -1
  33. package/dist/cjs/Cfid8u9U.cjs +0 -306
  34. package/dist/cjs/DBjNv8rR.cjs +0 -1
  35. package/dist/cjs/DI-EXSWj.cjs +0 -1
  36. package/dist/cjs/DOXieS3b.cjs +0 -1
  37. package/dist/cjs/sjY7fr9U.cjs +0 -1
@@ -1,4 +1,4 @@
1
- import { m as _ } from "./DCVV5mpw.js";
1
+ import { m as _ } from "./C4gM95cu.js";
2
2
  import { pt as n } from "date-fns/locale/pt";
3
3
  const r = {
4
4
  conversation: {
@@ -11,9 +11,14 @@ const r = {
11
11
  powered_by: "Desenvolvido por",
12
12
  citation_title: "Fonte",
13
13
  start_new_conversation_label: "Iniciar uma conversa",
14
+ scroll_to_new_messages_label: () => "Nova mensagem",
14
15
  failed_message_resend: "Tentar novamente",
15
16
  failed_message_remove: "Remover",
16
- file_upload_no_supported_files: "Nenhum tipo de arquivo suportado disponível."
17
+ file_upload_no_supported_files: "Nenhum tipo de arquivo suportado disponível.",
18
+ // Accessibility
19
+ a11y_message_list: "Mensagens do chat",
20
+ a11y_scroll_to_bottom: "Rolar para baixo",
21
+ a11y_scroll_to_new_messages: "Rolar para novas mensagens"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "Conversas",
@@ -61,12 +66,12 @@ const r = {
61
66
  edit: "Editar feedback",
62
67
  remove: "Remover feedback"
63
68
  }
64
- }, o = {
69
+ }, a = {
65
70
  language: "pt",
66
71
  strings: r,
67
72
  dateLocale: n
68
- }, a = _(o.strings), t = {
69
- ...a,
73
+ }, o = _(a.strings), t = {
74
+ ...o,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "Conectar-se com um agente",
72
77
  // Message Input
@@ -98,7 +103,7 @@ const r = {
98
103
  FORM_VALIDATION_MAX_SELECT: (e) => `Selecione no máximo ${e} opções`,
99
104
  FORM_VALIDATION_REGEX_FAILED: "Formato inválido",
100
105
  /** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
101
- DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: a.DATE_FORMAT__DATE_SHORT,
106
+ DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: o.DATE_FORMAT__DATE_SHORT,
102
107
  /** @deprecated Unused string **/
103
108
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION: "HH:mm",
104
109
  /** @deprecated Unused string **/
@@ -118,8 +123,8 @@ const r = {
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "Canal congelado"
120
125
  }, m = {
121
- language: o.language,
122
- dateLocale: o.dateLocale,
126
+ language: a.language,
127
+ dateLocale: a.dateLocale,
123
128
  stringSet: t
124
129
  };
125
130
  export {
@@ -1,6 +1,6 @@
1
- import { m as t } from "./DCVV5mpw.js";
2
- import { ko as T } from "date-fns/locale/ko";
3
- const a = {
1
+ import { m as a } from "./C4gM95cu.js";
2
+ import { ko as t } from "date-fns/locale/ko";
3
+ const T = {
4
4
  conversation: {
5
5
  input_placeholder: "질문하기",
6
6
  input_placeholder_disabled: "이 채널에서는 채팅을 사용할 수 없습니다.",
@@ -11,9 +11,14 @@ const a = {
11
11
  powered_by: "Powered by",
12
12
  citation_title: "출처",
13
13
  start_new_conversation_label: "대화 시작",
14
+ scroll_to_new_messages_label: () => "새 메시지",
14
15
  failed_message_resend: "다시 시도",
15
16
  failed_message_remove: "삭제",
16
- file_upload_no_supported_files: "사용 가능한 지원 파일 형식이 없습니다."
17
+ file_upload_no_supported_files: "사용 가능한 지원 파일 형식이 없습니다.",
18
+ // Accessibility
19
+ a11y_message_list: "채팅 메시지",
20
+ a11y_scroll_to_bottom: "맨 아래로 스크롤",
21
+ a11y_scroll_to_new_messages: "새 메시지로 스크롤"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "대화",
@@ -63,9 +68,9 @@ const a = {
63
68
  }
64
69
  }, e = {
65
70
  language: "ko",
66
- strings: a,
67
- dateLocale: T
68
- }, o = t(e.strings), A = {
71
+ strings: T,
72
+ dateLocale: t
73
+ }, o = a(e.strings), s = {
69
74
  ...o,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "상담사와 연결하기",
@@ -117,11 +122,11 @@ const a = {
117
122
  NO_NAME: "(이름 없음)",
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "채널이 동결되었습니다."
120
- }, I = {
125
+ }, A = {
121
126
  language: e.language,
122
127
  dateLocale: e.dateLocale,
123
- stringSet: A
128
+ stringSet: s
124
129
  };
125
130
  export {
126
- I as default
131
+ A as default
127
132
  };
@@ -1,4 +1,4 @@
1
- import { m as n } from "./DCVV5mpw.js";
1
+ import { m as n } from "./C4gM95cu.js";
2
2
  import { es as _ } from "date-fns/locale/es";
3
3
  const i = {
4
4
  conversation: {
@@ -11,9 +11,14 @@ const i = {
11
11
  powered_by: "Desarrollado por",
12
12
  citation_title: "Fuente",
13
13
  start_new_conversation_label: "Iniciar una conversación",
14
+ scroll_to_new_messages_label: () => "Nuevo mensaje",
14
15
  failed_message_resend: "Reintentar",
15
16
  failed_message_remove: "Eliminar",
16
- file_upload_no_supported_files: "No hay tipos de archivo compatibles disponibles."
17
+ file_upload_no_supported_files: "No hay tipos de archivo compatibles disponibles.",
18
+ // Accessibility
19
+ a11y_message_list: "Mensajes del chat",
20
+ a11y_scroll_to_bottom: "Desplazarse hacia abajo",
21
+ a11y_scroll_to_new_messages: "Desplazarse a nuevos mensajes"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "Conversaciones",
@@ -65,7 +70,7 @@ const i = {
65
70
  language: "es",
66
71
  strings: i,
67
72
  dateLocale: _
68
- }, o = n(a.strings), r = {
73
+ }, o = n(a.strings), s = {
69
74
  ...o,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "Conectarse con un agente",
@@ -120,7 +125,7 @@ const i = {
120
125
  }, l = {
121
126
  language: a.language,
122
127
  dateLocale: a.dateLocale,
123
- stringSet: r
128
+ stringSet: s
124
129
  };
125
130
  export {
126
131
  l as default
@@ -1,6 +1,6 @@
1
- import { m as T } from "./DCVV5mpw.js";
1
+ import { m as t } from "./C4gM95cu.js";
2
2
  import { hi as a } from "date-fns/locale/hi";
3
- const o = {
3
+ const T = {
4
4
  conversation: {
5
5
  input_placeholder: "एक प्रश्न पूछें",
6
6
  input_placeholder_disabled: "इस चैनल में चैट उपलब्ध नहीं है",
@@ -11,9 +11,14 @@ const o = {
11
11
  powered_by: "द्वारा संचालित",
12
12
  citation_title: "स्रोत",
13
13
  start_new_conversation_label: "एक बातचीत शुरू करें",
14
+ scroll_to_new_messages_label: () => "नया संदेश",
14
15
  failed_message_resend: "पुनः प्रयास करें",
15
16
  failed_message_remove: "हटाएं",
16
- file_upload_no_supported_files: "कोई समर्थित फ़ाइल प्रकार उपलब्ध नहीं हैं।"
17
+ file_upload_no_supported_files: "कोई समर्थित फ़ाइल प्रकार उपलब्ध नहीं हैं।",
18
+ // Accessibility
19
+ a11y_message_list: "चैट संदेश",
20
+ a11y_scroll_to_bottom: "नीचे स्क्रॉल करें",
21
+ a11y_scroll_to_new_messages: "नए संदेशों पर स्क्रॉल करें"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "बातचीत",
@@ -63,10 +68,10 @@ const o = {
63
68
  }
64
69
  }, e = {
65
70
  language: "hi",
66
- strings: o,
71
+ strings: T,
67
72
  dateLocale: a
68
- }, t = T(e.strings), A = {
69
- ...t,
73
+ }, o = t(e.strings), s = {
74
+ ...o,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "एजेंट से कनेक्ट करें",
72
77
  // Message Input
@@ -98,7 +103,7 @@ const o = {
98
103
  FORM_VALIDATION_MAX_SELECT: (_) => `अधिकतम ${_} विकल्प चुनें`,
99
104
  FORM_VALIDATION_REGEX_FAILED: "गलत प्रारूप",
100
105
  /** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
101
- DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: t.DATE_FORMAT__DATE_SHORT,
106
+ DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: o.DATE_FORMAT__DATE_SHORT,
102
107
  /** @deprecated Unused string **/
103
108
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION: "HH:mm",
104
109
  /** @deprecated Unused string **/
@@ -117,11 +122,11 @@ const o = {
117
122
  NO_NAME: "(कोई नाम नहीं)",
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "चैनल फ्रीज हो गया"
120
- }, I = {
125
+ }, A = {
121
126
  language: e.language,
122
127
  dateLocale: e.dateLocale,
123
- stringSet: A
128
+ stringSet: s
124
129
  };
125
130
  export {
126
- I as default
131
+ A as default
127
132
  };
@@ -1,6 +1,6 @@
1
- import { m as t } from "./DCVV5mpw.js";
2
- import { ja as T } from "date-fns/locale/ja";
3
- const o = {
1
+ import { m as o } from "./C4gM95cu.js";
2
+ import { ja as t } from "date-fns/locale/ja";
3
+ const T = {
4
4
  conversation: {
5
5
  input_placeholder: "質問する",
6
6
  input_placeholder_disabled: "このチャンネルではチャットを利用できません",
@@ -11,9 +11,14 @@ const o = {
11
11
  powered_by: "Powered by",
12
12
  citation_title: "出典",
13
13
  start_new_conversation_label: "会話を始める",
14
+ scroll_to_new_messages_label: () => "新しいメッセージ",
14
15
  failed_message_resend: "再試行",
15
16
  failed_message_remove: "削除",
16
- file_upload_no_supported_files: "サポートされているファイルタイプがありません。"
17
+ file_upload_no_supported_files: "サポートされているファイルタイプがありません。",
18
+ // Accessibility
19
+ a11y_message_list: "チャットメッセージ",
20
+ a11y_scroll_to_bottom: "一番下にスクロール",
21
+ a11y_scroll_to_new_messages: "新しいメッセージにスクロール"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "会話",
@@ -63,9 +68,9 @@ const o = {
63
68
  }
64
69
  }, e = {
65
70
  language: "ja",
66
- strings: o,
67
- dateLocale: T
68
- }, a = t(e.strings), A = {
71
+ strings: T,
72
+ dateLocale: t
73
+ }, a = o(e.strings), s = {
69
74
  ...a,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "エージェントに接続",
@@ -117,11 +122,11 @@ const o = {
117
122
  NO_NAME: "(名前なし)",
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "チャンネルが凍結されました"
120
- }, I = {
125
+ }, A = {
121
126
  language: e.language,
122
127
  dateLocale: e.dateLocale,
123
- stringSet: A
128
+ stringSet: s
124
129
  };
125
130
  export {
126
- I as default
131
+ A as default
127
132
  };
@@ -1,6 +1,6 @@
1
- import { m as o } from "./DCVV5mpw.js";
2
- import { fr as r } from "date-fns/locale/fr";
3
- const _ = {
1
+ import { m as o } from "./C4gM95cu.js";
2
+ import { fr as _ } from "date-fns/locale/fr";
3
+ const r = {
4
4
  conversation: {
5
5
  input_placeholder: "Poser une question",
6
6
  input_placeholder_disabled: "Le chat n'est pas disponible dans ce canal",
@@ -11,9 +11,14 @@ const _ = {
11
11
  powered_by: "Propulsé par",
12
12
  citation_title: "Source",
13
13
  start_new_conversation_label: "Démarrer une conversation",
14
+ scroll_to_new_messages_label: () => "Nouveau message",
14
15
  failed_message_resend: "Réessayer",
15
16
  failed_message_remove: "Supprimer",
16
- file_upload_no_supported_files: "Aucun type de fichier pris en charge disponible."
17
+ file_upload_no_supported_files: "Aucun type de fichier pris en charge disponible.",
18
+ // Accessibility
19
+ a11y_message_list: "Messages du chat",
20
+ a11y_scroll_to_bottom: "Faire défiler vers le bas",
21
+ a11y_scroll_to_new_messages: "Aller aux nouveaux messages"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "Conversations",
@@ -61,12 +66,12 @@ const _ = {
61
66
  edit: "Modifier les commentaires",
62
67
  remove: "Supprimer les commentaires"
63
68
  }
64
- }, n = {
69
+ }, a = {
65
70
  language: "fr",
66
- strings: _,
67
- dateLocale: r
68
- }, a = o(n.strings), t = {
69
- ...a,
71
+ strings: r,
72
+ dateLocale: _
73
+ }, n = o(a.strings), s = {
74
+ ...n,
70
75
  // Channel Header
71
76
  HEADER_BUTTON__AGENT_HANDOFF: "Se connecter avec un agent",
72
77
  // Message Input
@@ -98,7 +103,7 @@ const _ = {
98
103
  FORM_VALIDATION_MAX_SELECT: (e) => `Sélectionnez au maximum ${e} options`,
99
104
  FORM_VALIDATION_REGEX_FAILED: "Format invalide",
100
105
  /** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
101
- DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: a.DATE_FORMAT__DATE_SHORT,
106
+ DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: n.DATE_FORMAT__DATE_SHORT,
102
107
  /** @deprecated Unused string **/
103
108
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE_CAPTION: "HH:mm",
104
109
  /** @deprecated Unused string **/
@@ -118,9 +123,9 @@ const _ = {
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "Canal gelé"
120
125
  }, l = {
121
- language: n.language,
122
- dateLocale: n.dateLocale,
123
- stringSet: t
126
+ language: a.language,
127
+ dateLocale: a.dateLocale,
128
+ stringSet: s
124
129
  };
125
130
  export {
126
131
  l as default
@@ -1,6 +1,6 @@
1
- import { m as _ } from "./DCVV5mpw.js";
2
- import { de as r } from "date-fns/locale/de";
3
- const a = {
1
+ import { m as _ } from "./C4gM95cu.js";
2
+ import { de as a } from "date-fns/locale/de";
3
+ const r = {
4
4
  conversation: {
5
5
  input_placeholder: "Eine Frage stellen",
6
6
  input_placeholder_disabled: "Chat ist in diesem Kanal nicht verfügbar",
@@ -11,9 +11,14 @@ const a = {
11
11
  powered_by: "Unterstützt von",
12
12
  citation_title: "Quelle",
13
13
  start_new_conversation_label: "Ein Gespräch starten",
14
+ scroll_to_new_messages_label: () => "Neue Nachricht",
14
15
  failed_message_resend: "Erneut versuchen",
15
16
  failed_message_remove: "Entfernen",
16
- file_upload_no_supported_files: "Keine unterstützten Dateitypen verfügbar."
17
+ file_upload_no_supported_files: "Keine unterstützten Dateitypen verfügbar.",
18
+ // Accessibility
19
+ a11y_message_list: "Chat-Nachrichten",
20
+ a11y_scroll_to_bottom: "Nach unten scrollen",
21
+ a11y_scroll_to_new_messages: "Zu neuen Nachrichten scrollen"
17
22
  },
18
23
  conversation_list: {
19
24
  header_title: "Gespräche",
@@ -63,8 +68,8 @@ const a = {
63
68
  }
64
69
  }, n = {
65
70
  language: "de",
66
- strings: a,
67
- dateLocale: r
71
+ strings: r,
72
+ dateLocale: a
68
73
  }, t = _(n.strings), i = {
69
74
  ...t,
70
75
  // Channel Header
@@ -117,11 +122,11 @@ const a = {
117
122
  NO_NAME: "(Kein Name)",
118
123
  /** @deprecated Unused string **/
119
124
  CHANNEL_FROZEN: "Kanal eingefroren"
120
- }, l = {
125
+ }, o = {
121
126
  language: n.language,
122
127
  dateLocale: n.dateLocale,
123
128
  stringSet: i
124
129
  };
125
130
  export {
126
- l as default
131
+ o as default
127
132
  };
@@ -1,32 +1,46 @@
1
- import * as r from "react";
2
- import { useCallback as p } from "react";
3
- import s from "dompurify";
4
- import h, { RuleType as x } from "markdown-to-jsx";
5
- import g from "styled-components";
6
- import { A as b, e as c, c as i } from "./DCVV5mpw.js";
7
- const m = (d, o, n, t) => o.type === x.textStrikethroughed ? /* @__PURE__ */ r.createElement("span", { key: t.key }, `~~${n(o.children, t)}~~`) : d(), v = ({ className: d, children: o, style: n, onClickImage: t }) => {
8
- const a = p(
9
- (e) => /* @__PURE__ */ r.createElement("img", { ...e, onClick: () => e.src && (t == null ? void 0 : t(e.src)) }),
10
- []
11
- );
12
- return /* @__PURE__ */ r.createElement(w, { className: d, style: n }, /* @__PURE__ */ r.createElement(
13
- h,
1
+ import * as t from "react";
2
+ import { useCallback as s } from "react";
3
+ import h from "dompurify";
4
+ import x, { RuleType as g } from "markdown-to-jsx";
5
+ import b from "styled-components";
6
+ import { A as c, e as m, c as r } from "./C4gM95cu.js";
7
+ const w = (d, o, a, e) => o.type === g.textStrikethroughed ? /* @__PURE__ */ t.createElement("span", { key: e.key }, `~~${a(o.children, e)}~~`) : d(), v = ({ className: d, children: o, style: a, onClickImage: e }) => {
8
+ const p = s((i) => {
9
+ const n = /* @__PURE__ */ t.createElement("img", { ...i, alt: i.alt || "" }), l = i.src;
10
+ return e && l ? /* @__PURE__ */ t.createElement(
11
+ "button",
12
+ {
13
+ type: "button",
14
+ onClick: () => e(l),
15
+ style: {
16
+ border: "none",
17
+ padding: 0,
18
+ background: "none",
19
+ cursor: "pointer",
20
+ display: "inline-block"
21
+ }
22
+ },
23
+ n
24
+ ) : n;
25
+ }, []);
26
+ return /* @__PURE__ */ t.createElement(f, { className: d, style: a }, /* @__PURE__ */ t.createElement(
27
+ x,
14
28
  {
15
29
  options: {
16
- renderRule: m,
30
+ renderRule: w,
17
31
  overrides: {
18
32
  a: {
19
- component: ({ children: e, ...l }) => /* @__PURE__ */ r.createElement("a", { ...l, target: "_blank", rel: b }, e)
33
+ component: ({ children: i, ...n }) => /* @__PURE__ */ t.createElement("a", { ...n, target: "_blank", rel: c }, i)
20
34
  },
21
35
  img: {
22
- component: a
36
+ component: p
23
37
  }
24
38
  }
25
39
  }
26
40
  },
27
- s.sanitize(c(o))
41
+ h.sanitize(m(o))
28
42
  ));
29
- }, w = g.div`*{&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}}hr{border-top:1px solid ${i.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:${i.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:${i.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:${i.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:${i.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;}img{max-width:100%;height:auto;}`;
43
+ }, f = b.div`*{&:first-child{margin-top:0;}&:last-child{margin-bottom:0;}}hr{border-top:1px solid ${r.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:${r.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:${r.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:${r.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:${r.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;}img{max-width:100%;height:auto;}`;
30
44
  export {
31
45
  v as MarkdownText
32
46
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/Cfid8u9U.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.AnonymousSessionInfo=e.AnonymousSessionInfo;exports.CSATType=e.CSATType;exports.Commands=e.DispatcherCommands;exports.Conversation=e.Conversation;exports.ConversationContext=e.ConversationContext;exports.ConversationContextProvider=e.ConversationContextProvider;exports.ConversationHeaderLayout=e.ConversationHeaderLayout;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListContext=e.ConversationListContext;exports.ConversationListContextProvider=e.ConversationListContextProvider;exports.ConversationListHeaderLayout=e.ConversationListHeaderLayout;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.ManualSessionInfo=e.ManualSessionInfo;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.PlaceholderLayout=e.PlaceholderLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useConversationContext=e.useConversationContext;exports.useConversationListContext=e.useConversationListContext;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;exports.useRefreshActiveChannel=e.useRefreshActiveChannel;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./cjs/DgWOJuCM.cjs");require("react");exports.AgentProviderContainer=e.AgentProviderContainer;exports.AgentUIProviderContainer=e.AgentUIProviderContainer;exports.AnonymousSessionInfo=e.AnonymousSessionInfo;exports.CSATType=e.CSATType;exports.Commands=e.DispatcherCommands;exports.Conversation=e.Conversation;exports.ConversationContext=e.ConversationContext;exports.ConversationContextProvider=e.ConversationContextProvider;exports.ConversationHeaderLayout=e.ConversationHeaderLayout;exports.ConversationLayout=e.ConversationLayout;exports.ConversationList=e.ConversationList;exports.ConversationListContext=e.ConversationListContext;exports.ConversationListContextProvider=e.ConversationListContextProvider;exports.ConversationListHeaderLayout=e.ConversationListHeaderLayout;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.ManualSessionInfo=e.ManualSessionInfo;exports.MessageLogs=e.MessageLogs;exports.OutgoingMessageLayout=e.OutgoingMessageLayout;exports.PlaceholderLayout=e.PlaceholderLayout;exports.SystemMessageLayout=e.SystemMessageLayout;exports.messengerDispatcher=e.messengerDispatcher;exports.useConversationContext=e.useConversationContext;exports.useConversationListContext=e.useConversationListContext;exports.useLocalizationContext=e.useLocalizationContext;exports.useMessengerContext=e.useMessengerContext;exports.useMessengerSessionContext=e.useMessengerSessionContext;exports.useRefreshActiveChannel=e.useRefreshActiveChannel;
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ import { SendbirdChatWith } from '@sendbird/chat';
28
28
  import { SendbirdError } from '@sendbird/chat';
29
29
  import { SessionHandler } from '@sendbird/chat';
30
30
  import { SVGProps } from 'react';
31
+ import { UIEvent as UIEvent_2 } from 'react';
31
32
  import { User } from '@sendbird/chat';
32
33
  import { UserMessage } from '@sendbird/chat/message';
33
34
  import { UserMessageCreateParams } from '@sendbird/chat/message';
@@ -47,7 +48,16 @@ export declare interface AgentClientHandlers {
47
48
 
48
49
  export declare interface AgentMessageTemplateInfo {
49
50
  key: string;
50
- message_template_key: 'text' | 'suggested_replies' | 'cta' | 'image' | 'carousel';
51
+ message_template_key:
52
+ | 'text'
53
+ | 'suggested_replies'
54
+ | 'cta'
55
+ | 'image'
56
+ | 'carousel'
57
+ | 'product_items'
58
+ | 'form'
59
+ | (string & {});
60
+
51
61
  name: string;
52
62
  request_context?: {
53
63
  request: {
@@ -252,6 +262,7 @@ declare interface AIAgentConfig {
252
262
  conversation?: {
253
263
  isTalkToAgentViewEnabled?: boolean;
254
264
  scrollMode?: ConversationScrollMode;
265
+ newMessageIndicatorEnabled?: boolean;
255
266
  input?: {
256
267
  /**
257
268
  * (Mobile only) Whether to enable the camera option in the attachment menu.
@@ -304,6 +315,7 @@ declare interface AIAgentConversationContextValue {
304
315
 
305
316
  messageSource: {
306
317
  messages: BaseMessage[];
318
+ newMessages: BaseMessage[];
307
319
  initialized: boolean;
308
320
  loadPrevious: () => Promise<void>;
309
321
  loadNext: () => Promise<void>;
@@ -311,6 +323,7 @@ declare interface AIAgentConversationContextValue {
311
323
  sendFileMessage: (params: FileMessageCreateParams) => Promise<FileMessage>;
312
324
  deleteMessage: (message: UserMessage | FileMessage) => Promise<void>;
313
325
  resendMessage: (message: UserMessage | FileMessage) => Promise<UserMessage | FileMessage>;
326
+ resetNewMessages: () => void;
314
327
  };
315
328
 
316
329
  state: {
@@ -592,11 +605,17 @@ declare interface AIAgentStringSet {
592
605
  powered_by: string;
593
606
  citation_title: string;
594
607
  start_new_conversation_label: string;
608
+ scroll_to_new_messages_label: (messages: BaseMessage[]) => string;
595
609
 
596
610
  failed_message_resend: string;
597
611
  failed_message_remove: string;
598
612
 
599
613
  file_upload_no_supported_files: string;
614
+
615
+ // Accessibility
616
+ a11y_message_list: string;
617
+ a11y_scroll_to_bottom: string;
618
+ a11y_scroll_to_new_messages: string;
600
619
  };
601
620
 
602
621
  conversation_list: {
@@ -688,6 +707,7 @@ declare abstract class BaseCommand {
688
707
  }
689
708
 
690
709
  declare type BaseMessageProps<T> = T & {
710
+ data?: string;
691
711
  createdAt?: number;
692
712
  extendedMessagePayload?: Partial<ExtendedMessagePayload>;
693
713
 
@@ -1011,11 +1031,20 @@ export declare const ConversationListLayout: {
1011
1031
  declare interface ConversationScrollContextValue {
1012
1032
  ref: RefObject<HTMLDivElement | null> | ((element: HTMLDivElement | null) => void);
1013
1033
  state: {
1014
- bottomSpace?: number;
1015
- shouldShowScrollButton: boolean;
1034
+ bottomSpace: number;
1035
+ /**
1036
+ * Whether user has scrolled away from the latest messages.
1037
+ * Use this to determine when to show floating action buttons (scroll to bottom, new messages, etc.)
1038
+ */
1039
+ isAwayFromBottom: boolean;
1040
+ /**
1041
+ * Determines whether new messages should be counted.
1042
+ * Returns true when user is not at bottom (browsing old messages).
1043
+ */
1044
+ shouldCountNewMessages: () => boolean;
1016
1045
  };
1017
1046
  props: {
1018
- onScroll?: (event: React.UIEvent<HTMLDivElement, UIEvent>) => void;
1047
+ onScroll?: (event: UIEvent_2<HTMLDivElement>) => void;
1019
1048
  };
1020
1049
  actions: {
1021
1050
  /**
@@ -1038,7 +1067,7 @@ declare interface ConversationScrollContextValue {
1038
1067
  /**
1039
1068
  * Call when receiving streaming message updates
1040
1069
  * - Fixed mode: Maintains scroll position while content grows
1041
- * - Auto mode: No operation (scrolling is handled by shouldScrollToBottom check)
1070
+ * - Auto mode: Continuously scrolls to bottom to track real-time updates
1042
1071
  */
1043
1072
  onStreamingUpdate: (isStreaming: boolean) => void;
1044
1073
  /**
@@ -1352,6 +1381,7 @@ BaseMessageProps<{
1352
1381
  onSubmitForm?: (params: { key: string; data: Record<string, FormFieldValue> }) => Promise<void>;
1353
1382
  onCancelForm?: (params: { key: string }) => Promise<void>;
1354
1383
  onStreamAnimationStart?: () => void;
1384
+ onStreamAnimationProgress?: () => void;
1355
1385
  onStreamAnimationComplete?: () => void;
1356
1386
 
1357
1387
  // fallbacks
@@ -2143,6 +2173,10 @@ declare type StringSet = {
2143
2173
  FEEDBACK_REMOVE: string;
2144
2174
  FAILED_MESSAGE_RESEND: string;
2145
2175
  FAILED_MESSAGE_REMOVE: string;
2176
+ A11Y_MESSAGE_LIST: string;
2177
+ A11Y_SCROLL_TO_BOTTOM: string;
2178
+ A11Y_SCROLL_TO_NEW_MESSAGES: string;
2179
+ SCROLL_TO_NEW_MESSAGES_LABEL: (messages: BaseMessage[]) => string;
2146
2180
  /** @deprecated Please use DATE_FORMAT__DATE_SHORT instead. **/
2147
2181
  DATE_FORMAT__CONVERSATION_LIST__LIST_ITEM_TITLE: string;
2148
2182
  /** @deprecated Unused string **/
@@ -2213,7 +2247,7 @@ declare type SystemMessageUnion =
2213
2247
  csatReason?: string;
2214
2248
  csatExpireAt?: number;
2215
2249
  isResolvedWhenDeterminedByUser?: boolean;
2216
- onSubmitCSAT: (params: CSATSubmitParams) => void;
2250
+ onSubmitCSAT: (params: CSATSubmitParams) => Promise<void>;
2217
2251
  }>;
2218
2252
 
2219
2253
  declare type TextField = {
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as o, b as n, B as t, x as i, D as r, j as C, n as L, o as u, l as v, k as g, q as y, t as x, v as d, s as M, C as m, r as l, h as c, F as f, I as h, L as I, y as P, z as S, M as p, O as A, P as D, S as z, g as B, p as F, w as H, f as O, u as T, d as b, i as j } from "./es/DCVV5mpw.js";
1
+ import { a as o, b as n, B as t, x as i, D as r, j as C, n as L, o as u, l as v, k as g, q as y, t as x, v as d, s as M, C as m, r as l, h as c, F as f, I as h, L as I, y as P, z as S, M as p, O as A, P as D, S as z, g as B, p as F, w as H, f as O, u as T, d as b, i as j } from "./es/C4gM95cu.js";
2
2
  import "react";
3
3
  export {
4
4
  o as AgentProviderContainer,