@mapcomponents/react-maplibre 0.1.49 → 0.1.51

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 (85) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/coverage/clover.xml +86 -86
  3. package/coverage/coverage-final.json +3 -3
  4. package/coverage/lcov-report/index.html +1 -1
  5. package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +1 -1
  6. package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
  7. package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
  8. package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
  9. package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
  10. package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
  11. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
  13. package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
  14. package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
  15. package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
  17. package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
  18. package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +26 -11
  19. package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
  20. package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
  21. package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
  22. package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
  23. package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
  24. package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
  26. package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
  27. package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
  28. package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
  29. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
  30. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
  31. package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
  32. package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
  33. package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
  34. package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
  35. package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
  36. package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
  37. package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
  38. package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
  39. package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
  40. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
  41. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
  42. package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
  43. package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
  44. package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
  45. package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
  46. package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
  47. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
  48. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
  49. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
  50. package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
  51. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +22 -19
  52. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
  53. package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
  54. package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
  55. package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
  56. package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
  57. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
  58. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
  59. package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
  60. package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
  61. package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
  62. package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
  63. package/coverage/lcov-report/src/contexts/MapContext.tsx.html +1 -1
  64. package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
  65. package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
  66. package/coverage/lcov-report/src/contexts/index.html +1 -1
  67. package/coverage/lcov-report/src/hooks/index.html +1 -1
  68. package/coverage/lcov-report/src/hooks/useLayer.ts.html +19 -10
  69. package/coverage/lcov-report/src/hooks/useMap.ts.html +1 -1
  70. package/coverage/lcov-report/src/hooks/useMapState.ts.html +1 -1
  71. package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
  72. package/coverage/lcov-report/src/index.html +1 -1
  73. package/coverage/lcov-report/src/index.ts.html +1 -1
  74. package/coverage/lcov.info +185 -185
  75. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +3 -2
  76. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +15 -8
  77. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +22 -17
  78. package/dist/hooks/useLayer.d.ts +7 -5
  79. package/dist/index.esm.js.map +1 -1
  80. package/package.json +1 -1
  81. package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +4 -3
  82. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +14 -9
  83. package/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.ts +2 -1
  84. package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +18 -17
  85. package/src/hooks/useLayer.ts +11 -8
package/CHANGELOG.md CHANGED
@@ -1,11 +1,32 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.1.51] - 2022-07-12
4
+
5
+ ### Changed
6
+
7
+ - @ 938f665: improve typescript type definitions for MlGeoJsonLayer attributes, useLayer hook props, maplibre reference returned by useMap hook
8
+ - 3349332: improve MlTransitionGeoJsonLayer attribute types
9
+
10
+ ## [v0.1.49] - 2022-07-11
11
+
12
+ ### Added
13
+
14
+ - @c119564: add useLayer hook tests
15
+ - 27d9ded: add typescript type definitions
16
+ ### Changed
17
+
18
+ - 9244711: update readme to make it more beginner friendly
19
+
20
+ ### Fixed
21
+
22
+ - 6b3c223: add touch support to MlFeatureEditor
23
+ - a531174: refactor MlFeatureEditor
3
24
 
4
25
  ## [v0.1.48] - 2022-06-15
5
26
 
6
27
  ### Added
7
28
 
8
- - 4d53b8a: Merge pull request #17 from mapcomponents/feature/MeasureTool-add-miles-option
29
+ - 4d53b8a: add miles option to MlMeasureTool
9
30
  ### Fixed
10
31
 
11
32
  - 0082e6d: fix MlMeasureTools typescript transpilation errors
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage generated="1657564890361" clover="3.2.0">
3
- <project timestamp="1657564890362" name="All files">
2
+ <coverage generated="1657660766940" clover="3.2.0">
3
+ <project timestamp="1657660766941" name="All files">
4
4
  <metrics statements="1626" coveredstatements="624" conditionals="1001" coveredconditionals="301" methods="294" coveredmethods="105" elements="2921" coveredelements="1030" complexity="0" loc="1626" ncloc="1626" packages="31" files="38" classes="38"/>
5
5
  <package name="src">
6
6
  <metrics statements="0" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
@@ -566,10 +566,10 @@
566
566
  <metrics statements="4" coveredstatements="4" conditionals="8" coveredconditionals="7" methods="1" coveredmethods="1"/>
567
567
  <file name="MlGeoJsonLayer.tsx" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx">
568
568
  <metrics statements="4" coveredstatements="4" conditionals="8" coveredconditionals="7" methods="1" coveredmethods="1"/>
