@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
@@ -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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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"}
@@ -12,9 +12,21 @@ export declare function isTerminalErrorCode(code: string | null | undefined): bo
12
12
  export declare class RepzoWidgetError extends Error {
13
13
  readonly status: number;
14
14
  readonly code: RepzoWidgetErrorCode;
15
- constructor(message: string, status: number, code?: RepzoWidgetErrorCode);
15
+ /**
16
+ * Seconds Workstation asked to wait before trying again, on a 429
17
+ * (`Retry-After`). Undefined when it didn't say.
18
+ * @since 1.5.0
19
+ */
20
+ readonly retryAfter?: number;
21
+ constructor(message: string, status: number, code?: RepzoWidgetErrorCode, retryAfter?: number);
16
22
  /** Builds the error for a non-2xx `{ message, code }` body. */
17
- static fromResponse(status: number, body: unknown): RepzoWidgetError;
23
+ static fromResponse(status: number, body: unknown, retryAfterHeader?: string | null): RepzoWidgetError;
24
+ }
25
+ /** A file in storage, waiting for the message that names it. */
26
+ export interface UploadedFile {
27
+ uploadToken: string;
28
+ /** When Workstation stops taking `uploadToken`, on this phone's clock (ms). */
29
+ expiresAt: number;
18
30
  }
19
31
  export declare class WidgetApiClient {
20
32
  private baseUrl;
@@ -125,16 +137,18 @@ export declare class WidgetApiClient {
125
137
  /**
126
138
  * Puts a local file in storage ahead of the message, which then names it by
127
139
  * the returned upload token. The target is presigned storage, or a path on
128
- * the server where its storage can't presign. The file is read as a native
129
- * blob, so it never becomes a JS string; its size is the blob's, since the
130
- * upload URL is signed for exactly the size asked for.
140
+ * the server where its storage can't presign. The upload URL is signed for
141
+ * exactly the size asked for: a `file://` file whose size `expo-file-system`
142
+ * can read streams from disk, anything else is read as a native blob and
143
+ * measured. `signal` cancels the transfer (the visitor removed the file, or
144
+ * left the conversation). Resolves the token and when it expires.
131
145
  */
132
146
  uploadAttachment(file: {
133
147
  uri: string;
134
148
  name: string;
135
149
  contentType: string;
136
150
  size: number;
137
- }): Promise<string>;
151
+ }, signal?: AbortSignal): Promise<UploadedFile>;
138
152
  listConversations(): Promise<{
139
153
  data: Conversation[];
140
154
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../src/api/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,wBAAwB,EACxB,YAAY,EACZ,OAAO,EACP,eAAe,EACf,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,UAA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CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,GAAG,OAAO,CAAC,IAAI,CAAC;IAOjB,iBAAiB,CAAC,IAAI,EAAE;QACtB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjB,gGAAgG;IAChG,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInD,qEAAqE;IACrE,eAAe,CACb,KAAK,EAAE,MAAM,EACb,IAAI,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAO,GAC7D,OAAO,CAAC,IAAI,CAAC;CAOjB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Local file sizes from the host's `expo-file-system` (optional, like the
3
+ * pickers): read from the file's metadata, never from its contents. Shared by
4
+ * the pickers and the upload client, so the client doesn't pull in pickers.
5
+ *
6
+ * No `react-native` import on purpose: it stays testable in plain Node.
7
+ */
8
+ /** A positive, finite byte count, or null. */
9
+ export declare function validSize(size: unknown): number | null;
10
+ /**
11
+ * A local file's exact size in bytes, from its metadata without reading it.
12
+ * Null without `expo-file-system`, or when it can't tell.
13
+ */
14
+ export declare function measureFileSize(uri: string): Promise<number | null>;
15
+ //# sourceMappingURL=file-size.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-size.d.ts","sourceRoot":"","sources":["../../../../src/attachments/file-size.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,8CAA8C;AAC9C,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEtD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAiBzE"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The phone's copy of each file the visitor sent, by the URL of the stored
3
+ * copy that replaced it in the thread. Right after a send the stored copy
4
+ * may not load yet (Workstation can still be storing it), so a photo keeps
5
+ * showing from the phone instead of turning into a file row. Kept in memory
6
+ * only: a later session shows the stored copy.
7
+ */
8
+ export declare function rememberLocalPreview(storedUrl: string, localUrl: string): void;
9
+ export declare function localPreviewFor(storedUrl: string): string | null;
10
+ /** One that failed to load (the OS cleared the picker's cache): every view moves to the stored copy. */
11
+ export declare function forgetLocalPreview(storedUrl: string): void;
12
+ /** Signing out forgets them: the next visitor on the phone doesn't inherit the paths. */
13
+ export declare function clearLocalPreviews(): void;
14
+ //# sourceMappingURL=local-previews.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-previews.d.ts","sourceRoot":"","sources":["../../../../src/attachments/local-previews.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAM9E;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAEhE;AAED,wGAAwG;AACxG,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE1D;AAED,yFAAyF;AACzF,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
@@ -2,7 +2,7 @@
2
2
  * Visitor attachments: picking photos/files for `POST /api/widget/messages`.
