@snaplyagent/react-native 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +6 -0
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/com/snaplyagent/reactnative/SnaplyAgentModule.kt +6 -0
  5. package/ios/Frameworks/SnaplyAgent.xcframework/Info.plist +5 -5
  6. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Info.plist +0 -0
  7. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  8. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios.swiftinterface +58 -51
  9. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64/SnaplyAgent.framework/SnaplyAgent +0 -0
  10. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Info.plist +0 -0
  11. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  12. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface +58 -51
  13. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  14. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +58 -51
  15. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/SnaplyAgent +0 -0
  16. package/ios/Frameworks/SnaplyAgent.xcframework/ios-arm64_x86_64-simulator/SnaplyAgent.framework/_CodeSignature/CodeResources +9 -9
  17. package/ios/Sources/SnaplyAgentModule.mm +10 -0
  18. package/ios/Sources/SnaplyBridge.swift +6 -1
  19. package/lib/index.d.ts +17 -2
  20. package/lib/index.js +1 -1
  21. package/package.json +1 -1
  22. package/spec/NativeSnaplyAgent.ts +2 -0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 1.1.0
2
+
3
+ Carries the Snaply Agent iOS SDK 2.56.0 and brings the Android SDK 2.47.0 from Maven Central.
4
+
5
+ * Your app can ask whether support is watching or controlling it right now: `Snaply.isLiveViewActive` and
6
+ `Snaply.isRemoteControlActive` — for anything it would rather not show or do meanwhile.
7
+ * `onLiveView(active)` tells your app when a live view starts and ends, as `onRemoteControl(active)` does for
8
+ remote control.
9
+ * A silent screenshot inside an approval is taken only while the "Screenshots allowed" banner is on screen.
10
+
1
11
  ## 1.0.0
2
12
 
3
13
  The first release on npm. Carries the Snaply Agent iOS SDK 2.55.0 and brings the Android SDK 2.46.0 from Maven
package/README.md CHANGED
@@ -44,6 +44,12 @@ Snaply.reset();
44
44
  // An anonymous caller reads this to the agent:
45
45
  const code = await Snaply.supportCode();
46
46
  Snaply.showSupportCode(); // …or the SDK shows it in its own sheet
