@aguacerowx/mapsgl 0.0.55 → 0.0.56

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/index.js CHANGED
@@ -1,23 +1,22 @@
1
- // In packages/mapsgl/src/index.js (The final, correct version)
1
+ // In packages/mapsgl/index.js (The final, correct version)
2
2
 
3
3
  // Import the specific classes you want to make public from this package's internal files.
4
4
  import { WeatherLayerManager } from './src/WeatherLayerManager.js';
5
5
  import { MapManager } from './src/MapManager.js';
6
- import { NwsWatchesWarningsOverlay, NWS_DEFAULT_LINE_BEFORE_LAYER_ID } from './src/NwsWatchesWarningsOverlay.js';
7
6
  import {
7
+ NwsWatchesWarningsOverlay,
8
+ NWS_DEFAULT_LINE_BEFORE_LAYER_ID,
8
9
  collectNwsExpressionEventKeys,
9
10
  NWS_ALERT_EVENT_NAMES,
10
11
  NWS_EVENT_COLORS,
11
12
  NWS_SDK_EVENT_COLOR,
12
13
  NWS_SDK_EVENT_NAMES,
13
- } from './src/nwsSdkConstants.js';
14
- import {
15
14
  filterNwsAlertsByIncludedList,
16
15
  filterNwsAlertsByScope,
17
16
  filterToConvectiveSdkEvents,
18
17
  isNwsEventIncludedInAllowlist,
19
18
  SDK_ALLOWED_EVENT_SET,
20
- } from './src/nwsAlertsSupport.js';
19
+ } from '@aguacerowx/javascript-sdk';
21
20
 
22
21
  // Now, export them both so your test app can import them.
23
22
  // This is the "public face" of your @aguacerowx/mapsgl package.
@@ -43,4 +42,4 @@ export {
43
42
  DEFAULT_SATELLITE_WATER_VAPOR_COLORMAP,
44
43
  } from './src/satelliteDefaultColormaps.js';
45
44
 
46
- export { JSDELIVR_BASIS_BASE_URL } from './src/defaultBasisBaseUrl.js';
45
+ export { JSDELIVR_BASIS_BASE_URL } from './src/defaultBasisBaseUrl.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aguacerowx/mapsgl",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -10,8 +10,7 @@
10
10
  "scripts": {
11
11
  "prepublishOnly": "npm run bundle-nexrad",
12
12
  "bundle-nexrad": "esbuild src/nexrad/radarDecode.worker.ts --bundle --format=esm --platform=browser --outfile=src/nexrad/radarDecode.worker.bundled.js && esbuild src/nexrad/radarArchiveCore.ts --bundle --format=esm --platform=browser --outfile=src/nexrad/radarArchiveCore.bundled.js --external:@aguacerowx/javascript-sdk && esbuild src/nexrad/MapboxRadarLayer.ts --bundle --format=esm --platform=browser --outfile=src/nexrad/MapboxRadarLayer.bundled.js --external:mapbox-gl --external:@aguacerowx/javascript-sdk && esbuild src/nexrad/nexradCrossSectionSampleAtLatLon.ts --format=esm --platform=browser --outfile=src/nexrad/nexradCrossSectionSampleAtLatLon.bundled.js && esbuild src/nexrad/radarFrameGpuMatch.ts --format=esm --platform=browser --outfile=src/nexrad/radarFrameGpuMatch.bundled.js && esbuild src/nexrad/nexradMapboxFrameOpts.ts --bundle --format=esm --platform=browser --outfile=src/nexrad/nexradMapboxFrameOpts.bundled.js --external:@aguacerowx/javascript-sdk",
13
- "bundle-nexrad-rn": "node scripts/bundle-nexrad-rn.mjs",
14
- "gen:nws-key": "esbuild ../../../aguacero-frontend/src/components/WarningsMenu/nwsWarningCustomizationKey.ts --bundle --format=esm --platform=neutral --outfile=src/nwsWarningCustomizationKey.gen.js"
13
+ "bundle-nexrad-rn": "node scripts/bundle-nexrad-rn.mjs"
15
14
  },
16
15
  "files": [
17
16
  "index.js",
@@ -22,7 +21,7 @@
22
21
  "esbuild": "^0.21.5"
23
22
  },
24
23
  "dependencies": {
25
- "@aguacerowx/javascript-sdk": "^0.0.25",
24
+ "@aguacerowx/javascript-sdk": "^0.0.26",
26
25
  "buffer": "^6.0.3",
27
26
  "fzstd": "^0.1.1",
28
27
  "mapbox-gl": "^3.4.0",
@@ -5,8 +5,7 @@ import { GridRenderLayer } from './GridRenderLayer.js'; // <-- IMPORT THE WEB RE
5
5
  import { SatelliteShaderManager } from './SatelliteShaderManager.js';
6
6
  import { NexradWeatherController } from './NexradWeatherController.js';
7
7
  import { NexradSitesOverlay } from './NexradSitesOverlay.js';
8
- import { NwsWatchesWarningsOverlay } from './NwsWatchesWarningsOverlay.js';
9
- import { computeNwsAlertsFetchHoursFromAguaceroState } from './nwsAlertsFetchSpec.js';
8
+ import { NwsWatchesWarningsOverlay, computeNwsAlertsFetchHoursFromAguaceroState } from '@aguacerowx/javascript-sdk';
10
9
  import WorkerPool from './WorkerPool.js';
11
10
 
12
11
  import { DEFAULT_BASIS_BASE_URL } from './defaultBasisBaseUrl.js';
@@ -37,7 +36,7 @@ function findLatestModelRun(modelsData, modelName) {
37
36
  * @param {string} [options.weatherBeforeLayerId] - Same as `belowID`.
38
37
  * @param {string} [options.nexradLayerId] - Override Mapbox id for the NEXRAD custom layer (default: derived from `layerId`).
39
38
  * @param {boolean} [options.mrmsTimelineLog] - When `true`, logs MRMS duration / raw vs filtered timeline counts (prefix `[WeatherLayerManager MRMS]`). Off by default.
40
- * @param {string} [options.basisBaseUrl] - URL prefix for satellite KTX2 Basis transcoder assets (`basis_transcoder.js`, `basis_transcoder.wasm`). Defaults to jsDelivr for the published package version; override (e.g. `/basis/`) for strict CSP or offline.
39
+ * @param {string} [options.gridRequestSiteOrigin] - Forwarded to {@link AguaceroCore}: base URL without trailing slash (e.g. production site or `http://localhost:5173`) so grid `fetch` sends `Origin`/`Referer` outside the browser.
41
40
  */
42
41
  export class WeatherLayerManager extends EventEmitter {
43
42
  constructor(map, options = {}) {
@@ -640,8 +639,7 @@ export class WeatherLayerManager extends EventEmitter {
640
639
  if (!apiKey) {
641
640
  return null;
642
641
  }
643
- const uid = this.core.userId || 'sdk-user';
644
- const url = `https://d3dc62msmxkrd7.cloudfront.net/satellite/${s3FileName}?userId=${encodeURIComponent(uid)}&apiKey=${encodeURIComponent(apiKey)}`;
642
+ const url = `https://d3dc62msmxkrd7.cloudfront.net/satellite/${s3FileName}?userId=${encodeURIComponent('sdk-user')}&apiKey=${encodeURIComponent(apiKey)}`;
645
643
  return { url, shaderFileName, frameKey: Number(satelliteTimestamp), apiKey };
646
644
  }
647
645