@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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../src/components/MessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAU5C,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+FAA+F;IAC/F,oBAAoB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC/C,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IACzC,8FAA8F;IAC9F,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CAC5C;AAID,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,oBAA+B,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,kBAAkB,qBA6F9I"}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MessageBubble = MessageBubble;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const bubbleStyles_1 = require("./bubbleStyles");
7
+ const WidgetStyles_1 = require("./WidgetStyles");
8
+ const GiovBotMark_1 = require("./GiovBotMark");
9
+ const ChatMarkdown_1 = require("./ChatMarkdown");
10
+ const Attachments_1 = require("./Attachments");
11
+ const identity_1 = require("../identity");
12
+ const i18n_1 = require("../i18n");
13
+ const color_1 = require("../color");
14
+ const identity = (url) => url;
15
+ function MessageBubble({ message, primaryColor, dark, botName, resolveAttachmentUrl = identity, onRetry, onDiscard }) {
16
+ const custom = (0, WidgetStyles_1.useWidgetStyles)();
17
+ const strings = (0, i18n_1.useGiovChatStrings)();
18
+ const isVisitor = message.role === "visitor";
19
+ const isBot = message.role === "agent" && message.isBot === true;
20
+ const textStyle = isVisitor ? custom.visitorText : custom.agentText;
21
+ // Text on the brand colour is black or white by WCAG contrast; labels and times keep 4.5:1 on their bubble.
22
+ const bubbleColor = isVisitor ? custom.visitorBubble.backgroundColor ?? primaryColor : custom.agentBubble.backgroundColor ?? (dark ? "#242424" : "#f0f0f0");
23
+ const lightVisitor = isVisitor && (0, color_1.isLightBackground)(bubbleColor);
24
+ const textColor = isVisitor ? (0, color_1.textOn)(bubbleColor) : dark ? "#f0f0f0" : "#111";
25
+ const quietColor = (0, color_1.secondaryTextOn)(bubbleColor);
26
+ const failed = isVisitor && message.status === "failed";
27
+ const senderLabel = (0, identity_1.messageSenderLabel)(message, { botName, you: strings.you, automated: strings.automated, agent: strings.agent });
28
+ const time = new Date(message.createdAt).toLocaleTimeString([], {
29
+ hour: "2-digit",
30
+ minute: "2-digit",
31
+ });
32
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [bubbleStyles_1.bubbleStyles.wrapper, isVisitor ? bubbleStyles_1.bubbleStyles.right : bubbleStyles_1.bubbleStyles.left, isBot && bubbleStyles_1.bubbleStyles.assistantRow], children: [isBot && (0, jsx_runtime_1.jsx)(GiovBotMark_1.GiovBotMark, {}), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [
33
+ bubbleStyles_1.bubbleStyles.bubble,
34
+ isVisitor
35
+ ? [bubbleStyles_1.bubbleStyles.visitorBubble, { backgroundColor: primaryColor }]
36
+ : [bubbleStyles_1.bubbleStyles.agentBubble, dark && bubbleStyles_1.bubbleStyles.agentBubbleDark],
37
+ isVisitor ? custom.visitorBubble : custom.agentBubble,
38
+ message.status === "sending" && { opacity: 0.75 },
39
+ ], accessibilityState: message.isStreaming ? { busy: true } : undefined, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
40
+ bubbleStyles_1.bubbleStyles.sender,
41
+ { color: quietColor },
42
+ textStyle,
43
+ ], children: senderLabel }), message.attachments?.length ? ((0, jsx_runtime_1.jsx)(Attachments_1.AttachmentList, { attachments: message.attachments, resolveUrl: resolveAttachmentUrl, dark: isVisitor ? !lightVisitor : dark, textColor: typeof textStyle.color === "string" ? textStyle.color : textColor })) : null, message.content ? ((0, jsx_runtime_1.jsx)(ChatMarkdown_1.ChatMarkdown, { content: message.content, textStyle: [bubbleStyles_1.bubbleStyles.content, { color: textColor }, textStyle], accentColor: isVisitor ? (lightVisitor ? "rgba(0,0,0,0.35)" : "rgba(255,255,255,0.5)") : dark ? "rgba(255,255,255,0.3)" : "rgba(0,0,0,0.2)", codeBackground: isVisitor ? (lightVisitor ? "rgba(0,0,0,0.08)" : "rgba(255,255,255,0.18)") : dark ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.06)" })) : null, !message.isStreaming && ((0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [
44
+ bubbleStyles_1.bubbleStyles.timestamp,
45
+ { color: quietColor },
46
+ textStyle,
47
+ ], children: message.status === "sending" ? strings.sending : time }))] }), failed && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { flexDirection: "row", alignItems: "center", gap: 12, marginTop: 4 }, children: [(0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: onRetry ? () => onRetry(message) : undefined, disabled: !onRetry, accessibilityRole: "button", accessibilityLabel: `${strings.notSent}. ${strings.tapToRetry}`, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: (0, jsx_runtime_1.jsxs)(react_native_1.Text, { style: { color: "#dc2626", fontSize: 12 }, children: [strings.notSent, onRetry ? ` · ${strings.tapToRetry}` : ""] }) }), onDiscard && ((0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { onPress: () => onDiscard(message), accessibilityRole: "button", accessibilityLabel: strings.discard, hitSlop: { top: 8, bottom: 8, left: 8, right: 8 }, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: { color: dark ? "#999" : "#666", fontSize: 12 }, children: strings.discard }) }))] }))] }));
48
+ }
49
+ //# sourceMappingURL=MessageBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.js","sourceRoot":"","sources":["../../src/components/MessageBubble.tsx"],"names":[],"mappings":";;AA2BA,sCA6FC;;AAvHD,+CAA4D;AAE5D,iDAAmD;AACnD,iDAAiD;AACjD,+CAA4C;AAC5C,iDAA8C;AAC9C,+CAA+C;AAC/C,0CAAiD;AACjD,kCAA6C;AAC7C,oCAAsE;AAetE,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,GAAG,CAAC;AAEtC,SAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,GAAG,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAsB;IAC7I,MAAM,MAAM,GAAG,IAAA,8BAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACrC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC;IAC7C,MAAM,KAAK,GAAG,OAAO,CAAC,IAAI,KAAK,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,IAAI,CAAC;IACjE,MAAM,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC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C,mBAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,aAC5C,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,IACtD,GACU,EAClB,SAAS,IAAI,CACZ,uBAAC,+BAAgB,IACf,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EACjC,iBAAiB,EAAC,QAAQ,EAC1B,kBAAkB,EAAE,OAAO,CAAC,OAAO,EACnC,OAAO,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,YAEjD,uBAAC,mBAAI,IAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,YAAG,OAAO,CAAC,OAAO,GAAQ,GACrE,CACpB,IACI,CACR,IACI,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import type { GiovChatContact, RequestUserInfo } from "../types";
3
+ export interface PreChatFormProps {
4
+ fields: RequestUserInfo;
5
+ primaryColor: string;
6
+ dark: boolean;
7
+ initialValues?: GiovChatContact;
8
+ onSubmit: (info: GiovChatContact) => void;
9
+ }
10
+ export declare function PreChatForm({ fields, primaryColor, dark, initialValues, onSubmit, }: PreChatFormProps): React.JSX.Element;
11
+ //# sourceMappingURL=PreChatForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreChatForm.d.ts","sourceRoot":"","sources":["../../src/components/PreChatForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AASxC,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKjE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,eAAe,CAAC;IAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CAC3C;AAID,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,aAAa,EACb,QAAQ,GACT,EAAE,gBAAgB,qBAiIlB"}
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreChatForm = PreChatForm;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const react_native_1 = require("react-native");
7
+ const WidgetStyles_1 = require("./WidgetStyles");
8
+ const i18n_1 = require("../i18n");
9
+ const color_1 = require("../color");
10
+ const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
11
+ function PreChatForm({ fields, primaryColor, dark, initialValues, onSubmit, }) {
12
+ const custom = (0, WidgetStyles_1.useWidgetStyles)();
13
+ const strings = (0, i18n_1.useGiovChatStrings)();
14
+ const [firstName, setFirstName] = (0, react_1.useState)(initialValues?.firstName ?? "");
15
+ const [lastName, setLastName] = (0, react_1.useState)(initialValues?.lastName ?? "");
16
+ const [email, setEmail] = (0, react_1.useState)(initialValues?.email ?? "");
17
+ const [phone, setPhone] = (0, react_1.useState)(initialValues?.phone ?? "");
18
+ const bg = dark ? "#111" : "#fff";
19
+ const textColor = dark ? "#f0f0f0" : "#111";
20
+ const labelColor = dark ? "#aaa" : "#555";
21
+ const inputBg = dark ? "#1c1c1c" : "#fafafa";
22
+ const inputBorder = dark ? "#333" : "#e5e5e5";
23
+ const placeholderColor = custom.hint.color ?? (dark ? "#555" : "#c0c0c0");
24
+ const isValid = (!fields.firstName || firstName.trim().length > 0) &&
25
+ (!fields.lastName || lastName.trim().length > 0) &&
26
+ (!fields.email || EMAIL_RE.test(email.trim())) &&
27
+ (!fields.phone || phone.trim().length > 0);
28
+ const handleSubmit = () => {
29
+ if (!isValid)
30
+ return;
31
+ onSubmit({
32
+ firstName: firstName.trim() || undefined,
33
+ lastName: lastName.trim() || undefined,
34
+ email: email.trim() || undefined,
35
+ phone: phone.trim() || undefined,
36
+ });
37
+ };
38
+ const inputStyle = [
39
+ styles.input,
40
+ { color: textColor, backgroundColor: inputBg, borderColor: inputBorder },
41
+ custom.input,
42
+ ];
43
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.ScrollView, { style: [styles.scroll, { backgroundColor: bg }, custom.form], contentContainerStyle: styles.content, keyboardShouldPersistTaps: "handled", children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.heading, { color: textColor }, custom.formTitle], children: strings.preChatTitle }), fields.firstName && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.field, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color: labelColor }, custom.label], children: strings.required(strings.firstName) }), (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: inputStyle, value: firstName, accessibilityLabel: strings.required(strings.firstName), onChangeText: setFirstName, placeholder: strings.firstName, placeholderTextColor: placeholderColor, autoCapitalize: "words", autoCorrect: false, returnKeyType: "next" })] })), fields.lastName && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.field, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color: labelColor }, custom.label], children: strings.required(strings.lastName) }), (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: inputStyle, value: lastName, accessibilityLabel: strings.required(strings.lastName), onChangeText: setLastName, placeholder: strings.lastName, placeholderTextColor: placeholderColor, autoCapitalize: "words", autoCorrect: false, returnKeyType: "next" })] })), fields.email && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.field, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color: labelColor }, custom.label], children: strings.required(strings.email) }), (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: inputStyle, value: email, accessibilityLabel: strings.required(strings.email), onChangeText: setEmail, placeholder: "you@example.com", placeholderTextColor: placeholderColor, keyboardType: "email-address", autoCapitalize: "none", autoCorrect: false, returnKeyType: "next" })] })), fields.phone && ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.field, children: [(0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.label, { color: labelColor }, custom.label], children: strings.required(strings.phone) }), (0, jsx_runtime_1.jsx)(react_native_1.TextInput, { style: inputStyle, value: phone, accessibilityLabel: strings.required(strings.phone), onChangeText: setPhone, placeholder: "+1 555 000 0000", placeholderTextColor: placeholderColor, keyboardType: "phone-pad", returnKeyType: "done" })] })), (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, { style: [
44
+ styles.submitBtn,
45
+ { backgroundColor: primaryColor },
46
+ custom.button,
47
+ !isValid && styles.submitBtnDisabled,
48
+ ], onPress: handleSubmit, disabled: !isValid, accessibilityRole: "button", accessibilityLabel: strings.startChat, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.submitBtnText, { color: (0, color_1.textOn)(custom.button.backgroundColor ?? primaryColor) }, custom.buttonText], children: strings.startChat }) })] }));
49
+ }
50
+ const styles = react_native_1.StyleSheet.create({
51
+ scroll: { flex: 1 },
52
+ content: { padding: 20, flexGrow: 1 },
53
+ heading: { fontSize: 18, fontWeight: "700", marginBottom: 24 },
54
+ field: { marginBottom: 16 },
55
+ label: { fontSize: 13, fontWeight: "600", marginBottom: 6 },
56
+ input: {
57
+ borderWidth: 1,
58
+ borderRadius: 10,
59
+ paddingHorizontal: 14,
60
+ paddingVertical: 11,
61
+ fontSize: 14,
62
+ },
63
+ submitBtn: {
64
+ borderRadius: 10,
65
+ paddingVertical: 14,
66
+ alignItems: "center",
67
+ marginTop: 8,
68
+ },
69
+ submitBtnDisabled: { opacity: 0.45 },
70
+ submitBtnText: { color: "#fff", fontWeight: "700", fontSize: 15 },
71
+ });
72
+ //# sourceMappingURL=PreChatForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreChatForm.js","sourceRoot":"","sources":["../../src/components/PreChatForm.tsx"],"names":[],"mappings":";;AAwBA,kCAuIC;;AA/JD,iCAAwC;AACxC,+CAOsB;AAEtB,iDAAiD;AACjD,kCAA6C;AAC7C,oCAAkC;AAUlC,MAAM,QAAQ,GAAG,4BAA4B,CAAC;AAE9C,SAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,YAAY,EACZ,IAAI,EACJ,aAAa,EACb,QAAQ,GACS;IACjB,MAAM,MAAM,GAAG,IAAA,8BAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACrC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,aAAa,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;IAC3E,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,aAAa,EAAE,QAAQ,IAAI,EAAE,CAAC,CAAC;IACxE,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAC/D,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAAC,aAAa,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;IAE/D,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAClC,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,OAAO,GAAG,IAAI,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ACL,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,EAAE;KACb;IACD,SAAS,EAAE;QACT,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;QACnB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,CAAC;KACb;IACD,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACpC,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;CAClE,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export interface TypingIndicatorProps {
3
+ dark: boolean;
4
+ /** Only explicit server AI identity enables the AI mark. */
5
+ isBot?: boolean;
6
+ botName?: string;
7
+ }
8
+ export declare function TypingIndicator({ dark, isBot, botName }: TypingIndicatorProps): React.JSX.Element;
9
+ //# sourceMappingURL=TypingIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypingIndicator.d.ts","sourceRoot":"","sources":["../../src/components/TypingIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,oBAAoB,qBAmB7E"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TypingIndicator = TypingIndicator;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_native_1 = require("react-native");
6
+ const bubbleStyles_1 = require("./bubbleStyles");
7
+ const WidgetStyles_1 = require("./WidgetStyles");
8
+ const GiovBotMark_1 = require("./GiovBotMark");
9
+ const i18n_1 = require("../i18n");
10
+ function TypingIndicator({ dark, isBot, botName }) {
11
+ const custom = (0, WidgetStyles_1.useWidgetStyles)();
12
+ const strings = (0, i18n_1.useGiovChatStrings)();
13
+ const isAI = isBot === true;
14
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.View, { style: [bubbleStyles_1.bubbleStyles.wrapper, bubbleStyles_1.bubbleStyles.left, isAI && bubbleStyles_1.bubbleStyles.assistantRow],
15
+ // One element, so screen readers say the label instead of the dots (iOS ignores a label otherwise).
16
+ accessible: true, accessibilityLabel: isAI ? strings.botTyping(botName?.trim() || "GiovBot") : strings.teamTyping, children: [isAI && (0, jsx_runtime_1.jsx)(GiovBotMark_1.GiovBotMark, {}), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: [bubbleStyles_1.bubbleStyles.bubble, bubbleStyles_1.bubbleStyles.agentBubble, dark && bubbleStyles_1.bubbleStyles.agentBubbleDark, custom.agentBubble], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [{ color: dark ? "#666" : "#aaa", fontSize: 20, letterSpacing: 4 }, custom.agentText], children: "\u2022 \u2022 \u2022" }) })] }));
17
+ }
18
+ //# sourceMappingURL=TypingIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TypingIndicator.js","sourceRoot":"","sources":["../../src/components/TypingIndicator.tsx"],"names":[],"mappings":";;AAcA,0CAmBC;;AAhCD,+CAA0C;AAC1C,iDAAmD;AACnD,iDAAiD;AACjD,+CAA4C;AAC5C,kCAA6C;AAS7C,SAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAwB;IAC5E,MAAM,MAAM,GAAG,IAAA,8BAAe,GAAE,CAAC;IACjC,MAAM,OAAO,GAAG,IAAA,yBAAkB,GAAE,CAAC;IACrC,MAAM,IAAI,GAAG,KAAK,KAAK,IAAI,CAAC;IAC5B,OAAO,CACL,wBAAC,mBAAI,IACH,KAAK,EAAE,CAAC,2BAAC,CAAC,OAAO,EAAE,2BAAC,CAAC,IAAI,EAAE,IAAI,IAAI,2BAAC,CAAC,YAAY,CAAC;QAClD,oGAAoG;QACpG,UAAU,QACV,kBAAkB,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,aAE9F,IAAI,IAAI,uBAAC,yBAAW,KAAG,EACxB,uBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,2BAAC,CAAC,MAAM,EAAE,2BAAC,CAAC,WAAW,EAAE,IAAI,IAAI,2BAAC,CAAC,eAAe,EAAE,MAAM,CAAC,WAAW,CAAC,YACnF,uBAAC,mBAAI,IAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,CAAC,SAAS,CAAC,qCAE3F,GACF,IACF,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const WidgetStylesContext: import("react").Context<import("../styleOverrides").ResolvedWidgetStyles>;
2
+ export declare const useWidgetStyles: () => import("../styleOverrides").ResolvedWidgetStyles;
3
+ //# sourceMappingURL=WidgetStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetStyles.d.ts","sourceRoot":"","sources":["../../src/components/WidgetStyles.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,2EAAkD,CAAC;AACnF,eAAO,MAAM,eAAe,wDAAwC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWidgetStyles = exports.WidgetStylesContext = void 0;
4
+ const react_1 = require("react");
5
+ const styleOverrides_1 = require("../styleOverrides");
6
+ exports.WidgetStylesContext = (0, react_1.createContext)((0, styleOverrides_1.resolveStyleOverrides)(undefined));
7
+ const useWidgetStyles = () => (0, react_1.useContext)(exports.WidgetStylesContext);
8
+ exports.useWidgetStyles = useWidgetStyles;
9
+ //# sourceMappingURL=WidgetStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WidgetStyles.js","sourceRoot":"","sources":["../../src/components/WidgetStyles.tsx"],"names":[],"mappings":";;;AAAA,iCAAkD;AAClD,sDAA0D;AAE7C,QAAA,mBAAmB,GAAG,IAAA,qBAAa,EAAC,IAAA,sCAAqB,EAAC,SAAS,CAAC,CAAC,CAAC;AAC5E,MAAM,eAAe,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,2BAAmB,CAAC,CAAC;AAAxD,QAAA,eAAe,mBAAyC"}
@@ -0,0 +1,47 @@
1
+ /** Shared styles for chat bubble components. */
2
+ export declare const bubbleStyles: {
3
+ wrapper: {
4
+ marginHorizontal: number;
5
+ marginBottom: number;
6
+ };
7
+ right: {
8
+ alignItems: "flex-end";
9
+ };
10
+ left: {
11
+ alignItems: "flex-start";
12
+ };
13
+ assistantRow: {
14
+ flexDirection: "row";
15
+ gap: number;
16
+ };
17
+ bubble: {
18
+ maxWidth: "78%";
19
+ borderRadius: number;
20
+ padding: number;
21
+ };
22
+ visitorBubble: {
23
+ borderBottomRightRadius: number;
24
+ };
25
+ agentBubble: {
26
+ backgroundColor: string;
27
+ borderBottomLeftRadius: number;
28
+ };
29
+ agentBubbleDark: {
30
+ backgroundColor: string;
31
+ };
32
+ sender: {
33
+ fontSize: number;
34
+ fontWeight: "600";
35
+ marginBottom: number;
36
+ };
37
+ content: {
38
+ fontSize: number;
39
+ lineHeight: number;
40
+ };
41
+ timestamp: {
42
+ fontSize: number;
43
+ marginTop: number;
44
+ textAlign: "right";
45
+ };
46
+ };
47
+ //# sourceMappingURL=bubbleStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubbleStyles.d.ts","sourceRoot":"","sources":["../../src/components/bubbleStyles.ts"],"names":[],"mappings":"AAEA,gDAAgD;AAChD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.bubbleStyles = void 0;
4
+ const react_native_1 = require("react-native");
5
+ /** Shared styles for chat bubble components. */
6
+ exports.bubbleStyles = react_native_1.StyleSheet.create({
7
+ wrapper: { marginHorizontal: 16, marginBottom: 8 },
8
+ right: { alignItems: "flex-end" },
9
+ left: { alignItems: "flex-start" },
10
+ assistantRow: { flexDirection: "row", gap: 8 },
11
+ bubble: { maxWidth: "78%", borderRadius: 16, padding: 12 },
12
+ visitorBubble: { borderBottomRightRadius: 4 },
13
+ agentBubble: { backgroundColor: "#f0f0f0", borderBottomLeftRadius: 4 },
14
+ agentBubbleDark: { backgroundColor: "#242424" },
15
+ sender: { fontSize: 11, fontWeight: "600", marginBottom: 3 },
16
+ content: { fontSize: 14, lineHeight: 20 },
17
+ timestamp: { fontSize: 10, marginTop: 4, textAlign: "right" },
18
+ });
19
+ //# sourceMappingURL=bubbleStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubbleStyles.js","sourceRoot":"","sources":["../../src/components/bubbleStyles.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAE1C,gDAAgD;AACnC,QAAA,YAAY,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;IAClD,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE;IACjC,IAAI,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE;IAClC,YAAY,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE;IAC9C,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1D,aAAa,EAAE,EAAE,uBAAuB,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,sBAAsB,EAAE,CAAC,EAAE;IACtE,eAAe,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IAC/C,MAAM,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE;IAC5D,OAAO,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACzC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE;CAC9D,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export { Header } from "./Header";
2
+ export type { HeaderProps } from "./Header";
3
+ export { MessageBubble } from "./MessageBubble";
4
+ export type { MessageBubbleProps } from "./MessageBubble";
5
+ export { GreetingBubble } from "./GreetingBubble";
6
+ export type { GreetingBubbleProps } from "./GreetingBubble";
7
+ export { TypingIndicator } from "./TypingIndicator";
8
+ export type { TypingIndicatorProps } from "./TypingIndicator";
9
+ export { PreChatForm } from "./PreChatForm";
10
+ export type { PreChatFormProps } from "./PreChatForm";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreChatForm = exports.TypingIndicator = exports.GreetingBubble = exports.MessageBubble = exports.Header = void 0;
4
+ var Header_1 = require("./Header");
5
+ Object.defineProperty(exports, "Header", { enumerable: true, get: function () { return Header_1.Header; } });
6
+ var MessageBubble_1 = require("./MessageBubble");
7
+ Object.defineProperty(exports, "MessageBubble", { enumerable: true, get: function () { return MessageBubble_1.MessageBubble; } });
8
+ var GreetingBubble_1 = require("./GreetingBubble");
9
+ Object.defineProperty(exports, "GreetingBubble", { enumerable: true, get: function () { return GreetingBubble_1.GreetingBubble; } });
10
+ var TypingIndicator_1 = require("./TypingIndicator");
11
+ Object.defineProperty(exports, "TypingIndicator", { enumerable: true, get: function () { return TypingIndicator_1.TypingIndicator; } });
12
+ var PreChatForm_1 = require("./PreChatForm");
13
+ Object.defineProperty(exports, "PreChatForm", { enumerable: true, get: function () { return PreChatForm_1.PreChatForm; } });
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,mCAAkC;AAAzB,gGAAA,MAAM,OAAA;AAGf,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAGtB,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAGvB,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AAGxB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA"}
@@ -0,0 +1,18 @@
1
+ export type GiovChatErrorCode = "network" | "timeout" | "invalid_response" | "invalid_session" | "conversation_closed" | "connection_failed" | "disconnected" | "send_failed" | "upload_failed" | "workspace_busy" | "storage" | "server"
2
+ /** `401 invalid_user_hash`: the workspace requires a signed identity and `userHash` is wrong or missing. */
3
+ | "identity_rejected"
4
+ /** `429 rate_limited`: wait `retryAfterSeconds` before trying again. */
5
+ | "rate_limited";
6
+ export declare class GiovChatError extends Error {
7
+ readonly code: GiovChatErrorCode;
8
+ readonly status?: number | undefined;
9
+ /** From `Retry-After` on `429` and `503` answers, in seconds. */
10
+ readonly retryAfterSeconds?: number | undefined;
11
+ constructor(code: GiovChatErrorCode, message: string, status?: number | undefined,
12
+ /** From `Retry-After` on `429` and `503` answers, in seconds. */
13
+ retryAfterSeconds?: number | undefined);
14
+ }
15
+ export declare function chatError(error: unknown): GiovChatError;
16
+ /** `Retry-After` in seconds (the protocol never sends a date); undefined when absent or malformed. */
17
+ export declare function retryAfterSeconds(value: string | null | undefined): number | undefined;
18
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GACzB,SAAS,GAAG,SAAS,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,qBAAqB,GACtF,mBAAmB,GAAG,cAAc,GAAG,aAAa,GAAG,eAAe,GAAG,gBAAgB,GAAG,SAAS,GAAG,QAAQ;AAClH,4GAA4G;GAC1G,mBAAmB;AACrB,wEAAwE;GACtE,cAAc,CAAC;AAEnB,qBAAa,aAAc,SAAQ,KAAK;aAEpB,IAAI,EAAE,iBAAiB;aAEvB,MAAM,CAAC,EAAE,MAAM;IAC/B,iEAAiE;aACjD,iBAAiB,CAAC,EAAE,MAAM;gBAJ1B,IAAI,EAAE,iBAAiB,EACvC,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,MAAM,YAAA;IAC/B,iEAAiE;IACjD,iBAAiB,CAAC,EAAE,MAAM,YAAA;CAK7C;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,CAEvD;AAED,sGAAsG;AACtG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAGtF"}
package/dist/errors.js ADDED
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GiovChatError = void 0;
4
+ exports.chatError = chatError;
5
+ exports.retryAfterSeconds = retryAfterSeconds;
6
+ class GiovChatError extends Error {
7
+ constructor(code, message, status,
8
+ /** From `Retry-After` on `429` and `503` answers, in seconds. */
9
+ retryAfterSeconds) {
10
+ super(message);
11
+ this.code = code;
12
+ this.status = status;
13
+ this.retryAfterSeconds = retryAfterSeconds;
14
+ this.name = "GiovChatError";
15
+ }
16
+ }
17
+ exports.GiovChatError = GiovChatError;
18
+ function chatError(error) {
19
+ return error instanceof GiovChatError ? error : new GiovChatError("network", "Unable to reach chat. Please try again.");
20
+ }
21
+ /** `Retry-After` in seconds (the protocol never sends a date); undefined when absent or malformed. */
22
+ function retryAfterSeconds(value) {
23
+ const seconds = Number(value?.trim());
24
+ return value?.trim() && Number.isFinite(seconds) && seconds >= 0 ? Math.min(seconds, 3600) : undefined;
25
+ }
26
+ //# sourceMappingURL=errors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAqBA,8BAEC;AAGD,8CAGC;AArBD,MAAa,aAAc,SAAQ,KAAK;IACtC,YACkB,IAAuB,EACvC,OAAe,EACC,MAAe;IAC/B,iEAAiE;IACjD,iBAA0B;QAE1C,KAAK,CAAC,OAAO,CAAC,CAAC;QANC,SAAI,GAAJ,IAAI,CAAmB;QAEvB,WAAM,GAAN,MAAM,CAAS;QAEf,sBAAiB,GAAjB,iBAAiB,CAAS;QAG1C,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF;AAXD,sCAWC;AAED,SAAgB,SAAS,CAAC,KAAc;IACtC,OAAO,KAAK,YAAY,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,aAAa,CAAC,SAAS,EAAE,yCAAyC,CAAC,CAAC;AAC1H,CAAC;AAED,sGAAsG;AACtG,SAAgB,iBAAiB,CAAC,KAAgC;IAChE,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACtC,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACzG,CAAC"}
package/dist/i18n.d.ts ADDED
@@ -0,0 +1,73 @@
1
+ /**
2
+ * The SDK's own interface text in the five languages the Giov dashboard ships. Text the business
3
+ * writes (greeting, placeholder, bot name) comes from the widget configuration and is not translated.
4
+ * Hosts pick the language with the `locale` prop (default: the device language) and can replace any
5
+ * string with `strings`.
6
+ */
7
+ export interface GiovChatStrings {
8
+ loading: string;
9
+ tryAgain: string;
10
+ retry: string;
11
+ closeChat: string;
12
+ /** The header menu button. */
13
+ menu: string;
14
+ /** The header menu's link to the workspace's privacy policy, as in the web widget. */
15
+ privacyPolicy: string;
16
+ /** Spoken when a reply arrives: who wrote it and what they wrote. */
17
+ newMessage: (sender: string, text: string) => string;
18
+ connecting: string;
19
+ reconnecting: string;
20
+ statusPerson: string;
21
+ statusBot: string;
22
+ statusTeam: string;
23
+ composerPlaceholder: string;
24
+ messageInput: string;
25
+ sendMessage: string;
26
+ attachFile: string;
27
+ removeAttachment: (name: string) => string;
28
+ you: string;
29
+ agent: string;
30
+ automated: string;
31
+ botTyping: (name: string) => string;
32
+ teamTyping: string;
33
+ sending: string;
34
+ notSent: string;
35
+ tapToRetry: string;
36
+ /** On a message that was not sent, to drop it. */
37
+ discard: string;
38
+ uploading: (percent: number) => string;
39
+ uploadFailed: string;
40
+ /** Errors, by kind; the SDK never shows raw server text. */
41
+ sessionExpired: string;
42
+ conversationEnded: string;
43
+ unavailable: string;
44
+ sendFailed: string;
45
+ busy: string;
46
+ attachmentsOff: string;
47
+ typeNotAllowed: (name: string) => string;
48
+ fileTooLarge: (name: string, maxMb: number) => string;
49
+ tooManyFiles: (max: number) => string;
50
+ openAttachment: (name: string) => string;
51
+ attachment: string;
52
+ image: string;
53
+ /** In place of an image that could not load (it loads again once its link is renewed). */
54
+ imageUnavailable: string;
55
+ preChatTitle: string;
56
+ firstName: string;
57
+ lastName: string;
58
+ email: string;
59
+ phone: string;
60
+ required: (label: string) => string;
61
+ startChat: string;
62
+ }
63
+ export type GiovChatLocale = "en" | "fr" | "es" | "pt" | "de";
64
+ export declare const GIOVCHAT_STRINGS: Readonly<Record<GiovChatLocale, GiovChatStrings>>;
65
+ /** "fr-CA" → "fr", "pt_BR" → "pt"; anything not shipped falls back to English. */
66
+ export declare function resolveLocale(value: string | null | undefined): GiovChatLocale;
67
+ /** The device language from Intl (Hermes and JSC both ship it), with no native module. */
68
+ export declare function deviceLocale(): string;
69
+ /** The strings for a locale with the host's overrides on top; malformed overrides are ignored. */
70
+ export declare function resolveStrings(locale?: string | null, overrides?: Partial<GiovChatStrings> | null): GiovChatStrings;
71
+ export declare const GiovChatStringsContext: import("react").Context<GiovChatStrings>;
72
+ export declare const useGiovChatStrings: () => GiovChatStrings;
73
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,M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