@open-pioneer/overview-map 0.11.0 → 0.12.0-dev.20250905090001

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,5 +1,23 @@
1
1
  # @open-pioneer/overview-map
2
2
 
3
+ ## 0.12.0-dev.20250905090001
4
+
5
+ ### Patch Changes
6
+
7
+ - 10d2fe7: Update dependencies
8
+ - da6a410: Update dependencies
9
+ - Updated dependencies [29a10df]
10
+ - Updated dependencies [10d2fe7]
11
+ - Updated dependencies [2702df4]
12
+ - Updated dependencies [12561fe]
13
+ - Updated dependencies [5df900f]
14
+ - Updated dependencies [8986b3b]
15
+ - Updated dependencies [aeb9000]
16
+ - Updated dependencies [5df900f]
17
+ - Updated dependencies [f1f69f2]
18
+ - Updated dependencies [da6a410]
19
+ - @open-pioneer/map@0.12.0-dev.20250905090001
20
+
3
21
  ## 0.11.0
4
22
 
5
23
  ### Minor Changes
@@ -72,7 +90,6 @@
72
90
  ### Minor Changes
73
91
 
74
92
  - 2fa8020: Update trails core package dependencies.
75
-
76
93
  - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
77
94
  - Removes any obsolete references to `@chakra-ui/system`.
78
95
  This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
package/OverviewMap.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Box } from '@chakra-ui/react';
3
- import { useMapModel } from '@open-pioneer/map';
3
+ import { useMapModelValue } from '@open-pioneer/map';
4
4
  import { useCommonComponentProps } from '@open-pioneer/react-utils';
5
5
  import { OverviewMap as OverviewMap$1 } from 'ol/control.js';
6
6
  import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
