@open-pioneer/scale-bar 0.9.0-dev.20250220091855 → 0.9.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 +108 -99
- package/ScaleBar.js.map +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,186 +1,195 @@
|
|
|
1
1
|
# @open-pioneer/scale-bar
|
|
2
2
|
|
|
3
|
-
## 0.9.0
|
|
3
|
+
## 0.9.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- cb94c75: update dependencies
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
+
- Updated dependencies [e7fdc5d]
|
|
12
|
+
- Updated dependencies [cb94c75]
|
|
13
|
+
- Updated dependencies [37cd707]
|
|
14
|
+
- Updated dependencies [32ed2cd]
|
|
15
|
+
- Updated dependencies [f327eec]
|
|
16
|
+
- Updated dependencies [f327eec]
|
|
17
|
+
- Updated dependencies [209eb8e]
|
|
18
|
+
- Updated dependencies [d72e42c]
|
|
19
|
+
- @open-pioneer/map@0.9.0
|
|
11
20
|
|
|
12
21
|
## 0.8.0
|
|
13
22
|
|
|
14
23
|
### Minor Changes
|
|
15
24
|
|
|
16
|
-
-
|
|
25
|
+
- 2fa8020: Update trails core package dependencies.
|
|
17
26
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
|
|
27
|
+
- Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
|
|
28
|
+
- Removes any obsolete references to `@chakra-ui/system`.
|
|
29
|
+
This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
|
|
21
30
|
|
|
22
31
|
### Patch Changes
|
|
23
32
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
33
|
+
- 49f0207: Update trails core packages to version 2.4.0
|
|
34
|
+
- Updated dependencies [b717121]
|
|
35
|
+
- Updated dependencies [e7978a8]
|
|
36
|
+
- Updated dependencies [7a5f1e1]
|
|
37
|
+
- Updated dependencies [7ae9f90]
|
|
38
|
+
- Updated dependencies [d8337a6]
|
|
39
|
+
- Updated dependencies [49f0207]
|
|
40
|
+
- Updated dependencies [b2127df]
|
|
41
|
+
- Updated dependencies [2fa8020]
|
|
42
|
+
- Updated dependencies [7ae9f90]
|
|
43
|
+
- Updated dependencies [d8337a6]
|
|
44
|
+
- @open-pioneer/map@0.8.0
|
|
36
45
|
|
|
37
46
|
## 0.7.0
|
|
38
47
|
|
|
39
48
|
### Minor Changes
|
|
40
49
|
|
|
41
|
-
-
|
|
50
|
+
- 310800c: Switch from `peerDependencies` to normal `dependencies`. Peer dependencies have some usability problems when used at scale.
|
|
42
51
|
|
|
43
52
|
### Patch Changes
|
|
44
53
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
|
|
54
|
+
- 310800c: Update core packages version.
|
|
55
|
+
- 583f1d6: The `mapId` or `map` properties are now optional on individual components.
|
|
56
|
+
You can use the `DefaultMapProvider` to configure an implicit default value.
|
|
48
57
|
|
|
49
58
|
Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
|
|
50
59
|
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
60
|
+
- 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
|
|
61
|
+
- a8b3449: Switch to a new versioning strategy.
|
|
62
|
+
From now on, packages released by this repository share a common version number.
|
|
63
|
+
- 900eb11: Update dependencies.
|
|
64
|
+
- Updated dependencies [310800c]
|
|
65
|
+
- Updated dependencies [2502050]
|
|
66
|
+
- Updated dependencies [583f1d6]
|
|
67
|
+
- Updated dependencies [583f1d6]
|
|
68
|
+
- Updated dependencies [397d617]
|
|
69
|
+
- Updated dependencies [a8b3449]
|
|
70
|
+
- Updated dependencies [310800c]
|
|
71
|
+
- Updated dependencies [900eb11]
|
|
72
|
+
- Updated dependencies [583f1d6]
|
|
73
|
+
- Updated dependencies [397d617]
|
|
74
|
+
- @open-pioneer/map@0.7.0
|
|
66
75
|
|
|
67
76
|
## 0.4.4
|
|
68
77
|
|
|
69
78
|
### Patch Changes
|
|
70
79
|
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
80
|
+
- b152428: Update trails dependencies
|
|
81
|
+
- Updated dependencies [b152428]
|
|
82
|
+
- Updated dependencies [291ccb6]
|
|
83
|
+
- @open-pioneer/map@0.6.1
|
|
75
84
|
|
|
76
85
|
## 0.4.3
|
|
77
86
|
|
|
78
87
|
### Patch Changes
|
|
79
88
|
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
89
|
+
- 28e092a: Update dependencies
|
|
90
|
+
- Updated dependencies [28e092a]
|
|
91
|
+
- Updated dependencies [0d51d2f]
|
|
92
|
+
- Updated dependencies [76f8863]
|
|
93
|
+
- @open-pioneer/map@0.6.0
|
|
85
94
|
|
|
86
95
|
## 0.4.2
|
|
87
96
|
|
|
88
97
|
### Patch Changes
|
|
89
98
|
|
|
90
|
-
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
99
|
+
- 4140646: Update trails dependencies
|
|
100
|
+
- 4140646: Update to react 18.3.1
|
|
101
|
+
- 81bc7da: Update trails dependencies
|
|
102
|
+
- 2c092dc: Update dependencies
|
|
103
|
+
- Updated dependencies [4140646]
|
|
104
|
+
- Updated dependencies [4140646]
|
|
105
|
+
- Updated dependencies [b5bb7a1]
|
|
106
|
+
- Updated dependencies [81bc7da]
|
|
107
|
+
- Updated dependencies [2c092dc]
|
|
108
|
+
- Updated dependencies [4140646]
|
|
109
|
+
- @open-pioneer/react-utils@0.2.3
|
|
110
|
+
- @open-pioneer/map@0.5.1
|
|
102
111
|
|
|
103
112
|
## 0.4.1
|
|
104
113
|
|
|
105
114
|
### Patch Changes
|
|
106
115
|
|
|
107
|
-
-
|
|
108
|
-
-
|
|
116
|
+
- Updated dependencies [520a97b]
|
|
117
|
+
- @open-pioneer/map@0.5.0
|
|
109
118
|
|
|
110
119
|
## 0.4.0
|
|
111
120
|
|
|
112
121
|
### Minor Changes
|
|
113
122
|
|
|
114
|
-
-
|
|
123
|
+
- 9334e81: Update to OpenLayers 9
|
|
115
124
|
|
|
116
125
|
### Patch Changes
|
|
117
126
|
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
127
|
+
- 1a8ad89: Update package.json metadata
|
|
128
|
+
- 6162979: Update versions of core packages
|
|
129
|
+
- Updated dependencies [1a8ad89]
|
|
130
|
+
- Updated dependencies [a11bf72]
|
|
131
|
+
- Updated dependencies [fc6bf82]
|
|
132
|
+
- Updated dependencies [a0d8882]
|
|
133
|
+
- Updated dependencies [6162979]
|
|
134
|
+
- Updated dependencies [9334e81]
|
|
135
|
+
- Updated dependencies [ac7fdd1]
|
|
136
|
+
- Updated dependencies [13ea342]
|
|
137
|
+
- @open-pioneer/react-utils@0.2.2
|
|
138
|
+
- @open-pioneer/map@0.4.0
|
|
130
139
|
|
|
131
140
|
## 0.3.1
|
|
132
141
|
|
|
133
142
|
### Patch Changes
|
|
134
143
|
|
|
135
|
-
-
|
|
136
|
-
-
|
|
144
|
+
- Updated dependencies [611ddb9]
|
|
145
|
+
- @open-pioneer/map@0.3.1
|
|
137
146
|
|
|
138
147
|
## 0.3.0
|
|
139
148
|
|
|
140
149
|
### Minor Changes
|
|
141
150
|
|
|
142
|
-
-
|
|
151
|
+
- ee7c2d4: Update runtime version.
|
|
143
152
|
|
|
144
153
|
### Patch Changes
|
|
145
154
|
|
|
146
|
-
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
155
|
+
- Updated dependencies [ee7c2d4]
|
|
156
|
+
- Updated dependencies [a582e5e]
|
|
157
|
+
- Updated dependencies [0456500]
|
|
158
|
+
- Updated dependencies [762e7b9]
|
|
159
|
+
- @open-pioneer/map@0.3.0
|
|
160
|
+
- @open-pioneer/react-utils@0.2.1
|
|
152
161
|
|
|
153
162
|
## 0.2.0
|
|
154
163
|
|
|
155
164
|
### Minor Changes
|
|
156
165
|
|
|
157
|
-
-
|
|
166
|
+
- 70349a8: Update to new core packages major versions
|
|
158
167
|
|
|
159
168
|
### Patch Changes
|
|
160
169
|
|
|
161
|
-
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
170
|
+
- Updated dependencies [70349a8]
|
|
171
|
+
- @open-pioneer/map@0.2.0
|
|
172
|
+
- @open-pioneer/react-utils@0.2.0
|
|
164
173
|
|
|
165
174
|
## 0.1.1
|
|
166
175
|
|
|
167
176
|
### Patch Changes
|
|
168
177
|
|
|
169
|
-
-
|
|
170
|
-
-
|
|
171
|
-
-
|
|
172
|
-
-
|
|
173
|
-
-
|
|
178
|
+
- Updated dependencies [08bffbc]
|
|
179
|
+
- Updated dependencies [a58546b]
|
|
180
|
+
- Updated dependencies [a58546b]
|
|
181
|
+
- Updated dependencies [0c4ce04]
|
|
182
|
+
- @open-pioneer/map@0.1.1
|
|
174
183
|
|
|
175
184
|
## 0.1.0
|
|
176
185
|
|
|
177
186
|
### Minor Changes
|
|
178
187
|
|
|
179
|
-
-
|
|
188
|
+
- bc54925: Initial release.
|
|
180
189
|
|
|
181
190
|
### Patch Changes
|
|
182
191
|
|
|
183
|
-
-
|
|
184
|
-
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
192
|
+
- Updated dependencies [bb2f27a]
|
|
193
|
+
- Updated dependencies [182da1c]
|
|
194
|
+
- @open-pioneer/map@0.1.0
|
|
195
|
+
- @open-pioneer/react-utils@0.1.0
|
package/ScaleBar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScaleBar.js","sources":["ScaleBar.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { MapModelProps, useMapModel } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { FC, useEffect, useRef } from \"react\";\nimport { ScaleLine } from \"ol/control\";\nimport { Box } from \"@open-pioneer/chakra-integration\";\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 } = useMapModel(props);\n const scaleBarElem = useRef(null);\n\n useEffect(() => {\n if (scaleBarElem.current && map) {\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}></Box>;\n};\n"],"names":[],"mappings":";;;;;;;AAkBa,MAAA,QAAA,GAA8B,CAAC,KAAU,KAAA;AAClD,EAAM,MAAA,EAAE,WAAc,GAAA,MAAA,EAAW,GAAA,KAAA
|
|
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 { MapModelProps, useMapModel } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { FC, useEffect, useRef } from \"react\";\nimport { ScaleLine } from \"ol/control\";\nimport { Box } from \"@open-pioneer/chakra-integration\";\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 } = useMapModel(props);\n const scaleBarElem = useRef(null);\n\n useEffect(() => {\n if (scaleBarElem.current && map) {\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}></Box>;\n};\n"],"names":[],"mappings":";;;;;;;AAkBa,MAAA,QAAA,GAA8B,CAAC,KAAU,KAAA;AAClD,EAAM,MAAA,EAAE,WAAc,GAAA,MAAA,EAAW,GAAA,KAAA;AACjC,EAAA,MAAM,EAAE,cAAA,EAAmB,GAAA,uBAAA,CAAwB,aAAa,KAAK,CAAA;AACrE,EAAA,MAAM,EAAE,GAAA,EAAQ,GAAA,WAAA,CAAY,KAAK,CAAA;AACjC,EAAM,MAAA,YAAA,GAAe,OAAO,IAAI,CAAA;AAEhC,EAAA,SAAA,CAAU,MAAM;AACZ,IAAI,IAAA,YAAA,CAAa,WAAW,GAAK,EAAA;AAC7B,MAAA,MAAM,QAAQ,GAAI,CAAA,KAAA;AAClB,MAAM,MAAA,SAAA,GAAY,IAAI,SAAU,CAAA;AAAA,QAC5B,KAAO,EAAA,QAAA;AAAA,QACP,QAAQ,YAAa,CAAA,OAAA;AAAA,QACrB,KAAK,WAAgB,KAAA;AAAA,OACxB,CAAA;AACD,MAAA,KAAA,CAAM,WAAW,SAAS,CAAA;AAC1B,MAAA,OAAO,MAAM;AACT,QAAA,KAAA,CAAM,cAAc,SAAS,CAAA;AAAA,OACjC;AAAA;AACJ,GACD,EAAA,CAAC,WAAa,EAAA,GAAG,CAAC,CAAA;AAErB,EAAA,uBAAQ,GAAA,CAAA,GAAA,EAAA,EAAK,GAAG,cAAA,EAAgB,KAAK,YAAc,EAAA,CAAA;AACvD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/scale-bar",
|
|
4
|
-
"version": "0.9.0
|
|
4
|
+
"version": "0.9.0",
|
|
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
|
-
"@open-pioneer/chakra-integration": "^
|
|
18
|
-
"@open-pioneer/react-utils": "^
|
|
19
|
-
"@open-pioneer/runtime": "^
|
|
20
|
-
"ol": "^10.
|
|
21
|
-
"react": "^
|
|
22
|
-
"@open-pioneer/map": "^0.9.0
|
|
17
|
+
"@open-pioneer/chakra-integration": "^3.0.0",
|
|
18
|
+
"@open-pioneer/react-utils": "^3.0.0",
|
|
19
|
+
"@open-pioneer/runtime": "^3.0.0",
|
|
20
|
+
"ol": "^10.4.0",
|
|
21
|
+
"react": "^19.0.0",
|
|
22
|
+
"@open-pioneer/map": "^0.9.0"
|
|
23
23
|
},
|
|
24
24
|
"exports": {
|
|
25
25
|
"./package.json": "./package.json",
|