@mapcomponents/react-maplibre 0.1.67 → 0.1.69

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.
Files changed (259) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/coverage/clover.xml +172 -174
  3. package/coverage/coverage-final.json +7 -7
  4. package/coverage/lcov-report/index.html +38 -38
  5. package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +43 -25
  6. package/coverage/lcov-report/src/components/MapLibreMap/index.html +10 -10
  7. package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +30 -51
  8. package/coverage/lcov-report/src/components/MlCenterPosition/index.html +3 -3
  9. package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
  10. package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
  11. package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.cy.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
  13. package/coverage/lcov-report/src/components/MlCreatePdfForm/index.html +1 -1
  14. package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
  15. package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
  16. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
  17. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
  18. package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +41 -98
  19. package/coverage/lcov-report/src/components/MlFollowGps/index.html +15 -15
  20. package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +2 -2
  21. package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
  22. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html +1 -1
  23. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +1 -1
  24. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +1 -1
  26. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +1 -1
  27. package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +1 -1
  28. package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/index.html +1 -1
  29. package/coverage/lcov-report/src/components/MlGpxViewer/MlGpxViewer.tsx.html +1 -1
  30. package/coverage/lcov-report/src/components/MlGpxViewer/index.html +1 -1
  31. package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
  32. package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
  33. package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
  34. package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
  35. package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
  36. package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
  37. package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
  38. package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
  39. package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
  40. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
  41. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
  42. package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
  43. package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
  44. package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
  45. package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
  46. package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
  47. package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
  48. package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
  49. package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +41 -113
  50. package/coverage/lcov-report/src/components/MlNavigationTools/index.html +15 -15
  51. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
  52. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
  53. package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
  54. package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.tsx.html +1 -1
  55. package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
  56. package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.tsx.html +1 -1
  57. package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
  58. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/ColorPicker.tsx.html +1 -1
  59. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +1 -1
  60. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +1 -1
  61. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +2 -2
  62. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +1 -1
  63. package/coverage/lcov-report/src/components/MlSketchTool/MlSketchTool.tsx.html +2 -2
  64. package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
  65. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.html +1 -1
  66. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
  67. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
  68. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreejsLayer.tsx.html +1 -1
  69. package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
  70. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
  71. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
  72. package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
  73. package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
  74. package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +22 -10
  75. package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +13 -13
  76. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
  77. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
  78. package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
  79. package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
  80. package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
  81. package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
  82. package/coverage/lcov-report/src/contexts/MapContext.tsx.html +24 -3
  83. package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
  84. package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
  85. package/coverage/lcov-report/src/contexts/index.html +1 -1
  86. package/coverage/lcov-report/src/hooks/index.html +1 -1
  87. package/coverage/lcov-report/src/hooks/useCameraFollowPath/index.html +1 -1
  88. package/coverage/lcov-report/src/hooks/useCameraFollowPath/useCameraFollowPath.tsx.html +1 -1
  89. package/coverage/lcov-report/src/hooks/useExportMap/index.html +1 -1
  90. package/coverage/lcov-report/src/hooks/useExportMap/index.ts.html +1 -1
  91. package/coverage/lcov-report/src/hooks/useExportMap/lib.ts.html +2 -2
  92. package/coverage/lcov-report/src/hooks/useGpx/index.html +1 -1
  93. package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +1 -1
  94. package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
  95. package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +1 -1
  96. package/coverage/lcov-report/src/hooks/useLayerFilter/index.html +1 -1
  97. package/coverage/lcov-report/src/hooks/useLayerFilter/useLayerFilter.ts.html +1 -1
  98. package/coverage/lcov-report/src/hooks/useLayerHoverPopup/index.html +1 -1
  99. package/coverage/lcov-report/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx.html +1 -1
  100. package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
  101. package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
  102. package/coverage/lcov-report/src/hooks/useSource.ts.html +1 -1
  103. package/coverage/lcov-report/src/hooks/useWms.ts.html +1 -1
  104. package/coverage/lcov-report/src/index.html +1 -1
  105. package/coverage/lcov-report/src/index.ts.html +27 -3
  106. package/coverage/lcov.info +326 -342
  107. package/dist/components/MapLibreMap/MapLibreMap.d.ts +3 -3
  108. package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +2 -0
  109. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +1 -1
  110. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +2 -15
  111. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +1 -14
  112. package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +1 -0
  113. package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +1 -0
  114. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +1 -0
  115. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +1 -0
  116. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +1 -0
  117. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.stories.d.ts +1 -0
  118. package/dist/components/MlCreatePdfForm/lib/PdfForm.d.ts +1 -0
  119. package/dist/components/MlCreatePdfForm/lib/_PdfPreview.d.ts +1 -0
  120. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +1 -0
  121. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +1 -0
  122. package/dist/components/MlFollowGps/MlFollowGps.d.ts +5 -23
  123. package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +2 -2
  124. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +1 -0
  125. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +1 -0
  126. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +1 -0
  127. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +1 -0
  128. package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +4 -1
  129. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +1 -0
  130. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +1 -0
  131. package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +1 -0
  132. package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +1 -0
  133. package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +1 -0
  134. package/dist/components/MlGpxViewer/util/MetadataDrawer.d.ts +1 -0
  135. package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +1 -0
  136. package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +1 -0
  137. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +1 -0
  138. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +1 -0
  139. package/dist/components/MlLayer/MlLayer.d.ts +1 -0
  140. package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +1 -0
  141. package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +1 -0
  142. package/dist/components/MlMarker/MlMarker.d.ts +1 -0
  143. package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +1 -0
  144. package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +1 -0
  145. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +5 -0
  146. package/dist/components/MlScaleReference/MlScaleReference.d.ts +1 -0
  147. package/dist/components/MlShareMapState/MlShareMapState.d.ts +1 -0
  148. package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +1 -0
  149. package/dist/components/MlSketchTool/LayerList/ColorPicker.d.ts +1 -0
  150. package/dist/components/MlSketchTool/LayerList/LayerList.d.ts +1 -0
  151. package/dist/components/MlSketchTool/LayerList/LayerListItem.d.ts +1 -0
  152. package/dist/components/MlSketchTool/LayerList/LayerPropertyForm.d.ts +1 -0
  153. package/dist/components/MlSketchTool/MlSketchTool.d.ts +1 -0
  154. package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +1 -0
  155. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +1 -0
  156. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +1 -0
  157. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +1 -0
  158. package/dist/components/MlThreeJsLayer/MlThreejsLayer.d.ts +1 -0
  159. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +1 -0
  160. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +3 -2
  161. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +1 -0
  162. package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +1 -0
  163. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +1 -0
  164. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +1 -0
  165. package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +1 -0
  166. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +1 -0
  167. package/dist/decorators/EmptyMapDecorator.d.ts +2 -0
  168. package/dist/decorators/ThemeDecorator.d.ts +2 -0
  169. package/dist/hooks/useCameraFollowPath/useCameraFollowPath.stories.d.ts +1 -0
  170. package/dist/hooks/useExportMap/lib.d.ts +1 -1
  171. package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +1 -0
  172. package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.d.ts +1 -0
  173. package/dist/index.d.ts +7 -0
  174. package/dist/index.esm.css +0 -97
  175. package/dist/index.esm.js +5495 -14503
  176. package/dist/index.esm.js.map +1 -1
  177. package/dist/ui_components/Dropzone.d.ts +1 -0
  178. package/dist/ui_components/ImageLoader.d.ts +1 -0
  179. package/dist/ui_components/LayerList/LayerList.d.ts +6 -0
  180. package/dist/ui_components/LayerList/LayerList.stories.d.ts +12 -0
  181. package/dist/ui_components/LayerList/LayerListFolder.d.ts +9 -0
  182. package/dist/ui_components/LayerList/LayerListItem.d.ts +18 -0
  183. package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +15 -0
  184. package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +10 -0
  185. package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +10 -0
  186. package/dist/ui_components/LoadingOverlayContext.d.ts +0 -1
  187. package/dist/ui_components/MapcomponentsTheme.d.ts +7 -0
  188. package/dist/ui_components/Tooltip.d.ts +1 -0
  189. package/dist/ui_components/TopToolbar.d.ts +1 -0
  190. package/dist/ui_components/UploadButton.d.ts +1 -0
  191. package/dist/util/Instructions.d.ts +1 -0
  192. package/package.json +20 -24
  193. package/rollup.config.js +61 -44
  194. package/src/@types/assets/index.d.ts +1 -1
  195. package/src/App.css +0 -55
  196. package/src/components/MapLibreMap/MapLibreMap.stories.js +36 -37
  197. package/src/components/MapLibreMap/MapLibreMap.tsx +23 -17
  198. package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +1 -1
  199. package/src/components/MlCenterPosition/MlCenterPosition.tsx +22 -29
  200. package/src/components/MlCreatePdfForm/lib/PdfForm.tsx +6 -6
  201. package/src/components/MlFollowGps/MlFollowGps.stories.js +28 -10
  202. package/src/components/MlFollowGps/MlFollowGps.tsx +31 -50
  203. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +1 -1
  204. package/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.ts +16 -10
  205. package/src/components/MlGpxViewer/MlGpxViewer.stories.tsx +4 -13
  206. package/src/components/MlGpxViewer/util/MlGpxDemoLoader.tsx +3 -1
  207. package/src/components/MlNavigationTools/MlNavigationTools.stories.js +4 -5
  208. package/src/components/MlNavigationTools/MlNavigationTools.tsx +30 -54
  209. package/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx +1 -1
  210. package/src/components/MlSketchTool/MlSketchTool.tsx +1 -1
  211. package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +7 -3
  212. package/src/components/MlWmsLoader/MlWmsLoader.stories.tsx +3 -11
  213. package/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.tsx +2 -2
  214. package/src/components/MlWmsLoader/utils/WMSLinks.tsx +1 -1
  215. package/src/contexts/MapContext.tsx +8 -1
  216. package/src/custom.d.ts +4 -5
  217. package/src/decorators/EmptyMapDecorator.js +38 -0
  218. package/src/decorators/MapContextDecorator.js +10 -16
  219. package/src/decorators/MapContextDecoratorHooks.js +25 -30
  220. package/src/decorators/MultiMapContextDecorator.js +8 -18
  221. package/src/decorators/NoNavToolsDecorator.js +8 -15
  222. package/src/decorators/ThemeDecorator.js +24 -0
  223. package/src/decorators/style.css +0 -2
  224. package/src/hooks/useCameraFollowPath/useCameraFollowPath.stories.tsx +13 -19
  225. package/src/hooks/useExportMap/lib.ts +1 -1
  226. package/src/hooks/useGpx/useGpx.stories.js +1 -1
  227. package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.js +1 -1
  228. package/src/hooks/useMapState.stories.js +1 -1
  229. package/src/hooks/useSources.stories.js +1 -1
  230. package/src/index.ts +9 -0
  231. package/src/ui_components/LayerList/LayerList.stories.tsx +136 -0
  232. package/src/ui_components/LayerList/LayerList.tsx +12 -0
  233. package/src/ui_components/LayerList/LayerListFolder.tsx +82 -0
  234. package/src/ui_components/LayerList/LayerListItem.tsx +180 -0
  235. package/src/ui_components/LayerList/assets/sample_1.json +26 -0
  236. package/src/ui_components/LayerList/assets/sample_2.json +22 -0
  237. package/src/ui_components/LayerList/assets/sample_polygon_1.json +33 -0
  238. package/src/ui_components/LayerList/assets/style.json +2599 -0
  239. package/src/ui_components/LayerList/util/LayerListItemVectorLayer.tsx +92 -0
  240. package/src/ui_components/LayerList/util/LayerPropertyForm.tsx +125 -0
  241. package/src/ui_components/LayerList/util/input/ColorPicker.tsx +44 -0
  242. package/src/ui_components/MapcomponentsTheme.tsx +133 -0
  243. package/src/ui_components/Sidebar.tsx +16 -11
  244. package/src/ui_components/TopToolbar.tsx +1 -3
  245. package/src/util/BubbleForInstructions.js +14 -12
  246. package/tsconfig.json +3 -10
  247. package/dist/components/MlGPXViewer/MlGPXViewer.d.ts +0 -29
  248. package/dist/components/MlGPXViewer/MlGPXViewer.stories.d.ts +0 -16
  249. package/dist/components/MlGPXViewer/MlGPXViewer.test.d.ts +0 -1
  250. package/dist/components/MlGPXViewer/gpxConverter.d.ts +0 -11
  251. package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +0 -10
  252. package/dist/components/MlGPXViewer/util/GeoJsonProvider.d.ts +0 -4
  253. package/dist/components/MlLayer/MlLayer.stories.d.ts +0 -10
  254. package/dist/custom.d.d.ts +0 -22
  255. package/dist/decorators/ThemeWrapper.d.ts +0 -1
  256. package/dist/hooks/exportMap/index.d.ts +0 -11
  257. package/dist/hooks/exportMap/lib.d.ts +0 -36
  258. package/dist/ui_components/Legend.d.ts +0 -1
  259. package/dist/ui_components/LoadingOverlay.d.ts +0 -2