3
3
  *
4
4
  * A server that takes uploads names its cap (`maxAttachmentBytes`): a picked
5
- * file then stays a local URI and is uploaded when the message is sent. An
5
+ * file then stays a local URI, which the composer uploads right away. An
6
6
  * older server only takes files inline, as base64 data URLs within the
7
7
  * 1.5 MB / 6 MB caps below.
8
8
  *
@@ -42,10 +42,19 @@ export interface DraftAttachment {
42
42
  size: number;
43
43
  /** `data:<mime>;base64,<…>` for an inline file; empty when `fileUri` is uploaded instead. */
44
44
  dataUrl: string;
45
- /** The local file uploaded when the message is sent. */
45
+ /** The local file uploaded ahead of the message. */
46
46
  fileUri?: string;
47
47
  /** What `<Image>` renders locally: the picked file's URI, else the data URL. */
48
48
  previewUri: string;
49
+ /**
50
+ * Where `fileUri`'s upload stands. The composer starts it as soon as the
51
+ * file is picked and holds Send until every file is up. Absent for inline files.
52
+ */
53
+ uploadStatus?: 'uploading' | 'uploaded' | 'failed';
54
+ /** What the message names the uploaded file by, once `uploadStatus` is `uploaded`. */
55
+ uploadToken?: string;
56
+ /** When `uploadToken` stops working, on this phone's clock (ms). */
57
+ uploadExpiresAt?: number;
49
58
  }
50
59
  /** Why some (or all) of a pick didn't make it into the composer. */
51
60
  export type AttachmentProblem = 'tooMany' | 'tooLarge' | 'tooLargeTogether' | 'cameraDenied' | 'failed';
@@ -56,6 +65,8 @@ export interface PickResult {
56
65
  }
57
66
  /** Set from `boot({ attachments })`; `null` restores auto-detection. */
58
67
  export declare function setAttachmentOptions(options: RepzoWidgetAttachmentOptions | null): void;
68
+ /** Whether a picked file starts uploading before Send (`attachments.uploadOnPick`). */
69
+ export declare function uploadsOnPick(): boolean;
59
70
  /**
60
71
  * The options the attach menu offers, in menu order. Empty means no button:
61
72
  * attachments were switched off by the host, or nothing can pick a file.
@@ -90,4 +101,6 @@ export declare function base64ByteLength(base64: string): number;
90
101
  /** `1.2 MB`, `340 KB` — for chips; the limits themselves use decimal units too. */
91
102
  export declare function formatBytes(bytes: number): string;
92
103
  export declare function isImageAttachment(contentType: string | null | undefined): boolean;
104
+ /** The type a file name's extension implies, or null for one this table doesn't know. */
105
+ export declare function guessContentType(nameOrUri: string | null | undefined): string | null;
93
106
  //# sourceMappingURL=pickers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pickers.d.ts","sourceRoot":"","sources":["../../../../src/attachments/pickers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,E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,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAIpF;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGxD;AAED,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIjD;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEjF;AAqCD,yFAAyF;AACzF,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAGpF"}
