@file-viewer/renderer-geo 3.0.2 → 3.1.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.
@@ -0,0 +1,2 @@
1
+ import type * as MapLibre from 'maplibre-gl';
2
+ export declare function configureMapLibreWorker(maplibre: typeof MapLibre): void;
@@ -0,0 +1,8 @@
1
+ import { maplibreWorkerSource } from './maplibre-worker-source.js';
2
+ let workerUrl;
3
+ export function configureMapLibreWorker(maplibre) {
4
+ // The shared pool can outlive an individual map. Keep one URL for this module's lifetime.
5
+ // Like the previous inline worker, this needs no CDN or bundler-specific asset relocation.
6
+ workerUrl !== null && workerUrl !== void 0 ? workerUrl : (workerUrl = URL.createObjectURL(new Blob([maplibreWorkerSource], { type: 'text/javascript' })));
7
+ maplibre.setWorkerUrl(workerUrl);
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@file-viewer/renderer-geo",
3
- "version": "3.0.2",
3
+ "version": "3.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Standalone geospatial renderer plugin for File Viewer with GeoJSON, KML, GPX, SHP parsing, CRS normalization, MapLibre overlay rendering, SVG fallback, and offline-friendly lazy loading.",
@@ -55,18 +55,19 @@
55
55
  "LICENSE"
56
56
  ],
57
57
  "dependencies": {
58
- "@file-viewer/core": "3.0.2",
58
+ "@file-viewer/core": "3.1.0",
59
59
  "@tmcw/togeojson": "^7.1.2",
60
- "maplibre-gl": "^5.24.0",
60
+ "maplibre-gl": "6.8.0",
61
61
  "proj4": "^2.22.0",
62
62
  "shpjs": "^6.2.0"
63
63
  },
64
64
  "devDependencies": {
65
+ "esbuild": "^0.28.2",
65
66
  "typescript": "^6.0.3"
66
67
  },
67
68
  "license": "Apache-2.0",
68
69
  "scripts": {
69
- "build": "tsc -b tsconfig.json",
70
+ "build": "node scripts/build-worker.mjs && tsc -b tsconfig.json",
70
71
  "type-check": "tsc -b tsconfig.json"
71
72
  }
72
73
  }