@mixpanel/react-native-session-replay 1.2.0 → 1.4.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.
- package/MixpanelReactNativeSessionReplay.podspec +1 -1
- package/README.md +2 -0
- package/android/build.gradle +10 -3
- package/android/src/main/java/com/mixpanelreactnativesessionreplay/MixpanelReactNativeSessionReplayModule.kt +54 -0
- package/android/src/main/java/com/mixpanelreactnativesessionreplay/MixpanelSessionReplayView.kt +56 -0
- package/android/src/main/java/com/mixpanelreactnativesessionreplay/MixpanelSessionReplayViewManager.kt +5 -0
- package/android/src/test/java/com/mixpanelreactnativesessionreplay/WireframeTextDeclarationTest.kt +41 -0
- package/ios/MixpanelReactNativeSessionReplay.h +7 -2
- package/ios/MixpanelReactNativeSessionReplay.mm +35 -2
- package/ios/MixpanelSessionReplayViewManager.mm +9 -0
- package/ios/MixpanelSwiftSessionReplay.swift +43 -1
- package/lib/module/MixpanelSessionReplayView.js.map +1 -1
- package/lib/module/NativeMixpanelReactNativeSessionReplay.js.map +1 -1
- package/lib/module/index.js +623 -5
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/MixpanelSessionReplayView.d.ts +32 -0
- package/lib/typescript/src/MixpanelSessionReplayView.d.ts.map +1 -1
- package/lib/typescript/src/NativeMixpanelReactNativeSessionReplay.d.ts +2 -0
- package/lib/typescript/src/NativeMixpanelReactNativeSessionReplay.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +351 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +2 -24
- package/src/MixpanelSessionReplayView.tsx +33 -0
- package/src/NativeMixpanelReactNativeSessionReplay.ts +7 -0
- package/src/index.tsx +688 -4
- package/android/app/build/generated/source/codegen/java/com/facebook/fbreact/specs/NativeMixpanelReactNativeSessionReplaySpec.java +0 -62
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
- package/android/app/build/generated/source/codegen/jni/MixpanelReactNativeSessionReplaySpec-generated.cpp +0 -68
- package/android/app/build/generated/source/codegen/jni/MixpanelReactNativeSessionReplaySpec.h +0 -31
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/MixpanelReactNativeSessionReplaySpec/MixpanelReactNativeSessionReplaySpecJSI-generated.cpp +0 -67
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/MixpanelReactNativeSessionReplaySpec/MixpanelReactNativeSessionReplaySpecJSI.h +0 -125
- package/android/generated/java/com/mpsessionreplay/NativeMpSessionReplaySpec.java +0 -49
- package/android/generated/jni/CMakeLists.txt +0 -36
- package/android/generated/jni/RNMpSessionReplaySpec-generated.cpp +0 -50
- package/android/generated/jni/RNMpSessionReplaySpec.h +0 -31
- package/android/generated/jni/react/renderer/components/RNMpSessionReplaySpec/RNMpSessionReplaySpecJSI-generated.cpp +0 -51
- package/android/generated/jni/react/renderer/components/RNMpSessionReplaySpec/RNMpSessionReplaySpecJSI.h +0 -98
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeMpSessionReplayCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeMpSessionReplayCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual void startRecording(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual void stopRecording(jsi::Runtime &rt) = 0;
|
|
25
|
-
virtual void initialize(jsi::Runtime &rt, jsi::String token, jsi::String distinctId, jsi::String configJSON) = 0;
|
|
26
|
-
virtual void captureScreenshot(jsi::Runtime &rt) = 0;
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
template <typename T>
|
|
31
|
-
class JSI_EXPORT NativeMpSessionReplayCxxSpec : public TurboModule {
|
|
32
|
-
public:
|
|
33
|
-
jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
34
|
-
return delegate_.create(rt, propName);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime& runtime) override {
|
|
38
|
-
return delegate_.getPropertyNames(runtime);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
static constexpr std::string_view kModuleName = "MpSessionReplay";
|
|
42
|
-
|
|
43
|
-
protected:
|
|
44
|
-
NativeMpSessionReplayCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
45
|
-
: TurboModule(std::string{NativeMpSessionReplayCxxSpec::kModuleName}, jsInvoker),
|
|
46
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
private:
|
|
50
|
-
class Delegate : public NativeMpSessionReplayCxxSpecJSI {
|
|
51
|
-
public:
|
|
52
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
53
|
-
NativeMpSessionReplayCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
void startRecording(jsi::Runtime &rt) override {
|
|
58
|
-
static_assert(
|
|
59
|
-
bridging::getParameterCount(&T::startRecording) == 1,
|
|
60
|
-
"Expected startRecording(...) to have 1 parameters");
|
|
61
|
-
|
|
62
|
-
return bridging::callFromJs<void>(
|
|
63
|
-
rt, &T::startRecording, jsInvoker_, instance_);
|
|
64
|
-
}
|
|
65
|
-
void stopRecording(jsi::Runtime &rt) override {
|
|
66
|
-
static_assert(
|
|
67
|
-
bridging::getParameterCount(&T::stopRecording) == 1,
|
|
68
|
-
"Expected stopRecording(...) to have 1 parameters");
|
|
69
|
-
|
|
70
|
-
return bridging::callFromJs<void>(
|
|
71
|
-
rt, &T::stopRecording, jsInvoker_, instance_);
|
|
72
|
-
}
|
|
73
|
-
void initialize(jsi::Runtime &rt, jsi::String token, jsi::String distinctId, jsi::String configJSON) override {
|
|
74
|
-
static_assert(
|
|
75
|
-
bridging::getParameterCount(&T::initialize) == 4,
|
|
76
|
-
"Expected initialize(...) to have 4 parameters");
|
|
77
|
-
|
|
78
|
-
return bridging::callFromJs<void>(
|
|
79
|
-
rt, &T::initialize, jsInvoker_, instance_, std::move(token), std::move(distinctId), std::move(configJSON));
|
|
80
|
-
}
|
|
81
|
-
void captureScreenshot(jsi::Runtime &rt) override {
|
|
82
|
-
static_assert(
|
|
83
|
-
bridging::getParameterCount(&T::captureScreenshot) == 1,
|
|
84
|
-
"Expected captureScreenshot(...) to have 1 parameters");
|
|
85
|
-
|
|
86
|
-
return bridging::callFromJs<void>(
|
|
87
|
-
rt, &T::captureScreenshot, jsInvoker_, instance_);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
private:
|
|
91
|
-
friend class NativeMpSessionReplayCxxSpec;
|
|
92
|
-
T *instance_;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
Delegate delegate_;
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
} // namespace facebook::react
|