@upscopeio/react-native-sdk 2026.3.0 → 2026.4.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/README.md +137 -4
- package/android/build.gradle.kts +1 -1
- package/android/src/main/kotlin/io/upscope/reactnative/UpscopeModule.kt +209 -55
- package/ios/UpscopeModule.mm +3 -0
- package/ios/UpscopeModule.swift +207 -45
- package/lib/commonjs/NativeUpscopeModule.js.map +1 -1
- package/lib/commonjs/Upscope.js +59 -18
- package/lib/commonjs/Upscope.js.map +1 -1
- package/lib/commonjs/hooks.js +45 -2
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/version.js +9 -0
- package/lib/commonjs/version.js.map +1 -0
- package/lib/module/NativeUpscopeModule.js.map +1 -1
- package/lib/module/Upscope.js +60 -18
- package/lib/module/Upscope.js.map +1 -1
- package/lib/module/hooks.js +43 -2
- package/lib/module/hooks.js.map +1 -1
- package/lib/module/index.js +4 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/version.js +5 -0
- package/lib/module/version.js.map +1 -0
- package/lib/typescript/NativeUpscopeModule.d.ts +3 -0
- package/lib/typescript/NativeUpscopeModule.d.ts.map +1 -1
- package/lib/typescript/Upscope.d.ts +20 -2
- package/lib/typescript/Upscope.d.ts.map +1 -1
- package/lib/typescript/hooks.d.ts +20 -3
- package/lib/typescript/hooks.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +7 -7
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +70 -14
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +2 -0
- package/lib/typescript/version.d.ts.map +1 -0
- package/package.json +3 -3
- package/src/NativeUpscopeModule.ts +5 -0
- package/src/Upscope.ts +66 -19
- package/src/hooks.ts +56 -3
- package/src/index.ts +19 -10
- package/src/types.ts +84 -27
- package/src/version.ts +2 -0
- package/upscopeio-react-native-sdk.podspec +1 -1
package/ios/UpscopeModule.swift
CHANGED
|
@@ -7,6 +7,17 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
7
7
|
|
|
8
8
|
private var hasListeners = false
|
|
9
9
|
|
|
10
|
+
/// The emitter instance that currently has JS listeners attached. The bridge
|
|
11
|
+
/// can construct more than one `UpscopeModule`; delegate callbacks and
|
|
12
|
+
/// publisher subscriptions are routed through this stable reference so events
|
|
13
|
+
/// always reach the live emitter the JS side is actually subscribed to.
|
|
14
|
+
/// Fixes Bug #2 (session state stuck "inactive" with multiple instances).
|
|
15
|
+
private static weak var current: UpscopeModule?
|
|
16
|
+
|
|
17
|
+
/// Pending full-device requests awaiting a JS response, keyed by request id.
|
|
18
|
+
/// Access is confined to the main actor (where the handler fires).
|
|
19
|
+
private static var pendingFullDeviceRequests: [String: SessionRequestResponse] = [:]
|
|
20
|
+
|
|
10
21
|
override init() {
|
|
11
22
|
super.init()
|
|
12
23
|
}
|
|
@@ -18,20 +29,27 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
18
29
|
override func supportedEvents() -> [String] {
|
|
19
30
|
return [
|
|
20
31
|
"connectionStateChanged",
|
|
32
|
+
"sessionStateChanged",
|
|
21
33
|
"sessionStarted",
|
|
22
34
|
"sessionEnded",
|
|
23
35
|
"customMessageReceived",
|
|
24
36
|
"error",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
37
|
+
"viewerJoined",
|
|
38
|
+
"viewerLeft",
|
|
39
|
+
"viewerCountChanged",
|
|
28
40
|
"shortIdChanged",
|
|
29
41
|
"lookupCodeChanged",
|
|
42
|
+
"remoteControlStateChanged",
|
|
43
|
+
"fullDeviceSharingStateChanged",
|
|
44
|
+
"fullDeviceRequest",
|
|
30
45
|
]
|
|
31
46
|
}
|
|
32
47
|
|
|
33
48
|
override func startObserving() {
|
|
34
49
|
hasListeners = true
|
|
50
|
+
// Become the live emitter so delegate callbacks reach this instance.
|
|
51
|
+
UpscopeModule.current = self
|
|
52
|
+
|
|
35
53
|
Task { @MainActor in
|
|
36
54
|
for await shortId in Upscope.shared.shortIdPublisher.values {
|
|
37
55
|
guard self.hasListeners else { break }
|
|
@@ -44,10 +62,43 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
44
62
|
self.sendEvent(withName: "lookupCodeChanged", body: ["lookupCode": code as Any])
|
|
45
63
|
}
|
|
46
64
|
}
|
|
65
|
+
// Drive connection/session state from current-value publishers so a fresh
|
|
66
|
+
// subscription immediately receives the real state (core fix for Bug #2).
|
|
67
|
+
Task { @MainActor in
|
|
68
|
+
for await state in Upscope.shared.connectionStatePublisher.values {
|
|
69
|
+
guard self.hasListeners else { break }
|
|
70
|
+
var body: [String: Any] = ["state": self.serializeConnectionState(state)]
|
|
71
|
+
if case let .error(error) = state {
|
|
72
|
+
body["error"] = self.serializeError(error)
|
|
73
|
+
}
|
|
74
|
+
self.sendEvent(withName: "connectionStateChanged", body: body)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
Task { @MainActor in
|
|
78
|
+
for await state in Upscope.shared.sessionStatePublisher.values {
|
|
79
|
+
guard self.hasListeners else { break }
|
|
80
|
+
self.sendEvent(withName: "sessionStateChanged", body: ["state": self.serializeSessionState(state)])
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
Task { @MainActor in
|
|
84
|
+
for await state in Upscope.shared.remoteControlStatePublisher.values {
|
|
85
|
+
guard self.hasListeners else { break }
|
|
86
|
+
self.sendEvent(withName: "remoteControlStateChanged", body: ["state": self.serializeRemoteControlState(state)])
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
Task { @MainActor in
|
|
90
|
+
for await state in Upscope.shared.fullDeviceSharingStatePublisher.values {
|
|
91
|
+
guard self.hasListeners else { break }
|
|
92
|
+
self.sendEvent(withName: "fullDeviceSharingStateChanged", body: ["state": self.serializeFullDeviceSharingState(state)])
|
|
93
|
+
}
|
|
94
|
+
}
|
|
47
95
|
}
|
|
48
96
|
|
|
49
97
|
override func stopObserving() {
|
|
50
98
|
hasListeners = false
|
|
99
|
+
if UpscopeModule.current === self {
|
|
100
|
+
UpscopeModule.current = nil
|
|
101
|
+
}
|
|
51
102
|
}
|
|
52
103
|
|
|
53
104
|
// MARK: - Initialization
|
|
@@ -55,22 +106,55 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
55
106
|
@objc func initialize(_ config: NSDictionary) {
|
|
56
107
|
guard let apiKey = config["apiKey"] as? String else { return }
|
|
57
108
|
|
|
58
|
-
|
|
109
|
+
var upscopeConfig = UpscopeConfiguration(
|
|
59
110
|
apiKey: apiKey,
|
|
60
|
-
requireAuthorizationForSession: config["requireAuthorizationForSession"] as? Bool
|
|
61
|
-
autoconnect: config["autoConnect"] as? Bool
|
|
111
|
+
requireAuthorizationForSession: config["requireAuthorizationForSession"] as? Bool,
|
|
112
|
+
autoconnect: config["autoConnect"] as? Bool,
|
|
62
113
|
region: config["region"] as? String,
|
|
63
|
-
showTerminateButton: config["showTerminateButton"] as? Bool
|
|
64
|
-
authorizationPromptTitle: config["authorizationPromptTitle"] as? String
|
|
65
|
-
authorizationPromptMessage: config["authorizationPromptMessage"] as? String
|
|
114
|
+
showTerminateButton: config["showTerminateButton"] as? Bool,
|
|
115
|
+
authorizationPromptTitle: config["authorizationPromptTitle"] as? String,
|
|
116
|
+
authorizationPromptMessage: config["authorizationPromptMessage"] as? String,
|
|
66
117
|
endOfSessionMessage: config["endOfSessionMessage"] as? String,
|
|
67
|
-
stopSessionText: config["stopSessionText"]
|
|
118
|
+
stopSessionText: parseLocalizedString(config["stopSessionText"]),
|
|
68
119
|
allowRemoteClick: config["allowRemoteClick"] as? Bool,
|
|
69
120
|
allowRemoteScroll: config["allowRemoteScroll"] as? Bool,
|
|
70
121
|
requireControlRequest: config["requireControlRequest"] as? Bool,
|
|
71
|
-
|
|
122
|
+
controlRequestTitle: config["controlRequestTitle"] as? String,
|
|
123
|
+
controlRequestMessage: config["controlRequestMessage"] as? String,
|
|
124
|
+
enableLookupCodeOnShake: config["enableLookupCodeOnShake"] as? Bool,
|
|
125
|
+
lookupCodeKeyTitle: config["lookupCodeKeyTitle"] as? String,
|
|
126
|
+
lookupCodeKeyMessage: config["lookupCodeKeyMessage"] as? String,
|
|
127
|
+
translationsYes: parseLocalizedString(config["translationsYes"]),
|
|
128
|
+
translationsNo: parseLocalizedString(config["translationsNo"]),
|
|
129
|
+
translationsOk: parseLocalizedString(config["translationsOk"]),
|
|
130
|
+
wrapper: "react-native",
|
|
131
|
+
wrapperVersion: config["wrapperVersion"] as? String,
|
|
132
|
+
broadcastAppGroupId: config["broadcastAppGroupId"] as? String,
|
|
133
|
+
broadcastExtensionBundleId: config["broadcastExtensionBundleId"] as? String
|
|
72
134
|
)
|
|
73
135
|
|
|
136
|
+
// Base domain for SDK endpoints (staging/on-prem). `baseDomain` is a
|
|
137
|
+
// mutable property on the native config, so set it after construction.
|
|
138
|
+
if let baseDomain = config["baseDomain"] as? String {
|
|
139
|
+
upscopeConfig.baseDomain = baseDomain
|
|
140
|
+
}
|
|
141
|
+
if let disableFullScreenWhenMasked = config["disableFullScreenWhenMasked"] as? Bool {
|
|
142
|
+
upscopeConfig.disableFullScreenWhenMasked = disableFullScreenWhenMasked
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Bridge the native full-device request hook to the JS event layer.
|
|
146
|
+
// Stores the response keyed by a generated id, emits `fullDeviceRequest`,
|
|
147
|
+
// and returns a Cancellable that clears the stored entry. The JS side
|
|
148
|
+
// answers via respondToFullDeviceRequest(requestId, accept).
|
|
149
|
+
upscopeConfig.onFullDeviceRequest = { response in
|
|
150
|
+
let requestId = UUID().uuidString
|
|
151
|
+
UpscopeModule.pendingFullDeviceRequests[requestId] = response
|
|
152
|
+
UpscopeModule.current?.sendEvent(withName: "fullDeviceRequest", body: ["requestId": requestId])
|
|
153
|
+
return FullDeviceRequestCancellable {
|
|
154
|
+
UpscopeModule.pendingFullDeviceRequests.removeValue(forKey: requestId)
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
74
158
|
Task { @MainActor in
|
|
75
159
|
try Upscope.shared.initialize(with: upscopeConfig)
|
|
76
160
|
Upscope.shared.delegate = self
|
|
@@ -98,6 +182,7 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
98
182
|
callName: params["callName"] as? String,
|
|
99
183
|
tags: params["tags"] as? [String],
|
|
100
184
|
identities: params["identities"] as? [String],
|
|
185
|
+
integrationIds: params["integrationIds"] as? [String],
|
|
101
186
|
metadata: params["metadata"] as? [String: String]
|
|
102
187
|
)
|
|
103
188
|
}
|
|
@@ -117,6 +202,29 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
117
202
|
Task { @MainActor in Upscope.shared.cancelAgentRequest() }
|
|
118
203
|
}
|
|
119
204
|
|
|
205
|
+
// MARK: - Remote control / full-device sharing
|
|
206
|
+
|
|
207
|
+
@objc func stopRemoteControl() {
|
|
208
|
+
Task { @MainActor in Upscope.shared.stopRemoteControl() }
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
@objc func stopFullDeviceSharing() {
|
|
212
|
+
Task { @MainActor in Upscope.shared.stopFullDeviceSharing() }
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
@objc func respondToFullDeviceRequest(_ requestId: String, accept: Bool) {
|
|
216
|
+
Task { @MainActor in
|
|
217
|
+
guard let response = UpscopeModule.pendingFullDeviceRequests.removeValue(forKey: requestId) else {
|
|
218
|
+
return
|
|
219
|
+
}
|
|
220
|
+
if accept {
|
|
221
|
+
response.accept()
|
|
222
|
+
} else {
|
|
223
|
+
response.reject()
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
120
228
|
// MARK: - Lookup
|
|
121
229
|
|
|
122
230
|
@objc func getLookupCode() {
|
|
@@ -144,68 +252,94 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
144
252
|
}
|
|
145
253
|
|
|
146
254
|
// MARK: - UpscopeDelegate
|
|
255
|
+
//
|
|
256
|
+
// Delegate callbacks are routed through `UpscopeModule.current` (the live
|
|
257
|
+
// emitter) rather than `self`, because the bridge may have constructed a
|
|
258
|
+
// different instance than the one JS is subscribed to (Bug #2).
|
|
259
|
+
// `emit` no-ops when no emitter is active.
|
|
260
|
+
|
|
261
|
+
/// Forwards an event to the currently active emitter, if any.
|
|
262
|
+
@MainActor
|
|
263
|
+
private static func emit(_ name: String, body: Any?) {
|
|
264
|
+
guard let current = current, current.hasListeners else { return }
|
|
265
|
+
current.sendEvent(withName: name, body: body)
|
|
266
|
+
}
|
|
147
267
|
|
|
148
268
|
@MainActor
|
|
149
269
|
func upscope(_ upscope: Upscope, didChangeConnectionState state: ConnectionState) {
|
|
150
|
-
|
|
270
|
+
// Connection state is primarily driven by connectionStatePublisher in
|
|
271
|
+
// startObserving; this delegate path is kept as a redundant fast path.
|
|
151
272
|
var body: [String: Any] = ["state": serializeConnectionState(state)]
|
|
152
273
|
if case let .error(error) = state {
|
|
153
274
|
body["error"] = serializeError(error)
|
|
154
275
|
}
|
|
155
|
-
|
|
276
|
+
UpscopeModule.emit("connectionStateChanged", body: body)
|
|
156
277
|
}
|
|
157
278
|
|
|
158
279
|
@MainActor
|
|
159
280
|
func upscopeSessionDidStart(_ upscope: Upscope, agentName: String?) {
|
|
160
|
-
|
|
161
|
-
sendEvent(withName: "sessionStarted", body: ["agentName": agentName as Any])
|
|
281
|
+
UpscopeModule.emit("sessionStarted", body: ["agentName": agentName as Any])
|
|
162
282
|
}
|
|
163
283
|
|
|
164
284
|
@MainActor
|
|
165
285
|
func upscopeSessionDidEnd(_ upscope: Upscope, reason: SessionEndReason) {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
286
|
+
UpscopeModule.emit("sessionEnded", body: ["reason": serializeEndReason(reason)])
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@MainActor
|
|
290
|
+
func upscope(_ upscope: Upscope, didChangeRemoteControlState state: RemoteControlState) {
|
|
291
|
+
UpscopeModule.emit("remoteControlStateChanged", body: ["state": serializeRemoteControlState(state)])
|
|
172
292
|
}
|
|
173
293
|
|
|
174
294
|
@MainActor
|
|
175
|
-
func upscope(_ upscope: Upscope,
|
|
176
|
-
|
|
177
|
-
|
|
295
|
+
func upscope(_ upscope: Upscope, didChangeFullDeviceSharingState state: FullDeviceSharingState) {
|
|
296
|
+
UpscopeModule.emit("fullDeviceSharingStateChanged", body: ["state": serializeFullDeviceSharingState(state)])
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
@MainActor
|
|
300
|
+
func upscope(_ upscope: Upscope, didReceiveCustomMessage message: String, from viewerId: String) {
|
|
301
|
+
UpscopeModule.emit("customMessageReceived", body: [
|
|
178
302
|
"message": message,
|
|
179
|
-
"
|
|
303
|
+
"viewerId": viewerId,
|
|
180
304
|
])
|
|
181
305
|
}
|
|
182
306
|
|
|
183
307
|
@MainActor
|
|
184
308
|
func upscope(_ upscope: Upscope, didEncounterError error: UpscopeError) {
|
|
185
|
-
|
|
186
|
-
sendEvent(withName: "error", body: serializeError(error))
|
|
309
|
+
UpscopeModule.emit("error", body: serializeError(error))
|
|
187
310
|
}
|
|
188
311
|
|
|
189
312
|
@MainActor
|
|
190
|
-
func upscope(_ upscope: Upscope,
|
|
191
|
-
|
|
192
|
-
sendEvent(withName: "observerJoined", body: serializeObserver(observer))
|
|
313
|
+
func upscope(_ upscope: Upscope, viewerDidJoin viewer: Viewer) {
|
|
314
|
+
UpscopeModule.emit("viewerJoined", body: serializeViewer(viewer))
|
|
193
315
|
}
|
|
194
316
|
|
|
195
317
|
@MainActor
|
|
196
|
-
func upscope(_ upscope: Upscope,
|
|
197
|
-
|
|
198
|
-
sendEvent(withName: "observerLeft", body: ["observerId": observerId])
|
|
318
|
+
func upscope(_ upscope: Upscope, viewerDidLeave viewerId: String) {
|
|
319
|
+
UpscopeModule.emit("viewerLeft", body: ["viewerId": viewerId])
|
|
199
320
|
}
|
|
200
321
|
|
|
201
322
|
@MainActor
|
|
202
|
-
func upscope(_ upscope: Upscope,
|
|
203
|
-
|
|
204
|
-
sendEvent(withName: "observerCountChanged", body: ["count": count])
|
|
323
|
+
func upscope(_ upscope: Upscope, viewerCountDidChange count: Int) {
|
|
324
|
+
UpscopeModule.emit("viewerCountChanged", body: ["count": count])
|
|
205
325
|
}
|
|
206
326
|
|
|
207
327
|
// MARK: - Serialization
|
|
208
328
|
|
|
329
|
+
/// Converts a JS-bridged value (either a String or a [String: String] map) into a
|
|
330
|
+
/// `LocalizedString`. Returns nil when the key is absent or holds an unsupported type
|
|
331
|
+
/// so the native SDK falls back to its server-provided default.
|
|
332
|
+
private func parseLocalizedString(_ value: Any?) -> LocalizedString? {
|
|
333
|
+
if let string = value as? String {
|
|
334
|
+
return .string(string)
|
|
335
|
+
}
|
|
336
|
+
if let dict = value as? [String: String] {
|
|
337
|
+
let entries = dict.map { LocalizedString.Entry(language: $0.key, value: $0.value) }
|
|
338
|
+
return .localized(entries)
|
|
339
|
+
}
|
|
340
|
+
return nil
|
|
341
|
+
}
|
|
342
|
+
|
|
209
343
|
private func serializeConnectionState(_ state: ConnectionState) -> String {
|
|
210
344
|
switch state {
|
|
211
345
|
case .inactive: return "inactive"
|
|
@@ -216,12 +350,23 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
216
350
|
}
|
|
217
351
|
}
|
|
218
352
|
|
|
353
|
+
private func serializeSessionState(_ state: SessionState) -> String {
|
|
354
|
+
return state.rawValue
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
private func serializeRemoteControlState(_ state: RemoteControlState) -> String {
|
|
358
|
+
return state.rawValue
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
private func serializeFullDeviceSharingState(_ state: FullDeviceSharingState) -> String {
|
|
362
|
+
return state.rawValue
|
|
363
|
+
}
|
|
364
|
+
|
|
219
365
|
private func serializeEndReason(_ reason: SessionEndReason) -> String {
|
|
220
366
|
switch reason {
|
|
221
367
|
case .userStopped: return "userStopped"
|
|
222
368
|
case .agentStopped: return "agentStopped"
|
|
223
369
|
case .timeout: return "timeout"
|
|
224
|
-
case .error: return "error"
|
|
225
370
|
}
|
|
226
371
|
}
|
|
227
372
|
|
|
@@ -229,15 +374,32 @@ class UpscopeModule: RCTEventEmitter, UpscopeDelegate {
|
|
|
229
374
|
return ["code": error.code, "message": error.message]
|
|
230
375
|
}
|
|
231
376
|
|
|
232
|
-
private func
|
|
377
|
+
private func serializeViewer(_ viewer: Viewer) -> [String: Any] {
|
|
233
378
|
return [
|
|
234
|
-
"id":
|
|
235
|
-
"name":
|
|
236
|
-
"screenWidth":
|
|
237
|
-
"screenHeight":
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
379
|
+
"id": viewer.id,
|
|
380
|
+
"name": viewer.name as Any,
|
|
381
|
+
"screenWidth": viewer.screenWidth,
|
|
382
|
+
"screenHeight": viewer.screenHeight,
|
|
383
|
+
"screenScale": viewer.screenScale,
|
|
384
|
+
"windowWidth": viewer.windowWidth,
|
|
385
|
+
"windowHeight": viewer.windowHeight,
|
|
386
|
+
"hasFocus": viewer.hasFocus,
|
|
241
387
|
]
|
|
242
388
|
}
|
|
243
389
|
}
|
|
390
|
+
|
|
391
|
+
/// Cancellable handed back from `onFullDeviceRequest`. When the SDK cancels the
|
|
392
|
+
/// request externally (e.g. session ended before the visitor responded), it runs
|
|
393
|
+
/// the closure that drops the stored `SessionRequestResponse` so a later JS
|
|
394
|
+
/// response to a stale id is safely ignored.
|
|
395
|
+
private final class FullDeviceRequestCancellable: Cancellable {
|
|
396
|
+
private let onCancel: () -> Void
|
|
397
|
+
|
|
398
|
+
init(onCancel: @escaping () -> Void) {
|
|
399
|
+
self.onCancel = onCancel
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
func cancel() {
|
|
403
|
+
onCancel()
|
|
404
|
+
}
|
|
405
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeUpscopeModule.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["NativeUpscopeModule.ts"],"mappings":";;;;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAmCpCC,gCAAmB,CAACC,YAAY,CAAO,eAAe,CAAC","ignoreList":[]}
|
package/lib/commonjs/Upscope.js
CHANGED
|
@@ -5,15 +5,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _reactNative = require("react-native");
|
|
8
|
-
var
|
|
9
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
|
+
var _version = require("./version");
|
|
10
9
|
/**
|
|
11
10
|
* Subscription handle returned by addListener. Callers must invoke remove()
|
|
12
11
|
* to avoid memory leaks when the component/scope unmounts.
|
|
13
12
|
*/
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Resolve the native TurboModule lazily on first use. Resolving at import time
|
|
16
|
+
* runs during the initial JS bundle evaluation — before the bridgeless runtime
|
|
17
|
+
* has finished registering third-party TurboModules — which makes
|
|
18
|
+
* `getEnforcing` throw "UpscopeModule could not be found". Deferring until a
|
|
19
|
+
* method is actually called avoids that startup ordering issue.
|
|
20
|
+
*/
|
|
21
|
+
let nativeModule;
|
|
22
|
+
function native() {
|
|
23
|
+
return nativeModule ??= _reactNative.TurboModuleRegistry.getEnforcing('UpscopeModule');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Lazily-created emitter — one instance for the lifetime of the JS runtime.
|
|
27
|
+
let eventEmitter;
|
|
28
|
+
function emitter() {
|
|
29
|
+
return eventEmitter ??= new _reactNative.NativeEventEmitter(native());
|
|
30
|
+
}
|
|
17
31
|
|
|
18
32
|
/**
|
|
19
33
|
* Imperative JS API over the native Upscope TurboModule.
|
|
@@ -24,41 +38,68 @@ const emitter = new _reactNative.NativeEventEmitter(_NativeUpscopeModule.default
|
|
|
24
38
|
const Upscope = {
|
|
25
39
|
/** Initialise the SDK. Must be called before any other method. */
|
|
26
40
|
initialize(config) {
|
|
27
|
-
|
|
41
|
+
native().initialize({
|
|
42
|
+
...config,
|
|
43
|
+
wrapperVersion: _version.SDK_VERSION
|
|
44
|
+
});
|
|
28
45
|
},
|
|
29
46
|
/** Open a WebSocket connection to the Upscope service. */
|
|
30
47
|
connect() {
|
|
31
|
-
|
|
48
|
+
native().connect();
|
|
32
49
|
},
|
|
33
50
|
/** Close the WebSocket connection. */
|
|
34
51
|
disconnect() {
|
|
35
|
-
|
|
52
|
+
native().disconnect();
|
|
36
53
|
},
|
|
37
54
|
/**
|
|
38
55
|
* Reset the connection state.
|
|
39
56
|
* @param reconnect - Whether to reconnect immediately after reset. Defaults to true.
|
|
40
57
|
*/
|
|
41
58
|
reset(reconnect = true) {
|
|
42
|
-
|
|
59
|
+
native().reset(reconnect);
|
|
43
60
|
},
|
|
44
61
|
/**
|
|
45
62
|
* Update user identity and metadata sent to the Upscope service.
|
|
46
63
|
* Safe to call at any time; changes are pushed on the next sync.
|
|
47
64
|
*/
|
|
48
65
|
updateConnection(params) {
|
|
49
|
-
|
|
66
|
+
native().updateConnection(params);
|
|
50
67
|
},
|
|
51
68
|
/** Terminate the active co-browsing session. */
|
|
52
69
|
stopSession() {
|
|
53
|
-
|
|
70
|
+
native().stopSession();
|
|
54
71
|
},
|
|
55
72
|
/** Request that an agent join the current session. */
|
|
56
73
|
requestAgent() {
|
|
57
|
-
|
|
74
|
+
native().requestAgent();
|
|
58
75
|
},
|
|
59
76
|
/** Cancel a pending agent-join request. */
|
|
60
77
|
cancelAgentRequest() {
|
|
61
|
-
|
|
78
|
+
native().cancelAgentRequest();
|
|
79
|
+
},
|
|
80
|
+
/**
|
|
81
|
+
* Revoke the agent's active remote control while keeping the session alive.
|
|
82
|
+
* No-op if remote control is not currently active.
|
|
83
|
+
*/
|
|
84
|
+
stopRemoteControl() {
|
|
85
|
+
native().stopRemoteControl();
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* End full-device (broadcast) sharing and revert to in-app sharing, keeping
|
|
89
|
+
* the session alive. No-op if full-device sharing is not currently active.
|
|
90
|
+
*/
|
|
91
|
+
stopFullDeviceSharing() {
|
|
92
|
+
native().stopFullDeviceSharing();
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* Answer a pending full-device sharing request delivered via the
|
|
96
|
+
* `fullDeviceRequest` event.
|
|
97
|
+
*
|
|
98
|
+
* @param requestId - The id from the `fullDeviceRequest` event payload.
|
|
99
|
+
* @param accept - `true` to allow full-device capture, `false` to reject.
|
|
100
|
+
*/
|
|
101
|
+
respondToFullDeviceRequest(requestId, accept) {
|
|
102
|
+
native().respondToFullDeviceRequest(requestId, accept);
|
|
62
103
|
},
|
|
63
104
|
/**
|
|
64
105
|
* Ask the native layer to emit the current lookup code via the
|
|
@@ -66,19 +107,19 @@ const Upscope = {
|
|
|
66
107
|
* asynchronously through the event system.
|
|
67
108
|
*/
|
|
68
109
|
getLookupCode() {
|
|
69
|
-
|
|
110
|
+
native().getLookupCode();
|
|
70
111
|
},
|
|
71
112
|
/** Resolve the current short ID, or null if not yet assigned. */
|
|
72
113
|
getShortId() {
|
|
73
|
-
return
|
|
114
|
+
return native().getShortId();
|
|
74
115
|
},
|
|
75
116
|
/** Resolve the watch link for the current session, or null if unavailable. */
|
|
76
117
|
getWatchLink() {
|
|
77
|
-
return
|
|
118
|
+
return native().getWatchLink();
|
|
78
119
|
},
|
|
79
|
-
/** Send an arbitrary string message to all connected
|
|
120
|
+
/** Send an arbitrary string message to all connected viewers. */
|
|
80
121
|
sendCustomMessage(message) {
|
|
81
|
-
|
|
122
|
+
native().sendCustomMessage(message);
|
|
82
123
|
},
|
|
83
124
|
/**
|
|
84
125
|
* Subscribe to a typed Upscope event.
|
|
@@ -88,7 +129,7 @@ const Upscope = {
|
|
|
88
129
|
* @returns A subscription handle. Call `.remove()` to unsubscribe.
|
|
89
130
|
*/
|
|
90
131
|
addListener(eventName, callback) {
|
|
91
|
-
return emitter.addListener(eventName, callback);
|
|
132
|
+
return emitter().addListener(eventName, callback);
|
|
92
133
|
}
|
|
93
134
|
};
|
|
94
135
|
var _default = exports.default = Upscope;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_version","nativeModule","native","TurboModuleRegistry","getEnforcing","eventEmitter","emitter","NativeEventEmitter","Upscope","initialize","config","wrapperVersion","SDK_VERSION","connect","disconnect","reset","reconnect","updateConnection","params","stopSession","requestAgent","cancelAgentRequest","stopRemoteControl","stopFullDeviceSharing","respondToFullDeviceRequest","requestId","accept","getLookupCode","getShortId","getWatchLink","sendCustomMessage","message","addListener","eventName","callback","_default","exports","default"],"sourceRoot":"../../src","sources":["Upscope.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAQA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIE,YAA8B;AAClC,SAASC,MAAMA,CAAA,EAAS;EACtB,OAAQD,YAAY,KAClBE,gCAAmB,CAACC,YAAY,CAAO,eAAe,CAAC;AAC3D;;AAEA;AACA,IAAIC,YAA4C;AAChD,SAASC,OAAOA,CAAA,EAAuB;EACrC,OAAQD,YAAY,KAAK,IAAIE,+BAAk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ACA;AACA;EACEC,0BAA0BA,CAACC,SAAiB,EAAEC,MAAe,EAAQ;IACnExB,MAAM,CAAC,CAAC,CAACsB,0BAA0B,CAACC,SAAS,EAAEC,MAAM,CAAC;EACxD,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,aAAaA,CAAA,EAAS;IACpBzB,MAAM,CAAC,CAAC,CAACyB,aAAa,CAAC,CAAC;EAC1B,CAAC;EAED;EACAC,UAAUA,CAAA,EAA2B;IACnC,OAAO1B,MAAM,CAAC,CAAC,CAAC0B,UAAU,CAAC,CAAC;EAC9B,CAAC;EAED;EACAC,YAAYA,CAAA,EAA2B;IACrC,OAAO3B,MAAM,CAAC,CAAC,CAAC2B,YAAY,CAAC,CAAC;EAChC,CAAC;EAED;EACAC,iBAAiBA,CAACC,OAAe,EAAQ;IACvC7B,MAAM,CAAC,CAAC,CAAC4B,iBAAiB,CAACC,OAAO,CAAC;EACrC,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,WAAWA,CACTC,SAAY,EACZC,QAA6C,EAC1B;IACnB,OAAO5B,OAAO,CAAC,CAAC,CAAC0B,WAAW,CAACC,SAAS,EAAEC,QAAQ,CAAC;EACnD;AACF,CAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEI7B,OAAO","ignoreList":[]}
|
package/lib/commonjs/hooks.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.useConnectionState = useConnectionState;
|
|
7
|
+
exports.useFullDeviceSharingState = useFullDeviceSharingState;
|
|
7
8
|
exports.useLookupCode = useLookupCode;
|
|
9
|
+
exports.useRemoteControlState = useRemoteControlState;
|
|
8
10
|
exports.useSessionState = useSessionState;
|
|
9
11
|
exports.useShortId = useShortId;
|
|
10
12
|
exports.useUpscope = useUpscope;
|
|
@@ -27,12 +29,19 @@ function useConnectionState() {
|
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
/**
|
|
30
|
-
* Returns the current co-browsing session state.
|
|
31
|
-
*
|
|
32
|
+
* Returns the current co-browsing session state.
|
|
33
|
+
*
|
|
34
|
+
* Seeds and stays in sync via the `sessionStateChanged` event, which the
|
|
35
|
+
* native layer drives from a current-value publisher — so a fresh subscription
|
|
36
|
+
* immediately receives the real state, even across remounts. The
|
|
37
|
+
* `sessionStarted`/`sessionEnded` events provide redundant fast-path updates.
|
|
32
38
|
*/
|
|
33
39
|
function useSessionState() {
|
|
34
40
|
const [state, setState] = (0, _react.useState)("inactive");
|
|
35
41
|
(0, _react.useEffect)(() => {
|
|
42
|
+
const subState = _Upscope.default.addListener("sessionStateChanged", event => {
|
|
43
|
+
setState(event.state);
|
|
44
|
+
});
|
|
36
45
|
const subStart = _Upscope.default.addListener("sessionStarted", () => {
|
|
37
46
|
setState("active");
|
|
38
47
|
});
|
|
@@ -40,6 +49,7 @@ function useSessionState() {
|
|
|
40
49
|
setState("inactive");
|
|
41
50
|
});
|
|
42
51
|
return () => {
|
|
52
|
+
subState.remove();
|
|
43
53
|
subStart.remove();
|
|
44
54
|
subEnd.remove();
|
|
45
55
|
};
|
|
@@ -79,6 +89,36 @@ function useLookupCode() {
|
|
|
79
89
|
return code;
|
|
80
90
|
}
|
|
81
91
|
|
|
92
|
+
/**
|
|
93
|
+
* Returns whether an agent currently has remote control of the device.
|
|
94
|
+
* Defaults to "inactive" and stays in sync via `remoteControlStateChanged`.
|
|
95
|
+
*/
|
|
96
|
+
function useRemoteControlState() {
|
|
97
|
+
const [state, setState] = (0, _react.useState)("inactive");
|
|
98
|
+
(0, _react.useEffect)(() => {
|
|
99
|
+
const sub = _Upscope.default.addListener("remoteControlStateChanged", event => {
|
|
100
|
+
setState(event.state);
|
|
101
|
+
});
|
|
102
|
+
return () => sub.remove();
|
|
103
|
+
}, []);
|
|
104
|
+
return state;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Returns whether full-device (broadcast) screen sharing is currently running.
|
|
109
|
+
* Defaults to "inactive" and stays in sync via `fullDeviceSharingStateChanged`.
|
|
110
|
+
*/
|
|
111
|
+
function useFullDeviceSharingState() {
|
|
112
|
+
const [state, setState] = (0, _react.useState)("inactive");
|
|
113
|
+
(0, _react.useEffect)(() => {
|
|
114
|
+
const sub = _Upscope.default.addListener("fullDeviceSharingStateChanged", event => {
|
|
115
|
+
setState(event.state);
|
|
116
|
+
});
|
|
117
|
+
return () => sub.remove();
|
|
118
|
+
}, []);
|
|
119
|
+
return state;
|
|
120
|
+
}
|
|
121
|
+
|
|
82
122
|
/**
|
|
83
123
|
* Returns a stable object of imperative Upscope action methods.
|
|
84
124
|
* Safe to use as a dependency in `useCallback` / `useEffect`.
|
|
@@ -90,6 +130,9 @@ function useUpscope() {
|
|
|
90
130
|
stopSession: _Upscope.default.stopSession,
|
|
91
131
|
requestAgent: _Upscope.default.requestAgent,
|
|
92
132
|
cancelAgentRequest: _Upscope.default.cancelAgentRequest,
|
|
133
|
+
stopRemoteControl: _Upscope.default.stopRemoteControl,
|
|
134
|
+
stopFullDeviceSharing: _Upscope.default.stopFullDeviceSharing,
|
|
135
|
+
respondToFullDeviceRequest: _Upscope.default.respondToFullDeviceRequest,
|
|
93
136
|
sendCustomMessage: _Upscope.default.sendCustomMessage,
|
|
94
137
|
getLookupCode: _Upscope.default.getLookupCode,
|
|
95
138
|
reset: _Upscope.default.reset
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_Upscope","_interopRequireDefault","e","__esModule","default","useConnectionState","state","setState","useState","useEffect","sub","Upscope","addListener","event","remove","useSessionState","subStart","subEnd","useShortId","shortId","setShortId","getShortId","then","useLookupCode","code","setCode","lookupCode","useUpscope","useMemo","connect","disconnect","stopSession","requestAgent","cancelAgentRequest","sendCustomMessage","getLookupCode","reset"],"sourceRoot":"../../src","sources":["hooks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_react","require","_Upscope","_interopRequireDefault","e","__esModule","default","useConnectionState","state","setState","useState","useEffect","sub","Upscope","addListener","event","remove","useSessionState","subState","subStart","subEnd","useShortId","shortId","setShortId","getShortId","then","useLookupCode","code","setCode","lookupCode","useRemoteControlState","useFullDeviceSharingState","useUpscope","useMemo","connect","disconnect","stopSession","requestAgent","cancelAgentRequest","stopRemoteControl","stopFullDeviceSharing","respondToFullDeviceRequest","sendCustomMessage","getLookupCode","reset"],"sourceRoot":"../../src","sources":["hooks.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAgC,SAAAE,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQhC;AACA;AACA;AACA;AACO,SAASG,kBAAkBA,CAAA,EAAoB;EACpD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAkB,UAAU,CAAC;EAE/D,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,GAAG,GAAGC,gBAAO,CAACC,WAAW,CAAC,wBAAwB,EAAGC,KAAK,IAAK;MACnEN,QAAQ,CAACM,KAAK,CAACP,KAAK,CAAC;IACvB,CAAC,CAAC;IACF,OAAO,MAAMI,GAAG,CAACI,MAAM,CAAC,CAAC;EAC3B,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOR,KAAK;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASS,eAAeA,CAAA,EAAiB;EAC9C,MAAM,CAACT,KAAK,EAAEC,QAAQ,CAAC,GAAG,IAAAC,eAAQ,EAAe,UAAU,CAAC;EAE5D,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMO,QAAQ,GAAGL,gBAAO,CAACC,WAAW,CAAC,qBAAqB,EAAGC,KAAK,IAAK;MACrEN,QAAQ,CAACM,KAAK,CAACP,KAAK,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