@everframe/react-native 1.5.0 → 1.6.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 +1 -1
- package/README.md +136 -17
- package/android/build.gradle.kts +12 -19
- package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +16 -962
- package/dist/NativeEverframe.d.ts +7 -67
- package/dist/index.d.ts +63 -178
- package/dist/index.js +23 -23
- package/dist/index.web.d.ts +2 -2
- package/dist/{launch-C8wbMunK.d.ts → launch-aXtOOfNU.d.ts} +1 -2
- package/ios/Sources/EverframeBridge.swift +16 -456
- package/ios/Sources/EverframeEventEmitter.swift +9 -126
- package/ios/Sources/EverframeModule.mm +2 -52
- package/package.json +4 -4
- package/src/NativeEverframe.ts +11 -107
|
@@ -59,67 +59,21 @@ type ConfigOpts = {
|
|
|
59
59
|
* Absent means capture stays on.
|
|
60
60
|
*/
|
|
61
61
|
crashReportingDisabled?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Built-in attach-PIN surface mode (spec 2026-08-19): 'builtin' (default —
|
|
64
|
-
* the native SDK presents the code itself), 'custom' (host renders it from
|
|
65
|
-
* onAttachChallenge; the device still announces the capability), 'off'
|
|
66
|
-
* (legacy one-click dashboard attach, no PIN). Flat string, not a union —
|
|
67
|
-
* codegen cannot express string-literal unions; the natives coerce unknown
|
|
68
|
-
* values to 'builtin'.
|
|
69
|
-
*/
|
|
70
|
-
attachPinUi?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Explicit companion device-identity override (naming spec 2026-08-24) —
|
|
73
|
-
* an MDM id or provisioning serial the host already trusts. Hashed
|
|
74
|
-
* (SHA-256 → UUID shape) natively before it ever reaches the announce
|
|
75
|
-
* `device` block — see `CompanionDeviceId.resolve` (iOS) /
|
|
76
|
-
* `CompanionDeviceId.resolve` (Android). Flat optional string, same
|
|
77
|
-
* codegen shape as `attachPinUi` above. `undefined`/absent falls through
|
|
78
|
-
* to each native side's own Keychain/SSAID-then-stored-UUID chain.
|
|
79
|
-
*/
|
|
80
|
-
companionDeviceId?: string;
|
|
81
|
-
/**
|
|
82
|
-
* Companion on-screen name-badge visibility (naming spec 2026-08-24,
|
|
83
|
-
* controller ruling / Task 6b) — "a production app that finds it
|
|
84
|
-
* intrusive turns it off in one line". `undefined`/absent defaults to
|
|
85
|
-
* `true` (badge shown) on both natives, matching
|
|
86
|
-
* `CompanionBadgeOptions.enabled`'s own default. Flat because RN codegen
|
|
87
|
-
* rejects nested objects, same constraint `networkBodiesDisabled` above
|
|
88
|
-
* documents — the host-facing nested `companionBadge: { enabled }` is
|
|
89
|
-
* flattened here by `extractBridgeConfig`.
|
|
90
|
-
*/
|
|
91
|
-
companionBadgeEnabled?: boolean;
|
|
92
|
-
/** Local veto for native mobile shake-to-report. Absent defaults to enabled. */
|
|
62
|
+
/** Local veto for shake opening the reporter (not for shake quick capture). Absent defaults to enabled. */
|
|
93
63
|
shakeToReportEnabled?: boolean;
|
|
94
|
-
/** Local veto for
|
|
64
|
+
/** Local veto for quick capture (simulators, emulators and real phones) and device linking. Absent defaults to enabled. */
|
|
95
65
|
quickCaptureEnabled?: boolean;
|
|
96
66
|
/**
|
|
97
67
|
* Crash-only session switch. `true` turns off every on-device way to open the reporter, keeps
|
|
98
|
-
* network bodies off and samples replay with the server's crash-only rate
|
|
99
|
-
* bond upgrades the session. Flattened by `extractBridgeConfig` from `reporter: { disabled }`.
|
|
68
|
+
* network bodies off and samples replay with the server's crash-only rate. Flattened by `extractBridgeConfig` from `reporter: { disabled }`.
|
|
100
69
|
* Absent means a normal report session.
|
|
101
70
|
*/
|
|
102
71
|
reporterDisabled?: boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Companion on-screen name-badge corner (naming spec 2026-08-24,
|
|
105
|
-
* controller ruling / Task 6b). Flat optional STRING, not a literal
|
|
106
|
-
* union — same codegen ceiling as `attachPinUi` above (RN codegen cannot
|
|
107
|
-
* express a string-literal union in a struct field): the host-facing
|
|
108
|
-
* `RuntimeConfig.companionBadge.position` narrows to the real
|
|
109
|
-
* `'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'` union and
|
|
110
|
-
* `extractBridgeConfig` passes it through unchanged onto this wire field.
|
|
111
|
-
* Each native side re-parses the string into its own
|
|
112
|
-
* `CompanionBadgePosition` enum, coercing `undefined`/an unrecognised
|
|
113
|
-
* value to `.bottomRight`/`BOTTOM_RIGHT` — the same default
|
|
114
|
-
* `CompanionBadgeOptions.position` already uses.
|
|
115
|
-
*/
|
|
116
|
-
companionBadgePosition?: string;
|
|
117
72
|
/**
|
|
118
73
|
* Inline reporter theme (reporter branding spec 2026-08-25, RN slice) —
|
|
119
74
|
* 8 optional `#rrggbb` role strings, flattened from the host-facing nested
|
|
120
75
|
* `RuntimeConfig.theme` by `extractBridgeConfig` (RN codegen cannot express
|
|
121
|
-
* a nested object in a struct field
|
|
122
|
-
* above). Pure passthrough: NO hex validation happens on the RN side; each
|
|
76
|
+
* a nested object in a struct field). Pure passthrough: NO hex validation happens on the RN side; each
|
|
123
77
|
* native ThemeResolver revalidates per-field and ignores invalid values.
|
|
124
78
|
* The theme only ever renders once the server entitles it (server
|
|
125
79
|
* `watermark: false`) — the entitlement gate lives natively and cannot be
|
|
@@ -136,7 +90,7 @@ type ConfigOpts = {
|
|
|
136
90
|
/**
|
|
137
91
|
* Session Vitals local config (spec 2026-09-06, RN). Three FLAT fields
|
|
138
92
|
* flattened from the host-facing nested `RuntimeConfig.vitals` by
|
|
139
|
-
* `extractBridgeConfig` —
|
|
93
|
+
* `extractBridgeConfig` — RN codegen rejects nested objects.
|
|
140
94
|
* `vitalsEnabled`: absent = follow the dashboard toggle; `false` = opt out
|
|
141
95
|
* locally; `true` never forces it on. `vitalsSampleRate`: [0, 1], min()'d
|
|
142
96
|
* with the server rate, clamped natively; absent = server rate.
|
|
@@ -234,8 +188,7 @@ interface Spec extends TurboModule {
|
|
|
234
188
|
*/
|
|
235
189
|
setExtraResolverActive(active: boolean): void;
|
|
236
190
|
/**
|
|
237
|
-
*
|
|
238
|
-
* below exactly): called by the JS-side `everframe.extra.resolveRequested`
|
|
191
|
+
* Ack: called by the JS-side `everframe.extra.resolveRequested`
|
|
239
192
|
* listener once it has — IF a resolver is currently registered — invoked
|
|
240
193
|
* it, budgeted the result exactly like `@everframe/sdk-core`'s
|
|
241
194
|
* `resolveClientExtra`, and pushed it through the existing `setExtra`
|
|
@@ -322,23 +275,10 @@ interface Spec extends TurboModule {
|
|
|
322
275
|
* non-fatal `reportCrash`, it may carry a session replay.
|
|
323
276
|
*/
|
|
324
277
|
captureHandledException(crashJson: string): boolean;
|
|
325
|
-
startCompanion(): void;
|
|
326
|
-
stopCompanion(): void;
|
|
327
|
-
/**
|
|
328
|
-
* Companion handshake: called by the JS-side `onReportRequested` listener
|
|
329
|
-
* once it is ready for native capture to proceed. (It used to walk the
|
|
330
|
-
* React fiber tree and attach it via `attachReactTree` first; both are
|
|
331
|
-
* gone — spec 2026-08-29.) Releases the native bridge's bounded wait.
|
|
332
|
-
*
|
|
333
|
-
* Bounded: if JS never calls back, the native side times out after
|
|
334
|
-
* ~250ms and captures anyway.
|
|
335
|
-
*/
|
|
336
|
-
signalCompanionReportRequestReady(correlationId: string): void;
|
|
337
278
|
/**
|
|
338
279
|
* RN's `NativeEventEmitter` contract requires `addListener` /
|
|
339
280
|
* `removeListeners` to exist on the underlying native module — RN warns
|
|
340
|
-
* loudly otherwise. Both are intentional no-ops at the spec level
|
|
341
|
-
* native event-emitter subscriptions are installed by `startCompanion`.
|
|
281
|
+
* loudly otherwise. Both are intentional no-ops at the spec level.
|
|
342
282
|
*/
|
|
343
283
|
addListener(eventName: string): void;
|
|
344
284
|
removeListeners(count: number): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,10 +2,10 @@ import * as React from 'react';
|
|
|
2
2
|
import { EverframeUserSpec, ConfigOpts } from './NativeEverframe.js';
|
|
3
3
|
export { Rect, Spec } from './NativeEverframe.js';
|
|
4
4
|
import { E as EverframeIntegration } from './types-D5e4kWaw.js';
|
|
5
|
-
import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus, a as ReporterOpenOptions, b as ReporterResult, c as ReporterTrigger, I as InteractionPolicyOptions, V as VitalsPlayerEventType, d as InteractionTargetAnnotation, e as InteractionHookOptions, C as ControlChangeInput, S as ScrollInput } from './launch-
|
|
6
|
-
export { A as AttachmentRef, f as ErrorCaptureCounters, g as ErrorCaptureOutcome, h as ErrorCapturePath, i as EverframeNotMountedError, j as EverframeReporterDisabledError, H as HelperType, L as LaunchContext, k as PermissionResult, l as PromiseRejectionCounters, m as RejectionReason, n as ReportCaptureOutcome, o as ReportCapturePath, p as ReportCapturePathStatus, q as ReportDeliveryReason, r as ReportEnvelope, s as ReportQueueOperation, t as ReportQueueStatus, u as ReportStorageFailure, v as ReportTransportOrigin, w as ReportTransportOutcome, x as ReportTransportStatus, U as UINode, y as UITree, z as observePermissionRequest, B as recordLaunchContext } from './launch-
|
|
5
|
+
import { R as ReportDeliveryStatus, E as ErrorCaptureStatus, P as PromiseRejectionStatus, a as ReporterOpenOptions, b as ReporterResult, c as ReporterTrigger, I as InteractionPolicyOptions, V as VitalsPlayerEventType, d as InteractionTargetAnnotation, e as InteractionHookOptions, C as ControlChangeInput, S as ScrollInput } from './launch-aXtOOfNU.js';
|
|
6
|
+
export { A as AttachmentRef, f as ErrorCaptureCounters, g as ErrorCaptureOutcome, h as ErrorCapturePath, i as EverframeNotMountedError, j as EverframeReporterDisabledError, H as HelperType, L as LaunchContext, k as PermissionResult, l as PromiseRejectionCounters, m as RejectionReason, n as ReportCaptureOutcome, o as ReportCapturePath, p as ReportCapturePathStatus, q as ReportDeliveryReason, r as ReportEnvelope, s as ReportQueueOperation, t as ReportQueueStatus, u as ReportStorageFailure, v as ReportTransportOrigin, w as ReportTransportOutcome, x as ReportTransportStatus, U as UINode, y as UITree, z as observePermissionRequest, B as recordLaunchContext } from './launch-aXtOOfNU.js';
|
|
7
7
|
import { z } from 'zod';
|
|
8
|
-
import { ViewProps
|
|
8
|
+
import { ViewProps } from 'react-native';
|
|
9
9
|
|
|
10
10
|
interface JsBundleConfig {
|
|
11
11
|
buildId: string;
|
|
@@ -119,8 +119,7 @@ interface EverframeContextValue {
|
|
|
119
119
|
* chance for the host to refresh a pushed snapshot first — see the fuller
|
|
120
120
|
* rationale on `@everframe/sdk-core`'s `EverframeClient.setExtra`. The
|
|
121
121
|
* resolver is stored, never called at registration time; native ASKS for
|
|
122
|
-
* it (a bounded round trip to JS
|
|
123
|
-
* `reportRequested` handshake) right before it drains pending attachments
|
|
122
|
+
* it (a bounded round trip to JS) right before it drains pending attachments
|
|
124
123
|
* for a report, so it always sees current values with no effect to write
|
|
125
124
|
* or keep in sync. A throwing resolver never breaks the report: it is
|
|
126
125
|
* caught, warned, and `extra` is simply omitted from that report — same
|
|
@@ -219,18 +218,12 @@ declare function markReporterClosed(): Promise<void>;
|
|
|
219
218
|
* host-defined, it's owned by the SDK and stamped per release on the native
|
|
220
219
|
* side (`Everframe.SDK_VERSION`). See extractBridgeConfig.
|
|
221
220
|
*
|
|
222
|
-
* External review, finding NN4 — also OMITS
|
|
223
|
-
* `
|
|
224
|
-
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
* `
|
|
228
|
-
* type-checked as a valid host config and silently no-opped: `extractBridge
|
|
229
|
-
* Config` only ever reads the nested `companionBadge` object, never the flat
|
|
230
|
-
* keys, so a host reaching for the (also-valid-looking) flat shape got no
|
|
231
|
-
* error and no effect. Omitting them here makes `companionBadge` the ONLY
|
|
232
|
-
* public surface for this option — passing the flat form is now a
|
|
233
|
-
* compile-time error, matching the runtime's actual (nested-only) behavior.
|
|
221
|
+
* External review, finding NN4 — also OMITS the FLAT wire-shaped fields
|
|
222
|
+
* `ConfigOpts` declares for codegen wherever a nested host-facing option
|
|
223
|
+
* exists below (RN codegen cannot express nested objects). Without the Omit,
|
|
224
|
+
* `RuntimeConfig` structurally inherits BOTH shapes, and the flat one
|
|
225
|
+
* type-checks as a valid host config and silently no-ops, because
|
|
226
|
+
* `extractBridgeConfig` only ever reads the nested object.
|
|
234
227
|
* Deliberately NOT applied to `networkBodiesDisabled`, even though the same
|
|
235
228
|
* shape of gap arguably exists there too (`RuntimeConfig` also declares its
|
|
236
229
|
* own nested `networkBodies?: { disabled? }` below, alongside the inherited
|
|
@@ -238,7 +231,7 @@ declare function markReporterClosed(): Promise<void>;
|
|
|
238
231
|
* review instruction, left as pre-existing behavior rather than folded in
|
|
239
232
|
* here.
|
|
240
233
|
*/
|
|
241
|
-
interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJson' | 'installIdentifierDisabled' | 'crashReportingDisabled' | '
|
|
234
|
+
interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJson' | 'installIdentifierDisabled' | 'crashReportingDisabled' | 'shakeToReportEnabled' | 'quickCaptureEnabled' | 'reporterDisabled' | 'themeBackground' | 'themeSurface' | 'themeBorder' | 'themeText' | 'themeTextMuted' | 'themeAccent' | 'themeAccentForeground' | 'themeDestructive' | 'vitalsEnabled' | 'vitalsSampleRate' | 'vitalsCaptureSourceQuery' | 'releaseHealthEnabled' | 'releaseHealthLoadedBuildId' | 'releaseHealthUserId' | 'releaseHealthIncludeDebugBuilds'> {
|
|
242
235
|
/**
|
|
243
236
|
* Per-app SDK key (publishable, not secret). Required on the host-facing
|
|
244
237
|
* config — narrows the bridge `ConfigOpts.sdkKey?` to required so a missing
|
|
@@ -324,43 +317,45 @@ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJso
|
|
|
324
317
|
disabled?: boolean;
|
|
325
318
|
};
|
|
326
319
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
329
|
-
*
|
|
330
|
-
* (RN codegen can't express a string-literal union in a struct field, see
|
|
331
|
-
* `NativeEverframe.ts`'s D-decision header note); this host-facing surface
|
|
332
|
-
* doesn't cross codegen and gets normal DX. `extractBridgeConfig` passes
|
|
333
|
-
* it through unchanged — the union is a subtype of `string`, so no
|
|
334
|
-
* conversion is needed, same as `captureScreenshot` above.
|
|
320
|
+
* Accepted and ignored.
|
|
321
|
+
*
|
|
322
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
335
323
|
*/
|
|
336
324
|
attachPinUi?: 'builtin' | 'custom' | 'off';
|
|
337
325
|
/**
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
*
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
* above already uses for the same reason.
|
|
326
|
+
* Accepted and ignored.
|
|
327
|
+
*
|
|
328
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
329
|
+
*/
|
|
330
|
+
companionDeviceId?: string;
|
|
331
|
+
/**
|
|
332
|
+
* Accepted and ignored.
|
|
333
|
+
*
|
|
334
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
348
335
|
*/
|
|
349
336
|
companionBadge?: {
|
|
350
337
|
enabled?: boolean;
|
|
351
338
|
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
352
339
|
};
|
|
353
340
|
/**
|
|
354
|
-
*
|
|
355
|
-
* authoritative.
|
|
356
|
-
*
|
|
341
|
+
* Whether a shake opens the reporter on an unlinked release build. Enabled
|
|
342
|
+
* by default; the dashboard remains authoritative. It does not stop shake
|
|
343
|
+
* from taking a quick capture on a linked phone or a debug build, nor from
|
|
344
|
+
* answering a dashboard link window: that is `quickCapture`'s job. React
|
|
345
|
+
* Native/Expo development builds should normally use `{ enabled: !__DEV__ }`
|
|
346
|
+
* to avoid opening the reporter over the development menu.
|
|
357
347
|
*/
|
|
358
348
|
shakeToReport?: {
|
|
359
349
|
enabled?: boolean;
|
|
360
350
|
};
|
|
361
351
|
/**
|
|
362
|
-
*
|
|
363
|
-
*
|
|
352
|
+
* Quick capture: a report filed with no UI and titled on the dashboard.
|
|
353
|
+
* Simulators and emulators use ⇧B in debug builds. Real phones use shake
|
|
354
|
+
* when the device is linked on the dashboard (any build) or the build is a
|
|
355
|
+
* debug build (`__DEV__`, or `debugBuild`); Android TV uses the remote
|
|
356
|
+
* gesture the dashboard sets, under the same rule. Enabled by default; the
|
|
357
|
+
* dashboard remains authoritative. `{ enabled: false }` opts this app out
|
|
358
|
+
* of quick capture everywhere, and of device linking.
|
|
364
359
|
*/
|
|
365
360
|
quickCapture?: {
|
|
366
361
|
enabled?: boolean;
|
|
@@ -371,9 +366,7 @@ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJso
|
|
|
371
366
|
* (shake, `open()`, which then rejects with
|
|
372
367
|
* `EverframeReporterDisabledError`), keeps network bodies off and samples
|
|
373
368
|
* session replay with the server's crash-only rate (default 0) instead of
|
|
374
|
-
* the normal one.
|
|
375
|
-
* then follow the normal server rules for the rest of the session, and
|
|
376
|
-
* reports come through the companion. Crash and error capture are
|
|
369
|
+
* the normal one. Crash and error capture are
|
|
377
370
|
* unaffected. Flattened onto `ConfigOpts.reporterDisabled` by
|
|
378
371
|
* `extractBridgeConfig`.
|
|
379
372
|
*/
|
|
@@ -385,8 +378,8 @@ interface RuntimeConfig extends Omit<ConfigOpts, 'sdkVersion' | 'interactionsJso
|
|
|
385
378
|
* 8 optional `#rrggbb` role strings for the NATIVE report dialogs the RN
|
|
386
379
|
* SDK presents (`open()`); RN itself renders no reporter UI. Nested
|
|
387
380
|
* host-facing shape, flattened onto the 8 flat `ConfigOpts.theme*` wire
|
|
388
|
-
* fields by `extractBridgeConfig`
|
|
389
|
-
*
|
|
381
|
+
* fields by `extractBridgeConfig` (RN codegen cannot express nested
|
|
382
|
+
* objects).
|
|
390
383
|
*
|
|
391
384
|
* Rendering is entitlement-gated NATIVELY per the branding contract
|
|
392
385
|
* (precedence server → inline → default): the theme applies only when the
|
|
@@ -516,151 +509,44 @@ declare function trackVitals(name: string, data?: unknown, player?: PlayerHandle
|
|
|
516
509
|
*/
|
|
517
510
|
declare function useTrackPlayer(opts: TrackPlayerOptions): PlayerHandle;
|
|
518
511
|
|
|
519
|
-
/**
|
|
520
|
-
* SDK-facing listener surface. React Native 0.87 intentionally types raw
|
|
521
|
-
* native payloads as `Object[]`; each Everframe event has a narrower bridge
|
|
522
|
-
* contract, so the unchecked native boundary is centralized here instead of
|
|
523
|
-
* repeated at every listener.
|
|
524
|
-
*/
|
|
525
|
-
type EverframeNativeEventEmitter = {
|
|
526
|
-
addListener<Args extends readonly unknown[]>(eventType: string, listener: (...args: Args) => unknown): EventSubscription;
|
|
527
|
-
};
|
|
528
|
-
/**
|
|
529
|
-
* Resolve the platform's RN event emitter source. iOS hands listeners to a
|
|
530
|
-
* dedicated `RCTEventEmitter` subclass (`EverframeEventEmitter`); Android
|
|
531
|
-
* uses the default `RCTDeviceEventEmitter` which `NativeEventEmitter`
|
|
532
|
-
* routes to when constructed with no argument.
|
|
533
|
-
*/
|
|
534
|
-
declare function getEmitter(): EverframeNativeEventEmitter;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Companion runtime state — mirrors `CompanionState` in iOS (rawValue) +
|
|
538
|
-
* Android (mapped from the enum via `toRnString`). Keep this union in
|
|
539
|
-
* lock-step with both native sides.
|
|
540
|
-
*/
|
|
512
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
541
513
|
type CompanionState = 'unpaired' | 'paired' | 'report_in_progress' | 'phone_disconnected';
|
|
542
|
-
/**
|
|
543
|
-
* A pending dashboard-initiated attach-PIN challenge (spec 2026-08-19).
|
|
544
|
-
* Mirrors iOS `CompanionAttachChallenge` / Android `AttachChallengeInfo`.
|
|
545
|
-
* The natives forward this event in every `attachPinUi` mode, including
|
|
546
|
-
* `'builtin'` (which renders the PIN natively AND still fires the event) —
|
|
547
|
-
* it's only NEEDED by hosts configured with `'custom'`, which must read it
|
|
548
|
-
* to build their own surface.
|
|
549
|
-
*/
|
|
514
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
550
515
|
interface CompanionAttachChallenge {
|
|
551
516
|
code: string;
|
|
552
517
|
requestedByName: string;
|
|
553
|
-
/** Display lifetime — custom UIs should hide the code after this. */
|
|
554
518
|
ttlMs: number;
|
|
555
519
|
}
|
|
556
520
|
/**
|
|
557
|
-
*
|
|
558
|
-
* per process and `start()` is idempotent: calling it again while the
|
|
559
|
-
* companion is already running is a no-op — the socket is NOT recreated.
|
|
560
|
-
* Call `stop()` first, then `start()`, to tear the connection down and open
|
|
561
|
-
* a fresh one.
|
|
521
|
+
* Logs the removal warning once. Reaches no native code and never throws.
|
|
562
522
|
*
|
|
563
|
-
*
|
|
564
|
-
* at compile time (Release: https://everframe.dev; Debug: optionally
|
|
565
|
-
* overridden via EVERFRAME_DEV_INGEST_URL on each native build).
|
|
523
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
566
524
|
*/
|
|
567
525
|
declare function start(): void;
|
|
568
526
|
/**
|
|
569
|
-
*
|
|
570
|
-
* can still read `useCompanion().state` afterwards to render a "paused"
|
|
571
|
-
* indicator. Re-call `start(...)` to reconnect.
|
|
572
|
-
*/
|
|
573
|
-
declare function stop(): void;
|
|
574
|
-
/**
|
|
575
|
-
* Subscribe to the "is a session wanted" intent flag (see `_running` above).
|
|
576
|
-
* Returns an unsubscribe function. Use this directly from imperative code;
|
|
577
|
-
* React components should prefer `useCompanion().running`.
|
|
578
|
-
*/
|
|
579
|
-
declare function onRunning(handler: (running: boolean) => void): () => void;
|
|
580
|
-
/**
|
|
581
|
-
* Subscribe to companion-state changes. Returns an unsubscribe function.
|
|
582
|
-
* Use this directly from imperative code (e.g. an Activity-lifecycle hook);
|
|
583
|
-
* React components should prefer `useCompanion()`.
|
|
584
|
-
*/
|
|
585
|
-
declare function onState(handler: (state: CompanionState) => void): () => void;
|
|
586
|
-
/**
|
|
587
|
-
* Subscribe to pairUrl changes. The URL is set on `pair.created` and retained
|
|
588
|
-
* for the life of the relay socket — it's nulled only when the socket closes
|
|
589
|
-
* (terminal/permanent close). It does NOT flip to null on bond or expiry; drive
|
|
590
|
-
* QR teardown off `state` (e.g. hide once `state === 'paired'`) instead, since
|
|
591
|
-
* `state` is the reliably-delivered signal across the native bridge.
|
|
592
|
-
*/
|
|
593
|
-
declare function onPairUrl(handler: (url: string | null) => void): () => void;
|
|
594
|
-
/**
|
|
595
|
-
* Subscribe to the announce display code — the short string the dashboard
|
|
596
|
-
* shows next to this device in the project's Companion list, so a team member
|
|
597
|
-
* can match what they read on the TV screen to a row in the list.
|
|
527
|
+
* Does nothing.
|
|
598
528
|
*
|
|
599
|
-
*
|
|
600
|
-
* on the native side), when the announce call failed, and after the relay
|
|
601
|
-
* socket closes terminally. A null code costs discovery only — pairing by QR
|
|
602
|
-
* and report submission are unaffected, so never gate the QR on it.
|
|
603
|
-
*/
|
|
604
|
-
declare function onCode(handler: (code: string | null) => void): () => void;
|
|
605
|
-
/**
|
|
606
|
-
* Subscribe to the attached dashboard member's display name. Populated only
|
|
607
|
-
* when someone attached to this device FROM the dashboard; an ordinary QR
|
|
608
|
-
* bond carries no such name and leaves this `null`. Render it as e.g.
|
|
609
|
-
* "Paired with <name>" — but drive the paired/unpaired chrome itself off
|
|
610
|
-
* `state`, which is the reliably-delivered signal.
|
|
529
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
611
530
|
*/
|
|
612
|
-
declare function
|
|
613
|
-
/**
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
*/
|
|
628
|
-
declare function onResolvedName(handler: (name: string | null) => void): () => void;
|
|
629
|
-
/**
|
|
630
|
-
* Subscribe to attach-PIN challenges (spec 2026-08-19). Fires with the live
|
|
631
|
-
* challenge when a dashboard member requests attach, and null when it
|
|
632
|
-
* clears (redeemed, expired, burned, superseded, socket closed). The
|
|
633
|
-
* natives fire this event in every `attachPinUi` mode, including
|
|
634
|
-
* `'builtin'` (which renders the PIN natively AND still fires the event) —
|
|
635
|
-
* it's only NEEDED for `'custom'` hosts, which must read it to build their
|
|
636
|
-
* own surface.
|
|
637
|
-
*
|
|
638
|
-
* REPLAY SEMANTIC: RN events don't replay to listeners attached after they
|
|
639
|
-
* fired, so a challenge that arrived before this call would otherwise be
|
|
640
|
-
* invisible to it. If `start()` has already cached a still-live challenge,
|
|
641
|
-
* `handler` is invoked synchronously, immediately, with that cached value —
|
|
642
|
-
* `ttlMs` recomputed as the time REMAINING until its deadline, never the
|
|
643
|
-
* original duration (review finding 4) — before this function returns, in
|
|
644
|
-
* addition to firing on every later event. A cached challenge whose deadline
|
|
645
|
-
* has already passed replays nothing (`attachChallengeReplayValue()` returns
|
|
646
|
-
* null), matching the semantics of a challenge that was never cached at all.
|
|
647
|
-
*/
|
|
648
|
-
declare function onAttachChallenge(handler: (challenge: CompanionAttachChallenge | null) => void): () => void;
|
|
531
|
+
declare function stop(): void;
|
|
532
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
533
|
+
declare function onRunning(_handler: (running: boolean) => void): () => void;
|
|
534
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
535
|
+
declare function onState(_handler: (state: CompanionState) => void): () => void;
|
|
536
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
537
|
+
declare function onPairUrl(_handler: (url: string | null) => void): () => void;
|
|
538
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
539
|
+
declare function onCode(_handler: (code: string | null) => void): () => void;
|
|
540
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
541
|
+
declare function onAttachedUserName(_handler: (name: string | null) => void): () => void;
|
|
542
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
543
|
+
declare function onResolvedName(_handler: (name: string | null) => void): () => void;
|
|
544
|
+
/** @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture. */
|
|
545
|
+
declare function onAttachChallenge(_handler: (challenge: CompanionAttachChallenge | null) => void): () => void;
|
|
649
546
|
/**
|
|
650
|
-
*
|
|
651
|
-
* snapshot. Mounts one NativeEventEmitter subscription per value and tears
|
|
652
|
-
* them all down on unmount.
|
|
653
|
-
*
|
|
654
|
-
* Subscribing is safe to tie to a component; the SESSION is not. Binding
|
|
655
|
-
* `stop()` to unmount means the device stops advertising the moment the
|
|
656
|
-
* screen goes away — including when the user navigates off to the dashboard
|
|
657
|
-
* to attach to it — so prefer starting on mount and ending on an explicit
|
|
658
|
-
* user action. `examples/react-native/src/screens/Companion.tsx` shows that
|
|
659
|
-
* shape, with a module-scoped flag carrying the user's intent across mounts.
|
|
547
|
+
* Returns the idle Companion snapshot — the same object on every render.
|
|
660
548
|
*
|
|
661
|
-
*
|
|
662
|
-
* clearing them, so a stopped session must be rendered from your own flag —
|
|
663
|
-
* rendering off `state` alone leaves a dead QR on screen.
|
|
549
|
+
* @deprecated Everframe Companion has been removed; this call does nothing. Link the device under Settings → Devices in the dashboard and use quick capture.
|
|
664
550
|
*/
|
|
665
551
|
declare function useCompanion(): {
|
|
666
552
|
state: CompanionState;
|
|
@@ -674,7 +560,6 @@ declare function useCompanion(): {
|
|
|
674
560
|
|
|
675
561
|
type companion_CompanionAttachChallenge = CompanionAttachChallenge;
|
|
676
562
|
type companion_CompanionState = CompanionState;
|
|
677
|
-
declare const companion_getEmitter: typeof getEmitter;
|
|
678
563
|
declare const companion_onAttachChallenge: typeof onAttachChallenge;
|
|
679
564
|
declare const companion_onAttachedUserName: typeof onAttachedUserName;
|
|
680
565
|
declare const companion_onCode: typeof onCode;
|
|
@@ -686,7 +571,7 @@ declare const companion_start: typeof start;
|
|
|
686
571
|
declare const companion_stop: typeof stop;
|
|
687
572
|
declare const companion_useCompanion: typeof useCompanion;
|
|
688
573
|
declare namespace companion {
|
|
689
|
-
export { type companion_CompanionAttachChallenge as CompanionAttachChallenge, type companion_CompanionState as CompanionState,
|
|
574
|
+
export { type companion_CompanionAttachChallenge as CompanionAttachChallenge, type companion_CompanionState as CompanionState, companion_onAttachChallenge as onAttachChallenge, companion_onAttachedUserName as onAttachedUserName, companion_onCode as onCode, companion_onPairUrl as onPairUrl, companion_onResolvedName as onResolvedName, companion_onRunning as onRunning, companion_onState as onState, companion_start as start, companion_stop as stop, companion_useCompanion as useCompanion };
|
|
690
575
|
}
|
|
691
576
|
|
|
692
577
|
/** Optional semantic metadata on an existing native host ref. Reporting works without it. */
|