@open-pioneer/overview-map 1.3.0-dev-map-loading.20260202144650 → 1.3.0-dev-css-prop.20260210130215

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,12 +1,20 @@
1
1
  # @open-pioneer/overview-map
2
2
 
3
- ## 1.3.0-dev-map-loading.20260202144650
3
+ ## 1.3.0-dev-css-prop.20260210130215
4
+
5
+ ### Minor Changes
6
+
7
+ - 911fda5: Support for new common container props (role, aria-_, data-_ and css)
8
+ - d54ccfd: Update to Chakra UI 3.32.0
4
9
 
5
10
  ### Patch Changes
6
11
 
7
- - Updated dependencies [f5030cc]
8
- - Updated dependencies [f5030cc]
9
- - @open-pioneer/map@1.3.0-dev-map-loading.20260202144650
12
+ - Updated dependencies [911fda5]
13
+ - Updated dependencies [2ceb1ca]
14
+ - Updated dependencies [d54ccfd]
15
+ - Updated dependencies [4bcc8ce]
16
+ - Updated dependencies [2ceb1ca]
17
+ - @open-pioneer/map@1.3.0-dev-css-prop.20260210130215
10
18
 
11
19
  ## 1.2.0
12
20
 
package/OverviewMap.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Box } from '@chakra-ui/react';
3
3
  import { useMapModelValue } from '@open-pioneer/map';
4
- import { useCommonComponentProps } from '@open-pioneer/react-utils';
4
+ import { useCommonComponentProps, mergeChakraProps } from '@open-pioneer/react-utils';
5
5
  import { OverviewMap as OverviewMap$1 } from 'ol/control.js';
6
6
  import { useIntl } from './_virtual/hooks.js';
7
- import { useRef, useEffect } from 'react';
7
+ import { useRef, useEffect, useMemo } from 'react';
8
8
 
9
9
  const DEFAULT_HEIGHT = "200px";
10
10
  const DEFAULT_WIDTH = "300px";
@@ -30,23 +30,21 @@ const OverviewMap = (props) => {
30
30
  };
31
31
  }
32
32
  }, [map, olLayer]);
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,
33
+ const mergedBoxProps = useMemo(
34
+ () => mergeChakraProps(
38
35
  {
39
36
  height,
40
37
  width,
41
- ref: overviewMapControlElem,
42
- ...containerProps,
43
- tabIndex: 0,
44
38
  role: "region",
45
39
  "aria-label": intl.formatMessage({ id: "ariaLabel" }),
46
- "aria-description": intl.formatMessage({ id: "ariaDescription" })
47
- }
48
- )
40
+ "aria-description": intl.formatMessage({ id: "ariaDescription" }),
41
+ tabIndex: 0
42
+ },
43
+ containerProps
44
+ ),
45
+ [height, width, intl, containerProps]
49
46
  );
47
+ return /* @__PURE__ */ jsx(Box, { ref: overviewMapControlElem, ...mergedBoxProps });
50
48
  };
51
49
 
52
50
  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, 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;;;;"}
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":";;;;;;;;AAoCA,MAAM,cAAA,GAAiB,OAAA;AACvB,MAAM,aAAA,GAAgB,OAAA;AAKf,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM,EAAE,OAAA,EAAS,MAAA,GAAS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,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.3.0-dev-map-loading.20260202144650",
4
+ "version": "1.3.0-dev-css-prop.20260210130215",
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.31.0",
18
- "@open-pioneer/react-utils": "^4.4.0",
19
- "@open-pioneer/runtime": "^4.4.0",
17
+ "@chakra-ui/react": "^3.32.0",
18
+ "@open-pioneer/react-utils": "4.5.0-dev-css-prop.20260210120105",
19
+ "@open-pioneer/runtime": "4.5.0-dev-css-prop.20260210120105",
20
20
  "ol": "^10.7.0",
21
- "react": "^19.2.3",
22
- "@open-pioneer/map": "1.3.0-dev-map-loading.20260202144650"
21
+ "react": "^19.2.4",
22
+ "@open-pioneer/map": "1.3.0-dev-css-prop.20260210130215"
23
23
  },
24
24
  "exports": {
25
25
  "./package.json": "./package.json",