@accelint/map-toolkit 0.4.0 → 0.4.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/CHANGELOG.md CHANGED
@@ -1,6 +1,17 @@
1
1
  # @accelint/map-toolkit
2
2
 
3
+ ## 0.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bb73a1e: Ensure dependencies all follow the same semver range across devtk, maptk, and designtk.
8
+ - Updated dependencies [bb73a1e]
9
+ - @accelint/core@0.5.2
10
+ - @accelint/bus@3.0.2
11
+ - @accelint/geo@0.4.2
12
+
3
13
  ## 0.4.0
14
+
4
15
  ### Minor Changes
5
16
 
6
17
  - 8802d14: Add map-cursor controller to map-toolkit.
@@ -21,62 +32,62 @@
21
32
  - @accelint/geo@0.4.0
22
33
 
23
34
  ## 0.3.0
35
+
24
36
  ### Minor Changes
25
37
 
26
38
  - 7131cc0: Add `useCursorCoordinates`, a hook to retrieve the current coordinates for the mouse hovered position
27
39
  - 874edd5: ## Breaking Change: Structured Clone Constraint
28
-
40
+
29
41
  The event bus payload is now constrained to values that are serializable by the [structured clone algorithm](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm). This constraint aligns the TypeScript types with the actual runtime behavior of the `BroadcastChannel` API.
30
-
42
+
31
43
  ### What this means
32
-
44
+
33
45
  You can no longer pass the following types in event payloads:
34
-
35
46
  - Functions
36
47
  - Symbols
37
48
  - DOM nodes
38
49
  - Prototype chains (class instances lose their methods)