569
- <line num="78" count="11" type="stmt"/>
570
- <line num="79" count="32" type="cond" truecount="1" falsecount="1"/>
571
- <line num="81" count="32" type="stmt"/>
572
- <line num="102" count="32" type="stmt"/>
569
+ <line num="83" count="11" type="stmt"/>
570
+ <line num="84" count="32" type="cond" truecount="1" falsecount="1"/>
571
+ <line num="86" count="32" type="stmt"/>
572
+ <line num="107" count="32" type="stmt"/>
573
573
  </file>
574
574
  </package>
575
575
  <package name="src.components.MlImageMarkerLayer">
@@ -1297,42 +1297,42 @@
1297
1297
  <metrics statements="36" coveredstatements="25" conditionals="22" coveredconditionals="11" methods="7" coveredmethods="6"/>
1298
1298
  <file name="MlTransitionGeoJsonLayer.tsx" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx">
1299
1299
  <metrics statements="36" coveredstatements="25" conditionals="22" coveredconditionals="11" methods="7" coveredmethods="6"/>
1300
- <line num="11" count="10" type="stmt"/>
1301
- <line num="79" count="10" type="stmt"/>
1302
- <line num="80" count="12" type="stmt"/>
1303
- <line num="82" count="12" type="stmt"/>
1304
- <line num="86" count="12" type="stmt"/>
1305
- <line num="89" count="12" type="stmt"/>
1300
+ <line num="12" count="10" type="stmt"/>
1301
+ <line num="80" count="10" type="stmt"/>
1302
+ <line num="81" count="12" type="stmt"/>
1303
+ <line num="83" count="12" type="stmt"/>
1304
+ <line num="87" count="12" type="stmt"/>
1306
1305
  <line num="90" count="12" type="stmt"/>
1307
1306
  <line num="91" count="12" type="stmt"/>
1308
1307
  <line num="92" count="12" type="stmt"/>
1309
1308
  <line num="93" count="12" type="stmt"/>
1310
1309
  <line num="94" count="12" type="stmt"/>
1311
1310
  <line num="95" count="12" type="stmt"/>
1312
- <line num="99" count="12" type="stmt"/>
1313
- <line num="100" count="4" type="stmt"/>
1314
- <line num="102" count="2" type="cond" truecount="1" falsecount="1"/>
1315
- <line num="103" count="0" type="stmt"/>
1316
- <line num="108" count="12" type="stmt"/>
1317
- <line num="109" count="0" type="stmt"/>
1318
- <line num="123" count="12" type="stmt"/>
1319
- <line num="124" count="8" type="cond" truecount="3" falsecount="1"/>
1320
- <line num="126" count="0" type="cond" truecount="0" falsecount="2"/>
1321
- <line num="131" count="0" type="stmt"/>
1311
+ <line num="96" count="12" type="stmt"/>
1312
+ <line num="100" count="12" type="stmt"/>
1313
+ <line num="101" count="4" type="stmt"/>
1314
+ <line num="103" count="2" type="cond" truecount="1" falsecount="1"/>
1315
+ <line num="104" count="0" type="stmt"/>
1316
+ <line num="109" count="12" type="stmt"/>
1317
+ <line num="110" count="0" type="stmt"/>
1318
+ <line num="124" count="12" type="stmt"/>
1319
+ <line num="125" count="8" type="cond" truecount="3" falsecount="1"/>
1320
+ <line num="127" count="0" type="cond" truecount="0" falsecount="2"/>
1322
1321
  <line num="132" count="0" type="stmt"/>
1323
1322
  <line num="133" count="0" type="stmt"/>
1324
1323
  <line num="134" count="0" type="stmt"/>
1325
1324
  <line num="135" count="0" type="stmt"/>
1326
- <line num="137" count="0" type="stmt"/>
1327
- <line num="140" count="12" type="stmt"/>
1328
- <line num="141" count="4" type="cond" truecount="1" falsecount="1"/>
1329
- <line num="148" count="0" type="stmt"/>
1325
+ <line num="136" count="0" type="stmt"/>
1326
+ <line num="138" count="0" type="stmt"/>
1327
+ <line num="141" count="12" type="stmt"/>
1328
+ <line num="142" count="4" type="cond" truecount="1" falsecount="1"/>
1330
1329
  <line num="149" count="0" type="stmt"/>
