@superrouteca/smap 1.0.0 → 1.0.2

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@superrouteca/smap",
3
- "version": "1.0.0",
4
- "description": "Maps from Superroute's sMap service: the Web SDK (map view) and the JS client (tokens, nearest node, styles, tiles).",
3
+ "version": "1.0.2",
4
+ "description": "sMap for the web: maps from Superroute's sMap service, the Web SDK (map view) and the JS client (tokens, nearest node, styles, tiles).",
5
5
  "license": "MIT",
6
6
  "author": "Goodneo Solutions",
7
7
  "homepage": "https://github.com/Goodneo-Solutions/smap-sdk/tree/main/js#readme",
@@ -10,8 +10,16 @@
10
10
  "url": "git+https://github.com/Goodneo-Solutions/smap-sdk.git",
11
11
  "directory": "js"
12
12
  },
13
- "keywords": ["map", "maps", "vector-tiles", "smap", "superroute"],
14
- "sideEffects": ["*.css"],
13
+ "keywords": [
14
+ "map",
15
+ "maps",
16
+ "vector-tiles",
17
+ "smap",
18
+ "superroute"
19
+ ],
20
+ "sideEffects": [
21
+ "*.css"
22
+ ],
15
23
  "main": "./dist/smap.cjs",
16
24
  "module": "./dist/smap.mjs",
17
25
  "types": "./types/smap.d.cts",
@@ -50,8 +58,12 @@
50
58
  "node": ">=18"
51
59
  },
52
60
  "scripts": {
53
- "sync": "../tools/sync-js.sh",
61
+ "build": "node build.mjs",
54
62
  "prepack": "cp ../LICENSE LICENSE",
55
- "test": "node --test test/*.test.mjs"
63
+ "test": "node --test test/*.test.mjs test/*.test.cjs"
64
+ },
65
+ "devDependencies": {
66
+ "esbuild": "0.28.2",
67
+ "maplibre-gl": "6.16.0"
56
68
  }
57
69
  }
package/types/smap.d.cts CHANGED
@@ -49,8 +49,11 @@ interface CommonLayerOptions {
49
49
  maxzoom?: number;
50
50
  /** A feature property used as the feature id. */
51
51
  idProperty?: string;
52
- /** HTML for a popup opened on click, from the clicked feature's properties. */
53
- popup?: (properties: Record<string, unknown>, feature: GeoJSONFeature) => string | null | undefined | false;
52
+ /**
53
+ * A popup opened on click, from the clicked feature's properties: an HTML string, inserted as it is and never
54
+ * sanitized (so it must be trusted; escape any feature data you put in it), or a DOM node.
55
+ */
56
+ popup?: (properties: Record<string, unknown>, feature: GeoJSONFeature) => string | Node | null | undefined | false;
54
57
  onClick?: (feature: GeoJSONFeature, event: LayerClickEvent) => void;
55
58
  }
56
59
 
package/types/smap.d.mts CHANGED
@@ -49,8 +49,11 @@ interface CommonLayerOptions {
49
49
  maxzoom?: number;
50
50
  /** A feature property used as the feature id. */
51
51
  idProperty?: string;
52
- /** HTML for a popup opened on click, from the clicked feature's properties. */
53
- popup?: (properties: Record<string, unknown>, feature: GeoJSONFeature) => string | null | undefined | false;
52
+ /**
53
+ * A popup opened on click, from the clicked feature's properties: an HTML string, inserted as it is and never
54
+ * sanitized (so it must be trusted; escape any feature data you put in it), or a DOM node.
55
+ */
56
+ popup?: (properties: Record<string, unknown>, feature: GeoJSONFeature) => string | Node | null | undefined | false;
54
57
  onClick?: (feature: GeoJSONFeature, event: LayerClickEvent) => void;
55
58
  }
56
59