@giovchat/react-native 0.0.0-stage → 0.2.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 (143) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +333 -2
  3. package/dist/GiovChat.d.ts +100 -0
  4. package/dist/GiovChat.d.ts.map +1 -0
  5. package/dist/GiovChat.js +257 -0
  6. package/dist/GiovChat.js.map +1 -0
  7. package/dist/attachments.d.ts +121 -0
  8. package/dist/attachments.d.ts.map +1 -0
  9. package/dist/attachments.js +185 -0
  10. package/dist/attachments.js.map +1 -0
  11. package/dist/brand-assets.d.ts +6 -0
  12. package/dist/brand-assets.d.ts.map +1 -0
  13. package/dist/brand-assets.js +9 -0
  14. package/dist/brand-assets.js.map +1 -0
  15. package/dist/client.d.ts +190 -0
  16. package/dist/client.d.ts.map +1 -0
  17. package/dist/client.js +801 -0
  18. package/dist/client.js.map +1 -0
  19. package/dist/color.d.ts +25 -0
  20. package/dist/color.d.ts.map +1 -0
  21. package/dist/color.js +78 -0
  22. package/dist/color.js.map +1 -0
  23. package/dist/components/Attachments.d.ts +13 -0
  24. package/dist/components/Attachments.d.ts.map +1 -0
  25. package/dist/components/Attachments.js +42 -0
  26. package/dist/components/Attachments.js.map +1 -0
  27. package/dist/components/Branding.d.ts +6 -0
  28. package/dist/components/Branding.d.ts.map +1 -0
  29. package/dist/components/Branding.js +28 -0
  30. package/dist/components/Branding.js.map +1 -0
  31. package/dist/components/ChatMarkdown.d.ts +15 -0
  32. package/dist/components/ChatMarkdown.d.ts.map +1 -0
  33. package/dist/components/ChatMarkdown.js +72 -0
  34. package/dist/components/ChatMarkdown.js.map +1 -0
  35. package/dist/components/GiovBotMark.d.ts +6 -0
  36. package/dist/components/GiovBotMark.d.ts.map +1 -0
  37. package/dist/components/GiovBotMark.js +11 -0
  38. package/dist/components/GiovBotMark.js.map +1 -0
  39. package/dist/components/GreetingBubble.d.ts +7 -0
  40. package/dist/components/GreetingBubble.d.ts.map +1 -0
  41. package/dist/components/GreetingBubble.js +12 -0
  42. package/dist/components/GreetingBubble.js.map +1 -0
  43. package/dist/components/Header.d.ts +18 -0
  44. package/dist/components/Header.d.ts.map +1 -0
  45. package/dist/components/Header.js +67 -0
  46. package/dist/components/Header.js.map +1 -0
  47. package/dist/components/MessageBubble.d.ts +16 -0
  48. package/dist/components/MessageBubble.d.ts.map +1 -0
  49. package/dist/components/MessageBubble.js +49 -0
  50. package/dist/components/MessageBubble.js.map +1 -0
  51. package/dist/components/PreChatForm.d.ts +11 -0
  52. package/dist/components/PreChatForm.d.ts.map +1 -0
  53. package/dist/components/PreChatForm.js +72 -0
  54. package/dist/components/PreChatForm.js.map +1 -0
  55. package/dist/components/TypingIndicator.d.ts +9 -0
  56. package/dist/components/TypingIndicator.d.ts.map +1 -0
  57. package/dist/components/TypingIndicator.js +18 -0
  58. package/dist/components/TypingIndicator.js.map +1 -0
  59. package/dist/components/WidgetStyles.d.ts +3 -0
  60. package/dist/components/WidgetStyles.d.ts.map +1 -0
  61. package/dist/components/WidgetStyles.js +9 -0
  62. package/dist/components/WidgetStyles.js.map +1 -0
  63. package/dist/components/bubbleStyles.d.ts +47 -0
  64. package/dist/components/bubbleStyles.d.ts.map +1 -0
  65. package/dist/components/bubbleStyles.js +19 -0
  66. package/dist/components/bubbleStyles.js.map +1 -0
  67. package/dist/components/index.d.ts +11 -0
  68. package/dist/components/index.d.ts.map +1 -0
  69. package/dist/components/index.js +14 -0
  70. package/dist/components/index.js.map +1 -0
  71. package/dist/errors.d.ts +18 -0
  72. package/dist/errors.d.ts.map +1 -0
  73. package/dist/errors.js +26 -0
  74. package/dist/errors.js.map +1 -0
  75. package/dist/i18n.d.ts +73 -0
  76. package/dist/i18n.d.ts.map +1 -0
  77. package/dist/i18n.js +292 -0
  78. package/dist/i18n.js.map +1 -0
  79. package/dist/identity.d.ts +41 -0
  80. package/dist/identity.d.ts.map +1 -0
  81. package/dist/identity.js +41 -0
  82. package/dist/identity.js.map +1 -0
  83. package/dist/index.d.ts +20 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +46 -0
  86. package/dist/index.js.map +1 -0
  87. package/dist/markdown.d.ts +56 -0
  88. package/dist/markdown.d.ts.map +1 -0
  89. package/dist/markdown.js +219 -0
  90. package/dist/markdown.js.map +1 -0
  91. package/dist/outbox.d.ts +68 -0
  92. package/dist/outbox.d.ts.map +1 -0
  93. package/dist/outbox.js +168 -0
  94. package/dist/outbox.js.map +1 -0
  95. package/dist/protocol.d.ts +9 -0
  96. package/dist/protocol.d.ts.map +1 -0
  97. package/dist/protocol.js +34 -0
  98. package/dist/protocol.js.map +1 -0
  99. package/dist/styleOverrides.d.ts +37 -0
  100. package/dist/styleOverrides.d.ts.map +1 -0
  101. package/dist/styleOverrides.js +54 -0
  102. package/dist/styleOverrides.js.map +1 -0
  103. package/dist/types.d.ts +111 -0
  104. package/dist/types.d.ts.map +1 -0
  105. package/dist/types.js +3 -0
  106. package/dist/types.js.map +1 -0
  107. package/dist/unread.d.ts +9 -0
  108. package/dist/unread.d.ts.map +1 -0
  109. package/dist/unread.js +49 -0
  110. package/dist/unread.js.map +1 -0
  111. package/dist/useChatSession.d.ts +78 -0
  112. package/dist/useChatSession.d.ts.map +1 -0
  113. package/dist/useChatSession.js +796 -0
  114. package/dist/useChatSession.js.map +1 -0
  115. package/package.json +59 -4
  116. package/src/GiovChat.tsx +530 -0
  117. package/src/attachments.ts +218 -0
  118. package/src/brand-assets.ts +5 -0
  119. package/src/client.ts +758 -0
  120. package/src/color.ts +74 -0
  121. package/src/components/Attachments.tsx +75 -0
  122. package/src/components/Branding.tsx +35 -0
  123. package/src/components/ChatMarkdown.tsx +111 -0
  124. package/src/components/GiovBotMark.tsx +19 -0
  125. package/src/components/GreetingBubble.tsx +20 -0
  126. package/src/components/Header.tsx +131 -0
  127. package/src/components/MessageBubble.tsx +121 -0
  128. package/src/components/PreChatForm.tsx +183 -0
  129. package/src/components/TypingIndicator.tsx +34 -0
  130. package/src/components/WidgetStyles.tsx +5 -0
  131. package/src/components/bubbleStyles.ts +16 -0
  132. package/src/components/index.ts +14 -0
  133. package/src/errors.ts +30 -0
  134. package/src/i18n.ts +351 -0
  135. package/src/identity.ts +54 -0
  136. package/src/index.ts +68 -0
  137. package/src/markdown.ts +227 -0
  138. package/src/outbox.ts +175 -0
  139. package/src/protocol.ts +31 -0
  140. package/src/styleOverrides.ts +85 -0
  141. package/src/types.ts +119 -0
  142. package/src/unread.ts +39 -0
  143. package/src/useChatSession.ts +695 -0
