@open-pioneer/scale-bar 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/scale-bar
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/ScaleBar.js CHANGED
@@ -24,7 +24,7 @@ const ScaleBar = (props) => {
24
24
  };
25
25
  }
26
26
  }, [displayMode, map]);
27
- return /* @__PURE__ */ jsx(Box, { ...containerProps, ref: scaleBarElem, backgroundColor: "whiteAlpha.800" });
27
+ return /* @__PURE__ */ jsx(Box, { ref: scaleBarElem, backgroundColor: "whiteAlpha.800", ...containerProps });
28
28
  };
29
29
 
30
30
  export { ScaleBar };
package/ScaleBar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ScaleBar.js","sources":["ScaleBar.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { Box } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { ScaleLine } from \"ol/control\";\nimport { FC, useEffect, useRef } from \"react\";\n\n/**\n * These are the properties supported by the {@link ScaleBar}.\n */\nexport interface ScaleBarProps extends CommonComponentProps, MapModelProps {\n /**\n * Display the scale either as a line or a bar. Defaults to `\"line\"`.\n */\n displayMode?: \"bar\" | \"line\";\n}\n\nexport const ScaleBar: FC<ScaleBarProps> = (props) => {\n const { displayMode = \"line\" } = props;\n const { containerProps } = useCommonComponentProps(\"scale-bar\", props);\n const map = useMapModelValue(props);\n const scaleBarElem = useRef(null);\n\n useEffect(() => {\n if (scaleBarElem.current) {\n const olMap = map.olMap;\n const scaleLine = new ScaleLine({\n units: \"metric\",\n target: scaleBarElem.current,\n bar: displayMode === \"bar\"\n });\n olMap.addControl(scaleLine);\n return () => {\n olMap.removeControl(scaleLine);\n };\n }\n }, [displayMode, map]);\n\n return <Box {...containerProps} ref={scaleBarElem} backgroundColor=\"whiteAlpha.800\" />;\n};\n"],"names":[],"mappings":";;;;;;;AAkBO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AAClD,EAAA,MAAM,EAAE,WAAA,GAAc,MAAA,EAAO,GAAI,KAAA;AACjC,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,uBAAA,CAAwB,aAAa,KAAK,CAAA;AACrE,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,YAAA,GAAe,OAAO,IAAI,CAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,IAAI,aAAa,OAAA,EAAS;AACtB,MAAA,MAAM,QAAQ,GAAA,CAAI,KAAA;AAClB,MAAA,MAAM,SAAA,GAAY,IAAI,SAAA,CAAU;AAAA,QAC5B,KAAA,EAAO,QAAA;AAAA,QACP,QAAQ,YAAA,CAAa,OAAA;AAAA,QACrB,KAAK,WAAA,KAAgB;AAAA,OACxB,CAAA;AACD,MAAA,KAAA,CAAM,WAAW,SAAS,CAAA;AAC1B,MAAA,OAAO,MAAM;AACT,QAAA,KAAA,CAAM,cAAc,SAAS,CAAA;AAAA,MACjC,CAAA;AAAA,IACJ;AAAA,EACJ,CAAA,EAAG,CAAC,WAAA,EAAa,GAAG,CAAC,CAAA;AAErB,EAAA,2BAAQ,GAAA,EAAA,EAAK,GAAG,gBAAgB,GAAA,EAAK,YAAA,EAAc,iBAAgB,gBAAA,EAAiB,CAAA;AACxF;;;;"}
1
+ {"version":3,"file":"ScaleBar.js","sources":["ScaleBar.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { Box } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { ScaleLine } from \"ol/control\";\nimport { FC, useEffect, useRef } from \"react\";\n\n/**\n * These are the properties supported by the {@link ScaleBar}.\n */\nexport interface ScaleBarProps extends CommonComponentProps, MapModelProps {\n /**\n * Display the scale either as a line or a bar. Defaults to `\"line\"`.\n */\n displayMode?: \"bar\" | \"line\";\n}\n\nexport const ScaleBar: FC<ScaleBarProps> = (props) => {\n const { displayMode = \"line\" } = props;\n const { containerProps } = useCommonComponentProps(\"scale-bar\", props);\n const map = useMapModelValue(props);\n const scaleBarElem = useRef(null);\n\n useEffect(() => {\n if (scaleBarElem.current) {\n const olMap = map.olMap;\n const scaleLine = new ScaleLine({\n units: \"metric\",\n target: scaleBarElem.current,\n bar: displayMode === \"bar\"\n });\n olMap.addControl(scaleLine);\n return () => {\n olMap.removeControl(scaleLine);\n };\n }\n }, [displayMode, map]);\n\n return <Box ref={scaleBarElem} backgroundColor=\"whiteAlpha.800\" {...containerProps} />;\n};\n"],"names":[],"mappings":";;;;;;;AAkBO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AAClD,EAAA,MAAM,EAAE,WAAA,GAAc,MAAA,EAAO,GAAI,KAAA;AACjC,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,uBAAA,CAAwB,aAAa,KAAK,CAAA;AACrE,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,YAAA,GAAe,OAAO,IAAI,CAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACZ,IAAA,IAAI,aAAa,OAAA,EAAS;AACtB,MAAA,MAAM,QAAQ,GAAA,CAAI,KAAA;AAClB,MAAA,MAAM,SAAA,GAAY,IAAI,SAAA,CAAU;AAAA,QAC5B,KAAA,EAAO,QAAA;AAAA,QACP,QAAQ,YAAA,CAAa,OAAA;AAAA,QACrB,KAAK,WAAA,KAAgB;AAAA,OACxB,CAAA;AACD,MAAA,KAAA,CAAM,WAAW,SAAS,CAAA;AAC1B,MAAA,OAAO,MAAM;AACT,QAAA,KAAA,CAAM,cAAc,SAAS,CAAA;AAAA,MACjC,CAAA;AAAA,IACJ;AAAA,EACJ,CAAA,EAAG,CAAC,WAAA,EAAa,GAAG,CAAC,CAAA;AAErB,EAAA,2BAAQ,GAAA,EAAA,EAAI,GAAA,EAAK,cAAc,eAAA,EAAgB,gBAAA,EAAkB,GAAG,cAAA,EAAgB,CAAA;AACxF;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/scale-bar",
4
- "version": "1.3.0-dev-map-loading.20260202144650",
4
+ "version": "1.3.0-dev-css-prop.20260210130215",
5
5
  "description": "This package provides a UI component to show the scale as a line or bar to the user.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -14,12 +14,12 @@
14
14
  "directory": "src/packages/scale-bar"
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",