@element-editor/core 0.2.0 → 0.2.1

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/AGENTS.md CHANGED
@@ -25,7 +25,7 @@ Peer: `react` `^19.2.0`. No CSS. Use the same version as your other `@element-ed
25
25
  | `FeaturePatch` | `Partial<Pick<GeoJSONFeature, 'properties' \| 'geometry' \| 'schemaId' \| 'hidden'>>` (for `ref.updateFeature`) |
26
26
  | `BBox` | `[west, south, east, north]` |
27
27
  | `FlyToOptions` | `{ center: [lng, lat]; zoom? }` |
28
- | `NetworkConfig` | `config.network`: `vectorTiles`, `dem`, `osmRaster`, `glyphs`, `sprite`, `overpass`, `routing`, `nominatim`, `fetch` |
28
+ | `NetworkConfig` | `config.network`: `vectorTiles`, `dem`, `osmRaster`, `glyphs`, `sprite`, `maplibreWorker`, `overpass`, `routing`, `nominatim`, `fetch` |
29
29
  | `ErrorCode`, `ErrorSource` | closed unions, semver-covered; see the drop-in's `AGENTS.md` |
30
30
  | `DataStore`, `UIStore` | state + actions of the two zustand stores (`useDataStore` / `useUIStore` selectors, `useGeoStore().dataStore.getState()`); also `UndoEntry`, `PanelPrefs`, `DialogState`, `CompletedMeasurement`, `DataStoreOptions`, `UIStoreOptions` |
31
31
 
@@ -26,6 +26,14 @@ export interface NetworkConfig {
26
26
  glyphs?: string;
27
27
  /** Absolute URL prefix of the sprite files (without extension). Default: jsDelivr copy of the adapter's own. */
28
28
  sprite?: string;
29
+ /**
30
+ * MapLibre GL JS 6's worker script (`maplibre-gl-worker.mjs`), which the MapLibre drop-in passes to
31
+ * MapLibre's `setWorkerUrl` before creating its map. Default: jsDelivr copy of the installed
32
+ * maplibre-gl version. `false`: leave it to the app (it calls `setWorkerUrl` itself). Not used on
33
+ * MapLibre 5 (worker built in), nor when the app already called `setWorkerUrl`. MapLibre has one
34
+ * worker URL per page, so the first editor that creates a map sets it.
35
+ */
36
+ maplibreWorker?: string | false;
29
37
  /** The Picker's OpenStreetMap lookups. `false`: the Picker uses the basemap's vector tiles only (hidden on Leaflet). */
30
38
  overpass?: false | Omit<OverpassOptions, 'fetch' | 'signal'>;
31
39
  /** The Route tool's road snapping. `false`: the Route tool is hidden. */
@@ -26,6 +26,14 @@ export interface NetworkConfig {
26
26
  glyphs?: string;
27
27
  /** Absolute URL prefix of the sprite files (without extension). Default: jsDelivr copy of the adapter's own. */
28
28
  sprite?: string;
29
+ /**
30
+ * MapLibre GL JS 6's worker script (`maplibre-gl-worker.mjs`), which the MapLibre drop-in passes to
31
+ * MapLibre's `setWorkerUrl` before creating its map. Default: jsDelivr copy of the installed
32
+ * maplibre-gl version. `false`: leave it to the app (it calls `setWorkerUrl` itself). Not used on
33
+ * MapLibre 5 (worker built in), nor when the app already called `setWorkerUrl`. MapLibre has one
34
+ * worker URL per page, so the first editor that creates a map sets it.
35
+ */
36
+ maplibreWorker?: string | false;
29
37
  /** The Picker's OpenStreetMap lookups. `false`: the Picker uses the basemap's vector tiles only (hidden on Leaflet). */
30
38
  overpass?: false | Omit<OverpassOptions, 'fetch' | 'signal'>;
31
39
  /** The Route tool's road snapping. `false`: the Route tool is hidden. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@element-editor/core",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Framework-neutral core of the Element map editor: GeoJSON data and UI stores, types, snapping, geometry and routing helpers.",
5
5
  "keywords": [
6
6
  "element-editor",