@@ -20,6 +20,10 @@ export declare const DEFAULT_LABELS: {
20
20
  readonly loadEarlier: "Load earlier messages";
21
21
  readonly emptyConversation: "Send a message to start the conversation";
22
22
  readonly messagePlaceholder: "Type a message...";
23
+ readonly sendMessage: "Send message";
24
+ readonly jumpToLatest: "Jump to latest messages";
25
+ readonly jumpToLatestNew: "New messages: {count}. Jump to latest";
26
+ readonly morePhotos: "{count} more photos";
23
27
  readonly attachFile: "Attach file";
24
28
  readonly attachPhotoLibrary: "Photo library";
25
29
  readonly attachTakePhoto: "Take photo";
@@ -29,12 +33,16 @@ export declare const DEFAULT_LABELS: {
29
33
  readonly attachmentTooMany: "You can attach up to {count} files";
30
34
  readonly attachmentsTooLargeTogether: "Attachments are too large to send together — send some in another message";
31
35
  readonly attachmentFailed: "Couldn't attach that file";
36
+ readonly attachmentUploading: "Uploading {name}";
37
+ readonly attachmentUploadFailed: "Couldn't upload {name}. Tap to try again";
38
+ readonly attachmentsUploadFailed: "Couldn't upload a file. Tap it to try again";
32
39
  readonly openAttachment: "Open {name}";
33
40
  readonly voicePlay: "Play voice message";
34
41
  readonly voicePause: "Pause voice message";
35
42
  readonly voiceSpeed: "Playback speed";
36
43
  readonly imageLoadFailed: "Couldn't load this image";
37
44
  readonly openImageExternally: "Open image";
45
+ readonly imagePosition: "{current} of {total}";
38
46
  readonly cameraPermissionDenied: "Allow camera access in Settings to take a photo";
39
47
  readonly cancel: "Cancel";
40
48
  readonly failedToSend: "Failed to send";
@@ -48,13 +56,14 @@ export declare const DEFAULT_LABELS: {
48
56
  readonly preChatSubtitle: "Let us know a bit about you so we can help you better.";
49
57
  readonly preChatSkip: "Skip";
50
58
  readonly preChatSubmit: "Start chat";
51
- readonly viewPreviousConversations: "View previous conversations";
52
- readonly homeRecentTitle: "Recent";
53
- readonly homeViewAllCount: "View all ({count})";
59
+ readonly homeRecentMessageTitle: "Recent message";
54
60
  readonly homeNoConversations: "Your conversations will show up here";
55
61
  readonly homeStatusOnline: "We're online";
56
62
  readonly homeStatusAway: "We're away";
57
63
  readonly unreadBadge: "{count} unread";
64
+ readonly lastMessagePhoto: "Photo";
65
+ readonly lastMessageFile: "File";
66
+ readonly lastMessageYou: "You: {message}";
58
67
  readonly team: "Team";
59
68
  readonly home: "Home";
60
69
  readonly close: "Close";
@@ -1 +1 @@
1
- {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/i18n.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;AAEnE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAYxF;AAeD,iFAAiF;AACjF,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAQpG;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;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AE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAI7F;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,UAAU,GAAG,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAM3E"}
@@ -43,6 +43,11 @@ export type RepzoWidgetType = {
43
43
  /**
44
44
  * Attach custom attributes to the visitor's identity so agents see them on
45
45
  * the conversation (max 30 keys, 64-char keys, 512-char values).
46
+ *
47
+ * Since 1.5.0 calls are paced (see `BootOptions.throttleUpdateUser`):
48
+ * values Workstation already has are skipped, and once more than 20 updates
49
+ * go out in 30 minutes the rest are merged and sent later. Those calls
50
+ * resolve right away. A call sent straight away still rejects when it fails.
46
51
  */
47
52
  updateUser(attributes: WidgetCustomAttributes): Promise<void>;
48
53
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5F,OAAO,KAAK,EACV,WAAW,EACX,yBAAyB,EACzB,sBAAsB,EACtB,eAAe,EACf,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,QAAQ,IAAI,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,YAAY,EACV,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,iBAA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,OAAO,EAAE,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAAC;IAEnE;;;;OAIG;IACH,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzE;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzG;;;;;;;;OAQG;IACH,sBAAsB,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,OAAO,CAAC;CAClG,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,eA8ClB,CAAC;AAEF,eAAe,WAAW,CAAC;AAC3B,OAAO,EAAE,iBAAiB,IAAI,MAAM,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,KAAK,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,OAAO,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AAqIrE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;AAErE,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE3D"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/locales.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C,KAAK,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,OAAO,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;AA8IrE,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAU,CAAC;AAErE,gEAAgE;AAChE,wBAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAE3D"}