@multiplayer-app/session-recorder-react-native 1.0.1-beta.13 → 1.0.1-beta.14
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/java/com/sessionrecordernative/SessionRecorderNativeModule.kt +10 -10
- package/android/src/main/java/com/sessionrecordernative/SessionRecorderNativeSpec.kt +39 -0
- package/lib/module/SessionRecorderNativeSpec.js.map +1 -1
- package/lib/module/index.js +0 -3
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/SessionRecorderNativeSpec.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/SessionRecorderNativeSpec.ts +0 -1
- package/src/index.ts +0 -2
|
@@ -25,7 +25,7 @@ import com.facebook.react.module.annotations.ReactModule
|
|
|
25
25
|
|
|
26
26
|
@ReactModule(name = SessionRecorderNativeModule.NAME)
|
|
27
27
|
class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
28
|
-
|
|
28
|
+
SessionRecorderNativeSpec(reactContext) {
|
|
29
29
|
|
|
30
30
|
override fun getName(): String {
|
|
31
31
|
return NAME
|
|
@@ -57,7 +57,7 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
@ReactMethod
|
|
60
|
-
fun captureAndMask(promise: Promise) {
|
|
60
|
+
override fun captureAndMask(promise: Promise) {
|
|
61
61
|
val activity =
|
|
62
62
|
reactContext.currentActivity
|
|
63
63
|
?: return promise.reject("NO_ACTIVITY", "No activity found")
|
|
@@ -71,7 +71,7 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
@ReactMethod
|
|
74
|
-
fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise) {
|
|
74
|
+
override fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise) {
|
|
75
75
|
val activity =
|
|
76
76
|
reactContext.currentActivity
|
|
77
77
|
?: return promise.reject("NO_ACTIVITY", "No activity found")
|
|
@@ -86,7 +86,7 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
86
86
|
|
|
87
87
|
// --- Gesture recording API (merged from GestureRecorderModule) ---
|
|
88
88
|
@ReactMethod
|
|
89
|
-
fun startGestureRecording(promise: Promise) {
|
|
89
|
+
override fun startGestureRecording(promise: Promise) {
|
|
90
90
|
val activity =
|
|
91
91
|
reactContext.currentActivity
|
|
92
92
|
?: return promise.reject("NO_ACTIVITY", "No activity found")
|
|
@@ -106,7 +106,7 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
@ReactMethod
|
|
109
|
-
fun stopGestureRecording(promise: Promise) {
|
|
109
|
+
override fun stopGestureRecording(promise: Promise) {
|
|
110
110
|
try {
|
|
111
111
|
if (!isRecording) {
|
|
112
112
|
promise.resolve(null)
|
|
@@ -122,17 +122,17 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
@ReactMethod
|
|
125
|
-
fun isGestureRecordingActive(promise: Promise) {
|
|
125
|
+
override fun isGestureRecordingActive(promise: Promise) {
|
|
126
126
|
promise.resolve(isRecording)
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
@ReactMethod
|
|
130
|
-
fun setGestureCallback(callback: Callback) {
|
|
130
|
+
override fun setGestureCallback(callback: Callback) {
|
|
131
131
|
this.gestureCallback = callback
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
@ReactMethod
|
|
135
|
-
fun recordGesture(
|
|
135
|
+
override fun recordGesture(
|
|
136
136
|
gestureType: String,
|
|
137
137
|
x: Double,
|
|
138
138
|
y: Double,
|
|
@@ -364,12 +364,12 @@ class SessionRecorderNativeModule(reactContext: ReactApplicationContext) :
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
@ReactMethod
|
|
367
|
-
fun addListener(eventName: String) {
|
|
367
|
+
override fun addListener(eventName: String) {
|
|
368
368
|
// Required for RN event emitter contracts
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
@ReactMethod
|
|
372
|
-
fun removeListeners(count: Int) {
|
|
372
|
+
override fun removeListeners(count: Int) {
|
|
373
373
|
// Required for RN event emitter contracts
|
|
374
374
|
}
|
|
375
375
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
package com.sessionrecordernative
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.ReactApplicationContext
|
|
4
|
+
import com.facebook.react.bridge.ReactContextBaseJavaModule
|
|
5
|
+
import com.facebook.react.bridge.Promise
|
|
6
|
+
import com.facebook.react.bridge.Callback
|
|
7
|
+
import com.facebook.react.bridge.ReadableMap
|
|
8
|
+
import com.facebook.react.turbomodule.core.interfaces.TurboModule
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Spec class for SessionRecorderNative TurboModule
|
|
12
|
+
* This class defines the interface that React Native expects for TurboModules
|
|
13
|
+
*/
|
|
14
|
+
abstract class SessionRecorderNativeSpec(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext), TurboModule {
|
|
15
|
+
|
|
16
|
+
override fun getName(): String {
|
|
17
|
+
return NAME
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
companion object {
|
|
21
|
+
const val NAME = "SessionRecorderNative"
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
abstract fun captureAndMask(promise: Promise)
|
|
25
|
+
abstract fun captureAndMaskWithOptions(options: ReadableMap, promise: Promise)
|
|
26
|
+
abstract fun startGestureRecording(promise: Promise)
|
|
27
|
+
abstract fun stopGestureRecording(promise: Promise)
|
|
28
|
+
abstract fun isGestureRecordingActive(promise: Promise)
|
|
29
|
+
abstract fun setGestureCallback(callback: Callback)
|
|
30
|
+
abstract fun recordGesture(
|
|
31
|
+
gestureType: String,
|
|
32
|
+
x: Double,
|
|
33
|
+
y: Double,
|
|
34
|
+
target: String?,
|
|
35
|
+
metadata: ReadableMap?
|
|
36
|
+
)
|
|
37
|
+
abstract fun addListener(eventName: String)
|
|
38
|
+
abstract fun removeListeners(count: Int)
|
|
39
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["SessionRecorderNativeSpec.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;
|
|
1
|
+
{"version":3,"names":["TurboModuleRegistry","getEnforcing"],"sourceRoot":"../../src","sources":["SessionRecorderNativeSpec.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,cAAc;AA8BlD,eAAeA,mBAAmB,CAACC,YAAY,CAAO,uBAAuB,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -6,9 +6,6 @@ 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
|
-
|
|
12
9
|
// Export the class for type checking
|
|
13
10
|
export { SessionRecorder };
|
|
14
11
|
// 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;;
|
|
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;;AAGjD;AACA,SAASA,eAAe;AACxB;AACA,eAAeA,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"SessionRecorderNativeSpec.d.ts","sourceRoot":"","sources":["../../../src/SessionRecorderNativeSpec.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAClC,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACpE,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,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;;AAED,wBAA+E"}
|
|
@@ -3,7 +3,6 @@ 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';
|
|
7
6
|
export { SessionRecorder };
|
|
8
7
|
export default SessionRecorder;
|
|
9
8
|
//# 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;
|
|
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;AAIlD,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,eAAe,eAAe,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -4,8 +4,6 @@ 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
8
|
// Export the class for type checking
|
|
11
9
|
export { SessionRecorder };
|