@everframe/react-native 1.2.1 → 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/EverframeRN.podspec +2 -2
- package/README.md +193 -10
- package/android/build.gradle.kts +1 -1
- package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +122 -1
- package/android/src/main/java/dev/everframe/rn/RnInteractionEventObserver.kt +69 -0
- package/android/src/main/java/dev/everframe/rn/RnInteractionEventRegistration.kt +127 -0
- package/android/src/main/java/dev/everframe/rn/RnInteractionTargetAdapter.kt +33 -0
- package/android/src/main/java/dev/everframe/rn/RnInteractionTargetRegistration.kt +72 -0
- package/dist/NativeEverframe.d.ts +18 -0
- package/dist/chunk-FZHLCD3Z.js +1 -0
- package/dist/index.d.ts +37 -734
- package/dist/index.js +30 -30
- package/dist/index.web.d.ts +26 -3
- package/dist/index.web.js +1 -1
- package/dist/integrations/console.js +1 -1
- package/dist/integrations/react-navigation.js +1 -1
- package/dist/integrations/react.js +1 -1
- package/dist/launch-BvE4IjRk.d.ts +1090 -0
- package/ios/Sources/EverframeBridge.swift +29 -2
- package/ios/Sources/EverframeModule.mm +115 -6
- package/ios/Sources/RnDevtoolsOrigin.h +7 -0
- package/ios/Sources/RnDevtoolsOrigin.mm +36 -0
- package/ios/Sources/RnInteractionEventRegistration.swift +141 -0
- package/ios/Sources/RnInteractionTargetRegistration.swift +107 -0
- package/package.json +6 -5
- package/src/NativeEverframe.ts +38 -22
- package/src/codegen-types.ts +0 -1
- package/dist/chunk-MIWWEGLO.js +0 -1
- package/dist/promise-rejection-types-Bf5iLv8n.d.ts +0 -99
package/src/NativeEverframe.ts
CHANGED
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
// the companion `reportRequested`/`signalCompanionReportRequestReady`
|
|
86
86
|
// handshake below exactly), bounded and fail-open; see both methods' own
|
|
87
87
|
// doc comments.
|
|
88
|
-
import type { TurboModule } from
|
|
89
|
-
import { TurboModuleRegistry } from
|
|
90
|
-
import type { UnsafeObject } from
|
|
88
|
+
import type { TurboModule } from 'react-native';
|
|
89
|
+
import { TurboModuleRegistry } from 'react-native';
|
|
90
|
+
import type { UnsafeObject } from './codegen-types';
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* Geometry rect crossing the bridge. Flat-object only; codegen cannot express
|
|
@@ -105,6 +105,8 @@ export type Rect = {
|
|
|
105
105
|
* Rich variants (e.g., callbacks, function refs) MUST stay on the JS side.
|
|
106
106
|
*/
|
|
107
107
|
export type ConfigOpts = {
|
|
108
|
+
/** Bounded local interaction policy; native validation remains authoritative. */
|
|
109
|
+
interactionsJson?: string;
|
|
108
110
|
sdkKey?: string;
|
|
109
111
|
sdkVersion?: string;
|
|
110
112
|
/**
|
|
@@ -230,6 +232,9 @@ export type ConfigOpts = {
|
|
|
230
232
|
* sends it (the config's `debugBuild`, else `__DEV__`). Absent means the native SDK decides for itself.
|
|
231
233
|
*/
|
|
232
234
|
debugBuild?: boolean;
|
|
235
|
+
/** Loaded Hermes identity for ordinary reports, independent of release health. */
|
|
236
|
+
jsBundleBuildId?: string;
|
|
237
|
+
jsBundleName?: string;
|
|
233
238
|
/**
|
|
234
239
|
* Native foreground monitoring (release health). The JS facade always sends this flag: `true` with a
|
|
235
240
|
* validated loaded bundle, or `false` to revoke monitoring. A bridge that finds it missing treats it as
|
|
@@ -276,6 +281,29 @@ export interface Spec extends TurboModule {
|
|
|
276
281
|
* Typed `UnsafeObject` at codegen boundary; facade casts to `ReporterResult`.
|
|
277
282
|
*/
|
|
278
283
|
openReporter(): Promise<UnsafeObject>;
|
|
284
|
+
openReporterWithTrigger(trigger: string): Promise<UnsafeObject>;
|
|
285
|
+
markReporterOpened(trigger: string): Promise<void>;
|
|
286
|
+
markReporterClosed(): Promise<void>;
|
|
287
|
+
// Boolean return makes ownership invalidation synchronous; host resolution remains UI-queued.
|
|
288
|
+
setInteractionTarget(
|
|
289
|
+
viewTag: number,
|
|
290
|
+
registrationId: string,
|
|
291
|
+
generation: number,
|
|
292
|
+
annotation: UnsafeObject,
|
|
293
|
+
): boolean;
|
|
294
|
+
clearInteractionTarget(registrationId: string, generation: number): boolean;
|
|
295
|
+
/** Revocable semantic observation ownership; unrelated to replay controls. */
|
|
296
|
+
getInteractionLease(): string;
|
|
297
|
+
setInteractionObserver(
|
|
298
|
+
viewTag: number,
|
|
299
|
+
id: string,
|
|
300
|
+
generation: number,
|
|
301
|
+
lease: string,
|
|
302
|
+
optionsJson: string,
|
|
303
|
+
): boolean;
|
|
304
|
+
clearInteractionObserver(id: string, generation: number): boolean;
|
|
305
|
+
recordInteraction(lease: string, id: string, generation: number, eventJson: string): boolean;
|
|
306
|
+
|
|
279
307
|
registerSensitiveRect(viewTag: number, rect: Rect): void;
|
|
280
308
|
/**
|
|
281
309
|
* Set host-supplied free-form metadata for the next report. Single opaque
|
|
@@ -330,12 +358,7 @@ export interface Spec extends TurboModule {
|
|
|
330
358
|
* (no-op pre-start / while killed). `data` is typed `UnsafeObject` — the
|
|
331
359
|
* documented codegen escape hatch for freeform objects (see file header).
|
|
332
360
|
*/
|
|
333
|
-
addBreadcrumb(
|
|
334
|
-
message: string,
|
|
335
|
-
kind?: string,
|
|
336
|
-
level?: string,
|
|
337
|
-
data?: UnsafeObject,
|
|
338
|
-
): void;
|
|
361
|
+
addBreadcrumb(message: string, kind?: string, level?: string, data?: UnsafeObject): void;
|
|
339
362
|
|
|
340
363
|
/**
|
|
341
364
|
* Navigation screen marker (spec 2026-07-14 — the D-decision for this
|
|
@@ -381,12 +404,7 @@ export interface Spec extends TurboModule {
|
|
|
381
404
|
// crosses here. Unknown/duplicate/detached tokens are silent no-ops.
|
|
382
405
|
|
|
383
406
|
/** Register a remote player. A token already live is ignored. */
|
|
384
|
-
trackPlayer(
|
|
385
|
-
token: string,
|
|
386
|
-
library: string,
|
|
387
|
-
name?: string,
|
|
388
|
-
libraryVersion?: string,
|
|
389
|
-
): void;
|
|
407
|
+
trackPlayer(token: string, library: string, name?: string, libraryVersion?: string): void;
|
|
390
408
|
/** `handle.detach()` + drop the token. Native emits `player_detach`. */
|
|
391
409
|
detachPlayer(token: string): void;
|
|
392
410
|
/**
|
|
@@ -396,12 +414,7 @@ export interface Spec extends TurboModule {
|
|
|
396
414
|
* enum); the native context's `emit` refuses anything outside
|
|
397
415
|
* `VitalsPlayerEventType`. `data` is the `UnsafeObject` escape hatch.
|
|
398
416
|
*/
|
|
399
|
-
recordPlayerEvent(
|
|
400
|
-
token: string,
|
|
401
|
-
type: string,
|
|
402
|
-
t: number,
|
|
403
|
-
data?: UnsafeObject,
|
|
404
|
-
): void;
|
|
417
|
+
recordPlayerEvent(token: string, type: string, t: number, data?: UnsafeObject): void;
|
|
405
418
|
/**
|
|
406
419
|
* Refresh the native snapshot cache: `{ bufferAheadMs, bandwidthEstimate?,
|
|
407
420
|
* bitrate?, width?, height?, droppedFrames? }`. `droppedFrames` is
|
|
@@ -475,6 +488,9 @@ export interface Spec extends TurboModule {
|
|
|
475
488
|
* credential. It groups reports in the dashboard and does nothing else.
|
|
476
489
|
*/
|
|
477
490
|
setUser(user?: UnsafeObject): void;
|
|
491
|
+
/** Synchronous acknowledgement preserves setState → fatal capture ordering. */
|
|
492
|
+
setStateSync(key: string, valueJson: string): boolean;
|
|
493
|
+
clearStateSync(key: string): boolean;
|
|
478
494
|
}
|
|
479
495
|
|
|
480
|
-
export default TurboModuleRegistry.getEnforcing<Spec>(
|
|
496
|
+
export default TurboModuleRegistry.getEnforcing<Spec>('Everframe');
|
package/src/codegen-types.ts
CHANGED
package/dist/chunk-MIWWEGLO.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as s,c as i,e as u}from"./chunk-UN3Q4UGZ.js";import{a as t}from"./chunk-XUSV3KOD.js";var n=class extends Error{static{t(this,"EverframeNotMountedError")}name="EverframeNotMountedError";constructor(o){super(o??"EverframeProvider is not mounted; wrap your app root.")}},c="EVERFRAME_REPORTER_DISABLED",a=class extends Error{static{t(this,"EverframeReporterDisabledError")}name="EverframeReporterDisabledError";constructor(o){super(o??"The Everframe reporter is disabled in this session (reporter.disabled).")}};var r=null,p={};function f(){return p}t(f,"__getContextEpoch");function g(){try{return r?.getPromiseRejectionStatus()??u("not-mounted","no-mount")}catch{return u("install-failed","hook-install")}}t(g,"getPromiseRejectionStatus");function R(e){r=e,p={}}t(R,"__setCurrentContext");function S(){return r}t(S,"__getCurrentContext");function y(){let e=r;return e?e.open():Promise.reject(new n("EverframeProvider not mounted; wrap your root with <EverframeProvider>."))}t(y,"open");function C(e){r?.setExtra(e)}t(C,"setExtra");function b(e){r?.addBreadcrumb(e)}t(b,"addBreadcrumb");function P(e,o){o!==void 0?r?.recordScreen(e,o):r?.recordScreen(e)}t(P,"recordScreen");function _(e){r?.setUser(e)}t(_,"setUser");function j(e,o){r?.captureException(e,o)}t(j,"captureException");function w(){try{return r?.getErrorCaptureStatus()??i("not-mounted","no-mount")}catch{return i("not-mounted","no-mount")}}t(w,"getErrorCaptureStatus");function D(){let e=r;try{let o=e?.getReportDeliveryStatus();return e===r&&o?o:s("not-mounted","no-mount")}catch{return s("unavailable","native-call-failed")}}t(D,"getReportDeliveryStatus");export{n as a,c as b,a as c,f as d,g as e,R as f,S as g,y as h,C as i,b as j,P as k,_ as l,j as m,w as n,D as o};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
declare const capturePaths: readonly ["native-handled", "bridge-handled", "bridge-automatic", "jvm-uncaught"];
|
|
2
|
-
declare const captureOutcomes: readonly ["persisted", "disabled", "admission-suppressed", "reentrant", "invalid-input", "ownership-lost", "storage-unavailable", "failed"];
|
|
3
|
-
declare const queueOperations: readonly ["enqueue-committed", "enqueue-failed", "capacity-evicted", "removed-after-acceptance", "removed-after-terminal", "removal-failed", "read-failed"];
|
|
4
|
-
declare const storageFailures: readonly ["capacity", "key-unavailable", "corrupt", "io", "revoked", "invalid-entry", "busy", "unknown", "unsupported-format"];
|
|
5
|
-
declare const transportOrigins: readonly ["live-submit", "outbox-drain"];
|
|
6
|
-
declare const transportOutcomes: readonly ["server-accepted", "retryable-http", "terminal-http", "network-failure", "authorization-cancelled", "cancelled", "failed"];
|
|
7
|
-
type ReportCapturePath = typeof capturePaths[number];
|
|
8
|
-
type ReportCaptureOutcome = typeof captureOutcomes[number];
|
|
9
|
-
type ReportQueueOperation = typeof queueOperations[number];
|
|
10
|
-
type ReportStorageFailure = typeof storageFailures[number];
|
|
11
|
-
type ReportTransportOrigin = typeof transportOrigins[number];
|
|
12
|
-
type ReportTransportOutcome = typeof transportOutcomes[number];
|
|
13
|
-
type ReportDeliveryReason = 'none' | 'no-start' | 'capture-disabled' | 'no-mount' | 'platform' | 'native-call-failed' | 'invalid-native-snapshot' | 'snapshot-busy';
|
|
14
|
-
interface ReportCapturePathStatus {
|
|
15
|
-
supported: boolean;
|
|
16
|
-
settledAttempts: number;
|
|
17
|
-
outcomes: Record<ReportCaptureOutcome, number>;
|
|
18
|
-
lastOutcome?: ReportCaptureOutcome;
|
|
19
|
-
}
|
|
20
|
-
interface ReportQueueStatus {
|
|
21
|
-
scope: 'sdk-report-outbox';
|
|
22
|
-
observation: 'not-observed' | 'observed' | 'failed';
|
|
23
|
-
quality: 'complete' | 'partial' | 'unknown';
|
|
24
|
-
pendingCount?: number;
|
|
25
|
-
capacityPolicy: 'reject-new' | 'evict-oldest' | 'unknown';
|
|
26
|
-
terminalHttpPolicy: 'retain' | 'attempt-remove' | 'unknown';
|
|
27
|
-
operations: Record<ReportQueueOperation, number>;
|
|
28
|
-
lastFailure?: ReportStorageFailure;
|
|
29
|
-
}
|
|
30
|
-
interface ReportTransportStatus {
|
|
31
|
-
settledAttempts: number;
|
|
32
|
-
outcomes: Record<ReportTransportOutcome, number>;
|
|
33
|
-
lastOutcome?: ReportTransportOutcome;
|
|
34
|
-
lastHttpStatus?: number;
|
|
35
|
-
}
|
|
36
|
-
interface ReportDeliveryStatus {
|
|
37
|
-
schemaVersion: 1;
|
|
38
|
-
status: 'active' | 'not-started' | 'disabled' | 'not-mounted' | 'unsupported' | 'unavailable';
|
|
39
|
-
reason: ReportDeliveryReason;
|
|
40
|
-
scope: 'native-runtime-observations';
|
|
41
|
-
coverage: 'best-effort';
|
|
42
|
-
revision: number;
|
|
43
|
-
capture: {
|
|
44
|
-
enabled: boolean;
|
|
45
|
-
paths: Record<ReportCapturePath, ReportCapturePathStatus>;
|
|
46
|
-
};
|
|
47
|
-
queue: ReportQueueStatus;
|
|
48
|
-
transport: Record<ReportTransportOrigin, ReportTransportStatus>;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Local admission only: native acceptance is not delivery confirmation. */
|
|
52
|
-
type ErrorCapturePath = 'handled' | 'errorUtils' | 'rejection';
|
|
53
|
-
interface ErrorCaptureCounters {
|
|
54
|
-
attempted: number;
|
|
55
|
-
accepted: number;
|
|
56
|
-
duplicateSuppressed: number;
|
|
57
|
-
allowanceSuppressed: number;
|
|
58
|
-
bridgeUnavailable: number;
|
|
59
|
-
nativeRefused: number;
|
|
60
|
-
captureFailed: number;
|
|
61
|
-
reentrantSuppressed: number;
|
|
62
|
-
inactiveAborted: number;
|
|
63
|
-
}
|
|
64
|
-
type ErrorCaptureOutcome = Exclude<keyof ErrorCaptureCounters, 'attempted'>;
|
|
65
|
-
interface ErrorCaptureStatus {
|
|
66
|
-
status: 'not-mounted' | 'disabled' | 'active' | 'unsupported';
|
|
67
|
-
reason: 'no-mount' | 'crash-reporting-disabled' | 'none' | 'platform';
|
|
68
|
-
scope: 'mounted-js-admission';
|
|
69
|
-
limits: {
|
|
70
|
-
handled: 10;
|
|
71
|
-
automatic: 10;
|
|
72
|
-
};
|
|
73
|
-
counters: Record<ErrorCapturePath, ErrorCaptureCounters>;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type RejectionReason = 'none' | 'opt-in-required' | 'crash-reporting-disabled' | 'platform' | 'runtime' | 'promise-identity' | 'hook-shape' | 'hook-install' | 'hook-displaced' | 'no-mount';
|
|
77
|
-
interface PromiseRejectionCounters {
|
|
78
|
-
pending: number;
|
|
79
|
-
accepted: number;
|
|
80
|
-
cancelled: number;
|
|
81
|
-
capacityDropped: number;
|
|
82
|
-
sizeDropped: number;
|
|
83
|
-
expired: number;
|
|
84
|
-
duplicateSuppressed: number;
|
|
85
|
-
allowanceSuppressed: number;
|
|
86
|
-
nativeRefused: number;
|
|
87
|
-
captureFailed: number;
|
|
88
|
-
/** Pending observations released when another owner replaced the hooks. */
|
|
89
|
-
discarded: number;
|
|
90
|
-
}
|
|
91
|
-
interface PromiseRejectionStatus {
|
|
92
|
-
status: 'disabled' | 'unsupported' | 'observing' | 'displaced' | 'install-failed' | 'not-mounted';
|
|
93
|
-
reason: RejectionReason;
|
|
94
|
-
adapterId?: string;
|
|
95
|
-
previousCallbacksPresent: boolean;
|
|
96
|
-
counters: PromiseRejectionCounters;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export type { ErrorCaptureStatus as E, PromiseRejectionStatus as P, ReportDeliveryStatus as R, ErrorCaptureCounters as a, ErrorCaptureOutcome as b, ErrorCapturePath as c, PromiseRejectionCounters as d, RejectionReason as e, ReportCaptureOutcome as f, ReportCapturePath as g, ReportCapturePathStatus as h, ReportDeliveryReason as i, ReportQueueOperation as j, ReportQueueStatus as k, ReportStorageFailure as l, ReportTransportOrigin as m, ReportTransportOutcome as n, ReportTransportStatus as o };
|