package/dist/i18n.js ADDED
@@ -0,0 +1,292 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useGiovChatStrings = exports.GiovChatStringsContext = exports.GIOVCHAT_STRINGS = void 0;
4
+ exports.resolveLocale = resolveLocale;
5
+ exports.deviceLocale = deviceLocale;
6
+ exports.resolveStrings = resolveStrings;
7
+ const react_1 = require("react");
8
+ const en = {
9
+ loading: "Loading…",
10
+ tryAgain: "Try again",
11
+ retry: "Retry",
12
+ closeChat: "Close chat",
13
+ menu: "Menu",
14
+ privacyPolicy: "GDPR and privacy",
15
+ newMessage: (sender, text) => `${sender}: ${text}`,
16
+ connecting: "Connecting…",
17
+ reconnecting: "Connection lost. Reconnecting…",
18
+ statusPerson: "Live agent",
19
+ statusBot: "AI assistant · Online",
20
+ statusTeam: "We'll be with you shortly",
21
+ composerPlaceholder: "Type a message…",
22
+ messageInput: "Message",
23
+ sendMessage: "Send message",
24
+ attachFile: "Attach file",
25
+ removeAttachment: (name) => `Remove ${name}`,
26
+ you: "You",
27
+ agent: "Agent",
28
+ automated: "Automated",
29
+ botTyping: (name) => `${name} is typing`,
30
+ teamTyping: "Support team is typing",
31
+ sending: "Sending…",
32
+ notSent: "Not sent",
33
+ tapToRetry: "Tap to retry",
34
+ discard: "Discard",
35
+ uploading: (percent) => `Uploading ${percent}%`,
36
+ uploadFailed: "File upload failed",
37
+ sessionExpired: "Chat session expired. Please start a new chat.",
38
+ conversationEnded: "This conversation has ended.",
39
+ unavailable: "Chat is unavailable. Please try again.",
40
+ sendFailed: "Message could not be sent.",
41
+ busy: "The team is busy right now. Please try again in a moment.",
42
+ attachmentsOff: "File attachments are turned off for this chat.",
43
+ typeNotAllowed: (name) => `${name}: this file type is not allowed.`,
44
+ fileTooLarge: (name, maxMb) => `${name}: files must be ${maxMb} MB or smaller.`,
45
+ tooManyFiles: (max) => `You can attach up to ${max} files at a time.`,
46
+ openAttachment: (name) => `Open ${name}`,
47
+ attachment: "Attachment",
48
+ image: "Image",
49
+ imageUnavailable: "Image unavailable",
50
+ preChatTitle: "Before we start…",
51
+ firstName: "First name",
52
+ lastName: "Last name",
53
+ email: "Email",
54
+ phone: "Phone",
55
+ required: (label) => `${label} *`,
56
+ startChat: "Start chat",
57
+ };
58
+ const fr = {
59
+ loading: "Chargement…",
60
+ tryAgain: "Réessayer",
61
+ retry: "Réessayer",
62
+ closeChat: "Fermer le chat",
63
+ menu: "Menu",
64
+ privacyPolicy: "RGPD et confidentialité",
65
+ newMessage: (sender, text) => `${sender} : ${text}`,
66
+ connecting: "Connexion…",
67
+ reconnecting: "Connexion perdue. Reconnexion…",
68
+ statusPerson: "Conseiller en ligne",
69
+ statusBot: "Assistant IA · En ligne",
70
+ statusTeam: "Nous vous répondons très vite",
71
+ composerPlaceholder: "Écrivez un message…",
72
+ messageInput: "Message",
73
+ sendMessage: "Envoyer le message",
74
+ attachFile: "Joindre un fichier",
75
+ removeAttachment: (name) => `Retirer ${name}`,
76
+ you: "Vous",
77
+ agent: "Conseiller",
78
+ automated: "Automatique",
79
+ botTyping: (name) => `${name} écrit`,
80
+ teamTyping: "L'équipe écrit",
81
+ sending: "Envoi…",
82
+ notSent: "Non envoyé",
83
+ tapToRetry: "Touchez pour réessayer",
84
+ discard: "Supprimer",
85
+ uploading: (percent) => `Envoi ${percent} %`,
86
+ uploadFailed: "Échec de l'envoi du fichier",
87
+ sessionExpired: "La session de chat a expiré. Démarrez un nouveau chat.",
88
+ conversationEnded: "Cette conversation est terminée.",
89
+ unavailable: "Le chat est indisponible. Réessayez.",
90
+ sendFailed: "Le message n'a pas pu être envoyé.",
91
+ busy: "L'équipe est très occupée. Réessayez dans un instant.",
92
+ attachmentsOff: "Les pièces jointes sont désactivées pour ce chat.",
93
+ typeNotAllowed: (name) => `${name} : ce type de fichier n'est pas autorisé.`,
94
+ fileTooLarge: (name, maxMb) => `${name} : les fichiers doivent faire ${maxMb} Mo maximum.`,
95
+ tooManyFiles: (max) => `Vous pouvez joindre jusqu'à ${max} fichiers à la fois.`,
96
+ openAttachment: (name) => `Ouvrir ${name}`,
97
+ attachment: "Pièce jointe",
98
+ image: "Image",
99
+ imageUnavailable: "Image indisponible",
100
+ preChatTitle: "Avant de commencer…",
101
+ firstName: "Prénom",
102
+ lastName: "Nom",
103
+ email: "E-mail",
104
+ phone: "Téléphone",
105
+ required: (label) => `${label} *`,
106
+ startChat: "Démarrer le chat",
107
+ };
108
+ const es = {
109
+ loading: "Cargando…",
110
+ tryAgain: "Reintentar",
111
+ retry: "Reintentar",
112
+ closeChat: "Cerrar chat",
113
+ menu: "Menú",
114
+ privacyPolicy: "RGPD y privacidad",
115
+ newMessage: (sender, text) => `${sender}: ${text}`,
116
+ connecting: "Conectando…",
117
+ reconnecting: "Conexión perdida. Reconectando…",
118
+ statusPerson: "Agente en vivo",
119
+ statusBot: "Asistente de IA · En línea",
120
+ statusTeam: "Te atenderemos en breve",
121
+ composerPlaceholder: "Escribe un mensaje…",
122
+ messageInput: "Mensaje",
123
+ sendMessage: "Enviar mensaje",
124
+ attachFile: "Adjuntar archivo",
125
+ removeAttachment: (name) => `Quitar ${name}`,
126
+ you: "Tú",
127
+ agent: "Agente",
128
+ automated: "Automático",
129
+ botTyping: (name) => `${name} está escribiendo`,
130
+ teamTyping: "El equipo está escribiendo",
131
+ sending: "Enviando…",
132
+ notSent: "No enviado",
133
+ tapToRetry: "Toca para reintentar",
134
+ discard: "Descartar",
135
+ uploading: (percent) => `Subiendo ${percent} %`,
136
+ uploadFailed: "No se pudo subir el archivo",
137
+ sessionExpired: "La sesión de chat caducó. Inicia un chat nuevo.",
138
+ conversationEnded: "Esta conversación ha terminado.",
139
+ unavailable: "El chat no está disponible. Inténtalo de nuevo.",
140
+ sendFailed: "No se pudo enviar el mensaje.",
141
+ busy: "El equipo está ocupado ahora. Inténtalo de nuevo en un momento.",
142
+ attachmentsOff: "Los archivos adjuntos están desactivados en este chat.",
143
+ typeNotAllowed: (name) => `${name}: este tipo de archivo no está permitido.`,
144
+ fileTooLarge: (name, maxMb) => `${name}: los archivos deben pesar ${maxMb} MB o menos.`,
145
+ tooManyFiles: (max) => `Puedes adjuntar hasta ${max} archivos a la vez.`,
146
+ openAttachment: (name) => `Abrir ${name}`,
147
+ attachment: "Archivo adjunto",
148
+ image: "Imagen",
149
+ imageUnavailable: "Imagen no disponible",
150
+ preChatTitle: "Antes de empezar…",
151
+ firstName: "Nombre",
152
+ lastName: "Apellido",
153
+ email: "Correo electrónico",
154
+ phone: "Teléfono",
155
+ required: (label) => `${label} *`,
156
+ startChat: "Iniciar chat",
157
+ };
158
+ const pt = {
159
+ loading: "Carregando…",
160
+ tryAgain: "Tentar novamente",
161
+ retry: "Tentar novamente",
162
+ closeChat: "Fechar chat",
163
+ menu: "Menu",
164
+ privacyPolicy: "RGPD e privacidade",
165
+ newMessage: (sender, text) => `${sender}: ${text}`,
166
+ connecting: "Conectando…",
167
+ reconnecting: "Conexão perdida. Reconectando…",
168
+ statusPerson: "Atendente ao vivo",
169
+ statusBot: "Assistente de IA · Online",
170
+ statusTeam: "Responderemos em breve",
171
+ composerPlaceholder: "Digite uma mensagem…",
172
+ messageInput: "Mensagem",
173
+ sendMessage: "Enviar mensagem",
174
+ attachFile: "Anexar arquivo",
175
+ removeAttachment: (name) => `Remover ${name}`,
176
+ you: "Você",
177
+ agent: "Atendente",
178
+ automated: "Automático",
179
+ botTyping: (name) => `${name} está digitando`,
180
+ teamTyping: "A equipe está digitando",
181
+ sending: "Enviando…",
182
+ notSent: "Não enviada",
183
+ tapToRetry: "Toque para tentar novamente",
184
+ discard: "Descartar",
185
+ uploading: (percent) => `Enviando ${percent}%`,
186
+ uploadFailed: "Falha ao enviar o arquivo",
187
+ sessionExpired: "A sessão do chat expirou. Inicie um novo chat.",
188
+ conversationEnded: "Esta conversa foi encerrada.",
189
+ unavailable: "O chat está indisponível. Tente novamente.",
190
+ sendFailed: "Não foi possível enviar a mensagem.",
191
+ busy: "A equipe está ocupada agora. Tente novamente em instantes.",
192
+ attachmentsOff: "Os anexos estão desativados neste chat.",
193
+ typeNotAllowed: (name) => `${name}: este tipo de arquivo não é permitido.`,
194
+ fileTooLarge: (name, maxMb) => `${name}: os arquivos devem ter até ${maxMb} MB.`,
195
+ tooManyFiles: (max) => `Você pode anexar até ${max} arquivos por vez.`,
196
+ openAttachment: (name) => `Abrir ${name}`,
197
+ attachment: "Anexo",
198
+ image: "Imagem",
199
+ imageUnavailable: "Imagem indisponível",
200
+ preChatTitle: "Antes de começar…",
201
+ firstName: "Nome",
202
+ lastName: "Sobrenome",
203
+ email: "E-mail",
204
+ phone: "Telefone",
205
+ required: (label) => `${label} *`,
206
+ startChat: "Iniciar chat",
207
+ };
208
+ const de = {
209
+ loading: "Wird geladen…",
210
+ tryAgain: "Erneut versuchen",
211
+ retry: "Erneut versuchen",
212
+ closeChat: "Chat schließen",
213
+ menu: "Menü",
214
+ privacyPolicy: "DSGVO und Datenschutz",
215
+ newMessage: (sender, text) => `${sender}: ${text}`,
216
+ connecting: "Verbindung wird hergestellt…",
217
+ reconnecting: "Verbindung unterbrochen. Neuer Versuch…",
218
+ statusPerson: "Live-Support",
219
+ statusBot: "KI-Assistent · Online",
220
+ statusTeam: "Wir sind gleich für dich da",
221
+ composerPlaceholder: "Nachricht schreiben…",
222
+ messageInput: "Nachricht",
223
+ sendMessage: "Nachricht senden",
224
+ attachFile: "Datei anhängen",
225
+ removeAttachment: (name) => `${name} entfernen`,
226
+ you: "Du",
227
+ agent: "Support",
228
+ automated: "Automatisch",
229
+ botTyping: (name) => `${name} schreibt`,
230
+ teamTyping: "Das Team schreibt",
231
+ sending: "Wird gesendet…",
232
+ notSent: "Nicht gesendet",
233
+ tapToRetry: "Tippen zum Wiederholen",
234
+ discard: "Verwerfen",
235
+ uploading: (percent) => `Wird hochgeladen: ${percent} %`,
236
+ uploadFailed: "Datei konnte nicht hochgeladen werden",
237
+ sessionExpired: "Die Chat-Sitzung ist abgelaufen. Starte einen neuen Chat.",
238
+ conversationEnded: "Diese Unterhaltung ist beendet.",
239
+ unavailable: "Der Chat ist nicht verfügbar. Bitte versuche es erneut.",
240
+ sendFailed: "Die Nachricht konnte nicht gesendet werden.",
241
+ busy: "Das Team ist gerade ausgelastet. Bitte versuche es gleich noch einmal.",
242
+ attachmentsOff: "Dateianhänge sind in diesem Chat deaktiviert.",
243
+ typeNotAllowed: (name) => `${name}: Dieser Dateityp ist nicht erlaubt.`,
244
+ fileTooLarge: (name, maxMb) => `${name}: Dateien dürfen höchstens ${maxMb} MB groß sein.`,
245
+ tooManyFiles: (max) => `Du kannst bis zu ${max} Dateien auf einmal anhängen.`,
246
+ openAttachment: (name) => `${name} öffnen`,
247
+ attachment: "Anhang",
248
+ image: "Bild",
249
+ imageUnavailable: "Bild nicht verfügbar",
250
+ preChatTitle: "Bevor es losgeht…",
251
+ firstName: "Vorname",
252
+ lastName: "Nachname",
253
+ email: "E-Mail",
254
+ phone: "Telefon",
255
+ required: (label) => `${label} *`,
256
+ startChat: "Chat starten",
257
+ };
258
+ exports.GIOVCHAT_STRINGS = { en, fr, es, pt, de };
259
+ /** "fr-CA" → "fr", "pt_BR" → "pt"; anything not shipped falls back to English. */
260
+ function resolveLocale(value) {
261
+ const language = String(value ?? "").trim().toLowerCase().split(/[-_]/)[0];
262
+ return Object.keys(exports.GIOVCHAT_STRINGS).includes(language) ? language : "en";
263
+ }
264
+ /** The device language from Intl (Hermes and JSC both ship it), with no native module. */
265
+ function deviceLocale() {
266
+ try {
267
+ return Intl.DateTimeFormat().resolvedOptions().locale || "en";
268
+ }
269
+ catch {
270
+ return "en";
271
+ }
272
+ }
273
+ /** The strings for a locale with the host's overrides on top; malformed overrides are ignored. */
274
+ function resolveStrings(locale, overrides) {
275
+ const base = exports.GIOVCHAT_STRINGS[resolveLocale(locale ?? deviceLocale())];
276
+ if (!overrides || typeof overrides !== "object")
277
+ return base;
278
+ const result = { ...base };
279
+ for (const [key, value] of Object.entries(overrides)) {
280
+ const current = base[key];
281
+ if (current === undefined || typeof value !== typeof current)
282
+ continue;
283
+ if (typeof value === "string" && !value.trim())
284
+ continue;
285
+ result[key] = value;
286
+ }
287
+ return result;
288
+ }
289
+ exports.GiovChatStringsContext = (0, react_1.createContext)(en);
290
+ const useGiovChatStrings = () => (0, react_1.useContext)(exports.GiovChatStringsContext);
291
+ exports.useGiovChatStrings = useGiovChatStrings;
292
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":";;;AAqUA,sCAGC;AAGD,oCAEC;AAGD,wCAWC;AA3VD,iCAAkD;AAmElD,MAAM,EAAE,GAAoB;IAC1B,OAAO,EAAE,UAAU;IACnB,QAAQ,EAAE,WAAW;IACrB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,YAAY;IACvB,IAAI,EAAE,MAAM;IACZ,aAAa,EAAE,kBAAkB;IACjC,UAAU,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,KAAK,IAAI,EAAE;IAClD,UAAU,EAAE,aAAa;IACzB,YAAY,EAAE,gCAAgC;IAC9C,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,uBAAuB;IAClC,UAAU,EAAE,2BAA2B;IACvC,mBAAmB,EAAE,iBAAiB;IACtC,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,cAAc;IAC3B,UAAU,EAAE,aAAa;IAC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AAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAC/F,CAAC;AAED,kGAAkG;AAClG,SAAgB,cAAc,CAAC,MAAsB,EAAE,SAA2C;IAChG,MAAM,IAAI,GAAG,wBAAgB,CAAC,aAAa,CAAC,MAAM,IAAI,YAAY,EAAE,CAAC,CAAC,CAAC;IACvE,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAC7D,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAA6B,CAAC;IACtD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QACrD,MAAM,OAAO,GAAI,IAA2C,CAAC,GAAG,CAAC,CAAC;QAClE,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,KAAK,OAAO,OAAO;YAAE,SAAS;QACvE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;YAAE,SAAS;QACzD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,OAAO,MAAoC,CAAC;AAC9C,CAAC;AAEY,QAAA,sBAAsB,GAAG,IAAA,qBAAa,EAAkB,EAAE,CAAC,CAAC;AAClE,MAAM,kBAAkB,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,8BAAsB,CAAC,CAAC;AAA9D,QAAA,kBAAkB,sBAA4C"}
@@ -0,0 +1,41 @@
1
+ import type { GiovWidgetConfig } from "./types";
2
+ /**
3
+ * Who the visitor is talking to, as the web widget shows it (apps/widget-web/src/components/
4
+ * header-identity.ts): a person once one has taken over (their name and photo), otherwise the AI
5
+ * assistant while it answers (its own name and avatar), and the team title when neither is set up.
6
+ */
7
+ export type HeaderIdentityKind = "person" | "bot" | "team";
8
+ export interface HeaderIdentity {
9
+ kind: HeaderIdentityKind;
10
+ title: string;
11
+ avatar: string | null;
12
+ }
13
+ export declare function headerIdentity(config: Pick<GiovWidgetConfig, "title" | "botEnabled" | "botName" | "botAvatarUrl" | "avatarUrl">, currentAgentName?: string | null, currentAgentAvatar?: string | null): HeaderIdentity;
14
+ /** Only http(s) images are loaded; anything else falls back to the initial. */
15
+ export declare function safeImageUrl(value: unknown): string | null;
16
+ type IdentityInput = {
17
+ role: string;
18
+ isBot?: boolean;
19
+ isAutomated?: boolean;
20
+ senderName?: string | null;
21
+ };
22
+ /** The label above a bubble. AI delivery is also automated internally; the AI identity takes precedence. */
23
+ export declare function messageSenderLabel(message: IdentityInput, labels: {
24
+ botName?: string;
25
+ agentName?: string | null;
26
+ you: string;
27
+ automated: string;
28
+ agent: string;
29
+ }): string;
30
+ export type AgentTypingState = {
31
+ visible: boolean;
32
+ isBot?: boolean;
33
+ };
34
+ /** Only explicit server AI metadata may brand a typing indicator as the AI (as in the widget). */
35
+ export declare function reduceAgentTyping(current: AgentTypingState, event: {
36
+ type?: unknown;
37
+ role?: unknown;
38
+ isBot?: unknown;
39
+ }): AgentTypingState;
40
+ export {};
41
+ //# sourceMappingURL=identity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;AAC3D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,YAAY,GAAG,SAAS,GAAG,cAAc,GAAG,WAAW,CAAC,EACjG,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,EAChC,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,GACjC,cAAc,CAIhB;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAE1D;AAED,KAAK,aAAa,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE1G,4GAA4G;AAC5G,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrG,MAAM,CAKR;AAED,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAErE,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE;IAAE,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,gBAAgB,CAQzI"}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.headerIdentity = headerIdentity;
4
+ exports.safeImageUrl = safeImageUrl;
5
+ exports.messageSenderLabel = messageSenderLabel;
6
+ exports.reduceAgentTyping = reduceAgentTyping;
7
+ function headerIdentity(config, currentAgentName, currentAgentAvatar) {
8
+ if (currentAgentName)
9
+ return { kind: "person", title: currentAgentName, avatar: safeImageUrl(currentAgentAvatar) };
10
+ if (config.botEnabled && config.botName)
11
+ return { kind: "bot", title: config.botName, avatar: safeImageUrl(config.botAvatarUrl) };
12
+ return { kind: "team", title: config.title, avatar: safeImageUrl(config.avatarUrl) };
13
+ }
14
+ /** Only http(s) images are loaded; anything else falls back to the initial. */
15
+ function safeImageUrl(value) {
16
+ return typeof value === "string" && /^https?:\/\//i.test(value.trim()) ? value.trim() : null;
17
+ }
18
+ /** The label above a bubble. AI delivery is also automated internally; the AI identity takes precedence. */
19
+ function messageSenderLabel(message, labels) {
20
+ if (message.role !== "agent")
21
+ return labels.you;
22
+ if (message.isBot === true)
23
+ return labels.botName?.trim() || "GiovBot";
24
+ if (message.isAutomated === true)
25
+ return labels.automated;
26
+ return message.senderName?.trim() || labels.agentName?.trim() || labels.agent;
27
+ }
28
+ /** Only explicit server AI metadata may brand a typing indicator as the AI (as in the widget). */
29
+ function reduceAgentTyping(current, event) {
30
+ if (event.role !== "agent")
31
+ return current;
32
+ if (event.type === "typing")
33
+ return { visible: true, isBot: typeof event.isBot === "boolean" ? event.isBot : undefined };
34
+ if (event.type === "typing_end") {
35
+ if (typeof event.isBot === "boolean" && typeof current.isBot === "boolean" && event.isBot !== current.isBot)
36
+ return current;
37
+ return { visible: false };
38
+ }
39
+ return current;
40
+ }
41
+ //# sourceMappingURL=identity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";;AAcA,wCAQC;AAGD,oCAEC;AAKD,gDAQC;AAKD,8CAQC;AAvCD,SAAgB,cAAc,CAC5B,MAAiG,EACjG,gBAAgC,EAChC,kBAAkC;IAElC,IAAI,gBAAgB;QAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,YAAY,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACnH,IAAI,MAAM,CAA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EAAE,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IACzH,IAAI,KAAK,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;QAChC,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK;YAAE,OAAO,OAAO,CAAC;QAC5H,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAC5B,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type { GiovChatContact, GiovChatSession, GiovChatSessionStorage, GiovChatConnectionStatus, GiovMessage, GiovWidgetConfig, MessageHandler, RequestUserInfo, StatusHandler, } from "./types";
2
+ export { ChatClient, createConversation, DEFAULT_BASE_URL, fetchWidgetConfig, fetchConversationHistory, PUSH_TOKEN_PATH, SDK_VERSION, UPLOAD_TIMEOUT_MS, unregisterPushToken, } from "./client";
3
+ export type { ChatClientOptions, GiovConversationHistory, GiovPushOptions, GiovPushPlatform, GiovPushRegistration, GiovStreamEvent, GiovUploadResult, } from "./client";
4
+ export { Outbox, ACK_TIMEOUT_MS, MAX_SEND_FAILURES, MAX_MESSAGE_CHARS, clampMessage } from "./outbox";
5
+ export type { OutboxEntry, OutboxState } from "./outbox";
6
+ export { parseChatMarkdown, parseInline, plainText } from "./markdown";
7
+ export type { Block as ChatMarkdownBlock, InlineNode as ChatMarkdownInline } from "./markdown";
8
+ export { headerIdentity, messageSenderLabel, reduceAgentTyping } from "./identity";
9
+ export type { HeaderIdentity, HeaderIdentityKind, AgentTypingState } from "./identity";
10
+ export { DEFAULT_ATTACHMENT_POLICY, MAX_ATTACHED_FILES, SUPPORTED_ATTACHMENT_TYPES, normalizeAttachmentPolicy, validateAttachments, } from "./attachments";
11
+ export type { GiovAttachment, GiovAttachmentPolicy, GiovAttachmentPreview, GiovChatAttachmentPicker, GiovChatPickedFile, } from "./attachments";
12
+ export { GiovChat } from "./GiovChat";
13
+ export type { GiovChatProps, GiovChatHandle } from "./GiovChat";
14
+ export { useGiovChatUnreadCount } from "./unread";
15
+ export { GIOVCHAT_STRINGS, resolveLocale, resolveStrings } from "./i18n";
16
+ export type { GiovChatLocale, GiovChatStrings } from "./i18n";
17
+ export { GiovChatError } from "./errors";
18
+ export type { GiovChatErrorCode } from "./errors";
19
+ export type { GiovChatStyleOverrides, GiovChatTextStyle, GiovChatBackgroundStyle, } from "./styleOverrides";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,eAAe,EACf,eAAe,EACf,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACxB,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACtG,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvE,YAAY,EAAE,KAAK,IAAI,iBAAiB,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACnF,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EAClB,0BAA0B,EAC1B,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACzE,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,YAAY,EACV,sBAAsB,EACtB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GiovChatError = exports.resolveStrings = exports.resolveLocale = exports.GIOVCHAT_STRINGS = exports.useGiovChatUnreadCount = exports.GiovChat = exports.validateAttachments = exports.normalizeAttachmentPolicy = exports.SUPPORTED_ATTACHMENT_TYPES = exports.MAX_ATTACHED_FILES = exports.DEFAULT_ATTACHMENT_POLICY = exports.reduceAgentTyping = exports.messageSenderLabel = exports.headerIdentity = exports.plainText = exports.parseInline = exports.parseChatMarkdown = exports.clampMessage = exports.MAX_MESSAGE_CHARS = exports.MAX_SEND_FAILURES = exports.ACK_TIMEOUT_MS = exports.Outbox = exports.unregisterPushToken = exports.UPLOAD_TIMEOUT_MS = exports.SDK_VERSION = exports.PUSH_TOKEN_PATH = exports.fetchConversationHistory = exports.fetchWidgetConfig = exports.DEFAULT_BASE_URL = exports.createConversation = exports.ChatClient = void 0;
4
+ // Advanced / headless usage
5
+ var client_1 = require("./client");
6
+ Object.defineProperty(exports, "ChatClient", { enumerable: true, get: function () { return client_1.ChatClient; } });
7
+ Object.defineProperty(exports, "createConversation", { enumerable: true, get: function () { return client_1.createConversation; } });
8
+ Object.defineProperty(exports, "DEFAULT_BASE_URL", { enumerable: true, get: function () { return client_1.DEFAULT_BASE_URL; } });
9
+ Object.defineProperty(exports, "fetchWidgetConfig", { enumerable: true, get: function () { return client_1.fetchWidgetConfig; } });
10
+ Object.defineProperty(exports, "fetchConversationHistory", { enumerable: true, get: function () { return client_1.fetchConversationHistory; } });
11
+ Object.defineProperty(exports, "PUSH_TOKEN_PATH", { enumerable: true, get: function () { return client_1.PUSH_TOKEN_PATH; } });
12
+ Object.defineProperty(exports, "SDK_VERSION", { enumerable: true, get: function () { return client_1.SDK_VERSION; } });
13
+ Object.defineProperty(exports, "UPLOAD_TIMEOUT_MS", { enumerable: true, get: function () { return client_1.UPLOAD_TIMEOUT_MS; } });
14
+ Object.defineProperty(exports, "unregisterPushToken", { enumerable: true, get: function () { return client_1.unregisterPushToken; } });
15
+ var outbox_1 = require("./outbox");
16
+ Object.defineProperty(exports, "Outbox", { enumerable: true, get: function () { return outbox_1.Outbox; } });
17
+ Object.defineProperty(exports, "ACK_TIMEOUT_MS", { enumerable: true, get: function () { return outbox_1.ACK_TIMEOUT_MS; } });
18
+ Object.defineProperty(exports, "MAX_SEND_FAILURES", { enumerable: true, get: function () { return outbox_1.MAX_SEND_FAILURES; } });
19
+ Object.defineProperty(exports, "MAX_MESSAGE_CHARS", { enumerable: true, get: function () { return outbox_1.MAX_MESSAGE_CHARS; } });
20
+ Object.defineProperty(exports, "clampMessage", { enumerable: true, get: function () { return outbox_1.clampMessage; } });
21
+ var markdown_1 = require("./markdown");
22
+ Object.defineProperty(exports, "parseChatMarkdown", { enumerable: true, get: function () { return markdown_1.parseChatMarkdown; } });
23
+ Object.defineProperty(exports, "parseInline", { enumerable: true, get: function () { return markdown_1.parseInline; } });
24
+ Object.defineProperty(exports, "plainText", { enumerable: true, get: function () { return markdown_1.plainText; } });
25
+ var identity_1 = require("./identity");
26
+ Object.defineProperty(exports, "headerIdentity", { enumerable: true, get: function () { return identity_1.headerIdentity; } });
27
+ Object.defineProperty(exports, "messageSenderLabel", { enumerable: true, get: function () { return identity_1.messageSenderLabel; } });
28
+ Object.defineProperty(exports, "reduceAgentTyping", { enumerable: true, get: function () { return identity_1.reduceAgentTyping; } });
29
+ var attachments_1 = require("./attachments");
30
+ Object.defineProperty(exports, "DEFAULT_ATTACHMENT_POLICY", { enumerable: true, get: function () { return attachments_1.DEFAULT_ATTACHMENT_POLICY; } });
31
+ Object.defineProperty(exports, "MAX_ATTACHED_FILES", { enumerable: true, get: function () { return attachments_1.MAX_ATTACHED_FILES; } });
32
+ Object.defineProperty(exports, "SUPPORTED_ATTACHMENT_TYPES", { enumerable: true, get: function () { return attachments_1.SUPPORTED_ATTACHMENT_TYPES; } });
33
+ Object.defineProperty(exports, "normalizeAttachmentPolicy", { enumerable: true, get: function () { return attachments_1.normalizeAttachmentPolicy; } });
34
+ Object.defineProperty(exports, "validateAttachments", { enumerable: true, get: function () { return attachments_1.validateAttachments; } });
35
+ // Main component
36
+ var GiovChat_1 = require("./GiovChat");
37
+ Object.defineProperty(exports, "GiovChat", { enumerable: true, get: function () { return GiovChat_1.GiovChat; } });
38
+ var unread_1 = require("./unread");
39
+ Object.defineProperty(exports, "useGiovChatUnreadCount", { enumerable: true, get: function () { return unread_1.useGiovChatUnreadCount; } });
40
+ var i18n_1 = require("./i18n");
41
+ Object.defineProperty(exports, "GIOVCHAT_STRINGS", { enumerable: true, get: function () { return i18n_1.GIOVCHAT_STRINGS; } });
42
+ Object.defineProperty(exports, "resolveLocale", { enumerable: true, get: function () { return i18n_1.resolveLocale; } });
43
+ Object.defineProperty(exports, "resolveStrings", { enumerable: true, get: function () { return i18n_1.resolveStrings; } });
44
+ var errors_1 = require("./errors");
45
+ Object.defineProperty(exports, "GiovChatError", { enumerable: true, get: function () { return errors_1.GiovChatError; } });
46
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAaA,4BAA4B;AAC5B,mCAUkB;AAThB,oGAAA,UAAU,OAAA;AACV,4GAAA,kBAAkB,OAAA;AAClB,0GAAA,gBAAgB,OAAA;AAChB,2GAAA,iBAAiB,OAAA;AACjB,kHAAA,wBAAwB,OAAA;AACxB,yGAAA,eAAe,OAAA;AACf,qGAAA,WAAW,OAAA;AACX,2GAAA,iBAAiB,OAAA;AACjB,6GAAA,mBAAmB,OAAA;AAWrB,mCAAsG;AAA7F,gGAAA,MAAM,OAAA;AAAE,wGAAA,cAAc,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,sGAAA,YAAY,OAAA;AAEnF,uCAAuE;AAA9D,6GAAA,iBAAiB,OAAA;AAAE,uGAAA,WAAW,OAAA;AAAE,qGAAA,SAAS,OAAA;AAElD,uCAAmF;AAA1E,0GAAA,cAAc,OAAA;AAAE,8GAAA,kBAAkB,OAAA;AAAE,6GAAA,iBAAiB,OAAA;AAE9D,6CAMuB;AALrB,wHAAA,yBAAyB,OAAA;AACzB,iHAAA,kBAAkB,OAAA;AAClB,yHAAA,0BAA0B,OAAA;AAC1B,wHAAA,yBAAyB,OAAA;AACzB,kHAAA,mBAAmB,OAAA;AAUrB,iBAAiB;AACjB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAEjB,mCAAkD;AAAzC,gHAAA,sBAAsB,OAAA;AAC/B,+BAAyE;AAAhE,wGAAA,gBAAgB,OAAA;AAAE,qGAAA,aAAa,OAAA;AAAE,sGAAA,cAAc,OAAA;AAExD,mCAAyC;AAAhC,uGAAA,aAAa,OAAA"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Chat Markdown for the SDK: the grammar of the web widget's formatMessage (apps/widget-web/src/lib/
3
+ * formatMessage.ts, shared by the widget, Copilot and the web inbox), parsed into a tree that
4
+ * components/ChatMarkdown.tsx renders with native Text. The same parser as the Giov agent app.
5
+ * Paragraphs and line breaks, **bold**, *italic* or _italic_, ~~strike~~, <u>underline</u>, `code`,
6
+ * fenced code, # headings, - / * / + and 1. lists (one nested level), > quotes, --- rules,
7
+ * [links](https://…) and bare links. Only http(s)/mailto links get an href. Unfinished markup (while
8
+ * a reply streams in) stays as text until it is closed. Pure: no React.
9
+ */
10
+ export type InlineMarks = {
11
+ bold?: true;
12
+ italic?: true;
13
+ strike?: true;
14
+ underline?: true;
15
+ code?: true;
16
+ };
17
+ export type InlineNode = {
18
+ text: string;
19
+ marks: InlineMarks;
20
+ href?: string;
21
+ };
22
+ /** One visual line; lines in a paragraph, quote or list item are separated by line breaks. */
23
+ export type InlineLine = InlineNode[];
24
+ export type ListItem = {
25
+ lines: InlineLine[];
26
+ children: ListBlock[];
27
+ };
28
+ export type ListBlock = {
29
+ type: "list";
30
+ ordered: boolean;
31
+ start: number;
32
+ items: ListItem[];
33
+ };
34
+ export type Block = {
35
+ type: "paragraph";
36
+ lines: InlineLine[];
37
+ } | {
38
+ type: "heading";
39
+ content: InlineLine;
40
+ } | {
41
+ type: "code";
42
+ text: string;
43
+ } | {
44
+ type: "rule";
45
+ } | {
46
+ type: "quote";
47
+ lines: InlineLine[];
48
+ } | ListBlock;
49
+ /** Inline markup on one line, in the widget's order: code spans and links are cut out first. */
50
+ export declare function parseInline(text: string): InlineLine;
51
+ export declare function parseChatMarkdown(content: string): Block[];
52
+ /** Links are opened only for these schemes, whatever the text claims. */
53
+ export declare function isOpenableHref(href: string | undefined): href is string;
54
+ /** The words of a message without its markup, for screen-reader announcements. */
55
+ export declare function plainText(content: string): string;
56
+ //# sourceMappingURL=markdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../src/markdown.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,IAAI,CAAC;IAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AACvG,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,WAAW,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAC7E,8FAA8F;AAC9F,MAAM,MAAM,UAAU,GAAG,UAAU,EAAE,CAAC;AAEtC,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,UAAU,EAAE,CAAC;IAAC,QAAQ,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,QAAQ,EAAE,CAAA;CAAE,CAAC;AAC7F,MAAM,MAAM,KAAK,GACb;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,UAAU,EAAE,CAAA;CAAE,GAC1C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,UAAU,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9B;IAAE,IAAI,EAAE,MAAM,C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