@defra/interactive-map 0.0.3-alpha → 0.0.4-alpha
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/README.md +16 -57
- package/dist/esm/im-core.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/umd/im-core.js +1 -1
- package/dist/umd/index.js +1 -1
- package/docs/api/button-definition.md +176 -0
- package/docs/api/context.md +124 -0
- package/docs/api/control-definition.md +72 -0
- package/docs/api/icon-definition.md +28 -0
- package/docs/api/map-style-config.md +76 -0
- package/docs/api/marker-config.md +51 -0
- package/docs/api/panel-definition.md +117 -0
- package/docs/api/slots.md +25 -0
- package/docs/api.md +713 -0
- package/docs/architecture.md +139 -0
- package/docs/building-a-plugin.md +149 -0
- package/docs/getting-started.md +46 -0
- package/docs/govuk-prototype.md +0 -0
- package/docs/plugins/interact.md +205 -0
- package/docs/plugins/map-styles.md +84 -0
- package/docs/plugins/plugin-context.md +67 -0
- package/docs/plugins/plugin-descriptor.md +71 -0
- package/docs/plugins/plugin-manifest.md +118 -0
- package/docs/plugins/scale-bar.md +62 -0
- package/docs/plugins/search.md +162 -0
- package/docs/plugins.md +116 -0
- package/govuk-prototype-kit.config.json +7 -7
- package/package.json +14 -1
- package/plugins/beta/datasets/dist/esm/im-datasets-plugin.js +1 -0
- package/plugins/beta/datasets/dist/esm/index.js +2 -0
- package/plugins/beta/datasets/dist/umd/im-datasets-plugin.js +1 -0
- package/plugins/beta/datasets/dist/umd/index.js +2 -0
- package/plugins/{datasets → beta/datasets}/src/manifest.js +1 -1
- package/plugins/{datasets → beta/datasets}/src/mapLayers.js +1 -1
- package/plugins/{datasets → beta/datasets}/src/panels/Key.jsx +1 -1
- package/plugins/beta/draw-ml/dist/esm/im-draw-ml-plugin.js +1 -0
- package/plugins/beta/draw-ml/dist/esm/index.js +2 -0
- package/plugins/beta/draw-ml/dist/umd/im-draw-ml-plugin.js +1 -0
- package/plugins/beta/draw-ml/dist/umd/index.js +2 -0
- package/plugins/{draw-ml → beta/draw-ml}/src/api/editFeature.js +1 -1
- package/plugins/beta/draw-ml/src/api/merge.js +9 -0
- package/plugins/beta/draw-ml/src/api/newLine.js +43 -0
- package/plugins/{draw-ml → beta/draw-ml}/src/api/newPolygon.js +5 -5
- package/plugins/beta/draw-ml/src/api/split.js +81 -0
- package/plugins/{draw-ml → beta/draw-ml}/src/defaults.js +2 -0
- package/plugins/{draw-ml → beta/draw-ml}/src/events.js +105 -3
- package/plugins/{draw-ml → beta/draw-ml}/src/manifest.js +17 -11
- package/plugins/{draw-ml → beta/draw-ml}/src/mapboxDraw.js +51 -2
- package/plugins/{draw-ml → beta/draw-ml}/src/mapboxSnap.js +2 -0
- package/plugins/beta/draw-ml/src/modes/createDrawMode.js +496 -0
- package/plugins/beta/draw-ml/src/modes/drawLineMode.js +18 -0
- package/plugins/beta/draw-ml/src/modes/drawPolygonMode.js +16 -0
- package/plugins/beta/draw-ml/src/modes/editVertexMode.js +792 -0
- package/plugins/{draw-ml → beta/draw-ml}/src/reducer.js +30 -2
- package/plugins/{draw-ml → beta/draw-ml}/src/styles.js +66 -36
- package/plugins/beta/draw-ml/src/undoStack.js +50 -0
- package/plugins/beta/draw-ml/src/utils/debounce.js +16 -0
- package/plugins/beta/draw-ml/src/utils/spatial.js +258 -0
- package/plugins/beta/frame/dist/esm/im-frame-plugin.js +1 -0
- package/plugins/beta/frame/dist/esm/index.js +2 -0
- package/plugins/beta/frame/dist/umd/im-frame-plugin.js +1 -0
- package/plugins/beta/frame/dist/umd/index.js +2 -0
- package/plugins/beta/map-styles/dist/esm/im-map-styles-plugin.js +1 -0
- package/plugins/beta/map-styles/dist/esm/index.js +2 -0
- package/plugins/beta/map-styles/dist/umd/im-map-styles-plugin.js +1 -0
- package/plugins/beta/map-styles/dist/umd/index.js +2 -0
- package/plugins/{map-styles → beta/map-styles}/src/MapStyles.jsx +1 -1
- package/plugins/{map-styles → beta/map-styles}/src/manifest.js +8 -10
- package/plugins/beta/scale-bar/dist/esm/im-scale-bar-plugin.js +1 -0
- package/plugins/beta/scale-bar/dist/esm/index.js +2 -0
- package/plugins/beta/scale-bar/dist/umd/im-scale-bar-plugin.js +1 -0
- package/plugins/beta/scale-bar/dist/umd/index.js +2 -0
- package/plugins/beta/use-location/dist/esm/im-use-location-plugin.js +1 -0
- package/plugins/beta/use-location/dist/esm/index.js +2 -0
- package/plugins/beta/use-location/dist/umd/im-use-location-plugin.js +1 -0
- package/plugins/beta/use-location/dist/umd/index.js +2 -0
- package/plugins/interact/dist/esm/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/esm/index.js +1 -1
- package/plugins/interact/dist/umd/im-interact-plugin.js +1 -1
- package/plugins/interact/dist/umd/index.js +1 -1
- package/plugins/interact/src/InteractInit.test.js +97 -0
- package/plugins/interact/src/api/clear.test.js +18 -0
- package/plugins/interact/src/api/disable.test.js +12 -0
- package/plugins/interact/src/api/enable.test.js +48 -0
- package/plugins/interact/src/api/selectFeature.test.js +33 -0
- package/plugins/interact/src/api/unselectFeature.test.js +33 -0
- package/plugins/interact/src/defaults.js +1 -0
- package/plugins/interact/src/events.test.js +151 -0
- package/plugins/interact/src/hooks/useHighlightSync.test.js +212 -0
- package/plugins/interact/src/hooks/useInteractionHandlers.js +14 -7
- package/plugins/interact/src/hooks/useInteractionHandlers.test.js +260 -0
- package/plugins/interact/src/index.test.js +22 -0
- package/plugins/interact/src/manifest.js +1 -1
- package/plugins/interact/src/manifest.test.js +94 -0
- package/plugins/interact/src/reducer.js +10 -1
- package/plugins/interact/src/reducer.test.js +142 -0
- package/plugins/interact/src/utils/buildStylesMap.test.js +57 -0
- package/plugins/interact/src/utils/featureQueries.test.js +56 -0
- package/plugins/interact/src/utils/turfHelpers.js +30 -0
- package/plugins/interact/src/utils/turfHelpers.test.js +30 -0
- package/plugins/search/dist/esm/im-search-plugin.js +1 -1
- package/plugins/search/dist/esm/index.js +1 -1
- package/plugins/search/dist/umd/im-search-plugin.js +1 -1
- package/plugins/search/dist/umd/index.js +1 -1
- package/plugins/search/src/utils/parseOsNamesResults.js +3 -7
- package/providers/{esri → beta/esri}/src/mapEvents.js +2 -2
- package/providers/beta/open-names/dist/esm/im-reverse-geocode.js +2 -0
- package/providers/beta/open-names/dist/esm/index.js +2 -0
- package/providers/beta/open-names/dist/umd/im-reverse-geocode.js +2 -0
- package/providers/beta/open-names/dist/umd/index.js +2 -0
- package/providers/maplibre/dist/esm/im-maplibre-framework.js +1 -1
- package/providers/maplibre/dist/esm/im-maplibre-framework.js.LICENSE.txt +1 -1
- package/providers/maplibre/dist/esm/im-maplibre-legacy-framework.js +1 -1
- package/providers/maplibre/dist/esm/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/esm/index.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-framework.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-framework.js.LICENSE.txt +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-legacy-framework.js +1 -1
- package/providers/maplibre/dist/umd/im-maplibre-provider.js +1 -1
- package/providers/maplibre/dist/umd/index.js +1 -1
- package/providers/maplibre/src/index.js +14 -1
- package/providers/maplibre/src/maplibreProvider.js +127 -0
- package/sonar-project.properties +1 -1
- package/src/App/hooks/useInterfaceAPI.js +24 -1
- package/src/App/renderer/mapButtons.js +1 -1
- package/src/App/store/appActionsMap.js +22 -1
- package/src/InteractiveMap/InteractiveMap.js +114 -6
- package/src/config/defaults.js +29 -20
- package/src/config/events.js +110 -4
- package/src/index.js +5 -2
- package/src/scss/tools/_border-focus.scss +20 -4
- package/src/types.js +585 -0
- package/webpack.esm.mjs +8 -8
- package/webpack.umd.mjs +8 -8
- package/plugins/datasets/dist/esm/im-datasets-plugin.js +0 -1
- package/plugins/datasets/dist/esm/index.js +0 -2
- package/plugins/datasets/dist/umd/im-datasets-plugin.js +0 -1
- package/plugins/datasets/dist/umd/index.js +0 -2
- package/plugins/draw-ml/dist/esm/im-draw-ml-plugin.js +0 -1
- package/plugins/draw-ml/dist/esm/index.js +0 -2
- package/plugins/draw-ml/dist/umd/im-draw-ml-plugin.js +0 -1
- package/plugins/draw-ml/dist/umd/index.js +0 -2
- package/plugins/draw-ml/src/modes/drawVertexMode.js +0 -275
- package/plugins/draw-ml/src/modes/editVertexMode.js +0 -426
- package/plugins/draw-ml/src/utils.js +0 -102
- package/plugins/frame/dist/esm/im-frame-plugin.js +0 -1
- package/plugins/frame/dist/esm/index.js +0 -2
- package/plugins/frame/dist/umd/im-frame-plugin.js +0 -1
- package/plugins/frame/dist/umd/index.js +0 -2
- package/plugins/map-styles/dist/esm/im-map-styles-plugin.js +0 -1
- package/plugins/map-styles/dist/esm/index.js +0 -2
- package/plugins/map-styles/dist/umd/im-map-styles-plugin.js +0 -1
- package/plugins/map-styles/dist/umd/index.js +0 -2
- package/plugins/scale-bar/dist/esm/im-scale-bar-plugin.js +0 -1
- package/plugins/scale-bar/dist/esm/index.js +0 -2
- package/plugins/scale-bar/dist/umd/im-scale-bar-plugin.js +0 -1
- package/plugins/scale-bar/dist/umd/index.js +0 -2
- package/plugins/use-location/dist/esm/im-use-location-plugin.js +0 -1
- package/plugins/use-location/dist/esm/index.js +0 -2
- package/plugins/use-location/dist/umd/im-use-location-plugin.js +0 -1
- package/plugins/use-location/dist/umd/index.js +0 -2
- package/providers/open-names/dist/esm/im-reverse-geocode.js +0 -2
- package/providers/open-names/dist/esm/index.js +0 -2
- package/providers/open-names/dist/umd/im-reverse-geocode.js +0 -2
- package/providers/open-names/dist/umd/index.js +0 -2
- /package/docs/architecture/{ARCHITECTURE_DIAGRAMS.md → architecture-diagrams.md} +0 -0
- /package/plugins/{datasets → beta/datasets}/dist/css/index.css +0 -0
- /package/plugins/{datasets → beta/datasets}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{datasets → beta/datasets}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{datasets → beta/datasets}/src/DatasetsInit.jsx +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/addDataset.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/hideDataset.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/hideFeatures.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/removeDataset.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/showDataset.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/api/showFeatures.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/datasets.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/datasets.scss +0 -0
- /package/plugins/{datasets → beta/datasets}/src/defaults.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/handleSetMapStyle.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/index.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/panels/Key.module.scss +0 -0
- /package/plugins/{datasets → beta/datasets}/src/panels/Layers.jsx +0 -0
- /package/plugins/{datasets → beta/datasets}/src/panels/Layers.module.scss +0 -0
- /package/plugins/{datasets → beta/datasets}/src/reducer.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/utils/bbox.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/utils/debounce.js +0 -0
- /package/plugins/{datasets → beta/datasets}/src/utils/filters.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/DrawInit.jsx +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/api/addFeature.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/api/deleteFeature.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/api/editFeature.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/api/newPolygon.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/events.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/graphic.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/index.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/manifest.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/reducer.js +0 -0
- /package/plugins/{draw-es → beta/draw-es}/src/sketchViewModel.js +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/dist/css/index.css +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/DrawInit.jsx +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/api/addFeature.js +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/api/deleteFeature.js +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/draw.scss +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/index.js +0 -0
- /package/plugins/{draw-ml → beta/draw-ml}/src/modes/disabledMode.js +0 -0
- /package/plugins/{draw-ml/src → beta/draw-ml/src/utils}/snapHelpers.js +0 -0
- /package/plugins/{frame → beta/frame}/dist/css/index.css +0 -0
- /package/plugins/{frame → beta/frame}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{frame → beta/frame}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{frame → beta/frame}/package.json +0 -0
- /package/plugins/{frame → beta/frame}/src/Frame.jsx +0 -0
- /package/plugins/{frame → beta/frame}/src/FrameInit.jsx +0 -0
- /package/plugins/{frame → beta/frame}/src/api/addFrame.js +0 -0
- /package/plugins/{frame → beta/frame}/src/api/editFeature.js +0 -0
- /package/plugins/{frame → beta/frame}/src/config.js +0 -0
- /package/plugins/{frame → beta/frame}/src/frame.scss +0 -0
- /package/plugins/{frame → beta/frame}/src/index.js +0 -0
- /package/plugins/{frame → beta/frame}/src/manifest.js +0 -0
- /package/plugins/{frame → beta/frame}/src/reducer.js +0 -0
- /package/plugins/{frame → beta/frame}/src/utils.js +0 -0
- /package/plugins/{map-styles → beta/map-styles}/dist/css/index.css +0 -0
- /package/plugins/{map-styles → beta/map-styles}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{map-styles → beta/map-styles}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{map-styles → beta/map-styles}/src/MapStylesInit.jsx +0 -0
- /package/plugins/{map-styles → beta/map-styles}/src/config.js +0 -0
- /package/plugins/{map-styles → beta/map-styles}/src/index.js +0 -0
- /package/plugins/{map-styles → beta/map-styles}/src/mapStyles.scss +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/dist/css/index.css +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/package.json +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/ScaleBar.jsx +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/ScaleBar.test.jsx +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/index.js +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/index.test.js +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/manifest.js +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/scaleBar.scss +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/utils.js +0 -0
- /package/plugins/{scale-bar → beta/scale-bar}/src/utils.test.js +0 -0
- /package/plugins/{use-location → beta/use-location}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/plugins/{use-location → beta/use-location}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/plugins/{use-location → beta/use-location}/src/UseLocation.jsx +0 -0
- /package/plugins/{use-location → beta/use-location}/src/UseLocationInit.jsx +0 -0
- /package/plugins/{use-location → beta/use-location}/src/defaults.js +0 -0
- /package/plugins/{use-location → beta/use-location}/src/events.js +0 -0
- /package/plugins/{use-location → beta/use-location}/src/index.js +0 -0
- /package/plugins/{use-location → beta/use-location}/src/manifest.js +0 -0
- /package/plugins/{use-location → beta/use-location}/src/reducer.js +0 -0
- /package/providers/{esri → beta/esri}/src/appEvents.js +0 -0
- /package/providers/{esri → beta/esri}/src/defaults.js +0 -0
- /package/providers/{esri → beta/esri}/src/esriProvider.js +0 -0
- /package/providers/{esri → beta/esri}/src/esriProvider.scss +0 -0
- /package/providers/{esri → beta/esri}/src/index.js +0 -0
- /package/providers/{esri → beta/esri}/src/utils/coords.js +0 -0
- /package/providers/{esri → beta/esri}/src/utils/detectWebGL.js +0 -0
- /package/providers/{esri → beta/esri}/src/utils/esriFixes.js +0 -0
- /package/providers/{esri → beta/esri}/src/utils/query.js +0 -0
- /package/providers/{esri → beta/esri}/src/utils/spatial.js +0 -0
- /package/providers/{open-names → beta/open-names}/dist/esm/im-reverse-geocode.js.LICENSE.txt +0 -0
- /package/providers/{open-names → beta/open-names}/dist/esm/index.js.LICENSE.txt +0 -0
- /package/providers/{open-names → beta/open-names}/dist/umd/im-reverse-geocode.js.LICENSE.txt +0 -0
- /package/providers/{open-names → beta/open-names}/dist/umd/index.js.LICENSE.txt +0 -0
- /package/providers/{open-names → beta/open-names}/src/index.js +0 -0
- /package/providers/{open-names → beta/open-names}/src/reverseGeocode.js +0 -0
- /package/providers/{open-names → beta/open-names}/src/utils/mapToLocationModel.js +0 -0
package/src/types.js
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
// src/types.js
|
|
2
|
+
// This file contains shared JSDoc type definitions used across the core codebase.
|
|
3
|
+
// These are used by TypeScript to generate .d.ts files.
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A functional component type. Uses React types for better IDE support (compatible with Preact via aliasing).
|
|
7
|
+
*
|
|
8
|
+
* @typedef {import('react').ComponentType<any>} ComponentType
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for how a button behaves at a specific breakpoint (mobile, tablet, desktop).
|
|
13
|
+
*
|
|
14
|
+
* @typedef {Object} ButtonBreakpointConfig
|
|
15
|
+
*
|
|
16
|
+
* @property {number} [order]
|
|
17
|
+
* The order the button appears within its slot.
|
|
18
|
+
*
|
|
19
|
+
* @property {boolean} [showLabel]
|
|
20
|
+
* Whether to a show label, if false then a tooltip is generated from the the label.
|
|
21
|
+
*
|
|
22
|
+
* @property {string} slot
|
|
23
|
+
* The slot that the button should appear in at this breakpoint.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Configuration for how a control behaves at a specific breakpoint (mobile, tablet, desktop).
|
|
28
|
+
*
|
|
29
|
+
* @typedef {Object} ControlBreakpointConfig
|
|
30
|
+
*
|
|
31
|
+
* @property {string} slot
|
|
32
|
+
* Slot identifier.
|
|
33
|
+
*/
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Configuration for how a panel behaves at a specific breakpoint (mobile, tablet, desktop).
|
|
37
|
+
*
|
|
38
|
+
* @typedef {Object} PanelBreakpointConfig
|
|
39
|
+
*
|
|
40
|
+
* @property {boolean} [dismissable]
|
|
41
|
+
* Whether panel can be dismissed.
|
|
42
|
+
*
|
|
43
|
+
* @property {boolean} [exclusive]
|
|
44
|
+
* Whether panel is exclusive. An exclusive panel will hide other panels when it is visible.
|
|
45
|
+
*
|
|
46
|
+
* @property {boolean} [initiallyOpen]
|
|
47
|
+
* Whether panel is initially open.
|
|
48
|
+
*
|
|
49
|
+
* @property {boolean} [modal]
|
|
50
|
+
* Whether panel is modal.
|
|
51
|
+
*
|
|
52
|
+
* @property {string} slot
|
|
53
|
+
* Slot identifier.
|
|
54
|
+
*
|
|
55
|
+
* @property {string} [width]
|
|
56
|
+
* Panel width.
|
|
57
|
+
*/
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Context object passed to plugin callbacks and components, providing access to config, state and services.
|
|
61
|
+
*
|
|
62
|
+
* @typedef {Object} PluginContext
|
|
63
|
+
*
|
|
64
|
+
* @property {Object} [appConfig]
|
|
65
|
+
* Application configuration.
|
|
66
|
+
*
|
|
67
|
+
* @property {Object} [appState]
|
|
68
|
+
* Application state.
|
|
69
|
+
*
|
|
70
|
+
* @property {Object} [iconRegistry]
|
|
71
|
+
* Icon registry.
|
|
72
|
+
*
|
|
73
|
+
* @property {MapProvider} [mapProvider]
|
|
74
|
+
* Map provider instance.
|
|
75
|
+
*
|
|
76
|
+
* @property {Object} [mapState]
|
|
77
|
+
* Map state.
|
|
78
|
+
*
|
|
79
|
+
* @property {Object} [pluginConfig]
|
|
80
|
+
* Plugin-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @property {Object} [pluginState]
|
|
83
|
+
* Plugin-specific state.
|
|
84
|
+
*
|
|
85
|
+
* @property {Object} [services]
|
|
86
|
+
* Core services (announce, reverseGeocode, closeApp, etc.).
|
|
87
|
+
*/
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Defines a button that can be rendered in the UI at various breakpoints.
|
|
91
|
+
*
|
|
92
|
+
* @typedef {Object} ButtonDefinition
|
|
93
|
+
*
|
|
94
|
+
* @property {ButtonBreakpointConfig} [desktop]
|
|
95
|
+
* Desktop breakpoint configuration.
|
|
96
|
+
*
|
|
97
|
+
* @property {(context: PluginContext) => boolean} [enableWhen]
|
|
98
|
+
* Callback to determine if the button should be enabled. Sets aria-disabled accordingly.
|
|
99
|
+
* Only evaluated for plugin-defined buttons; use toggleButtonState() for host buttons.
|
|
100
|
+
*
|
|
101
|
+
* @property {(context: PluginContext) => boolean} [excludeWhen]
|
|
102
|
+
* Callback to determine if the button should be excluded from rendering.
|
|
103
|
+
*
|
|
104
|
+
* @property {string} [group]
|
|
105
|
+
* Button group label for grouping related buttons.
|
|
106
|
+
*
|
|
107
|
+
* @property {(context: PluginContext) => boolean} [hiddenWhen]
|
|
108
|
+
* Callback to determine if the button should be hidden. Sets display: none if true.
|
|
109
|
+
* Only evaluated for plugin-defined buttons; use toggleButtonState() for host buttons.
|
|
110
|
+
*
|
|
111
|
+
* @property {string} [iconId]
|
|
112
|
+
* Icon identifier from the icon registry.
|
|
113
|
+
*
|
|
114
|
+
* @property {string} [iconSvgContent]
|
|
115
|
+
* Raw SVG content for the button icon. The SVG tag itself should be excluded.
|
|
116
|
+
*
|
|
117
|
+
* @property {string} id
|
|
118
|
+
* Unique button identifier.
|
|
119
|
+
*
|
|
120
|
+
* @property {boolean} [inline=true]
|
|
121
|
+
* Whether the button is rendered when the app is not in fullscreen mode.
|
|
122
|
+
* Set to false to only show the button when fullscreen.
|
|
123
|
+
*
|
|
124
|
+
* @property {boolean} [isPressed]
|
|
125
|
+
* Sets the button’s pressed state. When true or false, aria-pressed is added accordingly.
|
|
126
|
+
* For host buttons added via addButton() as an alternative to pressedWhen.
|
|
127
|
+
*
|
|
128
|
+
* @property {string | (() => string)} label
|
|
129
|
+
* Accesible label. Text or a function returning the text. Used for the label or tooltip if 'showLabel' is false.
|
|
130
|
+
*
|
|
131
|
+
* @property {ButtonBreakpointConfig} mobile
|
|
132
|
+
* Mobile breakpoint configuration.
|
|
133
|
+
*
|
|
134
|
+
* @property {(event: MouseEvent, context: PluginContext) => void} [onClick]
|
|
135
|
+
* Click handler for the button.
|
|
136
|
+
*
|
|
137
|
+
* @property {string} [panelId]
|
|
138
|
+
* Associated panel identifier to toggle open when clicked.
|
|
139
|
+
*
|
|
140
|
+
* @property {(context: PluginContext) => boolean} [pressedWhen]
|
|
141
|
+
* Callback to determine if the button should appear pressed. Sets aria-pressed accordingly.
|
|
142
|
+
* Only evaluated for plugin-defined buttons; use toggleButtonState() for host buttons.
|
|
143
|
+
*
|
|
144
|
+
* @property {ButtonBreakpointConfig} tablet
|
|
145
|
+
* Tablet breakpoint configuration.
|
|
146
|
+
*/
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Defines a custom control component that can be rendered in the UI at various breakpoints.
|
|
150
|
+
*
|
|
151
|
+
* @typedef {Object} ControlDefinition
|
|
152
|
+
*
|
|
153
|
+
* @property {string} id
|
|
154
|
+
* Unique control identifier.
|
|
155
|
+
*
|
|
156
|
+
* @property {string} label
|
|
157
|
+
* Accessible label for the control.
|
|
158
|
+
*
|
|
159
|
+
* @property {ComponentType} render
|
|
160
|
+
* Render component.
|
|
161
|
+
*
|
|
162
|
+
* @property {ControlBreakpointConfig} mobile
|
|
163
|
+
* Mobile breakpoint configuration.
|
|
164
|
+
*
|
|
165
|
+
* @property {ControlBreakpointConfig} tablet
|
|
166
|
+
* Tablet breakpoint configuration.
|
|
167
|
+
*
|
|
168
|
+
* @property {ControlBreakpointConfig} desktop
|
|
169
|
+
* Desktop breakpoint configuration.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Interface for map provider implementations that wrap underlying map libraries.
|
|
174
|
+
*
|
|
175
|
+
* @typedef {Object} MapProvider
|
|
176
|
+
*
|
|
177
|
+
* @property {any} map
|
|
178
|
+
* Underlying map instance.
|
|
179
|
+
*
|
|
180
|
+
* @property {{ supportedShortcuts: string[], supportsMapSizes: boolean }} capabilities
|
|
181
|
+
* Map provider capabilities.
|
|
182
|
+
*
|
|
183
|
+
* @property {(config: any) => Promise<void>} initMap
|
|
184
|
+
* Initialize the map.
|
|
185
|
+
*
|
|
186
|
+
* @property {() => void} destroyMap
|
|
187
|
+
* Destroy the map.
|
|
188
|
+
*
|
|
189
|
+
* @property {(options: { center?: [number, number], zoom?: number }) => void} setView
|
|
190
|
+
* Set map view with optional center ([lng, lat] or [easting, northing] depending on the crs of the map provider) and zoom.
|
|
191
|
+
*
|
|
192
|
+
* @property {(delta: number) => void} zoomIn
|
|
193
|
+
* Zoom in by delta.
|
|
194
|
+
*
|
|
195
|
+
* @property {(delta: number) => void} zoomOut
|
|
196
|
+
* Zoom out by delta.
|
|
197
|
+
*
|
|
198
|
+
* @property {(offset: [number, number]) => void} panBy
|
|
199
|
+
* Pan map by pixel offset [x, y]. Positive x pans right, positive y pans down.
|
|
200
|
+
*
|
|
201
|
+
* @property {(bounds: [number, number, number, number]) => void} fitToBounds
|
|
202
|
+
* Fit map view to the specified bounds [west, south, east, north] or [minX, minY, maxX, maxY] depending on the crs of the map provider.
|
|
203
|
+
*
|
|
204
|
+
* @property {(padding: { top?: number, bottom?: number, left?: number, right?: number }) => void} setPadding
|
|
205
|
+
* Set map padding as pixel insets from the top, bottom, left and right edges of the map.
|
|
206
|
+
*
|
|
207
|
+
* @property {() => [number, number]} getCenter
|
|
208
|
+
* Get current center coordinates [lng, lat] or [easting, northing] depending on the crs of the map provider.
|
|
209
|
+
*
|
|
210
|
+
* @property {() => number} getZoom
|
|
211
|
+
* Get current zoom level.
|
|
212
|
+
*
|
|
213
|
+
* @property {() => [number, number, number, number]} getBounds
|
|
214
|
+
* Get current bounds as [west, south, east, north] or [minX, minY, maxX, maxY] depending on the crs of the map provider.
|
|
215
|
+
*
|
|
216
|
+
* @property {(point: { x: number, y: number }) => any[]} getFeaturesAtPoint
|
|
217
|
+
* Query rendered features at a screen pixel position (x from left edge, y from top edge of viewport).
|
|
218
|
+
*
|
|
219
|
+
* @property {() => string} getAreaDimensions
|
|
220
|
+
* Get the dimensions of the visible map area as a formatted string (e.g., '400m by 750m').
|
|
221
|
+
*
|
|
222
|
+
* @property {(from: [number, number], to: [number, number]) => string} getCardinalMove
|
|
223
|
+
* Get cardinal direction and distance between two coordinates ([lng, lat] or [easting, northing] depending on the crs of the map provider). Returns a formatted string (e.g., 'north 400m' or 'south 400m, west 750m').
|
|
224
|
+
*
|
|
225
|
+
* @property {() => number} getResolution
|
|
226
|
+
* Get map resolution in meters per pixel.
|
|
227
|
+
*
|
|
228
|
+
* @property {(coords: [number, number]) => { x: number, y: number }} mapToScreen
|
|
229
|
+
* Convert map coordinates ([lng, lat] or [easting, northing] depending on the crs of the map provider) to screen pixel position (x from left edge, y from top edge of viewport).
|
|
230
|
+
*
|
|
231
|
+
* @property {(point: { x: number, y: number }) => [number, number]} screenToMap
|
|
232
|
+
* Convert screen pixel position (x from left edge, y from top edge of viewport) to map coordinates ([lng, lat] or [easting, northing] depending on the crs of the map provider).
|
|
233
|
+
*
|
|
234
|
+
* @property {(selectedFeatures: any[], stylesMap: any) => any} [updateHighlightedFeatures]
|
|
235
|
+
* @experimental Update highlighted features on the map.
|
|
236
|
+
*
|
|
237
|
+
* @property {(direction: string) => any} [highlightNextLabel]
|
|
238
|
+
* @experimental Highlight the next label in the specified direction for keyboard navigation.
|
|
239
|
+
*
|
|
240
|
+
* @property {() => any} [highlightLabelAtCenter]
|
|
241
|
+
* @experimental Highlight the label nearest to the map center.
|
|
242
|
+
*
|
|
243
|
+
* @property {() => void} [clearHighlightedLabel]
|
|
244
|
+
* @experimental Clear any highlighted label.
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Configuration options for a map provider.
|
|
249
|
+
*
|
|
250
|
+
* @typedef {Object} MapProviderConfig
|
|
251
|
+
*
|
|
252
|
+
* @property {'EPSG:4326' | 'EPSG:27700'} crs
|
|
253
|
+
* Coordinate reference system.
|
|
254
|
+
*/
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Descriptor for lazy-loading a map provider.
|
|
258
|
+
*
|
|
259
|
+
* @typedef {Object} MapProviderDescriptor
|
|
260
|
+
*
|
|
261
|
+
* @property {() => { isSupported: boolean, error?: string }} checkDeviceCapabilities
|
|
262
|
+
* Check if device is supported.
|
|
263
|
+
*
|
|
264
|
+
* @property {() => Promise<MapProviderLoadResult>} load
|
|
265
|
+
* Load the map provider.
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Result returned when a map provider is loaded.
|
|
270
|
+
*
|
|
271
|
+
* @typedef {Object} MapProviderLoadResult
|
|
272
|
+
*
|
|
273
|
+
* @property {new (options: any) => MapProvider} MapProvider
|
|
274
|
+
* Map provider constructor.
|
|
275
|
+
*
|
|
276
|
+
* @property {MapProviderConfig} mapProviderConfig
|
|
277
|
+
* Map provider configuration.
|
|
278
|
+
*
|
|
279
|
+
* @property {any} [mapFramework]
|
|
280
|
+
* Underlying map framework.
|
|
281
|
+
*/
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Configuration for a map style (basemap appearance).
|
|
285
|
+
*
|
|
286
|
+
* @typedef {Object} MapStyleConfig
|
|
287
|
+
*
|
|
288
|
+
* @property {'light' | 'dark'} [appColorScheme]
|
|
289
|
+
* App UI color scheme. Ensures that panels, buttons and controls use the appropriate colour scheme.
|
|
290
|
+
*
|
|
291
|
+
* @property {string} [attribution]
|
|
292
|
+
* Attribution text.
|
|
293
|
+
*
|
|
294
|
+
* @property {string} [backgroundColor]
|
|
295
|
+
* CSS background color. Allows the viewport background to matche the background layer of the style.
|
|
296
|
+
*
|
|
297
|
+
* @property {string} [id]
|
|
298
|
+
* Unique identifier for the style.
|
|
299
|
+
*
|
|
300
|
+
* @property {string} [label]
|
|
301
|
+
* Display label for the style.
|
|
302
|
+
*
|
|
303
|
+
* @property {string} [logo]
|
|
304
|
+
* URL to logo image.
|
|
305
|
+
*
|
|
306
|
+
* @property {string} [logoAltText]
|
|
307
|
+
* Alt text for logo.
|
|
308
|
+
*
|
|
309
|
+
* @property {'light' | 'dark'} [mapColorScheme]
|
|
310
|
+
* Map color scheme. Used to determine the style of controls on the map. eg. Halo colours etc
|
|
311
|
+
*
|
|
312
|
+
* @property {string} [thumbnail]
|
|
313
|
+
* URL to thumbnail image.
|
|
314
|
+
*
|
|
315
|
+
* @property {string} url
|
|
316
|
+
* URL to the style.json (Mapbox Style Specification).
|
|
317
|
+
*/
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Configuration for a map marker.
|
|
321
|
+
*
|
|
322
|
+
* @typedef {Object} MarkerConfig
|
|
323
|
+
*
|
|
324
|
+
* @property {[number, number]} coords
|
|
325
|
+
* Coordinates [lng, lat] or [x, y].
|
|
326
|
+
*
|
|
327
|
+
* @property {string} id
|
|
328
|
+
* Unique marker identifier.
|
|
329
|
+
*
|
|
330
|
+
* @property {MarkerOptions} [options]
|
|
331
|
+
* Optional marker appearance options.
|
|
332
|
+
*/
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Options for customizing marker appearance.
|
|
336
|
+
*
|
|
337
|
+
* @typedef {Object} MarkerOptions
|
|
338
|
+
*
|
|
339
|
+
* @property {string | Record<string, string>} [color]
|
|
340
|
+
* Marker color or object with colors keyed by style ID.
|
|
341
|
+
*
|
|
342
|
+
* @property {string} [shape]
|
|
343
|
+
* Marker shape (e.g., 'pin').
|
|
344
|
+
*/
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Defines a panel that can be rendered in the UI at various breakpoints.
|
|
348
|
+
*
|
|
349
|
+
* @typedef {Object} PanelDefinition
|
|
350
|
+
*
|
|
351
|
+
* @property {PanelBreakpointConfig} desktop
|
|
352
|
+
* Desktop breakpoint configuration.
|
|
353
|
+
*
|
|
354
|
+
* @property {string} [html]
|
|
355
|
+
* HTML content.
|
|
356
|
+
*
|
|
357
|
+
* @property {string} id
|
|
358
|
+
* Panel identifier.
|
|
359
|
+
*
|
|
360
|
+
* @property {string} label
|
|
361
|
+
* Accessible label. Used as the panel heading.
|
|
362
|
+
*
|
|
363
|
+
* @property {PanelBreakpointConfig} mobile
|
|
364
|
+
* Mobile breakpoint configuration.
|
|
365
|
+
*
|
|
366
|
+
* @property {ComponentType} [render]
|
|
367
|
+
* Render component.
|
|
368
|
+
*
|
|
369
|
+
* @property {boolean} [showLabel]
|
|
370
|
+
* Whether to show the panel heading. The panel heading is visually hidden if false.
|
|
371
|
+
*
|
|
372
|
+
* @property {PanelBreakpointConfig} tablet
|
|
373
|
+
* Tablet breakpoint configuration.
|
|
374
|
+
*/
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Descriptor for lazy-loading a plugin.
|
|
378
|
+
*
|
|
379
|
+
* @typedef {Object} PluginDescriptor
|
|
380
|
+
*
|
|
381
|
+
* @property {string} id
|
|
382
|
+
* Unique plugin identifier.
|
|
383
|
+
*
|
|
384
|
+
* @property {() => Promise<PluginManifest>} load
|
|
385
|
+
* Async loader.
|
|
386
|
+
*
|
|
387
|
+
* @property {Partial<PluginManifest>} [manifest]
|
|
388
|
+
* Optional manifest overrides.
|
|
389
|
+
*/
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Definition for a custom icon that can be registered and used by buttons.
|
|
393
|
+
*
|
|
394
|
+
* @typedef {Object} IconDefinition
|
|
395
|
+
*
|
|
396
|
+
* @property {string} id
|
|
397
|
+
* Unique icon identifier.
|
|
398
|
+
*
|
|
399
|
+
* @property {string} svgContent
|
|
400
|
+
* Raw SVG content (without the outer SVG tag).
|
|
401
|
+
*/
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Manifest defining a plugin's buttons, panels, controls, API methods, and state.
|
|
405
|
+
*
|
|
406
|
+
* @typedef {Object} PluginManifest
|
|
407
|
+
*
|
|
408
|
+
* @property {Record<string, Function>} [api]
|
|
409
|
+
* API methods.
|
|
410
|
+
*
|
|
411
|
+
* @property {ButtonDefinition[]} [buttons]
|
|
412
|
+
* Button definitions.
|
|
413
|
+
*
|
|
414
|
+
* @property {ControlDefinition[]} [controls]
|
|
415
|
+
* Control definitions.
|
|
416
|
+
*
|
|
417
|
+
* @property {IconDefinition[]} [icons]
|
|
418
|
+
* Icon definitions.
|
|
419
|
+
*
|
|
420
|
+
* @property {ComponentType} [InitComponent]
|
|
421
|
+
* Initialization component.
|
|
422
|
+
*
|
|
423
|
+
* @property {PanelDefinition[]} [panels]
|
|
424
|
+
* Panel definitions.
|
|
425
|
+
*
|
|
426
|
+
* @property {{ initialState: Record<string, any>, actions: Record<string, Function> }} [reducer]
|
|
427
|
+
* Reducer configuration.
|
|
428
|
+
*/
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Function that performs reverse geocoding to get an address from coordinates.
|
|
432
|
+
*
|
|
433
|
+
* @typedef {(url: string, transformRequest: TransformRequestFn | undefined, crs: string, zoom: number, coord: [number, number]) => Promise<string | null>} ReverseGeocodeFn
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Descriptor for lazy-loading a reverse geocode provider.
|
|
438
|
+
*
|
|
439
|
+
* @typedef {Object} ReverseGeocodeProviderDescriptor
|
|
440
|
+
*
|
|
441
|
+
* @property {() => Promise<ReverseGeocodeFn>} load
|
|
442
|
+
* Load reverse geocode function.
|
|
443
|
+
*
|
|
444
|
+
* @property {TransformRequestFn} [transformRequest]
|
|
445
|
+
* Request transformer.
|
|
446
|
+
*
|
|
447
|
+
* @property {string} [url]
|
|
448
|
+
* Provider URL.
|
|
449
|
+
*/
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Function to transform outgoing requests (e.g., to add authentication headers).
|
|
453
|
+
*
|
|
454
|
+
* @typedef {(request: Request) => Request | Promise<Request>} TransformRequestFn
|
|
455
|
+
*/
|
|
456
|
+
|
|
457
|
+
/**
|
|
458
|
+
* Configuration options for the InteractiveMap constructor.
|
|
459
|
+
*
|
|
460
|
+
* Some properties (zoom, center, minZoom, maxZoom, bounds, extent) are passed
|
|
461
|
+
* directly to the underlying map engine. See your map provider's documentation
|
|
462
|
+
* for detailed behaviour.
|
|
463
|
+
*
|
|
464
|
+
* @typedef {Object} InteractiveMapConfig
|
|
465
|
+
*
|
|
466
|
+
* @property {'light' | 'dark'} [appColorScheme='light']
|
|
467
|
+
* Application colour scheme.
|
|
468
|
+
*
|
|
469
|
+
* @property {boolean} [autoColorScheme=false]
|
|
470
|
+
* Whether to automatically determine the colour scheme based on system preferences.
|
|
471
|
+
*
|
|
472
|
+
* @property {string} [backgroundColor='var(--background-color)']
|
|
473
|
+
* Background color for the map container. A CSS color value.
|
|
474
|
+
*
|
|
475
|
+
* @property {'buttonFirst' | 'hybrid' | 'inline' | 'mapOnly'} [behaviour='buttonFirst']
|
|
476
|
+
* Map interaction behaviour mode.
|
|
477
|
+
*
|
|
478
|
+
* @property {[number, number, number, number]} [bounds]
|
|
479
|
+
* Initial bounds [west, south, east, north]. Equivalent to extent; use whichever matches your map provider's terminology.
|
|
480
|
+
*
|
|
481
|
+
* @property {string} [buttonClass='im-c-open-map-button']
|
|
482
|
+
* CSS class applied to the 'Open map' button.
|
|
483
|
+
*
|
|
484
|
+
* @property {string} [buttonText='Map view']
|
|
485
|
+
* Text content for the button used to open or toggle the map view.
|
|
486
|
+
*
|
|
487
|
+
* @property {[number, number]} [center]
|
|
488
|
+
* Initial center [lng, lat] or [easting, northing] depending on the crs of the map provider.
|
|
489
|
+
*
|
|
490
|
+
* @property {string} [containerHeight='600px']
|
|
491
|
+
* Height of the map container. Accepts any valid CSS height value (e.g. '640px', '40rem' or '100%').
|
|
492
|
+
*
|
|
493
|
+
* @property {string} [deviceNotSupportedText]
|
|
494
|
+
* Message displayed when the user's device or browser does not support the component.
|
|
495
|
+
*
|
|
496
|
+
* @property {boolean} [enableFullscreen=false]
|
|
497
|
+
* Whether a toggle fullscreen button is displayed.
|
|
498
|
+
*
|
|
499
|
+
* @property {boolean} [enableZoomControls=false]
|
|
500
|
+
* Whether zoom control buttons are displayed.
|
|
501
|
+
*
|
|
502
|
+
* @property {[number, number, number, number]} [extent]
|
|
503
|
+
* Initial extent [minX, minY, maxX, maxY]. Equivalent to bounds; use whichever matches your map provider's terminology.
|
|
504
|
+
*
|
|
505
|
+
* @property {string} [genericErrorText]
|
|
506
|
+
* Fallback error message shown when the map fails to load.
|
|
507
|
+
*
|
|
508
|
+
* @property {boolean} [hasExitButton=false]
|
|
509
|
+
* Whether an exit map button is displayed when the app is fullscreen.
|
|
510
|
+
*
|
|
511
|
+
* @property {number | null} [hybridWidth]
|
|
512
|
+
* Optional breakpoint (in pixels) for hybrid behaviour. Defaults to 'maxMobileWidth' when not set.
|
|
513
|
+
*
|
|
514
|
+
* @property {string} [keyboardHintText]
|
|
515
|
+
* HTML string providing keyboard shortcut instructions for accessibility users.
|
|
516
|
+
*
|
|
517
|
+
* @property {string} [mapLabel='Interactive map']
|
|
518
|
+
* Accessible label for the map, announced by screen readers.
|
|
519
|
+
*
|
|
520
|
+
* @property {MapProviderDescriptor} [mapProvider]
|
|
521
|
+
* A factory function that returns a map provider instance (e.g. maplibreProvider()).
|
|
522
|
+
*
|
|
523
|
+
* @property {'small' | 'medium' | 'large'} [mapSize='small']
|
|
524
|
+
* Visual size variant of the map.
|
|
525
|
+
*
|
|
526
|
+
* @property {MapStyleConfig} [mapStyle]
|
|
527
|
+
* Map style configuration.
|
|
528
|
+
*
|
|
529
|
+
* @property {string} [mapViewParamKey='mv']
|
|
530
|
+
* URL query parameter key used to control map view state.
|
|
531
|
+
*
|
|
532
|
+
* @property {string | Record<string, string>} [markerColor='#ff0000']
|
|
533
|
+
* Colour used for map markers. May be a single colour value or an object keyed by map style ID.
|
|
534
|
+
*
|
|
535
|
+
* @property {MarkerConfig[]} [markers]
|
|
536
|
+
* Initial markers to display on the map.
|
|
537
|
+
*
|
|
538
|
+
* @property {string} [markerShape='pin']
|
|
539
|
+
* Shape used for map markers.
|
|
540
|
+
*
|
|
541
|
+
* @property {[number, number, number, number]} [maxExtent]
|
|
542
|
+
* Maximum viewable extent [west, south, east, north].
|
|
543
|
+
*
|
|
544
|
+
* @property {number} [maxMobileWidth=640]
|
|
545
|
+
* Maximum viewport width (in pixels) considered to be a mobile device.
|
|
546
|
+
*
|
|
547
|
+
* @property {number} [maxZoom]
|
|
548
|
+
* Maximum zoom level.
|
|
549
|
+
*
|
|
550
|
+
* @property {number} [minDesktopWidth=835]
|
|
551
|
+
* Minimum viewport width (in pixels) considered to be a desktop device.
|
|
552
|
+
*
|
|
553
|
+
* @property {number} [minZoom]
|
|
554
|
+
* Minimum zoom level.
|
|
555
|
+
*
|
|
556
|
+
* @property {number} [nudgePanDelta=5]
|
|
557
|
+
* Smaller pan increment (in pixels) used for fine-grained panning.
|
|
558
|
+
*
|
|
559
|
+
* @property {number} [nudgeZoomDelta=0.1]
|
|
560
|
+
* Smaller zoom increment used for fine-grained zoom adjustments.
|
|
561
|
+
*
|
|
562
|
+
* @property {string} [pageTitle='Map view']
|
|
563
|
+
* Page title text used when the map is fullscreen.
|
|
564
|
+
*
|
|
565
|
+
* @property {number} [panDelta=100]
|
|
566
|
+
* Distance (in pixels) to pan the map during standard pan interactions.
|
|
567
|
+
*
|
|
568
|
+
* @property {PluginDescriptor[]} [plugins]
|
|
569
|
+
* Plugins to load.
|
|
570
|
+
*
|
|
571
|
+
* @property {boolean} [readMapText=false]
|
|
572
|
+
* Whether map text labels can be selected and read aloud by assistive technologies.
|
|
573
|
+
*
|
|
574
|
+
* @property {ReverseGeocodeProviderDescriptor} [reverseGeocodeProvider]
|
|
575
|
+
* A factory function that returns a reverse geocode provider instance.
|
|
576
|
+
*
|
|
577
|
+
* @property {TransformRequestFn} [transformRequest]
|
|
578
|
+
* Request transformer for outgoing requests (e.g., to add authentication headers).
|
|
579
|
+
*
|
|
580
|
+
* @property {number} [zoom]
|
|
581
|
+
* Initial zoom level.
|
|
582
|
+
*
|
|
583
|
+
* @property {number} [zoomDelta=1]
|
|
584
|
+
* Amount to change zoom level for standard zoom interactions.
|
|
585
|
+
*/
|
package/webpack.esm.mjs
CHANGED
|
@@ -118,18 +118,18 @@ const ALL_BUILDS = [
|
|
|
118
118
|
|
|
119
119
|
// Providers
|
|
120
120
|
{ entryPath: './providers/maplibre/src/index.js', outDir: 'providers/maplibre/dist/esm' },
|
|
121
|
-
{ entryPath: './providers/open-names/src/index.js', outDir: 'providers/open-names/dist/esm' },
|
|
122
|
-
// { entryPath: './providers/esri/src/index.js', outDir: 'providers/esri/dist/esm' },
|
|
121
|
+
{ entryPath: './providers/beta/open-names/src/index.js', outDir: 'providers/beta/open-names/dist/esm' },
|
|
122
|
+
// { entryPath: './providers/beta/esri/src/index.js', outDir: 'providers/beta/esri/dist/esm' },
|
|
123
123
|
|
|
124
124
|
// Plugins
|
|
125
|
-
{ entryPath: './plugins/scale-bar/src/index.js', outDir: 'plugins/scale-bar/dist/esm' },
|
|
126
|
-
{ entryPath: './plugins/use-location/src/index.js', outDir: 'plugins/use-location/dist/esm' },
|
|
125
|
+
{ entryPath: './plugins/beta/scale-bar/src/index.js', outDir: 'plugins/beta/scale-bar/dist/esm' },
|
|
126
|
+
{ entryPath: './plugins/beta/use-location/src/index.js', outDir: 'plugins/beta/use-location/dist/esm' },
|
|
127
127
|
{ entryPath: './plugins/search/src/index.js', outDir: 'plugins/search/dist/esm' },
|
|
128
128
|
{ entryPath: './plugins/interact/src/index.js', outDir: 'plugins/interact/dist/esm' },
|
|
129
|
-
{ entryPath: './plugins/datasets/src/index.js', outDir: 'plugins/datasets/dist/esm' },
|
|
130
|
-
{ entryPath: './plugins/map-styles/src/index.js', outDir: 'plugins/map-styles/dist/esm' },
|
|
131
|
-
{ entryPath: './plugins/draw-ml/src/index.js', outDir: 'plugins/draw-ml/dist/esm' },
|
|
132
|
-
{ entryPath: './plugins/frame/src/index.js', outDir: 'plugins/frame/dist/esm' }
|
|
129
|
+
{ entryPath: './plugins/beta/datasets/src/index.js', outDir: 'plugins/beta/datasets/dist/esm' },
|
|
130
|
+
{ entryPath: './plugins/beta/map-styles/src/index.js', outDir: 'plugins/beta/map-styles/dist/esm' },
|
|
131
|
+
{ entryPath: './plugins/beta/draw-ml/src/index.js', outDir: 'plugins/beta/draw-ml/dist/esm' },
|
|
132
|
+
{ entryPath: './plugins/beta/frame/src/index.js', outDir: 'plugins/beta/frame/dist/esm' }
|
|
133
133
|
]
|
|
134
134
|
|
|
135
135
|
// === Filter via environment variable ===
|
package/webpack.umd.mjs
CHANGED
|
@@ -133,18 +133,18 @@ const ALL_BUILDS = [
|
|
|
133
133
|
|
|
134
134
|
// Providers
|
|
135
135
|
{ entryPath: './providers/maplibre/src/index.js', libraryPath: 'maplibreProvider', outDir: 'providers/maplibre/dist/umd' },
|
|
136
|
-
{ entryPath: './providers/open-names/src/index.js', libraryPath: 'openNamesProvider', outDir: 'providers/open-names/dist/umd' },
|
|
137
|
-
// { entryPath: './providers/esri/src/index.js', libraryPath: 'esriProvider', outDir: 'providers/esri/dist/umd' },
|
|
136
|
+
{ entryPath: './providers/beta/open-names/src/index.js', libraryPath: 'openNamesProvider', outDir: 'providers/beta/open-names/dist/umd' },
|
|
137
|
+
// { entryPath: './providers/beta/esri/src/index.js', libraryPath: 'esriProvider', outDir: 'providers/beta/esri/dist/umd' },
|
|
138
138
|
|
|
139
139
|
// Plugins
|
|
140
|
-
{ entryPath: './plugins/scale-bar/src/index.js', libraryPath: 'scaleBarPlugin', outDir: 'plugins/scale-bar/dist/umd' },
|
|
141
|
-
{ entryPath: './plugins/use-location/src/index.js', libraryPath: 'drawPolygonMLPlugin', outDir: 'plugins/use-location/dist/umd' },
|
|
140
|
+
{ entryPath: './plugins/beta/scale-bar/src/index.js', libraryPath: 'scaleBarPlugin', outDir: 'plugins/beta/scale-bar/dist/umd' },
|
|
141
|
+
{ entryPath: './plugins/beta/use-location/src/index.js', libraryPath: 'drawPolygonMLPlugin', outDir: 'plugins/beta/use-location/dist/umd' },
|
|
142
142
|
{ entryPath: './plugins/search/src/index.js', libraryPath: 'searchPlugin', outDir: 'plugins/search/dist/umd' },
|
|
143
143
|
{ entryPath: './plugins/interact/src/index.js', libraryPath: 'interactPlugin', outDir: 'plugins/interact/dist/umd' },
|
|
144
|
-
{ entryPath: './plugins/datasets/src/index.js', libraryPath: 'datasetsPlugin', outDir: 'plugins/datasets/dist/umd' },
|
|
145
|
-
{ entryPath: './plugins/map-styles/src/index.js', libraryPath: 'mapStylesPlugin', outDir: 'plugins/map-styles/dist/umd' },
|
|
146
|
-
{ entryPath: './plugins/draw-ml/src/index.js', libraryPath: 'drawMLPlugin', outDir: 'plugins/draw-ml/dist/umd' },
|
|
147
|
-
{ entryPath: './plugins/frame/src/index.js', libraryPath: 'framePlugin', outDir: 'plugins/frame/dist/umd' }
|
|
144
|
+
{ entryPath: './plugins/beta/datasets/src/index.js', libraryPath: 'datasetsPlugin', outDir: 'plugins/beta/datasets/dist/umd' },
|
|
145
|
+
{ entryPath: './plugins/beta/map-styles/src/index.js', libraryPath: 'mapStylesPlugin', outDir: 'plugins/beta/map-styles/dist/umd' },
|
|
146
|
+
{ entryPath: './plugins/beta/draw-ml/src/index.js', libraryPath: 'drawMLPlugin', outDir: 'plugins/beta/draw-ml/dist/umd' },
|
|
147
|
+
{ entryPath: './plugins/beta/frame/src/index.js', libraryPath: 'framePlugin', outDir: 'plugins/beta/frame/dist/umd' }
|
|
148
148
|
]
|
|
149
149
|
|
|
150
150
|
// === Filter via environment variable ===
|