39
50
  - Properties with `undefined` values (they're omitted)
40
-
51
+
41
52
  ### How to migrate
42
-
53
+
43
54
  **❌ Before:**
44
-
55
+
45
56
  ```typescript
46
- bus.emit('user-action', {
47
- callback: () => console.log('done'), // ❌ Function
57
+ bus.emit("user-action", {
58
+ callback: () => console.log("done"), // ❌ Function
48
59
  userData: userClass, // ❌ Class instance with methods
49
- element: document.getElementById('foo'), // ❌ DOM node
60
+ element: document.getElementById("foo"), // ❌ DOM node
50
61
  });
51
62
  ```
52
-
63
+
53
64
  **✅ After:**
54
-
65
+
55
66
  ```typescript
56
67
  // Option 1: Send only data, handle logic separately
57
- bus.emit('user-action', {
58
- actionType: 'complete', // ✅ Primitive
68
+ bus.emit("user-action", {
69
+ actionType: "complete", // ✅ Primitive
59
70
  userData: { id: userClass.id, name: userClass.name }, // ✅ Plain object
60
- elementId: 'foo', // ✅ Reference by ID
71
+ elementId: "foo", // ✅ Reference by ID
61
72
  });
62
-
73
+
63
74
  // Option 2: Use event types to trigger behavior
64
- bus.on('user-action-complete', () => {
65
- console.log('done'); // Handle callback logic in listener
75
+ bus.on("user-action-complete", () => {
76
+ console.log("done"); // Handle callback logic in listener
66
77
  });
67
78
  ```
68
-
79
+
69
80
  ### Supported types
70
-
71
81
  - Primitives (string, number, boolean, null, BigInt)
72
82
  - Plain objects and arrays
73
83
  - Date, RegExp, Map, Set
74
84
  - Typed arrays (Uint8Array, etc.)
75
85
  - ArrayBuffer, Blob, File
76
-
86
+
77
87
  ### Finding issues
78
-
88
+
79
89
  TypeScript will now catch most violations at compile time. Runtime errors from `BroadcastChannel.postMessage()` indicate non-serializable values that slipped through.
90
+
80
91
  - e8535c4: Adds ViewportSize component that shows the width and height of the viewport and updates with changes.
81
92
  Adds useViewportState for more fine-grained control of viewport data (lat/lon/zoom/bounds). Exports `useEffectEvent` ponyfill from `@accelint/bus/react`.
82
93
 
@@ -86,10 +97,11 @@
86
97
  - 99f6cd5: Add map-mode/store getCurrentModeOwner method to access the current map mode owner.
87
98
  - 80db585: BREAKING CHANGES:
88
99
  Design Toolkit no longer exports `tv`, this is now available from Design Foundation
89
-
100
+
90
101
  Created new package @accelint/design-foundation that houses all of the Tailwind tokens, variants, base styles and utilities for easier reuse without having a dependency on the larger Design Toolkit
91
-
102
+
92
103
  Updated Map Toolkit Storybook and NextJS demo app styles to import the new Design Foundation
104
+
93
105
  - f157e42: update picking info to remove more unserializable properties in map-toolkit
94
106
  - 7539bbb: update vite config in map-toolkit to re-enable base-map render in storybook preview
95
107
  - 86a95cf: refactor map mode to use module useSyncExternalStore pattern instead of class.
package/catalog-info.yaml CHANGED
@@ -11,15 +11,14 @@ metadata:
11
11
 
12
12
  Dependencies:
13
13
 
14
- accelint_biome-config@1.0.2, accelint_bus@3.0.1,
15
- accelint_constellation-tracker@1.0.1, accelint_core@0.5.1,
16
- accelint_design-foundation@1.0.2, accelint_design-toolkit@8.1.2,
14
+ accelint_biome-config@1.0.2, accelint_bus@3.0.2, accelint_core@0.5.2,
15
+ accelint_design-foundation@2.0.0, accelint_design-toolkit@9.0.0,
17
16
  accelint_geo@0.4.1, accelint_typescript-config@0.1.4,
18
- accelint_vitest-config@0.1.5
17
+ accelint_vitest-config@0.1.6
19
18
  annotations:
20
19
  backstage.io/edit-url: https://github.com/gohypergiant/standard-toolkit/blob/main/packages/map-toolkit/catalog-info.yaml
21
20
  backstage.io/techdocs-ref: dir:.
22
- package/version: 0.4.0
21
+ package/version: 0.4.1
23
22
  github.com/project-slug: gohypergiant/standard-toolkit
24
23
  links:
25
24
  - url: https://github.com/gohypergiant/standard-toolkit/tree/main/packages/map-toolkit
@@ -38,7 +37,6 @@ spec:
38
37
  dependsOn:
39
38
  - component:accelint_biome-config
40
39
  - component:accelint_bus
41
- - component:accelint_constellation-tracker
42
40
  - component:accelint_core
43
41
  - component:accelint_design-foundation
44
42
  - component:accelint_design-toolkit
@@ -11,7 +11,7 @@
11
11
  */
12
12
 
13
13
  import { UniqueId } from "@accelint/core";
14
- import * as react_jsx_runtime0 from "react/jsx-runtime";
14
+ import * as react_jsx_runtime1 from "react/jsx-runtime";
15
15
  import { DeckglProps } from "@deckgl-fiber-renderer/types";
16
16
 
17
17
  //#region src/deckgl/base-map/index.d.ts
@@ -119,7 +119,7 @@ declare function BaseMap({
119
119
  onHover,
120
120
  onViewStateChange,
121
121
  ...rest
122
- }: BaseMapProps): react_jsx_runtime0.JSX.Element;
122
+ }: BaseMapProps): react_jsx_runtime1.JSX.Element;
123
123
  //#endregion
124
124
  export { BaseMap, BaseMapProps };
125
125
  //# sourceMappingURL=index.d.ts.map
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { ReactNode } from "react";
14
14
  import { UniqueId } from "@accelint/core";
15
- import * as react_jsx_runtime1 from "react/jsx-runtime";
15
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
16
16
 
17
17
  //#region src/deckgl/base-map/provider.d.ts
