@userflow-tech/react-native 0.1.0 → 0.1.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.
- package/README.md +24 -14
- package/app.plugin.js +3 -0
- package/babel-plugin/index.d.ts +43 -0
- package/babel-plugin/index.d.ts.map +1 -0
- package/babel-plugin/index.js +854 -0
- package/babel-plugin/index.js.map +1 -0
- package/docs/deep-linking.md +2 -2
- package/docs/troubleshooting.md +2 -2
- package/expo-plugin/withUserflow.d.ts +17 -0
- package/expo-plugin/withUserflow.d.ts.map +1 -0
- package/expo-plugin/withUserflow.js +99 -0
- package/expo-plugin/withUserflow.js.map +1 -0
- package/lib/commonjs/anchors/AutoAnchorRegistry.js +1 -1
- package/lib/commonjs/anchors/autoAnchor.js +1 -1
- package/lib/commonjs/anchors/hintsCodec.js +1 -1
- package/lib/commonjs/pairing/diagnostics.js +2 -2
- package/lib/commonjs/pairing/diagnostics.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/module/anchors/AutoAnchorRegistry.js +1 -1
- package/lib/module/anchors/autoAnchor.js +1 -1
- package/lib/module/anchors/hintsCodec.js +1 -1
- package/lib/module/pairing/diagnostics.js +2 -2
- package/lib/module/pairing/diagnostics.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts +1 -1
- package/lib/typescript/commonjs/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/anchors/autoAnchor.d.ts +1 -1
- package/lib/typescript/commonjs/src/anchors/hintsCodec.d.ts +1 -1
- package/lib/typescript/commonjs/src/version.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts +1 -1
- package/lib/typescript/module/src/anchors/AutoAnchorRegistry.d.ts.map +1 -1
- package/lib/typescript/module/src/anchors/autoAnchor.d.ts +1 -1
- package/lib/typescript/module/src/anchors/hintsCodec.d.ts +1 -1
- package/lib/typescript/module/src/version.d.ts +1 -1
- package/package.json +15 -7
- package/src/anchors/AutoAnchorRegistry.ts +1 -1
- package/src/anchors/autoAnchor.ts +1 -1
- package/src/anchors/hintsCodec.ts +1 -1
- package/src/pairing/diagnostics.ts +2 -2
- package/src/version.ts +1 -1
- package/vendor/core/LICENSE +76 -0
- package/vendor/core/README.md +9 -0
- package/vendor/core/dist/attributes.d.ts +16 -0
- package/vendor/core/dist/attributes.d.ts.map +1 -0
- package/vendor/core/dist/attributes.js +55 -0
- package/vendor/core/dist/attributes.js.map +1 -0
- package/vendor/core/dist/constants.d.ts +21 -0
- package/vendor/core/dist/constants.d.ts.map +1 -0
- package/vendor/core/dist/constants.js +21 -0
- package/vendor/core/dist/constants.js.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts +68 -0
- package/vendor/core/dist/engine/ClientConditionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js +197 -0
- package/vendor/core/dist/engine/ClientConditionEngine.js.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts +92 -0
- package/vendor/core/dist/engine/FlowSessionEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js +310 -0
- package/vendor/core/dist/engine/FlowSessionEngine.js.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts +92 -0
- package/vendor/core/dist/engine/PairingEngine.d.ts.map +1 -0
- package/vendor/core/dist/engine/PairingEngine.js +302 -0
- package/vendor/core/dist/engine/PairingEngine.js.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts +126 -0
- package/vendor/core/dist/engine/UserflowCore.d.ts.map +1 -0
- package/vendor/core/dist/engine/UserflowCore.js +266 -0
- package/vendor/core/dist/engine/UserflowCore.js.map +1 -0
- package/vendor/core/dist/engine/handleActions.d.ts +19 -0
- package/vendor/core/dist/engine/handleActions.d.ts.map +1 -0
- package/vendor/core/dist/engine/handleActions.js +71 -0
- package/vendor/core/dist/engine/handleActions.js.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts +7 -0
- package/vendor/core/dist/engine/interpolateSessionData.d.ts.map +1 -0
- package/vendor/core/dist/engine/interpolateSessionData.js +29 -0
- package/vendor/core/dist/engine/interpolateSessionData.js.map +1 -0
- package/vendor/core/dist/errors.d.ts +9 -0
- package/vendor/core/dist/errors.d.ts.map +1 -0
- package/vendor/core/dist/errors.js +15 -0
- package/vendor/core/dist/errors.js.map +1 -0
- package/vendor/core/dist/eventAttributes.d.ts +7 -0
- package/vendor/core/dist/eventAttributes.d.ts.map +1 -0
- package/vendor/core/dist/eventAttributes.js +31 -0
- package/vendor/core/dist/eventAttributes.js.map +1 -0
- package/vendor/core/dist/index.d.ts +30 -0
- package/vendor/core/dist/index.d.ts.map +1 -0
- package/vendor/core/dist/index.js +21 -0
- package/vendor/core/dist/index.js.map +1 -0
- package/vendor/core/dist/transport/backoff.d.ts +11 -0
- package/vendor/core/dist/transport/backoff.d.ts.map +1 -0
- package/vendor/core/dist/transport/backoff.js +17 -0
- package/vendor/core/dist/transport/backoff.js.map +1 -0
- package/vendor/core/dist/transport/pairing.d.ts +121 -0
- package/vendor/core/dist/transport/pairing.d.ts.map +1 -0
- package/vendor/core/dist/transport/pairing.js +551 -0
- package/vendor/core/dist/transport/pairing.js.map +1 -0
- package/vendor/core/dist/transport/phoenix.d.ts +223 -0
- package/vendor/core/dist/transport/phoenix.d.ts.map +1 -0
- package/vendor/core/dist/transport/phoenix.js +757 -0
- package/vendor/core/dist/transport/phoenix.js.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts +17 -0
- package/vendor/core/dist/transport/rateLimiter.d.ts.map +1 -0
- package/vendor/core/dist/transport/rateLimiter.js +30 -0
- package/vendor/core/dist/transport/rateLimiter.js.map +1 -0
- package/vendor/core/dist/transport/scheduler.d.ts +12 -0
- package/vendor/core/dist/transport/scheduler.d.ts.map +1 -0
- package/vendor/core/dist/transport/scheduler.js +11 -0
- package/vendor/core/dist/transport/scheduler.js.map +1 -0
- package/vendor/core/dist/types.d.ts +35 -0
- package/vendor/core/dist/types.d.ts.map +1 -0
- package/vendor/core/dist/types.js +2 -0
- package/vendor/core/dist/types.js.map +1 -0
- package/vendor/core/dist/version.d.ts +3 -0
- package/vendor/core/dist/version.d.ts.map +1 -0
- package/vendor/core/dist/version.js +3 -0
- package/vendor/core/dist/version.js.map +1 -0
- package/vendor/core/package.json +20 -0
- package/vendor/protocol/LICENSE +76 -0
- package/vendor/protocol/README.md +8 -0
- package/vendor/protocol/dist/autoData.d.ts +232 -0
- package/vendor/protocol/dist/autoData.d.ts.map +1 -0
- package/vendor/protocol/dist/autoData.js +78 -0
- package/vendor/protocol/dist/autoData.js.map +1 -0
- package/vendor/protocol/dist/events.d.ts +16 -0
- package/vendor/protocol/dist/events.d.ts.map +1 -0
- package/vendor/protocol/dist/events.js +8 -0
- package/vendor/protocol/dist/events.js.map +1 -0
- package/vendor/protocol/dist/flows.d.ts +298 -0
- package/vendor/protocol/dist/flows.d.ts.map +1 -0
- package/vendor/protocol/dist/flows.js +154 -0
- package/vendor/protocol/dist/flows.js.map +1 -0
- package/vendor/protocol/dist/index.d.ts +24 -0
- package/vendor/protocol/dist/index.d.ts.map +1 -0
- package/vendor/protocol/dist/index.js +16 -0
- package/vendor/protocol/dist/index.js.map +1 -0
- package/vendor/protocol/dist/messages.d.ts +166 -0
- package/vendor/protocol/dist/messages.d.ts.map +1 -0
- package/vendor/protocol/dist/messages.js +57 -0
- package/vendor/protocol/dist/messages.js.map +1 -0
- package/vendor/protocol/dist/pairing.d.ts +56 -0
- package/vendor/protocol/dist/pairing.d.ts.map +1 -0
- package/vendor/protocol/dist/pairing.js +146 -0
- package/vendor/protocol/dist/pairing.js.map +1 -0
- package/vendor/protocol/package.json +17 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phoenix.js","sourceRoot":"","sources":["../../src/transport/phoenix.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,eAAe,EAA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;QAClB,EAAE,CAAC,OAAO,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC;YACH,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,KAAK,EAAE;YAAE,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;IACrC,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QACzB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC7B,CAAC;CACF;AAED,iFAAiF;AACjF,MAAM,UAAU,mBAAmB,CACjC,WAAmB,EACnB,cAAsB,EACtB,UAA0B;IAE1B,OAAO,IAAI,iBAAiB,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,CAAC,CAAC,QAAQ,EAAE,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Default outbound client-message cap (messages per minute). */
|
|
2
|
+
export declare const RATE_LIMIT_PER_MINUTE = 100;
|
|
3
|
+
export interface RateLimiterOptions {
|
|
4
|
+
capacity?: number;
|
|
5
|
+
intervalMs?: number;
|
|
6
|
+
now?: () => number;
|
|
7
|
+
}
|
|
8
|
+
export interface RateLimiter {
|
|
9
|
+
tryAcquire(): boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fixed-window counter for outbound client messages. Allows up to `capacity`
|
|
13
|
+
* acquires per `intervalMs` (default 100/min); the window resets when it
|
|
14
|
+
* expires. Injectable `now()` keeps tests deterministic without timers.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createRateLimiter(options?: RateLimiterOptions): RateLimiter;
|
|
17
|
+
//# sourceMappingURL=rateLimiter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rateLimiter.d.ts","sourceRoot":"","sources":["../../src/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAIzC,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,IAAI,OAAO,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,WAAW,CAsB3E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Default outbound client-message cap (messages per minute). */
|
|
2
|
+
export const RATE_LIMIT_PER_MINUTE = 100;
|
|
3
|
+
const DEFAULT_INTERVAL_MS = 60000;
|
|
4
|
+
/**
|
|
5
|
+
* Fixed-window counter for outbound client messages. Allows up to `capacity`
|
|
6
|
+
* acquires per `intervalMs` (default 100/min); the window resets when it
|
|
7
|
+
* expires. Injectable `now()` keeps tests deterministic without timers.
|
|
8
|
+
*/
|
|
9
|
+
export function createRateLimiter(options) {
|
|
10
|
+
const capacity = options?.capacity ?? RATE_LIMIT_PER_MINUTE;
|
|
11
|
+
const intervalMs = options?.intervalMs ?? DEFAULT_INTERVAL_MS;
|
|
12
|
+
const now = options?.now ?? (() => Date.now());
|
|
13
|
+
let count = 0;
|
|
14
|
+
let windowExpires = 0;
|
|
15
|
+
return {
|
|
16
|
+
tryAcquire() {
|
|
17
|
+
const current = now();
|
|
18
|
+
if (windowExpires === 0 || windowExpires < current) {
|
|
19
|
+
count = 0;
|
|
20
|
+
windowExpires = current + intervalMs;
|
|
21
|
+
}
|
|
22
|
+
if (count >= capacity) {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
count++;
|
|
26
|
+
return true;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=rateLimiter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rateLimiter.js","sourceRoot":"","sources":["../../src/transport/rateLimiter.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,MAAM,mBAAmB,GAAG,KAAM,CAAC;AAYnC;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC5D,MAAM,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,qBAAqB,CAAC;IAC5D,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,mBAAmB,CAAC;IAC9D,MAAM,GAAG,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAE/C,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,aAAa,GAAG,CAAC,CAAC;IAEtB,OAAO;QACL,UAAU;YACR,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC;YACtB,IAAI,aAAa,KAAK,CAAC,IAAI,aAAa,GAAG,OAAO,EAAE,CAAC;gBACnD,KAAK,GAAG,CAAC,CAAC;gBACV,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC;YACvC,CAAC;YACD,IAAI,KAAK,IAAI,QAAQ,EAAE,CAAC;gBACtB,OAAO,KAAK,CAAC;YACf,CAAC;YACD,KAAK,EAAE,CAAC;YACR,OAAO,IAAI,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A minimal timer abstraction so reconnect/heartbeat timing is injectable and
|
|
3
|
+
* therefore deterministic in tests. Production uses {@link defaultScheduler},
|
|
4
|
+
* which delegates to the global timers; tests inject a controllable fake.
|
|
5
|
+
*/
|
|
6
|
+
export type TimerHandle = ReturnType<typeof globalThis.setTimeout>;
|
|
7
|
+
export interface Scheduler {
|
|
8
|
+
setTimeout(handler: () => void, ms: number): TimerHandle;
|
|
9
|
+
clearTimeout(handle: TimerHandle): void;
|
|
10
|
+
}
|
|
11
|
+
export declare const defaultScheduler: Scheduler;
|
|
12
|
+
//# sourceMappingURL=scheduler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.d.ts","sourceRoot":"","sources":["../../src/transport/scheduler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,UAAU,CAAC,CAAC;AAEnE,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,OAAO,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAAC;IACzD,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAAC;CACzC;AAED,eAAO,MAAM,gBAAgB,EAAE,SAS9B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const defaultScheduler = {
|
|
2
|
+
setTimeout: (handler, ms) => {
|
|
3
|
+
const handle = globalThis.setTimeout(handler, ms);
|
|
4
|
+
// In Node, keep background timers (heartbeat/reconnect) from holding the
|
|
5
|
+
// event loop open. No-op in React Native, where the handle is a number.
|
|
6
|
+
handle.unref?.();
|
|
7
|
+
return handle;
|
|
8
|
+
},
|
|
9
|
+
clearTimeout: (handle) => globalThis.clearTimeout(handle),
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=scheduler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduler.js","sourceRoot":"","sources":["../../src/transport/scheduler.ts"],"names":[],"mappings":"AAYA,MAAM,CAAC,MAAM,gBAAgB,GAAc;IACzC,UAAU,EAAE,CAAC,OAAO,EAAE,EAAE,EAAE,EAAE;QAC1B,MAAM,MAAM,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAClD,yEAAyE;QACzE,wEAAwE;QACvE,MAAiC,CAAC,KAAK,EAAE,EAAE,CAAC;QAC7C,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,MAAM,CAAC;CAC1D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { UserflowAttributes } from '@userflow-tech/protocol';
|
|
2
|
+
/** The credentials a host app supplies to identify its Userflow environment. */
|
|
3
|
+
export interface UserflowCredentials {
|
|
4
|
+
/** Environment client token from the Userflow dashboard (the `ct_...` value). */
|
|
5
|
+
clientToken: string;
|
|
6
|
+
}
|
|
7
|
+
/** Options accepted by `init()`. `serverEndpoint` defaults to Userflow
|
|
8
|
+
* production; pass it explicitly to target a local dev stack. */
|
|
9
|
+
export type UserflowInitOptions = UserflowCredentials & {
|
|
10
|
+
serverEndpoint?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Options accepted by `identify()`. Mirrors the web SDK's third argument. */
|
|
13
|
+
export interface UserflowIdentifyOptions {
|
|
14
|
+
/** HMAC-SHA256 signature of the user id, computed by the host app. */
|
|
15
|
+
signature?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Options accepted by `group()`. Mirrors the web SDK's third argument. */
|
|
18
|
+
export interface UserflowGroupOptions {
|
|
19
|
+
/** HMAC-SHA256 signature of the group id, computed by the host app. */
|
|
20
|
+
signature?: string;
|
|
21
|
+
/** Attributes describing this user's relationship to the group. */
|
|
22
|
+
membership?: UserflowAttributes;
|
|
23
|
+
}
|
|
24
|
+
/** Attributes passed to `track()` — same literal values as identify/group. */
|
|
25
|
+
export type UserflowEventAttributes = UserflowAttributes;
|
|
26
|
+
/** Options accepted by `track()`. Mirrors the web SDK's third argument. */
|
|
27
|
+
export interface UserflowTrackOptions {
|
|
28
|
+
/** When true, the event is not associated with the current group. */
|
|
29
|
+
userOnly?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** The resolved configuration held after a successful `init()`. */
|
|
32
|
+
export type UserflowConfig = UserflowCredentials & {
|
|
33
|
+
serverEndpoint: string;
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,gFAAgF;AAChF,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;iEACiE;AACjE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,8EAA8E;AAC9E,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mEAAmE;IACnE,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED,8EAA8E;AAC9E,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC;AAEzD,2EAA2E;AAC3E,MAAM,WAAW,oBAAoB;IACnC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,mEAAmE;AACnE,MAAM,MAAM,cAAc,GAAG,mBAAmB,GAAG;IACjD,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,YAAY,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@userflow-tech/core",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Userflow React Native SDK core — platform-agnostic engine and protocol client.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@userflow-tech/protocol": "file:../protocol"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
Userflow React Native SDK
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Userflow Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
PROPRIETARY AND CONFIDENTIAL
|
|
6
|
+
|
|
7
|
+
This software and its source code (the "Software") are the proprietary and
|
|
8
|
+
confidential property of Userflow Inc. ("Userflow"). The Software is licensed,
|
|
9
|
+
not sold.
|
|
10
|
+
|
|
11
|
+
1. Grant of License
|
|
12
|
+
|
|
13
|
+
Use of the Software is permitted only by parties who have entered into a
|
|
14
|
+
written agreement with Userflow that expressly covers the Software (the
|
|
15
|
+
"Agreement"), and only for the duration, purposes, and scope set out in
|
|
16
|
+
that Agreement. Where the Software is provided for evaluation or as part
|
|
17
|
+
of an early-access or design-partner program, use is limited to internal
|
|
18
|
+
evaluation and integration testing unless the Agreement states otherwise.
|
|
19
|
+
|
|
20
|
+
If you have not entered into such an Agreement with Userflow, you are
|
|
21
|
+
granted no rights to use, copy, modify, or distribute the Software.
|
|
22
|
+
|
|
23
|
+
2. Restrictions
|
|
24
|
+
|
|
25
|
+
Except as expressly permitted by the Agreement or by applicable law, you
|
|
26
|
+
may not:
|
|
27
|
+
|
|
28
|
+
(a) redistribute, sublicense, sell, rent, lease, or otherwise transfer the
|
|
29
|
+
Software or any portion of it to any third party, except that you may
|
|
30
|
+
ship the Software in compiled or bundled form as an integral part of
|
|
31
|
+
your own applications distributed to your end users, provided you do
|
|
32
|
+
not redistribute the Software as a standalone library or SDK;
|
|
33
|
+
(b) modify or create derivative works of the Software, except for
|
|
34
|
+
automated transformations performed by ordinary build tooling
|
|
35
|
+
(including transpilation, bundling, minification, tree-shaking, and
|
|
36
|
+
source-map generation) and other modifications reasonably necessary
|
|
37
|
+
to integrate the Software into your applications, provided that any
|
|
38
|
+
such modifications remain subject to this notice;
|
|
39
|
+
(c) remove or obscure any copyright, trademark, or other proprietary
|
|
40
|
+
notices contained in the Software;
|
|
41
|
+
(d) disclose the Software's source code to any third party, except to your
|
|
42
|
+
employees and contractors who need access for a purpose permitted by
|
|
43
|
+
the Agreement and who are bound by written confidentiality
|
|
44
|
+
obligations no less protective than those in the Agreement.
|
|
45
|
+
|
|
46
|
+
3. Pre-Release Software
|
|
47
|
+
|
|
48
|
+
The Software may be provided prior to general availability. It may be
|
|
49
|
+
incomplete, may change without notice, and may not be backward compatible
|
|
50
|
+
between versions. Userflow is under no obligation to provide maintenance,
|
|
51
|
+
support, updates, or future releases except as set out in the Agreement.
|
|
52
|
+
|
|
53
|
+
4. No Warranty
|
|
54
|
+
|
|
55
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
56
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
57
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
58
|
+
|
|
59
|
+
5. Limitation of Liability
|
|
60
|
+
|
|
61
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL
|
|
62
|
+
USERFLOW BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN
|
|
63
|
+
AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN
|
|
64
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
65
|
+
|
|
66
|
+
6. Precedence
|
|
67
|
+
|
|
68
|
+
In the event of a conflict between this notice and the Agreement, the
|
|
69
|
+
Agreement governs.
|
|
70
|
+
|
|
71
|
+
For licensing enquiries, contact:
|
|
72
|
+
|
|
73
|
+
Userflow Inc.
|
|
74
|
+
548 Market St PMB 69598
|
|
75
|
+
San Francisco, CA 94104-5401
|
|
76
|
+
United States
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# `@userflow-tech/protocol`
|
|
2
|
+
|
|
3
|
+
Wire contracts and shared types for the Userflow React Native SDK.
|
|
4
|
+
|
|
5
|
+
**This package is an implementation detail and is not published.** It is
|
|
6
|
+
vendored into `@userflow-tech/react-native` at pack time. Host apps should
|
|
7
|
+
depend on that package only. Do not import `@userflow-tech/protocol` from
|
|
8
|
+
application code.
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `FlowSelector.autoData` envelope used for MOBILE flows.
|
|
3
|
+
*
|
|
4
|
+
* The schema-level field is a free-form `String` (see
|
|
5
|
+
* `schema/userflow.introspection.json` -> FlowSelector.autoData). Both the
|
|
6
|
+
* mobile recorder and the mobile runtime serialize/deserialize this JSON
|
|
7
|
+
* on top of it. The dashboard rendering code reads this envelope to know
|
|
8
|
+
* how to draw mobile element rectangles.
|
|
9
|
+
*
|
|
10
|
+
* Decode is a client-side concern: the backend stores an opaque string so the
|
|
11
|
+
* payload can evolve without a schema migration. `decodeMobileAutoData` parses
|
|
12
|
+
* that string and shape-checks it; garbage / unknown shapes return `null`.
|
|
13
|
+
*
|
|
14
|
+
* There is no v1 (web-style `candidates[]`) normalization shim. The mobile
|
|
15
|
+
* Builder panel that would emit a mobile envelope is not on `main` yet; guessing
|
|
16
|
+
* at a v1 shape here would lock in a contract that does not exist on our side.
|
|
17
|
+
* Unknown / non-matching JSON still fails closed (`null`).
|
|
18
|
+
*
|
|
19
|
+
* Nothing in this SDK consumes these types at runtime yet. They exist so later
|
|
20
|
+
* stages can decode `autoData` and score live hosts against `fingerprint`.
|
|
21
|
+
*/
|
|
22
|
+
export declare const MOBILE_AUTODATA_VERSION = 1;
|
|
23
|
+
export type MobilePlatform = 'react-native' | 'flutter' | 'native-ios' | 'native-android';
|
|
24
|
+
/**
|
|
25
|
+
* The full payload stored in `FlowSelector.autoData` for mobile flows.
|
|
26
|
+
*
|
|
27
|
+
* Forward-compat: consumers MUST tolerate unknown keys. Producers MUST
|
|
28
|
+
* include `version` so older readers can fall back gracefully.
|
|
29
|
+
*/
|
|
30
|
+
export interface MobileAutoData {
|
|
31
|
+
version: typeof MOBILE_AUTODATA_VERSION;
|
|
32
|
+
platform: MobilePlatform;
|
|
33
|
+
/** Canonical semantic selector path (IDs replace ordinals when present). */
|
|
34
|
+
selector: string;
|
|
35
|
+
/** Display name of the bound widget/component. */
|
|
36
|
+
displayName: string;
|
|
37
|
+
/** When the developer set a userflow-id / testID / accessibilityIdentifier. */
|
|
38
|
+
anchorId?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Authoritative developer-set identity (`userflowId` → `testID` → `nativeID`).
|
|
41
|
+
*/
|
|
42
|
+
manualId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Codeless build-time identity stamped by `@userflow-tech/react-native/babel-plugin`.
|
|
45
|
+
* `ufid` is the canonical structural path; `nativeId` is a build-local
|
|
46
|
+
* registry alias (`uf_<hash>`).
|
|
47
|
+
*/
|
|
48
|
+
primary?: {
|
|
49
|
+
ufid: string;
|
|
50
|
+
nativeId?: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Semantic identity fingerprint. Resolve scores live registry instances
|
|
54
|
+
* against this snapshot (explicit IDs, tree context, privacy-filtered labels).
|
|
55
|
+
*/
|
|
56
|
+
fingerprint?: MobileFingerprint;
|
|
57
|
+
/**
|
|
58
|
+
* Fiber-walk identity for **unstamped** elements (third-party / library UI the
|
|
59
|
+
* Babel plugin never sees). Captured from the live React fiber tree at tag time
|
|
60
|
+
* and re-resolved against it at play time. Present only when the registry
|
|
61
|
+
* fingerprint could not describe the target.
|
|
62
|
+
*
|
|
63
|
+
* Reserved: accepted on the wire for forward-compat so captured payloads still
|
|
64
|
+
* decode. This SDK does not consume `fiberPath`; it has its own fiber layer at
|
|
65
|
+
* `packages/react-native/src/anchors/fiber/`.
|
|
66
|
+
*/
|
|
67
|
+
fiberPath?: MobileFiberPath;
|
|
68
|
+
/**
|
|
69
|
+
* Which mechanism resolves this step. Defaults to `registry` when absent.
|
|
70
|
+
*
|
|
71
|
+
* Reserved: accepted on the wire for forward-compat. This SDK does not consume
|
|
72
|
+
* `resolver`.
|
|
73
|
+
*/
|
|
74
|
+
resolver?: 'registry' | 'fiber';
|
|
75
|
+
/** Screen route name. */
|
|
76
|
+
screenId: string;
|
|
77
|
+
screenName?: string;
|
|
78
|
+
platformData?: PlatformData;
|
|
79
|
+
device?: DeviceMetadata;
|
|
80
|
+
}
|
|
81
|
+
/** Fingerprint schema versions this runtime can still read (newest first). */
|
|
82
|
+
export declare const SUPPORTED_MOBILE_FINGERPRINT_VERSIONS: readonly ["rn-v3", "rn-v2"];
|
|
83
|
+
export type MobileFingerprintVersion = (typeof SUPPORTED_MOBILE_FINGERPRINT_VERSIONS)[number];
|
|
84
|
+
/** Version written by current producers. Readers also accept legacy `rn-v2`. */
|
|
85
|
+
export declare const MOBILE_FINGERPRINT_VERSION = "rn-v3";
|
|
86
|
+
/**
|
|
87
|
+
* Strongest identity signal a fingerprint rests on:
|
|
88
|
+
* - `id` — explicit developer id (userflowId / testID / nativeID). Most durable.
|
|
89
|
+
* - `content` — intrinsic content (child text / a11y label / icon / image). Durable
|
|
90
|
+
* across structural edits.
|
|
91
|
+
* - `structural` — only ordinal/position evidence. Brittle across builds; authors should
|
|
92
|
+
* add a `userflowId`. Still fail-closed at resolve.
|
|
93
|
+
*/
|
|
94
|
+
export type IdentityStrength = 'id' | 'content' | 'structural';
|
|
95
|
+
/** Semantic role used for tree matching (normalized from host kind). */
|
|
96
|
+
export type SemanticRole = 'Action' | 'Text' | 'Image' | 'Group' | 'Input' | 'Other';
|
|
97
|
+
/** One ancestor / path segment in the semantic tree. */
|
|
98
|
+
export interface SemanticSegment {
|
|
99
|
+
/** Host or component kind, e.g. Pressable, View, HeaderButton. */
|
|
100
|
+
kind: string;
|
|
101
|
+
role?: SemanticRole;
|
|
102
|
+
userflowId?: string;
|
|
103
|
+
testID?: string;
|
|
104
|
+
nativeID?: string;
|
|
105
|
+
key?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Weak positional metadata. Not part of canonical identity when an
|
|
108
|
+
* explicit ID is present on the segment.
|
|
109
|
+
*/
|
|
110
|
+
ordinal?: number;
|
|
111
|
+
}
|
|
112
|
+
/** Neighbour descriptor for bidirectional sibling alignment. */
|
|
113
|
+
export interface SiblingDescriptor {
|
|
114
|
+
kind: string;
|
|
115
|
+
role?: SemanticRole;
|
|
116
|
+
text?: string;
|
|
117
|
+
testID?: string;
|
|
118
|
+
userflowId?: string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Semantic fingerprint (rn-v3).
|
|
122
|
+
*
|
|
123
|
+
* Stored on the flow step at tag time; re-matched against the live
|
|
124
|
+
* multi-instance AnchorRegistry at resolve time. Explicit IDs are
|
|
125
|
+
* authoritative. Ordinals are weak evidence only.
|
|
126
|
+
*
|
|
127
|
+
* Readers also accept legacy `rn-v2` fingerprints. `rn-v1` candidate-shaped
|
|
128
|
+
* objects are rejected (`isMobileFingerprint` returns false).
|
|
129
|
+
*/
|
|
130
|
+
export interface MobileFingerprint {
|
|
131
|
+
version: MobileFingerprintVersion;
|
|
132
|
+
/** Canonical path with IDs replacing ordinals where present. */
|
|
133
|
+
structuralPath: string;
|
|
134
|
+
/** Template path at the JSX literal (no call-site scope). */
|
|
135
|
+
templatePath: string;
|
|
136
|
+
/** Call-site composed scope for shared / nested components. */
|
|
137
|
+
instanceScope?: string;
|
|
138
|
+
kind: string;
|
|
139
|
+
role: SemanticRole;
|
|
140
|
+
manualId?: string;
|
|
141
|
+
userflowId?: string;
|
|
142
|
+
testID?: string;
|
|
143
|
+
nativeID?: string;
|
|
144
|
+
/** Privacy-filtered visible / child text. */
|
|
145
|
+
childText?: string;
|
|
146
|
+
/** Privacy-filtered accessibility label. */
|
|
147
|
+
accessibilityLabel?: string;
|
|
148
|
+
childShape?: string;
|
|
149
|
+
/** Icon name (`<Icon name="settings">`) — position-independent identity. */
|
|
150
|
+
iconName?: string;
|
|
151
|
+
/** Literal image source uri — position-independent identity. */
|
|
152
|
+
imageSrc?: string;
|
|
153
|
+
ancestors: SemanticSegment[];
|
|
154
|
+
previousSiblings: SiblingDescriptor[];
|
|
155
|
+
nextSiblings: SiblingDescriptor[];
|
|
156
|
+
/** Weak ordinal among same-kind siblings under the parent. */
|
|
157
|
+
ordinal?: number;
|
|
158
|
+
siblingIndex?: number;
|
|
159
|
+
isPressable?: boolean;
|
|
160
|
+
/** True when the tagged instance was not uniquely distinguishable. */
|
|
161
|
+
ambiguous?: boolean;
|
|
162
|
+
/** Strongest signal this identity rests on (see {@link IdentityStrength}). */
|
|
163
|
+
identityStrength?: IdentityStrength;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* One segment of a fiber-walk identity, root → leaf. Only release-stable signals
|
|
167
|
+
* are stored: host `kind` (`View`/`Text`/`Image`/…) is minification-proof, whereas
|
|
168
|
+
* `displayName` (a custom component name) may be mangled in release and is used
|
|
169
|
+
* only as a tiebreaker. `onPress` fingerprints are intentionally absent (Hermes
|
|
170
|
+
* strips function source). Text/label are privacy-filtered before storage.
|
|
171
|
+
*
|
|
172
|
+
* Reserved: part of the wire envelope for forward-compat. This SDK does not
|
|
173
|
+
* consume fiber-walk segments; it has its own fiber layer at
|
|
174
|
+
* `packages/react-native/src/anchors/fiber/`.
|
|
175
|
+
*/
|
|
176
|
+
export interface MobileFiberSegment {
|
|
177
|
+
/** Component/host name; unreliable when minified — tiebreaker only. */
|
|
178
|
+
displayName: string;
|
|
179
|
+
/** Nearest host kind for this segment (stable across builds). */
|
|
180
|
+
hostKind?: string;
|
|
181
|
+
/** Index among same-level siblings at capture (weak, relative). */
|
|
182
|
+
siblingIndex?: number;
|
|
183
|
+
key?: string;
|
|
184
|
+
text?: string;
|
|
185
|
+
testID?: string;
|
|
186
|
+
accessibilityLabel?: string;
|
|
187
|
+
imageSrc?: string;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Fiber-walk identity for an unstamped element. Re-resolved at play time by
|
|
191
|
+
* walking the live fiber tree from the Userflow content-root (no dev-only globals).
|
|
192
|
+
*
|
|
193
|
+
* Reserved: accepted on the wire for forward-compat so captured payloads still
|
|
194
|
+
* decode. This SDK does not consume `MobileFiberPath`; it has its own fiber
|
|
195
|
+
* layer at `packages/react-native/src/anchors/fiber/`.
|
|
196
|
+
*/
|
|
197
|
+
export interface MobileFiberPath {
|
|
198
|
+
/** displayName of the root the path is anchored at (content-root / screen). */
|
|
199
|
+
rootDisplayName?: string;
|
|
200
|
+
/** Best-effort leaf label for the dashboard step list. */
|
|
201
|
+
leafText?: string;
|
|
202
|
+
/** Host kind of the leaf (Pressable/Text/Image/…). */
|
|
203
|
+
leafKind: string;
|
|
204
|
+
/** Root → leaf. */
|
|
205
|
+
segments: MobileFiberSegment[];
|
|
206
|
+
}
|
|
207
|
+
export interface PlatformData {
|
|
208
|
+
testID?: string;
|
|
209
|
+
accessibilityLabel?: string;
|
|
210
|
+
accessibilityRole?: string;
|
|
211
|
+
/** @deprecated Prefer `childText`. */
|
|
212
|
+
text?: string;
|
|
213
|
+
childText?: string;
|
|
214
|
+
childShape?: string;
|
|
215
|
+
structuralPath?: string;
|
|
216
|
+
templatePath?: string;
|
|
217
|
+
instanceScope?: string;
|
|
218
|
+
isPressable?: boolean;
|
|
219
|
+
}
|
|
220
|
+
export interface DeviceMetadata {
|
|
221
|
+
appVersion?: string;
|
|
222
|
+
appBuild?: string;
|
|
223
|
+
screenWidth?: number;
|
|
224
|
+
screenHeight?: number;
|
|
225
|
+
scale?: number;
|
|
226
|
+
platform?: 'ios' | 'android';
|
|
227
|
+
}
|
|
228
|
+
export declare function encodeMobileAutoData(payload: MobileAutoData): string;
|
|
229
|
+
export declare function decodeMobileAutoData(raw: string | null | undefined): MobileAutoData | null;
|
|
230
|
+
export declare function isMobileAutoData(value: unknown): value is MobileAutoData;
|
|
231
|
+
export declare function isMobileFingerprint(value: unknown): value is MobileFingerprint;
|
|
232
|
+
//# sourceMappingURL=autoData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoData.d.ts","sourceRoot":"","sources":["../src/autoData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG,SAAS,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAE1F;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,uBAAuB,CAAC;IACxC,QAAQ,EAAE,cAAc,CAAC;IACzB,4EAA4E;IAC5E,QAAQ,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;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S,CAAC;CAC9B;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAEpE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CAU1F;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAgBxE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAa9E"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `FlowSelector.autoData` envelope used for MOBILE flows.
|
|
3
|
+
*
|
|
4
|
+
* The schema-level field is a free-form `String` (see
|
|
5
|
+
* `schema/userflow.introspection.json` -> FlowSelector.autoData). Both the
|
|
6
|
+
* mobile recorder and the mobile runtime serialize/deserialize this JSON
|
|
7
|
+
* on top of it. The dashboard rendering code reads this envelope to know
|
|
8
|
+
* how to draw mobile element rectangles.
|
|
9
|
+
*
|
|
10
|
+
* Decode is a client-side concern: the backend stores an opaque string so the
|
|
11
|
+
* payload can evolve without a schema migration. `decodeMobileAutoData` parses
|
|
12
|
+
* that string and shape-checks it; garbage / unknown shapes return `null`.
|
|
13
|
+
*
|
|
14
|
+
* There is no v1 (web-style `candidates[]`) normalization shim. The mobile
|
|
15
|
+
* Builder panel that would emit a mobile envelope is not on `main` yet; guessing
|
|
16
|
+
* at a v1 shape here would lock in a contract that does not exist on our side.
|
|
17
|
+
* Unknown / non-matching JSON still fails closed (`null`).
|
|
18
|
+
*
|
|
19
|
+
* Nothing in this SDK consumes these types at runtime yet. They exist so later
|
|
20
|
+
* stages can decode `autoData` and score live hosts against `fingerprint`.
|
|
21
|
+
*/
|
|
22
|
+
export const MOBILE_AUTODATA_VERSION = 1;
|
|
23
|
+
/** Fingerprint schema versions this runtime can still read (newest first). */
|
|
24
|
+
export const SUPPORTED_MOBILE_FINGERPRINT_VERSIONS = ['rn-v3', 'rn-v2'];
|
|
25
|
+
/** Version written by current producers. Readers also accept legacy `rn-v2`. */
|
|
26
|
+
export const MOBILE_FINGERPRINT_VERSION = 'rn-v3';
|
|
27
|
+
export function encodeMobileAutoData(payload) {
|
|
28
|
+
return JSON.stringify(payload);
|
|
29
|
+
}
|
|
30
|
+
export function decodeMobileAutoData(raw) {
|
|
31
|
+
if (!raw)
|
|
32
|
+
return null;
|
|
33
|
+
let parsed;
|
|
34
|
+
try {
|
|
35
|
+
parsed = JSON.parse(raw);
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
if (!isMobileAutoData(parsed))
|
|
41
|
+
return null;
|
|
42
|
+
return parsed;
|
|
43
|
+
}
|
|
44
|
+
export function isMobileAutoData(value) {
|
|
45
|
+
if (typeof value !== 'object' || value === null)
|
|
46
|
+
return false;
|
|
47
|
+
const v = value;
|
|
48
|
+
if (v['version'] !== MOBILE_AUTODATA_VERSION)
|
|
49
|
+
return false;
|
|
50
|
+
if (typeof v['platform'] !== 'string')
|
|
51
|
+
return false;
|
|
52
|
+
if (typeof v['selector'] !== 'string')
|
|
53
|
+
return false;
|
|
54
|
+
if (typeof v['displayName'] !== 'string')
|
|
55
|
+
return false;
|
|
56
|
+
if (typeof v['screenId'] !== 'string')
|
|
57
|
+
return false;
|
|
58
|
+
if ('fingerprint' in v &&
|
|
59
|
+
v['fingerprint'] !== undefined &&
|
|
60
|
+
!isMobileFingerprint(v['fingerprint'])) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
export function isMobileFingerprint(value) {
|
|
66
|
+
if (typeof value !== 'object' || value === null)
|
|
67
|
+
return false;
|
|
68
|
+
const v = value;
|
|
69
|
+
return (SUPPORTED_MOBILE_FINGERPRINT_VERSIONS.includes(v['version']) &&
|
|
70
|
+
typeof v['structuralPath'] === 'string' &&
|
|
71
|
+
typeof v['templatePath'] === 'string' &&
|
|
72
|
+
typeof v['kind'] === 'string' &&
|
|
73
|
+
typeof v['role'] === 'string' &&
|
|
74
|
+
Array.isArray(v['ancestors']) &&
|
|
75
|
+
Array.isArray(v['previousSiblings']) &&
|
|
76
|
+
Array.isArray(v['nextSiblings']));
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=autoData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoData.js","sourceRoot":"","sources":["../src/autoData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA8DzC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,OAAO,EAAE,OAAO,CAAU,CAAC;AAIjF,gFAAgF;AAChF,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAA0C,CAAC;AAyJrF,MAAM,UAAU,oBAAoB,CAAC,OAAuB;IAC1D,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,GAA8B;IACjE,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAC;IACtB,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IAC3C,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,CAAC,GAAG,KAAgC,CAAC;IAC3C,IAAI,CAAC,CAA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