react-native-webrtc-kaleidoscope 1.0.0 → 2.0.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/NOTICE.md +17 -6
- package/README.md +67 -19
- package/android/build.gradle +6 -5
- package/android/src/main/assets/backgrounds/dark-office.webp +0 -0
- package/android/src/main/assets/backgrounds/debug-resolutions.webp +0 -0
- package/android/src/main/assets/backgrounds/home-dark.webp +0 -0
- package/android/src/main/assets/backgrounds/home-light.webp +0 -0
- package/android/src/main/assets/backgrounds/light-office.webp +0 -0
- package/android/src/main/assets/backgrounds/nature-dark.webp +0 -0
- package/android/src/main/assets/backgrounds/nature-light.webp +0 -0
- package/android/src/main/assets/backgrounds/simiancraft-dark.webp +0 -0
- package/android/src/main/assets/backgrounds/simiancraft-light.webp +0 -0
- package/android/src/main/assets/backgrounds/stylized-dark.webp +0 -0
- package/android/src/main/assets/backgrounds/stylized-light.webp +0 -0
- package/android/src/main/assets/selfie_segmenter.tflite +0 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/EffectTuning.kt +41 -10
- package/android/src/main/java/com/simiancraft/kaleidoscope/KaleidoscopeModule.kt +8 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/Registration.kt +52 -13
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BackgroundImageFactory.kt +53 -23
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/BlurFactory.kt +114 -50
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/TransformFactory.kt +277 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/FramePipeline.kt +158 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GlProgram.kt +5 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Ingest.kt +123 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Orientation.kt +58 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/Shaders.kt +23 -51
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +76 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/Mask.kt +100 -89
- package/android/src/main/java/com/simiancraft/kaleidoscope/segmentation/SegmentationEngine.kt +148 -0
- package/app.plugin.js +254 -4
- package/dist/backgrounds/dark-office.d.ts +3 -0
- package/dist/backgrounds/dark-office.d.ts.map +1 -0
- package/dist/backgrounds/dark-office.js +5 -0
- package/dist/backgrounds/dark-office.js.map +1 -0
- package/dist/backgrounds/dark-office.web.d.ts +3 -0
- package/dist/backgrounds/dark-office.web.d.ts.map +1 -0
- package/dist/backgrounds/dark-office.web.js +8 -0
- package/dist/backgrounds/dark-office.web.js.map +1 -0
- package/dist/backgrounds/dark-office.webp +0 -0
- package/dist/backgrounds/debug-resolutions.d.ts +3 -0
- package/dist/backgrounds/debug-resolutions.d.ts.map +1 -0
- package/dist/backgrounds/debug-resolutions.js +6 -0
- package/dist/backgrounds/debug-resolutions.js.map +1 -0
- package/dist/backgrounds/debug-resolutions.web.d.ts +3 -0
- package/dist/backgrounds/debug-resolutions.web.d.ts.map +1 -0
- package/dist/backgrounds/debug-resolutions.web.js +8 -0
- package/dist/backgrounds/debug-resolutions.web.js.map +1 -0
- package/dist/backgrounds/debug-resolutions.webp +0 -0
- package/dist/backgrounds/home-dark.d.ts +3 -0
- package/dist/backgrounds/home-dark.d.ts.map +1 -0
- package/dist/backgrounds/home-dark.js +5 -0
- package/dist/backgrounds/home-dark.js.map +1 -0
- package/dist/backgrounds/home-dark.web.d.ts +3 -0
- package/dist/backgrounds/home-dark.web.d.ts.map +1 -0
- package/dist/backgrounds/home-dark.web.js +6 -0
- package/dist/backgrounds/home-dark.web.js.map +1 -0
- package/dist/backgrounds/home-dark.webp +0 -0
- package/dist/backgrounds/home-light.d.ts +3 -0
- package/dist/backgrounds/home-light.d.ts.map +1 -0
- package/dist/backgrounds/home-light.js +5 -0
- package/dist/backgrounds/home-light.js.map +1 -0
- package/dist/backgrounds/home-light.web.d.ts +3 -0
- package/dist/backgrounds/home-light.web.d.ts.map +1 -0
- package/dist/backgrounds/home-light.web.js +6 -0
- package/dist/backgrounds/home-light.web.js.map +1 -0
- package/dist/backgrounds/home-light.webp +0 -0
- package/dist/backgrounds/index.d.ts +3 -0
- package/dist/backgrounds/index.d.ts.map +1 -0
- package/dist/backgrounds/index.js +6 -0
- package/dist/backgrounds/index.js.map +1 -0
- package/dist/backgrounds/light-office.d.ts +3 -0
- package/dist/backgrounds/light-office.d.ts.map +1 -0
- package/dist/backgrounds/light-office.js +5 -0
- package/dist/backgrounds/light-office.js.map +1 -0
- package/dist/backgrounds/light-office.web.d.ts +3 -0
- package/dist/backgrounds/light-office.web.d.ts.map +1 -0
- package/dist/backgrounds/light-office.web.js +8 -0
- package/dist/backgrounds/light-office.web.js.map +1 -0
- package/dist/backgrounds/light-office.webp +0 -0
- package/dist/backgrounds/nature-dark.d.ts +3 -0
- package/dist/backgrounds/nature-dark.d.ts.map +1 -0
- package/dist/backgrounds/nature-dark.js +5 -0
- package/dist/backgrounds/nature-dark.js.map +1 -0
- package/dist/backgrounds/nature-dark.web.d.ts +3 -0
- package/dist/backgrounds/nature-dark.web.d.ts.map +1 -0
- package/dist/backgrounds/nature-dark.web.js +6 -0
- package/dist/backgrounds/nature-dark.web.js.map +1 -0
- package/dist/backgrounds/nature-dark.webp +0 -0
- package/dist/backgrounds/nature-light.d.ts +3 -0
- package/dist/backgrounds/nature-light.d.ts.map +1 -0
- package/dist/backgrounds/nature-light.js +5 -0
- package/dist/backgrounds/nature-light.js.map +1 -0
- package/dist/backgrounds/nature-light.web.d.ts +3 -0
- package/dist/backgrounds/nature-light.web.d.ts.map +1 -0
- package/dist/backgrounds/nature-light.web.js +6 -0
- package/dist/backgrounds/nature-light.web.js.map +1 -0
- package/dist/backgrounds/nature-light.webp +0 -0
- package/dist/backgrounds/preset-source.types.d.ts +2 -0
- package/dist/backgrounds/preset-source.types.d.ts.map +1 -0
- package/dist/backgrounds/preset-source.types.js +2 -0
- package/dist/backgrounds/preset-source.types.js.map +1 -0
- package/dist/backgrounds/presets.d.ts +3 -0
- package/dist/backgrounds/presets.d.ts.map +1 -0
- package/dist/backgrounds/presets.js +34 -0
- package/dist/backgrounds/presets.js.map +1 -0
- package/dist/backgrounds/simiancraft-dark.d.ts +3 -0
- package/dist/backgrounds/simiancraft-dark.d.ts.map +1 -0
- package/dist/backgrounds/simiancraft-dark.js +5 -0
- package/dist/backgrounds/simiancraft-dark.js.map +1 -0
- package/dist/backgrounds/simiancraft-dark.web.d.ts +3 -0
- package/dist/backgrounds/simiancraft-dark.web.d.ts.map +1 -0
- package/dist/backgrounds/simiancraft-dark.web.js +6 -0
- package/dist/backgrounds/simiancraft-dark.web.js.map +1 -0
- package/dist/backgrounds/simiancraft-dark.webp +0 -0
- package/dist/backgrounds/simiancraft-light.d.ts +3 -0
- package/dist/backgrounds/simiancraft-light.d.ts.map +1 -0
- package/dist/backgrounds/simiancraft-light.js +5 -0
- package/dist/backgrounds/simiancraft-light.js.map +1 -0
- package/dist/backgrounds/simiancraft-light.web.d.ts +3 -0
- package/dist/backgrounds/simiancraft-light.web.d.ts.map +1 -0
- package/dist/backgrounds/simiancraft-light.web.js +6 -0
- package/dist/backgrounds/simiancraft-light.web.js.map +1 -0
- package/dist/backgrounds/simiancraft-light.webp +0 -0
- package/dist/backgrounds/stylized-dark.d.ts +3 -0
- package/dist/backgrounds/stylized-dark.d.ts.map +1 -0
- package/dist/backgrounds/stylized-dark.js +5 -0
- package/dist/backgrounds/stylized-dark.js.map +1 -0
- package/dist/backgrounds/stylized-dark.web.d.ts +3 -0
- package/dist/backgrounds/stylized-dark.web.d.ts.map +1 -0
- package/dist/backgrounds/stylized-dark.web.js +6 -0
- package/dist/backgrounds/stylized-dark.web.js.map +1 -0
- package/dist/backgrounds/stylized-dark.webp +0 -0
- package/dist/backgrounds/stylized-light.d.ts +3 -0
- package/dist/backgrounds/stylized-light.d.ts.map +1 -0
- package/dist/backgrounds/stylized-light.js +5 -0
- package/dist/backgrounds/stylized-light.js.map +1 -0
- package/dist/backgrounds/stylized-light.web.d.ts +3 -0
- package/dist/backgrounds/stylized-light.web.d.ts.map +1 -0
- package/dist/backgrounds/stylized-light.web.js +6 -0
- package/dist/backgrounds/stylized-light.web.js.map +1 -0
- package/dist/backgrounds/stylized-light.webp +0 -0
- package/dist/index.d.ts +19 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -22
- package/dist/index.js.map +1 -1
- package/dist/index.web.d.ts +25 -3
- package/dist/index.web.d.ts.map +1 -1
- package/dist/index.web.js +55 -16
- package/dist/index.web.js.map +1 -1
- package/dist/livekit.d.ts +24 -0
- package/dist/livekit.d.ts.map +1 -0
- package/dist/livekit.js +57 -0
- package/dist/livekit.js.map +1 -0
- package/dist/types.d.ts +20 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +1 -1
- package/dist/web/blur-kernel.d.ts +6 -0
- package/dist/web/blur-kernel.d.ts.map +1 -0
- package/dist/web/blur-kernel.js +41 -0
- package/dist/web/blur-kernel.js.map +1 -0
- package/dist/web/effects/background-image.d.ts.map +1 -1
- package/dist/web/effects/background-image.js +100 -33
- package/dist/web/effects/background-image.js.map +1 -1
- package/dist/web/effects/blur.d.ts.map +1 -1
- package/dist/web/effects/blur.js +169 -38
- package/dist/web/effects/blur.js.map +1 -1
- package/dist/web/effects/transform.d.ts +4 -0
- package/dist/web/effects/transform.d.ts.map +1 -0
- package/dist/web/effects/transform.js +62 -0
- package/dist/web/effects/transform.js.map +1 -0
- package/dist/web/insertable-streams.d.ts +11 -1
- package/dist/web/insertable-streams.d.ts.map +1 -1
- package/dist/web/insertable-streams.js +22 -4
- package/dist/web/insertable-streams.js.map +1 -1
- package/dist/web/segmenter.d.ts +9 -0
- package/dist/web/segmenter.d.ts.map +1 -1
- package/dist/web/segmenter.js +32 -0
- package/dist/web/segmenter.js.map +1 -1
- package/dist/web/shaders.d.ts +1 -3
- package/dist/web/shaders.d.ts.map +1 -1
- package/dist/web/shaders.generated.d.ts +4 -0
- package/dist/web/shaders.generated.d.ts.map +1 -0
- package/dist/web/shaders.generated.js +54 -0
- package/dist/web/shaders.generated.js.map +1 -0
- package/dist/web/shaders.js +29 -103
- package/dist/web/shaders.js.map +1 -1
- package/dist/web/tuning.d.ts +4 -0
- package/dist/web/tuning.d.ts.map +1 -1
- package/dist/web/tuning.js +17 -5
- package/dist/web/tuning.js.map +1 -1
- package/ios/Kaleidoscope.podspec +87 -14
- package/ios/KaleidoscopeModule/EffectTuning.swift +47 -7
- package/ios/KaleidoscopeModule/KaleidoscopeModule.swift +12 -0
- package/ios/KaleidoscopeModule/Registration.swift +78 -13
- package/ios/KaleidoscopeModule/effects/BackgroundImageProcessor.swift +293 -0
- package/ios/KaleidoscopeModule/effects/BlurProcessor.swift +232 -18
- package/ios/KaleidoscopeModule/effects/FrameBridge.swift +46 -0
- package/ios/KaleidoscopeModule/effects/TransformProcessor.swift +173 -0
- package/ios/KaleidoscopeModule/gpu/Ingest.swift +169 -0
- package/ios/KaleidoscopeModule/gpu/MetalRenderer.swift +601 -0
- package/ios/KaleidoscopeModule/gpu/Orientation.swift +83 -0
- package/ios/KaleidoscopeModule/gpu/ShaderLibrary.swift +100 -0
- package/ios/KaleidoscopeModule/gpu/TextureBridge.swift +291 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/dark-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/debug-resolutions.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/home-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/light-office.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/nature-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/simiancraft-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-dark.webp +0 -0
- package/ios/KaleidoscopeModule/resources/backgrounds/stylized-light.webp +0 -0
- package/ios/KaleidoscopeModule/resources/selfie_segmenter.tflite +0 -0
- package/ios/KaleidoscopeModule/segmentation/MaskTuning.swift +23 -0
- package/ios/KaleidoscopeModule/segmentation/Segmenter.swift +444 -25
- package/ios/KaleidoscopeModule/shaders/SHADERS.txt +6 -0
- package/ios/KaleidoscopeModule/shaders/blur.metalsrc +72 -0
- package/ios/KaleidoscopeModule/shaders/composite.metalsrc +22 -0
- package/ios/KaleidoscopeModule/shaders/nebula.metalsrc +72 -0
- package/ios/KaleidoscopeModule/shaders/passthrough.metalsrc +20 -0
- package/ios/KaleidoscopeModule/shaders/simianlights.metalsrc +72 -0
- package/ios/KaleidoscopeModule/shaders/transform.metalsrc +22 -0
- package/package.json +120 -11
- package/src/backgrounds/README.md +83 -0
- package/src/backgrounds/assets.d.ts +7 -0
- package/src/backgrounds/dark-office.ts +6 -0
- package/src/backgrounds/dark-office.web.ts +9 -0
- package/src/backgrounds/dark-office.webp +0 -0
- package/src/backgrounds/debug-resolutions.ts +7 -0
- package/src/backgrounds/debug-resolutions.web.ts +9 -0
- package/src/backgrounds/debug-resolutions.webp +0 -0
- package/src/backgrounds/home-dark.ts +6 -0
- package/src/backgrounds/home-dark.web.ts +7 -0
- package/src/backgrounds/home-dark.webp +0 -0
- package/src/backgrounds/home-light.ts +6 -0
- package/src/backgrounds/home-light.web.ts +7 -0
- package/src/backgrounds/home-light.webp +0 -0
- package/src/backgrounds/index.ts +7 -0
- package/src/backgrounds/light-office.ts +6 -0
- package/src/backgrounds/light-office.web.ts +9 -0
- package/src/backgrounds/light-office.webp +0 -0
- package/src/backgrounds/nature-dark.ts +6 -0
- package/src/backgrounds/nature-dark.web.ts +7 -0
- package/src/backgrounds/nature-dark.webp +0 -0
- package/src/backgrounds/nature-light.ts +6 -0
- package/src/backgrounds/nature-light.web.ts +7 -0
- package/src/backgrounds/nature-light.webp +0 -0
- package/src/backgrounds/preset-source.types.ts +5 -0
- package/src/backgrounds/presets.ts +36 -0
- package/src/backgrounds/simiancraft-dark.ts +6 -0
- package/src/backgrounds/simiancraft-dark.web.ts +7 -0
- package/src/backgrounds/simiancraft-dark.webp +0 -0
- package/src/backgrounds/simiancraft-light.ts +6 -0
- package/src/backgrounds/simiancraft-light.web.ts +7 -0
- package/src/backgrounds/simiancraft-light.webp +0 -0
- package/src/backgrounds/stylized-dark.ts +6 -0
- package/src/backgrounds/stylized-dark.web.ts +7 -0
- package/src/backgrounds/stylized-dark.webp +0 -0
- package/src/backgrounds/stylized-light.ts +6 -0
- package/src/backgrounds/stylized-light.web.ts +7 -0
- package/src/backgrounds/stylized-light.webp +0 -0
- package/src/index.ts +94 -29
- package/src/index.web.ts +69 -19
- package/src/livekit.ts +65 -0
- package/src/types.ts +23 -14
- package/src/web/blur-kernel.ts +44 -0
- package/src/web/effects/background-image.ts +121 -34
- package/src/web/effects/blur.ts +214 -40
- package/src/web/effects/transform.ts +69 -0
- package/src/web/insertable-streams.ts +33 -5
- package/src/web/segmenter.ts +34 -0
- package/src/web/shaders.generated.ts +56 -0
- package/src/web/shaders.ts +29 -106
- package/src/web/tuning.ts +19 -5
- package/android/src/main/assets/backgrounds/office-1.png +0 -0
- package/android/src/main/assets/backgrounds/office-2.png +0 -0
- package/android/src/main/java/com/simiancraft/kaleidoscope/effects/MirrorFactory.kt +0 -57
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GpuEffectFactory.kt +0 -14
- package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/GpuEffectProcessor.kt +0 -198
- package/dist/backgrounds.d.ts +0 -3
- package/dist/backgrounds.d.ts.map +0 -1
- package/dist/backgrounds.js +0 -21
- package/dist/backgrounds.js.map +0 -1
- package/dist/web/effects/mirror.d.ts +0 -3
- package/dist/web/effects/mirror.d.ts.map +0 -1
- package/dist/web/effects/mirror.js +0 -31
- package/dist/web/effects/mirror.js.map +0 -1
- package/dist/web/effects/passthrough.d.ts +0 -3
- package/dist/web/effects/passthrough.d.ts.map +0 -1
- package/dist/web/effects/passthrough.js +0 -15
- package/dist/web/effects/passthrough.js.map +0 -1
- package/ios/KaleidoscopeModule/effects/MirrorProcessor.swift +0 -17
- package/plugin/build/withKaleidoscope.d.ts +0 -3
- package/plugin/build/withKaleidoscope.js +0 -14
- package/plugin/build/withKaleidoscope.js.map +0 -1
- package/src/backgrounds.ts +0 -23
- package/src/web/effects/mirror.ts +0 -37
- package/src/web/effects/passthrough.ts +0 -17
package/app.plugin.js
CHANGED
|
@@ -1,5 +1,255 @@
|
|
|
1
|
-
// Expo config plugin
|
|
2
|
-
//
|
|
3
|
-
|
|
1
|
+
// Expo config plugin. Native registration happens via the Expo Module's
|
|
2
|
+
// OnCreate hook (see android/.../KaleidoscopeModule.kt and
|
|
3
|
+
// ios/.../KaleidoscopeModule.swift), not through a plugin-time mod.
|
|
4
|
+
//
|
|
5
|
+
// This plugin's job is narrowly scoped: patch the consumer's iOS build to
|
|
6
|
+
// satisfy this library's hard requirements that cannot be expressed in the
|
|
7
|
+
// Expo Module manifest or the podspec alone. Today that means two patches,
|
|
8
|
+
// both installed by a single iOS `dangerous` mod:
|
|
9
|
+
//
|
|
10
|
+
// 1. Declare `pod 'react-native-webrtc', :modular_headers => true` in the
|
|
11
|
+
// generated Podfile so Swift sources can `import react_native_webrtc`
|
|
12
|
+
// (see modular-headers detail below).
|
|
13
|
+
// 2. Raise `ios.deploymentTarget` in `Podfile.properties.json` to the value
|
|
14
|
+
// required by `ios/Kaleidoscope.podspec`. The default Expo Podfile
|
|
15
|
+
// platform (iOS 13.4) is lower than this library's minimum (iOS 15.0
|
|
16
|
+
// for Apple Vision person segmentation), and `expo-modules-autolinking`
|
|
17
|
+
// silently drops pods whose declared minimum exceeds the Podfile
|
|
18
|
+
// platform — the library would build, install, and then be absent from
|
|
19
|
+
// the generated `ExpoModulesProvider.swift` at runtime.
|
|
20
|
+
//
|
|
21
|
+
// Bounding invariant for future patches in this mod:
|
|
22
|
+
// Every patch this mod installs must be (a) idempotent across re-prebuilds,
|
|
23
|
+
// (b) non-downgrading (never reduce a value the consumer or another plugin
|
|
24
|
+
// set higher), and (c) recoverable via a logged manual instruction on I/O
|
|
25
|
+
// failure (no throwing — prebuild must keep going).
|
|
26
|
+
//
|
|
27
|
+
// Ordering note: this mod must run AFTER any consumer plugin that writes the
|
|
28
|
+
// same files (notably `expo-build-properties`). Expo executes plugins in
|
|
29
|
+
// declaration order from `plugins[]`, so consumers must list this plugin
|
|
30
|
+
// AFTER `expo-build-properties` in their `app.config.js`. The demo's
|
|
31
|
+
// `app.config.js` already does so.
|
|
32
|
+
//
|
|
33
|
+
// Modular-headers detail: our Swift sources do `import react_native_webrtc`
|
|
34
|
+
// to reach the Obj-C `ProcessorProvider` class and `VideoFrameProcessorDelegate`
|
|
35
|
+
// protocol that live inside the react-native-webrtc pod. For a Swift target to
|
|
36
|
+
// `import` an Objective-C CocoaPod as a Clang module, that pod must be built with
|
|
37
|
+
// modular headers. react-native-webrtc is NOT built with modular headers by
|
|
38
|
+
// default in a React Native / Expo app, so a default prebuild produces Swift
|
|
39
|
+
// that fails to compile with "no such module 'react_native_webrtc'".
|
|
40
|
+
//
|
|
41
|
+
// We deliberately do NOT emit a global `use_modular_headers!`: that flips every
|
|
42
|
+
// pod to build as a Clang module, which regularly breaks React Native core
|
|
43
|
+
// pods that ship non-modular umbrella headers. A single per-pod opt-in is the
|
|
44
|
+
// narrow, supported fix that react-native-webrtc's own docs recommend.
|
|
45
|
+
//
|
|
46
|
+
// WHY this file requires nothing but Node builtins (no @expo/config-plugins):
|
|
47
|
+
// Expo's plugin resolver hardcodes the entry filename to `app.plugin.js` and
|
|
48
|
+
// loads it with `require()` from the file's REAL path. In the demo we consume
|
|
49
|
+
// this library via `file:..`, so on EAS the realpath is the repo root, where
|
|
50
|
+
// there is no node_modules (EAS only installs the demo subdirectory). A
|
|
51
|
+
// top-level `require('@expo/config-plugins')` therefore throws
|
|
52
|
+
// "Cannot find module '@expo/config-plugins'" on the EAS worker. Registering
|
|
53
|
+
// the dangerous mod by mutating `config.mods.ios.dangerous` directly removes
|
|
54
|
+
// that dependency, so the plugin loads identically from the symlinked demo, a
|
|
55
|
+
// normally-installed external consumer, and the EAS worker. The mod contract is
|
|
56
|
+
// the one @expo/config-plugins' own dangerous base provider calls: it invokes
|
|
57
|
+
// our mod as `nextMod({ ...config, modResults, modRequest })` and only requires
|
|
58
|
+
// the returned value to be the config object (it asserts `.mods` exists).
|
|
59
|
+
//
|
|
60
|
+
// This file is CommonJS, and the package is deliberately `type: commonjs`:
|
|
61
|
+
// Expo's plugin resolver loads app.plugin.js with `require()`, and a CommonJS
|
|
62
|
+
// entry sidesteps ESM-interop variance across the Node versions EAS workers run
|
|
63
|
+
// (older SDK images run Node 18, which cannot `require()` an ESM module at all;
|
|
64
|
+
// newer images run Node 20/22). The ESM-authored library source lives in `src/`
|
|
65
|
+
// and is consumed by Metro via the `react-native` export condition, never
|
|
66
|
+
// loaded by Node.
|
|
4
67
|
|
|
5
|
-
|
|
68
|
+
const fs = require('node:fs');
|
|
69
|
+
const path = require('node:path');
|
|
70
|
+
|
|
71
|
+
// A sentinel comment lets us find our own injection on re-prebuilds and stay
|
|
72
|
+
// idempotent regardless of how Expo regenerates the surrounding Podfile.
|
|
73
|
+
const SENTINEL = '# react-native-webrtc-kaleidoscope: modular headers (managed)';
|
|
74
|
+
|
|
75
|
+
// Mirrors ios/Kaleidoscope.podspec :ios => '15.0'. Bumping the podspec
|
|
76
|
+
// requires bumping this constant; the drift cost is a silent pod-install
|
|
77
|
+
// drop (the bug this plan fixes).
|
|
78
|
+
const IOS_DEPLOYMENT_TARGET = '15.0';
|
|
79
|
+
|
|
80
|
+
// Compare two dotted version strings element-wise. Returns true iff `existing`
|
|
81
|
+
// is strictly less than `target`. Missing/empty existing counts as "less than".
|
|
82
|
+
// We avoid `semver` so this file stays dependency-free for EAS workers that
|
|
83
|
+
// don't install the library's node_modules. The library's iOS deployment
|
|
84
|
+
// target is a plain three-part version like '15.0' (or '15.0.1' if Apple ever
|
|
85
|
+
// requires it); pre-release/build metadata is not part of the contract.
|
|
86
|
+
function isVersionLessThan(existing, target) {
|
|
87
|
+
if (typeof existing !== 'string' || existing.length === 0) {
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
const toParts = (s) => s.split('.').map((part) => Number(part) || 0);
|
|
91
|
+
const a = toParts(existing);
|
|
92
|
+
const b = toParts(target);
|
|
93
|
+
const max = Math.max(a.length, b.length);
|
|
94
|
+
for (let i = 0; i < max; i += 1) {
|
|
95
|
+
const av = a[i] || 0;
|
|
96
|
+
const bv = b[i] || 0;
|
|
97
|
+
if (av < bv) return true;
|
|
98
|
+
if (av > bv) return false;
|
|
99
|
+
}
|
|
100
|
+
return false; // equal
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Resolve which react-native-webrtc fork the consumer installed, and return its
|
|
104
|
+
// CocoaPods pod name + npm package directory (used to build the `:path` for
|
|
105
|
+
// the Podfile declaration). Two forks ship the same JS/native surface under
|
|
106
|
+
// different names (mirrors the dual probe in android/build.gradle):
|
|
107
|
+
// - @livekit/react-native-webrtc -> pod `livekit-react-native-webrtc`
|
|
108
|
+
// - react-native-webrtc -> pod `react-native-webrtc`
|
|
109
|
+
// We prefer the fork when both are present, matching the Swift import order
|
|
110
|
+
// (`#if canImport(livekit_react_native_webrtc)` first). Declaring a pod for a
|
|
111
|
+
// package that is not installed would break `pod install`, so we return null
|
|
112
|
+
// (and skip patching) when neither is found.
|
|
113
|
+
function resolveWebrtcPod(projectRoot) {
|
|
114
|
+
if (!projectRoot) {
|
|
115
|
+
return { podName: 'react-native-webrtc', packageDir: 'react-native-webrtc' };
|
|
116
|
+
}
|
|
117
|
+
const fork = path.join(projectRoot, 'node_modules', '@livekit', 'react-native-webrtc');
|
|
118
|
+
const upstream = path.join(projectRoot, 'node_modules', 'react-native-webrtc');
|
|
119
|
+
if (fs.existsSync(fork)) {
|
|
120
|
+
return { podName: 'livekit-react-native-webrtc', packageDir: '@livekit/react-native-webrtc' };
|
|
121
|
+
}
|
|
122
|
+
if (fs.existsSync(upstream)) {
|
|
123
|
+
return { podName: 'react-native-webrtc', packageDir: 'react-native-webrtc' };
|
|
124
|
+
}
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Ensure the Podfile builds the resolved react-native-webrtc pod with modular
|
|
129
|
+
// headers so our Swift can `import` it as a Clang module. Declare with an
|
|
130
|
+
// explicit `:path` (instead of a bare `pod 'name'`) so the build works even
|
|
131
|
+
// when RN autolinking does not register the pod for us — e.g. react-native-webrtc's
|
|
132
|
+
// own `react-native.config.js` only sets `module.exports` under
|
|
133
|
+
// `--use-react-native-macos`, and on EAS workers `use_native_modules!` has been
|
|
134
|
+
// observed to skip the pod entirely as a result. With `:path` provided here,
|
|
135
|
+
// CocoaPods resolves the local podspec directly; when autolinking also picks
|
|
136
|
+
// it up, the two identical-path declarations are merged and modular_headers
|
|
137
|
+
// is applied. Idempotent: running prebuild twice neither duplicates the line
|
|
138
|
+
// nor corrupts the Podfile.
|
|
139
|
+
function patchPodfile(contents, pod) {
|
|
140
|
+
if (contents.includes(SENTINEL)) {
|
|
141
|
+
return contents;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const block = `${SENTINEL}\n pod '${pod.podName}', :path => '../node_modules/${pod.packageDir}', :modular_headers => true`;
|
|
145
|
+
const lines = contents.split('\n');
|
|
146
|
+
|
|
147
|
+
// Insert just inside the first `target ... do` block so the per-pod
|
|
148
|
+
// declaration sits in the same scope as the autolinked React Native pods.
|
|
149
|
+
const targetIndex = lines.findIndex((line) => /^\s*target\s+['"].*['"]\s+do\b/.test(line));
|
|
150
|
+
if (targetIndex !== -1) {
|
|
151
|
+
lines.splice(targetIndex + 1, 0, block);
|
|
152
|
+
return lines.join('\n');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// No `target` block found (unexpected for an Expo-generated Podfile); append
|
|
156
|
+
// the declaration so the build requirement is at least present.
|
|
157
|
+
return `${contents.trimEnd()}\n${block}\n`;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const withKaleidoscope = (config) => {
|
|
161
|
+
if (!config.mods) {
|
|
162
|
+
config.mods = {};
|
|
163
|
+
}
|
|
164
|
+
if (!config.mods.ios) {
|
|
165
|
+
config.mods.ios = {};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Chain any previously registered iOS dangerous mod so we cooperate with
|
|
169
|
+
// other plugins instead of clobbering them.
|
|
170
|
+
const previousMod = config.mods.ios.dangerous;
|
|
171
|
+
|
|
172
|
+
config.mods.ios.dangerous = async (modConfig) => {
|
|
173
|
+
const result = typeof previousMod === 'function' ? await previousMod(modConfig) : modConfig;
|
|
174
|
+
const modRequest = result.modRequest || {};
|
|
175
|
+
const platformProjectRoot = modRequest.platformProjectRoot;
|
|
176
|
+
const pod = resolveWebrtcPod(modRequest.projectRoot);
|
|
177
|
+
if (platformProjectRoot && pod) {
|
|
178
|
+
const podfilePath = path.join(platformProjectRoot, 'Podfile');
|
|
179
|
+
try {
|
|
180
|
+
const original = fs.readFileSync(podfilePath, 'utf8');
|
|
181
|
+
const patched = patchPodfile(original, pod);
|
|
182
|
+
if (patched !== original) {
|
|
183
|
+
fs.writeFileSync(podfilePath, patched);
|
|
184
|
+
}
|
|
185
|
+
} catch (error) {
|
|
186
|
+
// Non-fatal: surface a clear instruction rather than failing prebuild.
|
|
187
|
+
const manualLine = `pod '${pod.podName}', :path => '../node_modules/${pod.packageDir}', :modular_headers => true`;
|
|
188
|
+
console.warn(
|
|
189
|
+
`[react-native-webrtc-kaleidoscope] Could not patch the Podfile to build ${pod.podName} with modular headers; add "${manualLine}" inside your app target manually. ${String(error)}`,
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
if (platformProjectRoot) {
|
|
194
|
+
// Raise the consumer's iOS deployment target via Podfile.properties.json.
|
|
195
|
+
// The generated Podfile reads `podfile_properties['ios.deploymentTarget']`
|
|
196
|
+
// at the top, so this is the canonical, no-Podfile-edit override seam.
|
|
197
|
+
// `expo-modules-autolinking`'s package-filter silently drops any pod
|
|
198
|
+
// whose declared minimum platform exceeds the Podfile platform; without
|
|
199
|
+
// this bump the Kaleidoscope pod is dropped and the runtime module
|
|
200
|
+
// lookup throws.
|
|
201
|
+
const propsPath = path.join(platformProjectRoot, 'Podfile.properties.json');
|
|
202
|
+
try {
|
|
203
|
+
let parsed = {};
|
|
204
|
+
try {
|
|
205
|
+
const raw = fs.readFileSync(propsPath, 'utf8');
|
|
206
|
+
try {
|
|
207
|
+
const candidate = JSON.parse(raw);
|
|
208
|
+
if (candidate && typeof candidate === 'object' && !Array.isArray(candidate)) {
|
|
209
|
+
parsed = candidate;
|
|
210
|
+
}
|
|
211
|
+
} catch (jsonError) {
|
|
212
|
+
// Corrupt JSON: warn but proceed with `{}` so the build still gets
|
|
213
|
+
// the bump it needs. The next prebuild will fully regenerate the
|
|
214
|
+
// file anyway.
|
|
215
|
+
console.warn(
|
|
216
|
+
`[react-native-webrtc-kaleidoscope] Could not parse ${propsPath}; rewriting with defaults. ${String(jsonError)}`,
|
|
217
|
+
);
|
|
218
|
+
parsed = {};
|
|
219
|
+
}
|
|
220
|
+
} catch (readError) {
|
|
221
|
+
if (readError && readError.code === 'ENOENT') {
|
|
222
|
+
parsed = {};
|
|
223
|
+
} else {
|
|
224
|
+
// Transient I/O failure (EACCES, EMFILE, ...). Don't clobber the
|
|
225
|
+
// file when we couldn't actually read it; warn and bail.
|
|
226
|
+
console.warn(
|
|
227
|
+
`[react-native-webrtc-kaleidoscope] Could not read ${propsPath}; skipping iOS deployment-target bump. ${String(readError)}`,
|
|
228
|
+
);
|
|
229
|
+
return result;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// Explicit own-key copy into a fresh object to foreclose
|
|
233
|
+
// `__proto__`-as-literal-key surprises from JSON.parse.
|
|
234
|
+
const next = {};
|
|
235
|
+
for (const key of Object.keys(parsed)) {
|
|
236
|
+
next[key] = parsed[key];
|
|
237
|
+
}
|
|
238
|
+
const existing = next['ios.deploymentTarget'];
|
|
239
|
+
if (isVersionLessThan(existing, IOS_DEPLOYMENT_TARGET)) {
|
|
240
|
+
next['ios.deploymentTarget'] = IOS_DEPLOYMENT_TARGET;
|
|
241
|
+
}
|
|
242
|
+
fs.writeFileSync(propsPath, `${JSON.stringify(next, null, 2)}\n`);
|
|
243
|
+
} catch (error) {
|
|
244
|
+
console.warn(
|
|
245
|
+
`[react-native-webrtc-kaleidoscope] Could not patch ${propsPath} to raise iOS deployment target; add "ios.deploymentTarget": "${IOS_DEPLOYMENT_TARGET}" to Podfile.properties.json under your demo/ios directory manually. ${String(error)}`,
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return result;
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
return config;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
module.exports = withKaleidoscope;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-office.d.ts","sourceRoot":"","sources":["../../src/backgrounds/dark-office.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,UAAU,EAAE,YAA4B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by dark-office.web.ts.\nexport const darkOffice: PresetSource = 'dark-office';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by dark-office.web.ts.
|
|
4
|
+
export const darkOffice = 'dark-office';
|
|
5
|
+
//# sourceMappingURL=dark-office.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-office.js","sourceRoot":"","sources":["../../src/backgrounds/dark-office.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,wCAAwC;AACxC,MAAM,CAAC,MAAM,UAAU,GAAiB,aAAa,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by dark-office.web.ts.\nexport const darkOffice: PresetSource = 'dark-office';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-office.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/dark-office.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,UAAU,EAAE,YAAoD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport darkOfficeAsset from './dark-office.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect\n// fetches. Resolved with expo-asset because react-native-web has no\n// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.\nexport const darkOffice: PresetSource = Asset.fromModule(darkOfficeAsset).uri;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import darkOfficeAsset from './dark-office.webp';
|
|
4
|
+
// Web variant. The bundled WebP's URL, which the background-image effect
|
|
5
|
+
// fetches. Resolved with expo-asset because react-native-web has no
|
|
6
|
+
// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.
|
|
7
|
+
export const darkOffice = Asset.fromModule(darkOfficeAsset).uri;
|
|
8
|
+
//# sourceMappingURL=dark-office.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dark-office.web.js","sourceRoot":"","sources":["../../src/backgrounds/dark-office.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAGjD,yEAAyE;AACzE,oEAAoE;AACpE,uEAAuE;AACvE,MAAM,CAAC,MAAM,UAAU,GAAiB,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport darkOfficeAsset from './dark-office.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect\n// fetches. Resolved with expo-asset because react-native-web has no\n// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.\nexport const darkOffice: PresetSource = Asset.fromModule(darkOfficeAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-resolutions.d.ts","sourceRoot":"","sources":["../../src/backgrounds/debug-resolutions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,eAAO,MAAM,gBAAgB,EAAE,YAAkC,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name. Web is handled by\n// debug-resolutions.web.ts. This is a viewport/resolution calibration grid for\n// verifying background cover-fit (clipping, crop, scale) on device.\nexport const debugResolutions: PresetSource = 'debug-resolutions';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name. Web is handled by
|
|
3
|
+
// debug-resolutions.web.ts. This is a viewport/resolution calibration grid for
|
|
4
|
+
// verifying background cover-fit (clipping, crop, scale) on device.
|
|
5
|
+
export const debugResolutions = 'debug-resolutions';
|
|
6
|
+
//# sourceMappingURL=debug-resolutions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-resolutions.js","sourceRoot":"","sources":["../../src/backgrounds/debug-resolutions.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,wDAAwD;AACxD,+EAA+E;AAC/E,oEAAoE;AACpE,MAAM,CAAC,MAAM,gBAAgB,GAAiB,mBAAmB,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name. Web is handled by\n// debug-resolutions.web.ts. This is a viewport/resolution calibration grid for\n// verifying background cover-fit (clipping, crop, scale) on device.\nexport const debugResolutions: PresetSource = 'debug-resolutions';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-resolutions.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/debug-resolutions.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,gBAAgB,EAAE,YAA0D,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport debugResolutionsAsset from './debug-resolutions.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. A viewport/resolution calibration grid (concentric labeled\n// rectangles for common capture resolutions) for verifying background\n// cover-fit clipping, crop, and scale on device.\nexport const debugResolutions: PresetSource = Asset.fromModule(debugResolutionsAsset).uri;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import debugResolutionsAsset from './debug-resolutions.webp';
|
|
4
|
+
// Web variant. A viewport/resolution calibration grid (concentric labeled
|
|
5
|
+
// rectangles for common capture resolutions) for verifying background
|
|
6
|
+
// cover-fit clipping, crop, and scale on device.
|
|
7
|
+
export const debugResolutions = Asset.fromModule(debugResolutionsAsset).uri;
|
|
8
|
+
//# sourceMappingURL=debug-resolutions.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-resolutions.web.js","sourceRoot":"","sources":["../../src/backgrounds/debug-resolutions.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,qBAAqB,MAAM,0BAA0B,CAAC;AAG7D,0EAA0E;AAC1E,sEAAsE;AACtE,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAiB,KAAK,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport debugResolutionsAsset from './debug-resolutions.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. A viewport/resolution calibration grid (concentric labeled\n// rectangles for common capture resolutions) for verifying background\n// cover-fit clipping, crop, and scale on device.\nexport const debugResolutions: PresetSource = Asset.fromModule(debugResolutionsAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-dark.d.ts","sourceRoot":"","sources":["../../src/backgrounds/home-dark.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,QAAQ,EAAE,YAA0B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by home-dark.web.ts.\nexport const homeDark: PresetSource = 'home-dark';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by home-dark.web.ts.
|
|
4
|
+
export const homeDark = 'home-dark';
|
|
5
|
+
//# sourceMappingURL=home-dark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-dark.js","sourceRoot":"","sources":["../../src/backgrounds/home-dark.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,sCAAsC;AACtC,MAAM,CAAC,MAAM,QAAQ,GAAiB,WAAW,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by home-dark.web.ts.\nexport const homeDark: PresetSource = 'home-dark';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-dark.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/home-dark.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,eAAO,MAAM,QAAQ,EAAE,YAAkD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport homeDarkAsset from './home-dark.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const homeDark: PresetSource = Asset.fromModule(homeDarkAsset).uri;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import homeDarkAsset from './home-dark.webp';
|
|
4
|
+
// Web variant. The bundled WebP's URL, which the background-image effect fetches.
|
|
5
|
+
export const homeDark = Asset.fromModule(homeDarkAsset).uri;
|
|
6
|
+
//# sourceMappingURL=home-dark.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-dark.web.js","sourceRoot":"","sources":["../../src/backgrounds/home-dark.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAG7C,kFAAkF;AAClF,MAAM,CAAC,MAAM,QAAQ,GAAiB,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport homeDarkAsset from './home-dark.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const homeDark: PresetSource = Asset.fromModule(homeDarkAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-light.d.ts","sourceRoot":"","sources":["../../src/backgrounds/home-light.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,SAAS,EAAE,YAA2B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by home-light.web.ts.\nexport const homeLight: PresetSource = 'home-light';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by home-light.web.ts.
|
|
4
|
+
export const homeLight = 'home-light';
|
|
5
|
+
//# sourceMappingURL=home-light.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-light.js","sourceRoot":"","sources":["../../src/backgrounds/home-light.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,uCAAuC;AACvC,MAAM,CAAC,MAAM,SAAS,GAAiB,YAAY,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by home-light.web.ts.\nexport const homeLight: PresetSource = 'home-light';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-light.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/home-light.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,eAAO,MAAM,SAAS,EAAE,YAAmD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport homeLightAsset from './home-light.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const homeLight: PresetSource = Asset.fromModule(homeLightAsset).uri;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import homeLightAsset from './home-light.webp';
|
|
4
|
+
// Web variant. The bundled WebP's URL, which the background-image effect fetches.
|
|
5
|
+
export const homeLight = Asset.fromModule(homeLightAsset).uri;
|
|
6
|
+
//# sourceMappingURL=home-light.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-light.web.js","sourceRoot":"","sources":["../../src/backgrounds/home-light.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAG/C,kFAAkF;AAClF,MAAM,CAAC,MAAM,SAAS,GAAiB,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport homeLightAsset from './home-light.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const homeLight: PresetSource = Asset.fromModule(homeLightAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/backgrounds/index.ts"],"names":[],"mappings":"AAKA,YAAY,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Barrel for the backgrounds feature: the platform-agnostic preset catalog.\n// Preset *sources* are not re-exported here; import them per preset so each\n// pulls only its own WebP, e.g.\n// `import { darkOffice } from 'react-native-webrtc-kaleidoscope/backgrounds/dark-office'`.\n\nexport type { BackgroundPresetName } from './presets';\nexport { BACKGROUND_PRESETS } from './presets';\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Barrel for the backgrounds feature: the platform-agnostic preset catalog.
|
|
2
|
+
// Preset *sources* are not re-exported here; import them per preset so each
|
|
3
|
+
// pulls only its own WebP, e.g.
|
|
4
|
+
// `import { darkOffice } from 'react-native-webrtc-kaleidoscope/backgrounds/dark-office'`.
|
|
5
|
+
export { BACKGROUND_PRESETS } from './presets';
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/backgrounds/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,4EAA4E;AAC5E,gCAAgC;AAChC,2FAA2F;AAG3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC","sourcesContent":["// Barrel for the backgrounds feature: the platform-agnostic preset catalog.\n// Preset *sources* are not re-exported here; import them per preset so each\n// pulls only its own WebP, e.g.\n// `import { darkOffice } from 'react-native-webrtc-kaleidoscope/backgrounds/dark-office'`.\n\nexport type { BackgroundPresetName } from './presets';\nexport { BACKGROUND_PRESETS } from './presets';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-office.d.ts","sourceRoot":"","sources":["../../src/backgrounds/light-office.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,WAAW,EAAE,YAA6B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by light-office.web.ts.\nexport const lightOffice: PresetSource = 'light-office';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by light-office.web.ts.
|
|
4
|
+
export const lightOffice = 'light-office';
|
|
5
|
+
//# sourceMappingURL=light-office.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-office.js","sourceRoot":"","sources":["../../src/backgrounds/light-office.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAiB,cAAc,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by light-office.web.ts.\nexport const lightOffice: PresetSource = 'light-office';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-office.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/light-office.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,WAAW,EAAE,YAAqD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport lightOfficeAsset from './light-office.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect\n// fetches. Resolved with expo-asset because react-native-web has no\n// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.\nexport const lightOffice: PresetSource = Asset.fromModule(lightOfficeAsset).uri;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import lightOfficeAsset from './light-office.webp';
|
|
4
|
+
// Web variant. The bundled WebP's URL, which the background-image effect
|
|
5
|
+
// fetches. Resolved with expo-asset because react-native-web has no
|
|
6
|
+
// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.
|
|
7
|
+
export const lightOffice = Asset.fromModule(lightOfficeAsset).uri;
|
|
8
|
+
//# sourceMappingURL=light-office.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-office.web.js","sourceRoot":"","sources":["../../src/backgrounds/light-office.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,gBAAgB,MAAM,qBAAqB,CAAC;AAGnD,yEAAyE;AACzE,oEAAoE;AACpE,uEAAuE;AACvE,MAAM,CAAC,MAAM,WAAW,GAAiB,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport lightOfficeAsset from './light-office.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect\n// fetches. Resolved with expo-asset because react-native-web has no\n// Image.resolveAssetSource; `.uri` is set synchronously by fromModule.\nexport const lightOffice: PresetSource = Asset.fromModule(lightOfficeAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-dark.d.ts","sourceRoot":"","sources":["../../src/backgrounds/nature-dark.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,UAAU,EAAE,YAA4B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by nature-dark.web.ts.\nexport const natureDark: PresetSource = 'nature-dark';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by nature-dark.web.ts.
|
|
4
|
+
export const natureDark = 'nature-dark';
|
|
5
|
+
//# sourceMappingURL=nature-dark.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-dark.js","sourceRoot":"","sources":["../../src/backgrounds/nature-dark.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,wCAAwC;AACxC,MAAM,CAAC,MAAM,UAAU,GAAiB,aAAa,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by nature-dark.web.ts.\nexport const natureDark: PresetSource = 'nature-dark';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-dark.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/nature-dark.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,eAAO,MAAM,UAAU,EAAE,YAAoD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport natureDarkAsset from './nature-dark.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const natureDark: PresetSource = Asset.fromModule(natureDarkAsset).uri;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference path="./assets.d.ts" />
|
|
2
|
+
import { Asset } from 'expo-asset';
|
|
3
|
+
import natureDarkAsset from './nature-dark.webp';
|
|
4
|
+
// Web variant. The bundled WebP's URL, which the background-image effect fetches.
|
|
5
|
+
export const natureDark = Asset.fromModule(natureDarkAsset).uri;
|
|
6
|
+
//# sourceMappingURL=nature-dark.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-dark.web.js","sourceRoot":"","sources":["../../src/backgrounds/nature-dark.web.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AAGjD,kFAAkF;AAClF,MAAM,CAAC,MAAM,UAAU,GAAiB,KAAK,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC,GAAG,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport natureDarkAsset from './nature-dark.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const natureDark: PresetSource = Asset.fromModule(natureDarkAsset).uri;\n"]}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-light.d.ts","sourceRoot":"","sources":["../../src/backgrounds/nature-light.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAK1D,eAAO,MAAM,WAAW,EAAE,YAA6B,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by nature-light.web.ts.\nexport const natureLight: PresetSource = 'nature-light';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Native variant. The native module loads its own bundled resource by name, so
|
|
2
|
+
// the source is just the preset name; no WebP import, no expo-asset on native.
|
|
3
|
+
// Web is handled by nature-light.web.ts.
|
|
4
|
+
export const natureLight = 'nature-light';
|
|
5
|
+
//# sourceMappingURL=nature-light.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-light.js","sourceRoot":"","sources":["../../src/backgrounds/nature-light.ts"],"names":[],"mappings":"AAEA,+EAA+E;AAC/E,+EAA+E;AAC/E,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAiB,cAAc,CAAC","sourcesContent":["import type { PresetSource } from './preset-source.types';\n\n// Native variant. The native module loads its own bundled resource by name, so\n// the source is just the preset name; no WebP import, no expo-asset on native.\n// Web is handled by nature-light.web.ts.\nexport const natureLight: PresetSource = 'nature-light';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nature-light.web.d.ts","sourceRoot":"","sources":["../../src/backgrounds/nature-light.web.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAG1D,eAAO,MAAM,WAAW,EAAE,YAAqD,CAAC","sourcesContent":["/// <reference path=\"./assets.d.ts\" />\nimport { Asset } from 'expo-asset';\nimport natureLightAsset from './nature-light.webp';\nimport type { PresetSource } from './preset-source.types';\n\n// Web variant. The bundled WebP's URL, which the background-image effect fetches.\nexport const natureLight: PresetSource = Asset.fromModule(natureLightAsset).uri;\n"]}
|