@@ -1,6 +1,6 @@
1
- import { FC } from "react";
2
- import { MapOptions as MapOptionsType } from "maplibre-gl";
3
- import "maplibre-gl/dist/maplibre-gl.css";
1
+ import { FC } from 'react';
2
+ import { MapOptions as MapOptionsType } from 'maplibre-gl';
3
+ import 'maplibre-gl/dist/maplibre-gl.css';
4
4
  type MapLibreMapProps = {
5
5
  /**
6
6
  * Id of the MapLibreGl(Wrapper) instance in mapContext
@@ -11,8 +11,10 @@ declare namespace storyoptions {
11
11
  }
12
12
  }
13
13
  }
14
+ export { themeDecorator as decorators };
14
15
  export namespace parameters {
15
16
  const sourceLink: string;
16
17
  }
17
18
  }
18
19
  import MapLibreMap from "./MapLibreMap";
20
+ import themeDecorator from "../../decorators/ThemeDecorator";
@@ -1,4 +1,4 @@
1
- import { Map, IControl, MapOptions as MapOptionsType, MapEventType, MapLayerEventType, StyleImageInterface, LayerSpecification, CustomLayerInterface, SourceSpecification, ControlPosition, StyleImageMetadata } from '!maplibre-gl';
1
+ import { Map, IControl, MapOptions as MapOptionsType, MapEventType, MapLayerEventType, StyleImageInterface, LayerSpecification, CustomLayerInterface, SourceSpecification, ControlPosition, StyleImageMetadata } from 'maplibre-gl';
2
2
  import { Map as MapType, Style } from 'maplibre-gl';
3
3
  type WrapperEventArgArray = [string, (arg0: unknown) => void];
4
4
  type EventArgArray = [
@@ -1,4 +1,5 @@
1
- import { SxProps, Theme } from "@mui/material";
1
+ /// <reference types="react" />
2
+ import { SxProps, Theme } from '@mui/material';
2
3
  export interface MlCenterPositionProps {
3
4
  /**
4
5
  * Id of the target MapLibre instance in mapContext
@@ -30,20 +31,6 @@ declare const MlCenterPosition: {
30
31
  (props: MlCenterPositionProps): JSX.Element;
31
32
  defaultProps: {
32
33
  mapId: undefined;
33
- style: {
34
- minWidth: string;
35
- minHeight: string;
36
- width: string;
37
- height: string;
38
- backgroundColor: string;
39
- borderRadius: string;
40
- margin: number;
41
- fontSize: string;
42
- ":hover": {
43
- backgroundColor: string;
44
- color: string;
45
- };
46
- };
47
34
  onColor: string;
48
35
  offColor: string;
49
36
  };
@@ -1,23 +1,10 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
4
5
  (props: import("./MlCenterPosition").MlCenterPositionProps): JSX.Element;
5
6
  defaultProps: {
6
7
  mapId: undefined;
7
- style: {
8
- minWidth: string;
9
- minHeight: string;
10
- width: string;
11
- height: string;
12
- backgroundColor: string;
13
- borderRadius: string;
14
- margin: number;
15
- fontSize: string;
16
- ":hover": {
17
- backgroundColor: string;
18
- color: string;
19
- };
20
- };
21
8
  onColor: string;
22
9
  offColor: string;
23
10
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface MlComponentTemplateProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface MlCreatePdfButtonProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { createPdfResolverParams } from '../../hooks/useExportMap/lib';
2
3
  import { SxProps } from '@mui/material';
3
4
  interface MlCreatePdfFormProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './lib/preview.css';
2
3
  declare const storyoptions: {
3
4
  title: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { createPdfResolverParams } from '../../../hooks/useExportMap/lib';
2
3
  interface PdfFormProps {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface PdfPreviewProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './MlFeatureEditor.css';
2
3
  import '@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css';
3
4
  import { GeoJSONObject, Feature } from '@turf/turf';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface MlFillExtrusionLayerProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,5 +1,5 @@
1
- import { SxProps } from "@mui/material";
2
- import { CircleLayerSpecification, FillLayerSpecification } from "maplibre-gl";
1
+ /// <reference types="react" />
2
+ import { CircleLayerSpecification, FillLayerSpecification } from 'maplibre-gl';
3
3
  interface MlFollowGpsProps {
4
4
  /**
5
5
  * Id of the target MapLibre instance in mapContext
@@ -39,13 +39,13 @@ interface MlFollowGpsProps {
39
39
  * Use any available paint prop from layer type "fill".
40
40
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
41
41
  */
42
- orientationConePaint?: FillLayerSpecification["paint"];
42
+ orientationConePaint?: FillLayerSpecification['paint'];
43
43
  /**
44
44
  * Position circle paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the position circle.
45
45
  * Use any available paint prop from layer type "circle".
46
46
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
47
47
  */
48
- circlePaint?: CircleLayerSpecification["paint"];
48
+ circlePaint?: CircleLayerSpecification['paint'];
49
49
  /**
50
50
  * Active button font color
51
51
  */
@@ -59,11 +59,7 @@ interface MlFollowGpsProps {
59
59
  * Use any available paint prop from layer type "fill".
60
60
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
61
61
  */
62
- accuracyPaint?: FillLayerSpecification["paint"];
63
- /**
64
- * CSS style object that is applied to the button component
65
- */
66
- buttonSx?: SxProps | any;
62
+ accuracyPaint?: FillLayerSpecification['paint'];
67
63
  }
68
64
  /**
69
65
  * Adds a button that makes the map follow the users GPS position using
@@ -74,20 +70,6 @@ declare const MlFollowGps: {
74
70
  (props: MlFollowGpsProps): JSX.Element;
75
71
  defaultProps: {
76
72
  mapId: undefined;
77
- buttonSx: {
78
- minWidth: string;
79
- minHeight: string;
80
- width: string;
81
- height: string;
82
- backgroundColor: string;
83
- borderRadius: string;
84
- margin: number;
85
- fontSize: string;
86
- ":hover": {
87
- backgroundColor: string;
88
- color: string;
89
- };
90
- };
91
73
  onColor: string;
92
74
  offColor: string;
93
75
  showAccuracyCircle: boolean;
@@ -4,7 +4,7 @@ declare namespace storyoptions {
4
4
  export const title: string;
5
5
  export { MlFollowGps as component };
6
6
  export const argTypes: {};
7
- export { mapContextDecorator as decorators };
7
+ export { noNavToolsDecorator as decorators };
8
8
  }
9
9
  import MlFollowGps from "./MlFollowGps";
10
- import mapContextDecorator from "../../decorators/MapContextDecorator";
10
+ import noNavToolsDecorator from "../../decorators/NoNavToolsDecorator";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Feature, FeatureCollection } from '@turf/turf';
2
3
  import { useLayerProps } from '../../hooks/useLayer';
3
4
  import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MlGeoJsonLayerProps } from './MlGeoJsonLayer';
2
3
  declare const storyoptions: {
3
4
  title: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
2
3
  declare const CircleMapStyler: (props: MlGeoJsonLayerProps) => JSX.Element;
3
4
  export default CircleMapStyler;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
2
3
  declare const HeatMapStyler: (props: MlGeoJsonLayerProps) => JSX.Element;
3
4
  export default HeatMapStyler;
@@ -1,2 +1,5 @@
1
- declare const getDefaultPaintPropsByType: Function;
1
+ import { LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
2
+ declare const getDefaultPaintPropsByType: (type: string, defaultPaintOverrides?: {
3
+ [key: string]: unknown;
4
+ } | undefined) => Exclude<LayerSpecification['paint'], RasterLayerSpecification['paint']>;
2
5
  export default getDefaultPaintPropsByType;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface MlGeojsonLayerWithSourceProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FeatureCollection } from '@turf/turf';
2
3
  import { MetadataType } from '../../hooks/useGpx/useGpx';
3
4
  export interface MlGpxViewerProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const GeoJsonProvider: ({ children }: {
2
3
  children: JSX.Element;
3
4
  }) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MetadataType } from '../../../hooks/useGpx/useGpx';
2
3
  type Props = {
3
4
  metadata: MetadataType[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface MlGpxDemoLoaderProps {
2
3
  open: boolean;
3
4
  setOpen: (open: boolean) => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export default function MlGpxViewerInstructions(props: {
2
3
  open: boolean;
3
4
  }): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SymbolLayerSpecification } from 'maplibre-gl';
2
3
  import { Feature, FeatureCollection } from '@turf/turf';
3
4
  export interface MlImageMarkerLayerProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: (props: import("./MlImageMarkerLayer").MlImageMarkerLayerProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Feature, FeatureCollection } from "@turf/turf";
2
3
  interface MlLayerProps {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface MlMarkerProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import * as turf from "@turf/turf";
2
3
  interface MlMeasureToolProps {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from "prop-types";
2
3
  interface MlNavigationCompassProps {
3
4
  mapId?: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SxProps } from "@mui/material";
2
3
  interface MlNavigationToolsProps {
3
4
  /**
@@ -33,6 +34,10 @@ interface MlNavigationToolsProps {
33
34
  * Style attribute for NavigationTools container
34
35
  */
35
36
  sx?: SxProps;
37
+ /**
38
+ * Style attribute for NavigationTools container
39
+ */
40
+ mediaIsMobile?: boolean;
36
41
  }
