@aguacerowx/react-native 0.0.53 → 0.0.54
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/LICENSE +21 -0
- package/android/src/main/java/com/aguacerowx/reactnative/NexradRadarLayerView.java +14 -2
- package/android/src/main/java/com/aguacerowx/reactnative/WeatherFrameProcessorModule.java +77 -0
- package/index.js +1 -1
- package/ios/WeatherFrameProcessorModule.m +19 -15
- package/ios/WeatherFrameProcessorModule.swift +65 -0
- package/lib/commonjs/AguaceroContext.js +0 -4
- package/lib/commonjs/AguaceroContext.js.map +1 -1
- package/lib/commonjs/GridRenderLayer.js +62 -76
- package/lib/commonjs/GridRenderLayer.js.map +1 -1
- package/lib/commonjs/MapManager.js +110 -224
- package/lib/commonjs/MapManager.js.map +1 -1
- package/lib/commonjs/MapRegistry.js +21 -33
- package/lib/commonjs/MapRegistry.js.map +1 -1
- package/lib/commonjs/NexradRadarLayer.android.js +28 -100
- package/lib/commonjs/NexradRadarLayer.android.js.map +1 -1
- package/lib/commonjs/NexradRadarLayer.ios.js +26 -97
- package/lib/commonjs/NexradRadarLayer.ios.js.map +1 -1
- package/lib/commonjs/NexradSitesMapLayer.js +41 -61
- package/lib/commonjs/NexradSitesMapLayer.js.map +1 -1
- package/lib/commonjs/SatelliteLayer.android.js +26 -38
- package/lib/commonjs/SatelliteLayer.android.js.map +1 -1
- package/lib/commonjs/SatelliteLayer.ios.js +30 -42
- package/lib/commonjs/SatelliteLayer.ios.js.map +1 -1
- package/lib/commonjs/StyleApplicator.js +129 -175
- package/lib/commonjs/StyleApplicator.js.map +1 -1
- package/lib/commonjs/WeatherLayerManager.js +995 -1646
- package/lib/commonjs/WeatherLayerManager.js.map +1 -1
- package/lib/commonjs/aguaceroCoreDebugHooks.js +58 -130
- package/lib/commonjs/aguaceroCoreDebugHooks.js.map +1 -1
- package/lib/commonjs/aguaceroRnDebug.js +147 -288
- package/lib/commonjs/aguaceroRnDebug.js.map +1 -1
- package/lib/commonjs/cdnAuthenticatedFetch.js +104 -0
- package/lib/commonjs/cdnAuthenticatedFetch.js.map +1 -0
- package/lib/commonjs/dispatchViewManagerCommandCompat.js +51 -88
- package/lib/commonjs/dispatchViewManagerCommandCompat.js.map +1 -1
- package/lib/commonjs/gridCdnAuth.js +41 -50
- package/lib/commonjs/gridCdnAuth.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/nexrad/nexradAndroidController.js +851 -863
- package/lib/commonjs/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
- package/lib/commonjs/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/nexradDiag.js +32 -148
- package/lib/commonjs/nexrad/nexradDiag.js.map +1 -1
- package/lib/commonjs/nexrad/nexradLevel2Keys.js +261 -0
- package/lib/commonjs/nexrad/nexradLevel2Keys.js.map +1 -0
- package/lib/commonjs/nexrad/nexradLutBuild.js +64 -111
- package/lib/commonjs/nexrad/nexradLutBuild.js.map +1 -1
- package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js +136 -164
- package/lib/commonjs/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/nexradSdkImports.js +51 -0
- package/lib/commonjs/nexrad/nexradSdkImports.js.map +1 -0
- package/lib/commonjs/nexrad/radarArchiveCore.bundled.js +2848 -4455
- package/lib/commonjs/nexrad/radarArchiveCore.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/radarDecode.worker.bundled.js +445 -648
- package/lib/commonjs/nexrad/radarDecode.worker.bundled.js.map +1 -1
- package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js +52 -68
- package/lib/commonjs/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
- package/lib/commonjs/nexradNativeCommandIds.js +24 -0
- package/lib/commonjs/nexradNativeCommandIds.js.map +1 -0
- package/lib/commonjs/nws/NwsAlertsOverlay.android.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.ios.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.js +3 -3
- package/lib/commonjs/nws/NwsAlertsOverlay.js.map +1 -1
- package/lib/commonjs/nws/NwsAlertsOverlay.native.js +235 -361
- package/lib/commonjs/nws/NwsAlertsOverlay.native.js.map +1 -1
- package/lib/commonjs/nws/eventSourceRnPolyfill.js +92 -146
- package/lib/commonjs/nws/eventSourceRnPolyfill.js.map +1 -1
- package/lib/commonjs/nws/nwsAndroidConstants.js +2 -8
- package/lib/commonjs/nws/nwsAndroidConstants.js.map +1 -1
- package/lib/commonjs/satellite/satelliteAndroidController.js +117 -202
- package/lib/commonjs/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/commonjs/satelliteBridgeDiag.js +3 -13
- package/lib/commonjs/satelliteBridgeDiag.js.map +1 -1
- package/lib/commonjs/satelliteRnDebug.js +117 -218
- package/lib/commonjs/satelliteRnDebug.js.map +1 -1
- package/lib/module/AguaceroContext.js +2 -7
- package/lib/module/AguaceroContext.js.map +1 -1
- package/lib/module/GridRenderLayer.js +66 -80
- package/lib/module/GridRenderLayer.js.map +1 -1
- package/lib/module/MapManager.js +125 -239
- package/lib/module/MapManager.js.map +1 -1
- package/lib/module/MapRegistry.js +21 -33
- package/lib/module/MapRegistry.js.map +1 -1
- package/lib/module/NexradRadarLayer.android.js +32 -104
- package/lib/module/NexradRadarLayer.android.js.map +1 -1
- package/lib/module/NexradRadarLayer.ios.js +30 -101
- package/lib/module/NexradRadarLayer.ios.js.map +1 -1
- package/lib/module/NexradSitesMapLayer.js +44 -63
- package/lib/module/NexradSitesMapLayer.js.map +1 -1
- package/lib/module/SatelliteLayer.android.js +32 -44
- package/lib/module/SatelliteLayer.android.js.map +1 -1
- package/lib/module/SatelliteLayer.ios.js +36 -48
- package/lib/module/SatelliteLayer.ios.js.map +1 -1
- package/lib/module/StyleApplicator.js +144 -191
- package/lib/module/StyleApplicator.js.map +1 -1
- package/lib/module/WeatherLayerManager.js +1024 -1675
- package/lib/module/WeatherLayerManager.js.map +1 -1
- package/lib/module/aguaceroCoreDebugHooks.js +59 -130
- package/lib/module/aguaceroCoreDebugHooks.js.map +1 -1
- package/lib/module/aguaceroRnDebug.js +151 -292
- package/lib/module/aguaceroRnDebug.js.map +1 -1
- package/lib/module/cdnAuthenticatedFetch.js +97 -0
- package/lib/module/cdnAuthenticatedFetch.js.map +1 -0
- package/lib/module/dispatchViewManagerCommandCompat.js +52 -90
- package/lib/module/dispatchViewManagerCommandCompat.js.map +1 -1
- package/lib/module/gridCdnAuth.js +38 -50
- package/lib/module/gridCdnAuth.js.map +1 -1
- package/lib/module/index.js +9 -7
- package/lib/module/index.js.map +1 -1
- package/lib/module/nexrad/nexradAndroidController.js +865 -876
- package/lib/module/nexrad/nexradAndroidController.js.map +1 -1
- package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +62 -85
- package/lib/module/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js.map +1 -1
- package/lib/module/nexrad/nexradDiag.js +31 -145
- package/lib/module/nexrad/nexradDiag.js.map +1 -1
- package/lib/module/nexrad/nexradLevel2Keys.js +245 -0
- package/lib/module/nexrad/nexradLevel2Keys.js.map +1 -0
- package/lib/module/nexrad/nexradLutBuild.js +64 -110
- package/lib/module/nexrad/nexradLutBuild.js.map +1 -1
- package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js +136 -163
- package/lib/module/nexrad/nexradMapboxFrameOpts.bundled.js.map +1 -1
- package/lib/module/nexrad/nexradSdkImports.js +4 -0
- package/lib/module/nexrad/nexradSdkImports.js.map +1 -0
- package/lib/module/nexrad/radarArchiveCore.bundled.js +2839 -4448
- package/lib/module/nexrad/radarArchiveCore.bundled.js.map +1 -1
- package/lib/module/nexrad/radarDecode.worker.bundled.js +445 -648
- package/lib/module/nexrad/radarDecode.worker.bundled.js.map +1 -1
- package/lib/module/nexrad/radarFrameGpuMatch.bundled.js +50 -66
- package/lib/module/nexrad/radarFrameGpuMatch.bundled.js.map +1 -1
- package/lib/module/nexradNativeCommandIds.js +18 -0
- package/lib/module/nexradNativeCommandIds.js.map +1 -0
- package/lib/module/nws/NwsAlertsOverlay.android.js +1 -1
- package/lib/module/nws/NwsAlertsOverlay.android.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.ios.js +1 -1
- package/lib/module/nws/NwsAlertsOverlay.ios.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.js +5 -5
- package/lib/module/nws/NwsAlertsOverlay.js.map +1 -1
- package/lib/module/nws/NwsAlertsOverlay.native.js +248 -373
- package/lib/module/nws/NwsAlertsOverlay.native.js.map +1 -1
- package/lib/module/nws/eventSourceRnPolyfill.js +92 -146
- package/lib/module/nws/eventSourceRnPolyfill.js.map +1 -1
- package/lib/module/nws/nwsAndroidConstants.js +2 -8
- package/lib/module/nws/nwsAndroidConstants.js.map +1 -1
- package/lib/module/satellite/satelliteAndroidController.js +123 -208
- package/lib/module/satellite/satelliteAndroidController.js.map +1 -1
- package/lib/module/satelliteBridgeDiag.js +3 -13
- package/lib/module/satelliteBridgeDiag.js.map +1 -1
- package/lib/module/satelliteRnDebug.js +123 -223
- package/lib/module/satelliteRnDebug.js.map +1 -1
- package/lib/typescript/AguaceroContext.d.ts +0 -4
- package/lib/typescript/AguaceroContext.d.ts.map +1 -1
- package/lib/typescript/GridRenderLayer.d.ts.map +1 -1
- package/lib/typescript/MapManager.d.ts +0 -12
- package/lib/typescript/MapManager.d.ts.map +1 -1
- package/lib/typescript/MapRegistry.d.ts +10 -12
- package/lib/typescript/MapRegistry.d.ts.map +1 -1
- package/lib/typescript/NexradRadarLayer.android.d.ts.map +1 -1
- package/lib/typescript/NexradRadarLayer.ios.d.ts.map +1 -1
- package/lib/typescript/NexradSitesMapLayer.d.ts +4 -10
- package/lib/typescript/NexradSitesMapLayer.d.ts.map +1 -1
- package/lib/typescript/SatelliteLayer.android.d.ts.map +1 -1
- package/lib/typescript/SatelliteLayer.ios.d.ts.map +1 -1
- package/lib/typescript/StyleApplicator.d.ts +1 -1
- package/lib/typescript/StyleApplicator.d.ts.map +1 -1
- package/lib/typescript/WeatherLayerManager.d.ts.map +1 -1
- package/lib/typescript/aguaceroCoreDebugHooks.d.ts +2 -9
- package/lib/typescript/aguaceroCoreDebugHooks.d.ts.map +1 -1
- package/lib/typescript/aguaceroRnDebug.d.ts +47 -66
- package/lib/typescript/aguaceroRnDebug.d.ts.map +1 -1
- package/lib/typescript/cdnAuthenticatedFetch.d.ts +10 -0
- package/lib/typescript/cdnAuthenticatedFetch.d.ts.map +1 -0
- package/lib/typescript/dispatchViewManagerCommandCompat.d.ts +1 -17
- package/lib/typescript/dispatchViewManagerCommandCompat.d.ts.map +1 -1
- package/lib/typescript/gridCdnAuth.d.ts +16 -21
- package/lib/typescript/gridCdnAuth.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/nexrad/nexradAndroidController.d.ts +39 -89
- package/lib/typescript/nexrad/nexradAndroidController.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts +2 -1
- package/lib/typescript/nexrad/nexradCrossSectionSampleAtLatLon.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradDiag.d.ts +13 -101
- package/lib/typescript/nexrad/nexradDiag.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradLevel2Keys.d.ts +36 -0
- package/lib/typescript/nexrad/nexradLevel2Keys.d.ts.map +1 -0
- package/lib/typescript/nexrad/nexradLutBuild.d.ts +3 -10
- package/lib/typescript/nexrad/nexradLutBuild.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts +4 -3
- package/lib/typescript/nexrad/nexradMapboxFrameOpts.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/nexradSdkImports.d.ts +2 -0
- package/lib/typescript/nexrad/nexradSdkImports.d.ts.map +1 -0
- package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts +12 -7
- package/lib/typescript/nexrad/radarArchiveCore.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts +20 -20
- package/lib/typescript/nexrad/radarDecode.worker.bundled.d.ts.map +1 -1
- package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts +4 -3
- package/lib/typescript/nexrad/radarFrameGpuMatch.bundled.d.ts.map +1 -1
- package/lib/typescript/nexradNativeCommandIds.d.ts +2 -0
- package/lib/typescript/nexradNativeCommandIds.d.ts.map +1 -0
- package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts +6 -17
- package/lib/typescript/nws/NwsAlertsOverlay.native.d.ts.map +1 -1
- package/lib/typescript/nws/eventSourceRnPolyfill.d.ts +0 -3
- package/lib/typescript/nws/eventSourceRnPolyfill.d.ts.map +1 -1
- package/lib/typescript/nws/nwsAndroidConstants.d.ts +0 -5
- package/lib/typescript/nws/nwsAndroidConstants.d.ts.map +1 -1
- package/lib/typescript/satellite/satelliteAndroidController.d.ts +9 -47
- package/lib/typescript/satellite/satelliteAndroidController.d.ts.map +1 -1
- package/lib/typescript/satelliteBridgeDiag.d.ts +1 -5
- package/lib/typescript/satelliteBridgeDiag.d.ts.map +1 -1
- package/lib/typescript/satelliteRnDebug.d.ts +24 -30
- package/lib/typescript/satelliteRnDebug.d.ts.map +1 -1
- package/package.json +75 -74
- package/src/AguaceroContext.js +1 -7
- package/src/GridRenderLayer.js +1 -128
- package/src/MapManager.js +1 -277
- package/src/MapRegistry.js +1 -56
- package/src/NexradRadarLayer.android.js +1 -121
- package/src/NexradRadarLayer.ios.js +1 -115
- package/src/NexradSitesMapLayer.js +1 -75
- package/src/SatelliteLayer.android.js +1 -63
- package/src/SatelliteLayer.ios.js +1 -70
- package/src/StyleApplicator.js +1 -241
- package/src/WeatherLayerManager.js +1 -2045
- package/src/aguaceroCoreDebugHooks.js +1 -142
- package/src/aguaceroRnDebug.js +1 -336
- package/src/cdnAuthenticatedFetch.js +1 -0
- package/src/dispatchViewManagerCommandCompat.js +1 -100
- package/src/gridCdnAuth.js +1 -56
- package/src/index.js +1 -27
- package/src/nexrad/nexradAndroidController.js +1 -1078
- package/src/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js +1 -91
- package/src/nexrad/nexradDiag.js +1 -150
- package/src/nexrad/nexradLevel2Keys.js +1 -0
- package/src/nexrad/nexradLutBuild.js +1 -126
- package/src/nexrad/nexradMapboxFrameOpts.bundled.js +1 -245
- package/src/nexrad/nexradSdkImports.js +1 -0
- package/src/nexrad/radarArchiveCore.bundled.js +1 -7085
- package/src/nexrad/radarDecode.worker.bundled.js +1 -813
- package/src/nexrad/radarFrameGpuMatch.bundled.js +1 -79
- package/src/nexradNativeCommandIds.js +1 -0
- package/src/nws/NwsAlertsOverlay.android.js +1 -1
- package/src/nws/NwsAlertsOverlay.ios.js +1 -1
- package/src/nws/NwsAlertsOverlay.js +1 -7
- package/src/nws/NwsAlertsOverlay.native.js +1 -463
- package/src/nws/eventSourceRnPolyfill.js +7 -193
- package/src/nws/nwsAndroidConstants.js +1 -8
- package/src/satellite/satelliteAndroidController.js +1 -257
- package/src/satelliteBridgeDiag.js +1 -15
- package/src/satelliteRnDebug.js +1 -269
- package/lib/commonjs/nexrad/nexradNativeCommandIds.js +0 -51
- package/lib/commonjs/nexrad/nexradNativeCommandIds.js.map +0 -1
- package/lib/module/nexrad/nexradNativeCommandIds.js +0 -44
- package/lib/module/nexrad/nexradNativeCommandIds.js.map +0 -1
- package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts +0 -9
- package/lib/typescript/nexrad/nexradNativeCommandIds.d.ts.map +0 -1
- package/src/nexrad/nexradNativeCommandIds.js +0 -44
- /package/lib/commonjs/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
- /package/lib/module/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
- /package/src/{nexrad/nexradSitesUs.json → nexradSitesUs.json} +0 -0
package/src/satelliteRnDebug.js
CHANGED
|
@@ -1,269 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Satellite-specific RN diagnostics (Metro + native events → Metro when `debug` is on).
|
|
3
|
-
*
|
|
4
|
-
* Filter Metro: `[AguaceroRN][satellite]`
|
|
5
|
-
* Filter logcat: `AguaceroRN`, `AguaceroSatelliteView`, `AguaceroSatellite`, `AguaceroSatKtx`
|
|
6
|
-
*/
|
|
7
|
-
import { NativeEventEmitter, NativeModules, Platform, UIManager } from 'react-native';
|
|
8
|
-
import { aguaceroDebug, aguaceroDebugWarn, getAguaceroAuthDiagnosticSnapshot, isAguaceroRnDebugEnabled, redactApiKeyFromUrl } from './aguaceroRnDebug';
|
|
9
|
-
|
|
10
|
-
export const SATELLITE_DIAGNOSTIC_EVENT = 'AguaceroSatelliteDiagnostic';
|
|
11
|
-
|
|
12
|
-
const LOG = '[AguaceroRN][satellite]';
|
|
13
|
-
|
|
14
|
-
/** @type {import('react-native').EmitterSubscription | null} */
|
|
15
|
-
let diagSubscription = null;
|
|
16
|
-
|
|
17
|
-
const BASIS_FORMAT_NAMES = {
|
|
18
|
-
1: 'ETC2_RGBA (preferred Android)',
|
|
19
|
-
10: 'ASTC_LDR_4x4 (black tiles if GPU cannot sample ASTC)',
|
|
20
|
-
13: 'RGBA32 (universal fallback)',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @param {number | undefined} ordinal
|
|
25
|
-
*/
|
|
26
|
-
export function basisFormatLabel(ordinal) {
|
|
27
|
-
if (ordinal == null || Number.isNaN(Number(ordinal))) return 'unknown';
|
|
28
|
-
return BASIS_FORMAT_NAMES[Number(ordinal)] ?? `ordinal_${ordinal}`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Actionable hints when imagery is black but JS sync looks healthy.
|
|
33
|
-
* @param {Record<string, unknown>} ctx
|
|
34
|
-
*/
|
|
35
|
-
export function interpretSatelliteBlackScreenHints(ctx) {
|
|
36
|
-
const hints = [];
|
|
37
|
-
const frameCount = Number(ctx.frameCount ?? 0);
|
|
38
|
-
const nativeCached = Number(ctx.nativeCachedFrames ?? ctx.cachedFrameCount ?? NaN);
|
|
39
|
-
const targetUnix = ctx.targetUnix;
|
|
40
|
-
const activeUnix = ctx.activeUnix;
|
|
41
|
-
const visible = ctx.visible;
|
|
42
|
-
const opacity = ctx.opacity;
|
|
43
|
-
const basisFormat = ctx.basisFormatOrdinal ?? ctx.transcodeFormatOrdinal;
|
|
44
|
-
|
|
45
|
-
if (frameCount === 0) {
|
|
46
|
-
hints.push('JS built zero frame URLs — check satellite listing, channel (geocolor), and sector.');
|
|
47
|
-
}
|
|
48
|
-
if (visible === false) {
|
|
49
|
-
hints.push('Layer visible=false — imagery is hidden by state/UI.');
|
|
50
|
-
}
|
|
51
|
-
if (typeof opacity === 'number' && opacity <= 0) {
|
|
52
|
-
hints.push('Layer opacity=0 — increase opacity in WeatherLayerManager state.');
|
|
53
|
-
}
|
|
54
|
-
if (targetUnix != null && nativeCached === 0 && !Number.isNaN(nativeCached)) {
|
|
55
|
-
hints.push(
|
|
56
|
-
'targetUnix is set but native GPU cache is empty — KTX fetch/decode/upload failed; check native diagnostic events or logcat (AguaceroSatelliteView).',
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
if (activeUnix == null && targetUnix != null) {
|
|
60
|
-
hints.push(
|
|
61
|
-
'targetUnix set but no active frame on GPU yet — wait for decode or prior frame failed upload (ASTC on unsupported GPU is common).',
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
if (Number(basisFormat) === 10) {
|
|
65
|
-
hints.push(
|
|
66
|
-
'Transcoded to ASTC — if the map footprint is black, rebuild SDK with ETC2-first transcode or check AguaceroSatellite for GPU upload GL errors.',
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
if (ctx.bundleIdPresent === false) {
|
|
70
|
-
hints.push(
|
|
71
|
-
'bundleId missing — install react-native-device-info; some keys require x-app-identifier (usually 403, not black tiles).',
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
if (ctx.mapLayerAdded === false) {
|
|
75
|
-
hints.push('Mapbox custom satellite layer not attached — ensure WeatherLayerManager is a child of MapManager.');
|
|
76
|
-
}
|
|
77
|
-
if (ctx.satelliteNativeMissing === true) {
|
|
78
|
-
hints.push('SatelliteLayer native view manager not registered — rebuild app / link @aguacerowx/react-native android.');
|
|
79
|
-
}
|
|
80
|
-
if (hints.length === 0) {
|
|
81
|
-
hints.push(
|
|
82
|
-
'JS pipeline looks healthy — inspect native events below (fetch bytes, transcode format, GPU upload). Filter logcat: AguaceroSatelliteView AguaceroSatellite AguaceroSatKtx',
|
|
83
|
-
);
|
|
84
|
-
}
|
|
85
|
-
return hints;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* One-shot integration audit (call when WeatherLayerManager mounts with debug).
|
|
90
|
-
* @param {{ core?: import('@aguacerowx/javascript-sdk').AguaceroCore; satelliteLayerRef?: React.RefObject<unknown> }} opts
|
|
91
|
-
*/
|
|
92
|
-
export function auditSatelliteIntegration(opts = {}) {
|
|
93
|
-
if (!isAguaceroRnDebugEnabled()) return;
|
|
94
|
-
const { core, satelliteLayerRef } = opts;
|
|
95
|
-
let satCmdKeys = [];
|
|
96
|
-
let gridCmdKeys = [];
|
|
97
|
-
let satManagerError = null;
|
|
98
|
-
try {
|
|
99
|
-
satCmdKeys = Object.keys(UIManager.getViewManagerConfig?.('SatelliteLayer')?.Commands ?? {});
|
|
100
|
-
} catch (e) {
|
|
101
|
-
satManagerError = String(e?.message ?? e);
|
|
102
|
-
satCmdKeys = [];
|
|
103
|
-
}
|
|
104
|
-
try {
|
|
105
|
-
gridCmdKeys = Object.keys(UIManager.getViewManagerConfig?.('GridRenderLayer')?.Commands ?? {});
|
|
106
|
-
} catch {
|
|
107
|
-
gridCmdKeys = [];
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
let deviceInfoOk = false;
|
|
111
|
-
let deviceInfoBundleId = null;
|
|
112
|
-
try {
|
|
113
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports, global-require
|
|
114
|
-
const DeviceInfo = require('react-native-device-info');
|
|
115
|
-
deviceInfoOk = true;
|
|
116
|
-
try {
|
|
117
|
-
deviceInfoBundleId = DeviceInfo.getBundleId?.() ?? null;
|
|
118
|
-
} catch {
|
|
119
|
-
deviceInfoBundleId = null;
|
|
120
|
-
}
|
|
121
|
-
} catch {
|
|
122
|
-
deviceInfoOk = false;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
const snapshot = {
|
|
126
|
-
platform: Platform.OS,
|
|
127
|
-
satelliteNativeCommands: satCmdKeys,
|
|
128
|
-
satelliteNativeMissing: satCmdKeys.length === 0,
|
|
129
|
-
satelliteManagerError: satManagerError,
|
|
130
|
-
gridNativeCommands: gridCmdKeys,
|
|
131
|
-
satelliteRefAttached: Boolean(satelliteLayerRef?.current),
|
|
132
|
-
satelliteRefMethods: satelliteLayerRef?.current ? Object.keys(satelliteLayerRef.current) : [],
|
|
133
|
-
reactNativeDeviceInfo: deviceInfoOk
|
|
134
|
-
? { installed: true, bundleId: deviceInfoBundleId }
|
|
135
|
-
: {
|
|
136
|
-
installed: false,
|
|
137
|
-
hint: 'npm install react-native-device-info — required for core.bundleId / x-app-identifier',
|
|
138
|
-
},
|
|
139
|
-
mapboxNote: 'Requires @rnmapbox/maps v11; WeatherLayerManager must be nested inside MapManager',
|
|
140
|
-
nativeLibraries: ['aguacero_satellite_ktx (KTX2 Basis transcoder JNI)'],
|
|
141
|
-
auth: core ? getAguaceroAuthDiagnosticSnapshot(core) : undefined,
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
aguaceroDebug('integration.audit', snapshot);
|
|
145
|
-
|
|
146
|
-
if (satCmdKeys.length === 0) {
|
|
147
|
-
aguaceroDebugWarn('integration.satelliteNativeMissing', {
|
|
148
|
-
hint: 'SatelliteLayer ViewManager has no commands — satellite will never render on Android.',
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
if (core && !core.bundleId && Platform.OS !== 'web') {
|
|
152
|
-
aguaceroDebugWarn('integration.bundleIdMissing', {
|
|
153
|
-
hint: 'core.bundleId is null — CDN may still work; some API keys require react-native-device-info.',
|
|
154
|
-
deviceInfoInstalled: deviceInfoOk,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return snapshot;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* @param {object} params
|
|
163
|
-
*/
|
|
164
|
-
export function logSatelliteSyncReport(params) {
|
|
165
|
-
if (!isAguaceroRnDebugEnabled()) return;
|
|
166
|
-
const {
|
|
167
|
-
state,
|
|
168
|
-
core,
|
|
169
|
-
frames,
|
|
170
|
-
targetUnix,
|
|
171
|
-
runKey,
|
|
172
|
-
timelineKeyCount,
|
|
173
|
-
runKeyChanged,
|
|
174
|
-
timelineChanged,
|
|
175
|
-
stylePayload,
|
|
176
|
-
} = params;
|
|
177
|
-
|
|
178
|
-
const first = frames?.[0];
|
|
179
|
-
const last = frames?.length ? frames[frames.length - 1] : null;
|
|
180
|
-
|
|
181
|
-
const report = {
|
|
182
|
-
runKey,
|
|
183
|
-
runKeyChanged,
|
|
184
|
-
timelineChanged,
|
|
185
|
-
timelineKeyCount,
|
|
186
|
-
builtFrameCount: frames?.length ?? 0,
|
|
187
|
-
targetUnix,
|
|
188
|
-
satelliteTimestamp: state?.satelliteTimestamp ?? null,
|
|
189
|
-
style: stylePayload,
|
|
190
|
-
instrument: state?.satelliteInstrumentId,
|
|
191
|
-
sector: state?.satelliteSectorLabel,
|
|
192
|
-
channel: state?.satelliteChannel,
|
|
193
|
-
availableSatelliteTimestamps: state?.availableSatelliteTimestamps?.length ?? 0,
|
|
194
|
-
sampleShaderFileName: first?.shaderFileName ?? null,
|
|
195
|
-
sampleFrameUrl: first?.url ? redactApiKeyFromUrl(first.url) : null,
|
|
196
|
-
firstUnix: first?.unix ?? null,
|
|
197
|
-
lastUnix: last?.unix ?? null,
|
|
198
|
-
auth: core ? getAguaceroAuthDiagnosticSnapshot(core) : undefined,
|
|
199
|
-
blackScreenHints: interpretSatelliteBlackScreenHints({
|
|
200
|
-
frameCount: frames?.length ?? 0,
|
|
201
|
-
targetUnix,
|
|
202
|
-
visible: stylePayload?.visible,
|
|
203
|
-
opacity: stylePayload?.opacity,
|
|
204
|
-
bundleIdPresent: Boolean(core?.bundleId),
|
|
205
|
-
}),
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
aguaceroDebug('sync.report', report);
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Subscribe to native → JS diagnostic events (Android). Returns unsubscribe.
|
|
213
|
-
* @returns {() => void}
|
|
214
|
-
*/
|
|
215
|
-
export function installSatelliteDiagnosticListener() {
|
|
216
|
-
if (!isAguaceroRnDebugEnabled()) return () => {};
|
|
217
|
-
if (Platform.OS !== 'android') {
|
|
218
|
-
aguaceroDebug('nativeEvents.skipped', { reason: 'only Android emits AguaceroSatelliteDiagnostic today' });
|
|
219
|
-
return () => {};
|
|
220
|
-
}
|
|
221
|
-
if (diagSubscription) {
|
|
222
|
-
diagSubscription.remove();
|
|
223
|
-
diagSubscription = null;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
const emitter = new NativeEventEmitter();
|
|
227
|
-
diagSubscription = emitter.addListener(SATELLITE_DIAGNOSTIC_EVENT, (payload) => {
|
|
228
|
-
if (!payload || typeof payload !== 'object') return;
|
|
229
|
-
const phase = payload.phase ?? 'unknown';
|
|
230
|
-
const detail = { ...payload };
|
|
231
|
-
delete detail.phase;
|
|
232
|
-
if (detail.basisFormatOrdinal != null) {
|
|
233
|
-
detail.basisFormat = basisFormatLabel(detail.basisFormatOrdinal);
|
|
234
|
-
}
|
|
235
|
-
if (detail.transcodeFormatOrdinal != null) {
|
|
236
|
-
detail.transcodeFormat = basisFormatLabel(detail.transcodeFormatOrdinal);
|
|
237
|
-
}
|
|
238
|
-
if (
|
|
239
|
-
phase.includes('fail') ||
|
|
240
|
-
phase.includes('error') ||
|
|
241
|
-
phase === 'render.noDraw' ||
|
|
242
|
-
(phase === 'render.poll' && (detail.cachedFrameCount === 0 || detail.activeUnix == null))
|
|
243
|
-
) {
|
|
244
|
-
detail.blackScreenHints = interpretSatelliteBlackScreenHints(detail);
|
|
245
|
-
aguaceroDebugWarn(`native.${phase}`, detail);
|
|
246
|
-
} else {
|
|
247
|
-
aguaceroDebug(`native.${phase}`, detail);
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
aguaceroDebug('nativeEvents.installed', {
|
|
252
|
-
event: SATELLITE_DIAGNOSTIC_EVENT,
|
|
253
|
-
hint: 'Native fetch/decode/GPU logs will appear here when debug=true on WeatherLayerManager',
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
return () => {
|
|
257
|
-
diagSubscription?.remove();
|
|
258
|
-
diagSubscription = null;
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
/**
|
|
263
|
-
* @param {Record<string, unknown>} nativePayload
|
|
264
|
-
*/
|
|
265
|
-
export function logSatelliteNativeDiagnostic(nativePayload) {
|
|
266
|
-
if (!isAguaceroRnDebugEnabled() || !nativePayload) return;
|
|
267
|
-
const phase = nativePayload.phase ?? 'event';
|
|
268
|
-
aguaceroDebug(`native.${phase}`, nativePayload);
|
|
269
|
-
}
|
|
1
|
+
import{NativeEventEmitter as S,Platform as p,UIManager as b}from"react-native";import{aguaceroDebug as c,aguaceroDebugWarn as h,getAguaceroAuthDiagnosticSnapshot as v,isAguaceroRnDebugEnabled as g,redactApiKeyFromUrl as N}from"./aguaceroRnDebug";export const SATELLITE_DIAGNOSTIC_EVENT="AguaceroSatelliteDiagnostic";const I="[AguaceroRN][satellite]";let d=null;const x={1:"ETC2_RGBA (preferred Android)",10:"ASTC_LDR_4x4 (black tiles if GPU cannot sample ASTC)",13:"RGBA32 (universal fallback)"};export function basisFormatLabel(t){return t==null||Number.isNaN(Number(t))?"unknown":x[Number(t)]??`ordinal_${t}`}export function interpretSatelliteBlackScreenHints(t){const e=[],a=Number(t.frameCount??0),n=Number(t.nativeCachedFrames??t.cachedFrameCount??NaN),i=t.targetUnix,o=t.activeUnix,r=t.visible,l=t.opacity,u=t.basisFormatOrdinal??t.transcodeFormatOrdinal;return a===0&&e.push("JS built zero frame URLs \u2014 check satellite listing, channel (geocolor), and sector."),r===!1&&e.push("Layer visible=false \u2014 imagery is hidden by state/UI."),typeof l=="number"&&l<=0&&e.push("Layer opacity=0 \u2014 increase opacity in WeatherLayerManager state."),i!=null&&n===0&&!Number.isNaN(n)&&e.push("targetUnix is set but native GPU cache is empty \u2014 KTX fetch/decode/upload failed; check native diagnostic events or logcat (AguaceroSatelliteView)."),o==null&&i!=null&&e.push("targetUnix set but no active frame on GPU yet \u2014 wait for decode or prior frame failed upload (ASTC on unsupported GPU is common)."),Number(u)===10&&e.push("Transcoded to ASTC \u2014 if the map footprint is black, rebuild SDK with ETC2-first transcode or check AguaceroSatellite for GPU upload GL errors."),t.bundleIdPresent===!1&&e.push("bundleId missing \u2014 install react-native-device-info; some keys require x-app-identifier (usually 403, not black tiles)."),t.mapLayerAdded===!1&&e.push("Mapbox custom satellite layer not attached \u2014 ensure WeatherLayerManager is a child of MapManager."),t.satelliteNativeMissing===!0&&e.push("SatelliteLayer native view manager not registered \u2014 rebuild app / link @aguacerowx/react-native android."),e.length===0&&e.push("JS pipeline looks healthy \u2014 inspect native events below (fetch bytes, transcode format, GPU upload). Filter logcat: AguaceroSatelliteView AguaceroSatellite AguaceroSatKtx"),e}export function auditSatelliteIntegration(t={}){if(!g())return;const{core:e,satelliteLayerRef:a}=t;let n=[],i=[],o=null;try{n=Object.keys(b.getViewManagerConfig?.("SatelliteLayer")?.Commands??{})}catch(s){o=String(s?.message??s),n=[]}try{i=Object.keys(b.getViewManagerConfig?.("GridRenderLayer")?.Commands??{})}catch{i=[]}let r=!1,l=null;try{const s=require("react-native-device-info");r=!0;try{l=s.getBundleId?.()??null}catch{l=null}}catch{r=!1}const u={platform:p.OS,satelliteNativeCommands:n,satelliteNativeMissing:n.length===0,satelliteManagerError:o,gridNativeCommands:i,satelliteRefAttached:!!a?.current,satelliteRefMethods:a?.current?Object.keys(a.current):[],reactNativeDeviceInfo:r?{installed:!0,bundleId:l}:{installed:!1,hint:"npm install react-native-device-info \u2014 required for core.bundleId / x-app-identifier"},mapboxNote:"Requires @rnmapbox/maps v11; WeatherLayerManager must be nested inside MapManager",nativeLibraries:["aguacero_satellite_ktx (KTX2 Basis transcoder JNI)"],auth:e?v(e):void 0};return c("integration.audit",u),n.length===0&&h("integration.satelliteNativeMissing",{hint:"SatelliteLayer ViewManager has no commands \u2014 satellite will never render on Android."}),e&&!e.bundleId&&p.OS!=="web"&&h("integration.bundleIdMissing",{hint:"core.bundleId is null \u2014 CDN may still work; some API keys require react-native-device-info.",deviceInfoInstalled:r}),u}export function logSatelliteSyncReport(t){if(!g())return;const{state:e,core:a,frames:n,targetUnix:i,runKey:o,timelineKeyCount:r,runKeyChanged:l,timelineChanged:u,stylePayload:s}=t,m=n?.[0],f=n?.length?n[n.length-1]:null,y={runKey:o,runKeyChanged:l,timelineChanged:u,timelineKeyCount:r,builtFrameCount:n?.length??0,targetUnix:i,satelliteTimestamp:e?.satelliteTimestamp??null,style:s,instrument:e?.satelliteInstrumentId,sector:e?.satelliteSectorLabel,channel:e?.satelliteChannel,availableSatelliteTimestamps:e?.availableSatelliteTimestamps?.length??0,sampleShaderFileName:m?.shaderFileName??null,sampleFrameUrl:m?.url?N(m.url):null,firstUnix:m?.unix??null,lastUnix:f?.unix??null,auth:a?v(a):void 0,blackScreenHints:interpretSatelliteBlackScreenHints({frameCount:n?.length??0,targetUnix:i,visible:s?.visible,opacity:s?.opacity,bundleIdPresent:!!a?.bundleId})};c("sync.report",y)}export function installSatelliteDiagnosticListener(){return g()?p.OS!=="android"?(c("nativeEvents.skipped",{reason:"only Android emits AguaceroSatelliteDiagnostic today"}),()=>{}):(d&&(d.remove(),d=null),d=new S().addListener(SATELLITE_DIAGNOSTIC_EVENT,t=>{if(!t||typeof t!="object")return;const e=t.phase??"unknown",a={...t};delete a.phase,a.basisFormatOrdinal!=null&&(a.basisFormat=basisFormatLabel(a.basisFormatOrdinal)),a.transcodeFormatOrdinal!=null&&(a.transcodeFormat=basisFormatLabel(a.transcodeFormatOrdinal)),e.includes("fail")||e.includes("error")||e==="render.noDraw"||e==="render.poll"&&(a.cachedFrameCount===0||a.activeUnix==null)?(a.blackScreenHints=interpretSatelliteBlackScreenHints(a),h(`native.${e}`,a)):c(`native.${e}`,a)}),c("nativeEvents.installed",{event:SATELLITE_DIAGNOSTIC_EVENT,hint:"Native fetch/decode/GPU logs will appear here when debug=true on WeatherLayerManager"}),()=>{d?.remove(),d=null}):()=>{}}export function logSatelliteNativeDiagnostic(t){if(!g()||!t)return;const e=t.phase??"event";c(`native.${e}`,t)}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.resolveNexradCommandId = resolveNexradCommandId;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the second argument to {@code UIManager.dispatchViewManagerCommand}.
|
|
10
|
-
*
|
|
11
|
-
* - **Android**: prefers {@code UIManager.getViewManagerConfig('NexradRadarLayer').Commands}
|
|
12
|
-
* then numeric fallback matching {@code NexradRadarManager.java} {@code getCommandsMap}.
|
|
13
|
-
*
|
|
14
|
-
* - **iOS New Architecture (Fabric)**: numeric IDs do **not** map to {@code receiveCommand:}.
|
|
15
|
-
* {@code RCTLegacyViewManagerInteropCoordinator} indexes {@code RCT_EXPORT_METHOD} by
|
|
16
|
-
* integer **or** resolves by **string name**. NexradRadarLayer uses {@code codegenNativeComponent};
|
|
17
|
-
* we dispatch **string command names** so native resolves via {@code methodsByName} (see
|
|
18
|
-
* {@code NexradRadarManager.mm} {@code RCT_EXPORT_METHOD} entries).
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
const COMPONENT_NAME = 'NexradRadarLayer';
|
|
22
|
-
|
|
23
|
-
/** @type {Record<string, number>} */
|
|
24
|
-
const ANDROID_COMMAND_FALLBACK = Object.freeze({
|
|
25
|
-
uploadNexradFrame: 1,
|
|
26
|
-
uploadNexradStyleOnly: 2,
|
|
27
|
-
clearNexrad: 3,
|
|
28
|
-
activateNexradCachedFrame: 4
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* @param {keyof typeof ANDROID_COMMAND_FALLBACK} commandName
|
|
33
|
-
* @returns {number | string | null}
|
|
34
|
-
*/
|
|
35
|
-
function resolveNexradCommandId(commandName) {
|
|
36
|
-
if (_reactNative.Platform.OS === 'ios') {
|
|
37
|
-
return commandName;
|
|
38
|
-
}
|
|
39
|
-
try {
|
|
40
|
-
const config = _reactNative.UIManager.getViewManagerConfig(COMPONENT_NAME);
|
|
41
|
-
const fromRegistry = config?.Commands?.[commandName];
|
|
42
|
-
if (fromRegistry != null && fromRegistry !== undefined) {
|
|
43
|
-
return fromRegistry;
|
|
44
|
-
}
|
|
45
|
-
} catch {
|
|
46
|
-
/* bridge not ready */
|
|
47
|
-
}
|
|
48
|
-
const fb = ANDROID_COMMAND_FALLBACK[commandName];
|
|
49
|
-
return fb !== undefined ? fb : null;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=nexradNativeCommandIds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","COMPONENT_NAME","ANDROID_COMMAND_FALLBACK","Object","freeze","uploadNexradFrame","uploadNexradStyleOnly","clearNexrad","activateNexradCachedFrame","resolveNexradCommandId","commandName","Platform","OS","config","UIManager","getViewManagerConfig","fromRegistry","Commands","undefined","fb"],"sourceRoot":"..\\..\\..\\src","sources":["nexrad/nexradNativeCommandIds.js"],"mappings":";;;;;;AAYA,IAAAA,YAAA,GAAAC,OAAA;AAZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,MAAMC,cAAc,GAAG,kBAAkB;;AAEzC;AACA,MAAMC,wBAAwB,GAAGC,MAAM,CAACC,MAAM,CAAC;EAC3CC,iBAAiB,EAAE,CAAC;EACpBC,qBAAqB,EAAE,CAAC;EACxBC,WAAW,EAAE,CAAC;EACdC,yBAAyB,EAAE;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACO,SAASC,sBAAsBA,CAACC,WAAW,EAAE;EAChD,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACvB,OAAOF,WAAW;EACtB;EACA,IAAI;IACA,MAAMG,MAAM,GAAGC,sBAAS,CAACC,oBAAoB,CAACd,cAAc,CAAC;IAC7D,MAAMe,YAAY,GAAGH,MAAM,EAAEI,QAAQ,GAAGP,WAAW,CAAC;IACpD,IAAIM,YAAY,IAAI,IAAI,IAAIA,YAAY,KAAKE,SAAS,EAAE;MACpD,OAAOF,YAAY;IACvB;EACJ,CAAC,CAAC,MAAM;IACJ;EAAA;EAEJ,MAAMG,EAAE,GAAGjB,wBAAwB,CAACQ,WAAW,CAAC;EAChD,OAAOS,EAAE,KAAKD,SAAS,GAAGC,EAAE,GAAG,IAAI;AACvC","ignoreList":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves the second argument to {@code UIManager.dispatchViewManagerCommand}.
|
|
3
|
-
*
|
|
4
|
-
* - **Android**: prefers {@code UIManager.getViewManagerConfig('NexradRadarLayer').Commands}
|
|
5
|
-
* then numeric fallback matching {@code NexradRadarManager.java} {@code getCommandsMap}.
|
|
6
|
-
*
|
|
7
|
-
* - **iOS New Architecture (Fabric)**: numeric IDs do **not** map to {@code receiveCommand:}.
|
|
8
|
-
* {@code RCTLegacyViewManagerInteropCoordinator} indexes {@code RCT_EXPORT_METHOD} by
|
|
9
|
-
* integer **or** resolves by **string name**. NexradRadarLayer uses {@code codegenNativeComponent};
|
|
10
|
-
* we dispatch **string command names** so native resolves via {@code methodsByName} (see
|
|
11
|
-
* {@code NexradRadarManager.mm} {@code RCT_EXPORT_METHOD} entries).
|
|
12
|
-
*/
|
|
13
|
-
import { Platform, UIManager } from 'react-native';
|
|
14
|
-
const COMPONENT_NAME = 'NexradRadarLayer';
|
|
15
|
-
|
|
16
|
-
/** @type {Record<string, number>} */
|
|
17
|
-
const ANDROID_COMMAND_FALLBACK = Object.freeze({
|
|
18
|
-
uploadNexradFrame: 1,
|
|
19
|
-
uploadNexradStyleOnly: 2,
|
|
20
|
-
clearNexrad: 3,
|
|
21
|
-
activateNexradCachedFrame: 4
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* @param {keyof typeof ANDROID_COMMAND_FALLBACK} commandName
|
|
26
|
-
* @returns {number | string | null}
|
|
27
|
-
*/
|
|
28
|
-
export function resolveNexradCommandId(commandName) {
|
|
29
|
-
if (Platform.OS === 'ios') {
|
|
30
|
-
return commandName;
|
|
31
|
-
}
|
|
32
|
-
try {
|
|
33
|
-
const config = UIManager.getViewManagerConfig(COMPONENT_NAME);
|
|
34
|
-
const fromRegistry = config?.Commands?.[commandName];
|
|
35
|
-
if (fromRegistry != null && fromRegistry !== undefined) {
|
|
36
|
-
return fromRegistry;
|
|
37
|
-
}
|
|
38
|
-
} catch {
|
|
39
|
-
/* bridge not ready */
|
|
40
|
-
}
|
|
41
|
-
const fb = ANDROID_COMMAND_FALLBACK[commandName];
|
|
42
|
-
return fb !== undefined ? fb : null;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=nexradNativeCommandIds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Platform","UIManager","COMPONENT_NAME","ANDROID_COMMAND_FALLBACK","Object","freeze","uploadNexradFrame","uploadNexradStyleOnly","clearNexrad","activateNexradCachedFrame","resolveNexradCommandId","commandName","OS","config","getViewManagerConfig","fromRegistry","Commands","undefined","fb"],"sourceRoot":"..\\..\\..\\src","sources":["nexrad/nexradNativeCommandIds.js"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,QAAQ,EAAEC,SAAS,QAAQ,cAAc;AAElD,MAAMC,cAAc,GAAG,kBAAkB;;AAEzC;AACA,MAAMC,wBAAwB,GAAGC,MAAM,CAACC,MAAM,CAAC;EAC3CC,iBAAiB,EAAE,CAAC;EACpBC,qBAAqB,EAAE,CAAC;EACxBC,WAAW,EAAE,CAAC;EACdC,yBAAyB,EAAE;AAC/B,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,OAAO,SAASC,sBAAsBA,CAACC,WAAW,EAAE;EAChD,IAAIX,QAAQ,CAACY,EAAE,KAAK,KAAK,EAAE;IACvB,OAAOD,WAAW;EACtB;EACA,IAAI;IACA,MAAME,MAAM,GAAGZ,SAAS,CAACa,oBAAoB,CAACZ,cAAc,CAAC;IAC7D,MAAMa,YAAY,GAAGF,MAAM,EAAEG,QAAQ,GAAGL,WAAW,CAAC;IACpD,IAAII,YAAY,IAAI,IAAI,IAAIA,YAAY,KAAKE,SAAS,EAAE;MACpD,OAAOF,YAAY;IACvB;EACJ,CAAC,CAAC,MAAM;IACJ;EAAA;EAEJ,MAAMG,EAAE,GAAGf,wBAAwB,CAACQ,WAAW,CAAC;EAChD,OAAOO,EAAE,KAAKD,SAAS,GAAGC,EAAE,GAAG,IAAI;AACvC","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param {keyof typeof ANDROID_COMMAND_FALLBACK} commandName
|
|
3
|
-
* @returns {number | string | null}
|
|
4
|
-
*/
|
|
5
|
-
export function resolveNexradCommandId(commandName: keyof typeof ANDROID_COMMAND_FALLBACK): number | string | null;
|
|
6
|
-
/** @type {Record<string, number>} */
|
|
7
|
-
declare const ANDROID_COMMAND_FALLBACK: Record<string, number>;
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=nexradNativeCommandIds.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nexradNativeCommandIds.d.ts","sourceRoot":"","sources":["../../../src/nexrad/nexradNativeCommandIds.js"],"names":[],"mappings":"AAwBA;;;GAGG;AACH,oDAHW,MAAM,OAAO,wBAAwB,GACnC,MAAM,GAAG,MAAM,GAAG,IAAI,CAiBlC;AA3BD,qCAAqC;AACrC,wCADW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAM9B"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Resolves the second argument to {@code UIManager.dispatchViewManagerCommand}.
|
|
3
|
-
*
|
|
4
|
-
* - **Android**: prefers {@code UIManager.getViewManagerConfig('NexradRadarLayer').Commands}
|
|
5
|
-
* then numeric fallback matching {@code NexradRadarManager.java} {@code getCommandsMap}.
|
|
6
|
-
*
|
|
7
|
-
* - **iOS New Architecture (Fabric)**: numeric IDs do **not** map to {@code receiveCommand:}.
|
|
8
|
-
* {@code RCTLegacyViewManagerInteropCoordinator} indexes {@code RCT_EXPORT_METHOD} by
|
|
9
|
-
* integer **or** resolves by **string name**. NexradRadarLayer uses {@code codegenNativeComponent};
|
|
10
|
-
* we dispatch **string command names** so native resolves via {@code methodsByName} (see
|
|
11
|
-
* {@code NexradRadarManager.mm} {@code RCT_EXPORT_METHOD} entries).
|
|
12
|
-
*/
|
|
13
|
-
import { Platform, UIManager } from 'react-native';
|
|
14
|
-
|
|
15
|
-
const COMPONENT_NAME = 'NexradRadarLayer';
|
|
16
|
-
|
|
17
|
-
/** @type {Record<string, number>} */
|
|
18
|
-
const ANDROID_COMMAND_FALLBACK = Object.freeze({
|
|
19
|
-
uploadNexradFrame: 1,
|
|
20
|
-
uploadNexradStyleOnly: 2,
|
|
21
|
-
clearNexrad: 3,
|
|
22
|
-
activateNexradCachedFrame: 4,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @param {keyof typeof ANDROID_COMMAND_FALLBACK} commandName
|
|
27
|
-
* @returns {number | string | null}
|
|
28
|
-
*/
|
|
29
|
-
export function resolveNexradCommandId(commandName) {
|
|
30
|
-
if (Platform.OS === 'ios') {
|
|
31
|
-
return commandName;
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
const config = UIManager.getViewManagerConfig(COMPONENT_NAME);
|
|
35
|
-
const fromRegistry = config?.Commands?.[commandName];
|
|
36
|
-
if (fromRegistry != null && fromRegistry !== undefined) {
|
|
37
|
-
return fromRegistry;
|
|
38
|
-
}
|
|
39
|
-
} catch {
|
|
40
|
-
/* bridge not ready */
|
|
41
|
-
}
|
|
42
|
-
const fb = ANDROID_COMMAND_FALLBACK[commandName];
|
|
43
|
-
return fb !== undefined ? fb : null;
|
|
44
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|