@repzo/widget-react-native 1.3.1 → 1.5.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 (240) hide show
  1. package/CHANGELOG.md +173 -5
  2. package/README.md +99 -13
  3. package/lib/commonjs/api/client.js +125 -28
  4. package/lib/commonjs/api/client.js.map +1 -1
  5. package/lib/commonjs/attachments/file-size.js +52 -0
  6. package/lib/commonjs/attachments/file-size.js.map +1 -0
  7. package/lib/commonjs/attachments/local-previews.js +40 -0
  8. package/lib/commonjs/attachments/local-previews.js.map +1 -0
  9. package/lib/commonjs/attachments/pickers.js +20 -29
  10. package/lib/commonjs/attachments/pickers.js.map +1 -1
  11. package/lib/commonjs/i18n.js +22 -3
  12. package/lib/commonjs/i18n.js.map +1 -1
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/locales.js +12 -3
  15. package/lib/commonjs/locales.js.map +1 -1
  16. package/lib/commonjs/state/user-update-queue.js +168 -0
  17. package/lib/commonjs/state/user-update-queue.js.map +1 -0
  18. package/lib/commonjs/state/widget-store.js +303 -33
  19. package/lib/commonjs/state/widget-store.js.map +1 -1
  20. package/lib/commonjs/storage.js +3 -1
  21. package/lib/commonjs/storage.js.map +1 -1
  22. package/lib/commonjs/types.js.map +1 -1
  23. package/lib/commonjs/ui/WidgetProvider.js +33 -13
  24. package/lib/commonjs/ui/WidgetProvider.js.map +1 -1
  25. package/lib/commonjs/ui/components/AttachmentChips.js +109 -40
  26. package/lib/commonjs/ui/components/AttachmentChips.js.map +1 -1
  27. package/lib/commonjs/ui/components/ConversationRow.js +65 -10
  28. package/lib/commonjs/ui/components/ConversationRow.js.map +1 -1
  29. package/lib/commonjs/ui/components/ImageViewer.js +229 -24
  30. package/lib/commonjs/ui/components/ImageViewer.js.map +1 -1
  31. package/lib/commonjs/ui/components/RatingCard.js +5 -2
  32. package/lib/commonjs/ui/components/RatingCard.js.map +1 -1
  33. package/lib/commonjs/ui/components/ZoomableImage.js +58 -10
  34. package/lib/commonjs/ui/components/ZoomableImage.js.map +1 -1
  35. package/lib/commonjs/ui/hooks/use-retained-state.js +39 -0
  36. package/lib/commonjs/ui/hooks/use-retained-state.js.map +1 -0
  37. package/lib/commonjs/ui/screens/chat/ChatView.js +651 -165
  38. package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -1
  39. package/lib/commonjs/ui/screens/chat/ChatView.styles.js +138 -1
  40. package/lib/commonjs/ui/screens/chat/ChatView.styles.js.map +1 -1
  41. package/lib/commonjs/ui/screens/conversations/ConversationsList.js +1 -0
  42. package/lib/commonjs/ui/screens/conversations/ConversationsList.js.map +1 -1
  43. package/lib/commonjs/ui/screens/home/HomeView.js +38 -55
  44. package/lib/commonjs/ui/screens/home/HomeView.js.map +1 -1
  45. package/lib/commonjs/ui/screens/home/HomeView.styles.js +36 -45
  46. package/lib/commonjs/ui/screens/home/HomeView.styles.js.map +1 -1
  47. package/lib/commonjs/ui/utils/html.js +13 -0
  48. package/lib/commonjs/ui/utils/html.js.map +1 -1
  49. package/lib/commonjs/ui/utils/image-load-queue.js +114 -0
  50. package/lib/commonjs/ui/utils/image-load-queue.js.map +1 -0
  51. package/lib/commonjs/ui/utils/inline-attachments.js +88 -0
  52. package/lib/commonjs/ui/utils/inline-attachments.js.map +1 -0
  53. package/lib/module/api/client.js +123 -27
  54. package/lib/module/api/client.js.map +1 -1
  55. package/lib/module/attachments/file-size.js +47 -0
  56. package/lib/module/attachments/file-size.js.map +1 -0
  57. package/lib/module/attachments/local-previews.js +33 -0
  58. package/lib/module/attachments/local-previews.js.map +1 -0
  59. package/lib/module/attachments/pickers.js +15 -25
  60. package/lib/module/attachments/pickers.js.map +1 -1
  61. package/lib/module/i18n.js +22 -3
  62. package/lib/module/i18n.js.map +1 -1
  63. package/lib/module/index.js.map +1 -1
  64. package/lib/module/locales.js +12 -3
  65. package/lib/module/locales.js.map +1 -1
  66. package/lib/module/state/user-update-queue.js +163 -0
  67. package/lib/module/state/user-update-queue.js.map +1 -0
  68. package/lib/module/state/widget-store.js +305 -35
  69. package/lib/module/state/widget-store.js.map +1 -1
  70. package/lib/module/storage.js +2 -0
  71. package/lib/module/storage.js.map +1 -1
  72. package/lib/module/types.js.map +1 -1
  73. package/lib/module/ui/WidgetProvider.js +33 -13
  74. package/lib/module/ui/WidgetProvider.js.map +1 -1
  75. package/lib/module/ui/components/AttachmentChips.js +111 -42
  76. package/lib/module/ui/components/AttachmentChips.js.map +1 -1
  77. package/lib/module/ui/components/ConversationRow.js +65 -10
  78. package/lib/module/ui/components/ConversationRow.js.map +1 -1
  79. package/lib/module/ui/components/ImageViewer.js +231 -26
  80. package/lib/module/ui/components/ImageViewer.js.map +1 -1
  81. package/lib/module/ui/components/RatingCard.js +5 -2
  82. package/lib/module/ui/components/RatingCard.js.map +1 -1
  83. package/lib/module/ui/components/ZoomableImage.js +58 -10
  84. package/lib/module/ui/components/ZoomableImage.js.map +1 -1
  85. package/lib/module/ui/hooks/use-retained-state.js +34 -0
  86. package/lib/module/ui/hooks/use-retained-state.js.map +1 -0
  87. package/lib/module/ui/screens/chat/ChatView.js +655 -169
  88. package/lib/module/ui/screens/chat/ChatView.js.map +1 -1
  89. package/lib/module/ui/screens/chat/ChatView.styles.js +140 -2
  90. package/lib/module/ui/screens/chat/ChatView.styles.js.map +1 -1
  91. package/lib/module/ui/screens/conversations/ConversationsList.js +1 -0
  92. package/lib/module/ui/screens/conversations/ConversationsList.js.map +1 -1
  93. package/lib/module/ui/screens/home/HomeView.js +40 -57
  94. package/lib/module/ui/screens/home/HomeView.js.map +1 -1
  95. package/lib/module/ui/screens/home/HomeView.styles.js +36 -45
  96. package/lib/module/ui/screens/home/HomeView.styles.js.map +1 -1
  97. package/lib/module/ui/utils/html.js +12 -0
  98. package/lib/module/ui/utils/html.js.map +1 -1
  99. package/lib/module/ui/utils/image-load-queue.js +109 -0
  100. package/lib/module/ui/utils/image-load-queue.js.map +1 -0
  101. package/lib/module/ui/utils/inline-attachments.js +85 -0
  102. package/lib/module/ui/utils/inline-attachments.js.map +1 -0
  103. package/lib/typescript/commonjs/api/client.d.ts +20 -6
  104. package/lib/typescript/commonjs/api/client.d.ts.map +1 -1
  105. package/lib/typescript/commonjs/attachments/file-size.d.ts +15 -0
  106. package/lib/typescript/commonjs/attachments/file-size.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/attachments/local-previews.d.ts +14 -0
  108. package/lib/typescript/commonjs/attachments/local-previews.d.ts.map +1 -0
  109. package/lib/typescript/commonjs/attachments/pickers.d.ts +15 -2
  110. package/lib/typescript/commonjs/attachments/pickers.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/i18n.d.ts +12 -3
  112. package/lib/typescript/commonjs/i18n.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/index.d.ts +5 -0
  114. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  115. package/lib/typescript/commonjs/locales.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/state/user-update-queue.d.ts +62 -0
  117. package/lib/typescript/commonjs/state/user-update-queue.d.ts.map +1 -0
  118. package/lib/typescript/commonjs/state/widget-store.d.ts +44 -1
  119. package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/storage.d.ts +2 -0
  121. package/lib/typescript/commonjs/storage.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/types.d.ts +53 -0
  123. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts +13 -3
  126. package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts +15 -1
  128. package/lib/typescript/commonjs/ui/components/ConversationRow.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts +26 -6
  130. package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/ui/components/RatingCard.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/ui/components/ZoomableImage.d.ts +10 -1
  133. package/lib/typescript/commonjs/ui/components/ZoomableImage.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/ui/hooks/use-retained-state.d.ts +11 -0
  135. package/lib/typescript/commonjs/ui/hooks/use-retained-state.d.ts.map +1 -0
  136. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts +4 -4
  137. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -1
  138. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts +144 -0
  139. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
  140. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +26 -1
  141. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  142. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts +2 -0
  144. package/lib/typescript/commonjs/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts +7 -5
  146. package/lib/typescript/commonjs/ui/screens/home/HomeView.d.ts.map +1 -1
  147. package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts +30 -35
  148. package/lib/typescript/commonjs/ui/screens/home/HomeView.styles.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts +5 -6
  150. package/lib/typescript/commonjs/ui/screens/home/HomeView.types.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/ui/utils/html.d.ts +5 -0
  152. package/lib/typescript/commonjs/ui/utils/html.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ui/utils/image-load-queue.d.ts +44 -0
  154. package/lib/typescript/commonjs/ui/utils/image-load-queue.d.ts.map +1 -0
  155. package/lib/typescript/commonjs/ui/utils/inline-attachments.d.ts +29 -0
  156. package/lib/typescript/commonjs/ui/utils/inline-attachments.d.ts.map +1 -0
  157. package/lib/typescript/module/api/client.d.ts +20 -6
  158. package/lib/typescript/module/api/client.d.ts.map +1 -1
  159. package/lib/typescript/module/attachments/file-size.d.ts +15 -0
  160. package/lib/typescript/module/attachments/file-size.d.ts.map +1 -0
  161. package/lib/typescript/module/attachments/local-previews.d.ts +14 -0
  162. package/lib/typescript/module/attachments/local-previews.d.ts.map +1 -0
  163. package/lib/typescript/module/attachments/pickers.d.ts +15 -2
  164. package/lib/typescript/module/attachments/pickers.d.ts.map +1 -1
  165. package/lib/typescript/module/i18n.d.ts +12 -3
  166. package/lib/typescript/module/i18n.d.ts.map +1 -1
  167. package/lib/typescript/module/index.d.ts +5 -0
  168. package/lib/typescript/module/index.d.ts.map +1 -1
  169. package/lib/typescript/module/locales.d.ts.map +1 -1
  170. package/lib/typescript/module/state/user-update-queue.d.ts +62 -0
  171. package/lib/typescript/module/state/user-update-queue.d.ts.map +1 -0
  172. package/lib/typescript/module/state/widget-store.d.ts +44 -1
  173. package/lib/typescript/module/state/widget-store.d.ts.map +1 -1
  174. package/lib/typescript/module/storage.d.ts +2 -0
  175. package/lib/typescript/module/storage.d.ts.map +1 -1
  176. package/lib/typescript/module/types.d.ts +53 -0
  177. package/lib/typescript/module/types.d.ts.map +1 -1
  178. package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -1
  179. package/lib/typescript/module/ui/components/AttachmentChips.d.ts +13 -3
  180. package/lib/typescript/module/ui/components/AttachmentChips.d.ts.map +1 -1
  181. package/lib/typescript/module/ui/components/ConversationRow.d.ts +15 -1
  182. package/lib/typescript/module/ui/components/ConversationRow.d.ts.map +1 -1
  183. package/lib/typescript/module/ui/components/ImageViewer.d.ts +26 -6
  184. package/lib/typescript/module/ui/components/ImageViewer.d.ts.map +1 -1
  185. package/lib/typescript/module/ui/components/RatingCard.d.ts.map +1 -1
  186. package/lib/typescript/module/ui/components/ZoomableImage.d.ts +10 -1
  187. package/lib/typescript/module/ui/components/ZoomableImage.d.ts.map +1 -1
  188. package/lib/typescript/module/ui/hooks/use-retained-state.d.ts +11 -0
  189. package/lib/typescript/module/ui/hooks/use-retained-state.d.ts.map +1 -0
  190. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts +4 -4
  191. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -1
  192. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts +144 -0
  193. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
  194. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +26 -1
  195. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  196. package/lib/typescript/module/ui/screens/conversations/ConversationsList.d.ts.map +1 -1
  197. package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts +2 -0
  198. package/lib/typescript/module/ui/screens/conversations/ConversationsList.types.d.ts.map +1 -1
  199. package/lib/typescript/module/ui/screens/home/HomeView.d.ts +7 -5
  200. package/lib/typescript/module/ui/screens/home/HomeView.d.ts.map +1 -1
  201. package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts +30 -35
  202. package/lib/typescript/module/ui/screens/home/HomeView.styles.d.ts.map +1 -1
  203. package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts +5 -6
  204. package/lib/typescript/module/ui/screens/home/HomeView.types.d.ts.map +1 -1
  205. package/lib/typescript/module/ui/utils/html.d.ts +5 -0
  206. package/lib/typescript/module/ui/utils/html.d.ts.map +1 -1
  207. package/lib/typescript/module/ui/utils/image-load-queue.d.ts +44 -0
  208. package/lib/typescript/module/ui/utils/image-load-queue.d.ts.map +1 -0
  209. package/lib/typescript/module/ui/utils/inline-attachments.d.ts +29 -0
  210. package/lib/typescript/module/ui/utils/inline-attachments.d.ts.map +1 -0
  211. package/package.json +1 -1
  212. package/src/api/client.ts +149 -38
  213. package/src/attachments/file-size.ts +42 -0
  214. package/src/attachments/local-previews.ts +32 -0
  215. package/src/attachments/pickers.ts +23 -25
  216. package/src/i18n.ts +22 -3
  217. package/src/index.tsx +5 -0
  218. package/src/locales.ts +12 -3
  219. package/src/state/user-update-queue.ts +178 -0
  220. package/src/state/widget-store.ts +346 -51
  221. package/src/storage.ts +2 -0
  222. package/src/types.ts +53 -0
  223. package/src/ui/WidgetProvider.tsx +35 -8
  224. package/src/ui/components/AttachmentChips.tsx +100 -29
  225. package/src/ui/components/ConversationRow.tsx +90 -9
  226. package/src/ui/components/ImageViewer.tsx +242 -24
  227. package/src/ui/components/RatingCard.tsx +5 -2
  228. package/src/ui/components/ZoomableImage.tsx +58 -5
  229. package/src/ui/hooks/use-retained-state.ts +35 -0
  230. package/src/ui/screens/chat/ChatView.styles.ts +139 -1
  231. package/src/ui/screens/chat/ChatView.tsx +735 -198
  232. package/src/ui/screens/chat/ChatView.types.ts +26 -1
  233. package/src/ui/screens/conversations/ConversationsList.tsx +1 -0
  234. package/src/ui/screens/conversations/ConversationsList.types.ts +2 -0
  235. package/src/ui/screens/home/HomeView.styles.ts +36 -45
  236. package/src/ui/screens/home/HomeView.tsx +54 -70
  237. package/src/ui/screens/home/HomeView.types.ts +5 -6
  238. package/src/ui/utils/html.ts +26 -0
  239. package/src/ui/utils/image-load-queue.ts +108 -0
  240. package/src/ui/utils/inline-attachments.ts +71 -0