@@ -12,10 +12,10 @@ const OverviewMap = (props) => {
12
12
  const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;
13
13
  const { containerProps } = useCommonComponentProps("overview-map", props);
14
14
  const intl = useIntl();
15
- const { map } = useMapModel(props);
15
+ const map = useMapModelValue(props);
16
16
  const overviewMapControlElem = useRef(null);
17
17
  useEffect(() => {
18
- if (overviewMapControlElem.current && map && olLayer) {
18
+ if (overviewMapControlElem.current && olLayer) {
19
19
  const olMap = map.olMap;
20
20
  const overviewMapControl = new OverviewMap$1({
21
21
  className: "ol-overviewmap",
@@ -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, useMapModel } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } 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, 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 } = useMapModel(props);\n const overviewMapControlElem = useRef(null);\n\n useEffect(() => {\n if (overviewMapControlElem.current && map && 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 return (\n // aria-description is still in draft state\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <Box\n height={height}\n width={width}\n ref={overviewMapControlElem}\n {...containerProps}\n tabIndex={0}\n role=\"region\"\n aria-label={intl.formatMessage({ id: \"ariaLabel\" })}\n aria-description={intl.formatMessage({ id: \"ariaDescription\" })}\n />\n );\n};\n"],"names":["OlOverviewMap"],"mappings":";;;;;;;;AAgCA,MAAM,cAAiB,GAAA,OAAA;AACvB,MAAM,aAAgB,GAAA,OAAA;AAKT,MAAA,WAAA,GAAoC,CAAC,KAAU,KAAA;AACxD,EAAA,MAAM,EAAE,OAAS,EAAA,MAAA,GAAS,cAAgB,EAAA,KAAA,GAAQ,eAAkB,GAAA,KAAA;AACpE,EAAA,MAAM,EAAE,cAAA,EAAmB,GAAA,uBAAA,CAAwB,gBAAgB,KAAK,CAAA;AACxE,EAAA,MAAM,OAAO,OAAQ,EAAA;AAErB,EAAA,MAAM,EAAE,GAAA,EAAQ,GAAA,WAAA,CAAY,KAAK,CAAA;AACjC,EAAM,MAAA,sBAAA,GAAyB,OAAO,IAAI,CAAA;AAE1C,EAAA,SAAA,CAAU,MAAM;AACZ,IAAI,IAAA,sBAAA,CAAuB,OAAW,IAAA,GAAA,IAAO,OAAS,EAAA;AAClD,MAAA,MAAM,QAAQ,GAAI,CAAA,KAAA;AAClB,MAAM,MAAA,kBAAA,GAAoC,IAAIA,aAAc,CAAA;AAAA,QACxD,SAAW,EAAA,gBAAA;AAAA,QACX,MAAA,EAAQ,CAAC,OAAO,CAAA;AAAA,QAChB,WAAa,EAAA,KAAA;AAAA,QACb,SAAW,EAAA,KAAA;AAAA,QACX,QAAQ,sBAAuB,CAAA;AAAA,OAClC,CAAA;AACD,MAAA,KAAA,CAAM,WAAW,kBAAkB,CAAA;AACnC,MAAA,OAAO,MAAM;AACT,QAAA,KAAA,CAAM,cAAc,kBAAkB,CAAA;AAAA,OAC1C;AAAA;AACJ,GACD,EAAA,CAAC,GAAK,EAAA,OAAO,CAAC,CAAA;AAEjB,EAAA;AAAA;AAAA;AAAA,oBAGI,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACG,MAAA;AAAA,QACA,KAAA;AAAA,QACA,GAAK,EAAA,sBAAA;AAAA,QACJ,GAAG,cAAA;AAAA,QACJ,QAAU,EAAA,CAAA;AAAA,QACV,IAAK,EAAA,QAAA;AAAA,QACL,cAAY,IAAK,CAAA,aAAA,CAAc,EAAE,EAAA,EAAI,aAAa,CAAA;AAAA,QAClD,oBAAkB,IAAK,CAAA,aAAA,CAAc,EAAE,EAAA,EAAI,mBAAmB;AAAA;AAAA;AAClE;AAER;;;;"}
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 { CommonComponentProps, useCommonComponentProps } 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, 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 return (\n // aria-description is still in draft state\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <Box\n height={height}\n width={width}\n ref={overviewMapControlElem}\n {...containerProps}\n tabIndex={0}\n role=\"region\"\n aria-label={intl.formatMessage({ id: \"ariaLabel\" })}\n aria-description={intl.formatMessage({ id: \"ariaDescription\" })}\n />\n );\n};\n"],"names":["OlOverviewMap"],"mappings":";;;;;;;;AAgCA,MAAM,cAAA,GAAiB,OAAA;AACvB,MAAM,aAAA,GAAgB,OAAA;AAKf,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM,EAAE,OAAA,EAAS,MAAA,GAAS,cAAA,EAAgB,KAAA,GAAQ,eAAc,GAAI,KAAA;AACpE,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,uBAAA,CAAwB,gBAAgB,KAAK,CAAA;AACxE,EAAA,MAAM,OAAO,OAAA,EAAQ;AAErB,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,sBAAA,GAAyB,OAAO,IAAI,CAAA;AAE1C,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,IAAI,sBAAA,CAAuB,WAAW,OAAA,EAAS;AAC3C,MAAA,MAAM,QAAQ,GAAA,CAAI,KAAA;AAClB,MAAA,MAAM,kBAAA,GAAoC,IAAIA,aAAA,CAAc;AAAA,QACxD,SAAA,EAAW,gBAAA;AAAA,QACX,MAAA,EAAQ,CAAC,OAAO,CAAA;AAAA,QAChB,WAAA,EAAa,KAAA;AAAA,QACb,SAAA,EAAW,KAAA;AAAA,QACX,QAAQ,sBAAA,CAAuB;AAAA,OAClC,CAAA;AACD,MAAA,KAAA,CAAM,WAAW,kBAAkB,CAAA;AACnC,MAAA,OAAO,MAAM;AACT,QAAA,KAAA,CAAM,cAAc,kBAAkB,CAAA;AAAA,MAC1C,CAAA;AAAA,IACJ;AAAA,EACJ,CAAA,EAAG,CAAC,GAAA,EAAK,OAAO,CAAC,CAAA;AAEjB,EAAA;AAAA;AAAA;AAAA,oBAGI,GAAA;AAAA,MAAC,GAAA;AAAA,MAAA;AAAA,QACG,MAAA;AAAA,QACA,KAAA;AAAA,QACA,GAAA,EAAK,sBAAA;AAAA,QACJ,GAAG,cAAA;AAAA,QACJ,QAAA,EAAU,CAAA;AAAA,QACV,IAAA,EAAK,QAAA;AAAA,QACL,cAAY,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,aAAa,CAAA;AAAA,QAClD,oBAAkB,IAAA,CAAK,aAAA,CAAc,EAAE,EAAA,EAAI,mBAAmB;AAAA;AAAA;AAClE;AAER;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/overview-map",
4
- "version": "0.11.0",
4
+ "version": "0.12.0-dev.20250905090001",
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,12 @@
14
14
  "directory": "src/packages/overview-map"
15
15
  },
16
16
  "dependencies": {
17
- "@chakra-ui/react": "^3.19.2",
17
+ "@chakra-ui/react": "^3.24.2",
18
18
  "@open-pioneer/react-utils": "^4.0.0",
19
19
  "@open-pioneer/runtime": "^4.0.0",
20
- "ol": "^10.5.0",
21
- "react": "^19.1.0",
22
- "@open-pioneer/map": "^0.11.0"
20
+ "ol": "^10.6.1",
21
+ "react": "^19.1.1",
22
+ "@open-pioneer/map": "0.12.0-dev.20250905090001"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",