@open-pioneer/overview-map 0.11.0-dev.20250515143825 → 0.11.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/CHANGELOG.md CHANGED
@@ -1,16 +1,20 @@
1
1
  # @open-pioneer/overview-map
2
2
 
3
- ## 0.11.0-dev.20250515143825
3
+ ## 0.11.0
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - 66179bc: Update to core-packages v4.0.0
7
8
  - 738390e: Update to Chakra v3
8
9
 
9
10
  ### Patch Changes
10
11
 
11
12
  - Updated dependencies [738390e]
13
+ - Updated dependencies [66179bc]
14
+ - Updated dependencies [0a8ff71]
15
+ - Updated dependencies [acd5115]
12
16
  - Updated dependencies [738390e]
13
- - @open-pioneer/map@0.11.0-dev.20250515143825
17
+ - @open-pioneer/map@0.11.0
14
18
 
15
19
  ## 0.10.0
16
20
 
package/OverviewMap.js CHANGED
@@ -3,6 +3,7 @@ import { Box } from '@chakra-ui/react';
3
3
  import { useMapModel } 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
+ import { useIntl } from './_virtual/_virtual-pioneer-module_react-hooks.js';
6
7
  import { useRef, useEffect } from 'react';
7
8
 
8
9
  const DEFAULT_HEIGHT = "200px";
@@ -10,8 +11,9 @@ const DEFAULT_WIDTH = "300px";
10
11
  const OverviewMap = (props) => {
11
12
  const { olLayer, height = DEFAULT_HEIGHT, width = DEFAULT_WIDTH } = props;
12
13
  const { containerProps } = useCommonComponentProps("overview-map", props);
13
- const overviewMapControlElem = useRef(null);
14
+ const intl = useIntl();
14
15
  const { map } = useMapModel(props);
16
+ const overviewMapControlElem = useRef(null);
15
17
  useEffect(() => {
16
18
  if (overviewMapControlElem.current && map && olLayer) {
17
19
  const olMap = map.olMap;
@@ -28,7 +30,23 @@ const OverviewMap = (props) => {
28
30
  };
29
31
  }
30
32
  }, [map, olLayer]);
31
- return /* @__PURE__ */ jsx(Box, { height, width, ref: overviewMapControlElem, ...containerProps });
33
+ return (
34
+ // aria-description is still in draft state
35
+ // eslint-disable-next-line jsx-a11y/role-supports-aria-props
36
+ /* @__PURE__ */ jsx(
37
+ Box,
38
+ {
39
+ height,
40
+ width,
41
+ ref: overviewMapControlElem,
42
+ ...containerProps,
43
+ tabIndex: 0,
44
+ role: "region",
45
+ "aria-label": intl.formatMessage({ id: "ariaLabel" }),
46
+ "aria-description": intl.formatMessage({ id: "ariaDescription" })
47
+ }
48
+ )
49
+ );
32
50
  };
33
51
 
34
52
  export { 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 { 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 overviewMapControlElem = useRef(null);\n const { map } = useMapModel(props);\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 <Box height={height} width={width} ref={overviewMapControlElem} {...containerProps}></Box>\n );\n};\n"],"names":["OlOverviewMap"],"mappings":";;;;;;;AA+BA,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,EAAM,MAAA,sBAAA,GAAyB,OAAO,IAAI,CAAA;AAC1C,EAAA,MAAM,EAAE,GAAA,EAAQ,GAAA,WAAA,CAAY,KAAK,CAAA;AAEjC,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,2BACK,GAAI,EAAA,EAAA,MAAA,EAAgB,OAAc,GAAK,EAAA,sBAAA,EAAyB,GAAG,cAAgB,EAAA,CAAA;AAE5F;;;;"}
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;;;;"}
@@ -0,0 +1,7 @@
1
+ import { useIntlInternal } from '@open-pioneer/runtime/react-integration';
2
+
3
+ const PACKAGE_NAME = "@open-pioneer/overview-map";
4
+ const useIntl = /*@__PURE__*/ useIntlInternal.bind(undefined, PACKAGE_NAME);
5
+
6
+ export { useIntl };
7
+ //# sourceMappingURL=_virtual-pioneer-module_react-hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_virtual-pioneer-module_react-hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
package/i18n/de.yaml ADDED
@@ -0,0 +1,3 @@
1
+ messages:
2
+ ariaLabel: Übersichtskarte
3
+ ariaDescription: Diese Karte zeigt einen Überblick über den aktuellen Kartenausschnitt.
package/i18n/en.yaml ADDED
@@ -0,0 +1,3 @@
1
+ messages:
2
+ ariaLabel: Overview map
3
+ ariaDescription: This map shows an overview of the current map section.
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-dev.20250515143825",
4
+ "version": "0.11.0",
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.17.0",
18
- "@open-pioneer/react-utils": "4.0.0-dev.20250512105016",
19
- "@open-pioneer/runtime": "4.0.0-dev.20250512105016",
17
+ "@chakra-ui/react": "^3.19.2",
18
+ "@open-pioneer/react-utils": "^4.0.0",
19
+ "@open-pioneer/runtime": "^4.0.0",
20
20
  "ol": "^10.5.0",
21
21
  "react": "^19.1.0",
22
- "@open-pioneer/map": "0.11.0-dev.20250515143825"
22
+ "@open-pioneer/map": "^0.11.0"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",
@@ -33,7 +33,10 @@
33
33
  "styles": "./overview-map.css",
34
34
  "services": [],
35
35
  "i18n": {
36
- "languages": []
36
+ "languages": [
37
+ "de",
38
+ "en"
39
+ ]
37
40
  },
38
41
  "ui": {
39
42
  "references": []