@open-pioneer/scale-bar 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 CHANGED
@@ -1,10 +1,25 @@
1
1
  # @open-pioneer/scale-bar
2
2
 
3
- ## 1.4.0-dev.20260727093741
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
19
+
20
+ ### Patch Changes
21
+
22
+ - c16a401: Migrated from eslint to oxlint and from prettier to oxfmt.
8
23
 
9
24
  ## 1.3.0
10
25
 
@@ -66,17 +81,17 @@
66
81
  - 193068a: Deprecate the `mapId` property on React components.
67
82
  Use the `MapModel` directly instead to pass a reference to the map.
68
83
 
69
- Example:
84
+ Example:
70
85
 
71
- ```tsx
72
- // Default map for entire component tree
73
- <DefaultMapProvider map={mapModel}>
74
- <Toc />
75
- </DefaultMapProvider>
86
+ ```tsx
87
+ // Default map for entire component tree
88
+ <DefaultMapProvider map={mapModel}>
89
+ <Toc />
90
+ </DefaultMapProvider>
76
91
 
77
- // Map for specific component
78
- <Toc map={mapModel} />
79
- ```
92
+ // Map for specific component
93
+ <Toc map={mapModel} />
94
+ ```
80
95
 
81
96
  ### Patch Changes
82
97
 
@@ -95,9 +110,9 @@
95
110
  ### Minor Changes
96
111
 
97
112
  - 2fa8020: Update trails core package dependencies.
98
- - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
99
- - Removes any obsolete references to `@chakra-ui/system`.
100
- This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
113
+ - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
114
+ - Removes any obsolete references to `@chakra-ui/system`.
115
+ This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
101
116
 
102
117
  ### Patch Changes
103
118
 
@@ -115,7 +130,7 @@
115
130
  - 583f1d6: The `mapId` or `map` properties are now optional on individual components.
116
131
  You can use the `DefaultMapProvider` to configure an implicit default value.
117
132
 
118
- Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
133
+ Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
119
134
 
120
135
  - 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
121
136
  - a8b3449: Switch to a new versioning strategy.
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 ref={scaleBarElem} backgroundColor=\"bg/80\" {...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,OAAA,EAAS,GAAG,cAAA,EAAgB,CAAA;AAC/E;;;;"}
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\n\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=\"bg/80\" {...containerProps} />;\n};\n"],"names":[],"mappings":";;;;;;;AAmBO,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,OAAA,EAAS,GAAG,cAAA,EAAgB,CAAA;AAC/E;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/scale-bar",
4
- "version": "1.4.0-dev.20260727093741",
4
+ "version": "1.5.0-dev.20260910103330",
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,16 @@
14
14
  "directory": "src/packages/scale-bar"
15
15
  },
16
16
  "dependencies": {
17
- "@chakra-ui/react": "^3.36.1",
18
- "@open-pioneer/react-utils": "4.7.0-dev.20260727091735",
19
- "@open-pioneer/runtime": "4.7.0-dev.20260727091735",
20
- "ol": "^10.9.0",
21
- "react": "^19.2.8",
22
- "@open-pioneer/map": "1.4.0-dev.20260727093741"
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",