@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
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","MixpanelReactNativeSessionReplay","MPSessionReplayMask","MPSessionReplayRemoteSettingsMode","MPSessionReplayConfig","constructor","wifiOnly","autoStartRecording","recordingSessionsPercent","autoMaskedViews","Image","Text","Web","Map","flushInterval","enableLogging","remoteSettingsMode","Disabled","transformMaskValueForPlatform","value","OS","charAt","toUpperCase","slice","toJSON","transformedAutoMaskedViews","filter","mask","map","transformedRemoteSettingsMode","config","select","ios","enableSessionReplayOniOS26AndLater","default","JSON","stringify","initialize","token","distinctId","Error","undefined","json","startRecording","stopRecording","isRecording","identify","getReplayId","flush","MPSessionReplayView","MPSessionReplay"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,OAAOC,gCAAgC,MAAM,6CAA0C;AAEvF,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA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AK,QAAQ,EAAE;IACjD,MAAM,IAAIC,KAAK,CAAC,6CAA6C,CAAC;EAChE;EAEA,OAAOvC,gCAAgC,CAAC6C,QAAQ,CAACP,UAAU,CAAC;AAC9D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeQ,WAAWA,CAAA,EAA2B;EACnD,OAAO9C,gCAAgC,CAAC8C,WAAW,CAAC,CAAC;AACvD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,KAAKA,CAAA,EAAkB;EACpC,OAAO/C,gCAAgC,CAAC+C,KAAK,CAAC,CAAC;AACjD;AAEA,SAASC,mBAAmB,QAAQ,gCAA6B;AAEjE,OAAO,MAAMC,eAAe,GAAG;EAC7Bb,UAAU;EACVM,cAAc;EACdC,aAAa;EACbC,WAAW;EACXC,QAAQ;EACRC,WAAW;EACXC;AACF,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","Platform","processColor","MixpanelReactNativeSessionReplay","MPSessionReplayMask","MPSessionReplayRemoteSettingsMode","MPDataResidency","US","EU","IN","MPMaskDecision","None","Declared","Explicit","Auto","TextEntry","Geometric","RuleStrip","RuleRedact","WIREFRAME_EVENT","wireframeEventEmitter","wireframeSubscription","wireframeGeneration","getWireframeEventEmitter","MPDebugOverlayColors","constructor","maskColor","autoMaskColor","unmaskColor","alpha","MPDebugOptions","overlayColors","wireframeEmitter","processOverlayColor","color","undefined","processed","console","warn","JSON","stringify","serializeDebugOptions","debugOptions","emitWireframes","MP_DEFAULT_REPLACEMENT","MPSensitiveRule","redact","text","replacement","type","strip","redactRegex","regex","stripRegex","MPWireframesOptions","sensitiveRules","useAccessibilityLabelFallback","SUPPORTED_REGEX_FLAGS","serializeRegex","ruleType","unsupported","flags","filter","flag","includes","length","join","pattern","source","caseInsensitive","multiline","dotMatchesAll","serializeWireframesOptions","options","map","rule","MPSessionReplayConfig","wifiOnly","autoStartRecording","recordingSessionsPercent","autoMaskedViews","Image","Text","Web","Map","flushInterval","enableLogging","remoteSettingsMode","Disabled","serverURL","wireframesOptions","transformMaskValueForPlatform","value","OS","charAt","toUpperCase","slice","toJSON","transformedAutoMaskedViews","mask","transformedRemoteSettingsMode","config","select","ios","enableSessionReplayOniOS26AndLater","android","serverUrl","default","initialize","token","distinctId","Error","json","generation","attachWireframeEmitter","result","error","detachWireframeEmitterIfCurrent","startRecording","stopRecording","isRecording","identify","getReplayId","flush","normalizeSnapshot","raw","elements","element","listener","remove","addListener","payload","snapshot","parse","MPSessionReplayView","MPSessionReplay"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SACEA,kBAAkB,EAClBC,QAAQ,EACRC,YAAY,QAIP,cAAc;AACrB,OAAOC,gCAAgC,MAAM,6CAA0C;AAEvF,WAAYC,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAO/B,WAAYC,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;;AAM7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAA6D,GAAG;EAC3E;EACAC,EAAE,EAAE,0BAA0B;EAC9B;EACAC,EAAE,EAAE,6BAA6B;EACjC;EACAC,EAAE,EAAE;AACN,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG;EAC5B;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,QAAQ,EAAE,UAAU;EACpB;EACAC,IAAI,EAAE,MAAM;EACZ;EACAC,SAAS,EAAE,YAAY;EACvB;EACAC,SAAS,EAAE,WAAW;EACtB;EACAC,SAAS,EAAE,YAAY;EACvB;EACAC,UAAU,EAAE;AACd,CAAU;;AAEV;;AAYA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAG,gCAAgC;AAExD,IAAIC,qBAAgD,GAAG,IAAI;;AAE3D;AACA;AACA,IAAIC,qBAAiD,GAAG,IAAI;;AAE5D;AACA;AACA;AACA,IAAIC,mBAAmB,GAAG,CAAC;AAE3B,SAASC,wBAAwBA,CAAA,EAAuB;EACtD,IAAIH,qBAAqB,KAAK,IAAI,EAAE;IAClC;IACA;IACA;IACAA,qBAAqB,GAAG,IAAIpB,kBAAkB,CAC5CG,gCACF,CAAC;EACH;EACA,OAAOiB,qBAAqB;AAC9B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,oBAAoB,CAAC;EAChC;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;;EAGEC,WAAWA,CAAC;IACVC,SAAS,GAAG,KAAK;IACjBC,aAAa,GAAG,QAAQ;IACxBC,WAAW,GAAG,OAAO;IACrBC,KAAK,GAAG;EACqB,CAAC,GAAG,CAAC,CAAC,EAAE;IACrC,IAAI,CAACH,SAAS,GAAGA,SAAS;IAC1B,IAAI,CAACC,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,KAAK,GAAGA,KAAK;EACpB;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,CAAC;EAC1B;AACF;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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A;AACA;;AAOA;AACA,OAAO,MAAMY,sBAAsB,GAAG,YAAY;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG;EAC7B;AACF;AACA;AACA;EACEC,MAAMA,CACJC,IAAY,EACZC,WAAmB,GAAGJ,sBAAsB,EAC3B;IACjB,OAAO;MAAEK,IAAI,EAAE,QAAQ;MAAEF,IAAI;MAAEC;IAAY,CAAC;EAC9C,CAAC;EAED;EACAE,KAAKA,CAACH,IAAY,EAAmB;IACnC,OAAO;MAAEE,IAAI,EAAE,OAAO;MAAEF;IAAK,CAAC;EAChC,CAAC;EAED;AACF;AACA;AACA;AACA;AACA;EACEI,WAAWA,CACTC,KAAa,EACbJ,WAAmB,GAAGJ,sBAAsB,EAC3B;IACjB,OAAO;MAAEK,IAAI,EAAE,aAAa;MAAEG,KAAK;MAAEJ;IAAY,CAAC;EACpD,CAAC;EAED;EACAK,UAAUA,CAACD,KAAa,EAAmB;IACzC,OAAO;MAAEH,IAAI,EAAE,YAAY;MAAEG;IAAM,CAAC;EACtC;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,mBAAmB,CAAC;EAC/B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE7B,WAAWA,CAAC;IACV8B,cAAc,GAAG,EAAE;IACnBC,6BAA6B,GAAG;EACJ,CAAC,GAAG,CAAC,CAAC,EAAE;IACpC,IAA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QACH,KAAK,OAAO;UACV,OAAO;YAAEC,IAAI,EAAE0B,IAAI,CAAC1B,IAAI;YAAEF,IAAI,EAAE4B,IAAI,CAAC5B;UAAK,CAAC;QAC7C,KAAK,aAAa;UAChB,OAAO;YACLE,IAAI,EAAE0B,IAAI,CAAC1B,IAAI;YACf,GAAGS,cAAc,CAACiB,IAAI,CAACvB,KAAK,EAAEuB,IAAI,CAAC1B,IAAI,CAAC;YACxCD,WAAW,EAAE2B,IAAI,CAAC3B;UACpB,CAAC;QACH,KAAK,YAAY;UACf,OAAO;YAAEC,IAAI,EAAE0B,IAAI,CAAC1B,IAAI;YAAE,GAAGS,cAAc,CAACiB,IAAI,CAACvB,KAAK,EAAEuB,IAAI,CAAC1B,IAAI;UAAE,CAAC;MACxE;IACF,CAAC,CAAC;IACFO,6BAA6B,EAAEiB,OAAO,CAACjB;EACzC,CAAC;AACH;AAEA,OAAO,MAAMoB,qBAAqB,CAAC;EACjC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;EAGEnD,WAAWA,CAAC;IACVoD,QAAQ,GAAG,IAAI;IACfC,kBAAkB,GAAG,IAAI;IACzBC,wBAAwB,GAAG,GA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,GAAGE,wBAAwB,CAAC,CAAC,CAAC2G,WAAW,CAC5D/G,eAAe,EACdgH,OAAe,IAAK;IACnB,IAAIC,QAA6B;IACjC,IAAI;MACFA,QAAQ,GAAGR,iBAAiB,CAACrF,IAAI,CAAC8F,KAAK,CAACF,OAAO,CAAC,CAAC;IACnD,CAAC,CAAC,OAAOf,KAAK,EAAE;MACd;MACA;MACA;MACA/E,OAAO,CAACC,IAAI,CACV,gEAAgE8E,KAAK,EACvE,CAAC;MACD;IACF;IACA,IAAI;MACFY,QAAQ,CAACI,QAAQ,CAAC;IACpB,CAAC,CAAC,OAAOhB,KAAK,EAAE;MACd;MACA;MACA/E,OAAO,CAACC,IAAI,CACV,oDAAoD8E,KAAK,EAC3D,CAAC;IACH;EACF,CACF,CAAC;EACD,OAAOH,UAAU;AACnB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASI,+BAA+BA,CAACJ,UAAkB,EAAQ;EACjE,IAAIA,UAAU,KAAK3F,mBAAmB,EAAE;IACtC;EACF;EACAD,qBAAqB,EAAE4G,MAAM,CAAC,CAAC;EAC/B5G,qBAAqB,GAAG,IAAI;AAC9B;AAEA,SAASiH,mBAAmB,QAAQ,gCAA6B;AAEjE,OAAO,MAAMC,eAAe,GAAG;EAC7B3B,UAAU;EACVU,cAAc;EACdC,aAAa;EACbC,WAAW;EACXC,QAAQ;EACRC,WAAW;EACXC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
import { type ViewProps } from 'react-native';
|
|
2
2
|
interface MixpanelSessionReplayViewProps extends ViewProps {
|
|
3
|
+
/**
|
|
4
|
+
* Masks everything inside this view in the replay video, and drops the text of every
|
|
5
|
+
* wireframe element under it.
|
|
6
|
+
*
|
|
7
|
+
* Controls pixels. Orthogonal to {@link wireframeText}, which controls what the
|
|
8
|
+
* wireframe *says*; the two compose.
|
|
9
|
+
*/
|
|
3
10
|
sensitive?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Declares the text recorded for this view in the wireframe.
|
|
13
|
+
*
|
|
14
|
+
* **Beta.** Wireframes are in beta; see `MPWireframesOptions` for what to check before
|
|
15
|
+
* shipping to production.
|
|
16
|
+
*
|
|
17
|
+
* Use it to describe content the SDK can't read — custom-drawn views, charts, canvases —
|
|
18
|
+
* or to attach an analytical label. Declared text wins over the view's own visible text
|
|
19
|
+
* and over its accessibility label.
|
|
20
|
+
*
|
|
21
|
+
* **It is sent even when the view is masked.** Masking hides the pixels while the
|
|
22
|
+
* declared text still describes the view for the summary. Because you authored it rather
|
|
23
|
+
* than the SDK scraping it off the screen, making sure the text is not itself sensitive
|
|
24
|
+
* is up to you — if it could be, leave it off.
|
|
25
|
+
*
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <MPSessionReplayView sensitive wireframeText="Card number">
|
|
28
|
+
* <CardNumberField />
|
|
29
|
+
* </MPSessionReplayView>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Requires `wireframesOptions` on the config; without it no wireframes are captured and
|
|
33
|
+
* this prop does nothing. Blank strings are ignored.
|
|
34
|
+
*/
|
|
35
|
+
wireframeText?: string;
|
|
4
36
|
}
|
|
5
37
|
export declare const MPSessionReplayView: import("react-native").HostComponent<MixpanelSessionReplayViewProps>;
|
|
6
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MixpanelSessionReplayView.d.ts","sourceRoot":"","sources":["../../../src/MixpanelSessionReplayView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,8BAA+B,SAAQ,SAAS;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MixpanelSessionReplayView.d.ts","sourceRoot":"","sources":["../../../src/MixpanelSessionReplayView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtE,UAAU,8BAA+B,SAAQ,SAAS;IACxD;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,sEAG7B,CAAC"}
|
|
@@ -7,6 +7,8 @@ export interface Spec extends TurboModule {
|
|
|
7
7
|
identify(distinctId: string): Promise<void>;
|
|
8
8
|
getReplayId(): Promise<string | null>;
|
|
9
9
|
flush(): Promise<void>;
|
|
10
|
+
addListener(eventName: string): void;
|
|
11
|
+
removeListeners(count: number): void;
|
|
10
12
|
}
|
|
11
13
|
declare global {
|
|
12
14
|
var __turboModuleProxy: unknown | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeMixpanelReactNativeSessionReplay.d.ts","sourceRoot":"","sources":["../../../src/NativeMixpanelReactNativeSessionReplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,cAAc,CAAC,wBAAwB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeMixpanelReactNativeSessionReplay.d.ts","sourceRoot":"","sources":["../../../src/NativeMixpanelReactNativeSessionReplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,UAAU,CACR,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,cAAc,CAAC,wBAAwB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/B,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,WAAW,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACtC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAMvB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAGD,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,kBAAkB,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7C;wBAyCkD,IAAI;AAAvD,wBAAwD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ColorValue } from 'react-native';
|
|
1
2
|
export declare enum MPSessionReplayMask {
|
|
2
3
|
Text = "text",
|
|
3
4
|
Web = "web",
|
|
@@ -9,6 +10,308 @@ export declare enum MPSessionReplayRemoteSettingsMode {
|
|
|
9
10
|
Strict = "strict",
|
|
10
11
|
Fallback = "fallback"
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Base URLs for Mixpanel's managed data residency regions.
|
|
15
|
+
*
|
|
16
|
+
* Pass one of these constants to {@link MPSessionReplayConfig.serverURL} to route
|
|
17
|
+
* session replay traffic to the matching region, or pass any other `https://` URL
|
|
18
|
+
* to send traffic through a custom endpoint (for example, a corporate proxy).
|
|
19
|
+
*/
|
|
20
|
+
export declare const MPDataResidency: Readonly<Record<'US' | 'EU' | 'IN', string>>;
|
|
21
|
+
/**
|
|
22
|
+
* Why a wireframe element's text was kept, rewritten, or dropped.
|
|
23
|
+
*
|
|
24
|
+
* Reported through {@link MPDebugOptions.wireframeEmitter} for local inspection only.
|
|
25
|
+
* These are the same `SCREAMING_SNAKE_CASE` tokens Android, iOS and Flutter report, so
|
|
26
|
+
* the same decision reads identically on every platform.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ **Not a stable contract.** Values may be added or renamed; treat an unrecognized
|
|
29
|
+
* one as "some kind of masking" rather than matching exhaustively. That is also why
|
|
30
|
+
* {@link MPWireframeElement.maskDecision} is typed `string` rather than a closed union —
|
|
31
|
+
* a new native value should not become a type error.
|
|
32
|
+
*/
|
|
33
|
+
export declare const MPMaskDecision: {
|
|
34
|
+
/** Text emitted as-is. */
|
|
35
|
+
readonly None: "NONE";
|
|
36
|
+
/** Text you declared with the `wireframeText` prop. Sent even when masked. */
|
|
37
|
+
readonly Declared: "DECLARED";
|
|
38
|
+
/** Explicitly masked — `<MPSessionReplayView sensitive>` or a registered class. */
|
|
39
|
+
readonly Explicit: "EXPLICIT";
|
|
40
|
+
/** Auto-masked by an `autoMaskedViews` category. */
|
|
41
|
+
readonly Auto: "AUTO";
|
|
42
|
+
/** A text-entry field. Always masked, cannot be overridden. */
|
|
43
|
+
readonly TextEntry: "TEXT_ENTRY";
|
|
44
|
+
/** Bounds intersected a mask rect the screenshot painted over. */
|
|
45
|
+
readonly Geometric: "GEOMETRIC";
|
|
46
|
+
/** Matched a strip rule; text was dropped. */
|
|
47
|
+
readonly RuleStrip: "RULE_STRIP";
|
|
48
|
+
/** Matched a redact rule; text was rewritten. */
|
|
49
|
+
readonly RuleRedact: "RULE_REDACT";
|
|
50
|
+
};
|
|
51
|
+
/** One element of a captured wireframe. See {@link MPWireframeSnapshot}. */
|
|
52
|
+
export interface MPWireframeElement {
|
|
53
|
+
/** `text`, `button`, `input` or `image`. */
|
|
54
|
+
role: string;
|
|
55
|
+
/** The text this element ships with, or `null` for a textless shell. */
|
|
56
|
+
text: string | null;
|
|
57
|
+
/** `[x, y, width, height]`, in the same units the wireframe event carries. */
|
|
58
|
+
bounds: number[];
|
|
59
|
+
/** One of {@link MPMaskDecision}'s values — see the note there about matching. */
|
|
60
|
+
maskDecision: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* One captured wireframe, exactly as the SDK built it.
|
|
64
|
+
*
|
|
65
|
+
* ⚠️ **Not a stable contract** — a debugging aid, not a schema to build tooling on.
|
|
66
|
+
*/
|
|
67
|
+
export interface MPWireframeSnapshot {
|
|
68
|
+
/** Capture instant in milliseconds, matching the screenshot it accompanies. */
|
|
69
|
+
timestamp: number;
|
|
70
|
+
/** `[width, height]` of the captured viewport. */
|
|
71
|
+
viewport: number[];
|
|
72
|
+
elements: MPWireframeElement[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Color configuration for the on-device debug mask overlay.
|
|
76
|
+
*
|
|
77
|
+
* Each color accepts any React Native [`ColorValue`](https://reactnative.dev/docs/colors)
|
|
78
|
+
* — for example `'red'`, `'#FF0000'`, `'rgba(255, 0, 0, 0.5)'`, or `0xFFFF0000`.
|
|
79
|
+
* Setting any of `maskColor`, `autoMaskColor`, or `unmaskColor` to `null` hides that
|
|
80
|
+
* category from the overlay.
|
|
81
|
+
*
|
|
82
|
+
* The overlay only renders in a debuggable build. That is enforced by the native SDKs
|
|
83
|
+
* themselves, so it is safe to leave `overlayColors` set unconditionally.
|
|
84
|
+
*/
|
|
85
|
+
export declare class MPDebugOverlayColors {
|
|
86
|
+
/**
|
|
87
|
+
* Color used to draw regions that are explicitly masked (sensitive views / text input).
|
|
88
|
+
* Set to `null` to hide masked regions from the overlay.
|
|
89
|
+
*
|
|
90
|
+
* - **Default:** `'red'`
|
|
91
|
+
*/
|
|
92
|
+
maskColor: ColorValue | null;
|
|
93
|
+
/**
|
|
94
|
+
* Color used to draw regions that are auto-masked (text, images, web views, maps).
|
|
95
|
+
* Set to `null` to hide auto-masked regions from the overlay.
|
|
96
|
+
*
|
|
97
|
+
* - **Default:** `'orange'`
|
|
98
|
+
*/
|
|
99
|
+
autoMaskColor: ColorValue | null;
|
|
100
|
+
/**
|
|
101
|
+
* Color used to draw regions explicitly excluded from masking (safe views).
|
|
102
|
+
* Set to `null` to hide unmask regions from the overlay.
|
|
103
|
+
*
|
|
104
|
+
* - **Default:** `'green'`
|
|
105
|
+
*/
|
|
106
|
+
unmaskColor: ColorValue | null;
|
|
107
|
+
/**
|
|
108
|
+
* Opacity of the overlay, from `0.0` (fully transparent) to `1.0` (fully opaque).
|
|
109
|
+
*
|
|
110
|
+
* - **Default:** `0.5`
|
|
111
|
+
*/
|
|
112
|
+
alpha: number;
|
|
113
|
+
constructor({ maskColor, autoMaskColor, unmaskColor, alpha, }?: Partial<MPDebugOverlayColors>);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Configuration for Session Replay debug features.
|
|
117
|
+
*
|
|
118
|
+
* When `overlayColors` is non-null, the SDK renders a visual overlay on top of the app
|
|
119
|
+
* showing which regions are masked, auto-masked, or explicitly unmasked. Set
|
|
120
|
+
* `overlayColors` to `null` to disable the overlay while keeping `MPDebugOptions`
|
|
121
|
+
* available for future debug features.
|
|
122
|
+
*
|
|
123
|
+
* `debugOptions` reaches the native SDK in every bundle, exactly as it would if you
|
|
124
|
+
* configured it natively. Each feature decides for itself what a release build may do:
|
|
125
|
+
* the overlay is restricted to debuggable builds by the native SDKs, while
|
|
126
|
+
* {@link MPDebugOptions.wireframeEmitter} runs wherever you configure it.
|
|
127
|
+
*/
|
|
128
|
+
export declare class MPDebugOptions {
|
|
129
|
+
/**
|
|
130
|
+
* Color configuration for the debug mask overlay. When `null`, the overlay is disabled.
|
|
131
|
+
*
|
|
132
|
+
* - **Default:** `new MPDebugOverlayColors()` (overlay enabled with default colors)
|
|
133
|
+
*/
|
|
134
|
+
overlayColors: MPDebugOverlayColors | null;
|
|
135
|
+
/**
|
|
136
|
+
* Hands each captured wireframe back to JavaScript as it is captured, so you can check
|
|
137
|
+
* what you are sending while you develop.
|
|
138
|
+
*
|
|
139
|
+
* You get exactly the elements that go to Mixpanel, plus the reason each one's text was
|
|
140
|
+
* kept or removed. Nothing delivered here leaves the device.
|
|
141
|
+
*
|
|
142
|
+
* This *observes* wireframe capture; it does not enable it. Wireframes are only captured
|
|
143
|
+
* when {@link MPSessionReplayConfig.wireframesOptions} is set, so a callback on its own is
|
|
144
|
+
* harmless but never fires.
|
|
145
|
+
*
|
|
146
|
+
* It runs in whichever bundle you configure it in, matching the native SDKs. Nothing it
|
|
147
|
+
* delivers leaves the device, but building each snapshot is work the SDK otherwise skips
|
|
148
|
+
* and every frame crosses the bridge — so leave it unset once you are done checking.
|
|
149
|
+
*
|
|
150
|
+
* Configuration only, and deliberately so: declaring the callback is what turns snapshot
|
|
151
|
+
* building on, so there is no way to pay for the work with nothing listening. Set it before
|
|
152
|
+
* {@link MPSessionReplay.initialize}, which is where the destination is attached — a later
|
|
153
|
+
* `initialize` replaces it, and there is no runtime subscribe.
|
|
154
|
+
*
|
|
155
|
+
* Snapshots arrive on a background thread natively and are delivered one per frame, so a
|
|
156
|
+
* slow callback queues work on the bridge. Keep it cheap.
|
|
157
|
+
*
|
|
158
|
+
* ```ts
|
|
159
|
+
* config.debugOptions = new MPDebugOptions({
|
|
160
|
+
* wireframeEmitter: (frame) => {
|
|
161
|
+
* const withText = frame.elements.filter((e) => e.text !== null).length;
|
|
162
|
+
* console.log(`[wireframe] ${frame.elements.length} elements, ${withText} with text`);
|
|
163
|
+
* },
|
|
164
|
+
* });
|
|
165
|
+
* ```
|
|
166
|
+
*
|
|
167
|
+
* - **Default:** `null` (no snapshots are built)
|
|
168
|
+
*/
|
|
169
|
+
wireframeEmitter: ((snapshot: MPWireframeSnapshot) => void) | null;
|
|
170
|
+
constructor({ overlayColors, wireframeEmitter, }?: Partial<MPDebugOptions>);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* A rule that rewrites or drops the text of a wireframe element when it matches.
|
|
174
|
+
*
|
|
175
|
+
* Build rules with the {@link MPSensitiveRule} factories rather than by hand — the object
|
|
176
|
+
* shape below is the wire format the native SDKs decode, not an API to write literals
|
|
177
|
+
* against.
|
|
178
|
+
*
|
|
179
|
+
* Rules run in the order you list them in {@link MPWireframesOptions.sensitiveRules},
|
|
180
|
+
* after the SDK's own masking, over whatever text is left — including text you declared
|
|
181
|
+
* with the `wireframeText` prop on {@link MPSessionReplayView}. A matching strip rule
|
|
182
|
+
* drops the text and stops immediately; a matching redact rule rewrites the text, and any
|
|
183
|
+
* rule after it sees the rewritten value.
|
|
184
|
+
*/
|
|
185
|
+
export type MPSensitiveRule = {
|
|
186
|
+
type: 'redact';
|
|
187
|
+
text: string;
|
|
188
|
+
replacement: string;
|
|
189
|
+
} | {
|
|
190
|
+
type: 'strip';
|
|
191
|
+
text: string;
|
|
192
|
+
} | {
|
|
193
|
+
type: 'redactRegex';
|
|
194
|
+
regex: RegExp;
|
|
195
|
+
replacement: string;
|
|
196
|
+
} | {
|
|
197
|
+
type: 'stripRegex';
|
|
198
|
+
regex: RegExp;
|
|
199
|
+
};
|
|
200
|
+
/** Replacement used by the redact rules when you do not supply one. */
|
|
201
|
+
export declare const MP_DEFAULT_REPLACEMENT = "[REDACTED]";
|
|
202
|
+
/**
|
|
203
|
+
* Factories for the four {@link MPSensitiveRule} variants.
|
|
204
|
+
*
|
|
205
|
+
* ```ts
|
|
206
|
+
* new MPWireframesOptions({
|
|
207
|
+
* sensitiveRules: [
|
|
208
|
+
* MPSensitiveRule.strip('password'),
|
|
209
|
+
* MPSensitiveRule.redactRegex(/[\w.+-]+@[\w-]+\.[\w.]+/g, '[EMAIL]'),
|
|
210
|
+
* ],
|
|
211
|
+
* });
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
export declare const MPSensitiveRule: {
|
|
215
|
+
/**
|
|
216
|
+
* Replaces case-insensitive substring matches of `text` with `replacement`, leaving the
|
|
217
|
+
* surrounding text intact.
|
|
218
|
+
*/
|
|
219
|
+
redact(text: string, replacement?: string): MPSensitiveRule;
|
|
220
|
+
/** Drops the element's text entirely if it contains `text` (case-insensitive). */
|
|
221
|
+
strip(text: string): MPSensitiveRule;
|
|
222
|
+
/**
|
|
223
|
+
* Replaces matches of `regex` with `replacement`, leaving surrounding text intact.
|
|
224
|
+
*
|
|
225
|
+
* Only the `i`, `m` and `s` flags carry over to native; see
|
|
226
|
+
* {@link MPWireframesOptions} for what the regex itself is subject to.
|
|
227
|
+
*/
|
|
228
|
+
redactRegex(regex: RegExp, replacement?: string): MPSensitiveRule;
|
|
229
|
+
/** Drops the element's text entirely if `regex` finds a match anywhere in the text. */
|
|
230
|
+
stripRegex(regex: RegExp): MPSensitiveRule;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Enables wireframe capture for Session Replay.
|
|
234
|
+
*
|
|
235
|
+
* **Beta.** Wireframes are in beta. Before shipping to production, inspect the wireframes
|
|
236
|
+
* your app produces with {@link MPDebugOptions.wireframeEmitter} and confirm that no
|
|
237
|
+
* sensitive information is captured.
|
|
238
|
+
*
|
|
239
|
+
* A wireframe is a lightweight text outline of a screen: the visible elements, what kind
|
|
240
|
+
* each one is (text, button, input, image), what it says, and where it sits. One is
|
|
241
|
+
* captured alongside each screenshot, which lets Mixpanel summarize what your users saw
|
|
242
|
+
* and did without anyone having to watch the replay.
|
|
243
|
+
*
|
|
244
|
+
* Pass one to {@link MPSessionReplayConfig.wireframesOptions} to turn wireframes on.
|
|
245
|
+
* Leave it `null` — the default — and none are captured.
|
|
246
|
+
*
|
|
247
|
+
* Mixpanel can also turn wireframe capture off for a project from the server. The native
|
|
248
|
+
* SDKs honor that switch: the rest of session replay keeps recording, only the wireframe
|
|
249
|
+
* payload is dropped, and the reason is logged at init.
|
|
250
|
+
*
|
|
251
|
+
* ### Your masking settings are respected
|
|
252
|
+
*
|
|
253
|
+
* Anything hidden in the replay video is also removed from the wireframe. The element is
|
|
254
|
+
* still listed so the shape of the screen is preserved, but its text is dropped. That
|
|
255
|
+
* includes anything inside a `<MPSessionReplayView sensitive>`, anything covered by
|
|
256
|
+
* {@link MPSessionReplayConfig.autoMaskedViews}, every `TextInput`, and anything sitting
|
|
257
|
+
* underneath a masked area even if it was never marked sensitive itself.
|
|
258
|
+
*
|
|
259
|
+
* Note what this means for the defaults: `autoMaskedViews` masks `Text` out of the box, so
|
|
260
|
+
* with the default configuration every element ships as a textless shell. Narrow
|
|
261
|
+
* `autoMaskedViews` (and mask what matters with `<MPSessionReplayView sensitive>`) for
|
|
262
|
+
* wireframes to carry readable copy.
|
|
263
|
+
*
|
|
264
|
+
* ### Describing an element yourself
|
|
265
|
+
*
|
|
266
|
+
* The `wireframeText` prop on {@link MPSessionReplayView} supplies the text for an element
|
|
267
|
+
* — useful for custom-drawn content, or anywhere the text picked up automatically isn't
|
|
268
|
+
* meaningful. Because you authored it rather than the SDK scraping it off the screen, it is
|
|
269
|
+
* sent even for an element you've masked in the video.
|
|
270
|
+
*
|
|
271
|
+
* ### Catching sensitive content by pattern
|
|
272
|
+
*
|
|
273
|
+
* {@link sensitiveRules} match on the text itself and run last, over everything above,
|
|
274
|
+
* including text you supplied with `wireframeText`.
|
|
275
|
+
*/
|
|
276
|
+
export declare class MPWireframesOptions {
|
|
277
|
+
/**
|
|
278
|
+
* Rules applied to each element's text before it is sent, in the order you declare them.
|
|
279
|
+
* Elements are always kept; only their text is affected.
|
|
280
|
+
*
|
|
281
|
+
* - A matching strip rule drops the text and stops — no later rule runs.
|
|
282
|
+
* - Redact rules build on one another: a rule declared later sees the result of the ones
|
|
283
|
+
* before it, not the original text.
|
|
284
|
+
*
|
|
285
|
+
* A `RegExp` is compiled by the platform's own engine — `java.util.regex` on Android,
|
|
286
|
+
* ICU on iOS — not by JavaScript. A pattern that is valid JS may behave differently, or
|
|
287
|
+
* be rejected outright, on one of them; a rejected pattern fails `initialize` rather
|
|
288
|
+
* than silently matching nothing. Only the `i`, `m` and `s` flags cross the bridge (they
|
|
289
|
+
* are the three that mean the same thing in all three engines); `g` is implied, since
|
|
290
|
+
* every match is replaced, and any other flag is ignored with a warning. Replacement
|
|
291
|
+
* strings are literal — `$1` is emitted verbatim, not as a back-reference.
|
|
292
|
+
*
|
|
293
|
+
* - **Default:** `[]`
|
|
294
|
+
*/
|
|
295
|
+
sensitiveRules: MPSensitiveRule[];
|
|
296
|
+
/**
|
|
297
|
+
* Whether an element with no text of its own may fall back to its accessibility label
|
|
298
|
+
* (React Native's `accessibilityLabel` prop). Off by default: a label is not drawn on
|
|
299
|
+
* screen, so unlike visible text you cannot confirm what it contains by watching the
|
|
300
|
+
* replay, and labels sometimes hold more than what is shown.
|
|
301
|
+
*
|
|
302
|
+
* Turn it on if you want icons and image buttons named. For an icon-only control the
|
|
303
|
+
* label is usually the only description of what the element is for, and with the fallback
|
|
304
|
+
* off it is sent as a bare shell instead — `wireframeText` is then the only way to
|
|
305
|
+
* describe it.
|
|
306
|
+
*
|
|
307
|
+
* The label is only ever a fallback. Text you set with `wireframeText` wins over it, an
|
|
308
|
+
* element's own visible text wins over it, and a masked element stays textless either way.
|
|
309
|
+
*
|
|
310
|
+
* - **Default:** `false`
|
|
311
|
+
*/
|
|
312
|
+
useAccessibilityLabelFallback: boolean;
|
|
313
|
+
constructor({ sensitiveRules, useAccessibilityLabelFallback, }?: Partial<MPWireframesOptions>);
|
|
314
|
+
}
|
|
12
315
|
export declare class MPSessionReplayConfig {
|
|
13
316
|
/**
|
|
14
317
|
* Determines whether replay events will only be flushed to the server when the device has a WiFi connection.
|
|
@@ -82,7 +385,54 @@ export declare class MPSessionReplayConfig {
|
|
|
82
385
|
* - **Default:** `disabled`
|
|
83
386
|
*/
|
|
84
387
|
remoteSettingsMode: MPSessionReplayRemoteSettingsMode;
|
|
85
|
-
|
|
388
|
+
/**
|
|
389
|
+
* Enables on-device debug features such as the visual mask overlay.
|
|
390
|
+
*
|
|
391
|
+
* When non-null, the SDK renders a colored overlay on top of the app showing which
|
|
392
|
+
* regions are masked, auto-masked, or explicitly unmasked — useful for verifying
|
|
393
|
+
* masking coverage during development. Pass `new MPDebugOptions()` to enable the
|
|
394
|
+
* overlay with default colors, or customize via `MPDebugOverlayColors`.
|
|
395
|
+
*
|
|
396
|
+
* The overlay only renders in a debuggable build — the native SDKs enforce that, so it
|
|
397
|
+
* is safe to leave the option set unconditionally and the overlay will not reach end
|
|
398
|
+
* users. {@link MPDebugOptions.wireframeEmitter}, the other member, has no such
|
|
399
|
+
* restriction and runs wherever you configure it.
|
|
400
|
+
*
|
|
401
|
+
* - **Default:** `null` (disabled)
|
|
402
|
+
*/
|
|
403
|
+
debugOptions: MPDebugOptions | null;
|
|
404
|
+
/**
|
|
405
|
+
* Base URL used to send session replay data to Mixpanel.
|
|
406
|
+
*
|
|
407
|
+
* Use one of the {@link MPDataResidency} constants to target a managed region
|
|
408
|
+
* (`MPDataResidency.US`, `MPDataResidency.EU`, `MPDataResidency.IN`), or pass any
|
|
409
|
+
* fully-qualified `https://` URL to route traffic through a custom endpoint such
|
|
410
|
+
* as a corporate proxy.
|
|
411
|
+
*
|
|
412
|
+
* The URL must use `https://`. The underlying native SDKs validate the URL
|
|
413
|
+
* during `initialize` — invalid URLs cause `initialize` to reject with an error
|
|
414
|
+
* on both platforms.
|
|
415
|
+
*
|
|
416
|
+
* - **Default:** `MPDataResidency.US` (`https://api.mixpanel.com`)
|
|
417
|
+
*/
|
|
418
|
+
serverURL: string;
|
|
419
|
+
/**
|
|
420
|
+
* Enables wireframe capture: a text outline of each captured screen — the visible
|
|
421
|
+
* elements, what they say, and where they sit — recorded alongside the replay so
|
|
422
|
+
* sessions can be summarized without watching them.
|
|
423
|
+
*
|
|
424
|
+
* Pass `new MPWireframesOptions()` to turn it on with the defaults, or customize the
|
|
425
|
+
* content rules and the accessibility-label fallback. Your masking settings apply to
|
|
426
|
+
* it; see {@link MPWireframesOptions}.
|
|
427
|
+
*
|
|
428
|
+
* **Beta.** Wireframes are in beta. Before shipping to production, inspect the wireframes
|
|
429
|
+
* your app produces and confirm that no sensitive information is captured; see
|
|
430
|
+
* {@link MPWireframesOptions}.
|
|
431
|
+
*
|
|
432
|
+
* - **Default:** `null` (wireframe capture disabled)
|
|
433
|
+
*/
|
|
434
|
+
wireframesOptions: MPWireframesOptions | null;
|
|
435
|
+
constructor({ wifiOnly, autoStartRecording, recordingSessionsPercent, autoMaskedViews, flushInterval, enableLogging, remoteSettingsMode, debugOptions, serverURL, wireframesOptions, }?: Partial<MPSessionReplayConfig>);
|
|
86
436
|
private transformMaskValueForPlatform;
|
|
87
437
|
toJSON(): string;
|
|
88
438
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,UAAU,EAGhB,MAAM,cAAc,CAAC;AAGtB,oBAAY,mBAAmB;IAC7B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,GAAG,QAAQ;IACX,KAAK,UAAU;CAChB;AAED,oBAAY,iCAAiC;IAC3C,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,MAAM,CAAC,CAOxE,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc;IACzB,0BAA0B;;IAE1B,8EAA8E;;IAE9E,mFAAmF;;IAEnF,oDAAoD;;IAEpD,+DAA+D;;IAE/D,kE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EAAE,MAAM,6BAA6B,CAAC;AAElE,eAAO,MAAM,eAAe;;;;;;;;CAQ3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mixpanel/react-native-session-replay",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Official React Native turbo module for Mixpanel Session Replay",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
"typecheck": "tsc",
|
|
38
38
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
39
|
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
40
|
-
"prepare": "bob build"
|
|
41
|
-
"release": "release-it --only-version"
|
|
40
|
+
"prepare": "bob build"
|
|
42
41
|
},
|
|
43
42
|
"keywords": [
|
|
44
43
|
"react-native",
|
|
@@ -74,7 +73,6 @@
|
|
|
74
73
|
"@react-native-community/cli": "15.0.0-alpha.2",
|
|
75
74
|
"@react-native/babel-preset": "0.79.2",
|
|
76
75
|
"@react-native/eslint-config": "^0.78.0",
|
|
77
|
-
"@release-it/conventional-changelog": "^9.0.2",
|
|
78
76
|
"@types/jest": "^29.5.5",
|
|
79
77
|
"@types/react": "^19.0.0",
|
|
80
78
|
"commitlint": "^19.6.1",
|
|
@@ -87,7 +85,6 @@
|
|
|
87
85
|
"react": "19.0.0",
|
|
88
86
|
"react-native": "0.79.2",
|
|
89
87
|
"react-native-builder-bob": "^0.40.13",
|
|
90
|
-
"release-it": "^17.10.0",
|
|
91
88
|
"turbo": "^1.10.7",
|
|
92
89
|
"typescript": "^5.8.3"
|
|
93
90
|
},
|
|
@@ -111,25 +108,6 @@
|
|
|
111
108
|
"@commitlint/config-conventional"
|
|
112
109
|
]
|
|
113
110
|
},
|
|
114
|
-
"release-it": {
|
|
115
|
-
"git": {
|
|
116
|
-
"commitMessage": "chore: release ${version}",
|
|
117
|
-
"tagName": "v${version}"
|
|
118
|
-
},
|
|
119
|
-
"npm": {
|
|
120
|
-
"publish": true
|
|
121
|
-
},
|
|
122
|
-
"github": {
|
|
123
|
-
"release": true
|
|
124
|
-
},
|
|
125
|
-
"plugins": {
|
|
126
|
-
"@release-it/conventional-changelog": {
|
|
127
|
-
"preset": {
|
|
128
|
-
"name": "angular"
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
111
|
"prettier": {
|
|
134
112
|
"quoteProps": "consistent",
|
|
135
113
|
"singleQuote": true,
|
|
@@ -1,7 +1,40 @@
|
|
|
1
1
|
import { requireNativeComponent, type ViewProps } from 'react-native';
|
|
2
2
|
|
|
3
3
|
interface MixpanelSessionReplayViewProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Masks everything inside this view in the replay video, and drops the text of every
|
|
6
|
+
* wireframe element under it.
|
|
7
|
+
*
|
|
8
|
+
* Controls pixels. Orthogonal to {@link wireframeText}, which controls what the
|
|
9
|
+
* wireframe *says*; the two compose.
|
|
10
|
+
*/
|
|
4
11
|
sensitive?: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Declares the text recorded for this view in the wireframe.
|
|
15
|
+
*
|
|
16
|
+
* **Beta.** Wireframes are in beta; see `MPWireframesOptions` for what to check before
|
|
17
|
+
* shipping to production.
|
|
18
|
+
*
|
|
19
|
+
* Use it to describe content the SDK can't read — custom-drawn views, charts, canvases —
|
|
20
|
+
* or to attach an analytical label. Declared text wins over the view's own visible text
|
|
21
|
+
* and over its accessibility label.
|
|
22
|
+
*
|
|
23
|
+
* **It is sent even when the view is masked.** Masking hides the pixels while the
|
|
24
|
+
* declared text still describes the view for the summary. Because you authored it rather
|
|
25
|
+
* than the SDK scraping it off the screen, making sure the text is not itself sensitive
|
|
26
|
+
* is up to you — if it could be, leave it off.
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <MPSessionReplayView sensitive wireframeText="Card number">
|
|
30
|
+
* <CardNumberField />
|
|
31
|
+
* </MPSessionReplayView>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* Requires `wireframesOptions` on the config; without it no wireframes are captured and
|
|
35
|
+
* this prop does nothing. Blank strings are ignored.
|
|
36
|
+
*/
|
|
37
|
+
wireframeText?: string;
|
|
5
38
|
}
|
|
6
39
|
|
|
7
40
|
export const MPSessionReplayView =
|
|
@@ -14,6 +14,13 @@ export interface Spec extends TurboModule {
|
|
|
14
14
|
identify(distinctId: string): Promise<void>;
|
|
15
15
|
getReplayId(): Promise<string | null>;
|
|
16
16
|
flush(): Promise<void>;
|
|
17
|
+
|
|
18
|
+
// Event-emitter plumbing for the wireframe debug channel. `NativeEventEmitter`
|
|
19
|
+
// requires both on a TurboModule; on iOS they are inherited from `RCTEventEmitter`,
|
|
20
|
+
// and on Android they are no-ops because events go out over `RCTDeviceEventEmitter`,
|
|
21
|
+
// which needs no per-listener registration.
|
|
22
|
+
addListener(eventName: string): void;
|
|
23
|
+
removeListeners(count: number): void;
|
|
17
24
|
}
|
|
18
25
|
|
|
19
26
|
// Type declaration for global to include __turboModuleProxy
|