47
+
48
+ // Is support watching or controlling the app right now? For anything your app would rather not show or do
49
+ // meanwhile. `onLiveView(active)` and `onRemoteControl(active)` tell you when either starts and ends.
50
+ if (Snaply.isLiveViewActive || Snaply.isRemoteControlActive) {
51
+ // hold it back
52
+ }
47
53
  ```
48
54
 
49
55
  Add the app's identifier (bundle id, package name) to each product's allowed list in the console, or
@@ -29,5 +29,5 @@ android {
29
29
 
30
30
  dependencies {
31
31
  implementation "com.facebook.react:react-android"
32
- api "com.snaplyagent:agent:2.46.0"
32
+ api "com.snaplyagent:agent:2.47.0"
33
33
  }
@@ -64,6 +64,10 @@ class SnaplyAgentModule(reactContext: ReactApplicationContext) : NativeSnaplyAge
64
64
  UiThreadUtil.runOnUiThread { Snaply.stop() }
65
65
  }
66
66
 
67
+ override fun isLiveViewActive(): Boolean = Snaply.isLiveViewActive
68
+
69
+ override fun isRemoteControlActive(): Boolean = Snaply.isRemoteControlActive
70
+
67
71
  private val callbacks = object : SnaplyCallbacks {
68
72
  override fun onRequestShown() = emit("requestShown")
69
73
 
@@ -86,6 +90,8 @@ class SnaplyAgentModule(reactContext: ReactApplicationContext) : NativeSnaplyAge
86
90
  override fun onRemoteControl(active: Boolean) = emit("remoteControl") { putBoolean("active", active) }
87
91
 
88
92
  override fun onLiveEnded(session: LiveSession) = emit("liveEnded") { putString("sessionId", session.sessionId) }
93
+
94
+ override fun onLiveView(active: Boolean) = emit("liveView") { putBoolean("active", active) }
89
95
  }
90
96
 
91
97
  private fun emit(name: String, fields: WritableMap.() -> Unit = {}) {
@@ -8,32 +8,32 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>SnaplyAgent.framework/SnaplyAgent</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64</string>
11
+ <string>ios-arm64_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>SnaplyAgent.framework</string>
14
14
  <key>SupportedArchitectures</key>
15
15
  <array>
16
16
  <string>arm64</string>
17
+ <string>x86_64</string>
17
18
  </array>
18
19
  <key>SupportedPlatform</key>
19
20
  <string>ios</string>
21
+ <key>SupportedPlatformVariant</key>
22
+ <string>simulator</string>
20
23
  </dict>
21
24
  <dict>
22
25
  <key>BinaryPath</key>
23
26
  <string>SnaplyAgent.framework/SnaplyAgent</string>
24
27
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_x86_64-simulator</string>
28
+ <string>ios-arm64</string>
26
29
  <key>LibraryPath</key>
27
30
  <string>SnaplyAgent.framework</string>
28
31
  <key>SupportedArchitectures</key>
29
32
  <array>
30
33
  <string>arm64</string>
31
- <string>x86_64</string>
32
34
  </array>
33
35
  <key>SupportedPlatform</key>
34
36
  <string>ios</string>
35
- <key>SupportedPlatformVariant</key>
36
- <string>simulator</string>
37
37
  </dict>
38
38
  </array>
39
39
  <key>CFBundlePackageType</key>
@@ -17,6 +17,47 @@ import _Concurrency
17
17
  import _StringProcessing
18
18
  import _SwiftConcurrencyShims
19
19
  import os
20
+ public enum CaptureMode : Swift.String, Swift.Codable {
21
+ case askEveryTime
22
+ case perSession
23
+ case liveView
24
+ case wholeScreen
25
+ public init?(rawValue: Swift.String)
26
+ public typealias RawValue = Swift.String
27
+ public var rawValue: Swift.String {
28
+ get
29
+ }
30
+ }
31
+ public struct SnaplyUser {
32
+ public let id: Swift.String
33
+ public let name: Swift.String?
34
+ public init(id: Swift.String, name: Swift.String? = nil)
35
+ }
36
+ public struct CaptureResult : Swift.Codable {
37
+ public let captureId: Swift.String
38
+ public let imageUrl: Swift.String
39
+ public func encode(to encoder: any Swift.Encoder) throws
40
+ public init(from decoder: any Swift.Decoder) throws
41
+ }
42
+ public struct SnaplyError : Swift.Error {
43
+ public let status: Swift.Int
44
+ public let code: Swift.String
45
+ public let message: Swift.String
46
+ }
47
+ public struct LiveSession {
48
+ public let sessionId: Swift.String
49
+ }
50
+ public struct SnaplyCallbacks {
51
+ public var onRequestShown: (() -> Swift.Void)?
52
+ public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
53
+ public var onDenied: (() -> Swift.Void)?
54
+ public var onExpired: (() -> Swift.Void)?
55
+ public var onError: ((any Swift.Error) -> Swift.Void)?
56
+ public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
57
+ public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
58
+ public var onLiveView: ((Swift.Bool) -> Swift.Void)?
59
+ public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
60
+ }
20
61
  public struct SnaplyRedaction {
21
62
  public var color: UIKit.UIColor
22
63
  public var label: Swift.String
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
99
140
  public let value: Swift.String
100
141
  public let label: Swift.String?
101
142
  }
143
+ public enum SnaplyEnvironment {
144
+ case live
145
+ case custom(Foundation.URL, serverKeys: [Swift.String])
146
+ public static let developmentMaster: Swift.String
147
+ public var url: Foundation.URL {
148
+ get
149
+ }
150
+ }
102
151
  public enum Snaply {
103
152
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
104
153
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
105
154
  public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
155
+ public static var isLiveViewActive: Swift.Bool {
156
+ get
157
+ }
158
+ public static var isRemoteControlActive: Swift.Bool {
159
+ get
160
+ }
106
161
  public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
107
162
  @_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
108
163
  public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
@@ -111,58 +166,10 @@ public enum Snaply {
111
166
  public static func showSupportCode()
112
167
  public static func stop()
113
168
  }
114
- public enum CaptureMode : Swift.String, Swift.Codable {
115
- case askEveryTime
116
- case perSession
117
- case liveView
118
- case wholeScreen
119
- public init?(rawValue: Swift.String)
120
- public typealias RawValue = Swift.String
121
- public var rawValue: Swift.String {
122
- get
123
- }
124
- }
125
- public struct SnaplyUser {
126
- public let id: Swift.String
127
- public let name: Swift.String?
128
- public init(id: Swift.String, name: Swift.String? = nil)
129
- }
130
- public struct CaptureResult : Swift.Codable {
131
- public let captureId: Swift.String
132
- public let imageUrl: Swift.String
133
- public func encode(to encoder: any Swift.Encoder) throws
134
- public init(from decoder: any Swift.Decoder) throws
135
- }
136
- public struct SnaplyError : Swift.Error {
137
- public let status: Swift.Int
138
- public let code: Swift.String
139
- public let message: Swift.String
140
- }
141
- public struct LiveSession {
142
- public let sessionId: Swift.String
143
- }
144
- public struct SnaplyCallbacks {
145
- public var onRequestShown: (() -> Swift.Void)?
146
- public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
147
- public var onDenied: (() -> Swift.Void)?
148
- public var onExpired: (() -> Swift.Void)?
149
- public var onError: ((any Swift.Error) -> Swift.Void)?
150
- public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
151
- public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
152
- public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
153
- }
154
- public enum SnaplyEnvironment {
155
- case live
156
- case custom(Foundation.URL, serverKeys: [Swift.String])
157
- public static let developmentMaster: Swift.String
158
- public var url: Foundation.URL {
159
- get
160
- }
161
- }
169
+ extension SnaplyAgent.CaptureMode : Swift.Equatable {}
170
+ extension SnaplyAgent.CaptureMode : Swift.Hashable {}
171
+ extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
162
172
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
163
173
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
164
174
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
165
175
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
166
- extension SnaplyAgent.CaptureMode : Swift.Equatable {}
167
- extension SnaplyAgent.CaptureMode : Swift.Hashable {}
168
- extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
@@ -17,6 +17,47 @@ import _Concurrency
17
17
  import _StringProcessing
18
18
  import _SwiftConcurrencyShims
19
19
  import os
20
+ public enum CaptureMode : Swift.String, Swift.Codable {
21
+ case askEveryTime
22
+ case perSession
23
+ case liveView
24
+ case wholeScreen
25
+ public init?(rawValue: Swift.String)
26
+ public typealias RawValue = Swift.String
27
+ public var rawValue: Swift.String {
28
+ get
29
+ }
30
+ }
31
+ public struct SnaplyUser {
32
+ public let id: Swift.String
33
+ public let name: Swift.String?
34
+ public init(id: Swift.String, name: Swift.String? = nil)
35
+ }
36
+ public struct CaptureResult : Swift.Codable {
37
+ public let captureId: Swift.String
38
+ public let imageUrl: Swift.String
39
+ public func encode(to encoder: any Swift.Encoder) throws
40
+ public init(from decoder: any Swift.Decoder) throws
41
+ }
42
+ public struct SnaplyError : Swift.Error {
43
+ public let status: Swift.Int
44
+ public let code: Swift.String
45
+ public let message: Swift.String
46
+ }
47
+ public struct LiveSession {
48
+ public let sessionId: Swift.String
49
+ }
50
+ public struct SnaplyCallbacks {
51
+ public var onRequestShown: (() -> Swift.Void)?
52
+ public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
53
+ public var onDenied: (() -> Swift.Void)?
54
+ public var onExpired: (() -> Swift.Void)?
55
+ public var onError: ((any Swift.Error) -> Swift.Void)?
56
+ public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
57
+ public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
58
+ public var onLiveView: ((Swift.Bool) -> Swift.Void)?
59
+ public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
60
+ }
20
61
  public struct SnaplyRedaction {
21
62
  public var color: UIKit.UIColor
22
63
  public var label: Swift.String
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
99
140
  public let value: Swift.String
100
141
  public let label: Swift.String?
101
142
  }
143
+ public enum SnaplyEnvironment {
144
+ case live
145
+ case custom(Foundation.URL, serverKeys: [Swift.String])
146
+ public static let developmentMaster: Swift.String
147
+ public var url: Foundation.URL {
148
+ get
149
+ }
150
+ }
102
151
  public enum Snaply {
103
152
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
104
153
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
105
154
  public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
155
+ public static var isLiveViewActive: Swift.Bool {
156
+ get
157
+ }
158
+ public static var isRemoteControlActive: Swift.Bool {
159
+ get
160
+ }
106
161
  public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
107
162
  @_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
108
163
  public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
@@ -111,58 +166,10 @@ public enum Snaply {
111
166
  public static func showSupportCode()
112
167
  public static func stop()
113
168
  }
114
- public enum CaptureMode : Swift.String, Swift.Codable {
115
- case askEveryTime
116
- case perSession
117
- case liveView
118
- case wholeScreen
119
- public init?(rawValue: Swift.String)
120
- public typealias RawValue = Swift.String
121
- public var rawValue: Swift.String {
122
- get
123
- }
124
- }
125
- public struct SnaplyUser {
126
- public let id: Swift.String
127
- public let name: Swift.String?
128
- public init(id: Swift.String, name: Swift.String? = nil)
129
- }
130
- public struct CaptureResult : Swift.Codable {
131
- public let captureId: Swift.String
132
- public let imageUrl: Swift.String
133
- public func encode(to encoder: any Swift.Encoder) throws
134
- public init(from decoder: any Swift.Decoder) throws
135
- }
136
- public struct SnaplyError : Swift.Error {
137
- public let status: Swift.Int
138
- public let code: Swift.String
139
- public let message: Swift.String
140
- }
141
- public struct LiveSession {
142
- public let sessionId: Swift.String
143
- }
144
- public struct SnaplyCallbacks {
145
- public var onRequestShown: (() -> Swift.Void)?
146
- public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
147
- public var onDenied: (() -> Swift.Void)?
148
- public var onExpired: (() -> Swift.Void)?
149
- public var onError: ((any Swift.Error) -> Swift.Void)?
150
- public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
151
- public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
152
- public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
153
- }
154
- public enum SnaplyEnvironment {
155
- case live
156
- case custom(Foundation.URL, serverKeys: [Swift.String])
157
- public static let developmentMaster: Swift.String
158
- public var url: Foundation.URL {
159
- get
160
- }
161
- }
169
+ extension SnaplyAgent.CaptureMode : Swift.Equatable {}
170
+ extension SnaplyAgent.CaptureMode : Swift.Hashable {}
171
+ extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
162
172
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
163
173
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
164
174
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
165
175
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
166
- extension SnaplyAgent.CaptureMode : Swift.Equatable {}
167
- extension SnaplyAgent.CaptureMode : Swift.Hashable {}
168
- extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
@@ -17,6 +17,47 @@ import _Concurrency
17
17
  import _StringProcessing
18
18
  import _SwiftConcurrencyShims
19
19
  import os
20
+ public enum CaptureMode : Swift.String, Swift.Codable {
21
+ case askEveryTime
22
+ case perSession
23
+ case liveView
24
+ case wholeScreen
25
+ public init?(rawValue: Swift.String)
26
+ public typealias RawValue = Swift.String
27
+ public var rawValue: Swift.String {
28
+ get
29
+ }
30
+ }
31
+ public struct SnaplyUser {
32
+ public let id: Swift.String
33
+ public let name: Swift.String?
34
+ public init(id: Swift.String, name: Swift.String? = nil)
35
+ }
36
+ public struct CaptureResult : Swift.Codable {
37
+ public let captureId: Swift.String
38
+ public let imageUrl: Swift.String
39
+ public func encode(to encoder: any Swift.Encoder) throws
40
+ public init(from decoder: any Swift.Decoder) throws
41
+ }
42
+ public struct SnaplyError : Swift.Error {
43
+ public let status: Swift.Int
44
+ public let code: Swift.String
45
+ public let message: Swift.String
46
+ }
47
+ public struct LiveSession {
48
+ public let sessionId: Swift.String
49
+ }
50
+ public struct SnaplyCallbacks {
51
+ public var onRequestShown: (() -> Swift.Void)?
52
+ public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
53
+ public var onDenied: (() -> Swift.Void)?
54
+ public var onExpired: (() -> Swift.Void)?
55
+ public var onError: ((any Swift.Error) -> Swift.Void)?
56
+ public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
57
+ public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
58
+ public var onLiveView: ((Swift.Bool) -> Swift.Void)?
59
+ public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil, onLiveView: ((Swift.Bool) -> Swift.Void)? = nil)
60
+ }
20
61
  public struct SnaplyRedaction {
21
62
  public var color: UIKit.UIColor
22
63
  public var label: Swift.String
@@ -99,10 +140,24 @@ public struct SnaplyRedactionRule {
99
140
  public let value: Swift.String
100
141
  public let label: Swift.String?
101
142
  }
143
+ public enum SnaplyEnvironment {
144
+ case live
145
+ case custom(Foundation.URL, serverKeys: [Swift.String])
146
+ public static let developmentMaster: Swift.String
147
+ public var url: Foundation.URL {
148
+ get
149
+ }
150
+ }
102
151
  public enum Snaply {
103
152
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en") async throws
104
153
  public static func configure(key: Swift.String, environment: SnaplyAgent.SnaplyEnvironment = .live, user: SnaplyAgent.SnaplyUser? = nil, collectVendorId: Swift.Bool = true, language: Swift.String = "en", completion: (((any Swift.Error)?) -> Swift.Void)? = nil)
105
154
  public static func on(_ callbacks: SnaplyAgent.SnaplyCallbacks)
155
+ public static var isLiveViewActive: Swift.Bool {
156
+ get
157
+ }
158
+ public static var isRemoteControlActive: Swift.Bool {
159
+ get
160
+ }
106
161
  public static func setRedactionStyle(_ style: SnaplyAgent.SnaplyRedaction)
107
162
  @_Concurrency.MainActor public static func registerHostedView(_ view: UIKit.UIView, host: (any SnaplyAgent.SnaplyHostedView)?)
108
163
  public static func identify(id: Swift.String, name: Swift.String? = nil, phone: Swift.String? = nil, identitySignature: Swift.String? = nil)
@@ -111,58 +166,10 @@ public enum Snaply {
111
166
  public static func showSupportCode()
112
167
  public static func stop()
113
168
  }
114
- public enum CaptureMode : Swift.String, Swift.Codable {
115
- case askEveryTime
116
- case perSession
117
- case liveView
118
- case wholeScreen
119
- public init?(rawValue: Swift.String)
120
- public typealias RawValue = Swift.String
121
- public var rawValue: Swift.String {
122
- get
123
- }
124
- }
125
- public struct SnaplyUser {
126
- public let id: Swift.String
127
- public let name: Swift.String?
128
- public init(id: Swift.String, name: Swift.String? = nil)
129
- }
130
- public struct CaptureResult : Swift.Codable {
131
- public let captureId: Swift.String
132
- public let imageUrl: Swift.String
133
- public func encode(to encoder: any Swift.Encoder) throws
134
- public init(from decoder: any Swift.Decoder) throws
135
- }
136
- public struct SnaplyError : Swift.Error {
137
- public let status: Swift.Int
138
- public let code: Swift.String
139
- public let message: Swift.String
140
- }
141
- public struct LiveSession {
142
- public let sessionId: Swift.String
143
- }
144
- public struct SnaplyCallbacks {
145
- public var onRequestShown: (() -> Swift.Void)?
146
- public var onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)?
147
- public var onDenied: (() -> Swift.Void)?
148
- public var onExpired: (() -> Swift.Void)?
149
- public var onError: ((any Swift.Error) -> Swift.Void)?
150
- public var onRemoteControl: ((Swift.Bool) -> Swift.Void)?
151
- public var onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)?
152
- public init(onRequestShown: (() -> Swift.Void)? = nil, onAllowed: ((SnaplyAgent.CaptureResult) -> Swift.Void)? = nil, onDenied: (() -> Swift.Void)? = nil, onExpired: (() -> Swift.Void)? = nil, onError: ((any Swift.Error) -> Swift.Void)? = nil, onRemoteControl: ((Swift.Bool) -> Swift.Void)? = nil, onLiveEnded: ((SnaplyAgent.LiveSession) -> Swift.Void)? = nil)
153
- }
154
- public enum SnaplyEnvironment {
155
- case live
156
- case custom(Foundation.URL, serverKeys: [Swift.String])
157
- public static let developmentMaster: Swift.String
158
- public var url: Foundation.URL {
159
- get
160
- }
161
- }
169
+ extension SnaplyAgent.CaptureMode : Swift.Equatable {}
170
+ extension SnaplyAgent.CaptureMode : Swift.Hashable {}
171
+ extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
162
172
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Equatable {}
163
173
  extension SnaplyAgent.SnaplyHostedControlMode : Swift.Hashable {}
164
174
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Equatable {}
165
175
  extension SnaplyAgent.SnaplyHostedInput.Action : Swift.Hashable {}
166
- extension SnaplyAgent.CaptureMode : Swift.Equatable {}
167
- extension SnaplyAgent.CaptureMode : Swift.Hashable {}
168
- extension SnaplyAgent.CaptureMode : Swift.RawRepresentable {}
@@ -10,23 +10,23 @@
10
10
  </data>
11
11
  <key>Info.plist</key>
12
12
  <data>
13
- GVvnobeplYH5BNdtaN9dXAN9NCM=
13
+ HR50EHNp+oxy61UsNCK3Ofzze4o=
14
14
  </data>
15
15
  <key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
16
16
  <data>
17
- f4l/lhzlNCpOenqwCz/bQR6xGLY=
17
+ G8l2tGnl5hJ1Oi80Z03QFWmMhRQ=
18
18
  </data>
19
19
  <key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
20
20
  <data>
21
- naITL3lkhOnlymFnC8vZqccj8PM=
21
+ bmOLNLvHnfAJyhbDRcYbzuTnIBk=
22
22
  </data>
23
23
  <key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
24
24
  <data>
25
- 902PZRvJjBjZXfYFs1V5KhQlBJk=
25
+ o0RrUHqmG43itbFV4uDNVvwHio8=
26
26
  </data>
27
27
  <key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
28
28
  <data>
29
- 2nFI2imgYMIoyB2BGkVr1e7VVd4=
29
+ d0LiN97BuLjHYqL7EHE7Ke1XU9U=
30
30
  </data>
31
31
  <key>Modules/module.modulemap</key>
32
32
  <data>
@@ -77,28 +77,28 @@
77
77
  <dict>
78
78
  <key>hash2</key>
79
79
  <data>
80
- jvjIE2U46nMy28gvSsdmkgJD4MqWL0m6tADgeKbvCCY=
80
+ SWqriQVsx+DCT1LzzQ3WFYwOATmW2Ir/NQG1T68ARk4=
81
81
  </data>
82
82
  </dict>
83
83
  <key>Modules/SnaplyAgent.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
84
84
  <dict>
85
85
  <key>hash2</key>
86
86
  <data>
87
- TVliPC1HlWTWz6PKgQz+d0v7cGiuaq03TNqVag8UqF8=
87
+ aq0Mjq60xMHTcxRRM0ddRS9YIzfrtnI30PUclAwGzwY=
88
88
  </data>
89
89
  </dict>
90
90
  <key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
91
91
  <dict>
92
92
  <key>hash2</key>
93
93
  <data>
94
- x4zAk1psCcwV4HuQBc8nGXuyK3qzhpsJpFB1svaFZZE=
94
+ 5kmpGuJ1CR3Q93I2yxNGtcygKcXei9Kcj4YXqImBi+o=
95
95
  </data>
96
96
  </dict>
97
97
  <key>Modules/SnaplyAgent.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
98
98
  <dict>
99
99
  <key>hash2</key>
100
100
  <data>
101
- aL3Rm77EchbBWWEXFjibPLTP3dcuPioIA2S6NJAvctE=
101
+ 4Q4Ti/W4hddXbjXppLzBth/u8J19fyDN3bPFPYYSTyI=
102
102
  </data>
103
103
  </dict>
104
104
  <key>Modules/module.modulemap</key>
@@ -129,4 +129,14 @@ static BOOL SnaplyRelayTap(UIView *surface, CGPoint point)
129
129
  [SnaplyBridge stop];
130
130
  }
131
131
 
132
+ - (NSNumber *)isLiveViewActive
133
+ {
134
+ return @(SnaplyBridge.isLiveViewActive);
135
+ }
136
+
137
+ - (NSNumber *)isRemoteControlActive
138
+ {
139
+ return @(SnaplyBridge.isRemoteControlActive);
140
+ }
141
+
132
142
  @end
@@ -62,6 +62,10 @@ public final class SnaplyBridge: NSObject {
62
62
  onMain { Snaply.stop() }
63
63
  }
64
64
 
65
+ @objc public static var isLiveViewActive: Bool { Snaply.isLiveViewActive }
66
+
67
+ @objc public static var isRemoteControlActive: Bool { Snaply.isRemoteControlActive }
68
+
65
69
  private static func onMain(_ work: @escaping @MainActor () -> Void) {
66
70
  DispatchQueue.main.async { MainActor.assumeIsolated { work() } }
67
71
  }
@@ -77,7 +81,8 @@ public final class SnaplyBridge: NSObject {
77
81
  send("error", ["code": snaply?.code ?? "error", "message": snaply?.message ?? error.localizedDescription, "status": snaply?.status ?? 0])
78
82
  },
79
83
  onRemoteControl: { active in send("remoteControl", ["active": active]) },
80
- onLiveEnded: { session in send("liveEnded", ["sessionId": session.sessionId]) }
84
+ onLiveEnded: { session in send("liveEnded", ["sessionId": session.sessionId]) },
85
+ onLiveView: { active in send("liveView", ["active": active]) }
81
86
  )
82
87
  }
83
88
 
package/lib/index.d.ts CHANGED
@@ -51,9 +51,13 @@ export type SnaplyCallbacks = {
51
51
  onRemoteControl?: (active: boolean) => void;
52
52
  /** Live view stopped; the argument is the session's id. */
53
53
  onLiveEnded?: (sessionId: string) => void;
54
+ /**
55
+ * Live view started (`true`), once the sharing indicator is on screen, or ended. At the end it comes after
56
+ * `onRemoteControl(false)` and before `onLiveEnded`.
57
+ */
58
+ onLiveView?: (active: boolean) => void;
54
59
  };
55
- /** Snaply Agent. Call `configure` once at app start; nothing else is needed for captures to work. */
56
- export declare const Snaply: {
60
+ declare const methods: {
57
61
  /** Registers this device and connects. */
58
62
  configure(configuration: SnaplyConfiguration): Promise<void>;
59
63
  /** Observe SDK events. Attach before `configure`: a request can arrive as soon as the device registers. */
@@ -69,3 +73,14 @@ export declare const Snaply: {
69
73
  /** Disconnects and removes any visible prompt. */
70
74
  stop(): void;
71
75
  };
76
+ type SnaplyAnswers = {
77
+ /**
78
+ * True while the person is sharing this app's screen with support: from their "Start sharing" until the live
79
+ * view has ended. For anything your app would rather not show or do while support watches.
80
+ */
81
+ readonly isLiveViewActive: boolean;
82
+ /** True while support is controlling the app. Never true outside a live view. */
83
+ readonly isRemoteControlActive: boolean;
84
+ };
85
+ /** Snaply Agent. Call `configure` once at app start; nothing else is needed for captures to work. */
86
+ export declare const Snaply: typeof methods & SnaplyAnswers;
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- var v=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var T=(x,W)=>{for(var c in W)v(x,c,{get:W[c],enumerable:!0})},H=(x,W,c,d)=>{if(W&&typeof W=="object"||typeof W=="function")for(let o of V(W))!K.call(x,o)&&o!==c&&v(x,o,{get:()=>W[o],enumerable:!(d=N(W,o))||d.enumerable});return x};var D=x=>H(v({},"__esModule",{value:!0}),x);var X={};T(X,{SNAPLY_REDACT_MARK:()=>p,Snaply:()=>E,SnaplyDevelopmentMaster:()=>F,SnaplyError:()=>L,SnaplyRedact:()=>B});module.exports=D(X);var R=require("react-native"),G=require("react-native"),g=require("react/jsx-runtime");(function(x,W){function c(r,f){return u(f- -218,r)}function d(r,f){return u(f- -984,r)}for(var o=x();;)try{var a=parseInt(c("@PJ[",331))/1+-parseInt(c("UdiL",265))/2+parseInt(d("uVEr",-464))/3+parseInt(d("si))",-457))/4+parseInt(c("L5(P",268))/5+-parseInt(c("o^jV",314))/6*(-parseInt(d("wKSQ",-532))/7)+-parseInt(d("($$8",-484))/8;if(a===W)break;o.push(o.shift())}catch{o.push(o.shift())}})(Q,477281+-49*3207+-66908);function u(x,W){x=x-(4184+-3234*3+5964);var c=Q(),d=c[x];if(u.CTqUkt===void 0){var o=function(i){for(var S="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",e="",C="",m=0,s,n,l=0;n=i.charAt(l++);~n&&(s=m%4?s*64+n:n,m++%4)?e+=String.fromCharCode(255&s>>(-2*m&6)):0)n=S.indexOf(n);for(var h=0,q=e.length;h<q;h++)C+="%"+("00"+e.charCodeAt(h).toString(16)).slice(-2);return decodeURIComponent(C)},a=function(i,S){var e=[],C=0,m,s="";i=o(i);var n;for(n=0;n<256;n++)e[n]=n;for(n=0;n<256;n++)C=(C+e[n]+S.charCodeAt(n%S.length))%256,m=e[n],e[n]=e[C],e[C]=m;n=0,C=0;for(var l=0;l<i.length;l++)n=(n+1)%256,C=(C+e[n])%256,m=e[n],e[n]=e[C],e[C]=m,s+=String.fromCharCode(i.charCodeAt(l)^e[(e[n]+e[C])%256]);return s};u.LiTMIw=a,u.OvKglk={},u.CTqUkt=!0}var r=c[-1145+-2529*-2+-3913];u.BtxPeO!==r&&(u.OvKglk={},u.BtxPeO=r);var f=u.OvKglk[x];return f===void 0?(u.GNzLjm===void 0&&(u.GNzLjm=!0),d=u.LiTMIw(d,W),u.OvKglk[x]=d):d=f,d}var A=Object[k(1168,"o^jV")],y=(x,W,c)=>W in x?A(x,W,{[t(-142,"R!4h")]:!0,[k(1224,"qoZQ")]:!0,[k(1265,"si))")]:!0,[t(-87,"uVEr")]:c}):x[W]=c,O=(x,W,c)=>y(x,typeof W!==t(-93,"nm9b")?W+"":W,c);function Q(){var x=["mCk2WPjqWOFdPCoGWQuUq8kJ","W5ldOCoiWOhcMG","WR/dSJP0","W6dcI8kyAa","WPfvWPnyW40","fSk1mCoEomoyWPZdGa","Amo2fZe","W4u2jmknW6BdJuJdMW","WOddHSkeW5K","aHldImkr","W6aDWOxdLvpcP37cICoLohmEW6S","D8o8WQr/WPS","W6pdGCoUauzp","WRtcUdW7mq","kCklhSoIjq","DCoJW5CnW4u","W4xcH8oGg8oCgmoLW77cGLZcG8kTca","WPpcNCkLpSop","cSkRnColfmoJWOJdGW","W7Hbmd3dVq","cSkImCocbCoFWO7dLNX1aSkpzCkVWOJdNxO","AL1eD0z/WQNdRSo7cmkt","vSo3WPTXWQq","W7VcSCkSzJG","dqLFESk3W7xdNmk/WP15W51BWPW","wwZdIbhcQ8kdcIlcTSonma","W5vHW4TDarFdICkei8k5uSkg","W6pcJ8kgFSomxhu","fMFdJCk3W41ADmkCWOHyW6m","W5zNW5bCla","W5FdI8k0mSkcWPtcUJfx","F8o8acbHtW","e3JdTe1z","as01qCk+y2ehf8oCW4LQWPm","W5yBwd9rACoLfmkzWRS","B1TdEuqDWRxdISoYgmkelG","teKmoSoXWRu","W6hcHmkXAmoduNuy","WPxcNmoXD8osW4RdP059W7tdRKtcUSkA","W5auxszbACoHp8kr","W73cVXitWOenrmkxnCkkEa","cgOlW5JdT8o+j8k8W7VcOM1jB8oxW5m","W5SYo8kFW7BdN1VdRttdNvxdUq","bgiWd8k9lgy0qmozWQK","WPxcP8kFamofW5/dJgldVKHE","WQxdRW1JW63cRColW6VdKmkrWP7dQcpcKG","b8kJoSoffmos","aHldGSkxgCo8","WOxcUmkFbCoq","W63cPqWfWOCyrCkMo8kmCCkY","z8kkDSolzmoqWOldSa","d3xcRvZcJSkm","oCkHrZtdUSoRirjZ","W5HLWR1lvG","W7pdNCkAgmkUW6BdGCofqq","W7dcUmkhCrOGW4e","W7VcJCkPu1WlWP1eW6SnFCoYWOBdULC","W4NcJ8kbzCoR","WQtdOI9CFCk9W7/cNSotW4FdPuJdUq","mCkarmknW7e","WRNdPc1WW7NcQSoLW73dNCkX","WQVcP8kXtGK/W6m","agddJ8kOW5a","W4TvW6TR","mqxdIJtdLXNdKCkl","as4XrSk/y2qgc8ocW59YWQa","z8knC8olzCobWPpdImkiD8oXgX92nW","WQhdPcy","egJcUK3cVSkrWPJdQsG","hG3cVNnC","BHVdQHBdKqJdSa","uCoHWO1M","ACoNW4Kn","WPBdISkBW4ddLmkDFa","FSodWQP4WPC","W7JcL8koBgm","W7nhWP18CMTyBNu","abhdGmkBd8oTqq","W50YoCkEW5RdQa","BSo3bt1AzmkhoSo2yd0","WOn1W5LUWQeQW4NdLe/dSMmEW4jDDW","WPxdPmkHW4FdTG","zmoUW40eW5xdG8oRWOW","WOtdISk/tCkarW","W5fRW5f7dGu","W4FdR8kIaSkS","WOddNmkkW5NdISkbnCoweCo+WR4uWRa","W7NcT24WWQJdRSoCW7VdR8kRWPtdLW","W6/cQrykWPGA","W6pcShuBkG","r2XQb8oTmJOT","zSoqWO5FW6eeWQGZWO8GWQdcI00MWPxdPe/cSI44WRruWQ7cPCo2dh/cVx3cICkpW4OKWRJdK8knBmolW4pdTr5pWPPBE3mVW7BcHSkosbTPlWTLrmkdh8oKvSkfWOtcQKzTWQ7cGHpdV0DiaGldRXarWOHjdGmwW6qRW50ana","W63cQ8kqtSoQ","W7BcVNCijSoPWR3cO8ot","uKPkiSoG","vmo6WOD6WRu","W4/dH8oQWOi","WPFcV8kvlCoI","W51QW7PQhr7dLa","xhWidCod","h8kdpSou","W77dS07cQIZcO1nI","e8kcfSoyW59nymk1sCkjWPm","fttcLKvvDSk9xq","WQ/dLaLuW7C","eGNdJCkadCo7","WQixW5O6nYOkrgNcPCoEbCov","EgFdHa7cS8kFdd/cQSowmeul","W7BdPmk2eCka","WQ/dRmodmeT0WPnqe2LHv8o6","qe/dOY/cKW","eJJcMKC","patdItpdJrxdP8kaWOpdUuqUwLW","vmoceCktWP0","WR/dULbwW51maSkAi8kjxSkaWOC","WPxcP8kDcSonW4JdINhdUq","AvpcMwZcMKhcHmoeWQldNgiBt0C","l2/cRvJcL8kgWR3dQYNcKmog","nGddGJ8"];return Q=function(){return x},Q()}var b=R.TurboModuleRegistry[k(1201,"&@za")](t(-178,"Mr&W"));function t(x,W){return u(x- -638,W)}var p=k(1261,"Yg1l");function B({[k(1257,"*i$S")]:x,[k(1253,"LPLV")]:W,...c}){function d(a,r){return t(r-1156,a)}function o(a,r){return t(r-1581,a)}return(0,g.jsx)(G.View,{...c,[d("kSWA",1024)]:!1,[o("0D]i",1436)]:W?""[o("&@za",1489)](p,"-")[d("[op7",1027)](W):p,[o("r^D0",1455)]:x})}var L=class extends Error{constructor(x,W,c=-12*803+-6113+15749){function d(i,S){return t(i-415,S)}var o={SnLkK:d(282,"si))"),awfAF:r("2Vh)",453),fVJnP:function(i,S,e){return i(S,e)},BJaLo:d(251,"S^v["),flXdC:function(i,S,e){return i(S,e)},prHHl:r("[op7",437)},a=o[d(250,"QZ)I")][r("kSWA",476)]("|");function r(i,S){return t(S-604,i)}for(var f=-15322+-47*-326;;){switch(a[f++]){case"0":this[r("TQaE",431)]=o[r("kSWA",525)];continue;case"1":o[d(320,"Yg1l")](O,this,o[r("HWyq",487)]);continue;case"2":this[d(335,"d$h8")]=x;continue;case"3":o[d(262,"wKSQ")](O,this,o[r("mLe[",503)]);continue;case"4":super(W);continue;case"5":this[r("[op7",414)]=c;continue}break}}},F=k(1266,"QZ)I"),P={},J=!1;function k(x,W){return u(x-713,W)}function I(){if(J)return;J=!0;function x(W,c){return k(W- -1469,c)}b[x(-284,"np!X")](z)}function z(x){var W={};W[c("eo5D",907)]=d(1448,"LPLV");function c(r,f){return k(f- -282,r)}W[c("rI08",906)]=d(1452,"eo5D"),W[c("10#r",962)]=d(1479,"Yg1l");function d(r,f){return k(r-231,f)}W[d(1505,"L5(P")]=d(1438,"5&dT"),W[d(1435,"&@za")]=d(1394,"2Vh)"),W[c("@PJ[",878)]=function(r,f){return r===f},W[c("Cfk*",882)]=c("Mr&W",961);var o=W;switch(x[c("10#r",885)]){case o[d(1397,"2Vh)")]:P[c("@PJ[",938)]?.();break;case c("[op7",970):var a={};a[d(1445,"R!4h")]=x[c("H8Ss",969)]??"",a[c("eo5D",911)]=x[c("10#r",877)]??"",P[d(1460,"Cfk*")]?.(a);break;case o[d(1480,"QZ)I")]:P[d(1443,"TQaE")]?.();break;case o[d(1500,"si))")]:P[d(1458,"iIr^")]?.();break;case o[d(1491,"($$8")]:P[d(1504,"&@za")]?.(new L(x[d(1506,"^X2F")]??o[d(1498,"TQaE")],x[d(1433,"TQaE")]??"",x[c("Mr&W",944)]??-5329*1+6364+-1035));break;case o[c("gCKK",887)]:P[c("2LNv",973)]?.(o[c("kSWA",910)](x[d(1494,"qoZQ")],!0));break;case o[c("4opj",897)]:P[c("^X2F",995)]?.(x[d(1436,"($$8")]??"");break}}var E={async[t(-180,"kSWA")](x){function W(o,a){return t(a-216,o)}function c(o,a){return t(o-965,a)}var d={RSrGA:function(o){return o()},HCPCQ:c(790,"e2qs")};d[W("6$NN",59)](I);try{await b[W("uVEr",133)](x[W("@PJ[",107)],x[c(868,"0D]i")]??null,x[W("@PJ[",42)]?.id??null,x[W("QZ)I",111)]?.[W("o^jV",39)]??null,x[c(855,"r^D0")]??!0,x[c(796,"LPLV")]??"en",x[c(849,"@PJ[")]??[])}catch(o){let a=o;throw new L(a[W("0D]i",46)]??c(851,"dXGk"),a[c(844,"wKSQ")]??d[W("H8Ss",93)],a[c(794,"eo5D")]?.[c(825,"L5(P")]??-13*-275+280+-3855)}},on(x){var W={GethF:function(d){return d()}};P=x;function c(d,o){return t(o-1377,d)}W[c("TQaE",1258)](I)},[t(-112,"o^jV")](x){function W(d,o){return k(d- -103,o)}function c(d,o){return k(o- -523,d)}b[W(1173,"vb(6")](x.id,x[W(1144,"*i$S")]??null,x[W(1167,"QZ)I")]??null,x[W(1092,"eo5D")]??null)},[k(1190,"*i$S")](){function x(W,c){return t(W-533,c)}b[x(379,"QZ)I")]()},[t(-136,"qoZQ")](){function x(W,c){return t(c- -151,W)}return b[x("dXGk",-299)]()},[k(1231,"mLe[")](){function x(W,c){return k(W- -326,c)}b[x(890,"d!&)")]()},[t(-168,"Yg1l")](){function x(W,c){return k(W- -1179,c)}b[x(59,"$C4r")]()}};
1
+ var p=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var N=(W,c)=>{for(var x in c)p(W,x,{get:c[x],enumerable:!0})},L=(W,c,x,d)=>{if(c&&typeof c=="object"||typeof c=="function")for(let e of j(c))!y.call(W,e)&&e!==x&&p(W,e,{get:()=>c[e],enumerable:!(d=g(c,e))||d.enumerable});return W};var M=W=>L(p({},"__esModule",{value:!0}),W);var z={};N(z,{SNAPLY_REDACT_MARK:()=>h,Snaply:()=>Z,SnaplyDevelopmentMaster:()=>D,SnaplyError:()=>P,SnaplyRedact:()=>B});module.exports=M(z);var q=require("react-native"),G=require("react-native"),w=require("react/jsx-runtime");(function(W,c){function x(t,k){return u(k- -117,t)}function d(t,k){return u(t-918,k)}for(var e=W();;)try{var o=parseInt(d(1067,"XIfR"))/1*(-parseInt(x(")UzL",85))/2)+-parseInt(d(1159,"ej$@"))/3*(parseInt(d(1083,"E@&4"))/4)+-parseInt(d(1171,"Zmp5"))/5+-parseInt(x("hcMi",97))/6*(-parseInt(x("wHVW",114))/7)+parseInt(x("3[)j",27))/8*(parseInt(d(1131,"kztY"))/9)+parseInt(x("5SIu",8))/10+parseInt(d(1123,")UzL"))/11*(parseInt(d(1169,"d4h#"))/12);if(o===c)break;e.push(e.shift())}catch{e.push(e.shift())}})(l,4099*-49+-16698+626045);var K=Object[n(579,"F%3R")],F=(W,c,x)=>c in W?K(W,c,{[f(-751,"Aekr")]:!0,[f(-790,"F%3R")]:!0,[n(664,"hcMi")]:!0,[f(-719,"EXjs")]:x}):W[c]=x,v=(W,c,x)=>F(W,typeof c!==f(-820,"NCvj")?c+"":c,x);function f(W,c){return u(W- -967,c)}var s=q.TurboModuleRegistry[n(700,"giQH")](n(583,"eU[W")),h=f(-835,"5SIu");function B({[f(-828,"AB^0")]:W,[n(638,"r)h!")]:c,...x}){function d(o,t){return n(o- -379,t)}function e(o,t){return n(t- -41,o)}return(0,w.jsx)(G.View,{...x,[e("HTc5",573)]:!1,[d(243,"ej$@")]:c?""[d(333,"]3n5")](h,"-")[d(251,"XIfR")](c):h,[e("7q7)",637)]:W})}function l(){var W=["WRBdISkmmua","aMLPpfRdSxBcMSkjkMBdRgzHWPtdMgtcV8o4wfu","sSkAW4ufWOu","wx8mzSktCGuwWOLipW","B0jDBmonmCotDSkqWPNcJ8ktWPO","DhVdJCoXgJ0jWOj2WOddHa","WRddQmkvW7tcNXVdPSoNw8opW5u","kSoyx8k5w0xdGfVdOGG","W5P0W7xdOmoaWQxcSgRcTmoJW7ldJCoYfSoJWPO","WPpcQSkqfSkfqMa","smoAWOHIWPNdMwDgW5Sh","ywpdSLCqWRVdNG","iIyGACkRW5pdQmktWOe2WReFWOvLdSks","W5bVW5ddPCosWRlcG20","vmoZWQqMWRy","amkWW6rTxJS","EatdRSkHm8kHbSoGW7G","zmorWRqb","sgJdU1eN","rCo+WPSAEvddM8oDl8ouWOTZW5e","lSovxSk9sfi","BG/cGfRdTSkcW4fIwG8","wh0ofmo9vZ8VWO0","xJGlAXL3W7O1W5iS","WPRdOaJdVYyu","zxxdK0eCWRpdJYldICkcWPrWWPKQWOyduI4Sdci","W4KdpCkNs8o7ESo5ACoJW4ZcSSo7WOFcSW","f8kGW7P0vc3dG1BcS2eF","zmoFWQaqWQtdMWWxva","iCoxr8kX","qvb7","WPPAW6/dMmou","W6dcSCovWQtcLYBdNCogrSoa","WOnuwLhcNCoUjr9+ebfZWO4","aL3dVSkil8kDad8fW60","nv7cJSk2sHb3e8oaWPjBWRG","fqC6WOK7af1wF8oIWRLSaq","cSoHqCk6xa","W4arcbO","eSk0W6zXxG","lCo+WO5dW5C","WRbmW43dOmoS","wsicA0BdJMxcHSkgka","W7BcNqPkpmktWOlcSSoiW5lcPa","WRauW65WWRxcKbm0sgZcNJei","W6XiWOKLW6ddJ1CFFLFcHH8kW60D","WONdUxCfW4i3","eLFdOSkDk8kB","AX5bgYO","WQjJt8k/W6naDSkMwa","esS5m2GJtNxcGK7cLW","WQxdH8k7gvVcP8kbWP8SqJ7cKr/dMa","ESkiW4ZdLq","W705WPTVWROrW64glmozCrxcKa","DmokWReqWQtdMG","n8kklCoEsmkFW65HluDI","WQjIW40XW6X2WQW/","bsz5lCoBscqJWP4","arddINJcSa","W6bkW43dI8or","WRHHW40MW6vAW7mHpSoSxIFcQG","iJ7cJ8kTua","cmknoSolyCkiW4TJla","WQJdHSk4hKhcQ8k3WPq","cmkyW41CFq","WQ3dTSofW4NdSrbV","W6bjWR8L","W5ykbatdISkUCcq","WONcT8kWfG","gSkIi8kFW50","W4iqp8okWPxcNfClnq","dHZdOu3cNmkDaSkf","WPdcGWRdVmolW4DQla","W5vqWRhdI8kK","EatdO8kKkCkRnmoRW7JdPSk6","WPNcKSkacwNdOq","BCkQW5eHW4yTzCkAW5WHoXNdGSoRhZHhW5lcNmoyWOddVK/dQCozWOldSSk3gxpdLSkvW57dMSokfmo0BSoXpbFcGSoFWQiLWORcTSkVkgnRb8kGW7DZW70bW5VdRSk+lSoHW75iEJddGCklWQaLvmkblCofDrhdHSkKW5z3WOWOW6pcScPFAa","W4JdTCoJxmopg33cLwldKqBcGq","jcpcKCkUrW0UWOrGWPVdLvxcImkbWQm","mLZdKW3dUmk5W6bxCqCKWPn6xeCQwW","W4ywaHG","rCoZWRfzWOy","jcpcMCkN","bLddNCk/pW","WRVdP8koW7G","WQ7dJmkohLtcSSk9WPqgrd7cJr8","zmorWRWiWRddMrO/uHz7","r1LJW5z0vqK","DSoWz8o4WQC","eXi2FCo5iNSg","WPVcOCkH","WQRcHmkjW7qY","ggPxmem","omokWPxcLwRdQSosmmklW5a","WQhdO8kqW6NcPda","yWq7sIu","W7uZcCoZWQ4eFmkcvCoXivm","fau+WO83b1PGw8oGWObxgq","W5Omkq3dGmk1Cc4","eCo+WRHIW5qYW40X","frtdS0/cJq","W7NdPYFdISo6","WP/cQ8k7b8kwwq","CCkXW5RdIKi","f8krpmoEs8kuW5Tfj01Z","WQldJCkZfLZcPCkKWP8IudFcHG","k8o0WRX8W4WIW646y0Sc","WOxdU8kzpge","WQldJCkZfLZcPCkKWP8M","BmoBWQK","WRZdQ8ogW5tdIJe","wcX0jSoJrtm","W5z0WPmQW7G","wSkBW5iyWR4lBmkI","WOddPYxdOIucWRBdUerLkMFdKHpdHre","FSkahmoKr2/dH0hdHdK","bszUmmoAvdm1WO5UiSoXbfS","WO7cOCkKeCksxMBcQ2pdRYFcIG","dZPooSoz","DhT/mSk0W6BdN8kyWQiR","W4VcU34lW58jW50g","tSklW4mdWOea","W5yMfCkixG","WRldLSk8bedcSq","o8k+k8kfW7K","FvqunSkzaXfDxq","W5z6WQtdJmkPWRldHa","WQ1MW5JdP8oPW6RdQSoOW7O","WRNdP8knW7RcMbxdR8oV","W5XPW7xdOmoaWQxcSgRcTmoJ","W7nMD8k4W55wDG","yMFdRee","i1n2due","W7uWcCoYWQDcz8kEv8orbG","ESkuW4ZdKKddH8oeomkUW7zgW6LbqCkU","WQBdR8oyW4u","md7cLmk2qWW2WRC"];return l=function(){return W},l()}var P=class extends Error{constructor(W,c,x=710*2+1957+-3377){var d={rtAWj:k(-87,"ZSg@"),URHju:function(i,S,a){return i(S,a)},faJRI:function(i,S,a){return i(S,a)},UdSOw:k(-55,"hcMi")};function e(i,S){return n(S- -78,i)}var o=d[k(-49,"wLS!")][e("d4h#",542)]("|"),t=1*7415+828+8243*-1;function k(i,S){return n(i- -665,S)}for(;;){switch(o[t++]){case"0":this[k(-71,"Zmp5")]=W;continue;case"1":this[k(-6,"yp0t")]=k(-31,"N$l@");continue;case"2":super(c);continue;case"3":this[e("PA1A",633)]=x;continue;case"4":d[k(-25,"Zmp5")](v,this,k(-83,"HTc5"));continue;case"5":d[e("xsaD",508)](v,this,d[e("N$l@",627)]);continue}break}}},D=n(604,"jaW!"),m={},Q=!1;function H(){if(Q)return;function W(c,x){return f(c-1503,x)}Q=!0,s[W(693,"F%3R")](V)}function V(W){var c={};c[d(385,"*Q)r")]=x(-695,"XIfR");function x(t,k){return f(t-83,k)}c[d(458,"o49w")]=d(377,"4@IG"),c[x(-657,"yp0t")]=d(442,"EXjs"),c[d(412,"6jkT")]=x(-747,"r)h!");function d(t,k){return f(t-1185,k)}c[x(-634,"o49w")]=d(408,"wHVW"),c[d(427,"F%3R")]=d(352,"eU[W"),c[d(349,"7q7)")]=d(379,"aMDO"),c[d(475,"ZSg@")]=function(t,k){return t===k};var e=c;switch(W[x(-728,"ej$@")]){case e[x(-711,"3[)j")]:m[d(406,"wHVW")]?.();break;case e[x(-705,"F%3R")]:var o={};o[d(339,")UzL")]=W[d(455,"HTc5")]??"",o[d(361,"xsaD")]=W[x(-756,"5SIu")]??"",m[x(-659,"OeUO")]?.(o);break;case e[d(359,"6)b4")]:m[d(388,"AB^0")]?.();break;case e[x(-748,"EXjs")]:m[x(-755,"wHVW")]?.();break;case e[x(-739,"68KA")]:m[x(-666,"XIfR")]?.(new P(W[d(372,"hcMi")]??x(-673,"jaW!"),W[x(-664,"yp0t")]??"",W[x(-689,"F%3R")]??-900+18*349+-5382));break;case d(446,"B&O7"):m[x(-630,"Zmp5")]?.(W[d(447,"Aekr")]===!0);break;case e[x(-729,"]3n5")]:m[d(364,"OeUO")]?.(W[d(417,"o49w")]??"");break;case e[x(-661,"HTc5")]:m[x(-683,"7q7)")]?.(e[d(422,"d4h#")](W[x(-691,"jaW!")],!0));break}}function u(W,c){W=W-121;var x=l(),d=x[W];if(u.BUbCkp===void 0){var e=function(i){for(var S="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",a="",b="",R=0,C,r,O=0;r=i.charAt(O++);~r&&(C=R%4?C*64+r:r,R++%4)?a+=String.fromCharCode(255&C>>(-2*R&6)):0)r=S.indexOf(r);for(var I=0,J=a.length;I<J;I++)b+="%"+("00"+a.charCodeAt(I).toString(16)).slice(-2);return decodeURIComponent(b)},o=function(i,S){var a=[],b=0,R,C="";i=e(i);var r;for(r=0;r<256;r++)a[r]=r;for(r=0;r<256;r++)b=(b+a[r]+S.charCodeAt(r%S.length))%256,R=a[r],a[r]=a[b],a[b]=R;r=0,b=0;for(var O=0;O<i.length;O++)r=(r+1)%256,b=(b+a[r])%256,R=a[r],a[r]=a[b],a[b]=R,C+=String.fromCharCode(i.charCodeAt(O)^a[(a[r]+a[b])%256]);return C};u.ekWmrk=o,u.beIoyi={},u.BUbCkp=!0}var t=x[-4972+-1*-5231+-259];u.UNnddA!==t&&(u.beIoyi={},u.UNnddA=t);var k=u.beIoyi[W];return k===void 0?(u.RIDtsg===void 0&&(u.RIDtsg=!0),d=u.ekWmrk(d,c),u.beIoyi[W]=d):d=k,d}function n(W,c){return u(W-456,c)}var X={async[n(598,"A!ZI")](W){function c(e,o){return f(o-1456,e)}function x(e,o){return f(o-642,e)}var d={xMyoQ:function(e){return e()},hGLVz:c("hcMi",622)};d[x("E@&4",-150)](H);try{await s[x("F%3R",-145)](W[x("HTc5",-144)],W[x("ej$@",-110)]??null,W[x("AB^0",-78)]?.id??null,W[x("XIfR",-185)]?.[x("Aekr",-87)]??null,W[c("hcMi",639)]??!0,W[c("ej$@",689)]??"en",W[c("]3n5",732)]??[])}catch(e){let o=e;throw new P(o[c("HTc5",715)]??x("6)b4",-129),o[c("68KA",687)]??d[c("mfxV",642)],o[c("jaW!",674)]?.[x("xhuH",-92)]??2*-3106+6*-903+11630*1)}},on(W){var c={EWknb:function(d){return d()}};m=W;function x(d,e){return f(e-591,d)}c[x("Aekr",-130)](H)},[f(-796,"N$l@")](W){function c(d,e){return n(d- -399,e)}function x(d,e){return n(d- -978,e)}s[x(-387,"F%3R")](W.id,W[x(-315,"r)h!")]??null,W[c(220,"fP]U")]??null,W[x(-371,"IKTm")]??null)},[f(-795,"xsaD")](){function W(c,x){return f(x-1471,c)}s[W("xsaD",676)]()},[n(692,"EXjs")](){function W(c,x){return n(c- -25,x)}return s[W(607,"eU[W")]()},[f(-732,"6jkT")](){function W(c,x){return n(c- -1356,x)}s[W(-694,"E@&4")]()},[f(-843,"E@&4")](){function W(c,x){return n(x- -1132,c)}s[W("AB^0",-524)]()}},Z=Object[n(677,"3ypI")](X,{[n(673,"7q7)")]:{[f(-748,"mfxV")]:!0,[f(-728,"4@IG")]:()=>s[n(642,"xhuH")]()},[n(690,"yp0t")]:{[n(688,"*Q)r")]:!0,[n(618,"XIfR")]:()=>s[n(666,"d4h#")]()}});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snaplyagent/react-native",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Snaply Agent for React Native — consent-first screen capture for support teams: screenshots, live view and remote control, with on-device redaction.",
5
5
  "main": "lib/index.js",
6
6
  "react-native": "lib/index.js",
@@ -33,6 +33,8 @@ export interface Spec extends TurboModule {
33
33
  supportCode(): Promise<string | null>;
34
34
  showSupportCode(): void;
35
35
  stop(): void;
36
+ isLiveViewActive(): boolean;
37
+ isRemoteControlActive(): boolean;
36
38
  readonly onSnaplyEvent: CodegenTypes.EventEmitter<SnaplyNativeEvent>;
37
39
  }
38
40