@robono/messaging-react-native 0.8.0 → 0.10.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 (62) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +92 -37
  3. package/SBOM.spdx.json +577 -217
  4. package/dist/account.js +7 -4
  5. package/dist/attachment-menu.js +5 -2
  6. package/dist/call-message.js +8 -5
  7. package/dist/calling.js +6 -2
  8. package/dist/conversation-details.d.ts +1 -0
  9. package/dist/conversation-details.js +11 -7
  10. package/dist/custom-message.d.ts +7 -0
  11. package/dist/custom-message.js +53 -0
  12. package/dist/customization.d.ts +49 -0
  13. package/dist/customization.js +1 -0
  14. package/dist/expo-connected-calling.js +7 -2
  15. package/dist/expo-extras.js +4 -1
  16. package/dist/expo-media.js +27 -5
  17. package/dist/expo-messenger.d.ts +41 -2
  18. package/dist/expo-messenger.js +86 -10
  19. package/dist/expo-outbox.js +22 -1
  20. package/dist/expo-screen.d.ts +1 -1
  21. package/dist/expo-screen.js +42 -31
  22. package/dist/expo-social.js +5 -2
  23. package/dist/expo.d.ts +1 -1
  24. package/dist/expo.js +1 -1
  25. package/dist/extras.js +11 -7
  26. package/dist/forward.js +8 -5
  27. package/dist/group-editor.js +9 -6
  28. package/dist/header-calls.js +9 -6
  29. package/dist/icons.js +2 -1
  30. package/dist/inbox-search.d.ts +3 -1
  31. package/dist/inbox-search.js +33 -10
  32. package/dist/inbox-view.d.ts +21 -0
  33. package/dist/inbox-view.js +32 -0
  34. package/dist/inbox.d.ts +6 -1
  35. package/dist/inbox.js +27 -18
  36. package/dist/index.d.ts +16 -6
  37. package/dist/index.js +122 -81
  38. package/dist/localization.d.ts +24 -0
  39. package/dist/localization.js +12 -0
  40. package/dist/maps-connection.js +5 -2
  41. package/dist/media-ui.js +15 -8
  42. package/dist/message-menu.js +5 -2
  43. package/dist/native-outbox.d.ts +10 -2
  44. package/dist/native-outbox.js +7 -0
  45. package/dist/polls.js +21 -16
  46. package/dist/popup.js +8 -4
  47. package/dist/public-rooms.d.ts +10 -0
  48. package/dist/public-rooms.js +78 -0
  49. package/dist/quick-send.js +6 -3
  50. package/dist/room-moderation.d.ts +22 -0
  51. package/dist/room-moderation.js +87 -0
  52. package/dist/safety.js +11 -8
  53. package/dist/saved.js +7 -4
  54. package/dist/scheduled.js +19 -14
  55. package/dist/search.js +7 -4
  56. package/dist/social.js +9 -5
  57. package/dist/translation-settings.js +7 -4
  58. package/dist/typography.d.ts +12 -0
  59. package/dist/typography.js +31 -0
  60. package/dist/voice-composer.js +11 -6
  61. package/package.json +10 -8
  62. package/setup.plugin.cjs +20 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.10.0 — release candidate
2
+
3
+ Add supplied business cards, public groups and moderation, appearance controls, app-wide availability and inbox continuity. Own conversation opening and foreground incoming updates inside ExpoMessenger. Expand supplied interface languages.
4
+
5
+ ## 0.9.0 — release candidate
6
+
7
+ Supply hosted connections, durable offline actions, interface language, localized Maps/calls, and retryable native upload errors. Use native calling 0.7 and Maps 0.3 with an app rebuild.
8
+
1
9
  ## 0.8.0
2
10
 
3
11
  Connect the supplied Expo Messenger to native incoming calls automatically. Register VoIP/system calling with the existing signed-in device, clear account state on sign-out, cache contact names and use selected Android calling appearance. Requires calling-react-native 0.6.0 and a native app rebuild.
package/README.md CHANGED
@@ -1,11 +1,85 @@
1
1
  # Optional Robono messaging screens
2
2
 