@@ -106,6 +106,59 @@ export declare const styles: {
106
106
  paddingBottom: 8;
107
107
  gap: 8;
108
108
  };
109
+ threadContent: {
110
+ paddingHorizontal: 16;
111
+ paddingTop: 8;
112
+ paddingBottom: 16;
113
+ };
114
+ threadRow: {
115
+ gap: 8;
116
+ };
117
+ threadGap: {
118
+ height: 8;
119
+ };
120
+ threadTail: {
121
+ gap: 8;
122
+ };
123
+ threadTailInList: {
124
+ paddingTop: 8;
125
+ };
126
+ jumpToLatest: {
127
+ shadowColor: "#000000";
128
+ shadowOffset: {
129
+ readonly width: 0;
130
+ readonly height: 4;
131
+ };
132
+ shadowOpacity: 0.15;
133
+ shadowRadius: 12;
134
+ elevation: 6;
135
+ position: "absolute";
136
+ bottom: 12;
137
+ end: 16;
138
+ width: number;
139
+ height: number;
140
+ borderRadius: number;
141
+ alignItems: "center";
142
+ justifyContent: "center";
143
+ backgroundColor: "#ffffff";
144
+ borderWidth: number;
145
+ borderColor: "#e5e7eb";
146
+ };
147
+ jumpBadge: {
148
+ position: "absolute";
149
+ top: number;
150
+ end: number;
151
+ minWidth: number;
152
+ height: number;
153
+ paddingHorizontal: number;
154
+ borderRadius: 999;
155
+ alignItems: "center";
156
+ justifyContent: "center";
157
+ };
158
+ jumpBadgeText: {
159
+ fontSize: 10;
160
+ fontWeight: "700";
161
+ };
109
162
  loadMore: {
110
163
  alignSelf: "center";
111
164
  paddingVertical: 8;
@@ -196,6 +249,9 @@ export declare const styles: {
196
249
  attachments: {
197
250
  gap: number;
198
251
  };
252
+ inlineParts: {
253
+ gap: 8;
254
+ };
199
255
  attachmentsSpaced: {
200
256
  marginTop: 8;
201
257
  };
@@ -203,6 +259,94 @@ export declare const styles: {
203
259
  width: number;
204
260
  height: number;
205
261
  borderRadius: 10;
262
+ backgroundColor: string;
263
+ };
264
+ photoLoader: {
265
+ alignItems: "center";
266
+ justifyContent: "center";
267
+ position: "absolute";
268
+ left: 0;
269
+ right: 0;
270
+ top: 0;
271
+ bottom: 0;
272
+ };
273
+ photoLoaderBadge: {
274
+ width: number;
275
+ height: number;
276
+ borderRadius: number;
277
+ alignItems: "center";
278
+ justifyContent: "center";
279
+ backgroundColor: string;
280
+ };
281
+ album: {
282
+ width: number;
283
+ height: number;
284
+ borderRadius: 10;
285
+ overflow: "hidden";
286
+ gap: number;
287
+ };
288
+ albumRow: {
289
+ flexDirection: "row";
290
+ };
291
+ albumGrid: {
292
+ flexDirection: "row";
293
+ flexWrap: "wrap";
294
+ };
295
+ albumColumn: {
296
+ flex: number;
297
+ gap: number;
298
+ };
299
+ albumHalf: {
300
+ flex: number;
301
+ };
302
+ albumQuarter: {
303
+ width: number;
304
+ height: number;
305
+ };
306
+ albumTile: {
307
+ overflow: "hidden";
308
+ backgroundColor: string;
309
+ };
310
+ albumImage: {
311
+ width: "100%";
312
+ height: "100%";
313
+ };
314
+ albumFallback: {
315
+ alignItems: "center";
316
+ justifyContent: "center";
317
+ gap: 4;
318
+ padding: 8;
319
+ backgroundColor: "#f3f4f6";
320
+ position: "absolute";
321
+ left: 0;
322
+ right: 0;
323
+ top: 0;
324
+ bottom: 0;
325
+ };
326
+ albumFallbackType: {
327
+ color: "#6b7280";
328
+ fontSize: 12;
329
+ fontWeight: "700";
330
+ };
331
+ albumFallbackName: {
332
+ color: "#111827";
333
+ fontSize: 12;
334
+ textAlign: "center";
335
+ };
336
+ albumMore: {
337
+ alignItems: "center";
338
+ justifyContent: "center";
339
+ backgroundColor: string;
340
+ position: "absolute";
341
+ left: 0;
342
+ right: 0;
343
+ top: 0;
344
+ bottom: 0;
345
+ };
346
+ albumMoreText: {
347
+ color: "#ffffff";
348
+ fontSize: 22;
349
+ fontWeight: "700";
206
350
  };
207
351
  failedRow: {
208
352
  flexDirection: "row";
@@ -1 +1 @@
1
- {"version":3,"file":"ChatView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.styles.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAOlF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkajB,CAAC"}
1
+ {"version":3,"file":"ChatView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.styles.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAYlF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuiBjB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import type { TeamAvatar } from '../../../types';
2
2
  /** Props and label bundle for the chat thread. */
3
+ import type { UploadedFile } from '../../../api/client';
3
4
  import type { DraftAttachment, PickResult } from '../../../attachments/pickers';
4
5
  import type { AgentUiAction, AttachmentSource, ConversationRatingResult, Message, OutgoingAttachment } from '../../../types';
5
6
  import type { AgentUiBlockLabels } from '../../components/AgentUiBlocks';
@@ -12,6 +13,14 @@ export interface ChatLabels {
12
13
  loadEarlier: string;
13
14
  emptyConversation: string;
14
15
  messagePlaceholder: string;
16
+ /** Screen-reader label of the send button. */
17
+ send: string;
18
+ /** The button back to the newest message. */
19
+ jumpToLatest: string;
20
+ /** The same with `{count}` teammate replies that arrived while scrolled up. */
21
+ jumpToLatestNew: string;
22
+ /** Last tile of a photo album, with `{count}` photos behind its "+N". */
23
+ morePhotos: string;
15
24
  failedToSend: string;
16
25
  /** After `failedToSend` on a bubble that can be re-sent. */
17
26
  tapToRetry: string;
@@ -48,7 +57,10 @@ export interface ChatLabels {
48
57
  /** Screen-reader label for a file card; keeps `{name}`. */
49
58
  openAttachment: string;
50
59
  }
51
- /** Composer attachment copy. Limits are already filled in; `remove` keeps `{name}`. */
60
+ /**
61
+ * Composer attachment copy. Limits are already filled in; `remove`,
62
+ * `uploading` and `uploadFailed` keep `{name}`.
63
+ */
52
64
  export interface AttachLabels {
53
65
  button: string;
54
66
  photoLibrary: string;
@@ -61,6 +73,11 @@ export interface AttachLabels {
61
73
  tooLargeTogether: string;
62
74
  failed: string;
63
75
  cameraDenied: string;
76
+ uploading: string;
77
+ uploadFailed: string;
78
+ uploadFailedNotice: string;
79
+ /** Under a file chip whose upload failed. */
80
+ retry: string;
64
81
  }
65
82
  export interface ChatViewProps {
66
83
  messages: Message[];
@@ -90,6 +107,12 @@ export interface ChatViewProps {
90
107
  attachmentSources?: AttachmentSource[];
91
108
  /** Opens a picker and returns what fits beside `current`. Never rejects. */
92
109
  onPickAttachments?: (source: AttachmentSource, current: DraftAttachment[]) => Promise<PickResult>;
110
+ /**
111
+ * Uploads a picked local file (`fileUri`) and resolves its upload token,
112
+ * with when it expires. Absent: such files go up when the message is sent
113
+ * instead.
114
+ */
115
+ onUploadAttachment?: (draft: DraftAttachment, signal?: AbortSignal) => Promise<UploadedFile>;
93
116
  /** Rejects when the send fails, so the composer can keep its attachments. */
94
117
  onSendMessage: (body: string, attachments?: OutgoingAttachment[], action?: AgentUiAction) => Promise<void>;
95
118
  /** Re-sends a failed bubble; rejects when it fails again. Absent: no retry. */
@@ -107,6 +130,8 @@ export interface ChatViewProps {
107
130
  }) => Promise<ConversationRatingResult>;
108
131
  /** The widget's default language — rating reasons fall back to it. */
109
132
  defaultLocale?: string;
133
+ /** A message's photos share one album (default true; `boot({ photoAlbums })`). */
134
+ photoAlbums?: boolean;
110
135
  onLoadMore: () => void;
111
136
  onTyping: (isTyping: boolean) => void;
112
137
  onBack: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ChatView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/chat/ChatView.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,kDAAkD;AAElD,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,OAAO,EACP,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UA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AE,OAAO,CAAC;IACtB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationsList.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,sBAAsB,EACtB,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,+BA8GxB"}
1
+ {"version":3,"file":"ConversationsList.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,wBAAgB,iBAAiB,CAAC,EAChC,aAAa,EACb,oBAAoB,EACpB,KAAK,EACL,qBAAqB,EACrB,yBAAyB,EACzB,QAAQ,EACR,sBAAsB,EACtB,MAAM,EACN,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,GACR,EAAE,sBAAsB,+BA+GxB"}
@@ -1,5 +1,6 @@
1
1
  /** Props and label bundle for the Messages space. */
2
2
  import type { Conversation } from '../../../types';
3
+ import type { LastMessageLabels } from '../../components/ConversationRow';
3
4
  import type { RelativeTimeLabels } from '../../utils/conversations';
4
5
  export interface ConversationsListLabels {
5
6
  messages: string;
@@ -13,6 +14,7 @@ export interface ConversationsListLabels {
13
14
  time: RelativeTimeLabels;
14
15
  /** Template with a `{count}` token. */
15
16
  unread: string;
17
+ lastMessage: LastMessageLabels;
16
18
  }
17
19
  export interface ConversationsListProps {
18
20
  conversations: Conversation[];
@@ -1 +1 @@
1
- {"version":3,"file":"ConversationsList.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
1
+ {"version":3,"file":"ConversationsList.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/conversations/ConversationsList.types.ts"],"names":[],"mappings":"AAAA,qDAAqD;AAErD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,uBAAuB,CAAC;IAChC,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACtC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB"}
@@ -1,12 +1,14 @@
1
1
  /**
2
- * Home space — branded greeting header, the "start a conversation" card, a
3
- * preview of recent threads and a team/availability strip.
2
+ * Home space — branded greeting header, the newest conversation in a "Recent
3
+ * message" card, the "start a conversation" card under it and a
4
+ * team/availability strip.
4
5
  * Port of `client/src/widget/components/HomeView.tsx`.
5
6
  *
6
7
  * The header meets the white body on a straight seam, the same as the web
7
8
  * widget. Whether that seam is a hard edge or the background washing out into
8
- * white is the dashboard's `homeBackgroundFade` toggle, and the start card sits
9
- * astride it either way: top over the brand background, bottom over white.
9
+ * white is the dashboard's `homeBackgroundFade` toggle, and the first card (the
10
+ * recent message, or the start card when there is none) sits astride it either
11
+ * way: top over the brand background, bottom over white.
10
12
  *
11
13
  * Everything on this screen comes from the widget config or the conversations
12
14
  * the visitor already has; nothing here assumes a field the backend does not
@@ -20,5 +22,5 @@ import type { HomeViewProps } from './HomeView.types';
20
22
  * derive something legible from the background instead.
21
23
  */
22
24
  export declare function resolveHeaderTextColor(config: WidgetConfig | null, fallbackColor: string): string;
23
- export declare function HomeView({ config, color, visitorName, conversationCount, recentConversations, unreadByConversation, teamAgents, isOnline, offlineMessage, startConversationLabel, replyTimeLabel, allowNewConversations, showPreviousConversations, labels, onClose, onStartConversation, onViewConversations, onOpenConversation, }: HomeViewProps): import("react").JSX.Element;
25
+ export declare function HomeView({ config, color, visitorName, conversationCount, recentConversation, unreadByConversation, teamAgents, isOnline, offlineMessage, startConversationLabel, replyTimeLabel, allowNewConversations, showPreviousConversations, labels, onClose, onStartConversation, onOpenConversation, }: HomeViewProps): import("react").JSX.Element;
24
26
  //# sourceMappingURL=HomeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomeView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA2BnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAQjG;AAED,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,aAAa,+BAmNf"}
1
+ {"version":3,"file":"HomeView.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA2BnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAQjG;AAED,wBAAgB,QAAQ,CAAC,EACvB,MAAM,EACN,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,qBAAqB,EACrB,yBAAyB,EACzB,MAAM,EACN,OAAO,EACP,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,aAAa,+BAkMf"}
@@ -4,15 +4,16 @@
4
4
  */
5
5
  /**
6
6
  * Header geometry in dp, measured off the web widget so the two surfaces line
7
- * up: a tall header with the greeting pinned low, a start card that overhangs
7
+ * up: a tall header with the greeting pinned low, a first card that overhangs
8
8
  * the seam by a fixed amount rather than half its height, and a fade that is a
9
9
  * straight white ramp over the bottom of the header, starting just under the
10
10
  * heading.
11
11
  */
12
12
  export declare const HEADER_MIN_HEIGHT = 228;
13
- /** Between the greeting and whatever comes next: the seam, or the start card. */
13
+ /** Between the greeting and whatever comes next: the seam, or the first card. */
14
14
  export declare const HEADER_BOTTOM_PADDING = 36;
15
- export declare const START_CARD_LIFT = 28;
15
+ /** How far the first card (recent message, else the start card) rides up over the seam. */
16
+ export declare const LEAD_CARD_LIFT = 28;
16
17
  export declare const START_CARD_MIN_HEIGHT = 76;
17
18
  export declare const HEADER_FADE_HEIGHT = 90;
18
19
  export declare const CLOSE_BUTTON_SIZE = 28;
@@ -98,8 +99,33 @@ export declare const styles: {
98
99
  lineHeight: number;
99
100
  color: "#92400e";
100
101
  };
101
- startCardSlot: {
102
+ leadCards: {
102
103
  marginTop: number;
104
+ gap: 12;
105
+ };
106
+ recentCard: {
107
+ shadowColor: "#0f172a";
108
+ shadowOffset: {
109
+ readonly width: 0;
110
+ readonly height: 4;
111
+ };
112
+ shadowOpacity: 0.08;
113
+ shadowRadius: 14;
114
+ elevation: 3;
115
+ paddingTop: 16;
116
+ paddingBottom: 8;
117
+ borderRadius: 12;
118
+ borderWidth: number;
119
+ borderColor: "#e5e7eb";
120
+ backgroundColor: "#ffffff";
121
+ };
122
+ recentTitle: {
123
+ textAlign: "left" | "right";
124
+ paddingHorizontal: 20;
125
+ marginBottom: 4;
126
+ fontSize: 17;
127
+ fontWeight: "600";
128
+ color: "#1a1a1a";
103
129
  };
104
130
  startCard: {
105
131
  shadowColor: "#0f172a";
@@ -147,37 +173,6 @@ export declare const styles: {
147
173
  color: "#9ca3af";
148
174
  marginTop: number;
149
175
  };
150
- recentHeader: {
151
- flexDirection: "row";
152
- alignItems: "center";
153
- justifyContent: "space-between";
154
- minHeight: number;
155
- marginBottom: 8;
156
- };
157
- recentTitle: {
158
- textAlign: "left" | "right";
159
- fontSize: 12;
160
- fontWeight: "700";
161
- color: "#6b7280";
162
- letterSpacing: number;
163
- textTransform: "uppercase";
164
- };
165
- viewAllButton: {
166
- minHeight: number;
167
- paddingHorizontal: 4;
168
- justifyContent: "center";
169
- };
170
- viewAllLabel: {
171
- textAlign: "left" | "right";
172
- fontSize: 13;
173
- fontWeight: "600";
174
- };
175
- recentCard: {
176
- overflow: "hidden";
177
- };
178
- recentDivider: {
179
- marginStart: number;
180
- };
181
176
  spacer: {
182
177
  flex: number;
183
178
  minHeight: 16;
@@ -1 +1 @@
1
- {"version":3,"file":"HomeView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,qFAAqF;AACrF,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyNjB,CAAC"}
1
+ {"version":3,"file":"HomeView.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,2FAA2F;AAC3F,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,qFAAqF;AACrF,eAAO,MAAM,WAAW,KAAK,CAAC;AAC9B,eAAO,MAAM,cAAc,MAAM,CAAC;AAClC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgNjB,CAAC"}
@@ -1,11 +1,10 @@
1
1
  /** Props and label bundle for the Home space. */
2
2
  import type { Conversation, WidgetConfig } from '../../../types';
3
+ import type { LastMessageLabels } from '../../components/ConversationRow';
3
4
  import type { RelativeTimeLabels, TeamAgent } from '../../utils/conversations';
4
5
  export interface HomeViewLabels {
5
6
  close: string;
6
- /** Accessibility label for the "view all" control. */
7
- viewPrevious: string;
8
- viewAll: string;
7
+ /** Heading inside the "Recent message" card. */
9
8
  recentTitle: string;
10
9
  noConversations: string;
11
10
  statusOnline: string;
@@ -15,14 +14,15 @@ export interface HomeViewLabels {
15
14
  time: RelativeTimeLabels;
16
15
  /** Template with a `{count}` token. */
17
16
  unread: string;
17
+ lastMessage: LastMessageLabels;
18
18
  }
19
19
  export interface HomeViewProps {
20
20
  config: WidgetConfig | null;
21
21
  color: string;
22
22
  visitorName?: string;
23
23
  conversationCount: number;
24
- /** Already sorted newest-first and capped by the provider. */
25
- recentConversations: Conversation[];
24
+ /** The newest conversation, picked by the provider; none before the first one. */
25
+ recentConversation?: Conversation;
26
26
  unreadByConversation: Record<string, number>;
27
27
  teamAgents: TeamAgent[];
28
28
  isOnline: boolean;
@@ -34,7 +34,6 @@ export interface HomeViewProps {
34
34
  labels: HomeViewLabels;
35
35
  onClose: () => void;
36
36
  onStartConversation: () => void;
37
- onViewConversations: () => void;
38
37
  onOpenConversation: (conversationId: string) => void;
39
38
  }
40
39
  //# sourceMappingURL=HomeView.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomeView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,mBAAmB,EAAE,YAAY,EAAE,CAAC;IACpC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD"}
1
+ {"version":3,"file":"HomeView.types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/screens/home/HomeView.types.ts"],"names":[],"mappings":"AAAA,iDAAiD;AAEjD,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE/E,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,CAAC;IACzB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,YAAY,GAAG,IAAI,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kFAAkF;IAClF,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,yBAAyB,EAAE,OAAO,CAAC;IACnC,MAAM,EAAE,cAAc,CAAC;IACvB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,kBAAkB,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD"}
@@ -6,6 +6,11 @@
6
6
  export declare function decodeEntities(text: string): string;
7
7
  /** Block-level tags become newlines so paragraphs survive the strip. */
8
8
  export declare function stripHtml(html: string): string;
9
+ /**
10
+ * Agent reply HTML → the Markdown subset `Markdown` draws: paragraphs, line
11
+ * breaks, lists, bold, italic, inline code and links. Other tags keep their text.
12
+ */
13
+ export declare function htmlToMarkdown(html: string): string;
9
14
  /** Single-line flattening used for campaign cards and list snippets. */
10
15
  export declare function htmlToText(html: string): string;
11
16
  //# sourceMappingURL=html.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/html.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW9C;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C"}
1
+ {"version":3,"file":"html.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/html.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAInD;AAED,wEAAwE;AACxE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW9C;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAoBnD;AAED,wEAAwE;AACxE,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU/C"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Lets images load a few at a time, highest priority first. The chat runs its
3
+ * large images through it: Android holds a whole download in a memory pool
4
+ * capped at three quarters of the app's heap (192 MB on a 256 MB phone), so
5
+ * several 30–50 MB photos at once overflow it and every one of them fails.
6
+ *
7
+ * No `react-native` import on purpose: it stays testable in plain Node.
8
+ */
9
+ export declare class ImageLoadQueue {
10
+ private readonly concurrency;
11
+ private readonly waiting;
12
+ private readonly loading;
13
+ private readonly done;
14
+ /** The images on screen; null until the list says, so all of them count. */
15
+ private onScreen;
16
+ private readonly listeners;
17
+ private scheduled;
18
+ constructor(concurrency: number);
19
+ /** Queues a mounted image; the returned cleanup gives up its place. */
20
+ add(key: string, priority: number): () => void;
21
+ /** Loaded or failed: it keeps showing, and the next image may start. */
22
+ finish(key: string): void;
23
+ canLoad: (key: string) => boolean;
24
+ subscribe: (listener: () => void) => (() => void);
25
+ /**
26
+ * The images now on screen. One that scrolls off before it has loaded
27
+ * gives up its place and waits, so it can't hold up the ones in view:
28
+ * Android detaches a row scrolled out of view, and a detached image never
29
+ * finishes loading. Only images on screen are started.
30
+ */
31
+ setOnScreen(keys: Iterable<string>): void;
32
+ /** Scrolled out of the list before it loaded: it queues again if it comes back. */
33
+ private remove;
34
+ /**
35
+ * Hands out places once the render that mounted an image is done, so all
36
+ * the images mounted together are queued first, whatever order they
37
+ * mounted in.
38
+ */
39
+ private schedule;
40
+ /** Starts what fits; true when anything started (listeners were told). */
41
+ private advance;
42
+ private notify;
43
+ }
44
+ //# sourceMappingURL=image-load-queue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-load-queue.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/image-load-queue.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,qBAAa,cAAc;IAUb,OAAO,CAAC,QAAQ,CAAC,WAAW;IARxC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,4EAA4E;IAC5E,OAAO,CAAC,QAAQ,CAAoC;IACpD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAyB;IACnD,OAAO,CAAC,SAAS,CAAS;gBAEG,WAAW,EAAE,MAAM;IAEhD,uEAAuE;IACvE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,IAAI;IAQ9C,wEAAwE;IACxE,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAMzB,OAAO,GAAI,KAAK,MAAM,KAAG,OAAO,CAAgD;IAEhF,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAK9C;IAEF;;;;;OAKG;IACH,WAAW,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,IAAI;IAYzC,mFAAmF;IACnF,OAAO,CAAC,MAAM;IAKd;;;;OAIG;IACH,OAAO,CAAC,QAAQ;IAShB,0EAA0E;IAC1E,OAAO,CAAC,OAAO;IAoBf,OAAO,CAAC,MAAM;CAGf"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Agent replies with images between their paragraphs. Workstation marks such
3
+ * images `inline` among the message's attachments and keeps an `<img>` for
4
+ * each in the HTML body, where the teammate put it. Same split as the web
5
+ * Messenger, so both show the text and images in the order they were written.
6
+ */
7
+ import type { WidgetAttachment } from '../../types';
8
+ /** Markdown for the bubble to draw, or one attachment. */
9
+ export type MessagePart = {
10
+ text: string;
11
+ } | {
12
+ attachment: WidgetAttachment;
13
+ };
14
+ /**
15
+ * The body and its inline images in order, plus the other attachments
16
+ * (`files`) that show after them. Null when nothing is inline: the bubble then
17
+ * shows the body, followed by every attachment.
18
+ *
19
+ * An `<img>` finds its attachment by the id in its URL. In a body whose
20
+ * images carry no ids, they take the attachments in order instead; in one
21
+ * that does, an image without an id (a logo, an emoji) isn't one of the files
22
+ * and takes nothing. One whose id names no remaining attachment (the same file
23
+ * twice) takes nothing either. Inline attachments with no `<img>` go at the end.
24
+ */
25
+ export declare function splitInlineAttachments(body: string | null | undefined, attachments: WidgetAttachment[] | null | undefined): {
26
+ parts: MessagePart[];
27
+ files: WidgetAttachment[];
28
+ } | null;
29
+ //# sourceMappingURL=inline-attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inline-attachments.d.ts","sourceRoot":"","sources":["../../../../../src/ui/utils/inline-attachments.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpD,0DAA0D;AAC1D,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,UAAU,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAE9E;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC/B,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,GAAG,SAAS,GACjD;IAAE,KAAK,EAAE,WAAW,EAAE,CAAC;IAAC,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAAE,GAAG,IAAI,CA8B5D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repzo/widget-react-native",
3
- "version": "1.3.1",
3
+ "version": "1.5.0",
4
4
  "description": "Repzo chat widget for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",