18
18
  /**
@@ -139,7 +139,7 @@ type MapProviderProps = {
139
139
  declare function MapProvider({
140
140
  children,
141
141
  id
142
- }: MapProviderProps): react_jsx_runtime1.JSX.Element;
142
+ }: MapProviderProps): react_jsx_runtime0.JSX.Element;
143
143
  //#endregion
144
144
  export { MapContext, MapProvider, MapProviderProps };
145
145
  //# sourceMappingURL=provider.d.ts.map
package/package.json CHANGED
@@ -1,33 +1,59 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/package",
3
2
  "name": "@accelint/map-toolkit",
4
- "title": "Accelint Map Toolkit",
5
3
  "description": "A collection of components and utilities to simplify visualizing and working with geospatial data.",
4
+ "version": "0.4.1",
6
5
  "author": "https://hypergiant.com",
7
- "owner": "default/pathfinder",
8
- "keywords": [
9
- "deckgl",
10
- "geospatial",
11
- "map-tk",
12
- "maplibre"
13
- ],
14
- "subPath": "packages/map-toolkit",
15
- "version": "0.4.0",
16
- "private": false,
17
- "license": "Apache-2.0",
18
- "repository": {
19
- "type": "git",
20
- "url": "https://github.com/gohypergiant/standard-toolkit"
6
+ "$schema": "https://json.schemastore.org/package",
7
+ "devDependencies": {
8
+ "@deck.gl/core": "~9.1",
9
+ "@deck.gl/extensions": "~9.1",
10
+ "@deck.gl/geo-layers": "~9.1",
11
+ "@deck.gl/layers": "~9.1",
12
+ "@deck.gl/mapbox": "~9.1",
13
+ "@deck.gl/mesh-layers": "~9.1",
14
+ "@deck.gl/widgets": "~9.1",
15
+ "@deckgl-fiber-renderer/dom": "^1.4.0",
16
+ "@deckgl-fiber-renderer/shared": "^1.4.0",
17
+ "@deckgl-fiber-renderer/types": "^1.4.0",
18
+ "@storybook/addon-docs": "^9.1.16",
19
+ "@storybook/addon-themes": "^9.1.16",
20
+ "@storybook/builder-vite": "^9.1.16",
21
+ "@storybook/react-vite": "^9.1.16",
22
+ "@tailwindcss/vite": "^4.1.18",
23
+ "@testing-library/dom": "^10.4.1",
24
+ "@testing-library/jest-dom": "^6.9.1",
25
+ "@testing-library/react": "^16.3.0",
26
+ "@testing-library/user-event": "^14.6.1",
27
+ "@types/node": "^22",
28
+ "@types/react": "^19",
29
+ "@types/react-dom": "^19",
30
+ "client-only": "^0.0.1",
31
+ "maplibre-gl": "^5.7.1",
32
+ "milsymbol": "^3.0.2",
33
+ "mjolnir.js": "^3.0.0",
34
+ "node-fetch": "^2.6.7",
35
+ "react": "^19",
36
+ "react-dom": "^19",
37
+ "storybook": "^9.1.16",
38
+ "tailwindcss": "^4.1.18",
39
+ "tsdown": "^0.18.0",
40
+ "type-fest": "^5.3.1",
41
+ "typescript": "^5.9.3",
42
+ "vite": "^7.2.7",
43
+ "vitest": "^4.0.15",
44
+ "@accelint/biome-config": "1.0.2",
45
+ "@accelint/bus": "3.0.2",
46
+ "@accelint/core": "0.5.2",
47
+ "@accelint/design-foundation": "2.0.0",
48
+ "@accelint/design-toolkit": "9.0.0",
49
+ "@accelint/geo": "0.4.2",
50
+ "@accelint/typescript-config": "0.1.4",
51
+ "@accelint/vitest-config": "0.1.6"
52
+ },
53
+ "engines": {
54
+ "node": ">=22",
55
+ "pnpm": ">=10"
21
56
  },
22
- "type": "module",
23
- "files": [
24
- "./dist/**",
25
- "./catalog-info.yaml",
26
- "./CHANGELOG.md",
27
- "./package.json",
28
- "./README.md"
29
- ],
30
- "types": "./dist/index.d.ts",
31
57
  "exports": {
32
58
  "./cursor-coordinates": "./dist/cursor-coordinates/index.js",
33
59
  "./cursor-coordinates/use-cursor-coordinates": "./dist/cursor-coordinates/use-cursor-coordinates.js",
@@ -65,59 +91,20 @@
65
91
  "./viewport/viewport-size": "./dist/viewport/viewport-size.js",
66
92
  "./package.json": "./package.json"
67
93
  },
68
- "devDependencies": {
69
- "@deck.gl/core": "^9.1.14",
70
- "@deck.gl/extensions": "^9.1.14",
71
- "@deck.gl/geo-layers": "^9.1.14",
72
- "@deck.gl/layers": "^9.1.14",
73
- "@deck.gl/mapbox": "^9.1.14",
74
- "@deck.gl/mesh-layers": "^9.1.14",
75
- "@deck.gl/widgets": "^9.1.14",
76
- "@deckgl-fiber-renderer/dom": "^1.4.0",
77
- "@deckgl-fiber-renderer/shared": "^1.4.0",
78
- "@deckgl-fiber-renderer/types": "^1.4.0",
79
- "@storybook/addon-docs": "^9.1.16",
80
- "@storybook/addon-themes": "^9.1.16",
81
- "@storybook/builder-vite": "^9.1.16",
82
- "@storybook/react-vite": "^9.1.16",
83
- "@tailwindcss/vite": "^4.1.11",
84
- "@testing-library/dom": "^10.4.1",
85
- "@testing-library/jest-dom": "^6.6.4",
86
- "@testing-library/react": "^16.3.0",
87
- "@testing-library/user-event": "^14.6.1",
88
- "@types/node": "^24.9.0",
89
- "@types/react": "19.1.13",
90
- "@types/react-dom": "19.1.11",
91
- "client-only": "^0.0.1",
92
- "maplibre-gl": "^5.7.1",
93
- "milsymbol": "^3.0.2",
94
- "mjolnir.js": "^3.0.0",
95
- "node-fetch": "^2.6.7",
96
- "react": "19.0.0",
97
- "react-dom": "19.0.0",
98
- "storybook": "^9.1.16",
99
- "tailwindcss": "^4.1.11",
100
- "tsdown": "^0.17.2",
101
- "type-fest": "^4.41.0",
102
- "typescript": "5.8.3",
103
- "vite": "^7.2.2",
104
- "vitest": "^4.0.8",
105
- "@accelint/biome-config": "1.0.2",
106
- "@accelint/bus": "3.0.1",
107
- "@accelint/constellation-tracker": "1.0.1",
108
- "@accelint/core": "0.5.1",
109
- "@accelint/design-foundation": "1.0.2",
110
- "@accelint/design-toolkit": "8.1.2",
111
- "@accelint/geo": "0.4.1",
112
- "@accelint/typescript-config": "0.1.4",
113
- "@accelint/vitest-config": "0.1.5"
114
- },
115
- "peerDependencies": {
116
- "react": "19.0.0",
117
- "@accelint/bus": "3.0.1",
118
- "@accelint/core": "0.5.1",
119
- "@accelint/geo": "0.4.1"
120
- },
94
+ "files": [
95
+ "./dist/**",
96
+ "./catalog-info.yaml",
97
+ "./CHANGELOG.md",
98
+ "./package.json",
99
+ "./README.md"
100
+ ],
101
+ "keywords": [
102
+ "deckgl",
103
+ "geospatial",
104
+ "map-tk",
105
+ "maplibre"
106
+ ],
107
+ "license": "Apache-2.0",
121
108
  "optionalDependencies": {
122
109
  "@deck.gl/core": "9.1.14",
123
110
  "@deck.gl/extensions": "9.1.14",
@@ -133,22 +120,37 @@
133
120
  "milsymbol": "3.0.2",
134
121
  "mjolnir.js": "^3.0.0"
135
122
  },
136
- "engines": {
137
- "node": ">=22",
138
- "pnpm": ">=10"
123
+ "owner": "default/pathfinder",
124
+ "peerDependencies": {
125
+ "react": "^19",
126
+ "@accelint/bus": "3.0.2",
127
+ "@accelint/core": "0.5.2",
128
+ "@accelint/geo": "0.4.2"
139
129
  },
130
+ "private": false,
140
131
  "publishConfig": {
141
132
  "access": "public"
142
133
  },
134
+ "repository": {
135
+ "type": "git",
136
+ "url": "https://github.com/gohypergiant/standard-toolkit"
137
+ },
143
138
  "sideEffects": false,
139
+ "subPath": "packages/map-toolkit",
140
+ "title": "Accelint Map Toolkit",
141
+ "type": "module",
142
+ "types": "./dist/index.d.ts",
144
143
  "scripts": {
145
144
  "bench": "pnpm vitest bench --run --dir src",
146
145
  "build": "pnpm tsdown",
147
146
  "build-storybook": "pnpm storybook build",
148
- "constellation-tracker": "constellation-tracker",
147
+ "constellation-tracker": "pnpm exec constellation-tracker",
149
148
  "dev": "pnpm tsc --watch",
150
- "lint": "pnpm biome lint",
151
- "preview": "pnpm storybook dev -p 6006",
149
+ "format": "pnpm biome format . --write --verbose",
150
+ "format:check": "pnpm biome format . --verbose",
151
+ "license": "pnpm zx ../../scripts/license.mjs",
152
+ "lint": "pnpm biome lint . --verbose",
153
+ "preview": "pnpm storybook dev -p 6007",
152
154
  "test": "pnpm vitest --dir=src",
153
155
  "test:watch": "pnpm vitest --dir=src --watch"
154
156
  }