@trackunit/react-map 0.2.40 → 0.2.41-alpha-08e1d7f469e.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.
- package/index.cjs.js +7 -17
- package/index.esm.js +7 -17
- package/package.json +10 -10
- package/src/controls/useControlStack.d.ts +4 -14
- package/src/core/types.d.ts +1 -1
- package/src/core/useMap.d.ts +2 -2
- package/src/layers/Layers.d.ts +1 -1
package/index.cjs.js
CHANGED
|
@@ -1312,7 +1312,7 @@ function useMapAdapterState(adapterConfig) {
|
|
|
1312
1312
|
* @returns Tuple of [Map component, API object]
|
|
1313
1313
|
* @example Basic usage
|
|
1314
1314
|
* ```tsx
|
|
1315
|
-
* import { useMap,
|
|
1315
|
+
* import { useMap, Controls } from "@trackunit/react-map";
|
|
1316
1316
|
* import { googleMapsAdapter } from "@trackunit/react-map-adapter-google";
|
|
1317
1317
|
*
|
|
1318
1318
|
* const MyMap = () => {
|
|
@@ -1323,7 +1323,7 @@ function useMapAdapterState(adapterConfig) {
|
|
|
1323
1323
|
*
|
|
1324
1324
|
* return (
|
|
1325
1325
|
* <Map>
|
|
1326
|
-
* <
|
|
1326
|
+
* <Controls api={api} />
|
|
1327
1327
|
* </Map>
|
|
1328
1328
|
* );
|
|
1329
1329
|
* };
|
|
@@ -10923,7 +10923,7 @@ const applyPortalZIndex = (container, zIndex) => {
|
|
|
10923
10923
|
*
|
|
10924
10924
|
* return (
|
|
10925
10925
|
* <Map>
|
|
10926
|
-
* <
|
|
10926
|
+
* <Controls api={api} />
|
|
10927
10927
|
* <Layers api={api} layers={layers} />
|
|
10928
10928
|
* </Map>
|
|
10929
10929
|
* );
|
|
@@ -11543,24 +11543,14 @@ const composeControlAreas = (areas) => ({
|
|
|
11543
11543
|
*
|
|
11544
11544
|
* Returns `defineControlStack` and `composeControlAreas` for consumers building
|
|
11545
11545
|
* custom control layouts without duplicating the stack-ordering logic already
|
|
11546
|
-
* used by `Controls`.
|
|
11547
|
-
* runs `defineControlStack` per area. Use `defineControlStack` on its own when
|
|
11548
|
-
* assembling a single area's `{ controls }` outside `composeControlAreas`.
|
|
11546
|
+
* used by `Controls`.
|
|
11549
11547
|
*
|
|
11550
11548
|
* @example
|
|
11551
11549
|
* ```tsx
|
|
11552
|
-
* const { composeControlAreas } = useControlStack();
|
|
11550
|
+
* const { defineControlStack, composeControlAreas } = useControlStack();
|
|
11553
11551
|
* const controls = composeControlAreas({
|
|
11554
|
-
* navigation: [
|
|
11555
|
-
*
|
|
11556
|
-
* builtIn.navigation.zoom,
|
|
11557
|
-
* builtIn.navigation.fullscreen,
|
|
11558
|
-
* ],
|
|
11559
|
-
* settings: [
|
|
11560
|
-
* ...markers.layer.controls.settings ?? [],
|
|
11561
|
-
* builtIn.settings.mapStyle,
|
|
11562
|
-
* isAdmin ? adminControl : undefined,
|
|
11563
|
-
* ],
|
|
11552
|
+
* navigation: [builtIn.navigation.zoom, builtIn.navigation.fullscreen],
|
|
11553
|
+
* settings: [builtIn.settings.mapStyle],
|
|
11564
11554
|
* });
|
|
11565
11555
|
* ```
|
|
11566
11556
|
*/
|
package/index.esm.js
CHANGED
|
@@ -1311,7 +1311,7 @@ function useMapAdapterState(adapterConfig) {
|
|
|
1311
1311
|
* @returns Tuple of [Map component, API object]
|
|
1312
1312
|
* @example Basic usage
|
|
1313
1313
|
* ```tsx
|
|
1314
|
-
* import { useMap,
|
|
1314
|
+
* import { useMap, Controls } from "@trackunit/react-map";
|
|
1315
1315
|
* import { googleMapsAdapter } from "@trackunit/react-map-adapter-google";
|
|
1316
1316
|
*
|
|
1317
1317
|
* const MyMap = () => {
|
|
@@ -1322,7 +1322,7 @@ function useMapAdapterState(adapterConfig) {
|
|
|
1322
1322
|
*
|
|
1323
1323
|
* return (
|
|
1324
1324
|
* <Map>
|
|
1325
|
-
* <
|
|
1325
|
+
* <Controls api={api} />
|
|
1326
1326
|
* </Map>
|
|
1327
1327
|
* );
|
|
1328
1328
|
* };
|
|
@@ -10922,7 +10922,7 @@ const applyPortalZIndex = (container, zIndex) => {
|
|
|
10922
10922
|
*
|
|
10923
10923
|
* return (
|
|
10924
10924
|
* <Map>
|
|
10925
|
-
* <
|
|
10925
|
+
* <Controls api={api} />
|
|
10926
10926
|
* <Layers api={api} layers={layers} />
|
|
10927
10927
|
* </Map>
|
|
10928
10928
|
* );
|
|
@@ -11542,24 +11542,14 @@ const composeControlAreas = (areas) => ({
|
|
|
11542
11542
|
*
|
|
11543
11543
|
* Returns `defineControlStack` and `composeControlAreas` for consumers building
|
|
11544
11544
|
* custom control layouts without duplicating the stack-ordering logic already
|
|
11545
|
-
* used by `Controls`.
|
|
11546
|
-
* runs `defineControlStack` per area. Use `defineControlStack` on its own when
|
|
11547
|
-
* assembling a single area's `{ controls }` outside `composeControlAreas`.
|
|
11545
|
+
* used by `Controls`.
|
|
11548
11546
|
*
|
|
11549
11547
|
* @example
|
|
11550
11548
|
* ```tsx
|
|
11551
|
-
* const { composeControlAreas } = useControlStack();
|
|
11549
|
+
* const { defineControlStack, composeControlAreas } = useControlStack();
|
|
11552
11550
|
* const controls = composeControlAreas({
|
|
11553
|
-
* navigation: [
|
|
11554
|
-
*
|
|
11555
|
-
* builtIn.navigation.zoom,
|
|
11556
|
-
* builtIn.navigation.fullscreen,
|
|
11557
|
-
* ],
|
|
11558
|
-
* settings: [
|
|
11559
|
-
* ...markers.layer.controls.settings ?? [],
|
|
11560
|
-
* builtIn.settings.mapStyle,
|
|
11561
|
-
* isAdmin ? adminControl : undefined,
|
|
11562
|
-
* ],
|
|
11551
|
+
* navigation: [builtIn.navigation.zoom, builtIn.navigation.fullscreen],
|
|
11552
|
+
* settings: [builtIn.settings.mapStyle],
|
|
11563
11553
|
* });
|
|
11564
11554
|
* ```
|
|
11565
11555
|
*/
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41-alpha-08e1d7f469e.0",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-components": "2.3.
|
|
11
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
12
|
-
"@trackunit/react-form-components": "2.3.
|
|
13
|
-
"@trackunit/react-core-hooks": "1.19.
|
|
14
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
15
|
-
"@trackunit/i18n-library-translation": "2.2.
|
|
10
|
+
"@trackunit/react-components": "2.3.2-alpha-08e1d7f469e.0",
|
|
11
|
+
"@trackunit/css-class-variance-utilities": "1.13.87-alpha-08e1d7f469e.0",
|
|
12
|
+
"@trackunit/react-form-components": "2.3.2-alpha-08e1d7f469e.0",
|
|
13
|
+
"@trackunit/react-core-hooks": "1.19.2-alpha-08e1d7f469e.0",
|
|
14
|
+
"@trackunit/geo-json-utils": "1.14.90-alpha-08e1d7f469e.0",
|
|
15
|
+
"@trackunit/i18n-library-translation": "2.2.2-alpha-08e1d7f469e.0",
|
|
16
16
|
"react-minimal-pie-chart": "^8.4.0",
|
|
17
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
18
|
-
"@trackunit/react-map-color-utils": "0.0.
|
|
19
|
-
"@trackunit/ui-design-tokens": "1.13.
|
|
17
|
+
"@trackunit/react-map-adapter-shared": "0.0.71-alpha-08e1d7f469e.0",
|
|
18
|
+
"@trackunit/react-map-color-utils": "0.0.56-alpha-08e1d7f469e.0",
|
|
19
|
+
"@trackunit/ui-design-tokens": "1.13.86-alpha-08e1d7f469e.0",
|
|
20
20
|
"@floating-ui/react": "^0.26.25",
|
|
21
21
|
"es-toolkit": "^1.39.10",
|
|
22
22
|
"tailwind-merge": "^2.0.0",
|
|
@@ -9,24 +9,14 @@ export type ControlStackHelpers = Readonly<{
|
|
|
9
9
|
*
|
|
10
10
|
* Returns `defineControlStack` and `composeControlAreas` for consumers building
|
|
11
11
|
* custom control layouts without duplicating the stack-ordering logic already
|
|
12
|
-
* used by `Controls`.
|
|
13
|
-
* runs `defineControlStack` per area. Use `defineControlStack` on its own when
|
|
14
|
-
* assembling a single area's `{ controls }` outside `composeControlAreas`.
|
|
12
|
+
* used by `Controls`.
|
|
15
13
|
*
|
|
16
14
|
* @example
|
|
17
15
|
* ```tsx
|
|
18
|
-
* const { composeControlAreas } = useControlStack();
|
|
16
|
+
* const { defineControlStack, composeControlAreas } = useControlStack();
|
|
19
17
|
* const controls = composeControlAreas({
|
|
20
|
-
* navigation: [
|
|
21
|
-
*
|
|
22
|
-
* builtIn.navigation.zoom,
|
|
23
|
-
* builtIn.navigation.fullscreen,
|
|
24
|
-
* ],
|
|
25
|
-
* settings: [
|
|
26
|
-
* ...markers.layer.controls.settings ?? [],
|
|
27
|
-
* builtIn.settings.mapStyle,
|
|
28
|
-
* isAdmin ? adminControl : undefined,
|
|
29
|
-
* ],
|
|
18
|
+
* navigation: [builtIn.navigation.zoom, builtIn.navigation.fullscreen],
|
|
19
|
+
* settings: [builtIn.settings.mapStyle],
|
|
30
20
|
* });
|
|
31
21
|
* ```
|
|
32
22
|
*/
|
package/src/core/types.d.ts
CHANGED
package/src/core/useMap.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { type UseMapReturn } from "./types";
|
|
|
17
17
|
* @returns Tuple of [Map component, API object]
|
|
18
18
|
* @example Basic usage
|
|
19
19
|
* ```tsx
|
|
20
|
-
* import { useMap,
|
|
20
|
+
* import { useMap, Controls } from "@trackunit/react-map";
|
|
21
21
|
* import { googleMapsAdapter } from "@trackunit/react-map-adapter-google";
|
|
22
22
|
*
|
|
23
23
|
* const MyMap = () => {
|
|
@@ -28,7 +28,7 @@ import { type UseMapReturn } from "./types";
|
|
|
28
28
|
*
|
|
29
29
|
* return (
|
|
30
30
|
* <Map>
|
|
31
|
-
* <
|
|
31
|
+
* <Controls api={api} />
|
|
32
32
|
* </Map>
|
|
33
33
|
* );
|
|
34
34
|
* };
|