@open-pioneer/scale-setter 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-setter
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
 
@@ -63,17 +78,17 @@
63
78
  - 193068a: Deprecate the `mapId` property on React components.
64
79
  Use the `MapModel` directly instead to pass a reference to the map.
65
80
 
66
- Example:
81
+ Example:
67
82
 
68
- ```tsx
69
- // Default map for entire component tree
70
- <DefaultMapProvider map={mapModel}>
71
- <Toc />
72
- </DefaultMapProvider>
83
+ ```tsx
84
+ // Default map for entire component tree
85
+ <DefaultMapProvider map={mapModel}>
86
+ <Toc />
87
+ </DefaultMapProvider>
73
88
 
74
- // Map for specific component
75
- <Toc map={mapModel} />
76
- ```
89
+ // Map for specific component
90
+ <Toc map={mapModel} />
91
+ ```
77
92
 
78
93
  ### Patch Changes
79
94
 
@@ -92,9 +107,9 @@
92
107
  ### Minor Changes
93
108
 
94
109
  - 2fa8020: Update trails core package dependencies.
95
- - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
96
- - Removes any obsolete references to `@chakra-ui/system`.
97
- This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
110
+ - Also updates Chakra UI to the latest 2.x version and Chakra React Select to version 5.
111
+ - Removes any obsolete references to `@chakra-ui/system`.
112
+ This dependency seems to be no longer required and may lead to duplicate packages in your dependency tree.
98
113
 
99
114
  ### Patch Changes
100
115
 
@@ -113,7 +128,7 @@
113
128
  - 583f1d6: The `mapId` or `map` properties are now optional on individual components.
114
129
  You can use the `DefaultMapProvider` to configure an implicit default value.
115
130
 
116
- Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
131
+ Note that configuring _neither_ a default _nor_ an explicit `map` or `mapId` will trigger a runtime error.
117
132
 
118
133
  - 583f1d6: All UI components in this project now accept the `mapId` (a `string`) _or_ the `map` (a `MapModel`) directly.
119
134
  - a8b3449: Switch to a new versioning strategy.
