@repzo/widget-react-native 1.0.9 → 1.1.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 (144) hide show
  1. package/CHANGELOG.md +365 -0
  2. package/README.md +55 -4
  3. package/lib/commonjs/agent-ui-blocks.js +2 -1
  4. package/lib/commonjs/agent-ui-blocks.js.map +1 -1
  5. package/lib/commonjs/attachments/pickers.js +3 -6
  6. package/lib/commonjs/attachments/pickers.js.map +1 -1
  7. package/lib/commonjs/device-id.js +31 -3
  8. package/lib/commonjs/device-id.js.map +1 -1
  9. package/lib/commonjs/i18n.js +26 -4
  10. package/lib/commonjs/i18n.js.map +1 -1
  11. package/lib/commonjs/locales.js +21 -1
  12. package/lib/commonjs/locales.js.map +1 -1
  13. package/lib/commonjs/push/push-notifications.js +0 -1
  14. package/lib/commonjs/push/push-notifications.js.map +1 -1
  15. package/lib/commonjs/state/widget-store.js +57 -20
  16. package/lib/commonjs/state/widget-store.js.map +1 -1
  17. package/lib/commonjs/storage.js +13 -1
  18. package/lib/commonjs/storage.js.map +1 -1
  19. package/lib/commonjs/types.js +6 -3
  20. package/lib/commonjs/types.js.map +1 -1
  21. package/lib/commonjs/ui/WidgetProvider.js +74 -47
  22. package/lib/commonjs/ui/WidgetProvider.js.map +1 -1
  23. package/lib/commonjs/ui/components/AgentUiBlocks.js +35 -15
  24. package/lib/commonjs/ui/components/AgentUiBlocks.js.map +1 -1
  25. package/lib/commonjs/ui/components/Launcher.js +4 -1
  26. package/lib/commonjs/ui/components/Launcher.js.map +1 -1
  27. package/lib/commonjs/ui/components/Markdown.js +32 -2
  28. package/lib/commonjs/ui/components/Markdown.js.map +1 -1
  29. package/lib/commonjs/ui/components/RatingCard.js +6 -3
  30. package/lib/commonjs/ui/components/RatingCard.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/use-widget-insets.js +0 -1
  32. package/lib/commonjs/ui/hooks/use-widget-insets.js.map +1 -1
  33. package/lib/commonjs/ui/screens/chat/ChatView.js +67 -29
  34. package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -1
  35. package/lib/commonjs/ui/utils/html.js +8 -1
  36. package/lib/commonjs/ui/utils/html.js.map +1 -1
  37. package/lib/commonjs/ui/utils/native-gradient.js +0 -1
  38. package/lib/commonjs/ui/utils/native-gradient.js.map +1 -1
  39. package/lib/module/agent-ui-blocks.js +2 -1
  40. package/lib/module/agent-ui-blocks.js.map +1 -1
  41. package/lib/module/attachments/pickers.js +3 -6
  42. package/lib/module/attachments/pickers.js.map +1 -1
  43. package/lib/module/device-id.js +31 -3
  44. package/lib/module/device-id.js.map +1 -1
  45. package/lib/module/i18n.js +26 -4
  46. package/lib/module/i18n.js.map +1 -1
  47. package/lib/module/locales.js +21 -1
  48. package/lib/module/locales.js.map +1 -1
  49. package/lib/module/push/push-notifications.js +0 -1
  50. package/lib/module/push/push-notifications.js.map +1 -1
  51. package/lib/module/state/widget-store.js +58 -20
  52. package/lib/module/state/widget-store.js.map +1 -1
  53. package/lib/module/storage.js +13 -1
  54. package/lib/module/storage.js.map +1 -1
  55. package/lib/module/types.js +6 -3
  56. package/lib/module/types.js.map +1 -1
  57. package/lib/module/ui/WidgetProvider.js +74 -47
  58. package/lib/module/ui/WidgetProvider.js.map +1 -1
  59. package/lib/module/ui/components/AgentUiBlocks.js +35 -15
  60. package/lib/module/ui/components/AgentUiBlocks.js.map +1 -1
  61. package/lib/module/ui/components/Launcher.js +4 -1
  62. package/lib/module/ui/components/Launcher.js.map +1 -1
  63. package/lib/module/ui/components/Markdown.js +32 -3
  64. package/lib/module/ui/components/Markdown.js.map +1 -1
  65. package/lib/module/ui/components/RatingCard.js +6 -3
  66. package/lib/module/ui/components/RatingCard.js.map +1 -1
  67. package/lib/module/ui/hooks/use-widget-insets.js +0 -1
  68. package/lib/module/ui/hooks/use-widget-insets.js.map +1 -1
  69. package/lib/module/ui/screens/chat/ChatView.js +68 -30
  70. package/lib/module/ui/screens/chat/ChatView.js.map +1 -1
  71. package/lib/module/ui/utils/html.js +8 -1
  72. package/lib/module/ui/utils/html.js.map +1 -1
  73. package/lib/module/ui/utils/native-gradient.js +0 -1
  74. package/lib/module/ui/utils/native-gradient.js.map +1 -1
  75. package/lib/typescript/commonjs/agent-ui-blocks.d.ts.map +1 -1
  76. package/lib/typescript/commonjs/attachments/pickers.d.ts.map +1 -1
  77. package/lib/typescript/commonjs/device-id.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/i18n.d.ts +22 -1
  79. package/lib/typescript/commonjs/i18n.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/locales.d.ts.map +1 -1
  81. package/lib/typescript/commonjs/push/push-notifications.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/state/widget-store.d.ts +13 -7
  83. package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/storage.d.ts.map +1 -1
  85. package/lib/typescript/commonjs/types.d.ts +14 -8
  86. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  87. package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -1
  88. package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts +14 -0
  89. package/lib/typescript/commonjs/ui/components/AgentUiBlocks.d.ts.map +1 -1
  90. package/lib/typescript/commonjs/ui/components/Launcher.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/ui/components/Markdown.d.ts +8 -0
  92. package/lib/typescript/commonjs/ui/components/Markdown.d.ts.map +1 -1
  93. package/lib/typescript/commonjs/ui/components/RatingCard.d.ts.map +1 -1
  94. package/lib/typescript/commonjs/ui/hooks/use-widget-insets.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -1
  96. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +10 -0
  97. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  98. package/lib/typescript/commonjs/ui/utils/html.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/ui/utils/native-gradient.d.ts.map +1 -1
  100. package/lib/typescript/module/agent-ui-blocks.d.ts.map +1 -1
  101. package/lib/typescript/module/attachments/pickers.d.ts.map +1 -1
  102. package/lib/typescript/module/device-id.d.ts.map +1 -1
  103. package/lib/typescript/module/i18n.d.ts +22 -1
  104. package/lib/typescript/module/i18n.d.ts.map +1 -1
  105. package/lib/typescript/module/locales.d.ts.map +1 -1
  106. package/lib/typescript/module/push/push-notifications.d.ts.map +1 -1
  107. package/lib/typescript/module/state/widget-store.d.ts +13 -7
  108. package/lib/typescript/module/state/widget-store.d.ts.map +1 -1
  109. package/lib/typescript/module/storage.d.ts.map +1 -1
  110. package/lib/typescript/module/types.d.ts +14 -8
  111. package/lib/typescript/module/types.d.ts.map +1 -1
  112. package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -1
  113. package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts +14 -0
  114. package/lib/typescript/module/ui/components/AgentUiBlocks.d.ts.map +1 -1
  115. package/lib/typescript/module/ui/components/Launcher.d.ts.map +1 -1
  116. package/lib/typescript/module/ui/components/Markdown.d.ts +8 -0
  117. package/lib/typescript/module/ui/components/Markdown.d.ts.map +1 -1
  118. package/lib/typescript/module/ui/components/RatingCard.d.ts.map +1 -1
  119. package/lib/typescript/module/ui/hooks/use-widget-insets.d.ts.map +1 -1
  120. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -1
  121. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +10 -0
  122. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  123. package/lib/typescript/module/ui/utils/html.d.ts.map +1 -1
  124. package/lib/typescript/module/ui/utils/native-gradient.d.ts.map +1 -1
  125. package/package.json +14 -4
  126. package/src/agent-ui-blocks.ts +2 -1
  127. package/src/attachments/pickers.ts +3 -6
  128. package/src/device-id.ts +34 -3
  129. package/src/i18n.ts +25 -2
  130. package/src/locales.ts +20 -0
  131. package/src/push/push-notifications.ts +0 -1
  132. package/src/state/widget-store.ts +52 -19
  133. package/src/storage.ts +18 -1
  134. package/src/types.ts +14 -8
  135. package/src/ui/WidgetProvider.tsx +88 -46
  136. package/src/ui/components/AgentUiBlocks.tsx +40 -12
  137. package/src/ui/components/Launcher.tsx +6 -1
  138. package/src/ui/components/Markdown.tsx +34 -3
  139. package/src/ui/components/RatingCard.tsx +6 -2
  140. package/src/ui/hooks/use-widget-insets.ts +0 -1
  141. package/src/ui/screens/chat/ChatView.tsx +77 -42
  142. package/src/ui/screens/chat/ChatView.types.ts +10 -0
  143. package/src/ui/utils/html.ts +9 -1
  144. package/src/ui/utils/native-gradient.ts +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,365 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@repzo/widget-react-native`, newest first.
4
+
5
+ - **Upgrading** says what you have to do when you move to that version. A
6
+ version without it is a drop-in update.
7
+ - **Older versions** says what visitors see in apps that haven't updated yet.
8
+ - Versions follow [semver](https://semver.org): patch and minor releases don't
9
+ require code changes in your app. When a new feature shows up by default, it
10
+ comes with an opt-out and an **Upgrading** note. Anything breaking waits for
11
+ a major release and comes with step-by-step upgrade notes.
12
+
13
+ ## Unreleased
14
+
15
+ ## 1.1.0 — 2026-10-05
16
+
17
+ ### Added
18
+
19
+ - **More of the widget is translatable.** Order totals, appointment pickers,
20
+ quote validity, the "Share details" form and the launcher's screen-reader
21
+ label now use translatable text: Workstation translations override it, and
22
+ Arabic ships built in. English text is unchanged.
23
+ - **`expo-crypto` support.** On runtimes without a `crypto` global (Hermes
24
+ without a polyfill), the anonymous device id now comes from `expo-crypto`
25
+ when the app has it installed, instead of `Math.random`. It's a new optional
26
+ peer: nothing changes for apps without it.
27
+
28
+ ### Changed
29
+
30
+ - This changelog now ships inside the package
31
+ (`node_modules/@repzo/widget-react-native/CHANGELOG.md`).
32
+ - Long conversations stay responsive: typing a message or a live update no
33
+ longer re-renders every message in the thread.
34
+ - After **Done**, the rating card stays closed, including when the visitor
35
+ reopens the conversation. Tapping the chosen face opens the comment box
36
+ again.
37
+
38
+ ### Fixed
39
+
40
+ - Editor hover docs for `RepzoWidgetErrorCode` show again (1.0.6 detached them).
41
+ - The offline message shows in the visitor's language when Workstation has a
42
+ translation for it, the same way the welcome text does.
43
+ - The SDK reports its real version to Workstation again. 1.0.6 to 1.0.9
44
+ reported themselves as 1.0.5.
45
+ - Characters written as numeric HTML entities, such as emoji (`😀`,
46
+ `😀`), now show correctly in messages.
47
+ - Product photos in agent cards, and the avatar on a live "joined the
48
+ conversation" line, now load when Workstation sends a relative path.
49
+
50
+ ### Security
51
+
52
+ - A link whose text reads as a web address on a different site than the one
53
+ it opens now shows the real address, so `[yourbank.com](https://other.example)`
54
+ in a reply can't pass for your bank.
55
+ - Product photos in agent cards and the avatar on a live "joined" line only
56
+ load from `http`/`https` addresses, like every other image in the widget.
57
+ - Development builds warn once when the visitor token is about to be stored
58
+ in plain text (no secure storage adapter), and when the device id has to
59
+ fall back to `Math.random`.
60
+
61
+ ### Upgrading
62
+
63
+ - **Two new development-build warnings.** They never show in release builds.
64
+ To clear them, store the token in the Keychain/Keystore and give the SDK a
65
+ secure random source:
66
+
67
+ ```ts
68
+ import * as SecureStore from 'expo-secure-store';
69
+
70
+ RepzoWidget.setSecureStorageAdapter({
71
+ getItem: (key) => SecureStore.getItemAsync(key),
72
+ setItem: (key, value) => SecureStore.setItemAsync(key, value),
73
+ removeItem: (key) => SecureStore.deleteItemAsync(key),
74
+ });
75
+ ```
76
+
77
+ ```sh
78
+ npx expo install expo-crypto
79
+ ```
80
+
81
+ Bare React Native apps can instead install `react-native-get-random-values`
82
+ and `import 'react-native-get-random-values';` at the top of `index.js`.
83
+
84
+ ## 1.0.9 — 2026-10-05
85
+
86
+ ### Added
87
+
88
+ - **Signup dates.** `loginUserWithUserAttributes()` (and `boot({ user })`)
89
+ take an optional `signedUpAt`: a `Date`, unix seconds or milliseconds, or
90
+ an ISO string. Workstation shows it as "Signed up" in the inbox.
91
+
92
+ ### Known issues
93
+
94
+ - This version reports itself to Workstation as `1.0.5` in its `sdkVersion`.
95
+
96
+ ## 1.0.8 — 2026-10-04
97
+
98
+ ### Added
99
+
100
+ - **Account identification.** `loginUserWithUserAttributes()` (and
101
+ `boot({ user })`) take an optional `account: { id, name?, website? }` that
102
+ links the visitor to their company in Workstation. Accounts are matched by
103
+ `id`, so a renamed account updates the same record. New exported type
104
+ `WidgetUserAccount`.
105
+
106
+ ### Changed
107
+
108
+ - The identity verification docs now say to sign `userId` when you send one,
109
+ and `email` only when you don't.
110
+
111
+ ### Known issues
112
+
113
+ - This version reports itself to Workstation as `1.0.5` in its `sdkVersion`.
114
+
115
+ ## 1.0.7 — 2026-10-04
116
+
117
+ ### Changed
118
+
119
+ - The rating card's comment is optional. With nothing typed, its button reads
120
+ **Done** and closes the comment box. The face (and reason) are already
121
+ saved.
122
+
123
+ ### Known issues
124
+
125
+ - This version reports itself to Workstation as `1.0.5` in its `sdkVersion`.
126
+
127
+ ## 1.0.6 — 2026-10-04
128
+
129
+ ### Added
130
+
131
+ - **Conversation ratings.** Two minutes after a teammate closes a
132
+ conversation, a rating card can appear in the thread: five faces from
133
+ Terrible to Amazing. Tapping a face saves it right away. After a bad rating
134
+ (Terrible or Bad) the visitor can pick a reason, labelled in their language.
135
+ An optional comment locks the rating. Once the change window passes, or the
136
+ rating is locked, the card says so instead of accepting changes. Workstation
137
+ sends the card. There is nothing to set up in the app.
138
+
139
+ ### Older versions
140
+
141
+ - Apps on 1.0.5 or older show the rating request as a plain system line and
142
+ the visitor can't answer it.
143
+
144
+ ### Known issues
145
+
146
+ - This version reports itself to Workstation as `1.0.5` in its `sdkVersion`.
147
+
148
+ ## 1.0.5 — 2026-10-01
149
+
150
+ ### Fixed
151
+
152
+ - The home screen logo and background image now load. They used to resolve
153
+ against the wrong host, so the logo never showed.
154
+ - The home logo keeps its own shape (40 px tall, up to 152 px wide) and sits
155
+ flush left, like the web widget.
156
+
157
+ ### Changed
158
+
159
+ - The home and chat screens paint the brand header under the status bar
160
+ instead of a white strip above it. Other screens keep a white top. Status
161
+ bar icons follow the header colour. On Android the messenger is translucent,
162
+ so the inset isn't applied twice.
163
+ - "Fade background to blend in" now fades smoothly, with no visible band.
164
+
165
+ ## 1.0.4 — 2026-10-01
166
+
167
+ Includes 1.0.2 and 1.0.3, which were tagged in git but never published to npm.
168
+
169
+ ### Added
170
+
171
+ - **Sent** and **Seen** receipts under the visitor's messages.
172
+ - Chat header: the workspace name with up to three teammate avatars until a
173
+ teammate joins, then that teammate's photo, name and own presence
174
+ (Active / Away). "Waiting for a teammate" shows while the visitor is waiting
175
+ for a person to reply.
176
+ - Messages a teammate deleted show "This message was deleted" instead of
177
+ disappearing.
178
+ - The welcome greeting, introduction, start button and reply-time text use the
179
+ visitor's language when Workstation has translations for it. Otherwise they
180
+ fall back to the default language.
181
+ - New exported fields: `Conversation.workspaceName`, `teamAvatars`,
182
+ `agentOnline` and `Message.deletedAt`. All optional, because older
183
+ Workstation deployments don't send them.
184
+
185
+ ## 1.0.1 — 2026-09-29
186
+
187
+ The same code was briefly tagged in git as `v1.1.0` to `v1.2.1` before the
188
+ version number was reset. Those versions were never on npm. If you installed
189
+ one of those tags from git, switch to npm 1.0.1 or later.
190
+
191
+ ### Added
192
+
193
+ - **Photo and file attachments** from a paperclip button in the composer. It
194
+ uses `expo-image-picker` and `expo-document-picker` when the app has them,
195
+ or your own picker through `boot({ attachments: { pick } })`. Limits are 5
196
+ files per message, 1.5 MB each and 6 MB in total. With the optional
197
+ `expo-image-manipulator`, photos are shrunk to fit. A failed send keeps its
198
+ attachments in the composer for a retry. New optional peers:
199
+ `expo-image-picker`, `expo-document-picker`, `expo-file-system`,
200
+ `expo-image-manipulator`.
201
+ - Image attachments open in a full-screen viewer inside the messenger. Other
202
+ files still open externally.
203
+ - **In-app notifications**: when a team reply arrives while the app is open
204
+ and the messenger is closed, a card slides up. Tapping it opens the
205
+ conversation; swiping it dismisses it. Replies that arrived while the app
206
+ was closed get the card once at launch. New `boot({ inAppNotifications })`
207
+ option and `useWidgetState().inAppNotification`.
208
+ - New exported types: `AttachmentSource`, `InAppNotification`,
209
+ `RepzoPickedFile`, `RepzoWidgetAttachmentOptions`.
210
+
211
+ ### Changed
212
+
213
+ - `withRepzoWidget` (`@repzo/widget-react-native/metro`) only turns on Metro's
214
+ `allowOptionalDependencies` now. The custom resolver it installed in 1.0.0
215
+ crashed Expo development builds at startup with
216
+ `Property 'MessageQueue' doesn't exist`. The standard Expo and React Native
217
+ Metro configs don't need the wrapper at all.
218
+
219
+ ### Upgrading from 1.0.0
220
+
221
+ - **In-app notification cards are on by default.** They need
222
+ `<RepzoWidgetProvider>` mounted at the root. To keep 1.0.0's behaviour:
223
+
224
+ ```ts
225
+ await RepzoWidget.boot({ channelAccountId: '<widget id>', inAppNotifications: false });
226
+ ```
227
+
228
+ - **The attach button appears by itself** if your app already has
229
+ `expo-image-picker` or `expo-document-picker` and the channel allows
230
+ attachments. Taking photos needs `NSCameraUsageDescription` in `Info.plist`.
231
+ To hide the button:
232
+
233
+ ```ts
234
+ await RepzoWidget.boot({ channelAccountId: '<widget id>', attachments: { enabled: false } });
235
+ ```
236
+
237
+ - **If you added `withRepzoWidget` to `metro.config.js` for 1.0.0**, you can
238
+ remove it if you use the standard Expo or React Native config, or keep it,
239
+ since it's harmless now. Restart Metro with a clean cache afterwards
240
+ (`npx expo start --clear` or `npx react-native start --reset-cache`).
241
+
242
+ ## 1.0.0 — 2026-09-28
243
+
244
+ First release on npm. Earlier versions were installed from git tags.
245
+
246
+ ### Changed
247
+
248
+ - Realtime runs on React Native's built-in streaming `XMLHttpRequest`. The
249
+ package no longer depends on `react-native-sse`, so it has no runtime
250
+ dependencies of its own.
251
+ - `react-native-safe-area-context` is an optional peer, used for safe-area
252
+ insets when installed.
253
+ - New `@repzo/widget-react-native/metro` helper (`withRepzoWidget`). Replaced
254
+ in 1.0.1, so use 1.0.1 or later.
255
+
256
+ ### Fixed
257
+
258
+ - The live connection reconnects with backoff after network failures and
259
+ dropped streams.
260
+ - Loading older messages no longer races with new ones.
261
+
262
+ ### Upgrading from 0.1.x (git installs)
263
+
264
+ - Install from npm instead of the git URL, and go straight to 1.0.1 or later:
265
+
266
+ ```sh
267
+ npm uninstall @repzo/widget-react-native
268
+ npm install @repzo/widget-react-native
269
+ ```
270
+
271
+ ## 0.1.x — git-tag releases (2026-09-16 to 2026-09-27)
272
+
273
+ These were installed from git tags and never published to npm.
274
+
275
+ ### 0.1.11 — 2026-09-27
276
+
277
+ - Fixed: the web design flashed on mobile at launch. The cached theme now
278
+ remembers which channel, server and platform it came from, and the old cache
279
+ is cleared once.
280
+
281
+ ### 0.1.10 — 2026-09-27
282
+
283
+ Includes 0.1.9, which was never tagged.
284
+
285
+ - Security: sign-in, sign-out and boot calls run one at a time, and the last
286
+ call wins. `logout()` revokes the token, removes the push registration,
287
+ wipes visitor data and rotates the device id. New `setSecureStorageAdapter`
288
+ keeps the token in Keychain/Keystore. Typed error codes
289
+ (`messenger_api_disabled`, `identity_verification_failed`). New `onOpenUrl`
290
+ boot option.
291
+ - Reliability: an error screen with Retry instead of a chat that only looks
292
+ usable. No duplicate sends while a conversation is being created. Replies
293
+ always land in the right thread. Opening a thread reports the read to the
294
+ server. Error boundaries keep a bad message from crashing the host app.
295
+
296
+ **Upgrading — breaking changes:**
297
+
298
+ - `getUnreadConversationCount()` now returns the number of conversations with
299
+ unread replies. For the old number (total unread messages) use
300
+ `getUnreadMessageCount()`.
301
+ - Links in messages only open `https:`, `http:`, `mailto:` and `tel:`. To open
302
+ your own deep links, pass `onOpenUrl` and return `true` for links you
303
+ handled:
304
+
305
+ ```ts
306
+ await RepzoWidget.boot({
307
+ channelAccountId: '<widget id>',
308
+ onOpenUrl: (url) => {
309
+ if (!url.startsWith('myapp://')) return false;
310
+ Linking.openURL(url);
311
+ return true;
312
+ },
313
+ });
314
+ ```
315
+
316
+ - `boot()` throws for a plain `http://` `baseUrl` outside `__DEV__` builds
317
+ (local addresses excepted). Use `https://`.
318
+ - Call `await RepzoWidget.logout()` in your sign-out flow, before the next
319
+ person can use the device.
320
+ - Recommended: store the token in Keychain/Keystore with
321
+ `setSecureStorageAdapter` (see the README).
322
+
323
+ ### 0.1.8 — 2026-09-23
324
+
325
+ - The last theme is cached on the device, so relaunches paint your colours
326
+ instantly.
327
+
328
+ ### 0.1.7 — 2026-09-23
329
+
330
+ - Opening a conversation lands on the newest message. "Load earlier" keeps
331
+ your place.
332
+
333
+ ### 0.1.6 — 2026-09-23
334
+
335
+ - Unread counts come from the server, so replies that arrived while the app
336
+ was killed count after a cold start.
337
+ - New `ConversationDidRead` event, for clearing that conversation's push
338
+ notification.
339
+
340
+ ### 0.1.5 — 2026-09-23
341
+
342
+ - Supports the modular API of `@react-native-firebase/messaging` v26.
343
+
344
+ ### 0.1.4 — 2026-09-22
345
+
346
+ - FCM push notifications: `boot({ push })` and `setPushToken()`. New optional
347
+ peer `@react-native-firebase/messaging`.
348
+
349
+ ### 0.1.3 — 2026-09-22
350
+
351
+ - New `MessageDidArrive` event for team replies. Replayed messages after a
352
+ reconnect no longer count twice.
353
+
354
+ ### 0.1.2 — 2026-09-21
355
+
356
+ - Home and pre-chat screens, RTL layout support.
357
+
358
+ ### 0.1.1 — 2026-09-16
359
+
360
+ - `baseUrl` defaults to production Workstation, so `boot()` only needs
361
+ `channelAccountId`. `present()` before `boot()` is a warned no-op.
362
+
363
+ ### 0.1.0 — 2026-09-16
364
+
365
+ - First standalone release.
package/README.md CHANGED
@@ -21,10 +21,13 @@ in your Repzo Inbox and agent replies arrive live.
21
21
  - Session resume, anonymous → identified migration, HMAC identity verification
22
22
  - Shared-device safe: logout revokes the token and wipes all visitor data; tokens can live in Keychain/Keystore
23
23
  - Live agent replies, typing indicators, unread badges (server-backed counts)
24
+ - Sent/Seen receipts, teammate avatars and presence, deleted-message placeholders
24
25
  - Catches up after a dropped connection or a trip to the background — no missed or duplicated replies
25
26
  - Agent UI blocks: product cards, slot pickers, lead forms, quotes, receipts
26
27
  - **Photo and file attachments** (optional — with `expo-image-picker` / `expo-document-picker`, or your own picker)
28
+ - **In-app notification cards** for new replies while the messenger is closed
27
29
  - **Push notifications via FCM** (optional — needs `@react-native-firebase/messaging` in the host app)
30
+ - Conversation ratings after a teammate closes the chat
28
31
  - Theme cached on-device, so relaunches paint your colors instantly
29
32
  - Events for building your own badge, in-app banner, and tray cleanup
30
33
 
@@ -41,9 +44,15 @@ in your Repzo Inbox and agent replies arrive live.
41
44
  | `expo-document-picker` | optional — "File" attachments |
42
45
  | `expo-file-system` | optional — reads picked files as base64 (falls back to `fetch` without it) |
43
46
  | `expo-image-manipulator` | optional — shrinks photos so camera shots fit the 1.5 MB attachment limit |
47
+ | `expo-crypto` | optional (*1.1.0+*) — secure random source for the anonymous device id when the runtime has no `crypto` global (see below) |
44
48
 
45
49
  Realtime uses React Native’s built-in streaming XMLHttpRequest; there are no bundled runtime dependencies.
46
50
 
51
+ *1.1.0+.* The anonymous device id needs a secure random source. Hermes has no `crypto`
52
+ global, so install `expo-crypto` (Expo), or `react-native-get-random-values`
53
+ imported at the top of `index.js` (bare React Native). Without either, the id
54
+ falls back to `Math.random` and development builds log a warning.
55
+
47
56
  ## Installation
48
57
 
49
58
  Published on npm as
@@ -87,8 +96,7 @@ Expo: no config plugin and no `npx expo prebuild` needed — the SDK itself runs
87
96
  in **Expo Go**. (Push notifications are the one exception: they need a
88
97
  development build, see below.)
89
98
 
90
- To upgrade later: `npm install @repzo/widget-react-native@latest` (or
91
- `yarn upgrade @repzo/widget-react-native --latest`).
99
+ To upgrade later, see [Upgrading](#upgrading).
92
100
 
93
101
  ## Metro setup
94
102
 
@@ -223,6 +231,8 @@ instead — same adapter shape, set **before** the first `boot()`. Without a
223
231
  secure adapter they fall back to the regular store above; with one, a token
224
232
  already in the regular store is moved over on first read. If a secure write
225
233
  fails the token is kept in memory only (never written as plaintext).
234
+ From 1.1.0, development builds log a one-time warning when the token is about
235
+ to be stored without a secure adapter.
226
236
 
227
237
  `expo-secure-store` (`npx expo install expo-secure-store`):
228
238
 
@@ -287,6 +297,11 @@ await RepzoWidget.boot({
287
297
  Only accept deep links you would be comfortable with *anyone* sending your
288
298
  user in a chat message.
289
299
 
300
+ *1.1.0+.* Link text can't disguise where a link goes: when the text of a link reads as a
301
+ web address on a different site than the one it opens, the widget shows the
302
+ real address instead, so `[yourbank.com](https://other.example)` can't pass for
303
+ your bank. Ordinary link text ("Book here") is shown as written.
304
+
290
305
  ## Attachments
291
306
 
292
307
  Visitors can send photos and files from the paperclip button beside the
@@ -402,6 +417,17 @@ await RepzoWidget.boot({ channelAccountId: '…', inAppNotifications: false });
402
417
  While the app is in the background the system push notification (below) does
403
418
  this job instead.
404
419
 
420
+ ## Conversation ratings
421
+
422
+ *1.0.6+.* Two minutes after a teammate closes a conversation, Workstation can
423
+ post a rating card in the thread: five faces from Terrible to Amazing. Tapping
424
+ a face saves it right away. After a bad rating the visitor can pick a reason,
425
+ labelled in their language, and leave a comment. A comment locks the rating.
426
+ The card says so once the rating can no longer change.
427
+
428
+ Workstation sends the card, so there's nothing to set up in the app. Apps on
429
+ 1.0.5 or older show it as a plain system line that can't be answered.
430
+
405
431
  ## Push notifications (optional)
406
432
 
407
433
  Agent replies are pushed **only when the user has no live connection** (app
@@ -541,8 +567,8 @@ sub.remove();
541
567
 
542
568
  | Method | Notes |
543
569
  | --- | --- |
544
- | `boot({ channelAccountId, baseUrl?, user?, push?, onOpenUrl?, attachments? })` | Mints/resumes the session and connects the live stream. Idempotent; safe to call repeatedly. |
545
- | `loginUserWithUserAttributes({ userId?, email?, name?, phone?, userHash?, account? })` | Identifies the visitor; moves anonymous history over. `account: { id, name?, website? }` links them to a CRM account matched by `id`; `signedUpAt` (Date, unix seconds or ISO) shows as "Signed up". A different stored user is signed out first. |
570
+ | `boot({ channelAccountId, baseUrl?, user?, push?, onOpenUrl?, attachments?, inAppNotifications? })` | Mints/resumes the session and connects the live stream. Idempotent; safe to call repeatedly. |
571
+ | `loginUserWithUserAttributes({ userId?, email?, name?, phone?, userHash?, account?, signedUpAt? })` | Identifies the visitor; moves anonymous history over. `account: { id, name?, website? }` links them to a CRM account matched by `id`; `signedUpAt` (Date, unix seconds or ISO) shows as "Signed up". A different stored user is signed out first. |
546
572
  | `loginUnidentifiedUser()` | Drops the identity (signing out a stored user), fresh anonymous session. |
547
573
  | `updateUser(attributes)` | Custom attributes agents see on the conversation (≤30 keys, 64-char keys, 512-char values). |
548
574
  | `logout()` | Revokes the token, removes the push registration, wipes visitor data, rotates the device id, resets the UI. Await it on sign-out. |
@@ -560,6 +586,31 @@ sub.remove();
560
586
  apps without their own chat entry point — mount it inside a full-screen
561
587
  container, it positions itself absolutely.
562
588
 
589
+ ## Upgrading
590
+
591
+ ```sh
592
+ npm install @repzo/widget-react-native@latest
593
+ # or
594
+ yarn upgrade @repzo/widget-react-native --latest
595
+ ```
596
+
597
+ Patch and minor releases don't need code changes in your app. When a new
598
+ feature shows up by default, it comes with an opt-out, listed below. Anything
599
+ breaking waits for a major release and comes with step-by-step upgrade notes.
600
+ Apps built with an older version keep working as Workstation adds features.
601
+ They just don't show the new ones until you update.
602
+
603
+ Every release, and what to do when you move to it, is in `CHANGELOG.md`,
604
+ which ships inside the package
605
+ (`node_modules/@repzo/widget-react-native/CHANGELOG.md`). Versions that need
606
+ action from you:
607
+
608
+ | Upgrading from | What to do |
609
+ | --- | --- |
610
+ | 0.1.x (installed from git) | Install from npm and go straight to 1.0.1 or later. 0.1.10 also changed `getUnreadConversationCount()`, link handling and `http://` base URLs; see the changelog. |
611
+ | 1.0.0 | In-app notification cards are now on by default (`inAppNotifications: false` turns them off). The attach button appears if `expo-image-picker` or `expo-document-picker` is installed (`attachments: { enabled: false }` hides it). The `withRepzoWidget` Metro wrapper is optional now. |
612
+ | 1.0.9 or older | Nothing required. Development builds now warn once if the visitor token isn't in secure storage, or if the device has no secure random source — see "Secure token storage" and "Requirements". |
613
+
563
614
  ## Troubleshooting
564
615
 
565
616
  - **No push arrives** — check in this order: `boot()` with `push.enabled` and a
@@ -118,7 +118,8 @@ function getProcedureForm(metadata) {
118
118
  if (!isRecord(form) || !Array.isArray(form.fields) || form.fields.length === 0) return null;
119
119
  return {
120
120
  procedureId: typeof form.procedureId === 'string' ? form.procedureId : '',
121
- procedureName: typeof form.procedureName === 'string' ? form.procedureName : 'Details',
121
+ // Empty when unnamed: the UI shows its translated "Details" instead.
122
+ procedureName: typeof form.procedureName === 'string' ? form.procedureName : '',
122
123
  fields: form.fields.filter(field => field && typeof field.name === 'string').map(field => ({
123
124
  name: field.name,
124
125
  label: typeof field.label === 'string' ? field.label : field.name,
@@ -1 +1 @@
1
- {"version":3,"names":["KNOWN_BLOCK_TYPES","Set","KNOWN_ACTION_TYPES","isRecord","value","Array","isArray","isString","isNumber","Number","isFinite","isOptional","check","undefined","isArrayOf","every","isAction","id","label","type","has","payload","isCommerceItem","name","quantity","unitPrice","lineTotal","isVariant","title","price","currency","isFormField","placeholder","isProvider","isSlot","startTime","endTime","slotToken","staffUserId","isDay","date","slots","isValidBlock","block","product","imageUrl","shortDescription","description","unit","durationMinutes","productId","variants","length","actions","items","subtotal","total","discount","tax","shipping","status","action","submitLabel","fields","statement","channels","serviceId","serviceName","timezone","selectedProviderId","providers","days","amount","serialNumber","contactName","validUntil","reference","nextActions","parseAgentUiBlocks","blocks","normalized","push","getAgentUiBlocks","metadata","agentUiBlocks","getProcedureForm","form","agentProcedureForm","procedureId","procedureName","filter","field","map","includes","required","formatAgentUiActionMessage","String","productName","variantTitle","cartId","module","productType","providerName","quoteId","trim","join","Object","entries","key"],"sourceRoot":"../../src","sources":["agent-ui-blocks.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,yBAAyB,EACz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CAACc,SAAS,IAAI,mBAAmB,CAAC,GACtDd,OAAO,CAACiF,YAAY,GAAG,SAASN,MAAM,CAAC3E,OAAO,CAACiF,YAAY,CAAC,EAAE,GAAG,EAAE,GAClE;IACL,KAAK,cAAc;MACjB,OAAO,kBAAkBN,MAAM,CAAC3E,OAAO,CAACuD,SAAS,IAAIvD,OAAO,CAACkF,OAAO,IAAI,EAAE,CAAC,GAAG,CAACC,IAAI,CAAC,CAAC;IACvF,KAAK,gBAAgB;MACnB,OAAO,mCACLnG,KAAK,CAACC,OAAO,CAACe,OAAO,CAAC4C,QAAQ,CAAC,GAAG5C,OAAO,CAAC4C,QAAQ,CAACwC,IAAI,CAAC,IAAI,CAAC,GAAG,sBAAsB,GACrF;IACL,KAAK,aAAa;MAChB,OAAO5C,MAAM,CAAC3C,KAAK;IACrB,KAAK,gBAAgB;MACnB,OACEwF,MAAM,CAACC,OAAO,CAACtF,OAAO,CAAC,CACpBqE,MAAM,CAAC,CAAC,GAAGtF,KAAK,CAAC,KAAK,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACoG,IAAI,CAAC,CAAC,CAAC,CAChEZ,GAAG,CAAC,CAAC,CAACgB,GAAG,EAAExG,KAAK,CAAC,KAAK,GAAGwG,GAAG,KAAKZ,MAAM,CAAC5F,KAAK,CAAC,CAACoG,IAAI,CAAC,CAAC,EAAE,CAAC,CACxDC,IAAI,CAAC,IAAI,CAAC,IAAI,sCAAsC;IAE3D,KAAK,aAAa;MAChB,OAAO5C,MAAM,CAAC3C,KAAK;IACrB;MACE,OAAO2C,MAAM,CAAC3C,KAAK;EACvB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["KNOWN_BLOCK_TYPES","Set","KNOWN_ACTION_TYPES","isRecord","value","Array","isArray","isString","isNumber","Number","isFinite","isOptional","check","undefined","isArrayOf","every","isAction","id","label","type","has","payload","isCommerceItem","name","quantity","unitPrice","lineTotal","isVariant","title","price","currency","isFormField","placeholder","isProvider","isSlot","startTime","endTime","slotToken","staffUserId","isDay","date","slots","isValidBlock","block","product","imageUrl","shortDescription","description","unit","durationMinutes","productId","variants","length","actions","items","subtotal","total","discount","tax","shipping","status","action","submitLabel","fields","statement","channels","serviceId","serviceName","timezone","selectedProviderId","providers","days","amount","serialNumber","contactName","validUntil","reference","nextActions","parseAgentUiBlocks","blocks","normalized","push","getAgentUiBlocks","metadata","agentUiBlocks","getProcedureForm","form","agentProcedureForm","procedureId","procedureName","filter","field","map","includes","required","formatAgentUiActionMessage","String","productName","variantTitle","cartId","module","productType","providerName","quoteId","trim","join","Object","entries","key"],"sourceRoot":"../../src","sources":["agent-ui-blocks.ts"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,MAAMA,iBAAiB,GAAG,IAAIC,GAAG,CAAC,CAChC,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,SAAS,EACT,yBAAyB,EACzB,eAAe,EACf,iBAAiB,CAClB,CAAC;AAEF,MAAMC,kBAAkB,GAAG,IAAID,GAAG,CAAC,CACjC,aAAa,EACb,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,6BAA6B,EAC7B,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,aAAa,CACd,CAAC;AAEF,SAASE,QAAQA,CAACC,KAAc,EAAoC;EAClE,OAAO,CAAC,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC;AACtE;;AAEA;AACA;AACA;AACA;;AAEA,MAAMG,QAAQ,GAAIH,KAAc,IAAsB,OAAOA,KAAK,KAAK,QAAQ;AAE/E,MAAMI,QAAQ,GAAIJ,KAAc,IAC9B,OAAOA,KAAK,KAAK,QAAQ,IAAIK,MAAM,CAACC,QAAQ,CAACN,KAAK,CAAC;AAErD,MAAMO,UAAU,GAAGA,CAACP,KAAc,EAAEQ,KAAkC,K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,KAAK,CAAC,KAAK,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACoG,IAAI,CAAC,CAAC,CAAC,CAChEZ,GAAG,CAAC,CAAC,CAACgB,GAAG,EAAExG,KAAK,CAAC,KAAK,GAAGwG,GAAG,KAAKZ,MAAM,CAAC5F,KAAK,CAAC,CAACoG,IAAI,CAAC,CAAC,EAAE,CAAC,CACxDC,IAAI,CAAC,IAAI,CAAC,IAAI,sCAAsC;IAE3D,KAAK,aAAa;MAChB,OAAO5C,MAAM,CAAC3C,KAAK;IACrB;MACE,OAAO2C,MAAM,CAAC3C,KAAK;EACvB;AACF","ignoreList":[]}
@@ -54,12 +54,12 @@ const IMAGE_QUALITY = 0.7;
54
54
  /** Why some (or all) of a pick didn't make it into the composer. */
55
55
 
56
56
  // ─── Host integrations ─────────────────────────────────────────────────────
57
- // Resolved once at module load. Each `require` is static so Metro can see it,
58
- // and `withRepzoWidget` (metro.js) maps an uninstalled one to an empty module.
57
+ // Resolved once at module load. Each `require` is static so Metro can see it;
58
+ // with `allowOptionalDependencies` (see metro.js) an uninstalled one bundles as
59
+ // a require that throws, which the `try` around it catches.
59
60
 
60
61
  let imagePicker = null;
61
62
  try {
62
- // eslint-disable-next-line @typescript-eslint/no-var-requires
63
63
  const mod = require('expo-image-picker');
64
64
  if (typeof mod?.launchImageLibraryAsync === 'function') imagePicker = mod;
65
65
  } catch {
@@ -67,7 +67,6 @@ try {
67
67
  }
68
68
  let documentPicker = null;
69
69
  try {
70
- // eslint-disable-next-line @typescript-eslint/no-var-requires
71
70
  const mod = require('expo-document-picker');
72
71
  if (typeof mod?.getDocumentAsync === 'function') documentPicker = mod;
73
72
  } catch {
@@ -75,14 +74,12 @@ try {
75
74
  }
76
75
  let fileSystem = null;
77
76
  try {
78
- // eslint-disable-next-line @typescript-eslint/no-var-requires
79
77
  fileSystem = require('expo-file-system') ?? null;
80
78
  } catch {
81
79
  fileSystem = null;
82
80
  }
83
81
  let imageManipulator = null;
84
82
  try {
85
- // eslint-disable-next-line @typescript-eslint/no-var-requires
86
83
  const mod = require('expo-image-manipulator');
87
84
  if (typeof mod?.manipulateAsync === 'function' || typeof mod?.ImageManipulator?.manipulate === 'function') {
88
85
  imageManipulator = mod;