@multiplayer-app/session-recorder-react-native 1.0.0 → 1.0.1-beta.1

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.
@@ -1,10 +1,32 @@
1
+ buildscript {
2
+ ext.getExtOrDefault = { name ->
3
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['SessionRecorderNative_' + name]
4
+ }
5
+
6
+ repositories {
7
+ google()
8
+ mavenCentral()
9
+ }
10
+
11
+ dependencies {
12
+ classpath "com.android.tools.build:gradle:8.7.2"
13
+ // noinspection DifferentKotlinGradleVersion
14
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${getExtOrDefault('kotlinVersion')}"
15
+ }
16
+ }
17
+
1
18
  apply plugin: 'com.android.library'
2
19
  apply plugin: 'kotlin-android'
20
+ apply plugin: 'com.facebook.react'
3
21
 
4
22
  def safeExtGet(prop, fallback) {
5
23
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
6
24
  }
7
25
 
26
+ def getExtOrIntegerDefault(name) {
27
+ return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SessionRecorderNative_" + name]).toInteger()
28
+ }
29
+
8
30
  android {
9
31
  namespace "com.multiplayer.sessionrecorder"
10
32
  compileSdkVersion safeExtGet('compileSdkVersion', 33)
@@ -16,6 +38,10 @@ android {
16
38
  versionName "1.0"
17
39
  }
18
40
 
41
+ buildFeatures {
42
+ buildConfig true
43
+ }
44
+
19
45
  buildTypes {
20
46
  release {
21
47
  minifyEnabled false
@@ -23,12 +49,33 @@ android {
23
49
  }
24
50
  }
25
51
 
52
+ lintOptions {
53
+ disable "GradleCompatible"
54
+ }
55
+
26
56
  compileOptions {
27
57
  sourceCompatibility JavaVersion.VERSION_1_8
28
58
  targetCompatibility JavaVersion.VERSION_1_8
29
59
  }
60
+
61
+ sourceSets {
62
+ main {
63
+ java.srcDirs += [
64
+ "generated/java",
65
+ "generated/jni"
66
+ ]
67
+ }
68
+ }
69
+ }
70
+
71
+ repositories {
72
+ mavenCentral()
73
+ google()
30
74
  }
31
75
 
76
+ def kotlin_version = getExtOrDefault("kotlinVersion")
77
+
32
78
  dependencies {
33
- implementation 'com.facebook.react:react-native:+'
79
+ implementation "com.facebook.react:react-android"
80
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
34
81
  }
@@ -0,0 +1,5 @@
1
+ SessionRecorderNative_kotlinVersion=2.0.21
2
+ SessionRecorderNative_minSdkVersion=24
3
+ SessionRecorderNative_targetSdkVersion=34
4
+ SessionRecorderNative_compileSdkVersion=35
5
+ SessionRecorderNative_ndkVersion=27.1.12297006
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.gestureEventEmitter=exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var isWeb=_reactNative.Platform.OS==='web';var GestureRecorderNative=null;if(!isWeb){try{var NativeModule=_reactNative.NativeModules.GestureRecorderNative;GestureRecorderNative=NativeModule;}catch(error){console.warn('Failed to access GestureRecorderNative module:',error);}}if(!GestureRecorderNative&&!isWeb){console.warn('GestureRecorderNative module is not available. Auto-linking may not have completed yet.');}else if(isWeb){console.info('GestureRecorderNative: Running on web platform, native module disabled');}var gestureEventEmitter=exports.gestureEventEmitter=!isWeb&&GestureRecorderNative?new _reactNative.NativeEventEmitter(GestureRecorderNative):null;var SafeGestureRecorderNative={startGestureRecording:function startGestureRecording(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context.next=1;break;}throw new Error('GestureRecorderNative is not available on web platform');case 1:return _context.abrupt("return",GestureRecorderNative.startGestureRecording());case 2:case"end":return _context.stop();}},_callee);}))();},stopGestureRecording:function stopGestureRecording(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context2.next=1;break;}throw new Error('GestureRecorderNative is not available on web platform');case 1:return _context2.abrupt("return",GestureRecorderNative.stopGestureRecording());case 2:case"end":return _context2.stop();}},_callee2);}))();},isGestureRecordingActive:function isGestureRecordingActive(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context3.next=1;break;}return _context3.abrupt("return",false);case 1:return _context3.abrupt("return",GestureRecorderNative.isGestureRecordingActive());case 2:case"end":return _context3.stop();}},_callee3);}))();},setGestureCallback:function setGestureCallback(callback){if(isWeb||!GestureRecorderNative){console.warn('GestureRecorderNative is not available on web platform');return;}GestureRecorderNative.setGestureCallback(callback);},recordGesture:function recordGesture(gestureType,x,y,target,metadata){if(isWeb||!GestureRecorderNative){console.warn('GestureRecorderNative is not available on web platform');return;}GestureRecorderNative.recordGesture(gestureType,x,y,target,metadata);}};var _default=exports["default"]=SafeGestureRecorderNative;
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.gestureEventEmitter=exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _GestureRecorderNativeTurboSpec=_interopRequireDefault(require("./GestureRecorderNativeTurboSpec"));var isWeb=_reactNative.Platform.OS==='web';var GestureRecorderNative=null;if(!isWeb){try{GestureRecorderNative=_GestureRecorderNativeTurboSpec["default"];}catch(e){try{var NativeModule=_reactNative.NativeModules.GestureRecorderNative;GestureRecorderNative=NativeModule;}catch(error){console.warn('Failed to access GestureRecorderNative module:',error);}}}if(!GestureRecorderNative&&!isWeb){console.warn('GestureRecorderNative module is not available. Auto-linking may not have completed yet.');}else if(isWeb){console.info('GestureRecorderNative: Running on web platform, native module disabled');}var gestureEventEmitter=exports.gestureEventEmitter=!isWeb&&GestureRecorderNative?new _reactNative.NativeEventEmitter(GestureRecorderNative):null;var SafeGestureRecorderNative={startGestureRecording:function startGestureRecording(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context.next=1;break;}throw new Error('GestureRecorderNative is not available on web platform');case 1:return _context.abrupt("return",GestureRecorderNative.startGestureRecording());case 2:case"end":return _context.stop();}},_callee);}))();},stopGestureRecording:function stopGestureRecording(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context2.next=1;break;}throw new Error('GestureRecorderNative is not available on web platform');case 1:return _context2.abrupt("return",GestureRecorderNative.stopGestureRecording());case 2:case"end":return _context2.stop();}},_callee2);}))();},isGestureRecordingActive:function isGestureRecordingActive(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(){return _regenerator["default"].wrap(function(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(isWeb||!GestureRecorderNative)){_context3.next=1;break;}return _context3.abrupt("return",false);case 1:return _context3.abrupt("return",GestureRecorderNative.isGestureRecordingActive());case 2:case"end":return _context3.stop();}},_callee3);}))();},setGestureCallback:function setGestureCallback(callback){if(isWeb||!GestureRecorderNative){console.warn('GestureRecorderNative is not available on web platform');return;}GestureRecorderNative.setGestureCallback(callback);},recordGesture:function recordGesture(gestureType,x,y,target,metadata){if(isWeb||!GestureRecorderNative){console.warn('GestureRecorderNative is not available on web platform');return;}GestureRecorderNative.recordGesture(gestureType,x,y,target,metadata);}};var _default=exports["default"]=SafeGestureRecorderNative;
@@ -1 +1 @@
1
- {"version":3,"file":"GestureRecorderNative.js","sourceRoot":"","sources":["../../src/native/GestureRecorderNative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAkE1E,iCAAiC;AACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;AAEnC,2CAA2C;AAC3C,IAAI,qBAAqB,GAAuC,IAAI,CAAA;AAEpE,IAAI,CAAC,KAAK,EAAE,CAAC;IACX,IAAI,CAAC;QACH,MAAM,EAAE,qBAAqB,EAAE,YAAY,EAAE,GAAG,aAAa,CAAA;QAC7D,qBAAqB,GAAG,YAAY,CAAA;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAA;IACvE,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,IAAI,CAAC,qBAAqB,IAAI,CAAC,KAAK,EAAE,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,yFAAyF,CAAC,CAAA;AACzG,CAAC;KAAM,IAAI,KAAK,EAAE,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAA;AACxF,CAAC;AAED,6DAA6D;AAC7D,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,IAAI,qBAAqB,CAAC,CAAC,CAAC,CAAC,IAAI,kBAAkB,CAAC,qBAA4B,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAE3H,kDAAkD;AAClD,MAAM,yBAAyB,GAAgC;IAC7D,KAAK,CAAC,qBAAqB;QACzB,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,qBAAqB,CAAC,qBAAqB,EAAE,CAAA;IACtD,CAAC;IAED,KAAK,CAAC,oBAAoB;QACxB,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,qBAAqB,CAAC,oBAAoB,EAAE,CAAA;IACrD,CAAC;IAED,KAAK,CAAC,wBAAwB;QAC5B,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,qBAAqB,CAAC,wBAAwB,EAAE,CAAA;IACzD,CAAC;IAED,kBAAkB,CAAC,QAAyC;QAC1D,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,qBAAqB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACpD,CAAC;IAED,aAAa,CACX,WAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAA8B;QAE9B,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,qBAAqB,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC1E,CAAC;CACF,CAAA;AAED,eAAe,yBAAyB,CAAA;AAExC,0CAA0C;AAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
1
+ {"version":3,"file":"GestureRecorderNative.js","sourceRoot":"","sources":["../../src/native/GestureRecorderNative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,SAAS,MAAM,kCAAkC,CAAA;AAkExD,iCAAiC;AACj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pC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,qBAAqB,CAAC,oBAAoB,EAAE,CAAA;IACrD,CAAC;IAED,KAAK,CAAC,wBAAwB;QAC5B,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,KAAK,CAAA;QACd,CAAC;QACD,OAAO,qBAAqB,CAAC,wBAAwB,EAAE,CAAA;IACzD,CAAC;IAED,kBAAkB,CAAC,QAAyC;QAC1D,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,qBAAqB,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAA;IACpD,CAAC;IAED,aAAa,CACX,WAAmB,EACnB,CAAS,EACT,CAAS,EACT,MAAe,EACf,QAA8B;QAE9B,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;YACtE,OAAM;QACR,CAAC;QACD,qBAAqB,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IAC1E,CAAC;CACF,CAAA;AAED,eAAe,yBAAyB,CAAA;AAExC,0CAA0C;AAC1C,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,31 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export type GestureEvent = {
3
+ type: 'tap' | 'pan_start' | 'pan_move' | 'pan_end' | 'long_press' | 'pinch' | 'swipe';
4
+ timestamp: number;
5
+ x: number;
6
+ y: number;
7
+ target?: string;
8
+ targetInfo?: {
9
+ identifier: string;
10
+ label?: string;
11
+ role?: string;
12
+ testId?: string;
13
+ text?: string;
14
+ };
15
+ metadata?: {
16
+ pressure?: number;
17
+ velocity?: number;
18
+ scale?: number;
19
+ direction?: string;
20
+ distance?: number;
21
+ };
22
+ };
23
+ export interface Spec extends TurboModule {
24
+ startGestureRecording(): Promise<void>;
25
+ stopGestureRecording(): Promise<void>;
26
+ isGestureRecordingActive(): Promise<boolean>;
27
+ setGestureCallback(callback: (gesture: GestureEvent) => void): void;
28
+ recordGesture(gestureType: string, x: number, y: number, target?: string, metadata?: Record<string, any>): void;
29
+ }
30
+ declare const _default: Spec;
31
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _reactNative=require("react-native");var _default=exports["default"]=_reactNative.TurboModuleRegistry.getEnforcing('GestureRecorderNative');
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GestureRecorderNativeTurboSpec.js","sourceRoot":"","sources":["../../src/native/GestureRecorderNativeTurboSpec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAsClD,eAAe,mBAAmB,CAAC,YAAY,CAAO,uBAAuB,CAAC,CAAA"}
@@ -1 +1 @@
1
- "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var isWeb=_reactNative.Platform.OS==='web';var SessionRecorderNative=null;if(!isWeb){try{var NativeModule=_reactNative.NativeModules.SessionRecorderNative;SessionRecorderNative=NativeModule;}catch(error){console.warn('Failed to access SessionRecorderNative module:',error);}}if(!SessionRecorderNative&&!isWeb){console.warn('SessionRecorderNative module is not available. Auto-linking may not have completed yet.');}else if(isWeb){console.info('SessionRecorderNative: Running on web platform, native module disabled');}var SafeSessionRecorderNative={captureAndMask:function captureAndMask(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isWeb||!SessionRecorderNative)){_context.next=1;break;}throw new Error('SessionRecorderNative is not available on web platform');case 1:return _context.abrupt("return",SessionRecorderNative.captureAndMask());case 2:case"end":return _context.stop();}},_callee);}))();},captureAndMaskWithOptions:function captureAndMaskWithOptions(options){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isWeb||!SessionRecorderNative)){_context2.next=1;break;}throw new Error('SessionRecorderNative is not available on web platform');case 1:return _context2.abrupt("return",SessionRecorderNative.captureAndMaskWithOptions(options));case 2:case"end":return _context2.stop();}},_callee2);}))();}};var _default=exports["default"]=SafeSessionRecorderNative;
1
+ "use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _regenerator=_interopRequireDefault(require("@babel/runtime/regenerator"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _SessionRecorderNativeTurboSpec=_interopRequireDefault(require("./SessionRecorderNativeTurboSpec"));var isWeb=_reactNative.Platform.OS==='web';var SessionRecorderNative=null;if(!isWeb){try{SessionRecorderNative=_SessionRecorderNativeTurboSpec["default"];}catch(e){try{var NativeModule=_reactNative.NativeModules.SessionRecorderNative;SessionRecorderNative=NativeModule;}catch(error){console.warn('Failed to access SessionRecorderNative module:',error);}}}if(!SessionRecorderNative&&!isWeb){console.warn('SessionRecorderNative module is not available. Auto-linking may not have completed yet.');}else if(isWeb){console.info('SessionRecorderNative: Running on web platform, native module disabled');}var SafeSessionRecorderNative={captureAndMask:function captureAndMask(){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee(){return _regenerator["default"].wrap(function(_context){while(1)switch(_context.prev=_context.next){case 0:if(!(isWeb||!SessionRecorderNative)){_context.next=1;break;}throw new Error('SessionRecorderNative is not available on web platform');case 1:return _context.abrupt("return",SessionRecorderNative.captureAndMask());case 2:case"end":return _context.stop();}},_callee);}))();},captureAndMaskWithOptions:function captureAndMaskWithOptions(options){return(0,_asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee2(){return _regenerator["default"].wrap(function(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!(isWeb||!SessionRecorderNative)){_context2.next=1;break;}throw new Error('SessionRecorderNative is not available on web platform');case 1:return _context2.abrupt("return",SessionRecorderNative.captureAndMaskWithOptions(options));case 2:case"end":return _context2.stop();}},_callee2);}))();}};var _default=exports["default"]=SafeSessionRecorderNative;
@@ -1 +1 @@
1
- {"version":3,"file":"SessionRecorderNative.js","sourceRoot":"","sources":["../../src/native/SessionRecorderNative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAqCtD,iCAAiC;AACjC,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;AAEnC,2CAA2C;AAC3C,IAAI,qBAAqB,GAAuC,IAAI,CAAA;AAEpE,IAAI,CAAC,KAAK,EAAE,CAAC;IACX,IAAI,CAAC;QACH,MAAM,EAAE,qBAAqB,EAAE,YAAY,EAAE,GAAG,aAAa,CAAA;QAC7D,qBAAqB,GAAG,YAAY,CAAA;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CAAC,gDAAgD,EAAE,KAAK,CAAC,CAAA;IACvE,CAAC;AACH,CAAC;AAED,+CAA+C;AAC/C,IAAI,CAAC,qBAAqB,IAAI,CAAC,KAAK,EAAE,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,yFAAyF,CAAC,CAAA;AACzG,CAAC;KAAM,IAAI,KAAK,EAAE,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAA;AACxF,CAAC;AAED,kDAAkD;AAClD,MAAM,yBAAyB,GAAgC;IAC7D,KAAK,CAAC,cAAc;Q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C,OAAO,CAAC,IAAI,CAAC,yFAAyF,CAAC,CAAA;AACzG,CAAC;KAAM,IAAI,KAAK,EAAE,CAAC;IACjB,OAAO,CAAC,IAAI,CAAC,wEAAwE,CAAC,CAAA;AACxF,CAAC;AAED,kDAAkD;AAClD,MAAM,yBAAyB,GAAgC;IAC7D,KAAK,CAAC,cAAc;QAClB,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,qBAAqB,CAAC,cAAc,EAAE,CAAA;IAC/C,CAAC;IAED,KAAK,CAAC,yBAAyB,CAAC,OAAuB;QACrD,IAAI,KAAK,IAAI,CAAC,qBAAqB,EAAE,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAA;QAC3E,CAAC;QACD,OAAO,qBAAqB,CAAC,yBAAyB,CAAC,OAAO,CAAC,CAAA;IACjE,CAAC;CACF,CAAA;AAED,eAAe,yBAAyB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export interface MaskingOptions {
3
+ quality?: number;
4
+ scale?: number;
5
+ maskTextInputs?: boolean;
6
+ maskImages?: boolean;
7
+ maskButtons?: boolean;
8
+ maskLabels?: boolean;
9
+ maskWebViews?: boolean;
10
+ maskSandboxedViews?: boolean;
11
+ }
12
+ export interface Spec extends TurboModule {
13
+ captureAndMask(): Promise<string>;
14
+ captureAndMaskWithOptions(options: MaskingOptions): Promise<string>;
15
+ }
16
+ declare const _default: Spec;
17
+ export default _default;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _reactNative=require("react-native");var _default=exports["default"]=_reactNative.TurboModuleRegistry.getEnforcing('SessionRecorderNative');
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionRecorderNativeTurboSpec.js","sourceRoot":"","sources":["../../src/native/SessionRecorderNativeTurboSpec.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAkBlD,eAAe,mBAAmB,CAAC,YAAY,CAAO,uBAAuB,CAAC,CAAA"}
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const version = "1.0.0";
1
+ export declare const version = "1.0.1-beta.1";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="1.0.0";
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.version=void 0;var version=exports.version="1.0.1-beta.1";
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,cAAc,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplayer-app/session-recorder-react-native",
3
- "version": "1.0.0",
3
+ "version": "1.0.1-beta.1",
4
4
  "description": "Multiplayer Fullstack Session Recorder for React Native",
5
5
  "author": {
6
6
  "name": "Multiplayer Software, Inc.",
@@ -41,7 +41,8 @@
41
41
  "clean": "rimraf dist",
42
42
  "prebuild": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts",
43
43
  "prepublishOnly": "npm run build",
44
- "build": "tsc && babel ./dist --out-dir dist --extensions '.js' && ./copy-react-native-dist.sh"
44
+ "build": "tsc && babel ./dist --out-dir dist --extensions '.js'",
45
+ "copy:dist": "./copy-react-native-dist.sh"
45
46
  },
46
47
  "devDependencies": {
47
48
  "@babel/cli": "^7.19.3",
@@ -83,10 +84,10 @@
83
84
  "peerDependencies": {
84
85
  "@opentelemetry/api": "^1.9.0",
85
86
  "expo-constants": "*",
86
- "react": ">=18.0.0 <20.0.0",
87
- "react-native": ">=0.72.0 <0.83.0",
88
- "react-native-safe-area-context": ">=4.0.0 <6.0.0 || ^5.0.0",
89
- "react-native-svg": ">=15.12.0 <16.0.0"
87
+ "react": "*",
88
+ "react-native": "*",
89
+ "react-native-svg": "*",
90
+ "react-native-safe-area-context": "*"
90
91
  },
91
92
  "peerDependenciesMeta": {
92
93
  "expo-constants": {
package/turbo.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "globalDependencies": [
4
+ ".nvmrc",
5
+ ".yarnrc.yml"
6
+ ],
7
+ "globalEnv": [
8
+ "NODE_ENV"
9
+ ],
10
+ "tasks": {
11
+ "build:android": {
12
+ "env": [
13
+ "ANDROID_HOME",
14
+ "ORG_GRADLE_PROJECT_newArchEnabled"
15
+ ],
16
+ "inputs": [
17
+ "package.json",
18
+ "android",
19
+ "!android/build",
20
+ "src/*.ts",
21
+ "src/*.tsx"
22
+ ],
23
+ "outputs": []
24
+ },
25
+ "build:ios": {
26
+ "env": [
27
+ "RCT_NEW_ARCH_ENABLED",
28
+ "RCT_USE_RN_DEP",
29
+ "RCT_USE_PREBUILT_RNCORE"
30
+ ],
31
+ "inputs": [
32
+ "package.json",
33
+ "*.podspec",
34
+ "ios",
35
+ "src/*.ts",
36
+ "src/*.tsx"
37
+ ],
38
+ "outputs": []
39
+ }
40
+ }
41
+ }
@@ -1,12 +0,0 @@
1
- module.exports = {
2
- dependency: {
3
- platforms: {
4
- android: {
5
- sourceDir: './android'
6
- },
7
- ios: {
8
- podspecPath: './ios/SessionRecorderNative.podspec'
9
- }
10
- }
11
- }
12
- }