@@ -1 +1 @@
1
- {"version":3,"file":"ScaleSetter.js","sources":["ScaleSetter.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\nimport { Box, Button, Icon, Menu, Portal } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { useReactiveSnapshot } from \"@open-pioneer/reactivity\";\nimport { PackageIntl } from \"@open-pioneer/runtime\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, useMemo } from \"react\";\nimport { LuChevronDown } from \"react-icons/lu\";\n\nconst DEFAULT_SCALES = [\n 17471320, 8735660, 4367830, 2183915, 1091957, 545978, 272989, 136494, 68247, 34123, 17061, 8530,\n 4265, 2132\n];\n\n/**\n * These are the properties supported by the {@link ScaleSetter}.\n */\nexport interface ScaleSetterProps extends CommonComponentProps, MapModelProps {\n /**\n * The set of scales that can be selected by the user.\n */\n scales?: number[];\n}\n\n/**\n * Displays the current scale and allows the user to change it.\n */\nexport const ScaleSetter: FC<ScaleSetterProps> = (props) => {\n const { scales = DEFAULT_SCALES } = props;\n const { containerProps } = useCommonComponentProps(\"scale-setter\", props);\n const map = useMapModelValue(props);\n const intl = useIntl();\n\n const scaleSelectOptions = useMemo(\n () =>\n scales.map((scaleValue) => {\n return (\n <Menu.Item\n className=\"scale-setter-option\"\n aria-label={intl.formatMessage(\n {\n id: \"option.ariaLabel\"\n },\n { scale: scaleValue }\n )}\n value={String(scaleValue)}\n key={scaleValue}\n onClick={() => map.setScale(scaleValue)}\n onFocus={(e) => {\n // Not available in unit tests\n e.target?.scrollIntoView?.({\n block: \"nearest\"\n });\n }}\n >\n {renderScaleText(intl, scaleValue)}\n </Menu.Item>\n );\n }),\n [intl, map, scales]\n );\n\n const activeScale = useReactiveSnapshot(() => map.scale ?? 1, [map]);\n return (\n <Box {...containerProps}>\n <Menu.Root>\n <Menu.Trigger asChild>\n <Button\n className=\"scale-setter-menubutton\"\n aria-label={intl.formatMessage(\n {\n id: \"button.ariaLabel\"\n },\n {\n scale: activeScale\n }\n )}\n aria-description={intl.formatMessage({\n id: \"button.ariaDescription\"\n })}\n >\n {renderScaleText(intl, activeScale)}\n <Icon>\n <LuChevronDown />\n </Icon>\n </Button>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content\n className=\"scale-setter-menuoptions\"\n maxHeight=\"20em\"\n overflowY=\"auto\"\n >\n {scaleSelectOptions}\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n </Box>\n );\n};\n\nfunction renderScaleText(intl: PackageIntl, rawScale: number): string {\n return \"1 : \" + intl.formatNumber(rawScale);\n}\n"],"names":[],"mappings":";;;;;;;;;AAWA,MAAM,cAAA,GAAiB;AAAA,EACnB,QAAA;AAAA,EAAU,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,KAAA;AAAA,EAAO,KAAA;AAAA,EAAO,KAAA;AAAA,EAAO,IAAA;AAAA,EAC3F,IAAA;AAAA,EAAM;AAC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GAAA,CAAC,IAAA,CAAK,OAAA,EAAL,EAAa,OAAA,EAAO,IAAA,EACjB,QAAA,kBAAA,IAAA;AAAA,MAAC,MAAA;AAAA,MAAA;AAAA,QACG,SAAA,EAAU,yBAAA;AAAA,QACV,cAAY,IAAA,CAAK,aAAA;AAAA,UACb;AAAA,YACI,EAAA,EAAI;AAAA,WACR;AAAA,UACA;AAAA,YACI,KAAA,EAAO;AAAA;AACX,SACJ;AAAA,QACA,kBAAA,EAAkB,KAAK,aAAA,CAAc;AAAA,UACjC,EAAA,EAAI;AAAA,SACP,CAAA;AAAA,QAEA,QAAA,EAAA;AAAA,UAAA,eAAA,CAAgB,MAAM,WAAW,CAAA;AAAA,0BAClC,GAAA,CAAC,IAAA,EAAA,EACG,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,CAAA,EACnB;AAAA;AAAA;AAAA,KACJ,EACJ,CAAA;AAAA,oBACA,GAAA,CAAC,MAAA,EAAA,EACG,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,YAAL,EACG,QAAA,kBAAA,GAAA;AAAA,MAAC,IAAA,CAAK,OAAA;AAAA,MAAL;AAAA,QACG,SAAA,EAAU,0BAAA;AAAA,QACV,SAAA,EAAU,MAAA;AAAA,QACV,SAAA,EAAU,MAAA;AAAA,QAET,QAAA,EAAA;AAAA;AAAA,OAET,CAAA,EACJ;AAAA,GAAA,EACJ,CAAA,EACJ,CAAA;AAER;AAEA,SAAS,eAAA,CAAgB,MAAmB,QAAA,EAA0B;AAClE,EAAA,OAAO,MAAA,GAAS,IAAA,CAAK,YAAA,CAAa,QAAQ,CAAA;AAC9C;;;;"}
1
+ {"version":3,"file":"ScaleSetter.js","sources":["ScaleSetter.tsx"],"sourcesContent":["// SPDX-FileCopyrightText: 2023-2025 Open Pioneer project (https://github.com/open-pioneer)\n// SPDX-License-Identifier: Apache-2.0\n\nimport { Box, Button, Icon, Menu, Portal } from \"@chakra-ui/react\";\nimport { MapModelProps, useMapModelValue } from \"@open-pioneer/map\";\nimport { CommonComponentProps, useCommonComponentProps } from \"@open-pioneer/react-utils\";\nimport { useReactiveSnapshot } from \"@open-pioneer/reactivity\";\nimport { PackageIntl } from \"@open-pioneer/runtime\";\nimport { useIntl } from \"open-pioneer:react-hooks\";\nimport { FC, useMemo } from \"react\";\nimport { LuChevronDown } from \"react-icons/lu\";\n\nconst DEFAULT_SCALES = [\n 17471320, 8735660, 4367830, 2183915, 1091957, 545978, 272989, 136494, 68247, 34123, 17061, 8530,\n 4265, 2132\n];\n\n/**\n * These are the properties supported by the {@link ScaleSetter}.\n */\nexport interface ScaleSetterProps extends CommonComponentProps, MapModelProps {\n /**\n * The set of scales that can be selected by the user.\n */\n scales?: number[];\n}\n\n/**\n * Displays the current scale and allows the user to change it.\n */\nexport const ScaleSetter: FC<ScaleSetterProps> = (props) => {\n const { scales = DEFAULT_SCALES } = props;\n const { containerProps } = useCommonComponentProps(\"scale-setter\", props);\n const map = useMapModelValue(props);\n const intl = useIntl();\n\n const scaleSelectOptions = useMemo(\n () =>\n scales.map((scaleValue) => {\n return (\n <Menu.Item\n className=\"scale-setter-option\"\n aria-label={intl.formatMessage(\n {\n id: \"option.ariaLabel\"\n },\n { scale: scaleValue }\n )}\n value={String(scaleValue)}\n key={scaleValue}\n onClick={() => map.setScale(scaleValue)}\n onFocus={(e) => {\n // Not available in unit tests\n e.target?.scrollIntoView?.({\n block: \"nearest\"\n });\n }}\n >\n {renderScaleText(intl, scaleValue)}\n </Menu.Item>\n );\n }),\n [intl, map, scales]\n );\n\n const activeScale = useReactiveSnapshot(() => map.scale ?? 1, [map]);\n return (\n <Box {...containerProps}>\n <Menu.Root>\n <Menu.Trigger asChild>\n <Button\n className=\"scale-setter-menubutton\"\n aria-label={intl.formatMessage(\n {\n id: \"button.ariaLabel\"\n },\n {\n scale: activeScale\n }\n )}\n aria-description={intl.formatMessage({\n id: \"button.ariaDescription\"\n })}\n >\n {renderScaleText(intl, activeScale)}\n <Icon>\n <LuChevronDown />\n </Icon>\n </Button>\n </Menu.Trigger>\n <Portal>\n <Menu.Positioner>\n <Menu.Content\n className=\"scale-setter-menuoptions\"\n maxHeight=\"20em\"\n overflowY=\"auto\"\n >\n {scaleSelectOptions}\n </Menu.Content>\n </Menu.Positioner>\n </Portal>\n </Menu.Root>\n </Box>\n );\n};\n\nfunction renderScaleText(intl: PackageIntl, rawScale: number): string {\n return \"1 : \" + intl.formatNumber(rawScale);\n}\n"],"names":[],"mappings":";;;;;;;;;AAYA,MAAM,cAAA,GAAiB;AAAA,EACnB,QAAA;AAAA,EAAU,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,OAAA;AAAA,EAAS,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,MAAA;AAAA,EAAQ,KAAA;AAAA,EAAO,KAAA;AAAA,EAAO,KAAA;AAAA,EAAO,IAAA;AAAA,EAC3F,IAAA;AAAA,EAAM;AACV,CAAA;AAeO,MAAM,WAAA,GAAoC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM,EAAE,MAAA,GAAS,cAAA,EAAe,GAAI,KAAA;AACpC,EAAA,MAAM,EAAE,cAAA,EAAe,GAAI,uBAAA,CAAwB,gBAAgB,KAAK,CAAA;AACxE,EAAA,MAAM,GAAA,GAAM,iBAAiB,KAAK,CAAA;AAClC,EAAA,MAAM,OAAO,OAAA,EAAQ;AAErB,EAAA,MAAM,kBAAA,GAAqB,OAAA;AAAA,IACvB,MACI,MAAA,CAAO,GAAA,CAAI,CAAC,UAAA,KAAe;AACvB,MAAA,uBACI,GAAA;AAAA,QAAC,IAAA,CAAK,IAAA;AAAA,QAAL;AAAA,UACG,SAAA,EAAU,qBAAA;AAAA,UACV,cAAY,IAAA,CAAK,aAAA;AAAA,YACb;AAAA,cACI,EAAA,EAAI;AAAA,aACR;AAAA,YACA,EAAE,OAAO,UAAA;AAAW,WACxB;AAAA,UACA,KAAA,EAAO,OAAO,UAAU,CAAA;AAAA,UAExB,OAAA,E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AAA,kBAAA,GAAA;AAAA,MAAC,IAAA,CAAK,OAAA;AAAA,MAAL;AAAA,QACG,SAAA,EAAU,0BAAA;AAAA,QACV,SAAA,EAAU,MAAA;AAAA,QACV,SAAA,EAAU,MAAA;AAAA,QAET,QAAA,EAAA;AAAA;AAAA,OAET,CAAA,EACJ;AAAA,GAAA,EACJ,CAAA,EACJ,CAAA;AAER;AAEA,SAAS,eAAA,CAAgB,MAAmB,QAAA,EAA0B;AAClE,EAAA,OAAO,MAAA,GAAS,IAAA,CAAK,YAAA,CAAa,QAAQ,CAAA;AAC9C;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@open-pioneer/scale-setter",
4
- "version": "1.4.0-dev.20260727093741",
4
+ "version": "1.5.0-dev.20260910103330",
5
5
  "description": "This package provides a UI component to change the scale of the map.",
6
6
  "keywords": [
7
7
  "open-pioneer-trails"
@@ -14,15 +14,19 @@
14
14
  "directory": "src/packages/scale-setter"
15
15
  },
16
16
  "dependencies": {
17
- "@conterra/reactivity-core": "^0.8.6",
18
- "@chakra-ui/react": "^3.36.1",
19
- "@open-pioneer/react-utils": "4.7.0-dev.20260727091735",
20
- "@open-pioneer/runtime": "4.7.0-dev.20260727091735",
21
- "@open-pioneer/reactivity": "4.7.0-dev.20260727091735",
22
- "ol": "^10.9.0",
17
+ "@chakra-ui/react": "^3.37.0",
18
+ "@conterra/reactivity-core": "^0.8.8",
19
+ "@open-pioneer/map": "1.5.0-dev.20260910103330",
20
+ "@open-pioneer/react-utils": "4.8.0-dev.20260910101405",
21
+ "@open-pioneer/reactivity": "4.8.0-dev.20260910101405",
22
+ "@open-pioneer/runtime": "4.8.0-dev.20260910101405",
23
+ "ol": "^10.10.0",
23
24
  "react": "^19.2.8",
24
- "react-icons": "^5.7.0",
25
- "@open-pioneer/map": "1.4.0-dev.20260727093741"
25
+ "react-icons": "^5.7.0"
26
+ },
27
+ "publishConfig": {
28
+ "directory": "dist",
29
+ "linkDirectory": false
26
30
  },
27
31
  "exports": {
28
32
  "./package.json": "./package.json",