@giovchat/react-native 0.0.0-stage → 0.3.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 (163) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +390 -2
  3. package/dist/GiovChat.d.ts +135 -0
  4. package/dist/GiovChat.d.ts.map +1 -0
  5. package/dist/GiovChat.js +294 -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/brandingStyle.d.ts +38 -0
  16. package/dist/brandingStyle.d.ts.map +1 -0
  17. package/dist/brandingStyle.js +71 -0
  18. package/dist/brandingStyle.js.map +1 -0
  19. package/dist/client.d.ts +226 -0
  20. package/dist/client.d.ts.map +1 -0
  21. package/dist/client.js +891 -0
  22. package/dist/client.js.map +1 -0
  23. package/dist/color.d.ts +25 -0
  24. package/dist/color.d.ts.map +1 -0
  25. package/dist/color.js +78 -0
  26. package/dist/color.js.map +1 -0
  27. package/dist/components/Attachments.d.ts +13 -0
  28. package/dist/components/Attachments.d.ts.map +1 -0
  29. package/dist/components/Attachments.js +42 -0
  30. package/dist/components/Attachments.js.map +1 -0
  31. package/dist/components/Branding.d.ts +29 -0
  32. package/dist/components/Branding.d.ts.map +1 -0
  33. package/dist/components/Branding.js +71 -0
  34. package/dist/components/Branding.js.map +1 -0
  35. package/dist/components/ChatMarkdown.d.ts +15 -0
  36. package/dist/components/ChatMarkdown.d.ts.map +1 -0
  37. package/dist/components/ChatMarkdown.js +72 -0
  38. package/dist/components/ChatMarkdown.js.map +1 -0
  39. package/dist/components/GiovBotMark.d.ts +6 -0
  40. package/dist/components/GiovBotMark.d.ts.map +1 -0
  41. package/dist/components/GiovBotMark.js +11 -0
  42. package/dist/components/GiovBotMark.js.map +1 -0
  43. package/dist/components/GreetingBubble.d.ts +7 -0
  44. package/dist/components/GreetingBubble.d.ts.map +1 -0
  45. package/dist/components/GreetingBubble.js +12 -0
  46. package/dist/components/GreetingBubble.js.map +1 -0
  47. package/dist/components/Header.d.ts +18 -0
  48. package/dist/components/Header.d.ts.map +1 -0
  49. package/dist/components/Header.js +67 -0
  50. package/dist/components/Header.js.map +1 -0
  51. package/dist/components/MessageBubble.d.ts +23 -0
  52. package/dist/components/MessageBubble.d.ts.map +1 -0
  53. package/dist/components/MessageBubble.js +51 -0
  54. package/dist/components/MessageBubble.js.map +1 -0
  55. package/dist/components/PreChatForm.d.ts +11 -0
  56. package/dist/components/PreChatForm.d.ts.map +1 -0
  57. package/dist/components/PreChatForm.js +72 -0
  58. package/dist/components/PreChatForm.js.map +1 -0
  59. package/dist/components/RatingCard.d.ts +23 -0
  60. package/dist/components/RatingCard.d.ts.map +1 -0
  61. package/dist/components/RatingCard.js +107 -0
  62. package/dist/components/RatingCard.js.map +1 -0
  63. package/dist/components/TypingIndicator.d.ts +9 -0
  64. package/dist/components/TypingIndicator.d.ts.map +1 -0
  65. package/dist/components/TypingIndicator.js +18 -0
  66. package/dist/components/TypingIndicator.js.map +1 -0
  67. package/dist/components/WidgetStyles.d.ts +3 -0
  68. package/dist/components/WidgetStyles.d.ts.map +1 -0
  69. package/dist/components/WidgetStyles.js +9 -0
  70. package/dist/components/WidgetStyles.js.map +1 -0
  71. package/dist/components/bubbleStyles.d.ts +47 -0
  72. package/dist/components/bubbleStyles.d.ts.map +1 -0
  73. package/dist/components/bubbleStyles.js +19 -0
  74. package/dist/components/bubbleStyles.js.map +1 -0
  75. package/dist/components/index.d.ts +11 -0
  76. package/dist/components/index.d.ts.map +1 -0
  77. package/dist/components/index.js +14 -0
  78. package/dist/components/index.js.map +1 -0
  79. package/dist/errors.d.ts +20 -0
  80. package/dist/errors.d.ts.map +1 -0
  81. package/dist/errors.js +26 -0
  82. package/dist/errors.js.map +1 -0
  83. package/dist/i18n.d.ts +96 -0
  84. package/dist/i18n.d.ts.map +1 -0
  85. package/dist/i18n.js +392 -0
  86. package/dist/i18n.js.map +1 -0
  87. package/dist/identity.d.ts +41 -0
  88. package/dist/identity.d.ts.map +1 -0
  89. package/dist/identity.js +41 -0
  90. package/dist/identity.js.map +1 -0
  91. package/dist/index.d.ts +30 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/index.js +64 -0
  94. package/dist/index.js.map +1 -0
  95. package/dist/markdown.d.ts +56 -0
  96. package/dist/markdown.d.ts.map +1 -0
  97. package/dist/markdown.js +219 -0
  98. package/dist/markdown.js.map +1 -0
  99. package/dist/outbox.d.ts +68 -0
  100. package/dist/outbox.d.ts.map +1 -0
  101. package/dist/outbox.js +168 -0
  102. package/dist/outbox.js.map +1 -0
  103. package/dist/protocol.d.ts +9 -0
  104. package/dist/protocol.d.ts.map +1 -0
  105. package/dist/protocol.js +39 -0
  106. package/dist/protocol.js.map +1 -0
  107. package/dist/rating.d.ts +41 -0
  108. package/dist/rating.d.ts.map +1 -0
  109. package/dist/rating.js +165 -0
  110. package/dist/rating.js.map +1 -0
  111. package/dist/ratingStore.d.ts +36 -0
  112. package/dist/ratingStore.d.ts.map +1 -0
  113. package/dist/ratingStore.js +55 -0
  114. package/dist/ratingStore.js.map +1 -0
  115. package/dist/styleOverrides.d.ts +45 -0
  116. package/dist/styleOverrides.d.ts.map +1 -0
  117. package/dist/styleOverrides.js +63 -0
  118. package/dist/styleOverrides.js.map +1 -0
  119. package/dist/types.d.ts +156 -0
  120. package/dist/types.d.ts.map +1 -0
  121. package/dist/types.js +3 -0
  122. package/dist/types.js.map +1 -0
  123. package/dist/unread.d.ts +9 -0
  124. package/dist/unread.d.ts.map +1 -0
  125. package/dist/unread.js +49 -0
  126. package/dist/unread.js.map +1 -0
  127. package/dist/useChatSession.d.ts +95 -0
  128. package/dist/useChatSession.d.ts.map +1 -0
  129. package/dist/useChatSession.js +965 -0
  130. package/dist/useChatSession.js.map +1 -0
  131. package/package.json +60 -4
  132. package/src/GiovChat.tsx +640 -0
  133. package/src/attachments.ts +218 -0
  134. package/src/brand-assets.ts +5 -0
  135. package/src/brandingStyle.ts +87 -0
  136. package/src/client.ts +848 -0
  137. package/src/color.ts +74 -0
  138. package/src/components/Attachments.tsx +75 -0
  139. package/src/components/Branding.tsx +94 -0
  140. package/src/components/ChatMarkdown.tsx +111 -0
  141. package/src/components/GiovBotMark.tsx +19 -0
  142. package/src/components/GreetingBubble.tsx +20 -0
  143. package/src/components/Header.tsx +131 -0
  144. package/src/components/MessageBubble.tsx +137 -0
  145. package/src/components/PreChatForm.tsx +183 -0
  146. package/src/components/RatingCard.tsx +219 -0
  147. package/src/components/TypingIndicator.tsx +34 -0
  148. package/src/components/WidgetStyles.tsx +5 -0
  149. package/src/components/bubbleStyles.ts +16 -0
  150. package/src/components/index.ts +14 -0
  151. package/src/errors.ts +33 -0
  152. package/src/i18n.ts +474 -0
  153. package/src/identity.ts +54 -0
  154. package/src/index.ts +85 -0
  155. package/src/markdown.ts +227 -0
  156. package/src/outbox.ts +175 -0
  157. package/src/protocol.ts +36 -0
  158. package/src/rating.ts +169 -0
  159. package/src/ratingStore.ts +65 -0
  160. package/src/styleOverrides.ts +98 -0
  161. package/src/types.ts +170 -0
  162. package/src/unread.ts +39 -0
  163. package/src/useChatSession.ts +841 -0
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveStyleOverrides = resolveStyleOverrides;
4
+ const backgroundSlots = [
5
+ "container", "header", "agentBubble", "visitorBubble", "composer", "button", "form",
6
+ ];
7
+ const textSlots = [
8
+ "headerTitle", "headerSubtitle", "agentText", "visitorText", "input", "buttonText",
9
+ "formTitle", "label", "hint", "errorText",
10
+ ];
11
+ function record(value) {
12
+ return value !== null && typeof value === "object" && !Array.isArray(value)
13
+ ? value
14
+ : {};
15
+ }
16
+ function nonEmptyString(value) {
17
+ return typeof value === "string" && value.trim().length > 0;
18
+ }
19
+ /** Rebuild every slot from an allowlist, including for untyped JavaScript callers. */
20
+ function resolveStyleOverrides(value) {
21
+ const input = record(value);
22
+ const result = {};
23
+ for (const slot of backgroundSlots) {
24
+ const source = record(input[slot]);
25
+ result[slot] = nonEmptyString(source.backgroundColor)
26
+ ? { backgroundColor: source.backgroundColor }
27
+ : {};
28
+ }
29
+ for (const slot of textSlots) {
30
+ const source = record(input[slot]);
31
+ const style = {};
32
+ if (nonEmptyString(input.fontFamily))
33
+ style.fontFamily = input.fontFamily;
34
+ if (nonEmptyString(source.fontFamily))
35
+ style.fontFamily = source.fontFamily;
36
+ if (nonEmptyString(source.color))
37
+ style.color = source.color;
38
+ if (source.fontStyle === "normal" || source.fontStyle === "italic") {
39
+ style.fontStyle = source.fontStyle;
40
+ }
41
+ const weight = source.fontWeight;
42
+ if (weight === "normal" || weight === "bold" ||
43
+ (typeof weight === "string" && /^[1-9]00$/.test(weight)) ||
44
+ (typeof weight === "number" && weight >= 100 && weight <= 900 && weight % 100 === 0)) {
45
+ style.fontWeight = weight;
46
+ }
47
+ if (slot === "input" && nonEmptyString(source.backgroundColor)) {
48
+ style.backgroundColor = source.backgroundColor;
49
+ }
50
+ result[slot] = style;
51
+ }
52
+ const footer = record(input.branding);
53
+ const branding = {};
54
+ if (nonEmptyString(input.fontFamily))
55
+ branding.fontFamily = input.fontFamily;
56
+ for (const key of ["fontFamily", "color", "brandColor", "backgroundColor"]) {
57
+ if (nonEmptyString(footer[key]))
58
+ branding[key] = footer[key];
59
+ }
60
+ result.branding = branding;
61
+ return result;
62
+ }
63
+ //# sourceMappingURL=styleOverrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleOverrides.js","sourceRoot":"","sources":["../src/styleOverrides.ts"],"names":[],"mappings":";;AA4DA,sDAqCC;AA3DD,MAAM,eAAe,GAAG;IACtB,WAAW,EAAE,QAAQ,EAAE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IAAI,CAAC,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,CAAU,EAAE,CAAC;QACpF,IAAI,cAAc,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,GAAG,CAAW,CAAC;IACzE,CAAC;IACD,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,156 @@
1
+ import type { GiovAttachment, GiovAttachmentPolicy } from "./attachments";
2
+ /**
3
+ * Fields the agent has configured as required in the pre-chat form.
4
+ * Mirrors the dashboard "Pre-chat form" settings.
5
+ */
6
+ export interface RequestUserInfo {
7
+ email?: boolean;
8
+ phone?: boolean;
9
+ firstName?: boolean;
10
+ lastName?: boolean;
11
+ }
12
+ /**
13
+ * Contact information for the current user.
14
+ *
15
+ * Pass this to `GiovChat` via the `contact` prop to automatically identify
16
+ * the visitor and skip (or pre-fill) any required pre-chat fields.
17
+ */
18
+ export interface GiovChatContact {
19
+ /**
20
+ * Your stable user id. On its own it is only a claim: the API stores it for
21
+ * agents but does not link the chat to an existing contact. Pass `userHash`
22
+ * as well to have it verified.
23
+ */
24
+ userId?: string;
25
+ /**
26
+ * HMAC-SHA256 of `userId` (hex) using the workspace's visitor identity
27
+ * secret from Settings → Chat widget → Visitor details. Compute it on YOUR backend;
28
+ * never ship the secret in the app.
29
+ */
30
+ userHash?: string;
31
+ email?: string;
32
+ phone?: string;
33
+ firstName?: string;
34
+ lastName?: string;
35
+ }
36
+ /** Private visitor credential. Never log it or share it across users. */
37
+ export interface GiovChatSession {
38
+ conversationId: string;
39
+ sessionToken: string;
40
+ }
41
+ /** Optional host-owned secure persistence. The scope separates API, tenant, identity and reset key. */
42
+ export interface GiovChatSessionStorage {
43
+ load(scope: string): Promise<GiovChatSession | null>;
44
+ save(scope: string, session: GiovChatSession): Promise<void>;
45
+ remove(scope: string): Promise<void>;
46
+ }
47
+ export type GiovChatConnectionStatus = "connecting" | "connected" | "disconnected";
48
+ /**
49
+ * Widget configuration returned by `GET /widget/config`.
50
+ * All values are set by the agent in their dashboard.
51
+ */
52
+ export interface GiovWidgetConfig {
53
+ /** Primary brand color (hex or CSS color). */
54
+ primaryColor: string;
55
+ /** Display name shown in the chat header. */
56
+ title: string;
57
+ /** Greeting message shown at the top of the conversation. */
58
+ greetingText: string;
59
+ /** Placeholder text for the message composer. */
60
+ textArea?: string;
61
+ /** Display name for the AI bot, when the GiovBot add-on is enabled. */
62
+ botName?: string;
63
+ /** True when GiovBot is turned on and included in the tenant's plan. */
64
+ botEnabled?: boolean;
65
+ /** The published GiovBot agent's avatar; the header shows the bot while it answers. */
66
+ botAvatarUrl?: string;
67
+ /** What visitors may attach, from the published agent's settings. Absent: images only. */
68
+ attachments?: GiovAttachmentPolicy;
69
+ /** URL of the agent/team avatar image. */
70
+ avatarUrl?: string;
71
+ /** Color theme. `"auto"` follows the device system setting. */
72
+ theme: "light" | "dark" | "auto";
73
+ /** Server-resolved plan policy. Only an explicit false removes GiovChat branding. */
74
+ showBranding?: boolean;
75
+ /** The workspace's privacy policy (https only); the header menu links to it, else to Giov's. */
76
+ privacyPolicyUrl?: string;
77
+ /** Which contact fields the agent requires before starting a chat. */
78
+ requestUserInfo?: RequestUserInfo;
79
+ }
80
+ /** A single message in a conversation. */
81
+ export interface GiovMessage {
82
+ /** Unique message identifier. */
83
+ id: string;
84
+ /** Who sent the message. */
85
+ role: "visitor" | "agent";
86
+ /** Message body: Chat Markdown, as the web widget renders it. */
87
+ content: string;
88
+ /** Unix timestamp in milliseconds. */
89
+ createdAt: number;
90
+ /** `true` when this message was sent by the AI bot. */
91
+ isBot?: boolean;
92
+ /** System-generated delivery. AI replies may set both this flag and `isBot`. */
93
+ isAutomated?: boolean;
94
+ /** Display name of the human agent, when available. */
95
+ senderName?: string | null;
96
+ /** Photo of the human agent (http(s) only), when available. */
97
+ senderAvatar?: string | null;
98
+ /** Files sent with the message. */
99
+ attachments?: GiovAttachment[];
100
+ /** Local only: "sending" until the server confirms it, "failed" when it could not be delivered. */
101
+ status?: "sending" | "failed";
102
+ /** Local only: the id it was shown under before the server confirmed it (keeps list keys stable). */
103
+ clientMessageId?: string;
104
+ /** Local only: a GiovBot reply still being written. */
105
+ isStreaming?: boolean;
106
+ /** The conversation rating card this message carries (team or GiovBot "How did we do?" request). */
107
+ rating?: GiovRatingBlock;
108
+ /** The visitor's own thumb on this GiovBot answer. */
109
+ feedback?: "up" | "down";
110
+ }
111
+ /** A score from 1 (Very bad) to 5 (Great). */
112
+ export type GiovRatingScore = 1 | 2 | 3 | 4 | 5;
113
+ /** The `rating` block of a message (docs/protocol, "Conversation ratings"). */
114
+ export interface GiovRatingBlock {
115
+ requestId: string;
116
+ /** When the card stops accepting answers or changes (epoch ms; the server decides). */
117
+ closesAt: number;
118
+ /** A hosted rating page, when the API sent one. The SDK always answers with the visitor token instead. */
119
+ url?: string;
120
+ score?: GiovRatingScore;
121
+ comment?: string;
122
+ /** `"replaced"`: a newer card took its place; draw nothing. */
123
+ state?: "replaced";
124
+ }
125
+ /** The rating card the visitor can answer or change right now (see `useGiovRating`). */
126
+ export interface GiovRatingRequest {
127
+ requestId: string;
128
+ /** The message that carries the card. */
129
+ messageId: string;
130
+ closesAt: number;
131
+ url?: string;
132
+ /** True once the visitor has answered (the answer can still change until `closesAt`). */
133
+ answered: boolean;
134
+ score?: GiovRatingScore;
135
+ comment?: string;
136
+ }
137
+ /** The server's answer to a rating. */
138
+ export interface GiovRatingResult {
139
+ requestId: string;
140
+ score: GiovRatingScore;
141
+ comment?: string;
142
+ closesAt: number;
143
+ ratedAt?: number;
144
+ }
145
+ /** The visitor's vote on a GiovBot answer. */
146
+ export type GiovFeedbackValue = "up" | "down" | "none";
147
+ export interface GiovAnswerFeedback {
148
+ messageId: string;
149
+ value: GiovFeedbackValue;
150
+ reason?: string;
151
+ }
152
+ /** Callback invoked for every incoming message. */
153
+ export type MessageHandler = (message: GiovMessage) => void;
154
+ /** Callback invoked when the WebSocket connection status changes. */
155
+ export type StatusHandler = (connected: boolean) => void;
156
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yEAAyE;AACzE,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,uGAAuG;AACvG,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED,MAAM,MAAM,wBAAwB,GAAG,YAAY,GAAG,WAAW,GAAG,cAAc,CAAC;AAEnF;;;GAGG;AAC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,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;AAE5D,qEAAqE;AACrE,MAAM,MAAM,aAAa,GAAG,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export declare function publishUnreadCount(owner: symbol, tenantKey: string, count: number): void;
2
+ export declare function forgetUnreadCount(owner: symbol): void;
3
+ export declare function readUnreadCount(tenantKey?: string): number;
4
+ /**
5
+ * Agent replies the visitor has not seen because the chat was closed. Counts only while a mounted
6
+ * `GiovChat` stays connected when hidden (`keepConnected`); opening the chat clears it.
7
+ */
8
+ export declare function useGiovChatUnreadCount(tenantKey?: string): number;
9
+ //# sourceMappingURL=unread.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unread.d.ts","sourceRoot":"","sources":["../src/unread.ts"],"names":[],"mappings":"AAUA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAKxF;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAErD;AAED,wBAAgB,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAI1D;AAOD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAEjE"}
package/dist/unread.js ADDED
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.publishUnreadCount = publishUnreadCount;
4
+ exports.forgetUnreadCount = forgetUnreadCount;
5
+ exports.readUnreadCount = readUnreadCount;
6
+ exports.useGiovChatUnreadCount = useGiovChatUnreadCount;
7
+ const react_1 = require("react");
8
+ /**
9
+ * Unread agent replies per mounted chat, so any screen can show a badge without a provider. Each
10
+ * `GiovChat` publishes its own count under its tenant key; the hook sums them (normally one).
11
+ */
12
+ const counts = new Map();
13
+ const listeners = new Set();
14
+ const notify = () => { for (const listener of listeners) {
15
+ try {
16
+ listener();
17
+ }
18
+ catch { /* Isolated. */ }
19
+ } };
20
+ function publishUnreadCount(owner, tenantKey, count) {
21
+ const current = counts.get(owner);
22
+ if (current && current.tenantKey === tenantKey && current.count === count)
23
+ return;
24
+ counts.set(owner, { tenantKey, count });
25
+ notify();
26
+ }
27
+ function forgetUnreadCount(owner) {
28
+ if (counts.delete(owner))
29
+ notify();
30
+ }
31
+ function readUnreadCount(tenantKey) {
32
+ let total = 0;
33
+ for (const entry of counts.values())
34
+ if (!tenantKey || entry.tenantKey === tenantKey)
35
+ total += entry.count;
36
+ return total;
37
+ }
38
+ function subscribe(listener) {
39
+ listeners.add(listener);
40
+ return () => { listeners.delete(listener); };
41
+ }
42
+ /**
43
+ * Agent replies the visitor has not seen because the chat was closed. Counts only while a mounted
44
+ * `GiovChat` stays connected when hidden (`keepConnected`); opening the chat clears it.
45
+ */
46
+ function useGiovChatUnreadCount(tenantKey) {
47
+ return (0, react_1.useSyncExternalStore)(subscribe, () => readUnreadCount(tenantKey), () => 0);
48
+ }
49
+ //# sourceMappingURL=unread.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unread.js","sourceRoot":"","sources":["../src/unread.ts"],"names":[],"mappings":";;AAUA,gDAKC;AAED,8CAEC;AAED,0CAIC;AAWD,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AAC,CAAC;AAC/C,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CAAC,SAAkB;IACvD,OAAO,IAAA,4BAAoB,EAAC,SAAS,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC"}
@@ -0,0 +1,95 @@
1
+ import { type GiovPushOptions, type GiovPushPlatform, type GiovPushRegistration } from "./client";
2
+ import { GiovChatError } from "./errors";
3
+ import { type OutboxEntry } from "./outbox";
4
+ import { type GiovAttachment, type GiovChatPickedFile } from "./attachments";
5
+ import type { GiovAnswerFeedback, GiovChatConnectionStatus, GiovChatContact, GiovChatSessionStorage, GiovFeedbackValue, GiovMessage, GiovRatingRequest, GiovRatingResult, GiovWidgetConfig, RequestUserInfo } from "./types";
6
+ export declare function missingContactFields(fields?: RequestUserInfo, contact?: GiovChatContact): RequestUserInfo;
7
+ /**
8
+ * The storage key of a visitor's session: the API, the workspace, the host's `sessionKey` and the
9
+ * signed-in `userId`. Contact details are not part of it, so a profile edit keeps the conversation.
10
+ */
11
+ export declare function sessionScope(baseUrl: string, tenantKey: string, contact?: GiovChatContact, sessionKey?: string | number): string;
12
+ /** The 0.2.0 key, which also held the contact details; read once so an upgrade keeps the conversation. */
13
+ export declare function legacySessionScope(baseUrl: string, tenantKey: string, contact?: GiovChatContact, sessionKey?: string | number): string;
14
+ /** By server id; a copy without a local key keeps the one it was shown under, so the bubble is not redrawn. */
15
+ export declare function mergeMessages(current: GiovMessage[], incoming: GiovMessage[]): GiovMessage[];
16
+ /** What the visitor sees: saved messages, then what is still sending, then replies being written. */
17
+ export declare function displayMessages(saved: GiovMessage[], pending: readonly OutboxEntry[], drafts: Readonly<Record<string, {
18
+ content: string;
19
+ createdAt: number;
20
+ }>>, describe?: (url: string) => Omit<GiovAttachment, "url">): GiovMessage[];
21
+ type Options = {
22
+ tenantKey: string;
23
+ baseUrl: string;
24
+ visible: boolean;
25
+ contact?: GiovChatContact;
26
+ scope: string;
27
+ sessionStorage?: GiovChatSessionStorage;
28
+ /** The host's `sessionKey`, for reading a session stored under the 0.2.0 key. */
29
+ sessionKey?: string | number;
30
+ /** Stay connected while hidden (app in the foreground) to count unread replies. Never starts a conversation. */
31
+ keepConnected?: boolean;
32
+ /** How long the app may be in the background before the socket closes (so the server pushes replies). */
33
+ backgroundGraceMs?: number;
34
+ onError?: (error: GiovChatError) => void;
35
+ onConnectionStatusChange?: (status: GiovChatConnectionStatus) => void;
36
+ onConversationStart?: (conversationId: string) => void;
37
+ onUnreadCountChange?: (count: number) => void;
38
+ /** A rating card the visitor has not answered arrived (live or in the history). Fires once per card. */
39
+ onRatingRequested?: (request: GiovRatingRequest) => void;
40
+ /** The visitor's rating was stored. */
41
+ onRatingSubmitted?: (result: GiovRatingResult) => void;
42
+ /** The visitor's vote on a GiovBot answer was stored. */
43
+ onAnswerFeedback?: (feedback: GiovAnswerFeedback) => void;
44
+ };
45
+ /**
46
+ * `ready`: the chat can be used but no conversation exists yet. Per the visitor protocol a native
47
+ * client starts one when the visitor sends the first message (or submits the pre-chat form), so
48
+ * opening the screen never creates an empty conversation. `idle`: hidden with nothing to resume.
49
+ */
50
+ export type ChatPhase = "idle" | "loading" | "pre-chat" | "ready" | "connecting" | "active" | "error";
51
+ export type UploadProgress = {
52
+ name: string;
53
+ progress: number;
54
+ };
55
+ /** A short trip to the background (a file picker, the app switcher) keeps the socket, as in the Android SDK. */
56
+ export declare const BACKGROUND_GRACE_MS = 5000;
57
+ export declare function useChatSession(options: Options): {
58
+ phase: ChatPhase;
59
+ config: GiovWidgetConfig | null;
60
+ messages: GiovMessage[];
61
+ agentTyping: boolean;
62
+ agentTypingIsBot: boolean | undefined;
63
+ error: GiovChatError | null;
64
+ sending: boolean;
65
+ uploads: UploadProgress[];
66
+ requiredFields: RequestUserInfo;
67
+ hasConversation: boolean;
68
+ currentAgentName: string | null;
69
+ currentAgentAvatar: string | null;
70
+ unreadCount: number;
71
+ lastIncoming: GiovMessage | null;
72
+ retry: () => void;
73
+ reset: () => Promise<void>;
74
+ submitContact: (info: GiovChatContact) => void;
75
+ send: (text: string, files?: readonly GiovChatPickedFile[]) => Promise<boolean>;
76
+ retryMessage: (clientMessageId: string) => void;
77
+ discardMessage: (clientMessageId: string) => void;
78
+ notifyTyping: () => void;
79
+ attachmentUrl: (url: string) => string;
80
+ registerPushToken: (token: string, platform: GiovPushPlatform, options?: GiovPushOptions) => Promise<GiovPushRegistration>;
81
+ unregisterPushToken: (token: string) => Promise<boolean>;
82
+ ratingRequest: GiovRatingRequest | null;
83
+ ratingsSupported: boolean;
84
+ submitRating: (score: number, options?: {
85
+ comment?: string;
86
+ requestId?: string;
87
+ }) => Promise<GiovRatingResult>;
88
+ submitAnswerFeedback: (messageId: string, value: GiovFeedbackValue, options?: {
89
+ reason?: string;
90
+ }) => Promise<void>;
91
+ closed: boolean;
92
+ startNew: () => Promise<void>;
93
+ };
94
+ export {};
95
+ //# sourceMappingURL=useChatSession.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useChatSession.d.ts","sourceRoot":"","sources":["../src/useChatSession.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,oBAAoB,EACvE,MAAM,UAAU,CAAC;AAElB,OAAO,EAAa,aAAa,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAKL,KAAK,cAAc,EAEnB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,kBAAkB,EAAE,wBAAwB,EAAE,eAAe,EAAmB,sBAAsB,EAAE,iBAAiB,EAAE,WAAW,EACtI,iBAAiB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EACvE,MAAM,SAAS,CAAC;AAEjB,wBAAgB,oBAAoB,CAAC,MAAM,GAAE,eAAoB,EAA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