@everframe/react-native 0.9.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 +88 -0
- package/LICENSE +21 -0
- package/NOTICE +8 -0
- package/README.md +505 -0
- package/android/build.gradle.kts +209 -0
- package/android/settings.gradle.kts +8 -0
- package/android/src/main/AndroidManifest.xml +9 -0
- package/android/src/main/java/dev/everframe/rn/EverframeModule.kt +1670 -0
- package/android/src/main/java/dev/everframe/rn/EverframePackage.kt +40 -0
- package/android/src/main/java/dev/everframe/rn/EverframeSensitiveViewManager.kt +20 -0
- package/android/src/main/java/dev/everframe/rn/RnVideoPrivacyAdapter.kt +65 -0
- package/dist/NativeEverframe.d.ts +308 -0
- package/dist/NativeEverframe.js +1 -0
- package/dist/browser-ZQAY6B4M.js +1 -0
- package/dist/chunk-LPIKPZNX.js +1 -0
- package/dist/chunk-QRPINMCR.js +1 -0
- package/dist/chunk-QZRTTQRS.js +1 -0
- package/dist/chunk-XFLFA52R.js +1 -0
- package/dist/chunk-XUSV3KOD.js +1 -0
- package/dist/index.d.ts +1006 -0
- package/dist/index.js +51 -0
- package/dist/integrations/console.d.ts +8 -0
- package/dist/integrations/console.js +1 -0
- package/dist/integrations/react-native-video.d.ts +44 -0
- package/dist/integrations/react-native-video.js +1 -0
- package/dist/integrations/react-navigation.d.ts +21 -0
- package/dist/integrations/react-navigation.js +1 -0
- package/dist/integrations/theoplayer.d.ts +37 -0
- package/dist/integrations/theoplayer.js +1 -0
- package/dist/types-D5e4kWaw.d.ts +12 -0
- package/ios/Sources/EverframeBridge.swift +1043 -0
- package/ios/Sources/EverframeEventEmitter.swift +204 -0
- package/ios/Sources/EverframeModule.h +36 -0
- package/ios/Sources/EverframeModule.mm +489 -0
- package/ios/Sources/RemoteVitalsBridge.swift +99 -0
- package/package.json +121 -0
- package/src/NativeEverframe.ts +439 -0
- package/src/codegen-types.ts +11 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 ScriptX
|
|
3
|
+
//
|
|
4
|
+
// @everframe/react-native — Android library Gradle build (Plan 06-03).
|
|
5
|
+
//
|
|
6
|
+
// WORKSPACE-INTERNAL CONSUMPTION (dogfood path — see 06-06 sample app):
|
|
7
|
+
// The host RN sample app's `settings.gradle.kts` adds:
|
|
8
|
+
// includeBuild("../../../packages/sdk-android/android") // surfaces :everframe-core, :everframe-reporter-ui
|
|
9
|
+
// This library declares the two project deps below which resolve through the
|
|
10
|
+
// composite-build mechanism. The on-device :everframe-tv Activity was removed
|
|
11
|
+
// alongside the iOS tvOS modal — Android TV hosts route reporting through the
|
|
12
|
+
// phone-companion (QR → phone browser SPA) flow via CompanionCaptureBridge.
|
|
13
|
+
//
|
|
14
|
+
// CODEGEN:
|
|
15
|
+
// The `com.facebook.react` Gradle plugin reads `codegenConfig` from
|
|
16
|
+
// `packages/sdk-react-native/package.json` (added in Plan 06-03 — see
|
|
17
|
+
// 06-03-SUMMARY.md "Deviations"). The plugin generates
|
|
18
|
+
// `dev.everframe.rn.NativeEverframeSpec` from `src/NativeEverframe.ts`
|
|
19
|
+
// into `build/generated/source/codegen/`. EverframeModule currently extends
|
|
20
|
+
// the legacy ReactContextBaseJavaModule surface (structural-superset of the
|
|
21
|
+
// spec); a host on the new architecture can flip the parent class with a
|
|
22
|
+
// 1-line patch once codegen output is available in the consuming build.
|
|
23
|
+
//
|
|
24
|
+
// ZERO-PERMISSION:
|
|
25
|
+
// No `<uses-permission>` in AndroidManifest.xml. The bridge adds zero
|
|
26
|
+
// permissions on top of whatever `:everframe-core` declares (the core also
|
|
27
|
+
// has none — Phase 5 zero-permission AAR contract). Verified by the 06-03
|
|
28
|
+
// acceptance grep.
|
|
29
|
+
//
|
|
30
|
+
// SCOPE (NOT in this build):
|
|
31
|
+
// • Namespace is `dev.everframe.rn`.
|
|
32
|
+
|
|
33
|
+
plugins {
|
|
34
|
+
id("com.android.library")
|
|
35
|
+
id("org.jetbrains.kotlin.android")
|
|
36
|
+
// Apply `com.facebook.react` so the bridge module's codegen pipeline
|
|
37
|
+
// is wired: the host's auto-generated `Android-autolinking.cmake`
|
|
38
|
+
// does `add_subdirectory("…/packages/sdk-react-native/android/build/
|
|
39
|
+
// generated/source/codegen/jni/")`, and without this plugin that
|
|
40
|
+
// directory is never produced, so the host's CMake configure fails.
|
|
41
|
+
// Earlier comment claimed pnpm hoisting made this plugin brittle;
|
|
42
|
+
// empirically the plugin discovers `react-native` from node_modules
|
|
43
|
+
// via the standard CLI path resolver, and our hoisted react-native
|
|
44
|
+
// is resolvable from the host's package — no actual breakage.
|
|
45
|
+
id("com.facebook.react")
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
react {
|
|
49
|
+
// Point codegen at the TS specs in this package. `jsRootDir` is
|
|
50
|
+
// relative to this build.gradle.kts; specs live at
|
|
51
|
+
// `packages/sdk-react-native/src/NativeEverframe.ts` (codegenConfig
|
|
52
|
+
// in package.json sets `jsSrcsDir: "src"`).
|
|
53
|
+
jsRootDir = file("../src/")
|
|
54
|
+
libraryName = "EverframeSpec" // matches codegenConfig.name
|
|
55
|
+
codegenJavaPackageName = "dev.everframe.rn" // matches codegenConfig.android.javaPackageName
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
android {
|
|
59
|
+
namespace = "dev.everframe.rn"
|
|
60
|
+
compileSdk = 36
|
|
61
|
+
|
|
62
|
+
defaultConfig {
|
|
63
|
+
minSdk = 24 // matches :everframe-core floor (Phase 5)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
compileOptions {
|
|
67
|
+
sourceCompatibility = JavaVersion.VERSION_17
|
|
68
|
+
targetCompatibility = JavaVersion.VERSION_17
|
|
69
|
+
}
|
|
70
|
+
kotlinOptions {
|
|
71
|
+
jvmTarget = "17"
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
buildFeatures {
|
|
75
|
+
buildConfig = false
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
testOptions {
|
|
79
|
+
unitTests {
|
|
80
|
+
isIncludeAndroidResources = true
|
|
81
|
+
isReturnDefaultValues = true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Task 11 (Plan 5) — `EverframeModuleTest.kt` / `EverframeCompanionModuleTest.kt`
|
|
86
|
+
// exercise a `EverframeModule` contract that no longer exists on `main`
|
|
87
|
+
// (captureNow/submit/openAnnotationOverlay were removed by the
|
|
88
|
+
// D-05/D-07 flip; `startCompanion()` now takes zero args;
|
|
89
|
+
// `Companion.__setState`/`__setPairUrl` are `internal` to
|
|
90
|
+
// :everframe-core and unreachable from this separate Gradle module) —
|
|
91
|
+
// confirmed pre-existing and unrelated to Task 11 (Plan 4 Task 14 first
|
|
92
|
+
// hit this reproducing against unmodified HEAD; see
|
|
93
|
+
// .superpowers/sdd/task-11-report.md for the full compile-error dump).
|
|
94
|
+
// `compileDebugUnitTestKotlin` compiles the entire `test` source set as
|
|
95
|
+
// one Kotlin unit, so these two permanently-broken files block
|
|
96
|
+
// `RnReplayBridgeTest.kt` (Task 11's actual subject, itself fixed by the
|
|
97
|
+
// `BridgeReactContext` swap in this same change) from ever compiling.
|
|
98
|
+
// Excluded here — NOT deleted — pending a follow-up ticket to either
|
|
99
|
+
// delete or fully rewrite them against the current module API.
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>()
|
|
103
|
+
.matching { it.name.endsWith("UnitTestKotlin") } // compileDebugUnitTestKotlin + compileReleaseUnitTestKotlin
|
|
104
|
+
.configureEach {
|
|
105
|
+
exclude(
|
|
106
|
+
"**/EverframeModuleTest.kt",
|
|
107
|
+
"**/EverframeCompanionModuleTest.kt",
|
|
108
|
+
)
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Derive the native-AAR range from this package's own npm version (single
|
|
112
|
+
// source of truth: ../package.json). `[X.Y.Z, X.(Y+1).0)` blocks cross-minor
|
|
113
|
+
// drift (which has shipped protocol-breaking changes in practice) and puts a
|
|
114
|
+
// floor at this package's exact version. Republish the JS package to roll
|
|
115
|
+
// consumers onto a new native version.
|
|
116
|
+
//
|
|
117
|
+
// The floor matters. A range of `X.Y.+` resolves to the highest version Gradle
|
|
118
|
+
// can currently SEE, so a stale dynamic-version cache — or a mavenLocal holding
|
|
119
|
+
// an older patch — hands the bridge an AAR older than the JS half it shipped
|
|
120
|
+
// with. Gradle re-resolves upward once the cache expires, unlike CocoaPods,
|
|
121
|
+
// which pins in a lockfile; the floor removes the window entirely.
|
|
122
|
+
//
|
|
123
|
+
// `EverframeRN.podspec` carries the same floor.
|
|
124
|
+
//
|
|
125
|
+
// Every release publishes the native SDKs before the npm packages and verifies
|
|
126
|
+
// the exact version's POM and binary are fetchable from Maven Central first.
|
|
127
|
+
//
|
|
128
|
+
// `everframeNativeVersion` OVERRIDES that derivation, and exists for exactly
|
|
129
|
+
// one situation: the monorepo dev loop, between a native minor landing and
|
|
130
|
+
// changesets publishing the JS bump that matches it.
|
|
131
|
+
//
|
|
132
|
+
// That window is not an edge case, it is every native minor. `package.json`
|
|
133
|
+
// only reaches the new version when `changeset version` runs at RELEASE
|
|
134
|
+
// time, so while the companion-attribution work sat unreleased, this file
|
|
135
|
+
// resolved `0.4.+` -> the stale 0.4.4 AAR while the bridge source called
|
|
136
|
+
// APIs added in native 0.5.0. Gradle resolved it happily (0.4.4 was in
|
|
137
|
+
// mavenLocal from an earlier release) and the failure surfaced as three
|
|
138
|
+
// unrelated-looking Kotlin errors — `Unresolved reference
|
|
139
|
+
// '__clearPendingAttribution'`, a SuspendFunction3-vs-2 mismatch, and
|
|
140
|
+
// `No parameter with name 'companionAttribution'` — none of which name a
|
|
141
|
+
// version. scripts/dev/rn.mjs now passes this property with the version it
|
|
142
|
+
// just published to mavenLocal, so the dev loop compiles against exactly
|
|
143
|
+
// the AAR it built.
|
|
144
|
+
//
|
|
145
|
+
// Deliberately NOT read from gradle.properties or any monorepo path: this
|
|
146
|
+
// file also runs from inside the published npm tarball at a consumer's
|
|
147
|
+
// install, where no such file exists. Unset — every consumer build — the
|
|
148
|
+
// derivation below is the only source of truth, unchanged.
|
|
149
|
+
val nativeVersionOverride = (findProperty("everframeNativeVersion") as String?)
|
|
150
|
+
?.trim()
|
|
151
|
+
?.takeIf { it.isNotEmpty() }
|
|
152
|
+
val rnSdkPkg = groovy.json.JsonSlurper()
|
|
153
|
+
.parse(file("../package.json")) as Map<*, *>
|
|
154
|
+
val rnSdkVersion = rnSdkPkg["version"] as String
|
|
155
|
+
val nativeMinorRange: String = nativeVersionOverride ?: "[0.9.0,0.10.0)"
|
|
156
|
+
if (nativeVersionOverride != null) {
|
|
157
|
+
logger.lifecycle(
|
|
158
|
+
"[everframe-rn] native AAR pinned to $nativeVersionOverride via everframeNativeVersion " +
|
|
159
|
+
"(package.json says $rnSdkVersion — local dev override)",
|
|
160
|
+
)
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
dependencies {
|
|
164
|
+
// Maven Central coordinates (dev.everframe:{core,reporter-ui}) consumed
|
|
165
|
+
// via the host app's mavenCentral() repository. Range derived from the JS
|
|
166
|
+
// package's own version (see `nativeMinorRange` above) — patches roll
|
|
167
|
+
// automatically, minors don't.
|
|
168
|
+
// Local-dev workflow can still inject mavenLocal() in the host gradle
|
|
169
|
+
// and `publishToMavenLocal` an unreleased patch — the version range
|
|
170
|
+
// resolves there first.
|
|
171
|
+
//
|
|
172
|
+
// `strictly`, not a plain range. An ordinary range is a PREFERENCE that
|
|
173
|
+
// Gradle's conflict resolution may raise past its own upper bound: a host
|
|
174
|
+
// that also asks for `dev.everframe:core:0.7.0` would otherwise resolve this
|
|
175
|
+
// bridge against a native SDK a minor ahead of it, which is exactly the
|
|
176
|
+
// protocol drift the bound exists to stop, and it would do so silently.
|
|
177
|
+
// `strictly` makes that a build failure the host can see and decide about.
|
|
178
|
+
// CocoaPods' `~>` already behaves this way, so this keeps the two halves
|
|
179
|
+
// honest about the same promise.
|
|
180
|
+
implementation("dev.everframe:core") { version { strictly(nativeMinorRange) } }
|
|
181
|
+
implementation("dev.everframe:reporter-ui") { version { strictly(nativeMinorRange) } }
|
|
182
|
+
|
|
183
|
+
// React Native Android — provided by the host app's React Native install.
|
|
184
|
+
// We declare compileOnly so the AAR doesn't bundle a copy; the host's
|
|
185
|
+
// codegen-aware `react-android` Maven artifact (or sourceSet) supplies the
|
|
186
|
+
// runtime classes. Hosts on new-architecture get react-android transitively
|
|
187
|
+
// from the `com.facebook.react` plugin they apply at the app level.
|
|
188
|
+
compileOnly("com.facebook.react:react-android:0.84.0")
|
|
189
|
+
|
|
190
|
+
// Coroutines — already a transitive of :everframe-core; declared explicitly
|
|
191
|
+
// here so the module's MainScope / Dispatchers.IO calls resolve without
|
|
192
|
+
// relying on transitive promotion.
|
|
193
|
+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
|
194
|
+
|
|
195
|
+
// kotlinx-serialization-json — used by the companion capture provider
|
|
196
|
+
// to serialize the UITree to JSON before gzipping it for the relay
|
|
197
|
+
// tap-to-identify binary frame. Already on the classpath transitively
|
|
198
|
+
// via :everframe-protocol (implementation-scoped there), but we need a
|
|
199
|
+
// direct reference here to call the Json { } factory.
|
|
200
|
+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
|
|
201
|
+
|
|
202
|
+
// Unit tests (Plan 06-03 Task 3). Versions mirror :everframe-core (see
|
|
203
|
+
// packages/sdk-android/android/gradle/libs.versions.toml — junit 4.13.2, robolectric 4.13).
|
|
204
|
+
testImplementation("junit:junit:4.13.2")
|
|
205
|
+
testImplementation("com.squareup.okhttp3:mockwebserver:4.12.0")
|
|
206
|
+
testImplementation("org.robolectric:robolectric:4.13")
|
|
207
|
+
testImplementation("androidx.test:core:1.6.1")
|
|
208
|
+
testImplementation("com.facebook.react:react-android:0.84.0")
|
|
209
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 ScriptX
|
|
3
|
+
//
|
|
4
|
+
// Minimal settings — the sample app (Plan 06-06) consumes this library via
|
|
5
|
+
// `includeBuild("../../../packages/sdk-android/android")` from its own settings file, so this
|
|
6
|
+
// library does NOT itself include any sibling modules.
|
|
7
|
+
|
|
8
|
+
rootProject.name = "sdk-react-native"
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- SPDX-License-Identifier: MIT -->
|
|
3
|
+
<!-- SPDX-FileCopyrightText: 2026 ScriptX -->
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Zero-permission manifest (Phase 5 contract carries forward into Phase 6).
|
|
7
|
+
The bridge adds nothing on top of :everframe-core, which also declares none.
|
|
8
|
+
-->
|
|
9
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" />
|