@orbat-mapper/tactical-draw-adapter-maplibre 0.2.4 → 0.3.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/README.md CHANGED
@@ -5,7 +5,10 @@
5
5
  contract, so the draw/edit sessions, draw rules, gestures, and handle
6
6
  rendering from `tactical-draw` run unchanged on a MapLibre map.
7
7
 
8
- `maplibre-gl` is a peer dependency — your app supplies the version.
8
+ `maplibre-gl` 5.8 or 6.x is a peer dependency — your app supplies the version. MapLibre 6
9
+ applications must also follow MapLibre's
10
+ [v5-to-v6 setup guidance](https://maplibre.org/maplibre-gl-js/docs/guides/v5-to-v6-migration-guide/),
11
+ including its ESM and worker configuration requirements.
9
12
 
10
13
  ## Installation
11
14
 
@@ -20,7 +23,7 @@ pnpm add @orbat-mapper/tactical-draw-adapter-maplibre @orbat-mapper/tactical-dra
20
23
  ## Usage
21
24
 
22
25
  ```ts
23
- import maplibregl from "maplibre-gl";
26
+ import * as maplibregl from "maplibre-gl";
24
27
  import { TacticalDraw } from "@orbat-mapper/tactical-draw";
25
28
  import { MapLibreAdapter } from "@orbat-mapper/tactical-draw-adapter-maplibre";
26
29
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BaseMapAdapter, EditPointerDriver, FeatureGroup, IconResource, LayerId, MapCursor, NativeEventEntry, PickHandler, PickOptions, PixelCoordinate, StyleOptions } from "@orbat-mapper/tactical-draw";
2
- import maplibregl from "maplibre-gl";
2
+ import * as maplibregl from "maplibre-gl";
3
3
  import { Feature, Position } from "geojson";
4
4
 
5
5
  //#region src/ml-adapter.d.ts
package/dist/index.mjs CHANGED
@@ -1089,10 +1089,10 @@ var MapLibreAdapter = class extends BaseMapAdapter {
1089
1089
  const source = this.map.getSource(bundle.sourceId);
1090
1090
  if (!source) return;
1091
1091
  const features = [...bundle.requiredIconIds].every((id) => this.map.hasImage(id)) ? bundle.features.map((feature) => this.promoteFeature(feature)) : [];
1092
- const result = bundle.sourceInitialized && typeof source.updateData === "function" ? source.updateData(buildGeoJSONSourceDiff(bundle.sourceFeatures, features), true) : source.setData({
1092
+ const result = bundle.sourceInitialized && typeof source.updateData === "function" ? source.updateData(buildGeoJSONSourceDiff(bundle.sourceFeatures, features)) : source.setData({
1093
1093
  type: "FeatureCollection",
1094
1094
  features
1095
- }, true);
1095
+ });
1096
1096
  bundle.sourceFeatures = features;
1097
1097
  bundle.sourceInitialized = true;
1098
1098
  if (isPromiseLike(result)) Promise.resolve(result).catch(() => {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbat-mapper/tactical-draw-adapter-maplibre",
3
- "version": "0.2.4",
3
+ "version": "0.3.1",
4
4
  "description": "MapLibre GL JS engine adapter for @orbat-mapper/tactical-draw. Draw and edit tactical control measures (MIL-STD-2525 / APP-6) on a MapLibre map.",
5
5
  "license": "MIT",
6
6
  "author": "Orbat Mapper",
@@ -37,18 +37,19 @@
37
37
  "access": "public"
38
38
  },
39
39
  "dependencies": {
40
- "@orbat-mapper/control-measures": "^0.5.0",
41
- "@orbat-mapper/tactical-draw": "^0.3.2"
40
+ "@orbat-mapper/control-measures": "^0.6.0",
41
+ "@orbat-mapper/tactical-draw": "^0.4.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "maplibre-gl": ">=5.8.0 <6.0.0"
44
+ "maplibre-gl": ">=5.8.0 <7.0.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@arethetypeswrong/core": "^0.18.3",
48
- "@maplibre/maplibre-gl-style-spec": "^24.10.0",
48
+ "@maplibre/maplibre-gl-style-spec": "^26.2.1",
49
49
  "@types/geojson": "^7946.0.16",
50
50
  "jsdom": "^27.4.0",
51
- "maplibre-gl": "^5.24.0",
51
+ "maplibre-gl": "^6.3.0",
52
+ "playwright-core": "^1.62.1",
52
53
  "publint": "^0.3.21",
53
54
  "tsdown": "^0.22.2",
54
55
  "typescript": "~5.9.3",
@@ -58,6 +59,7 @@
58
59
  "scripts": {
59
60
  "build": "tsdown",
60
61
  "test": "vitest run",
62
+ "test:browser": "node browser-smoke/run.mjs",
61
63
  "lint": "eslint . --fix"
62
64
  }
63
65
  }