1331
- <line num="153" count="12" type="stmt"/>
1332
- <line num="154" count="8" type="cond" truecount="4" falsecount="0"/>
1333
- <line num="156" count="4" type="stmt"/>
1334
- <line num="158" count="4" type="stmt"/>
1335
- <line num="161" count="12" type="stmt"/>
1330
+ <line num="150" count="0" type="stmt"/>
1331
+ <line num="154" count="12" type="stmt"/>
1332
+ <line num="155" count="8" type="cond" truecount="4" falsecount="0"/>
1333
+ <line num="157" count="4" type="stmt"/>
1334
+ <line num="159" count="4" type="stmt"/>
1335
+ <line num="162" count="12" type="stmt"/>
1336
1336
  </file>
1337
1337
  </package>
1338
1338
  <package name="src.components.MlUseMapDebugger">
@@ -1651,66 +1651,66 @@
1651
1651
  <metrics statements="173" coveredstatements="98" conditionals="106" coveredconditionals="56" methods="28" coveredmethods="16"/>
1652
1652
  <file name="useLayer.ts" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/hooks/useLayer.ts">
1653
1653
  <metrics statements="60" coveredstatements="46" conditionals="58" coveredconditionals="40" methods="8" coveredmethods="7"/>
1654
- <line num="30" count="13" type="stmt"/>
1655
- <line num="43" count="102" type="stmt"/>
1656
- <line num="48" count="102" type="stmt"/>
1657
- <line num="49" count="102" type="stmt"/>
1658
- <line num="50" count="102" type="stmt"/>
1654
+ <line num="33" count="13" type="stmt"/>
1655
+ <line num="46" count="102" type="stmt"/>
1656
+ <line num="51" count="102" type="stmt"/>
1659
1657
  <line num="52" count="102" type="stmt"/>
1660
- <line num="54" count="102" type="stmt"/>
1658
+ <line num="53" count="102" type="stmt"/>
1661
1659
  <line num="55" count="102" type="stmt"/>
1662
- <line num="59" count="102" type="stmt"/>
1663
- <line num="60" count="26" type="cond" truecount="1" falsecount="1"/>
1664
- <line num="62" count="26" type="cond" truecount="2" falsecount="0"/>
1665
- <line num="63" count="3" type="stmt"/>
1666
- <line num="65" count="26" type="cond" truecount="1" falsecount="1"/>
1667
- <line num="66" count="0" type="stmt"/>
1668
- <line num="68" count="26" type="stmt"/>
1669
- <line num="70" count="26" type="stmt"/>
1670
- <line num="91" count="26" type="stmt"/>
1671
- <line num="93" count="26" type="cond" truecount="2" falsecount="0"/>
1672
- <line num="94" count="6" type="stmt"/>
1673
- <line num="97" count="26" type="cond" truecount="2" falsecount="0"/>
1674
- <line num="98" count="4" type="stmt"/>
1675
- <line num="101" count="26" type="cond" truecount="2" falsecount="0"/>
1676
- <line num="102" count="2" type="stmt"/>
1677
- <line num="106" count="26" type="stmt"/>
1678
- <line num="109" count="0" type="cond" truecount="0" falsecount="4"/>
1679
- <line num="110" count="0" type="stmt"/>
1680
- <line num="111" count="0" type="stmt"/>
1681
- <line num="117" count="26" type="stmt"/>
1682
- <line num="118" count="26" type="stmt"/>
1683
- <line num="119" count="26" type="stmt"/>
1684
- <line num="122" count="102" type="stmt"/>
1685
- <line num="123" count="102" type="cond" truecount="2" falsecount="0"/>
1686
- <line num="125" count="56" type="cond" truecount="2" falsecount="0"/>
1687
- <line num="131" count="30" type="stmt"/>
1688
- <line num="134" count="26" type="stmt"/>
1689
- <line num="137" count="102" type="stmt"/>
1690
- <line num="138" count="49" type="cond" truecount="4" falsecount="0"/>
1691
- <line num="141" count="12" type="stmt"/>
1692
- <line num="144" count="102" type="stmt"/>
1693
- <line num="145" count="102" type="cond" truecount="2" falsecount="0"/>
1694
- <line num="151" count="46" type="stmt"/>
1695
- <line num="155" count="56" type="stmt"/>
1696
- <line num="156" count="56" type="cond" truecount="3" falsecount="1"/>
1697
- <line num="157" count="0" type="stmt"/>
1698
- <line num="159" count="0" type="stmt"/>
1699
- <line num="160" count="0" type="cond" truecount="0" falsecount="4"/>
1700
- <line num="161" count="0" type="stmt"/>
1660
+ <line num="57" count="102" type="stmt"/>
1661
+ <line num="58" count="102" type="stmt"/>
1662
+ <line num="62" count="102" type="stmt"/>
1663
+ <line num="63" count="26" type="cond" truecount="1" falsecount="1"/>
1664
+ <line num="65" count="26" type="cond" truecount="2" falsecount="0"/>
1665
+ <line num="66" count="3" type="stmt"/>
1666
+ <line num="68" count="26" type="cond" truecount="1" falsecount="1"/>
1667
+ <line num="69" count="0" type="stmt"/>
1668
+ <line num="71" count="26" type="stmt"/>
1669
+ <line num="73" count="26" type="stmt"/>
1670
+ <line num="94" count="26" type="stmt"/>
1671
+ <line num="96" count="26" type="cond" truecount="2" falsecount="0"/>
1672
+ <line num="97" count="6" type="stmt"/>
1673
+ <line num="100" count="26" type="cond" truecount="2" falsecount="0"/>
1674
+ <line num="101" count="4" type="stmt"/>
1675
+ <line num="104" count="26" type="cond" truecount="2" falsecount="0"/>
1676
+ <line num="105" count="2" type="stmt"/>
1677
+ <line num="109" count="26" type="stmt"/>
1678
+ <line num="112" count="0" type="cond" truecount="0" falsecount="4"/>
1679
+ <line num="113" count="0" type="stmt"/>
1680
+ <line num="114" count="0" type="stmt"/>
1681
+ <line num="120" count="26" type="stmt"/>
1682
+ <line num="121" count="26" type="stmt"/>
1683
+ <line num="122" count="26" type="stmt"/>
1684
+ <line num="125" count="102" type="stmt"/>
1685
+ <line num="126" count="102" type="cond" truecount="2" falsecount="0"/>
1686
+ <line num="128" count="56" type="cond" truecount="2" falsecount="0"/>
1687
+ <line num="134" count="30" type="stmt"/>
1688
+ <line num="137" count="26" type="stmt"/>
1689
+ <line num="140" count="102" type="stmt"/>
1690
+ <line num="141" count="49" type="cond" truecount="4" falsecount="0"/>
1691
+ <line num="144" count="12" type="stmt"/>
1692
+ <line num="147" count="102" type="stmt"/>
1693
+ <line num="148" count="102" type="cond" truecount="2" falsecount="0"/>
1694
+ <line num="154" count="46" type="stmt"/>
1695
+ <line num="158" count="56" type="stmt"/>
1696
+ <line num="159" count="56" type="cond" truecount="3" falsecount="1"/>
1697
+ <line num="160" count="0" type="stmt"/>
1698
+ <line num="162" count="0" type="stmt"/>
1699
+ <line num="163" count="0" type="cond" truecount="0" falsecount="4"/>
1701
1700
  <line num="164" count="0" type="stmt"/>
