@multiplayer-app/session-recorder-react-native 1.0.1-beta.6 → 1.0.1-beta.8
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/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeModule.kt +2 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativePackage.kt +1 -1
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeSpec.kt +79 -0
- package/lib/module/SessionRecorderNativeSpec.js +2 -2
- package/lib/module/SessionRecorderNativeSpec.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts +1 -2
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/SessionRecorderNativeSpec.ts +3 -4
- package/src/index.ts +3 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
1
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
2
2
|
</manifest>
|
|
@@ -15,6 +15,7 @@ import android.webkit.WebView
|
|
|
15
15
|
import android.widget.*
|
|
16
16
|
import com.facebook.react.bridge.*
|
|
17
17
|
import com.facebook.react.modules.core.DeviceEventManagerModule
|
|
18
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
18
19
|
import com.sessionrecordernative.util.ViewUtils
|
|
19
20
|
import java.io.ByteArrayOutputStream
|
|
20
21
|
import java.util.concurrent.CountDownLatch
|
|
@@ -24,7 +25,7 @@ import com.facebook.react.module.annotations.ReactModule
|
|
|
24
25
|
|
|
25
26
|
@ReactModule(name = SessionRecorderNativeModule.NAME)
|
|
26
27
|
class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
27
|
-
|
|
28
|
+
ReactContextBaseJavaModule(reactContext) {
|
|
28
29
|
|
|
29
30
|
override fun getName(): String {
|
|
30
31
|
return NAME
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
package com.multiplayer.sessionrecordernative
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
+
import com.facebook.react.bridge.ReactMethod
|
|
6
|
+
import com.facebook.react.bridge.Promise
|
|
7
|
+
import com.facebook.react.bridge.Callback
|
|
8
|
+
import com.facebook.react.bridge.ReadableMap
|
|
9
|
+
import com.facebook.react.bridge.Arguments
|
|
10
|
+
import com.facebook.react.bridge.WritableMap
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Spec class for SessionRecorderNative TurboModule
|
|
14
|
+
* This class defines the interface that React Native expects for TurboModules
|
|
15
|
+
*/
|
|
16
|
+
class SessionRecorderNativeSpec(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) {
|
|
17
|
+
|
|
18
|
+
override fun getName(): String {
|
|
19
|
+
return NAME
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
companion object {
|
|
23
|
+
const val NAME = "SessionRecorderNative"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Delegate to the actual implementation
|
|
27
|
+
private val implementation = SessionRecorderNativeModule(reactContext)
|
|
28
|
+
|
|
29
|
+
@ReactMethod
|
|
30
|
+
fun captureAndMask(promise: Promise) {
|
|
31
|
+
implementation.captureAndMask(promise)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@ReactMethod
|
|
35
|
+
fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise) {
|
|
36
|
+
implementation.captureAndMaskWithOptions(options, promise)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@ReactMethod
|
|
40
|
+
fun startGestureRecording(promise: Promise) {
|
|
41
|
+
implementation.startGestureRecording(promise)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@ReactMethod
|
|
45
|
+
fun stopGestureRecording(promise: Promise) {
|
|
46
|
+
implementation.stopGestureRecording(promise)
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@ReactMethod
|
|
50
|
+
fun isGestureRecordingActive(promise: Promise) {
|
|
51
|
+
implementation.isGestureRecordingActive(promise)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@ReactMethod
|
|
55
|
+
fun setGestureCallback(callback: Callback) {
|
|
56
|
+
implementation.setGestureCallback(callback)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@ReactMethod
|
|
60
|
+
fun recordGesture(
|
|
61
|
+
gestureType: String,
|
|
62
|
+
x: Double,
|
|
63
|
+
y: Double,
|
|
64
|
+
target: String?,
|
|
65
|
+
metadata: ReadableMap?
|
|
66
|
+
) {
|
|
67
|
+
implementation.recordGesture(gestureType, x, y, target, metadata)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@ReactMethod
|
|
71
|
+
fun addListener(eventName: String) {
|
|
72
|
+
implementation.addListener(eventName)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@ReactMethod
|
|
76
|
+
fun removeListeners(count: Int) {
|
|
77
|
+
implementation.removeListeners(count)
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
export default
|
|
3
|
+
import { NativeModules } from 'react-native';
|
|
4
|
+
export default NativeModules.SessionRecorderNative;
|
|
5
5
|
//# sourceMappingURL=SessionRecorderNativeSpec.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["NativeModules","SessionRecorderNative"],"sourceRoot":"../../src","sources":["SessionRecorderNativeSpec.ts"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,cAAc;AAmD5C,eAAeA,aAAa,CAACC,qBAAqB","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -6,6 +6,9 @@ export * from '@multiplayer-app/session-recorder-common';
|
|
|
6
6
|
export * from "./context/SessionRecorderContext.js";
|
|
7
7
|
export * from "./context/useSessionRecorderStore.js";
|
|
8
8
|
|
|
9
|
+
// Export TurboModule spec for codegen
|
|
10
|
+
export * from "./SessionRecorderNativeSpec.js";
|
|
11
|
+
|
|
9
12
|
// Export the class for type checking
|
|
10
13
|
export { SessionRecorder };
|
|
11
14
|
// Export the instance as default
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SessionRecorder"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAO,kBAAS;AAChB,OAAOA,eAAe,MAAM,uBAAoB;AAChD,cAAc,0CAA0C;AACxD,cAAc,qCAAkC;AAChD,cAAc,sCAAmC;;AAEjD;AACA,SAASA,eAAe;AACxB;AACA,eAAeA,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["SessionRecorder"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAO,kBAAS;AAChB,OAAOA,eAAe,MAAM,uBAAoB;AAChD,cAAc,0CAA0C;AACxD,cAAc,qCAAkC;AAChD,cAAc,sCAAmC;;AAEjD;AACA,cAAc,gCAA6B;;AAE3C;AACA,SAASA,eAAe;AACxB;AACA,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAElC;;;;OAIG;IACH,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAGpE,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,oBAAoB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,wBAAwB,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,kBAAkB,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,GAAG,IAAI,CAAC;IACzD,aAAa,CACX,WAAW,EAAE,MAAM,EACnB,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,MAAM,CAAC,EAAE,MAAM,EACf,QAAQ,CAAC,EAAE,GAAG,GACb,IAAI,CAAC;IACR,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,cAAc;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0FAA0F;IAC1F,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,0FAA0F;IAC1F,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;wBAEqD,IAAI;AAA1D,wBAA2D"}
|
|
@@ -3,6 +3,7 @@ import SessionRecorder from './session-recorder';
|
|
|
3
3
|
export * from '@multiplayer-app/session-recorder-common';
|
|
4
4
|
export * from './context/SessionRecorderContext';
|
|
5
5
|
export * from './context/useSessionRecorderStore';
|
|
6
|
+
export * from './SessionRecorderNativeSpec';
|
|
6
7
|
export { SessionRecorder };
|
|
7
8
|
export default SessionRecorder;
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAGlD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAe,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,cAAc,0CAA0C,CAAC;AACzD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAGlD,cAAc,6BAA6B,CAAC;AAG5C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { TurboModuleRegistry } from 'react-native';
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
3
2
|
|
|
4
|
-
export interface Spec
|
|
3
|
+
export interface Spec {
|
|
5
4
|
/**
|
|
6
5
|
* Capture the current screen and apply masking to sensitive elements
|
|
7
6
|
* @returns Promise that resolves to base64 encoded image
|
|
@@ -50,4 +49,4 @@ export interface MaskingOptions {
|
|
|
50
49
|
maskSandboxedViews?: boolean;
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
export default
|
|
52
|
+
export default NativeModules.SessionRecorderNative as Spec;
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,9 @@ export * from '@multiplayer-app/session-recorder-common';
|
|
|
4
4
|
export * from './context/SessionRecorderContext';
|
|
5
5
|
export * from './context/useSessionRecorderStore';
|
|
6
6
|
|
|
7
|
+
// Export TurboModule spec for codegen
|
|
8
|
+
export * from './SessionRecorderNativeSpec';
|
|
9
|
+
|
|
7
10
|
// Export the class for type checking
|
|
8
11
|
export { SessionRecorder };
|
|
9
12
|
// Export the instance as default
|