37
42
  /**
38
43
  * @component
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface MlScaleReferenceProps {
2
3
  mapId?: string;
3
4
  insertBeforeLayer?: string | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  export interface MapState {
3
4
  lat?: number;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { paintPropsType } from './LayerPropertyForm';
2
3
  type Props = {
3
4
  key: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  children: JSX.Element;
3
4
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  type Props = {
2
3
  layerComponent: JSX.Element;
3
4
  visible: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
2
3
  export type paintPropsType = CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
3
4
  type Props = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SxProps } from '@mui/system/styleFunctionSx/styleFunctionSx';
2
3
  export interface MlSketchToolProps {
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Feature, FeatureCollection } from '@turf/turf';
2
3
  /**
3
4
  * MlSpatialElevationProfile returns a Button that will add a standard OSM tile layer to the maplibre-gl instance.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  /**
3
4
  * Renders obj or gltf 3D Models on the MapLibreMap referenced by props.mapId
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
2
3
  type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
3
4
  transitionTime: number;
@@ -1,13 +1,14 @@
1
+ /// <reference types="react" />
1
2
  import { LayerSpecification } from 'maplibre-gl';
2
3
  import { VectorSourceSpecification } from 'maplibre-gl';
3
- interface MlVectorTileLayerProps {
4
+ export type MlVectorTileLayerProps = {
4
5
  mapId?: string;
5
6
  insertBeforeLayer?: string;
6
7
  layerId?: string;
7
8
  sourceOptions?: VectorSourceSpecification;
8
9
  url?: string;
9
10
  layers: LayerSpecification[];
10
- }
11
+ };
11
12
  /**
12
13
  * Adds a vector-tile source and 0...n vector-tile-layers to the MapLibre instance referenced by
13
14
  * props.mapId
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  import { RasterLayerSpecification, RasterSourceSpecification } from 'maplibre-gl';
3
4
  interface MlWmsLayerProps {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { useWmsProps } from '../../hooks/useWms';
2
3
  import { LngLat } from 'maplibre-gl';
3
4
  import { Layer2 } from 'wms-capabilities';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export default function MlWmsLoaderInstructions(props: {
2
3
  open: boolean;
3
4
  }): JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface wmsLinksProps {
2
3
  load: (str: string) => void;
3
4
  open: boolean;
@@ -0,0 +1,2 @@
1
+ export default decorators;
2
+ declare const decorators: ((Story: any, context: any) => JSX.Element)[];
@@ -0,0 +1,2 @@
1
+ export default decorators;
2
+ declare const decorators: ((Story: any, context: any) => JSX.Element)[];
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const storyoptions: {
2
3
  title: string;
3
4
  component: {
@@ -1,4 +1,4 @@
1
- import { Map } from '!maplibre-gl';
1
+ import { Map } from 'maplibre-gl';
2
2
  import jsPDF from 'jspdf';
3
3
  import MapLibreGlWrapper from '../../components/MapLibreMap/lib/MapLibreGlWrapper';
4
4
  import { BBox } from '@turf/turf';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import useLayerFilter from './useLayerFilter';
2
3
  declare const storyoptions: {
3
4
  title: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GeoJSONFeature } from 'maplibre-gl';
2
3
  interface useLayerHoverPopupProps {
3
4
  /**
package/dist/index.d.ts CHANGED
@@ -47,3 +47,10 @@ export { MapComponentsProvider } from "./contexts/MapContext";
47
47
  export { default as MapContext } from "./contexts/MapContext";
48
48
  export { default as SimpleDataProvider } from "./contexts/SimpleDataProvider";
49
49
  export { default as SimpleDataContext } from "./contexts/SimpleDataContext";
50
+ export { default as getTheme } from './ui_components/MapcomponentsTheme';
51
+ export { default as LayerList } from './ui_components/LayerList/LayerList';
52
+ export { default as LayerListItem } from './ui_components/LayerList/LayerListItem';
53
+ export { default as LayerListFolder } from './ui_components/LayerList/LayerListFolder';
54
+ export { default as LayerPropertyForm } from './ui_components/LayerList/util/LayerPropertyForm';
55
+ export { default as LayerListItemVectorLayer } from './ui_components/LayerList/util/LayerListItemVectorLayer';
56
+ export { default as ColorPicker } from './ui_components/LayerList/util/input/ColorPicker';