@open-pioneer/overview-map 1.4.0-dev.20260727093741 → 1.5.0-dev.20260910103330
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 +26 -14
- package/OverviewMap.js.map +1 -1
- package/package.json +11 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
# @open-pioneer/overview-map
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.5.0-dev.20260910103330
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f790fda: Update to Chakra 3.37.0
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 09ec7c7: Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 1.4.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
6
16
|
|
|
7
17
|
- c30396d: Update Chakra to 3.36.1
|
|
18
|
+
- d862003: Update to trails core-packages 4.7.0
|
|
8
19
|
|
|
9
20
|
### Patch Changes
|
|
10
21
|
|
|
11
22
|
- 078bef5: Use private JavaScript properties (#) instead of TypeScript keyword.
|
|
23
|
+
- c16a401: Migrated from eslint to oxlint and from prettier to oxfmt.
|
|
12
24
|
|
|
13
25
|
## 1.3.0
|
|
14
26
|
|
|
@@ -61,17 +73,17 @@
|
|
|
61
73
|
- 193068a: Deprecate the `mapId` property on React components.
|
|
62
74
|
Use the `MapModel` directly instead to pass a reference to the map.
|
|
63
75
|
|
|
64
|
-
|
|
76
|
+
Example:
|
|
65
77
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
```tsx
|
|
79
|
+
// Default map for entire component tree
|
|
80
|
+
<DefaultMapProvider map={mapModel}>
|
|
81
|
+
<Toc />
|
|
82
|
+
</DefaultMapProvider>
|
|
71
83
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
84
|
+
// Map for specific component
|
|
85
|
+
<Toc map={mapModel} />
|
|
86
|
+
```
|
|
75
87
|
|
|
76
88
|
### Patch Changes
|
|
77
89
|
|
|
@@ -94,9 +106,9 @@
|
|
|
94
106
|
### Minor Changes
|
|
95
107
|
|
|
96
108
|
- 2fa8020: Update trails core package dependencies.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
109
|
+
- Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
|
|
110
|
+
- Removes any obsolete references to `@chakra-ui/system`.
|
|
111
|
+
This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
|
|
100
112
|
|
|
101
113
|
### Patch Changes
|
|
102
114
|
|
|
@@ -114,7 +126,7 @@
|
|
|
114
126
|
- 583f1d6: The `mapId` or `map` properties are now optional on individual components.
|
|
115
127
|
You can use the `DefaultMapProvider` to configure an implicit default value.
|
|
116
128
|
|
|
117
|
-
|
|
129
|
+
Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
|
|
118
130
|
|
|
119
131
|
- 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
|
|
120
132
|
- a8b3449: Switch to a new versioning strategy.
|
package/OverviewMap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverviewMap.js","sources":["OverviewMap.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { Box, BoxProps } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport {\n CommonComponentProps,\n mergeChakraProps,\n useCommonComponentProps\n} from \"@open-pioneer/react-utils\";\nimport { OverviewMap as OlOverviewMap } from \"ol/control\";\nimport OlBaseLayer from \"ol/layer/Base\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, useEffect, useMemo, useRef } from \"react\";\n\n/**\n * These are properties supported by the {@link OverviewMap}.\n */\nexport interface OverviewMapProps extends CommonComponentProps, MapModelProps {\n /**\n * The layer shown in the overview map.\n */\n olLayer: OlBaseLayer;\n\n /**\n * The height of the map.\n * This defaults to a reasonable pixel size.\n */\n height?: BoxProps[\"height\"];\n\n /**\n * The width of the map.\n * This defaults to a reasonable pixel size.\n */\n width?: BoxProps[\"width\"];\n}\n\nconst DEFAULT_HEIGHT = \"200px\";\nconst DEFAULT_WIDTH = \"300px\";\n\n/**\n * The `OverviewMap` component can be used in an app to have a better overview of the current location in the map.\n */\nexport const OverviewMap: FC<OverviewMapProps> = (props) => {\n const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;\n const { containerProps } = useCommonComponentProps(\"overview-map\", props);\n const intl = useIntl();\n\n const map = useMapModelValue(props);\n const overviewMapControlElem = useRef(null);\n\n useEffect(() => {\n if (overviewMapControlElem.current && olLayer) {\n const olMap = map.olMap;\n const overviewMapControl: OlOverviewMap = new OlOverviewMap({\n className: \"ol-overviewmap\",\n layers: [olLayer],\n collapsible: false,\n collapsed: false,\n target: overviewMapControlElem.current\n });\n olMap.addControl(overviewMapControl);\n return () => {\n olMap.removeControl(overviewMapControl);\n };\n }\n }, [map, olLayer]);\n\n const mergedBoxProps = useMemo(\n () =>\n mergeChakraProps<BoxProps>(\n {\n height,\n width,\n role: \"region\",\n \"aria-label\": intl.formatMessage({ id: \"ariaLabel\" }),\n \"aria-description\": intl.formatMessage({ id: \"ariaDescription\" }),\n tabIndex: 0\n },\n containerProps\n ),\n [height, width, intl, containerProps]\n );\n\n return <Box ref={overviewMapControlElem} {...mergedBoxProps} />;\n};\n"],"names":["OlOverviewMap"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"OverviewMap.js","sources":["OverviewMap.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Box, BoxProps } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport {\n CommonComponentProps,\n mergeChakraProps,\n useCommonComponentProps\n} from \"@open-pioneer/react-utils\";\nimport { OverviewMap as OlOverviewMap } from \"ol/control\";\nimport OlBaseLayer from \"ol/layer/Base\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, useEffect, useMemo, useRef } from \"react\";\n\n/**\n * These are properties supported by the {@link OverviewMap}.\n */\nexport interface OverviewMapProps extends CommonComponentProps, MapModelProps {\n /**\n * The layer shown in the overview map.\n */\n olLayer: OlBaseLayer;\n\n /**\n * The height of the map.\n * This defaults to a reasonable pixel size.\n */\n height?: BoxProps[\"height\"];\n\n /**\n * The width of the map.\n * This defaults to a reasonable pixel size.\n */\n width?: BoxProps[\"width\"];\n}\n\nconst DEFAULT_HEIGHT = \"200px\";\nconst DEFAULT_WIDTH = \"300px\";\n\n/**\n * The `OverviewMap` component can be used in an app to have a better overview of the current location in the map.\n */\nexport const OverviewMap: FC<OverviewMapProps> = (props) => {\n const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;\n const { containerProps } = useCommonComponentProps(\"overview-map\", props);\n const intl = useIntl();\n\n const map = useMapModelValue(props);\n const overviewMapControlElem = useRef(null);\n\n useEffect(() => {\n if (overviewMapControlElem.current && olLayer) {\n const olMap = map.olMap;\n const overviewMapControl: OlOverviewMap = new OlOverviewMap({\n className: \"ol-overviewmap\",\n layers: [olLayer],\n collapsible: false,\n collapsed: false,\n target: overviewMapControlElem.current\n });\n olMap.addControl(overviewMapControl);\n return () => {\n olMap.removeControl(overviewMapControl);\n };\n }\n }, [map, olLayer]);\n\n const mergedBoxProps = useMemo(\n () =>\n mergeChakraProps<BoxProps>(\n {\n height,\n width,\n role: \"region\",\n \"aria-label\": intl.formatMessage({ id: \"ariaLabel\" }),\n \"aria-description\": intl.formatMessage({ id: \"ariaDescription\" }),\n tabIndex: 0\n },\n containerProps\n ),\n [height,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A,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,aAAa,CAAA;AAAA,QACpD,oBAAoB,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,mBAAmB,CAAA;AAAA,QAChE,QAAA,EAAU;AAAA,OACd;AAAA,MACA;AAAA,KACJ;AAAA,IACJ,CAAC,MAAA,EAAQ,KAAA,EAAO,IAAA,EAAM,cAAc;AAAA,GACxC;AAEA,EAAA,uBAAO,GAAA,CAAC,GAAA,EAAA,EAAI,GAAA,EAAK,sBAAA,EAAyB,GAAG,cAAA,EAAgB,CAAA;AACjE;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/overview-map",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.5.0-dev.20260910103330",
|
|
5
5
|
"description": "This package offers a UI component with which an overview map can be integrated.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,12 +14,16 @@
|
|
|
14
14
|
"directory": "src/packages/overview-map"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@chakra-ui/react": "^3.
|
|
18
|
-
"@open-pioneer/
|
|
19
|
-
"@open-pioneer/
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
17
|
+
"@chakra-ui/react": "^3.37.0",
|
|
18
|
+
"@open-pioneer/map": "1.5.0-dev.20260910103330",
|
|
19
|
+
"@open-pioneer/react-utils": "4.8.0-dev.20260910101405",
|
|
20
|
+
"@open-pioneer/runtime": "4.8.0-dev.20260910101405",
|
|
21
|
+
"ol": "^10.10.0",
|
|
22
|
+
"react": "^19.2.8"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"directory": "dist",
|
|
26
|
+
"linkDirectory": false
|
|
23
27
|
},
|
|
24
28
|
"exports": {
|
|
25
29
|
"./package.json": "./package.json",
|