@robono/calling-react-native 0.7.0 → 0.8.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.8.0 — release candidate
2
+
3
+ Add an optional on-demand connection-details panel for direct and group calls, with foreground-only sampling and cleanup.
4
+
1
5
  ## 0.7.0 — release candidate
2
6
 
3
7
  Support native video picture-in-picture on iPhone and Android, restore full call controls on return, and remove floating video at hang-up. Requires a native rebuild.
package/README.md CHANGED
@@ -266,3 +266,7 @@ Use `@robono/calling@0.1.3` with `@robono/calling-react-native@0.2.2` when using
266
266
  `createHttpTransport` supplies the event subscription automatically. If wrapping it, preserve `request.subscribe = transport.subscribe`. A custom request without `subscribe`, or `{events:false}`, retains the compatibility polling interval (`pollMs`, default 1000 ms).
267
267
 
268
268
  The 0.1.2 engine had polling and retry backoff but did not include this event transport. No native permissions or rebuild are added by this JavaScript patch to an app already using the native calling package.
269
+
270
+ ## Connection details
271
+
272
+ Direct and group clients expose `getDiagnostics()` for local connection measurements without addresses, media or credentials. The supplied call overlays include an optional Connection details panel; custom interfaces can use the same measurements. [Guide, fields and customization](https://robono.com/guides/call-diagnostics.html). Missing measurements remain unknown, and the first sample cannot calculate interval rates.
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/calling-react-native@0.7.0",
6
- "documentNamespace": "https://robono.com/sbom/calling-react-native/0.7.0/370a1e2e9348f125d79cf634b1d1c905619c1969",
5
+ "name": "@robono/calling-react-native@0.8.0",
6
+ "documentNamespace": "https://robono.com/sbom/calling-react-native/0.8.0/d0a9630570317cf8f21edf0fea56e94e4aba8af0",
7
7
  "creationInfo": {
8
- "created": "2026-11-04T19:14:43.220Z",
8
+ "created": "2026-11-05T10:36:24.339Z",
9
9
  "creators": [
10
10
  "Organization: Robono (support@robono.com)"
11
11
  ]
@@ -14,11 +14,11 @@
14
14
  {
15
15
  "name": "@robono/calling-react-native",
16
16
  "SPDXID": "SPDXRef-Package",
17
- "versionInfo": "0.7.0",
17
+ "versionInfo": "0.8.0",
18
18
  "downloadLocation": "NOASSERTION",
19
19
  "filesAnalyzed": true,
20
20
  "packageVerificationCode": {
21
- "packageVerificationCodeValue": "370a1e2e9348f125d79cf634b1d1c905619c1969"
21
+ "packageVerificationCodeValue": "d0a9630570317cf8f21edf0fea56e94e4aba8af0"
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/calling\":\"^0.4.0\",\"react\":\">=18.2 <20\",\"react-native\":\">=0.76 <1\",\"react-native-svg\":\">=15 <16\",\"react-native-safe-area-context\":\">=5 <6\",\"react-native-webrtc\":\">=124 <125\",\"react-native-incall-manager\":\">=4.2 <5\",\"expo-audio\":\">=1.1.1 <2 || >=55 <57\",\"expo-crypto\":\">=15.0.9 <16 || >=55 <57\",\"expo-notifications\":\">=0.32.17 <0.33 || >=55 <57\",\"expo-asset\":\">=12 <13 || >=55 <57\"}"
29
+ "comment": "Host-supplied peers (not bundled): {\"@robono/calling\":\"^0.5.0\",\"react\":\">=18.2 <20\",\"react-native\":\">=0.76 <1\",\"react-native-svg\":\">=15 <16\",\"react-native-safe-area-context\":\">=5 <6\",\"react-native-webrtc\":\">=124 <125\",\"react-native-incall-manager\":\">=4.2 <5\",\"expo-audio\":\">=1.1.1 <2 || >=55 <57\",\"expo-crypto\":\">=15.0.9 <16 || >=55 <57\",\"expo-notifications\":\">=0.32.17 <0.33 || >=55 <57\",\"expo-asset\":\">=12 <13 || >=55 <57\"}"
30
30
  }
31
31
  ],
32
32
  "files": [
@@ -36,11 +36,11 @@
36
36
  "checksums": [
37
37
  {
38
38
  "algorithm": "SHA256",
39
- "checksumValue": "40d9dc8729bcf1b1d7bde476869ca5e5b64ace72988f86e6c823ef2601ae4427"
39
+ "checksumValue": "d81c0fd2b6514a565623f796b36b446202a79e3473c5d93fc6e191f70536fae8"
40
40
  },
41
41
  {
42
42
  "algorithm": "SHA1",
43
- "checksumValue": "d0e1f0e0ef0206cbf251c89943fb02a57906a33f"
43
+ "checksumValue": "373d9a739f01873ae0fe3f2546d82c737fe9bf24"
44
44
  }
45
45
  ],
46
46
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -93,11 +93,11 @@
93
93
  "checksums": [
94
94
  {
95
95
  "algorithm": "SHA256",
96
- "checksumValue": "5960af34b21a3b8f3eb66bed6f716ee5fbf53936b96a78713cfa7f9ff0c1ce8c"
96
+ "checksumValue": "989459652c77bd87d8032cfe644c98d31bedbbc205298af6a7de2e9bf53f7a4a"
97
97
  },
98
98
  {
99
99
  "algorithm": "SHA1",
100
- "checksumValue": "cfc9859f7350e0fcd8c1efaaf74f7216648eb381"
100
+ "checksumValue": "6585b66d52cc25bff62659dc0059a4391442f81b"
101
101
  }
102
102
  ],
103
103
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5242,11 +5242,11 @@
5242
5242
  "checksums": [
5243
5243
  {
5244
5244
  "algorithm": "SHA256",
5245
- "checksumValue": "dbd206afef17db9bf69dc544ed514c15088d13efca9865ab6a1a5473ad1e523e"
5245
+ "checksumValue": "1b82638eb5e9ccc522162d6222fea8f10f0dd8e47239ed212aeb8c7ac7a1d812"
5246
5246
  },
5247
5247
  {
5248
5248
  "algorithm": "SHA1",
5249
- "checksumValue": "0ea53f9f4b5a59d90aaf87f4500f722efa49d6d6"
5249
+ "checksumValue": "9c149d54e0fd061e54c83045a1d6ce48a02e4694"
5250
5250
  }
5251
5251
  ],
5252
5252
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5261,11 +5261,11 @@
5261
5261
  "checksums": [
5262
5262
  {
5263
5263
  "algorithm": "SHA256",
5264
- "checksumValue": "850df90ae2421c8fb7af90c49077d3b678e6e108e9bcd2191a3ba8f165a3a136"
5264
+ "checksumValue": "4b3ae05dfd502f3e61acf2a7dfb11fc403bb36bc1eedef8c72f1316ee92f0224"
5265
5265
  },
5266
5266
  {
5267
5267
  "algorithm": "SHA1",
5268
- "checksumValue": "153337df1095948a0a5e17e326e52d23c61be80a"
5268
+ "checksumValue": "f8f2742fe78716cab32034d228c6041d2264835e"
5269
5269
  }
5270
5270
  ],
5271
5271
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5280,11 +5280,11 @@
5280
5280
  "checksums": [
5281
5281
  {
5282
5282
  "algorithm": "SHA256",
5283
- "checksumValue": "67f1e9f345865ac38724d25c15ccf089c184ece24d26d89ce9ed0711a8798305"
5283
+ "checksumValue": "07b0ce2731f18378843130c1ea86ac71fa5132d6b9d28a67f522f36e4903c366"
5284
5284
  },
5285
5285
  {
5286
5286
  "algorithm": "SHA1",
5287
- "checksumValue": "486e825cffc86e6b4df5496f26540224225434f3"
5287
+ "checksumValue": "0eb8f52fd896d5de51333f8278973329722920df"
5288
5288
  }
5289
5289
  ],
5290
5290
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5299,11 +5299,11 @@
5299
5299
  "checksums": [
5300
5300
  {
5301
5301
  "algorithm": "SHA256",
5302
- "checksumValue": "c23066801695a1b5a6cd4e605382b7a34aa5490a4683b968a8d9cd513e0b24bf"
5302
+ "checksumValue": "53ff51ff71498b2e421229a0d2b5033c32aa4b7acc3b09017940de08bfa4e65a"
5303
5303
  },
5304
5304
  {
5305
5305
  "algorithm": "SHA1",
5306
- "checksumValue": "f97d47ee2f2864cacbf5749f50427569ef935b8f"
5306
+ "checksumValue": "0bac12960323a530f23901bda10fbfff2bb30513"
5307
5307
  }
5308
5308
  ],
5309
5309
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5337,11 +5337,11 @@
5337
5337
  "checksums": [
5338
5338
  {
5339
5339
  "algorithm": "SHA256",
5340
- "checksumValue": "d2032c7a6154fe08a90596fcef0a2498151e0658024cee5ac241511798625e6e"
5340
+ "checksumValue": "b3cab9c688124775a1968c1ca32e431aeae64137caf4d7298dacc3ed59789f00"
5341
5341
  },
5342
5342
  {
5343
5343
  "algorithm": "SHA1",
5344
- "checksumValue": "33957d357f56a2162d5cc332fc11a75f0a2309c8"
5344
+ "checksumValue": "1d62d968c4af495cf1c5e5dedb1d4a4911c90a5c"
5345
5345
  }
5346
5346
  ],
5347
5347
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5546,11 +5546,11 @@
5546
5546
  "checksums": [
5547
5547
  {
5548
5548
  "algorithm": "SHA256",
5549
- "checksumValue": "dbcb0bf2a96a57e5caa26bebf643c9580a883298ef1867916683b2dbaaa0b85d"
5549
+ "checksumValue": "0547ad3f99274ea2afa02ac14ced565eaa2317c3578fc1c8c515a3e229dda6c6"
5550
5550
  },
5551
5551
  {
5552
5552
  "algorithm": "SHA1",
5553
- "checksumValue": "593f0e8f47670b085666b0c0117f01ba68d9db13"
5553
+ "checksumValue": "218a262e60a332e6f5c1b038e31ecdcc726a931a"
5554
5554
  }
5555
5555
  ],
5556
5556
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5565,11 +5565,11 @@
5565
5565
  "checksums": [
5566
5566
  {
5567
5567
  "algorithm": "SHA256",
5568
- "checksumValue": "fec54e29fa838bb2fd6f309c0abd8eac9bab1ec25086edea19b2597bc97017d3"
5568
+ "checksumValue": "77ab6120ecd3a33e2903bb4fb97e629e6326e13f7941b790607ef96c776de577"
5569
5569
  },
5570
5570
  {
5571
5571
  "algorithm": "SHA1",
5572
- "checksumValue": "5a8e8656c3ff51ae3b56a9e7a7f7631d06a336b6"
5572
+ "checksumValue": "e611b685cb0c9bc6becd0c7f1fce4f698a4c3825"
5573
5573
  }
5574
5574
  ],
5575
5575
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5584,11 +5584,11 @@
5584
5584
  "checksums": [
5585
5585
  {
5586
5586
  "algorithm": "SHA256",
5587
- "checksumValue": "a2d3f4b8e025466683a4eb7bcc30fb541989e55fb542104138be0e7223d6e7ef"
5587
+ "checksumValue": "82557bde68ea8d8a28346c706b00ccff7b2ae9e0612c25410c125d48ad620678"
5588
5588
  },
5589
5589
  {
5590
5590
  "algorithm": "SHA1",
5591
- "checksumValue": "352a8f58de0358dfceddfb7a4b2e2384c1ee08e2"
5591
+ "checksumValue": "6d4e02111f3ed47e7a5a734cf106217f037475e2"
5592
5592
  }
5593
5593
  ],
5594
5594
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5622,11 +5622,11 @@
5622
5622
  "checksums": [
5623
5623
  {
5624
5624
  "algorithm": "SHA256",
5625
- "checksumValue": "3cc25a4a2609a0869ba1d74d4edd348759f3d730aa77d4da83c069cca2162bb1"
5625
+ "checksumValue": "7ec62fa91504cac41d26cae0c59aa20b6c045896e0aca018498536e29e050799"
5626
5626
  },
5627
5627
  {
5628
5628
  "algorithm": "SHA1",
5629
- "checksumValue": "a7b4bc521ab85b5c8269e701c1feb001d7adc88f"
5629
+ "checksumValue": "ad10628944401aaa335af12189a57a25f4ebe30e"
5630
5630
  }
5631
5631
  ],
5632
5632
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5641,11 +5641,11 @@
5641
5641
  "checksums": [
5642
5642
  {
5643
5643
  "algorithm": "SHA256",
5644
- "checksumValue": "7e9dff6cf4884d3103bbd046cf755843f5783d461f5df6b6a8bb3d3df1013829"
5644
+ "checksumValue": "2ded7582378076f7918d8ce7becd8d22215e39a1d93320329c10e3ab4d59b1ff"
5645
5645
  },
5646
5646
  {
5647
5647
  "algorithm": "SHA1",
5648
- "checksumValue": "af823a04f794f1dfa2197a03fd706e8a5bcad380"
5648
+ "checksumValue": "a96bf92e5aefeb89251dafe95fb63cfb0da12a53"
5649
5649
  }
5650
5650
  ],
5651
5651
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5907,11 +5907,11 @@
5907
5907
  "checksums": [
5908
5908
  {
5909
5909
  "algorithm": "SHA256",
5910
- "checksumValue": "5f036eda224b9ec07541f72ed83459905b50b7e9b19b74a230705ce4fca98fc2"
5910
+ "checksumValue": "78192687b51c94d7d23ed4c3a100e5652d1cd19399bf1a19ba4907403dff9b21"
5911
5911
  },
5912
5912
  {
5913
5913
  "algorithm": "SHA1",
5914
- "checksumValue": "e6de67b744b10229d7b1ebb5e3f2d95bf895675a"
5914
+ "checksumValue": "03c61c55c9d9fab6bcf91bf08a9a941521f1f43f"
5915
5915
  }
5916
5916
  ],
5917
5917
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -5964,11 +5964,11 @@
5964
5964
  "checksums": [
5965
5965
  {
5966
5966
  "algorithm": "SHA256",
5967
- "checksumValue": "1ffe6b11de137df29bd208c9e98c4c2e94ff441a0dc2ca406c79879434084628"
5967
+ "checksumValue": "3dbb311a73a34e0c2d028f0f143b63ae8bfd00cc40012dd2c782ca2f9c43b05d"
5968
5968
  },
5969
5969
  {
5970
5970
  "algorithm": "SHA1",
5971
- "checksumValue": "3b4688cbe2a09ac322b70fb9bb07c587482b7fde"
5971
+ "checksumValue": "fda6cc652b74543e9b6dcc79f752597530d66d09"
5972
5972
  }
5973
5973
  ],
5974
5974
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6002,11 +6002,11 @@
6002
6002
  "checksums": [
6003
6003
  {
6004
6004
  "algorithm": "SHA256",
6005
- "checksumValue": "30c3a8f82caabc4651947ae8a72c1bb2bef4bdcad2679965498e2df5a70b89f2"
6005
+ "checksumValue": "c48292b2efdf8c5db9a997bace936561b5dc9c5e1b1ecd748f3e459fae30feaa"
6006
6006
  },
6007
6007
  {
6008
6008
  "algorithm": "SHA1",
6009
- "checksumValue": "3ba29ff118970e1e946c054b777fc4169038c56b"
6009
+ "checksumValue": "131c13349519b12c8a8e801f656c29e60c7a116a"
6010
6010
  }
6011
6011
  ],
6012
6012
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6021,11 +6021,11 @@
6021
6021
  "checksums": [
6022
6022
  {
6023
6023
  "algorithm": "SHA256",
6024
- "checksumValue": "8d347a6850d28f43868a89713257705cafbdb128f37ad5e38135a3f915a6846a"
6024
+ "checksumValue": "dbe1c9e7898eb25524a713984bf4d91c4d330616de14c95232cc9a88f8759ec0"
6025
6025
  },
6026
6026
  {
6027
6027
  "algorithm": "SHA1",
6028
- "checksumValue": "b40fa22e6b68a637f998a647cd15aeb0574c0de4"
6028
+ "checksumValue": "805bcd29f57e719e4d3bf251ed6bf8a6ab3950c7"
6029
6029
  }
6030
6030
  ],
6031
6031
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -6363,11 +6363,11 @@
6363
6363
  "checksums": [
6364
6364
  {
6365
6365
  "algorithm": "SHA256",
6366
- "checksumValue": "eb64634a4b83c3f6a81db93ad56cde3f0345dc6a34f937c2b4e16008dac5c90c"
6366
+ "checksumValue": "cadeb78ce17f8d885bacd3993d27e70ad61f61232e9d7d3375bf262dd3d3a41f"
6367
6367
  },
6368
6368
  {
6369
6369
  "algorithm": "SHA1",
6370
- "checksumValue": "9ca909a1a9bc55c591fda97d77c5af4915158133"
6370
+ "checksumValue": "c01fc849514264e6ee96bea698b84aab6adf3fbc"
6371
6371
  }
6372
6372
  ],
6373
6373
  "licenseConcluded": "LicenseRef-RobonoSDK",
@@ -1,7 +1,7 @@
1
1
  import React, { type ReactNode } from 'react';
2
2
  import type { CallHistoryEntry } from '@robono/calling';
3
3
  /** A call record, aligned with its caller. Separate from the text-bubble component. */
4
- export declare function CallRecord({ entry, incomingColor, outgoingColor, textColor, secondaryColor, onCallBack, label, children, showTime }: {
4
+ export interface CallRecordProps {
5
5
  entry: CallHistoryEntry;
6
6
  incomingColor: string;
7
7
  outgoingColor: string;
@@ -16,4 +16,5 @@ export declare function CallRecord({ entry, incomingColor, outgoingColor, textCo
16
16
  };
17
17
  children?: ReactNode;
18
18
  showTime?: boolean;
19
- }): React.JSX.Element;
19
+ }
20
+ export declare function CallRecord({ entry, incomingColor, outgoingColor, textColor, secondaryColor, onCallBack, label, children, showTime }: CallRecordProps): React.JSX.Element;
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import React from 'react';
3
3
  import { Pressable, StyleSheet, Text, View } from 'react-native';
4
4
  import { RobonoIcon } from './visual/RobonoIcon.js';
5
- /** A call record, aligned with its caller. Separate from the text-bubble component. */
6
5
  export function CallRecord({ entry, incomingColor, outgoingColor, textColor = '#ffffff', secondaryColor, onCallBack, label, children, showTime = false }) {
7
6
  const description = label(entry);
8
7
  const incoming = entry.role === 'callee';
@@ -1,5 +1,6 @@
1
1
  import React, { type ComponentType, type ReactNode } from 'react';
2
2
  import { type StyleProp, type TextStyle, type ViewStyle } from 'react-native';
3
+ import type { CallDiagnostics } from '@robono/calling';
3
4
  import { callingText, callingIcons, resolveCallingDesign, type CallingAppearance } from './appearance.js';
4
5
  import type { CallingState } from './types.js';
5
6
  export interface CallingTheme {
@@ -66,6 +67,11 @@ export interface CallingScreenComponents {
66
67
  ActionButton?: ComponentType<CallingActionButtonProps>;
67
68
  }
68
69
  export interface CallingScreenProps {
70
+ /** Supplied automatically by connected overlays; read only while details are open. */
71
+ getDiagnostics?(): Promise<CallDiagnostics>;
72
+ diagnostics?: false | {
73
+ labels?: Partial<typeof callDiagnosticsText>;
74
+ };
69
75
  /** Allow the connected remote video to use the operating system floating window. */
70
76
  pictureInPicture?: boolean;
71
77
  state: CallingState;
@@ -97,6 +103,8 @@ export interface CallingScreenProps {
97
103
  components?: CallingScreenComponents;
98
104
  }
99
105
  export interface CallingUIValue {
106
+ getDiagnostics?: CallingScreenProps['getDiagnostics'];
107
+ diagnostics?: CallingScreenProps['diagnostics'];
100
108
  pictureInPicture: boolean;
101
109
  renderVideo?: CallingScreenProps['renderVideo'];
102
110
  state: Readonly<CallingState>;
@@ -134,6 +142,21 @@ export declare function CallingActionButton({ action, style, iconStyle, labelSty
134
142
  export declare function CallingAudioControls({ style }?: CallingSectionProps): React.JSX.Element | null;
135
143
  export declare function CallingIncomingControls({ style }?: CallingSectionProps): React.JSX.Element | null;
136
144
  export declare function CallingControls({ style }?: CallingSectionProps): React.JSX.Element;
145
+ export declare const callDiagnosticsText: {
146
+ details: string;
147
+ checking: string;
148
+ unavailable: string;
149
+ good: string;
150
+ fair: string;
151
+ poor: string;
152
+ delay: string;
153
+ loss: string;
154
+ video: string;
155
+ participant: string;
156
+ explanation: string;
157
+ };
158
+ /** Small on-demand panel. Never records audio, submits logs or changes call controls. */
159
+ export declare function CallingConnectionDetails(): React.JSX.Element | null;
137
160
  /** Video uses the same SDK layout, labels and controls on native and web. */
138
161
  export declare function CallingVideo({ style }?: CallingSectionProps): React.JSX.Element | null;
139
162
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { createContext, useContext, useEffect, useState } from 'react';
3
- import { Image, Platform, Pressable, ScrollView, StyleSheet, Text, View, useColorScheme } from 'react-native';
2
+ import { createContext, useContext, useEffect, useRef, useState } from 'react';
3
+ import { AppState, Image, Platform, Pressable, ScrollView, StyleSheet, Text, View, useColorScheme } from 'react-native';
4
4
  import { RobonoIcon } from './visual/RobonoIcon.js';
5
5
  import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
6
6
  import { callingText, callingInk, resolveCallingDesign } from './appearance.js';
@@ -52,6 +52,7 @@ export function CallingUIProvider({ children, ...props }) {
52
52
  };
53
53
  const fontFamily = Platform.OS === 'ios' ? design.fontFamily.ios : Platform.OS === 'android' ? design.fontFamily.android : design.fontFamily.web;
54
54
  const value = {
55
+ getDiagnostics: props.getDiagnostics, diagnostics: props.diagnostics,
55
56
  state: s, pictureInPicture: props.pictureInPicture !== false, renderVideo: props.renderVideo, appearance: props.appearance, theme: c, labels: t, design,
56
57
  insets: props.insets || safeArea, components: props.components || {},
57
58
  title: s.contact?.name || t.contact,
@@ -130,7 +131,7 @@ export function CallingIncomingControls({ style } = {}) {
130
131
  }
131
132
  /** Essential controls stay visible; secondary tools open above the dock. */
132
133
  function CallingConferenceControls({ style }) {
133
- const { actions, components, state, theme, labels, typography, design } = useCallingUI();
134
+ const { actions, components, state, theme, labels, typography, design, getDiagnostics, diagnostics } = useCallingUI();
134
135
  const Button = components.ActionButton || CallingActionButton;
135
136
  const [expanded, setExpanded] = useState(false);
136
137
  const secondary = (state.kind === 'video' ? ['speaker', 'flip', 'share'] : []).filter(action => actions[action].visible);
@@ -138,7 +139,7 @@ function CallingConferenceControls({ style }) {
138
139
  const icon = { width: 48, height: 48 };
139
140
  const label = typography(12);
140
141
  useEffect(() => { setExpanded(false); }, [state.phase]);
141
- return _jsxs(View, { style: [{ position: 'relative', zIndex: 2, paddingVertical: 8 }, style], children: [expanded && _jsx(View, { testID: "calling-more-tools", style: { marginBottom: 12, width: '100%', maxWidth: 420, alignSelf: 'center', borderRadius: 18, padding: 16, backgroundColor: theme.control }, children: _jsx(View, { style: { flexDirection: 'row', justifyContent: 'space-evenly', gap: 12 }, children: secondary.map(action => _jsx(Button, { action: action, style: compact, iconStyle: icon, labelStyle: label }, action)) }) }), _jsxs(View, { testID: "calling-main-controls", style: { flexDirection: 'row', alignItems: 'flex-start', justifyContent: 'center', gap: 12, maxWidth: 420, width: '100%', alignSelf: 'center' }, children: [_jsx(Button, { action: "mute", style: compact, iconStyle: icon, labelStyle: label }), actions.camera.visible && _jsx(Button, { action: "camera", style: compact, iconStyle: icon, labelStyle: label }), state.kind !== 'video' && _jsx(Button, { action: "speaker", style: compact, iconStyle: icon, labelStyle: label }), secondary.length > 0 && _jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: labels.more, accessibilityState: { expanded }, onPress: () => setExpanded(value => !value), style: [styles.button, compact], children: [_jsx(View, { style: [styles.circle, icon, { borderRadius: design.controlRadius, backgroundColor: expanded ? theme.foreground : theme.control }], children: _jsx(RobonoIcon, { name: "more", size: 24, color: expanded ? theme.background : theme.foreground }) }), _jsx(Text, { style: [label, { color: theme.foreground, textAlign: 'center' }], children: labels.more })] }), _jsx(Button, { action: "end", style: [compact, { marginLeft: 8 }], iconStyle: icon, labelStyle: label })] })] });
142
+ return _jsxs(View, { style: [{ position: 'relative', zIndex: 2, paddingVertical: 8 }, style], children: [expanded && _jsxs(View, { testID: "calling-more-tools", style: { marginBottom: 12, width: '100%', maxWidth: 420, alignSelf: 'center', borderRadius: 18, padding: 16, backgroundColor: theme.control }, children: [_jsx(View, { style: { flexDirection: 'row', justifyContent: 'space-evenly', gap: 12 }, children: secondary.map(action => _jsx(Button, { action: action, style: compact, iconStyle: icon, labelStyle: label }, action)) }), _jsx(CallingConnectionDetails, {})] }), _jsxs(View, { testID: "calling-main-controls", style: { flexDirection: 'row', alignItems: 'flex-start', justifyContent: 'center', gap: 12, maxWidth: 420, width: '100%', alignSelf: 'center' }, children: [_jsx(Button, { action: "mute", style: compact, iconStyle: icon, labelStyle: label }), actions.camera.visible && _jsx(Button, { action: "camera", style: compact, iconStyle: icon, labelStyle: label }), state.kind !== 'video' && _jsx(Button, { action: "speaker", style: compact, iconStyle: icon, labelStyle: label }), (secondary.length > 0 || getDiagnostics && diagnostics !== false && state.phase === 'connected') && _jsxs(Pressable, { accessibilityRole: "button", accessibilityLabel: labels.more, accessibilityState: { expanded }, onPress: () => setExpanded(value => !value), style: [styles.button, compact], children: [_jsx(View, { style: [styles.circle, icon, { borderRadius: design.controlRadius, backgroundColor: expanded ? theme.foreground : theme.control }], children: _jsx(RobonoIcon, { name: "more", size: 24, color: expanded ? theme.background : theme.foreground }) }), _jsx(Text, { style: [label, { color: theme.foreground, textAlign: 'center' }], children: labels.more })] }), _jsx(Button, { action: "end", style: [compact, { marginLeft: 8 }], iconStyle: icon, labelStyle: label })] })] });
142
143
  }
143
144
  export function CallingControls({ style } = {}) {
144
145
  const { actions, components, state } = useCallingUI();
@@ -149,7 +150,60 @@ export function CallingControls({ style } = {}) {
149
150
  return _jsxs(View, { style: [{ flexDirection: 'row', justifyContent: 'center', alignItems: 'center', gap: 24, paddingVertical: 8 }, style], children: [actions.resume.visible && _jsx(Button, { action: "resume" }), _jsx(Button, { action: "end", iconStyle: { width: 48, height: 48 }, labelStyle: { fontSize: 12 } })] });
150
151
  if ((state.kind === 'video' || state.group) && ['outgoing', 'connecting', 'connected'].includes(state.phase))
151
152
  return _jsx(CallingConferenceControls, { style: style });
152
- return _jsxs(View, { style: [styles.controls, style], children: [actions.resume.visible && _jsx(Button, { action: "resume" }), actions.mute.visible && _jsx(Audio, {}), actions.close.visible ? _jsx(Button, { action: "close" }) : state.phase === 'incoming' ? _jsx(Incoming, {}) : _jsx(View, { style: styles.row, children: _jsx(Button, { action: "end" }) })] });
153
+ return _jsxs(View, { style: [styles.controls, style], children: [actions.resume.visible && _jsx(Button, { action: "resume" }), actions.mute.visible && _jsx(Audio, {}), _jsx(CallingConnectionDetails, {}), actions.close.visible ? _jsx(Button, { action: "close" }) : state.phase === 'incoming' ? _jsx(Incoming, {}) : _jsx(View, { style: styles.row, children: _jsx(Button, { action: "end" }) })] });
154
+ }
155
+ export const callDiagnosticsText = {
156
+ details: 'Connection details', checking: 'Checking connection…', unavailable: 'Measurements unavailable',
157
+ good: 'Connection looks good', fair: 'Connection may affect the call', poor: 'Connection is struggling',
158
+ delay: 'Round-trip delay', loss: 'Lost incoming data', video: 'Incoming video', participant: 'Participant',
159
+ explanation: 'Estimates from this device. Missing measurements are not treated as zero.',
160
+ };
161
+ /** Small on-demand panel. Never records audio, submits logs or changes call controls. */
162
+ export function CallingConnectionDetails() {
163
+ const { getDiagnostics, diagnostics, state, theme, typography } = useCallingUI();
164
+ const labels = { ...callDiagnosticsText, ...(diagnostics === false ? {} : diagnostics?.labels) };
165
+ const [expanded, setExpanded] = useState(false), [sample, setSample] = useState(null), [unavailable, setUnavailable] = useState(false);
166
+ const [foreground, setForeground] = useState(AppState.currentState !== 'background' && AppState.currentState !== 'inactive');
167
+ const read = useRef(getDiagnostics);
168
+ read.current = getDiagnostics;
169
+ useEffect(() => { const sub = AppState.addEventListener('change', value => setForeground(value === 'active')); return () => sub.remove(); }, []);
170
+ useEffect(() => { setExpanded(false); setSample(null); }, [state.call?.id, state.connectedAt, state.phase]);
171
+ const enabled = !!getDiagnostics && diagnostics !== false && state.phase === 'connected';
172
+ useEffect(() => {
173
+ if (!enabled || !expanded || !foreground) {
174
+ setSample(null);
175
+ return;
176
+ }
177
+ let current = true, timer;
178
+ setUnavailable(false);
179
+ const refresh = async () => { try {
180
+ const result = await read.current();
181
+ if (current) {
182
+ setSample(result);
183
+ setUnavailable(!result.peers.length);
184
+ }
185
+ }
186
+ catch {
187
+ if (current) {
188
+ setSample(null);
189
+ setUnavailable(true);
190
+ }
191
+ }
192
+ finally {
193
+ if (current)
194
+ timer = setTimeout(refresh, 2000);
195
+ } };
196
+ void refresh();
197
+ return () => { current = false; clearTimeout(timer); };
198
+ }, [enabled, expanded, foreground, state.call?.id, state.connectedAt]);
199
+ if (!enabled)
200
+ return null;
201
+ const textStyle = [typography(14), { color: theme.foreground }];
202
+ return _jsxs(View, { style: { width: '100%', maxWidth: 420, alignSelf: 'center' }, children: [_jsxs(Pressable, { accessibilityRole: "button", accessibilityState: { expanded }, accessibilityLabel: labels.details, onPress: () => setExpanded(v => !v), style: { minHeight: 44, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', gap: 8 }, children: [_jsx(RobonoIcon, { name: "activity", size: 18, color: theme.accent }), _jsx(Text, { style: [...textStyle, { color: theme.accent }], children: labels.details })] }), expanded && _jsxs(ScrollView, { testID: "calling-connection-details", style: { maxHeight: 220, backgroundColor: theme.control, borderRadius: 12 }, contentContainerStyle: { padding: 12, gap: 12 }, children: [(!sample?.peers.length) && _jsx(Text, { style: textStyle, children: unavailable ? labels.unavailable : labels.checking }), sample?.peers.map((peer, index) => {
203
+ const losses = peer.media.map(m => m.receiveLossPercent).filter((n) => n !== null), video = peer.media.find(m => m.kind === 'video' && m.width && m.height);
204
+ const title = peer.participant === null ? null : state.groupMembers?.find(m => m.id === peer.participant)?.name ?? `${labels.participant} ${index + 1}`;
205
+ return _jsxs(View, { style: { gap: 5 }, children: [title && _jsx(Text, { style: [...textStyle, { fontWeight: '600' }], children: title }), _jsx(Text, { style: textStyle, children: peer.quality === 'unknown' ? labels.unavailable : labels[peer.quality] }), _jsxs(Text, { style: [typography(13), { color: theme.secondary }], children: [labels.delay, ": ", peer.roundTripMs === null ? '—' : `${Math.round(peer.roundTripMs)} ms`, " \u00B7 ", labels.loss, ": ", losses.length ? `${Math.max(...losses).toFixed(1)}%` : '—'] }), video && _jsxs(Text, { style: [typography(13), { color: theme.secondary }], children: [labels.video, ": ", video.width, " \u00D7 ", video.height, video.framesPerSecond === null ? '' : ` · ${Math.round(video.framesPerSecond)} fps`] })] }, peer.participant ?? index);
206
+ }), _jsx(Text, { style: [typography(12), { color: theme.secondary }], children: labels.explanation })] })] });
153
207
  }
154
208
  const styles = StyleSheet.create({
155
209
  screen: { flexGrow: 1, paddingHorizontal: 24, justifyContent: 'space-between', gap: 40 },
@@ -107,6 +107,7 @@ export function createController({ createClient, request, media, audio, resolveC
107
107
  };
108
108
  return {
109
109
  client,
110
+ getDiagnostics: () => client.getDiagnostics(),
110
111
  getSnapshot: () => state,
111
112
  subscribe(listener) { listeners.add(listener); return () => listeners.delete(listener); },
112
113
  async listen() { if (disposed)
package/dist/groups.d.ts CHANGED
@@ -8,6 +8,7 @@ export interface GroupCallingOptions extends Omit<CallingOptions, 'resolveContac
8
8
  }
9
9
  export declare function createGroupCallingController(options: GroupCallingOptions): {
10
10
  client: RobonoGroupCallingClient;
11
+ getDiagnostics: () => Promise<import("@robono/calling").CallDiagnostics>;
11
12
  getSnapshot: () => CallingState;
12
13
  subscribe: (fn: () => void) => () => void;
13
14
  listen(): Promise<void>;
package/dist/groups.js CHANGED
@@ -27,7 +27,7 @@ export function createGroupCallingController(options) {
27
27
  const components = new Set(['controller', ...(options.media.robonoAdapter ? ['native-media'] : []), ...(options.audio.robonoAdapter ? ['native-audio'] : [])]);
28
28
  const inventory = () => void options.request('client-info', { platform: Platform.OS, engineVersion, mobileVersion, components: [...components], appearanceRevision: options.appearanceRevision }).catch(report);
29
29
  const client = new RobonoGroupCallingClient({ ...options.media, request: options.request, forceRelay: options.forceRelay, onChange: apply });
30
- return { client, getSnapshot: () => state, subscribe: (fn) => { listeners.add(fn); return () => { listeners.delete(fn); }; },
30
+ return { client, getDiagnostics: () => client.getDiagnostics(), getSnapshot: () => state, subscribe: (fn) => { listeners.add(fn); return () => { listeners.delete(fn); }; },
31
31
  async listen() { await client.listen(); inventory(); },
32
32
  reportComponents(values) { values.forEach(v => components.add(v)); inventory(); },
33
33
  async call(connectionId, input = {}) { pendingKind = input.kind ?? 'voice'; pending = true; state = { ...state, contact: options.resolveGroup?.(connectionId) ?? { name: 'Group call' }, kind: pendingKind, phase: 'outgoing' }; sound(); emit(); try {
@@ -87,5 +87,5 @@ export function createGroupCallingController(options) {
87
87
  export function GroupCallingOverlay({ controller, ...props }) {
88
88
  const state = useSyncExternalStore(controller.subscribe, controller.getSnapshot, controller.getSnapshot);
89
89
  useEffect(() => { controller.reportComponents(['screens']); controller.setForeground(AppState.currentState === 'active'); const s = AppState.addEventListener('change', v => controller.setForeground(v === 'active')); return () => s.remove(); }, [controller]);
90
- return _jsx(Modal, { visible: state.phase !== 'idle', animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => { void controller.hangUp().catch(() => { }); }, children: _jsx(SafeAreaProvider, { children: _jsx(CallingScreen, { ...props, state: state, onAnswer: () => { void controller.answer().catch(() => { }); }, onHangUp: () => { void controller.hangUp().catch(() => { }); }, onMute: controller.mute, onSpeaker: controller.setSpeaker, onScreenShare: () => { void (state.screenSharing ? controller.stopScreenSharing() : controller.startScreenSharing()).catch(() => { }); }, onCamera: controller.setCamera, onSwitchCamera: () => { void controller.switchCamera().catch(() => { }); }, onResume: () => { void controller.resume().catch(() => { }); }, onClose: controller.dismissError }) }) });
90
+ return _jsx(Modal, { visible: state.phase !== 'idle', animationType: "none", presentationStyle: "fullScreen", onRequestClose: () => { void controller.hangUp().catch(() => { }); }, children: _jsx(SafeAreaProvider, { children: _jsx(CallingScreen, { ...props, getDiagnostics: controller.getDiagnostics, state: state, onAnswer: () => { void controller.answer().catch(() => { }); }, onHangUp: () => { void controller.hangUp().catch(() => { }); }, onMute: controller.mute, onSpeaker: controller.setSpeaker, onScreenShare: () => { void (state.screenSharing ? controller.stopScreenSharing() : controller.startScreenSharing()).catch(() => { }); }, onCamera: controller.setCamera, onSwitchCamera: () => { void controller.switchCamera().catch(() => { }); }, onResume: () => { void controller.resume().catch(() => { }); }, onClose: controller.dismissError }) }) });
91
91
  }
package/dist/history.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { CallRecord } from './CallRecord.js';
3
- type Props = Omit<React.ComponentProps<typeof CallRecord>, 'label'> & {
4
- label?: React.ComponentProps<typeof CallRecord>['label'];
2
+ import { type CallRecordProps } from './CallRecord.js';
3
+ export type CallHistoryItemProps = Omit<CallRecordProps, 'label'> & {
4
+ label?: CallRecordProps['label'];
5
5
  };
6
- export declare function CallHistoryItem({ label, ...props }: Props): React.JSX.Element;
7
- export {};
6
+ export declare function CallHistoryItem({ label, ...props }: CallHistoryItemProps): React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { CallingController, CallingOptions } from './types.js';
2
2
  export declare function createCallingController(options: CallingOptions): CallingController;
3
3
  export { CallingScreen, CallingOverlay, useCalling } from './screens.js';
4
- export { CallHistoryItem } from './history.js';
4
+ export { CallHistoryItem, type CallHistoryItemProps } from './history.js';
5
+ export type { CallRecordProps } from './CallRecord.js';
5
6
  export type { CallingScreenProps, CallingOverlayProps, CallingLabels, CallingTheme } from './screens.js';
6
7
  export type { CallAudio, CallingState, CallingController, CallingOptions, Contact, MediaAdapter, Phase } from './types.js';
7
8
  export { callingInk, resolveCallingDesign, defaultCallingAppearance, validateCallingAppearance, soundCatalog } from './appearance.js';
8
9
  export type { CallingAppearance, CallingPresentation, SoundChoice, SoundEvent } from './appearance.js';
9
- export { CallingUIProvider, useCallingUI, CallingLayout, CallingBrand, CallingAvatar, CallingContact, CallingStatus, CallingIdentity, CallingVideo, CallingActionButton, CallingAudioControls, CallingIncomingControls, CallingControls, } from './components.js';
10
+ export { CallingConnectionDetails, callDiagnosticsText, CallingUIProvider, useCallingUI, CallingLayout, CallingBrand, CallingAvatar, CallingContact, CallingStatus, CallingIdentity, CallingVideo, CallingActionButton, CallingAudioControls, CallingIncomingControls, CallingControls, } from './components.js';
10
11
  export type { CallingUIProviderProps, CallingUIValue, CallingScreenComponents, CallingAction, CallingActionModel, CallingSectionProps, CallingLayoutProps, CallingAvatarProps, CallingContactProps, CallingStatusProps, CallingActionButtonProps, } from './components.js';
package/dist/index.js CHANGED
@@ -22,4 +22,4 @@ export function createCallingController(options) {
22
22
  export { CallingScreen, CallingOverlay, useCalling } from './screens.js';
23
23
  export { CallHistoryItem } from './history.js';
24
24
  export { callingInk, resolveCallingDesign, defaultCallingAppearance, validateCallingAppearance, soundCatalog } from './appearance.js';
25
- export { CallingUIProvider, useCallingUI, CallingLayout, CallingBrand, CallingAvatar, CallingContact, CallingStatus, CallingIdentity, CallingVideo, CallingActionButton, CallingAudioControls, CallingIncomingControls, CallingControls, } from './components.js';
25
+ export { CallingConnectionDetails, callDiagnosticsText, CallingUIProvider, useCallingUI, CallingLayout, CallingBrand, CallingAvatar, CallingContact, CallingStatus, CallingIdentity, CallingVideo, CallingActionButton, CallingAudioControls, CallingIncomingControls, CallingControls, } from './components.js';
package/dist/screens.js CHANGED
@@ -30,5 +30,5 @@ export function CallingOverlay({ controller, ...props }) {
30
30
  return () => sub.remove();
31
31
  }, [controller]);
32
32
  const active = state.phase !== 'idle';
33
- return _jsx(Modal, { visible: active, presentationStyle: "fullScreen", animationType: "none", onRequestClose: () => { void controller.hangUp().catch(() => { }); }, children: active && _jsxs(SafeAreaProvider, { children: [_jsx(StatusBar, { barStyle: callingInk(props.theme?.background || design.colors.background) === '#000000' ? 'dark-content' : 'light-content' }), _jsx(CallingScreen, { ...props, state: state, onResume: () => { void controller.resume().catch(() => { }); }, onAnswer: () => { void controller.answer().catch(() => { }); }, onHangUp: () => { void controller.hangUp().catch(() => { }); }, onMute: value => controller.mute(value), onScreenShare: controller.startScreenSharing ? () => { void (state.screenSharing ? controller.stopScreenSharing?.() : controller.startScreenSharing?.())?.catch(() => { }); } : undefined, onCamera: controller.setCamera ? value => controller.setCamera?.(value) : undefined, onSwitchCamera: controller.switchCamera ? () => { void controller.switchCamera?.(); } : undefined, onSpeaker: value => controller.setSpeaker(value), onClose: () => controller.dismissError() })] }) });
33
+ return _jsx(Modal, { visible: active, presentationStyle: "fullScreen", animationType: "none", onRequestClose: () => { void controller.hangUp().catch(() => { }); }, children: active && _jsxs(SafeAreaProvider, { children: [_jsx(StatusBar, { barStyle: callingInk(props.theme?.background || design.colors.background) === '#000000' ? 'dark-content' : 'light-content' }), _jsx(CallingScreen, { ...props, getDiagnostics: controller.getDiagnostics, state: state, onResume: () => { void controller.resume().catch(() => { }); }, onAnswer: () => { void controller.answer().catch(() => { }); }, onHangUp: () => { void controller.hangUp().catch(() => { }); }, onMute: value => controller.mute(value), onScreenShare: controller.startScreenSharing ? () => { void (state.screenSharing ? controller.stopScreenSharing?.() : controller.startScreenSharing?.())?.catch(() => { }); } : undefined, onCamera: controller.setCamera ? value => controller.setCamera?.(value) : undefined, onSwitchCamera: controller.switchCamera ? () => { void controller.switchCamera?.(); } : undefined, onSpeaker: value => controller.setSpeaker(value), onClose: () => controller.dismissError() })] }) });
34
34
  }
package/dist/types.d.ts CHANGED
@@ -82,6 +82,7 @@ export interface CallingOptions {
82
82
  }) => void;
83
83
  }
84
84
  export interface CallingController {
85
+ getDiagnostics?(): Promise<import('@robono/calling').CallDiagnostics>;
85
86
  reportComponents?(components: string[]): void;
86
87
  readonly client: RobonoCallingClient;
87
88
  getSnapshot(): CallingState;
@@ -1,2 +1,2 @@
1
- export declare const mobileVersion = "0.7.0";
2
- export declare const engineVersion = "0.4.0";
1
+ export declare const mobileVersion = "0.8.0";
2
+ export declare const engineVersion = "0.5.0";
package/dist/versions.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Generated from the package manifests by build.mjs.
2
- export const mobileVersion = "0.7.0";
3
- export const engineVersion = "0.4.0";
2
+ export const mobileVersion = "0.8.0";
3
+ export const engineVersion = "0.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robono/calling-react-native",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Optional branded calling screens, sounds and native audio adapters for Robono calling.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -81,7 +81,7 @@
81
81
  "@types/react": "~19.2.2"
82
82
  },
83
83
  "peerDependencies": {
84
- "@robono/calling": "^0.4.0",
84
+ "@robono/calling": "^0.5.0",
85
85
  "react": ">=18.2 <20",
86
86
  "react-native": ">=0.76 <1",
87
87
  "react-native-svg": ">=15 <16",