3
+ ## Small interface customizations
4
+
5
+ Choose fonts, text size, message spacing and bubble shape in **Features & preview →
6
+ Appearance**. Saved `appearance.presentation` settings reach the supplied phone
7
+ UI and web preview. Platform fonts differ; device accessibility scaling is retained.
8
+ See the [customization guide](https://robono.com/guides/messenger-customization.html).
9
+
10
+ The supplied screen accepts `components.MessageBody`, `components.MessageFooter`
11
+ and `components.HeaderActions` in addition to whole-screen replacements. These
12
+ small regions let you add customer actions without recreating the player,
13
+ composer or message gestures. They use the same contract on web and phones.
14
+
15
+ ```tsx
16
+ import {View, Pressable, Text} from 'react-native';
17
+ import type {MessagingCustomization} from '@robono/messaging-react-native';
18
+ const components: MessagingCustomization = {
19
+ MessageBody: ({children}) => <View>{children}</View>,
20
+ HeaderActions: ({contact}) => (
21
+ <Pressable accessibilityRole="button" accessibilityLabel="Profile"
22
+ onPress={() => openCustomerProfile(contact)}
23
+ style={{minWidth:44,minHeight:44,justifyContent:'center'}}>
24
+ <Text>Profile</Text>
25
+ </Pressable>
26
+ ),
27
+ };
28
+ // Pass components to ExpoMessenger/ExpoMessagingScreen.
29
+ // Merge with existing components (such as a supplied TrackingMap), if present.
30
+ ```
31
+
32
+ Define these components outside render. `MessageBody` receives the supplied body
33
+ as `children`; preserve it to retain the standard text, media, poll and translation
34
+ behavior. `MessageFooter` adds an optional region inside the bubble. Both receive
35
+ `message`, `mine`, `appearance` and optional `pendingStatus`, and are omitted for
36
+ deleted messages. Header actions receive `conversationId`, `contact`, `appearance`.
37
+ The status indicator, swipe gestures and permission enforcement remain in place.
38
+ Custom actions still require the customer's own authorization.
39
+
40
+ ## Recommended hosted installation
41
+
42
+ Run `npx --package @robono/server robono-messenger-install` in your Expo project. The installer sets up the connection and native plugin. Robono runs the communication services; your server verifies the existing login and issues its short-lived session. See the server package's [hosted guide](https://robono.com/guides/hosted-messenger.html).
43
+
44
+ ```tsx
45
+ import {createHostedExpoMessenger, ExpoMessenger} from '@robono/messaging-react-native/expo';
46
+ import {hostedRobonoTokenProvider} from '@robono/messaging';
47
+ const messenger = await createHostedExpoMessenger({
48
+ userId: session.userId,
49
+ tokenProvider: hostedRobonoTokenProvider({
50
+ tokenEndpoint: 'https://your-app.example/api/robono-token',
51
+ getAccessToken: () => session.accessToken(),
52
+ }),
53
+ });
54
+ <ExpoMessenger {...messenger} userId={session.userId}
55
+ companyName="Your company" contacts={contacts} />
56
+ try { await messenger.signOut(); } finally { await session.signOut(); }
57
+ ```
58
+
59
+ Create this connection outside repeated renders, and dispose it when unmounting. Use the generated component to handle account changes and retries automatically. The lower-level `createExpoMessenger` and server forwarding adapters remain available for an optional self-hosted connection.
60
+
61
+ Install the native dependencies below and rebuild both platforms. For alerts
62
+ outside the app, `createExpoMessenger` connects the managed service automatically. Use the Account screen’s Enable notifications action and follow
63
+ `@robono/server/NOTIFICATIONS.md`: iPhone needs **your** Apple Team ID, APNs Key ID,
64
+ private .p8 key and Bundle ID; Android needs **your** Firebase project, app
65
+ configuration and a service-account key uploaded in Robono’s private notification setup. Never ship private keys in the
66
+ app. Website chat itself does not require these mobile credentials.
67
+
68
+ The supplied group owner, shared-media, reply and pinned-message screens use the
69
+ same popup boundaries as Messenger. Global search and group controls require the
70
+ matching server and service migrations. Imported groups need a server-assigned
71
+ owner before users can edit them. Optional offline received history is disabled
72
+ by default; its network-selected expiry is honored and it is read-only offline.
73
+ Revocation while disconnected is not known until reconnection or expiry. Logout
74
+ clears the local account's history. `persistence:false` disables these local stores.
75
+
76
+
3
77
  Use a ready-made direct or group conversation screen, replace its sections, or compose the exported components into your own layout. Use `ExpoMessenger` for the complete inbox and conversation flow, or the individual components inside your existing navigation. The complete Expo messenger connects notification registration; nothing requests permission on mount. The shared icon controls require `react-native-svg` (install it with your framework’s native dependency installer).
4
78
 
5
79
  ## Connected features
6
80
 
7
81
  The complete messenger connects selected calling, chat weather/tracking and Maps
8
- through the same authenticated server route. Customers do not supply fake demo
82
+ through Robono’s authenticated hosted connection. Customers do not supply fake demo
9
83
  callbacks or create separate call controllers for this setup. Feature selection
10
84
  and appearance remain in **Features & preview**. Advanced custom interfaces can
11
85
  still use individual components and callbacks.
@@ -26,7 +100,7 @@ own database; retries with the same values are safe. Keep group membership in th
26
100
  messaging group API; eligible groups use that same membership for calls. Supergroups
27
101
  never start calls, and voice/video calls remain limited to eight people.
28
102
 
29
- The host's `authorize` function checks `calling.*`, `extras.*` and `location.*` as
103
+ For the optional self-hosted connection, the host's `authorize` function checks `calling.*`, `extras.*` and `location.*` as
30
104
  well as messaging operations. Account checks have no conversation ID; call actions
31
105
  use the actual conversation from the service, never a caller-supplied claim. Keep
32
106
  current membership, suspension and feature restrictions in those checks.
@@ -44,40 +118,6 @@ capture and calls, cancels unfinished tracking and unregisters the device. Old
44
118
  account credentials and unfinished work must never be reused for another person.
45
119
 
46
120
 
47
- ## Recommended installation
48
-
49
- Connect `createRobonoMessengerServer` from `@robono/server` at one authenticated
50
- HTTPS route. It supplies managed private attachments. Create one connection per
51
- signed-in account, outside repeated renders:
52
-
53
- ```tsx
54
- import {createExpoMessenger, ExpoMessenger} from '@robono/messaging-react-native/expo';
55
- const messenger = createExpoMessenger({
56
- endpoint: 'https://your-app.example/api/robono',
57
- userId: session.userId,
58
- getAccessToken: () => session.accessToken(),
59
- isCallActive: () => calls.isActive(),
60
- });
61
- <ExpoMessenger {...messenger} userId={session.userId}
62
- companyName="Your company" contacts={contacts} />
63
- // On logout, before destroying the user's session:
64
- try { await messenger.signOut(); } finally { await session.signOut(); }
65
- ```
66
-
67
- Install the native dependencies below and rebuild both platforms. For alerts
68
- outside the app, `createExpoMessenger` connects the managed service automatically. Use the Account screen’s Enable notifications action and follow
69
- `@robono/server/NOTIFICATIONS.md`: iPhone needs **your** Apple Team ID, APNs Key ID,
70
- private .p8 key and Bundle ID; Android needs **your** Firebase project, app
71
- configuration and a service-account key uploaded in Robono’s private notification setup. Never ship private keys in the
72
- app. Website chat itself does not require these mobile credentials.
73
-
74
- The supplied group owner, shared-media, reply and pinned-message screens use the
75
- same popup boundaries as Messenger. Global search and group controls require the
76
- matching server and service migrations. Imported groups need a server-assigned
77
- owner before users can edit them. Optional offline received history is disabled
78
- by default; its network-selected expiry is honored and it is read-only offline.
79
- Revocation while disconnected is not known until reconnection or expiry. Logout
80
- clears the local account's history. `persistence:false` disables these local stores.
81
121
 
82
122
  ## Individual screen inside existing navigation
83
123
 
@@ -252,7 +292,7 @@ Blocking retains history and stops direct messages and calls for that pair in yo
252
292
 
253
293
  Enable Reactions to show an emoji ribbon beside the long-pressed bubble, or the hover smile icon on desktop. Selected reactions stay above the delivery indicator. Polls are interactive chat messages created from the attachment menu. Transcript is a separate voice-message action. In the header's three-dot menu, choose translation **Off / Text / Voice** and languages once for the conversation. The saved choice controls Translate or Play Translation on eligible incoming messages; own messages and matching sender/target languages do not show it. The result has Show original / Show translation controls. Expo supplies translated-voice playback and its audio session; an explicit Play Translation action starts playback when ready. `language` supplies the initial target and `contact.language` / `participants[id].language` supply known sender languages, with a saved conversation incoming-language fallback. Defaults to Off. The Expo private outbox retains preferences across restarts on this device. Custom contact menus can call `client.setTranslationPreference({mode:'text',language:'es',sourceLanguage:'en'})`. Connect `MessagingClient.transformRequest` to the authenticated `createMessagingTransformBackendAdapter` on your server.
254
294
 
255
- ### November 1 behavior update (unpublished)
295
+ ### November 1 behavior update
256
296
 
257
297
  The default palette follows Messenger. Existing saved customer colors remain in
258
298
  place. Direct chats use the brand header; groups use Messenger’s blue header.
@@ -393,3 +433,18 @@ when the person starts sharing. Rebuild both apps after native configuration cha
393
433
  The server's selected feature and current contact permissions still control access.
394
434
  An existing explicit `screenSharing:false` is preserved by upgrades; enable it and
395
435
  rebuild before offering screen sharing in that app.
436
+
437
+ ## Business messages
438
+
439
+ Use `createMessageCard` from `@robono/messaging` for supplied appointment/order
440
+ cards. `components.customMessages` supports customer layouts and explicit format
441
+ versions; `components.onCustomMessageAction` connects authorized actions.
442
+ Unknown types use the required text fallback.
443
+ [Card setup and limits](https://robono.com/guides/business-messages.html).
444
+
445
+ ## App-wide activity
446
+
447
+ The complete Messenger connection supplies foreground activity independently of
448
+ the selected chat. Online now and optional Last seen are chosen in Features &
449
+ preview. `connection.availability` can also supply an authorized contact list.
450
+ [Activity setup, privacy and timing](https://robono.com/guides/user-availability.html).