@robono/messaging-react-native 0.26.0 → 0.26.2
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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/SBOM.spdx.json +48 -48
- package/dist/attachment-preview.js +6 -3
- package/dist/expo-document.js +8 -5
- package/dist/expo-media.js +8 -2
- package/dist/expo-outbox.js +1 -1
- package/dist/expo-screen.d.ts +1 -1
- package/dist/expo-screen.js +1 -1
- package/dist/expo-social.js +2 -2
- package/dist/expo-thumbnails.js +24 -21
- package/dist/index.js +9 -6
- package/dist/media-access.d.ts +1 -0
- package/dist/media-access.js +3 -0
- package/dist/media-controller.d.ts +2 -0
- package/dist/message-menu.d.ts +1 -2
- package/dist/message-menu.js +1 -1
- package/dist/recent-media.d.ts +1 -0
- package/dist/recent-media.js +22 -3
- package/dist/use-quote-gesture.d.ts +1 -0
- package/dist/use-quote-gesture.js +4 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.26.2 — 2026-11-18
|
|
4
|
+
|
|
5
|
+
Reuse authorized media previews and defer attachment downloads until needed on iPhone and Android.
|
|
6
|
+
|
|
7
|
+
## 0.26.1 — 2026-11-18
|
|
8
|
+
|
|
9
|
+
Open text conversations with less work. Message menus, swipe-to-quote graphics, document viewing and media pickers initialize when used. Background media downloads wait for the message list to render.
|
|
10
|
+
|
|
3
11
|
## 0.26.0 — 2026-11-18
|
|
4
12
|
|
|
5
13
|
Add shared voice selection and fixed listening samples, with personal choices taking precedence over company defaults. Apply scheduling, weather and social display choices on both platforms.
|
package/README.md
CHANGED
|
@@ -162,7 +162,7 @@ The same React Native components support iOS and Android. Keyboard handling uses
|
|
|
162
162
|
|
|
163
163
|
## Recording and attachments with Expo
|
|
164
164
|
|
|
165
|
-
The optional `@robono/messaging-react-native/expo` entry supplies recording, review, voice playback and seeking, photo/video picking and preview, document selection, and private upload/download progress. Users explicitly send after review. A failed upload can retry with the same upload identity; cancelling removes the adapter's cache copy, never the original library item. Viewer copies are removed when the viewer closes. Managed voice and video play directly from private storage using native streaming.
|
|
165
|
+
The optional `@robono/messaging-react-native/expo` entry supplies recording, review, voice playback and seeking, photo/video picking and preview, document selection, and private upload/download progress. Users explicitly send after review. A failed upload can retry with the same upload identity; cancelling removes the adapter's cache copy, never the original library item. Viewer copies are removed when the viewer closes. Managed voice and video play directly from private storage using native streaming. Opening a chat requests visible previews. Small previews can be reused in memory after verifying current access when the chat reopens. To warm originals as well, set `preloadRecentMedia={true}`. With this option, `ExpoMessagingScreen` preloads up to six recent photos and voice clips in the open conversation (2 MiB per file, 6 MiB total, two background transfers at a time). Custom adapters without streaming can also preload small videos within those limits. Each transfer uses the authenticated storage adapter and counts as normal transfer usage. The cache is cleared when the app backgrounds, the conversation changes, access fails, or messages disappear; cached files require a fresh download on opening if their message has not been refreshed from the conversation history within 60 seconds. Cold voice/video streams and document downloads start on tap; an already authorized cached voice clip starts locally without waiting for another transfer. Explicit Download and Share always recheck current access. The recorder reserves 100 milliseconds at the duration limit for encoder padding; storage completion verifies the finished file. Recording stops when the app backgrounds or a call takes audio priority, leaving a review rather than sending automatically.
|
|
166
166
|
|
|
167
167
|
Install native dependencies with your Expo project's installer so their versions match your SDK:
|
|
168
168
|
|
package/SBOM.spdx.json
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"spdxVersion": "SPDX-2.3",
|
|
3
3
|
"dataLicense": "CC0-1.0",
|
|
4
4
|
"SPDXID": "SPDXRef-DOCUMENT",
|
|
5
|
-
"name": "@robono/messaging-react-native@0.26.
|
|
6
|
-
"documentNamespace": "https://robono.com/sbom/messaging-react-native/0.26.
|
|
5
|
+
"name": "@robono/messaging-react-native@0.26.2",
|
|
6
|
+
"documentNamespace": "https://robono.com/sbom/messaging-react-native/0.26.2/faf739bb6204f993332eed18bd61ae2e07c51d40",
|
|
7
7
|
"creationInfo": {
|
|
8
|
-
"created": "2026-11-
|
|
8
|
+
"created": "2026-11-18T20:08:30.965Z",
|
|
9
9
|
"creators": [
|
|
10
10
|
"Organization: Robono (support@robono.com)"
|
|
11
11
|
]
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
{
|
|
15
15
|
"name": "@robono/messaging-react-native",
|
|
16
16
|
"SPDXID": "SPDXRef-Package",
|
|
17
|
-
"versionInfo": "0.26.
|
|
17
|
+
"versionInfo": "0.26.2",
|
|
18
18
|
"downloadLocation": "NOASSERTION",
|
|
19
19
|
"filesAnalyzed": true,
|
|
20
20
|
"packageVerificationCode": {
|
|
21
|
-
"packageVerificationCodeValue": "
|
|
21
|
+
"packageVerificationCodeValue": "faf739bb6204f993332eed18bd61ae2e07c51d40"
|
|
22
22
|
},
|
|
23
23
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
24
24
|
"licenseDeclared": "LicenseRef-RobonoSDK",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"LicenseRef-RobonoSDK"
|
|
27
27
|
],
|
|
28
28
|
"copyrightText": "Copyright (c) 2026 Add to Loop LLC.",
|
|
29
|
-
"comment": "Host-supplied peers (not bundled): {\"@robono/messaging\":\"^0.20.
|
|
29
|
+
"comment": "Host-supplied peers (not bundled): {\"@robono/messaging\":\"^0.20.3\",\"react\":\">=18.2 <20\",\"react-native\":\">=0.76 <1\",\"expo-audio\":\">=55 <57\",\"expo-image-picker\":\">=55 <57\",\"expo-document-picker\":\">=55 <57\",\"expo-file-system\":\">=55.0.5 <57\",\"expo-sharing\":\">=55 <57\",\"expo-video\":\">=55 <57\",\"expo-crypto\":\">=55 <57\",\"react-native-safe-area-context\":\">=5 <6\",\"react-native-svg\":\">=15 <16\",\"@robono/calling-react-native\":\"^0.11.3\",\"expo-clipboard\":\">=8 <57\",\"expo-image-manipulator\":\">=14 <57\",\"expo-video-thumbnails\":\">=14 <57\",\"react-native-webview\":\">=13 <14\",\"expo-blur\":\">=55 <57\",\"expo-notifications\":\">=55 <57\",\"expo-secure-store\":\">=55 <57\",\"@robono/location-react-native\":\"^0.4.2\",\"expo-location\":\">=55 <57\",\"expo-constants\":\">=55 <57\",\"@robono/location\":\"^0.4.1\",\"expo-haptics\":\">=55 <57\",\"@robono/calling\":\"^0.7.0\",\"expo-media-library\":\">=55 <57\",\"expo-task-manager\":\">=55.0.0 <57.0.0\",\"expo-application\":\">=55 <57\",\"react-native-passkey\":\"^3.6.2\",\"expo-background-task\":\">=55 <57\",\"expo-network\":\">=55 <57\"}"
|
|
30
30
|
}
|
|
31
31
|
],
|
|
32
32
|
"files": [
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"checksums": [
|
|
56
56
|
{
|
|
57
57
|
"algorithm": "SHA256",
|
|
58
|
-
"checksumValue": "
|
|
58
|
+
"checksumValue": "941bda682a7b57ece95a907abe3f03cabee5c2af20e41aac776cc7bafbdd69b7"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"algorithm": "SHA1",
|
|
62
|
-
"checksumValue": "
|
|
62
|
+
"checksumValue": "083d83d4227309aba41b30d7b28c9753917f6249"
|
|
63
63
|
}
|
|
64
64
|
],
|
|
65
65
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
"checksums": [
|
|
94
94
|
{
|
|
95
95
|
"algorithm": "SHA256",
|
|
96
|
-
"checksumValue": "
|
|
96
|
+
"checksumValue": "74c95b223dccc102f667a37c0ffc308797b98b3ba9ea9c1b518f56f125c917c5"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"algorithm": "SHA1",
|
|
100
|
-
"checksumValue": "
|
|
100
|
+
"checksumValue": "fededa13bae27b379fe01936b677f184d568192b"
|
|
101
101
|
}
|
|
102
102
|
],
|
|
103
103
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -454,11 +454,11 @@
|
|
|
454
454
|
"checksums": [
|
|
455
455
|
{
|
|
456
456
|
"algorithm": "SHA256",
|
|
457
|
-
"checksumValue": "
|
|
457
|
+
"checksumValue": "24c8c3043c24387ec1664a6b6df3368e4472f57bfe57ccc19609e20132936c69"
|
|
458
458
|
},
|
|
459
459
|
{
|
|
460
460
|
"algorithm": "SHA1",
|
|
461
|
-
"checksumValue": "
|
|
461
|
+
"checksumValue": "53428f72e845f7beb6657bc9b27cd7232eabc83c"
|
|
462
462
|
}
|
|
463
463
|
],
|
|
464
464
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -1784,11 +1784,11 @@
|
|
|
1784
1784
|
"checksums": [
|
|
1785
1785
|
{
|
|
1786
1786
|
"algorithm": "SHA256",
|
|
1787
|
-
"checksumValue": "
|
|
1787
|
+
"checksumValue": "2702976a67ad769e2ed6045e857adf139bae1d74e3e277619f1f0ca04dafdfbf"
|
|
1788
1788
|
},
|
|
1789
1789
|
{
|
|
1790
1790
|
"algorithm": "SHA1",
|
|
1791
|
-
"checksumValue": "
|
|
1791
|
+
"checksumValue": "cbb0c8b099e8605afb17f0af6dc7eeb37beb551b"
|
|
1792
1792
|
}
|
|
1793
1793
|
],
|
|
1794
1794
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2126,11 +2126,11 @@
|
|
|
2126
2126
|
"checksums": [
|
|
2127
2127
|
{
|
|
2128
2128
|
"algorithm": "SHA256",
|
|
2129
|
-
"checksumValue": "
|
|
2129
|
+
"checksumValue": "cc29d976a49b5d8c9aab52da8d84e8ce64a976a574f803dee9110502753ae929"
|
|
2130
2130
|
},
|
|
2131
2131
|
{
|
|
2132
2132
|
"algorithm": "SHA1",
|
|
2133
|
-
"checksumValue": "
|
|
2133
|
+
"checksumValue": "d635d096a44f5aba90b7929c33c7e2c6642e301a"
|
|
2134
2134
|
}
|
|
2135
2135
|
],
|
|
2136
2136
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2278,11 +2278,11 @@
|
|
|
2278
2278
|
"checksums": [
|
|
2279
2279
|
{
|
|
2280
2280
|
"algorithm": "SHA256",
|
|
2281
|
-
"checksumValue": "
|
|
2281
|
+
"checksumValue": "45cef766ca50c0f30bf98c91939a788aa191b66fddf55ac0253e9d9f43c00dbb"
|
|
2282
2282
|
},
|
|
2283
2283
|
{
|
|
2284
2284
|
"algorithm": "SHA1",
|
|
2285
|
-
"checksumValue": "
|
|
2285
|
+
"checksumValue": "5610ada30988063e549b8fffd970566c39231df0"
|
|
2286
2286
|
}
|
|
2287
2287
|
],
|
|
2288
2288
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2449,11 +2449,11 @@
|
|
|
2449
2449
|
"checksums": [
|
|
2450
2450
|
{
|
|
2451
2451
|
"algorithm": "SHA256",
|
|
2452
|
-
"checksumValue": "
|
|
2452
|
+
"checksumValue": "0a414a0cbe54619aa271e27590ddb69059d5569fb60d3e0bc72f302be5f85e41"
|
|
2453
2453
|
},
|
|
2454
2454
|
{
|
|
2455
2455
|
"algorithm": "SHA1",
|
|
2456
|
-
"checksumValue": "
|
|
2456
|
+
"checksumValue": "8171b8ca2f5ce0f701752ce34a971925da7f2795"
|
|
2457
2457
|
}
|
|
2458
2458
|
],
|
|
2459
2459
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2468,11 +2468,11 @@
|
|
|
2468
2468
|
"checksums": [
|
|
2469
2469
|
{
|
|
2470
2470
|
"algorithm": "SHA256",
|
|
2471
|
-
"checksumValue": "
|
|
2471
|
+
"checksumValue": "ed89a142c275478a12bf2f146a7e3cc4b6863059a43de643fc1649b2a6cbc6bf"
|
|
2472
2472
|
},
|
|
2473
2473
|
{
|
|
2474
2474
|
"algorithm": "SHA1",
|
|
2475
|
-
"checksumValue": "
|
|
2475
|
+
"checksumValue": "b7ec2d26c67ded001b4b8d407477e1780b209d52"
|
|
2476
2476
|
}
|
|
2477
2477
|
],
|
|
2478
2478
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2506,11 +2506,11 @@
|
|
|
2506
2506
|
"checksums": [
|
|
2507
2507
|
{
|
|
2508
2508
|
"algorithm": "SHA256",
|
|
2509
|
-
"checksumValue": "
|
|
2509
|
+
"checksumValue": "e58e61237409f66cd13183fc2a811a069d4c12896e14c311b5451330cc224c0e"
|
|
2510
2510
|
},
|
|
2511
2511
|
{
|
|
2512
2512
|
"algorithm": "SHA1",
|
|
2513
|
-
"checksumValue": "
|
|
2513
|
+
"checksumValue": "563e4453753a5a862944d183035b46e98dca9942"
|
|
2514
2514
|
}
|
|
2515
2515
|
],
|
|
2516
2516
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -2582,11 +2582,11 @@
|
|
|
2582
2582
|
"checksums": [
|
|
2583
2583
|
{
|
|
2584
2584
|
"algorithm": "SHA256",
|
|
2585
|
-
"checksumValue": "
|
|
2585
|
+
"checksumValue": "611808fe7b1572844fbceb9a20583063704499504ce6b505f3727207217c96e4"
|
|
2586
2586
|
},
|
|
2587
2587
|
{
|
|
2588
2588
|
"algorithm": "SHA1",
|
|
2589
|
-
"checksumValue": "
|
|
2589
|
+
"checksumValue": "cf1a3508e9632d259d79ed57cdf27e6baa7c79ee"
|
|
2590
2590
|
}
|
|
2591
2591
|
],
|
|
2592
2592
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3076,11 +3076,11 @@
|
|
|
3076
3076
|
"checksums": [
|
|
3077
3077
|
{
|
|
3078
3078
|
"algorithm": "SHA256",
|
|
3079
|
-
"checksumValue": "
|
|
3079
|
+
"checksumValue": "0e44c2abd8ce6529fd4ec86cb6958c08391f925e1ccb5dc775d5e3c2b68eb23a"
|
|
3080
3080
|
},
|
|
3081
3081
|
{
|
|
3082
3082
|
"algorithm": "SHA1",
|
|
3083
|
-
"checksumValue": "
|
|
3083
|
+
"checksumValue": "61190012bd7feec7b00dbe6169bef3c1fa54fd3e"
|
|
3084
3084
|
}
|
|
3085
3085
|
],
|
|
3086
3086
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3285,11 +3285,11 @@
|
|
|
3285
3285
|
"checksums": [
|
|
3286
3286
|
{
|
|
3287
3287
|
"algorithm": "SHA256",
|
|
3288
|
-
"checksumValue": "
|
|
3288
|
+
"checksumValue": "f078e7d90b504e1db44840760ed3f733243c6c0b8dd0de5490cab1a84645f442"
|
|
3289
3289
|
},
|
|
3290
3290
|
{
|
|
3291
3291
|
"algorithm": "SHA1",
|
|
3292
|
-
"checksumValue": "
|
|
3292
|
+
"checksumValue": "87308c3ac140438a2fbfb2226f3f2ff9208f19fd"
|
|
3293
3293
|
}
|
|
3294
3294
|
],
|
|
3295
3295
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3304,11 +3304,11 @@
|
|
|
3304
3304
|
"checksums": [
|
|
3305
3305
|
{
|
|
3306
3306
|
"algorithm": "SHA256",
|
|
3307
|
-
"checksumValue": "
|
|
3307
|
+
"checksumValue": "2a40dff833314346c19d8edbce7da63ee9845a5ced8748c5ab8f437ed89b4674"
|
|
3308
3308
|
},
|
|
3309
3309
|
{
|
|
3310
3310
|
"algorithm": "SHA1",
|
|
3311
|
-
"checksumValue": "
|
|
3311
|
+
"checksumValue": "92527bd09d6064c65445bdfe50489d0f9ac93abd"
|
|
3312
3312
|
}
|
|
3313
3313
|
],
|
|
3314
3314
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3323,11 +3323,11 @@
|
|
|
3323
3323
|
"checksums": [
|
|
3324
3324
|
{
|
|
3325
3325
|
"algorithm": "SHA256",
|
|
3326
|
-
"checksumValue": "
|
|
3326
|
+
"checksumValue": "36117a42fdcd4bac40c78781122b35f7cb6df3ae836fea9f31ea5c859319b5b3"
|
|
3327
3327
|
},
|
|
3328
3328
|
{
|
|
3329
3329
|
"algorithm": "SHA1",
|
|
3330
|
-
"checksumValue": "
|
|
3330
|
+
"checksumValue": "8aa2d122813a5129c50eb6b86fa9a617dbdc3e59"
|
|
3331
3331
|
}
|
|
3332
3332
|
],
|
|
3333
3333
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3513,11 +3513,11 @@
|
|
|
3513
3513
|
"checksums": [
|
|
3514
3514
|
{
|
|
3515
3515
|
"algorithm": "SHA256",
|
|
3516
|
-
"checksumValue": "
|
|
3516
|
+
"checksumValue": "ae0a67e0fa9e5e4f8022597f71c7ff955e166895b1d7e4e1f39179988c8073ef"
|
|
3517
3517
|
},
|
|
3518
3518
|
{
|
|
3519
3519
|
"algorithm": "SHA1",
|
|
3520
|
-
"checksumValue": "
|
|
3520
|
+
"checksumValue": "a13abf31c8410289857a8bdfea59053233b4e457"
|
|
3521
3521
|
}
|
|
3522
3522
|
],
|
|
3523
3523
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -3532,11 +3532,11 @@
|
|
|
3532
3532
|
"checksums": [
|
|
3533
3533
|
{
|
|
3534
3534
|
"algorithm": "SHA256",
|
|
3535
|
-
"checksumValue": "
|
|
3535
|
+
"checksumValue": "898219d79eb5a82948cee2a9e2df5b76b2bbf857032e18ef0251ea4119e1b5f8"
|
|
3536
3536
|
},
|
|
3537
3537
|
{
|
|
3538
3538
|
"algorithm": "SHA1",
|
|
3539
|
-
"checksumValue": "
|
|
3539
|
+
"checksumValue": "d6382fd0661d0c8ccf401de3348e33d54335e544"
|
|
3540
3540
|
}
|
|
3541
3541
|
],
|
|
3542
3542
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -4235,11 +4235,11 @@
|
|
|
4235
4235
|
"checksums": [
|
|
4236
4236
|
{
|
|
4237
4237
|
"algorithm": "SHA256",
|
|
4238
|
-
"checksumValue": "
|
|
4238
|
+
"checksumValue": "8c84be75feea383a5e9257d15ca6345afe112d6f78bb77236d5e197dfb14ad21"
|
|
4239
4239
|
},
|
|
4240
4240
|
{
|
|
4241
4241
|
"algorithm": "SHA1",
|
|
4242
|
-
"checksumValue": "
|
|
4242
|
+
"checksumValue": "e4d697e268d8023d5de5b5f9d309c9d6816bd5c2"
|
|
4243
4243
|
}
|
|
4244
4244
|
],
|
|
4245
4245
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -4254,11 +4254,11 @@
|
|
|
4254
4254
|
"checksums": [
|
|
4255
4255
|
{
|
|
4256
4256
|
"algorithm": "SHA256",
|
|
4257
|
-
"checksumValue": "
|
|
4257
|
+
"checksumValue": "3c69b8abaa11441d3f4f5041778dbfd7d3682f7c831be1b62b0ee36b5f6d44ee"
|
|
4258
4258
|
},
|
|
4259
4259
|
{
|
|
4260
4260
|
"algorithm": "SHA1",
|
|
4261
|
-
"checksumValue": "
|
|
4261
|
+
"checksumValue": "94bb0429f8b0cd293be32fa2e88597339bf68553"
|
|
4262
4262
|
}
|
|
4263
4263
|
],
|
|
4264
4264
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -4729,11 +4729,11 @@
|
|
|
4729
4729
|
"checksums": [
|
|
4730
4730
|
{
|
|
4731
4731
|
"algorithm": "SHA256",
|
|
4732
|
-
"checksumValue": "
|
|
4732
|
+
"checksumValue": "d732feb06a0ca68dc069d2dc05a2dfdea2a6d5087e0c59e255f7d545dd2b4ef7"
|
|
4733
4733
|
},
|
|
4734
4734
|
{
|
|
4735
4735
|
"algorithm": "SHA1",
|
|
4736
|
-
"checksumValue": "
|
|
4736
|
+
"checksumValue": "dc5f6a767bd7780dfe85c7a0bea44802f5e3f36a"
|
|
4737
4737
|
}
|
|
4738
4738
|
],
|
|
4739
4739
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -4748,11 +4748,11 @@
|
|
|
4748
4748
|
"checksums": [
|
|
4749
4749
|
{
|
|
4750
4750
|
"algorithm": "SHA256",
|
|
4751
|
-
"checksumValue": "
|
|
4751
|
+
"checksumValue": "0cd7b143bddcb1c89fed82706a85d79f15db160b2adf166784585a0382b272ff"
|
|
4752
4752
|
},
|
|
4753
4753
|
{
|
|
4754
4754
|
"algorithm": "SHA1",
|
|
4755
|
-
"checksumValue": "
|
|
4755
|
+
"checksumValue": "81affb64d5df005397bd4c2180bee9efb71f561c"
|
|
4756
4756
|
}
|
|
4757
4757
|
],
|
|
4758
4758
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5242,11 +5242,11 @@
|
|
|
5242
5242
|
"checksums": [
|
|
5243
5243
|
{
|
|
5244
5244
|
"algorithm": "SHA256",
|
|
5245
|
-
"checksumValue": "
|
|
5245
|
+
"checksumValue": "0711d4c2a53cd19f271f4d65347c4720aa72fad075c00d7a4216e69783ac4ee1"
|
|
5246
5246
|
},
|
|
5247
5247
|
{
|
|
5248
5248
|
"algorithm": "SHA1",
|
|
5249
|
-
"checksumValue": "
|
|
5249
|
+
"checksumValue": "5e7b8fcce5e4e739ce7b6494a7920953d42dcf53"
|
|
5250
5250
|
}
|
|
5251
5251
|
],
|
|
5252
5252
|
"licenseConcluded": "LicenseRef-RobonoSDK",
|
|
@@ -5,6 +5,7 @@ import { AppState } from 'react-native';
|
|
|
5
5
|
export function useAttachmentPreview(message, load, active = true) {
|
|
6
6
|
const key = JSON.stringify([message.conversationId, message.id, message.media, message.revision, message.deleted]);
|
|
7
7
|
const [result, setResult] = useState(), [retryState, setRetryState] = useState({ key, load, count: 0 }), [failed, setFailed] = useState(false);
|
|
8
|
+
const [foreground, setForeground] = useState(0);
|
|
8
9
|
const attempt = retryState.key === key && retryState.load === load ? retryState.count : 0;
|
|
9
10
|
const setAttempt = (change) => setRetryState(previous => ({ key, load, count: change(previous.key === key && previous.load === load ? previous.count : 0) }));
|
|
10
11
|
const retry = () => setAttempt(n => n + 1);
|
|
@@ -22,9 +23,11 @@ export function useAttachmentPreview(message, load, active = true) {
|
|
|
22
23
|
missing(); });
|
|
23
24
|
function missing() { setFailed(true); if (attempt < 2)
|
|
24
25
|
timer = setTimeout(retry, attempt === 0 ? 1000 : 3000); }
|
|
25
|
-
const subscription = AppState.addEventListener('change', state => { if (state === 'active' && alive)
|
|
26
|
-
|
|
26
|
+
const subscription = AppState.addEventListener('change', state => { if (state === 'active' && alive) {
|
|
27
|
+
setRetryState({ key, load, count: 0 });
|
|
28
|
+
setForeground(n => n + 1);
|
|
29
|
+
} });
|
|
27
30
|
return () => { alive = false; clearTimeout(timer); subscription.remove(); };
|
|
28
|
-
}, [load, key, attempt, active]);
|
|
31
|
+
}, [load, key, attempt, active, foreground]);
|
|
29
32
|
return { preview, failed, retry, onImageError: () => { setResult({ key, load, value: {} }); setFailed(true); setAttempt(n => n < 2 ? n + 1 : n); } };
|
|
30
33
|
}
|
package/dist/expo-document.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { messageLinks } from './message-links.js';
|
|
3
|
-
import { WebView } from 'react-native-webview';
|
|
4
|
-
import { pdfDocumentHtml } from './pdf-preview.js';
|
|
5
3
|
import { useEffect, useState } from 'react';
|
|
6
4
|
import { ScrollView, View, ActivityIndicator } from 'react-native';
|
|
7
5
|
import { Text } from './typography.js';
|
|
@@ -22,8 +20,12 @@ export function ExpoDocumentPreview({ file, onOpenLink }) {
|
|
|
22
20
|
setError('This PDF is too large to preview.');
|
|
23
21
|
return;
|
|
24
22
|
}
|
|
25
|
-
void FS.readAsStringAsync(file.uri, { encoding: FS.EncodingType.Base64 }).then(bytes => {
|
|
26
|
-
|
|
23
|
+
void FS.readAsStringAsync(file.uri, { encoding: FS.EncodingType.Base64 }).then(bytes => {
|
|
24
|
+
if (!live)
|
|
25
|
+
return;
|
|
26
|
+
const { pdfDocumentHtml } = require('./pdf-preview.js');
|
|
27
|
+
setHtml(pdfDocumentHtml(bytes, !!onOpenLink));
|
|
28
|
+
}).catch(() => { if (live)
|
|
27
29
|
setError('This PDF could not be opened. Try again.'); });
|
|
28
30
|
return () => { live = false; };
|
|
29
31
|
}
|
|
@@ -36,7 +38,8 @@ export function ExpoDocumentPreview({ file, onOpenLink }) {
|
|
|
36
38
|
setError('This preview could not be opened. Close it and try again.'); });
|
|
37
39
|
return () => { live = false; };
|
|
38
40
|
}, [file.uri, file.mimeType, file.byteSize, !!onOpenLink]);
|
|
39
|
-
|
|
41
|
+
const WebView = html ? require('react-native-webview').WebView : null;
|
|
42
|
+
return html && WebView ? _jsx(WebView, { accessibilityLabel: documentStatus, source: { html }, onMessage: event => { try {
|
|
40
43
|
const value = JSON.parse(event.nativeEvent.data);
|
|
41
44
|
if (value.type === 'robono-document-status' && typeof value.status === 'string' && /^(Page \d+ of \d+|Preview unavailable)$/.test(value.status)) {
|
|
42
45
|
setDocumentStatus(value.status);
|
package/dist/expo-media.js
CHANGED
|
@@ -5,8 +5,6 @@ import { awaitMediaScreening } from './media-screening';
|
|
|
5
5
|
import { AppState } from 'react-native';
|
|
6
6
|
import { prepareRecordingPermission } from './recording-permission.js';
|
|
7
7
|
import { AudioModule, RecordingPresets, createAudioPlayer, setAudioModeAsync } from 'expo-audio';
|
|
8
|
-
import * as Picker from 'expo-image-picker';
|
|
9
|
-
import * as Documents from 'expo-document-picker';
|
|
10
8
|
import * as FS from 'expo-file-system/legacy';
|
|
11
9
|
import { defaultAttachmentLimits } from '@robono/messaging';
|
|
12
10
|
let audioOwner = false;
|
|
@@ -110,12 +108,14 @@ export function createExpoMessagingDevice(audio) {
|
|
|
110
108
|
const copies = [];
|
|
111
109
|
try {
|
|
112
110
|
if (kind === 'document') {
|
|
111
|
+
const Documents = require('expo-document-picker');
|
|
113
112
|
const result = await Documents.getDocumentAsync({ type: limits.allowedMimeTypes, multiple: maximum > 1, copyToCacheDirectory: true });
|
|
114
113
|
assets = result.assets ?? [];
|
|
115
114
|
if (result.canceled)
|
|
116
115
|
return [];
|
|
117
116
|
}
|
|
118
117
|
else {
|
|
118
|
+
const Picker = require('expo-image-picker');
|
|
119
119
|
if (source) {
|
|
120
120
|
const permission = await Picker.requestCameraPermissionsAsync();
|
|
121
121
|
check(signal);
|
|
@@ -303,6 +303,12 @@ export function createExpoMessagingStorage(options) {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
return {
|
|
306
|
+
async authorizePreview(message, signal) {
|
|
307
|
+
check(signal);
|
|
308
|
+
if (!access.canPreview(message))
|
|
309
|
+
await playbackPlan(message, signal, true);
|
|
310
|
+
return true;
|
|
311
|
+
},
|
|
306
312
|
async stream(message, context) {
|
|
307
313
|
check(context.signal);
|
|
308
314
|
if (message.deleted)
|
package/dist/expo-outbox.js
CHANGED
|
@@ -94,7 +94,7 @@ const files = {
|
|
|
94
94
|
export function createExpoMessagingClient(options) {
|
|
95
95
|
const request = createMessagingTransport(options), store = options.persistence === false ? undefined : new NativeMessagingOutbox(options.url, options.userId, files, options.namespace);
|
|
96
96
|
const saved = store ? new ExpoSavedMessages(options.url, options.userId, options.namespace) : undefined;
|
|
97
|
-
const client = new MessagingClient({ request, historyAccess: options.historyAccess, deviceHistory: options.deviceHistory, userId: options.userId, createMessageId: Crypto.randomUUID, outbox: store, saved, historyCache: store ? createExpoMessagingHistory(options.url, options.userId, options.namespace) : undefined, transformRequest: options.transformRequest });
|
|
97
|
+
const client = new MessagingClient({ request, previewScope: JSON.stringify([options.url, options.namespace ?? '']), historyAccess: options.historyAccess, deviceHistory: options.deviceHistory, userId: options.userId, createMessageId: Crypto.randomUUID, outbox: store, saved, historyCache: store ? createExpoMessagingHistory(options.url, options.userId, options.namespace) : undefined, transformRequest: options.transformRequest });
|
|
98
98
|
if (store)
|
|
99
99
|
stores.set(client, store);
|
|
100
100
|
if (saved)
|
package/dist/expo-screen.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export interface ExpoMessagingScreenProps extends Omit<MessagingScreenProps, 'pi
|
|
|
46
46
|
stage: MediaReadyStage;
|
|
47
47
|
elapsedMs: number;
|
|
48
48
|
}) => void;
|
|
49
|
-
/** Preload a bounded set of small recent attachments while this conversation is open. Default
|
|
49
|
+
/** Preload a bounded set of small recent attachments while this conversation is open. Default false. */
|
|
50
50
|
preloadRecentMedia?: boolean;
|
|
51
51
|
/** Compose a conversation with the supplied media adapters. */
|
|
52
52
|
renderConversation?: (props: MessagingScreenProps) => React.ReactNode;
|
package/dist/expo-screen.js
CHANGED
|
@@ -439,7 +439,7 @@ export function MessagingMediaOverlay({ controller, audio, appearance, inlineVoi
|
|
|
439
439
|
export function ExpoMessagingScreen(props) {
|
|
440
440
|
return _jsx(RobonoLocaleProvider, { value: props.interfaceLocale, children: _jsx(ExpoMessagingScreenContent, { ...props }) });
|
|
441
441
|
}
|
|
442
|
-
function ExpoMessagingScreenContent({ storage, audioSession, renderConversation, preloadRecentMedia =
|
|
442
|
+
function ExpoMessagingScreenContent({ storage, audioSession, renderConversation, preloadRecentMedia = false, ...props }) {
|
|
443
443
|
useEffect(() => { void props.client.reportUsage({ platform: Platform.OS === 'ios' ? 'ios' : Platform.OS === 'android' ? 'android' : 'other', components: ['media-tools'] }).catch(() => { }); }, [props.client]);
|
|
444
444
|
const [requestedMessageAction, setRequestedMessageAction] = useState();
|
|
445
445
|
const afterViewer = useRef(undefined);
|
package/dist/expo-social.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from './typography.js';
|
|
3
3
|
import { useRobonoLocale } from './localization.js';
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import { Linking, UIManager } from 'react-native';
|
|
5
6
|
// Expo builds include this native module when the documented peer is installed.
|
|
6
|
-
const available = !!UIManager.getViewManagerConfig('RNCWebView');
|
|
7
|
-
const WebView = available ? require('react-native-webview').WebView : null;
|
|
8
7
|
export function ExpoSocialPlayer({ html, origin, onError }) {
|
|
9
8
|
const { text: uiText, locale: uiLocale, number: uiNumber, count: uiCount } = useRobonoLocale();
|
|
9
|
+
const WebView = React.useMemo(() => UIManager.getViewManagerConfig('RNCWebView') ? require('react-native-webview').WebView : null, []);
|
|
10
10
|
if (!WebView)
|
|
11
11
|
return _jsx(Text, { children: uiText("Update the app to play this preview.") });
|
|
12
12
|
const open = (url) => { try {
|
package/dist/expo-thumbnails.js
CHANGED
|
@@ -24,14 +24,16 @@ export function createExpoThumbnails(storage, local, remove, history) {
|
|
|
24
24
|
cache.invalidate(key);
|
|
25
25
|
saving.invalidate(key);
|
|
26
26
|
}
|
|
27
|
+
let generated = false;
|
|
27
28
|
return cache.get(key, async (signal) => {
|
|
28
29
|
if (signal.aborted)
|
|
29
30
|
return {};
|
|
30
|
-
const saved = options?.refresh ? undefined : await history?.cachedHistoryPreview?.(message).catch(() => undefined);
|
|
31
|
+
const saved = options?.refresh ? undefined : await history?.cachedHistoryPreview?.(message, current => storage.authorizePreview?.(current, signal) ?? Promise.resolve(false)).catch(() => undefined);
|
|
31
32
|
if (signal.aborted)
|
|
32
33
|
return {};
|
|
33
34
|
if (saved)
|
|
34
35
|
return { uri: saved };
|
|
36
|
+
generated = true;
|
|
35
37
|
let file = local(id), downloaded = false, poster, thumbnail;
|
|
36
38
|
// An optimistic bubble has no server message ID yet. Only its local file can
|
|
37
39
|
// supply a preview until acknowledgement replaces the pending bubble.
|
|
@@ -74,36 +76,37 @@ export function createExpoThumbnails(storage, local, remove, history) {
|
|
|
74
76
|
await FS.deleteAsync(uri, { idempotent: true }).catch(() => { });
|
|
75
77
|
}
|
|
76
78
|
}).then(value => {
|
|
77
|
-
if (value.uri && history?.canCacheHistoryPreview?.(message))
|
|
79
|
+
if (generated && value.uri && history?.canCacheHistoryPreview?.(message)) {
|
|
80
|
+
if (value.uri.length <= 65558) {
|
|
81
|
+
void history.cacheHistoryPreview(message, value.uri).catch(() => { });
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
78
84
|
void saving.get(key, async (signal) => {
|
|
79
|
-
let
|
|
85
|
+
let output;
|
|
80
86
|
try {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
await
|
|
93
|
-
|
|
94
|
-
if (image.base64 && uri.length <= 65558)
|
|
95
|
-
break;
|
|
87
|
+
const dimensions = await new Promise((resolve, reject) => Image.getSize(value.uri, (width, height) => resolve({ width, height }), reject));
|
|
88
|
+
for (const maximum of [320, 160]) {
|
|
89
|
+
if (signal.aborted)
|
|
90
|
+
return {};
|
|
91
|
+
const scale = Math.min(1, maximum / Math.max(dimensions.width, dimensions.height));
|
|
92
|
+
const image = await ImageManipulator.manipulateAsync(value.uri, [{ resize: { width: Math.max(1, Math.round(dimensions.width * scale)), height: Math.max(1, Math.round(dimensions.height * scale)) } }], { compress: .6, format: ImageManipulator.SaveFormat.JPEG, base64: true });
|
|
93
|
+
output = image.uri;
|
|
94
|
+
await FS.deleteAsync(output, { idempotent: true });
|
|
95
|
+
output = undefined;
|
|
96
|
+
const uri = 'data:image/jpeg;base64,' + (image.base64 ?? '');
|
|
97
|
+
if (image.base64 && uri.length <= 65558 && !signal.aborted) {
|
|
98
|
+
await history.cacheHistoryPreview(message, uri);
|
|
99
|
+
return { uri };
|
|
96
100
|
}
|
|
97
101
|
}
|
|
98
|
-
|
|
99
|
-
await history.cacheHistoryPreview(message, uri);
|
|
100
|
-
return { uri };
|
|
102
|
+
return {};
|
|
101
103
|
}
|
|
102
104
|
finally {
|
|
103
105
|
if (output && FS.cacheDirectory && output.startsWith(FS.cacheDirectory))
|
|
104
106
|
await FS.deleteAsync(output, { idempotent: true }).catch(() => { });
|
|
105
107
|
}
|
|
106
108
|
});
|
|
109
|
+
}
|
|
107
110
|
return value;
|
|
108
111
|
});
|
|
109
112
|
}
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ export { MessagingSafety } from './safety.js';
|
|
|
56
56
|
import { PollMessage, PollComposer } from "./polls.js";
|
|
57
57
|
export { PollMessage, PollComposer } from "./polls.js";
|
|
58
58
|
import React, { createContext, useContext, useMemo, useCallback, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore, } from "react";
|
|
59
|
-
import { Animated, ActivityIndicator, AppState, BackHandler, FlatList, Image, Keyboard, Linking, Platform, Pressable, ScrollView, View, useWindowDimensions, } from "react-native";
|
|
59
|
+
import { Animated, ActivityIndicator, AppState, BackHandler, Dimensions, FlatList, Image, Keyboard, Linking, Platform, Pressable, ScrollView, View, useWindowDimensions, } from "react-native";
|
|
60
60
|
import { useQuoteGesture, messageInfoRevealWidth, messageReplyRevealWidth } from "./use-quote-gesture.js";
|
|
61
61
|
import { MessageIcon, duration, fileSize, chatSurface, composerSurface } from "./icons.js";
|
|
62
62
|
import { VoiceMessageComposer } from "./voice-composer.js";
|
|
@@ -477,10 +477,11 @@ const MessagingBubbleView = React.memo(function MessagingBubbleView({ message, p
|
|
|
477
477
|
useEffect(() => () => { afterMenu.current = null; }, [client, message.id]);
|
|
478
478
|
const wholeMessage = message.part ? client.getSnapshot().messages.find(m => m.id === message.id) ?? message : message;
|
|
479
479
|
const canChange = (!message.part || wholeMessage !== message) && !extra?.weather && !extra?.call && mine && !pendingStatus && !message.deleted && !!state.messageActionsAvailable && !!state.settings?.enabled && state.conversation?.canSend !== false && !wholeMessage.readAt && !wholeMessage.textReadAt;
|
|
480
|
-
const anchor = useRef(null)
|
|
481
|
-
const [menuPosition, setMenuPosition] = useState(
|
|
480
|
+
const anchor = useRef(null);
|
|
481
|
+
const [menuPosition, setMenuPosition] = useState(null), [hovered, setHovered] = useState(false);
|
|
482
482
|
const [addressBubbleHeight, setAddressBubbleHeight] = useState(44);
|
|
483
483
|
const openMenu = () => anchor.current?.measureInWindow((x, y, width, height) => {
|
|
484
|
+
const viewport = Dimensions.get('window');
|
|
484
485
|
setMenuPosition(messageMenuPosition(x, y, width, height, viewport.width, viewport.height, mine));
|
|
485
486
|
setActions(true);
|
|
486
487
|
});
|
|
@@ -489,7 +490,9 @@ const MessagingBubbleView = React.memo(function MessagingBubbleView({ message, p
|
|
|
489
490
|
const canTranscript = languageTools?.transcription !== false && !pendingStatus && (voice || message.kind === 'video') && !!state.settings?.features.transcription && client.hasLanguageTools() && !message.deleted;
|
|
490
491
|
const translation = state.translationPreference;
|
|
491
492
|
const translationLanguage = translation?.language ?? languageTools?.preferredLanguage ?? language;
|
|
492
|
-
const translationVoice =
|
|
493
|
+
const translationVoice = languageTools?.voiceOutput === false || !state.settings?.features.translation
|
|
494
|
+
? undefined
|
|
495
|
+
: resolveMessagingVoice(translationLanguage ?? Intl.DateTimeFormat().resolvedOptions().locale, translation?.voice, languageTools?.preferredVoice, state.settings?.languageDefaults?.voices);
|
|
493
496
|
const sourceLanguage = participants?.[message.senderId]?.language ?? (state.conversation?.kind === 'direct' ? contact.language : undefined) ?? translation?.sourceLanguage;
|
|
494
497
|
const canTranslate = message.part !== 'text' && languageTools?.translation !== false && !mine && !extra?.weather && !extra?.call && !pendingStatus && ['text', 'voice', 'video'].includes(message.kind) && !!state.settings?.enabled && !!state.settings.features.translation && client.hasLanguageTools() && !message.deleted && translation?.mode !== undefined && translation.mode !== 'off' && needsMessageTranslation(sourceLanguage, translationLanguage) && (translation.mode !== 'voice' || languageTools?.voiceOutput === false || !!TranslationVoice);
|
|
495
498
|
const transformGeneration = useRef(0), transformAbort = useRef(null);
|
|
@@ -596,8 +599,8 @@ const MessagingBubbleView = React.memo(function MessagingBubbleView({ message, p
|
|
|
596
599
|
return; if (extra?.address)
|
|
597
600
|
extraRef.current?.open();
|
|
598
601
|
else
|
|
599
|
-
socialRef.current?.open(); } : () => void open(), children: bodyContent }), !discussionPreview && state.discussionAvailable && !!message.replyCount && _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: message.replyCount + ' ' + (message.replyCount === 1 ? 'reply' : 'replies'), onPress: () => openDiscussion(message.id), style: { minHeight: 32, justifyContent: 'center' }, children: _jsxs(Text, { style: { color: c.accent, fontSize: 12, fontWeight: '600' }, children: [message.replyCount, " ", message.replyCount === 1 ? uiText("reply") : uiText("replies")] }) }), message.kind !== 'text' && !!message.text && _jsx(View, { testID: voice ? 'voice-message-caption' : undefined, style: voice && !showingTransform ? { maxWidth: 220, alignSelf: mine ? 'flex-end' : 'flex-start', marginTop: 1, paddingTop: 4, paddingBottom: 1, borderRadius: 14, ...(mine ? { borderBottomEndRadius: 3 } : { borderBottomStartRadius: 3 }), backgroundColor: mine ? c.outgoing : c.incoming } : visual ? { backgroundColor: mine ? c.outgoing : c.incoming, ...corners, borderTopLeftRadius: 0, borderTopRightRadius: 0, paddingHorizontal: 6, paddingVertical: 3, ...(mine ? { paddingRight: 12 } : { paddingLeft: 12 }), ...(circleStatus ? { paddingEnd: 24 } : {}) } : undefined, children: _jsx(Text, { testID: "attachment-caption", selectable: true, onLongPress: menu, style: { color: ink, fontSize: 16, lineHeight: 22, marginTop: voice ? 0 : 2, textAlign: 'left', alignSelf: 'stretch', paddingHorizontal: voice || message.kind === 'document' ? 8 : 2, ...(voice || message.kind === 'document' ? (mine ? { paddingRight: 14 } : { paddingLeft: 14 }) : {}), paddingBottom: 2 }, children: renderText(message.text) }) }), deliveryStatus && message.kind !== 'text' && message.kind !== 'poll' && !voice && !visual && _jsx(View, { style: { marginTop: 4, alignSelf: 'flex-end' }, children: footer }), (!voice || showingTransform) && languageActions, (!voice || showingTransform) && insideMeta, components?.MessageFooter && !message.deleted && _jsx(components.MessageFooter, { ...regionProps }), transforming && !voice && _jsx(Text, { accessibilityLiveRegion: "polite", style: { color: ink, fontSize: 11 }, children: uiText("Converting…") }), !!error && _jsxs(MessagingPopup, { screen: "alerts", compact: true, contentWidth: 640, title: uiText("Message"), foreground: c.foreground, background: chatSurface(c.background), onClose: () => setError(''), children: [_jsx(Text, { accessibilityRole: "alert", style: { color: messagingPopupColors.foreground, fontSize: 15, lineHeight: 21, marginTop: 8 }, children: error }), _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: uiText("Close message alert"), onPress: () => setError(''), style: { alignSelf: 'flex-end', minHeight: 44, justifyContent: 'center', paddingHorizontal: 8, marginTop: 8 }, children: _jsx(Text, { style: { color: c.accent }, children: uiText("OK") }) })] }), (showingTransform || message.custom || extra?.weather || extra?.call || message.kind === 'text' || message.kind === 'poll') && sendRetry, Platform.OS === 'web' && !mine && canInteract && state.settings?.features.reactions && _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: uiText("React to message"), onFocus: () => setHovered(true), onBlur: () => setHovered(false), onPress: openMenu, style: { opacity: hovered || actions ? 1 : 0, position: 'absolute', top: 6, ...(mine ? { left: -34 } : { right: -34 }), width: 32, height: 32, alignItems: 'center', justifyContent: 'center' }, children: _jsx(MessageIcon, { name: "reaction", color: c.secondary, size: 20 }) }), !!message.reactions?.length && _jsx(View, { testID: "message-reaction-badge", pointerEvents: "none", accessibilityLabel: message.reactions.slice(-3).map(r => r.emoji).join(' '), style: { position: 'absolute', zIndex: 41, top: -16, ...(mine ? { end: -9 } : { start: -9 }), minWidth: 30, height: 20, alignItems: 'center', justifyContent: 'center' }, children: _jsx(Text, { style: { fontSize: 16, lineHeight: 20 }, children: message.reactions.slice(-3).map(r => r.emoji).join(' ') }) }), _jsx(MessageMenu, { visible: actions, position: menuPosition,
|
|
600
|
-
return _jsxs(View, { ...(Platform.OS === 'web' ? { onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onContextMenu: (event) => { event.preventDefault(); menu(); } } : {}), style: { width: '100%', position: 'relative', marginTop: messageGap + (message.reactions?.length ? 16 : 0), marginBottom: 0 }, children: [quoteGesture.infoLoaded && _jsxs(Animated.View, { pointerEvents: "none", testID: "message-info-reveal", accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: { ...quoteGesture.revealWebStyle, position: 'absolute', top: '50%', marginTop: -26, minHeight: 52, width: messageInfoRevealWidth, justifyContent: 'center', ...(mine ? { start: 0, alignItems: 'flex-start' } : { end: 0, alignItems: 'flex-end' }), opacity: quoteGesture.infoOpacity }, children: [_jsx(_Fragment, { children: timePosition === 'slide' && _jsxs(View, { style: { flexDirection: 'row', alignItems: 'baseline', gap: 4 }, children: [_jsx(Text, { style: { color: c.secondary, fontSize: 8, lineHeight: 11, fontWeight: '900' }, children: uiText("SENT:") }), _jsx(Text, { testID: "message-slide-time", style: { color: c.foreground, fontSize: 10, lineHeight: 12, fontWeight: '800' }, children: messageTimeLabel(message, ui.formatMessageTime, uiText) })] }) }), mine && state.settings?.features.readReceipts && _jsxs(View, { style: { flexDirection: 'row', alignItems: 'baseline', gap: 4 }, children: [_jsx(Text, { style: { color: c.secondary, fontSize: 8, lineHeight: 11, fontWeight: '900' }, children: uiText("READ:") }), _jsx(Text, { style: { color: message.readAt ? c.foreground : c.secondary, fontSize: 10, lineHeight: 12, fontWeight: '800' }, children: message.readAt ? ui.formatMessageTime(message.readAt) : uiText("Not yet") })] })] }), quoting &&
|
|
602
|
+
socialRef.current?.open(); } : () => void open(), children: bodyContent }), !discussionPreview && state.discussionAvailable && !!message.replyCount && _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: message.replyCount + ' ' + (message.replyCount === 1 ? 'reply' : 'replies'), onPress: () => openDiscussion(message.id), style: { minHeight: 32, justifyContent: 'center' }, children: _jsxs(Text, { style: { color: c.accent, fontSize: 12, fontWeight: '600' }, children: [message.replyCount, " ", message.replyCount === 1 ? uiText("reply") : uiText("replies")] }) }), message.kind !== 'text' && !!message.text && _jsx(View, { testID: voice ? 'voice-message-caption' : undefined, style: voice && !showingTransform ? { maxWidth: 220, alignSelf: mine ? 'flex-end' : 'flex-start', marginTop: 1, paddingTop: 4, paddingBottom: 1, borderRadius: 14, ...(mine ? { borderBottomEndRadius: 3 } : { borderBottomStartRadius: 3 }), backgroundColor: mine ? c.outgoing : c.incoming } : visual ? { backgroundColor: mine ? c.outgoing : c.incoming, ...corners, borderTopLeftRadius: 0, borderTopRightRadius: 0, paddingHorizontal: 6, paddingVertical: 3, ...(mine ? { paddingRight: 12 } : { paddingLeft: 12 }), ...(circleStatus ? { paddingEnd: 24 } : {}) } : undefined, children: _jsx(Text, { testID: "attachment-caption", selectable: true, onLongPress: menu, style: { color: ink, fontSize: 16, lineHeight: 22, marginTop: voice ? 0 : 2, textAlign: 'left', alignSelf: 'stretch', paddingHorizontal: voice || message.kind === 'document' ? 8 : 2, ...(voice || message.kind === 'document' ? (mine ? { paddingRight: 14 } : { paddingLeft: 14 }) : {}), paddingBottom: 2 }, children: renderText(message.text) }) }), deliveryStatus && message.kind !== 'text' && message.kind !== 'poll' && !voice && !visual && _jsx(View, { style: { marginTop: 4, alignSelf: 'flex-end' }, children: footer }), (!voice || showingTransform) && languageActions, (!voice || showingTransform) && insideMeta, components?.MessageFooter && !message.deleted && _jsx(components.MessageFooter, { ...regionProps }), transforming && !voice && _jsx(Text, { accessibilityLiveRegion: "polite", style: { color: ink, fontSize: 11 }, children: uiText("Converting…") }), !!error && _jsxs(MessagingPopup, { screen: "alerts", compact: true, contentWidth: 640, title: uiText("Message"), foreground: c.foreground, background: chatSurface(c.background), onClose: () => setError(''), children: [_jsx(Text, { accessibilityRole: "alert", style: { color: messagingPopupColors.foreground, fontSize: 15, lineHeight: 21, marginTop: 8 }, children: error }), _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: uiText("Close message alert"), onPress: () => setError(''), style: { alignSelf: 'flex-end', minHeight: 44, justifyContent: 'center', paddingHorizontal: 8, marginTop: 8 }, children: _jsx(Text, { style: { color: c.accent }, children: uiText("OK") }) })] }), (showingTransform || message.custom || extra?.weather || extra?.call || message.kind === 'text' || message.kind === 'poll') && sendRetry, Platform.OS === 'web' && !mine && canInteract && state.settings?.features.reactions && _jsx(Pressable, { accessibilityRole: "button", accessibilityLabel: uiText("React to message"), onFocus: () => setHovered(true), onBlur: () => setHovered(false), onPress: openMenu, style: { opacity: hovered || actions ? 1 : 0, position: 'absolute', top: 6, ...(mine ? { left: -34 } : { right: -34 }), width: 32, height: 32, alignItems: 'center', justifyContent: 'center' }, children: _jsx(MessageIcon, { name: "reaction", color: c.secondary, size: 20 }) }), !!message.reactions?.length && _jsx(View, { testID: "message-reaction-badge", pointerEvents: "none", accessibilityLabel: message.reactions.slice(-3).map(r => r.emoji).join(' '), style: { position: 'absolute', zIndex: 41, top: -16, ...(mine ? { end: -9 } : { start: -9 }), minWidth: 30, height: 20, alignItems: 'center', justifyContent: 'center' }, children: _jsx(Text, { style: { fontSize: 16, lineHeight: 20 }, children: message.reactions.slice(-3).map(r => r.emoji).join(' ') }) }), menuPosition && _jsx(MessageMenu, { visible: actions, position: menuPosition, mine: mine, reactions: reactionPicker, onClose: () => setActions(false), onDismiss: menuDismissed, children: actions && _jsxs(_Fragment, { children: [quoting && _jsx(MessageMenuRow, { icon: "quote", label: uiText("Quote message"), onPress: () => { setActions(false); setReply(message); } }), !discussionPreview && state.discussionAvailable && !pendingStatus && !message.deleted && _jsx(MessageMenuRow, { icon: "quote", label: uiText("Replies"), onPress: () => leaveMenu(() => openDiscussion(message.threadRoot ?? message.id)) }), state.discussionAvailable && canInteract && state.conversation?.ownerId === userId && _jsx(MessageMenuRow, { icon: "bookmark", label: message.pinned ? uiText("Unpin for group") : uiText("Pin for group"), onPress: () => { setActions(false); void client.pinMessage(message.id, !message.pinned).catch(e => setError(e instanceof Error ? e.message : uiText("The pin could not change."))); } }), canCopy && _jsx(MessageMenuRow, { icon: "copy", label: uiText("Copy"), onPress: () => { setActions(false); void (copyText ? copyText(message.text) : navigator.clipboard.writeText(message.text)).catch(() => setError(uiText("The text could not be copied."))); } }), canInteract && client.canForward(message) && _jsx(MessageMenuRow, { icon: "redo", label: uiText("Forward"), onPress: () => leaveMenu(() => setForwarding([message])) }), !pendingStatus && !message.deleted && message.kind !== 'poll' && client.hasSavedMessages() && _jsx(MessageMenuRow, { icon: "bookmark", label: saved.some(r => r.key === savedMessageKey(wholeMessage)) ? uiText("Remove from Saved") : uiText(message.part ? "Save both items" : "Save"), disabled: saving, onPress: () => { setActions(false); void toggleSaved(wholeMessage); } }), canChange && !message.custom && message.kind !== 'poll' && state.settings?.features[message.kind] && _jsx(MessageMenuRow, { icon: "edit", label: uiText(message.part ? "Edit both items" : "Edit"), onPress: () => { setActions(false); setEditing(wholeMessage); } }), !mine && state.conversation?.safety?.canReport && _jsx(MessageMenuRow, { icon: "flag", label: uiText("Report"), danger: true, onPress: () => leaveMenu(() => setReportOpen(true)) }), !pendingStatus && !message.deleted && ['owner', 'moderator'].includes(state.conversation?.roomRole ?? '') && _jsx(MessageMenuRow, { icon: "trash", label: uiText('Remove from group'), danger: true, onPress: () => leaveMenu(() => setRoomRemoval(true)) }), canChange && _jsx(MessageMenuRow, { icon: "trash", label: uiText(message.part ? "Delete both items" : "Delete"), danger: true, onPress: () => leaveMenu(() => setDeleting([wholeMessage])) }), (pendingStatus === 'failed' || pendingStatus === 'queued') && _jsx(MessageMenuRow, { icon: "trash", label: uiText("Remove unsent message"), danger: true, onPress: () => { setActions(false); void client.discardPending(message.clientMessageId).catch(() => setError(uiText("The unsent message could not be removed."))); } }), !pendingStatus && onMessageOptions && _jsx(MessageMenuRow, { icon: "more", label: uiText("More options"), onPress: () => leaveMenu(() => onMessageOptions(message)) }), !pendingStatus && !message.deleted && _jsx(MessageMenuRow, { icon: "check", label: uiText(message.part ? "Select both items" : "Select Multiple"), divider: true, onPress: () => { setActions(false); setSelection([wholeMessage]); Keyboard.dismiss(); } })] }) }), roomRemoval && _jsx(MessagingRoomRemoval, { client: client, message: message, accent: c.accent, onClose: () => setRoomRemoval(false) }), reportOpen && _jsx(MessagingSafety, { client: client, state: state, appearance: design, name: participants?.[message.senderId]?.name ?? 'Contact', messageId: message.id, onClose: () => setReportOpen(false) })] });
|
|
603
|
+
return _jsxs(View, { ...(Platform.OS === 'web' ? { onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), onContextMenu: (event) => { event.preventDefault(); menu(); } } : {}), style: { width: '100%', position: 'relative', marginTop: messageGap + (message.reactions?.length ? 16 : 0), marginBottom: 0 }, children: [quoteGesture.infoLoaded && _jsxs(Animated.View, { pointerEvents: "none", testID: "message-info-reveal", accessible: false, accessibilityElementsHidden: true, importantForAccessibility: "no-hide-descendants", style: { ...quoteGesture.revealWebStyle, position: 'absolute', top: '50%', marginTop: -26, minHeight: 52, width: messageInfoRevealWidth, justifyContent: 'center', ...(mine ? { start: 0, alignItems: 'flex-start' } : { end: 0, alignItems: 'flex-end' }), opacity: quoteGesture.infoOpacity }, children: [_jsx(_Fragment, { children: timePosition === 'slide' && _jsxs(View, { style: { flexDirection: 'row', alignItems: 'baseline', gap: 4 }, children: [_jsx(Text, { style: { color: c.secondary, fontSize: 8, lineHeight: 11, fontWeight: '900' }, children: uiText("SENT:") }), _jsx(Text, { testID: "message-slide-time", style: { color: c.foreground, fontSize: 10, lineHeight: 12, fontWeight: '800' }, children: messageTimeLabel(message, ui.formatMessageTime, uiText) })] }) }), mine && state.settings?.features.readReceipts && _jsxs(View, { style: { flexDirection: 'row', alignItems: 'baseline', gap: 4 }, children: [_jsx(Text, { style: { color: c.secondary, fontSize: 8, lineHeight: 11, fontWeight: '900' }, children: uiText("READ:") }), _jsx(Text, { style: { color: message.readAt ? c.foreground : c.secondary, fontSize: 10, lineHeight: 12, fontWeight: '800' }, children: message.readAt ? ui.formatMessageTime(message.readAt) : uiText("Not yet") })] })] }), quoting && _jsx(Animated.View, { pointerEvents: "none", ...(Platform.OS === 'web' ? { 'aria-hidden': true } : { accessible: false, accessibilityElementsHidden: true, importantForAccessibility: 'no-hide-descendants' }), testID: `quote-reveal-${mine ? 'outgoing' : 'incoming'}`, style: { ...quoteGesture.revealWebStyle, position: 'absolute', top: '50%', marginTop: -26, ...(mine ? { end: 0 } : { start: 0 }), width: messageReplyRevealWidth, minHeight: 52, gap: 3, alignItems: 'center', justifyContent: 'center', opacity: quoteGesture.revealOpacity }, children: quoteGesture.quoteLoaded && _jsxs(_Fragment, { children: [_jsx(View, { style: { width: 40, height: 40, borderRadius: 20, alignItems: 'center', justifyContent: 'center', backgroundColor: chatSurface(c.background), borderWidth: 1.5, borderColor: c.secondary + '40' }, children: _jsx(MessageIcon, { name: "quote", color: c.accent, size: 30 }) }), _jsx(Text, { style: { color: c.secondary, fontSize: 10, fontWeight: '900' }, children: uiText("QUOTE MESSAGE") })] }) }), _jsxs(Animated.View, { ref: node => { anchor.current = node; if (quoteGesture.webRef)
|
|
601
604
|
quoteGesture.webRef.current = node; }, ...quoteGesture.handlers, accessibilityActions: quoting ? [{ name: "quote", label: uiText("Quote message") }] : undefined, onAccessibilityAction: event => { if (quoting && event.nativeEvent.actionName === "quote")
|
|
602
605
|
setReply(message); }, testID: `message-${message.kind}-${mine ? 'outgoing' : 'incoming'}`, style: { ...quoteGesture.webStyle, transform: [{ translateX: quoteGesture.offset }], ...(Platform.OS === "web" && !pendingStatus ? { touchAction: "pan-y", userSelect: "none" } : {}), alignSelf: mine ? 'flex-end' : 'flex-start', maxWidth: `${design.screens?.chat?.messageWidth ?? 88}%`, backgroundColor: visual ? 'transparent' : mine ? c.outgoing : c.incoming, ...corners, ...(topTail ? (mine ? { borderTopRightRadius: 0 } : { borderTopLeftRadius: 0 }) : {}), padding: visual ? 0 : 6, paddingBottom: visual ? 0 : canTranscript || canTranslate ? 3 : 6, boxShadow: bigEmoji ? undefined : '0 1px 1px #00000010', ...((voice || message.kind === 'document') && !showingTransform ? { padding: 0, paddingBottom: 0, boxShadow: undefined, ...(voice ? { backgroundColor: 'transparent' } : {}) } : {}), ...(message.kind === 'poll' ? { backgroundColor: chatSurface(c.background), borderWidth: 1, borderColor: c.accent + '60', paddingHorizontal: 8, paddingTop: 4, paddingBottom: 2 } : {}), ...(bigEmoji ? { backgroundColor: 'transparent', paddingHorizontal: 4, paddingTop: 0, paddingBottom: 0 } : {}), ...(extra?.address || socialReady ? { flexDirection: mine ? 'row-reverse' : 'row', alignItems: 'center', gap: 8, padding: 0, paddingBottom: 0, backgroundColor: 'transparent', boxShadow: undefined } : {}), ...(paddedBubble ? (mine ? { paddingRight: quoteInset + 6 } : { paddingLeft: quoteInset + 6 }) : {}) }, children: [topTail && _jsx(View, { testID: "message-top-tail", pointerEvents: "none", style: { position: 'absolute', top: 0, ...(mine ? { right: -7 } : { left: -7 }), width: 0, height: 0, borderTopWidth: 10, borderTopColor: hasQuote ? quoteBackground : mine ? c.outgoing : c.incoming, ...(mine ? { borderRightWidth: 8, borderRightColor: 'transparent' } : { borderLeftWidth: 8, borderLeftColor: 'transparent' }) } }), extra?.address ? extraCard : socialReady ? socialCard : bubbleBody] }), notice.text && _jsx(Text, { testID: "message-delivery-notice", accessibilityLiveRegion: "polite", style: { alignSelf: 'flex-end', maxWidth: `${design.screens?.chat?.messageWidth ?? 88}%`, color: c.secondary, fontSize: 11, lineHeight: 15, paddingHorizontal: 3, marginTop: 3 }, children: uiText(notice.text) }), belowMeta && _jsx(Animated.View, { pointerEvents: "none", style: { ...quoteGesture.webStyle, transform: [{ translateX: quoteGesture.offset }], alignSelf: mine ? 'flex-end' : 'flex-start', maxWidth: `${design.screens?.chat?.messageWidth ?? 88}%`, paddingHorizontal: 3, marginTop: 3 }, children: belowMeta })] });
|
|
603
606
|
});
|
package/dist/media-access.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare class MessagingMediaAccess {
|
|
|
15
15
|
private grants;
|
|
16
16
|
constructor(now?: () => number);
|
|
17
17
|
private valid;
|
|
18
|
+
canPreview(message: MessagingMessage): boolean;
|
|
18
19
|
remember(message: MessagingMessage, grant: unknown): void;
|
|
19
20
|
get(message: MessagingMessage, reauthorize?: boolean): {
|
|
20
21
|
url: string;
|
package/dist/media-access.js
CHANGED
|
@@ -23,6 +23,9 @@ export class MessagingMediaAccess {
|
|
|
23
23
|
return false;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
canPreview(message) {
|
|
27
|
+
return this.valid(message, message.attachmentPreview) || !!this.get(message);
|
|
28
|
+
}
|
|
26
29
|
remember(message, grant) { if (this.valid(message, grant))
|
|
27
30
|
this.grants.set(message, { ...grant }); }
|
|
28
31
|
get(message, reauthorize = false) {
|
|
@@ -24,6 +24,8 @@ export interface MessagingMediaStorage {
|
|
|
24
24
|
conversationId: string;
|
|
25
25
|
kind: MediaKind;
|
|
26
26
|
}): Promise<MessageMedia>;
|
|
27
|
+
/** Recheck permission to display previously downloaded preview pixels without transferring bytes. */
|
|
28
|
+
authorizePreview?(message: MessagingMessage, signal: AbortSignal): Promise<boolean>;
|
|
27
29
|
thumbnail?(message: MessagingMessage, context: MediaTransferOptions): Promise<LocalMessagingMedia | null>;
|
|
28
30
|
download(message: MessagingMessage, context: MediaTransferOptions): Promise<LocalMessagingMedia>;
|
|
29
31
|
/** Optional native streaming for voice/video. Return null to use a verified download. */
|
package/dist/message-menu.d.ts
CHANGED
|
@@ -17,10 +17,9 @@ export declare function MessageMenuRow({ icon, label, onPress, disabled, danger,
|
|
|
17
17
|
divider?: boolean;
|
|
18
18
|
scope?: 'message' | 'friends';
|
|
19
19
|
}): React.JSX.Element;
|
|
20
|
-
export declare function MessageMenu({ visible, position,
|
|
20
|
+
export declare function MessageMenu({ visible, position, mine, reactions, children, onClose, onDismiss }: {
|
|
21
21
|
visible: boolean;
|
|
22
22
|
position: MessageMenuPosition;
|
|
23
|
-
screenHeight: number;
|
|
24
23
|
mine: boolean;
|
|
25
24
|
reactions: ReactNode;
|
|
26
25
|
children: ReactNode;
|
package/dist/message-menu.js
CHANGED
|
@@ -19,7 +19,7 @@ export function MessageMenuRow({ icon, label, onPress, disabled, danger, divider
|
|
|
19
19
|
const dangerColor = messagingContrastInk(palette.background) === '#000000' ? '#b42318' : '#F87171';
|
|
20
20
|
return _jsxs(_Fragment, { children: [divider && _jsx(View, { style: { height: 1, marginHorizontal: 12, marginVertical: 4, backgroundColor: palette.foreground + '22' } }), _jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: label, disabled: disabled, onPress: onPress, style: ({ pressed }) => ({ minHeight: layout.rowHeight, paddingHorizontal: 12, flexDirection: 'row', alignItems: 'center', gap: 8, opacity: disabled ? .5 : 1, backgroundColor: pressed ? palette.foreground + '12' : 'transparent' }), children: [layout.showIcons && _jsx(MessageIcon, { name: icon, color: danger ? dangerColor : palette.icons, size: 22 }), _jsx(Text, { style: { flex: 1, color: danger ? dangerColor : palette.foreground, fontSize: layout.textSize, fontWeight: '700' }, children: label })] })] });
|
|
21
21
|
}
|
|
22
|
-
export function MessageMenu({ visible, position,
|
|
22
|
+
export function MessageMenu({ visible, position, mine, reactions, children, onClose, onDismiss }) {
|
|
23
23
|
const { text: uiText } = useRobonoLocale();
|
|
24
24
|
const appearance = useMessagingAppearance() ?? defaultMessagingSettings().appearance, palette = messagingMenuColors(appearance, 'message'), layout = messagingMenuLayout(appearance.menus?.message);
|
|
25
25
|
useEffect(() => { if (!visible || Platform.OS !== 'web')
|
package/dist/recent-media.d.ts
CHANGED
package/dist/recent-media.js
CHANGED
|
@@ -7,6 +7,7 @@ export class RecentMessagingMedia {
|
|
|
7
7
|
now;
|
|
8
8
|
entries = new Map();
|
|
9
9
|
running = 0;
|
|
10
|
+
scheduledFrame;
|
|
10
11
|
foreground = new Map();
|
|
11
12
|
resumeTimer;
|
|
12
13
|
constructor(source, files, now = Date.now) {
|
|
@@ -15,6 +16,7 @@ export class RecentMessagingMedia {
|
|
|
15
16
|
this.now = now;
|
|
16
17
|
}
|
|
17
18
|
storage = {
|
|
19
|
+
authorizePreview: (message, signal) => this.source.authorizePreview?.(message, signal) ?? Promise.resolve(false),
|
|
18
20
|
thumbnail: (message, context) => this.source.thumbnail?.(message, context) ?? Promise.resolve(null),
|
|
19
21
|
stream: async (message, context) => {
|
|
20
22
|
if (context.signal.aborted)
|
|
@@ -105,9 +107,26 @@ export class RecentMessagingMedia {
|
|
|
105
107
|
entry.expires = this.now() + 60000;
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
this.
|
|
110
|
+
if (![...this.entries.values()].some(entry => !entry.attempted) || this.scheduledFrame !== undefined)
|
|
111
|
+
return;
|
|
112
|
+
// The first frame commits the message list. Give the screen a chance to
|
|
113
|
+
// paint before starting speculative original downloads on the following frame.
|
|
114
|
+
// Explicit taps still call start() immediately, and removals above are synchronous.
|
|
115
|
+
if (typeof requestAnimationFrame !== 'function') {
|
|
116
|
+
this.pump();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.scheduledFrame = requestAnimationFrame(() => {
|
|
120
|
+
this.scheduledFrame = requestAnimationFrame(() => {
|
|
121
|
+
this.scheduledFrame = undefined;
|
|
122
|
+
this.pump();
|
|
123
|
+
});
|
|
124
|
+
});
|
|
109
125
|
}
|
|
110
|
-
clear() {
|
|
126
|
+
clear() { if (this.scheduledFrame !== undefined) {
|
|
127
|
+
cancelAnimationFrame(this.scheduledFrame);
|
|
128
|
+
this.scheduledFrame = undefined;
|
|
129
|
+
} clearTimeout(this.resumeTimer); for (const [signal, release] of this.foreground)
|
|
111
130
|
signal.removeEventListener('abort', release); this.foreground.clear(); for (const [id, entry] of this.entries)
|
|
112
131
|
this.drop(id, entry); }
|
|
113
132
|
/** Pause speculation until the viewer closes/cancels, including while a
|
|
@@ -136,7 +155,7 @@ export class RecentMessagingMedia {
|
|
|
136
155
|
}
|
|
137
156
|
}
|
|
138
157
|
pump() {
|
|
139
|
-
if (this.foreground.size)
|
|
158
|
+
if (this.foreground.size || this.scheduledFrame !== undefined)
|
|
140
159
|
return;
|
|
141
160
|
for (const [id, entry] of this.entries) {
|
|
142
161
|
if (this.running >= 2)
|
|
@@ -5,6 +5,7 @@ export declare function useQuoteGesture(enabled: boolean, outgoing: boolean, quo
|
|
|
5
5
|
offset: number | Animated.Value;
|
|
6
6
|
webRef: import("react").RefObject<HTMLElement | null> | undefined;
|
|
7
7
|
infoLoaded: boolean;
|
|
8
|
+
quoteLoaded: boolean;
|
|
8
9
|
infoOpacity: number | Animated.AnimatedInterpolation<string | number>;
|
|
9
10
|
revealOpacity: number | Animated.AnimatedInterpolation<string | number>;
|
|
10
11
|
revealWebStyle: {
|
|
@@ -14,6 +14,7 @@ export function useQuoteGesture(enabled, outgoing, quote, details, onQuoteReady)
|
|
|
14
14
|
const nativeInfoOpacity = useMemo(() => offset.interpolate({ inputRange: direction === 1 ? [-24, -8, 0] : [0, 8, 24], outputRange: direction === 1 ? [1, .35, 0] : [0, .35, 1], extrapolate: 'clamp' }), [offset, direction]);
|
|
15
15
|
const nativeRevealOpacity = useMemo(() => offset.interpolate({ inputRange: direction === -1 ? [-messageReplyRevealWidth, -18, 0] : [0, 18, messageReplyRevealWidth], outputRange: direction === -1 ? [1, .35, 0] : [0, .35, 1], extrapolate: 'clamp' }), [offset, direction]);
|
|
16
16
|
const [infoLoaded, setInfoLoaded] = useState(false);
|
|
17
|
+
const [quoteLoaded, setQuoteLoaded] = useState(false);
|
|
17
18
|
const quoteReady = useRef(false);
|
|
18
19
|
const current = useRef({ enabled, direction, quote, details, onQuoteReady });
|
|
19
20
|
current.current = { enabled, direction, quote, details, onQuoteReady };
|
|
@@ -41,6 +42,8 @@ export function useQuoteGesture(enabled, outgoing, quote, details, onQuoteReady)
|
|
|
41
42
|
const info = dx * current.current.direction < 0;
|
|
42
43
|
if (info)
|
|
43
44
|
setInfoLoaded(true);
|
|
45
|
+
else if (current.current.quote && dx !== 0)
|
|
46
|
+
setQuoteLoaded(true);
|
|
44
47
|
const limit = info ? messageInfoRevealWidth : current.current.quote ? messageReplyRevealWidth : 0;
|
|
45
48
|
const value = Math.sign(dx) * Math.min(limit, Math.abs(dx));
|
|
46
49
|
if (Platform.OS === 'web') {
|
|
@@ -145,6 +148,7 @@ export function useQuoteGesture(enabled, outgoing, quote, details, onQuoteReady)
|
|
|
145
148
|
return { offset: Platform.OS === 'web' ? webOffset : offset,
|
|
146
149
|
webRef: Platform.OS === 'web' ? webRef : undefined,
|
|
147
150
|
infoLoaded,
|
|
151
|
+
quoteLoaded,
|
|
148
152
|
infoOpacity: Platform.OS === 'web' ? Math.min(1, Math.max(0, -webOffset * direction) / 24) : nativeInfoOpacity,
|
|
149
153
|
revealOpacity: Platform.OS === 'web' ? Math.min(1, Math.max(0, webOffset * direction) / messageReplyRevealWidth)
|
|
150
154
|
: nativeRevealOpacity,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robono/messaging-react-native",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"./dist/expo-notification-cleanup.js"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"prepack": "npm run build && node ../../scripts/generate-sdk-file-sbom.mjs"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@robono/messaging": "^0.20.
|
|
76
|
+
"@robono/messaging": "^0.20.3",
|
|
77
77
|
"react": ">=18.2 <20",
|
|
78
78
|
"react-native": ">=0.76 <1",
|
|
79
79
|
"expo-audio": ">=55 <57",
|