1702
- <line num="167" count="56" type="stmt"/>
1703
- <line num="168" count="56" type="cond" truecount="1" falsecount="1"/>
1704
- <line num="169" count="0" type="stmt"/>
1705
- <line num="170" count="0" type="stmt"/>
1706
- <line num="171" count="0" type="cond" truecount="0" falsecount="4"/>
1701
+ <line num="167" count="0" type="stmt"/>
1702
+ <line num="170" count="56" type="stmt"/>
1703
+ <line num="171" count="56" type="cond" truecount="1" falsecount="1"/>
1707
1704
  <line num="172" count="0" type="stmt"/>
1705
+ <line num="173" count="0" type="stmt"/>
1706
+ <line num="174" count="0" type="cond" truecount="0" falsecount="4"/>
1708
1707
  <line num="175" count="0" type="stmt"/>
1709
- <line num="179" count="102" type="stmt"/>
1710
- <line num="180" count="23" type="stmt"/>
1711
- <line num="181" count="10" type="stmt"/>
1712
- <line num="182" count="10" type="stmt"/>
1713
- <line num="186" count="102" type="stmt"/>
1708
+ <line num="178" count="0" type="stmt"/>
1709
+ <line num="182" count="102" type="stmt"/>
1710
+ <line num="183" count="23" type="stmt"/>
1711
+ <line num="184" count="10" type="stmt"/>
1712
+ <line num="185" count="10" type="stmt"/>
1713
+ <line num="189" count="102" type="stmt"/>
1714
1714
  </file>
1715
1715
  <file name="useMap.ts" path="/home/runner/work/react-map-components-maplibre/react-map-components-maplibre/src/hooks/useMap.ts">
1716
1716
  <metrics statements="30" coveredstatements="24" conditionals="14" coveredconditionals="8" methods="6" coveredmethods="5"/>