@mapcomponents/react-maplibre 1.3.3 → 1.5.0-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +163 -38
- package/CODE_OF_CONDUCT.md +70 -70
- package/CONTRIBUTING.md +157 -149
- package/README.md +1 -1
- package/docs_md/anatomy_of_a_mapcomponent.md +34 -37
- package/eslint.config.cjs +3 -0
- package/package.json +193 -224
- package/project.json +21 -0
- package/tsconfig.lib.json +29 -0
- package/vite.config.ts +61 -0
- package/.eslintrc.cjs +0 -33
- package/dist/assets/index.cjs-Iqz0mZaU.css +0 -98
- package/dist/assets/index.esm-Iqz0mZaU.css +0 -98
- package/dist/index.cjs.js +0 -22120
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -22000
- package/dist/index.esm.js.map +0 -1
- package/dist/src/components/MapLibreMap/MapLibreMap.d.ts +0 -34
- package/dist/src/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +0 -120
- package/dist/src/components/MlCenterPosition/MlCenterPosition.d.ts +0 -36
- package/dist/src/components/MlClientSearch/MlClientSearch.d.ts +0 -30
- package/dist/src/components/MlClientSearch/lib/SearchContext.d.ts +0 -13
- package/dist/src/components/MlClientSearch/lib/SearchForm.d.ts +0 -2
- package/dist/src/components/MlClientSearch/lib/createGeojsonFeature.d.ts +0 -4
- package/dist/src/components/MlComponentTemplate/MlComponentTemplate.d.ts +0 -18
- package/dist/src/components/MlComponentTemplate/MlComponentTemplate.stories_.d.ts +0 -14
- package/dist/src/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +0 -22
- package/dist/src/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +0 -13
- package/dist/src/components/MlCreatePdfForm/lib/PdfContext.d.ts +0 -8
- package/dist/src/components/MlCreatePdfForm/lib/PdfForm.d.ts +0 -25
- package/dist/src/components/MlCreatePdfForm/lib/PdfPreview.d.ts +0 -26
- package/dist/src/components/MlCreatePdfForm/lib/pdf.templates.d.ts +0 -11
- package/dist/src/components/MlCreatePngButton/MlCreatePngButton.d.ts +0 -22
- package/dist/src/components/MlFeatureEditor/MlFeatureEditor.d.ts +0 -5
- package/dist/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +0 -62
- package/dist/src/components/MlFollowGps/MlFollowGps.d.ts +0 -81
- package/dist/src/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +0 -98
- package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +0 -9
- package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +0 -9
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +0 -4
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +0 -5
- package/dist/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +0 -23
- package/dist/src/components/MlGlobeButton/MlGlobeButton.d.ts +0 -28
- package/dist/src/components/MlGpxViewer/MlGpxViewer.d.ts +0 -31
- package/dist/src/components/MlGpxViewer/util/GeoJsonContext.d.ts +0 -10
- package/dist/src/components/MlGpxViewer/util/GeoJsonProvider.d.ts +0 -5
- package/dist/src/components/MlGpxViewer/util/Metadata.d.ts +0 -7
- package/dist/src/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +0 -11
- package/dist/src/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +0 -4
- package/dist/src/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +0 -39
- package/dist/src/components/MlLayer/MlLayer.d.ts +0 -33
- package/dist/src/components/MlLayerMagnify/MlLayerMagnify.d.ts +0 -33
- package/dist/src/components/MlLayerSwipe/MlLayerSwipe.d.ts +0 -26
- package/dist/src/components/MlLayerSwipe/assets/SwipeIcon.d.ts +0 -10
- package/dist/src/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +0 -29
- package/dist/src/components/MlLayerSwitcher/components/LayerBox.d.ts +0 -10
- package/dist/src/components/MlMarker/MlMarker.d.ts +0 -29
- package/dist/src/components/MlMeasureTool/MlMeasureTool.d.ts +0 -37
- package/dist/src/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +0 -55
- package/dist/src/components/MlNavigationCompass/MlNavigationCompass.d.ts +0 -33
- package/dist/src/components/MlNavigationCompass/assets/CompassBackground.d.ts +0 -9
- package/dist/src/components/MlNavigationCompass/assets/CompassNeedle.d.ts +0 -9
- package/dist/src/components/MlNavigationTools/MlNavigationTools.d.ts +0 -60
- package/dist/src/components/MlOgcApiFeatures/MlOgcApiFeatures.d.ts +0 -45
- package/dist/src/components/MlOrderLayers/MlOrderLayers.d.ts +0 -21
- package/dist/src/components/MlScaleReference/MlScaleReference.d.ts +0 -9
- package/dist/src/components/MlShareMapState/MlShareMapState.d.ts +0 -35
- package/dist/src/components/MlSketchTool/MlSketchTool.d.ts +0 -50
- package/dist/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +0 -40
- package/dist/src/components/MlSpatialElevationProfile/util/getElevationData.d.ts +0 -13
- package/dist/src/components/MlTemporalController/MlTemporalController.d.ts +0 -181
- package/dist/src/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +0 -20
- package/dist/src/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +0 -22
- package/dist/src/components/MlTemporalController/utils/paintPicker.d.ts +0 -59
- package/dist/src/components/MlTemporalController/utils/useFilterData.d.ts +0 -14
- package/dist/src/components/MlTerrainLayer/MlTerrainLayer.d.ts +0 -28
- package/dist/src/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +0 -13
- package/dist/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +0 -12
- package/dist/src/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +0 -21
- package/dist/src/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +0 -22
- package/dist/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +0 -22
- package/dist/src/components/MlWmsLayer/MlWmsLayer.d.ts +0 -58
- package/dist/src/components/MlWmsLoader/MlWmsLoader.d.ts +0 -125
- package/dist/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +0 -4
- package/dist/src/components/MlWmsLoader/utils/WMSLinks.d.ts +0 -8
- package/dist/src/contexts/LayerContext.d.ts +0 -59
- package/dist/src/contexts/MapContext.d.ts +0 -26
- package/dist/src/contexts/SimpleDataContext.d.ts +0 -4
- package/dist/src/contexts/SimpleDataProvider.d.ts +0 -12
- package/dist/src/decorators/EmptyMapDecorator.d.ts +0 -4
- package/dist/src/decorators/GeoJsonMapDecorator.d.ts +0 -4
- package/dist/src/decorators/LowZoomDecorator.d.ts +0 -4
- package/dist/src/decorators/MapContextDecorator.d.ts +0 -7
- package/dist/src/decorators/MapContextDecoratorHooks.d.ts +0 -4
- package/dist/src/decorators/MapContextReduxStoreDecorator.d.ts +0 -7
- package/dist/src/decorators/MultiMapContextDecorator.d.ts +0 -4
- package/dist/src/decorators/NoNavToolsDecorator.d.ts +0 -4
- package/dist/src/decorators/ThemeDecorator.d.ts +0 -5
- package/dist/src/hooks/useAddImage/useAddImage.d.ts +0 -20
- package/dist/src/hooks/useAddProtocol/useAddProtocol.d.ts +0 -23
- package/dist/src/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +0 -35
- package/dist/src/hooks/useExportMap/index.d.ts +0 -11
- package/dist/src/hooks/useExportMap/lib.d.ts +0 -52
- package/dist/src/hooks/useFeatureEditor/useFeatureEditor.d.ts +0 -46
- package/dist/src/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -116
- package/dist/src/hooks/useFitLayerBounds.d.ts +0 -8
- package/dist/src/hooks/useGpx/useGpx.d.ts +0 -26
- package/dist/src/hooks/useLayer.d.ts +0 -36
- package/dist/src/hooks/useLayerContext.d.ts +0 -2
- package/dist/src/hooks/useLayerFilter/useLayerFilter.d.ts +0 -8
- package/dist/src/hooks/useLayerHoverPopup/LayerHoverPopup.d.ts +0 -24
- package/dist/src/hooks/useMap.d.ts +0 -14
- package/dist/src/hooks/useMapState.d.ts +0 -37
- package/dist/src/hooks/useSource.d.ts +0 -17
- package/dist/src/hooks/useWms.d.ts +0 -26
- package/dist/src/index.d.ts +0 -126
- package/dist/src/omt_styles/bright.d.ts +0 -2495
- package/dist/src/omt_styles/config.d.ts +0 -7
- package/dist/src/omt_styles/gruvbox.d.ts +0 -2420
- package/dist/src/omt_styles/medieval_kingdom.d.ts +0 -2420
- package/dist/src/omt_styles/monokai.d.ts +0 -2420
- package/dist/src/omt_styles/oceanic_next.d.ts +0 -2420
- package/dist/src/omt_styles/solarized.d.ts +0 -2420
- package/dist/src/protocol_handlers/csv.d.ts +0 -8
- package/dist/src/protocol_handlers/mbtiles.d.ts +0 -74
- package/dist/src/protocol_handlers/osm.d.ts +0 -10
- package/dist/src/protocol_handlers/topojson.d.ts +0 -9
- package/dist/src/protocol_handlers/utils/getProtocolData.d.ts +0 -1
- package/dist/src/protocol_handlers/utils/protocolPathParser.d.ts +0 -7
- package/dist/src/protocol_handlers/xml.d.ts +0 -10
- package/dist/src/stores/map.store.d.ts +0 -105
- package/dist/src/ui_components/AddLayerButton/AddLayerButton.d.ts +0 -17
- package/dist/src/ui_components/AddLayerButton/AddLayerPopup.d.ts +0 -15
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +0 -8
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +0 -13
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +0 -6
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +0 -7
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +0 -6
- package/dist/src/ui_components/ColorPicker/ColorPicker.d.ts +0 -15
- package/dist/src/ui_components/ColorPicker/transformers.d.ts +0 -10
- package/dist/src/ui_components/ConfirmDialog.d.ts +0 -16
- package/dist/src/ui_components/DemoDescriptions.d.ts +0 -12
- package/dist/src/ui_components/Dropzone.d.ts +0 -6
- package/dist/src/ui_components/ImageLoader.d.ts +0 -10
- package/dist/src/ui_components/LayerList/LayerList.d.ts +0 -7
- package/dist/src/ui_components/LayerList/LayerListFolder.d.ts +0 -9
- package/dist/src/ui_components/LayerList/LayerListItem.d.ts +0 -26
- package/dist/src/ui_components/LayerList/LayerListItemFactory.d.ts +0 -18
- package/dist/src/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +0 -19
- package/dist/src/ui_components/LayerList/util/LayerPropertyForm.d.ts +0 -10
- package/dist/src/ui_components/LayerList/util/SortableContainer.d.ts +0 -7
- package/dist/src/ui_components/LayerList/util/input/ColorPicker.d.ts +0 -10
- package/dist/src/ui_components/LayerTree/LayerOnMap.d.ts +0 -7
- package/dist/src/ui_components/LayerTree/LayerTree.d.ts +0 -6
- package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +0 -18
- package/dist/src/ui_components/LayerTree/util/LayerPropertyForm.d.ts +0 -9
- package/dist/src/ui_components/LayerTree/util/input/ColorPicker.d.ts +0 -7
- package/dist/src/ui_components/LoadingOverlayContext.d.ts +0 -4
- package/dist/src/ui_components/MapcomponentsTheme.d.ts +0 -36
- package/dist/src/ui_components/SelectStyleButton/SelectStyleButton.d.ts +0 -20
- package/dist/src/ui_components/SelectStyleButton/SelectStylePopup.d.ts +0 -18
- package/dist/src/ui_components/Sidebar.d.ts +0 -13
- package/dist/src/ui_components/SpeedDial/SpeedDial.d.ts +0 -14
- package/dist/src/ui_components/TopToolbar.d.ts +0 -9
- package/dist/src/ui_components/UploadButton.d.ts +0 -8
- package/dist/src/util/BubbleForInstructions.d.ts +0 -16
- package/dist/src/util/Instructions.d.ts +0 -14
- package/eslint.config.mjs +0 -73
- package/rollup.config.mjs +0 -62
package/package.json
CHANGED
|
@@ -1,225 +1,194 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
"/src/decorators/",
|
|
196
|
-
"/src/lab/",
|
|
197
|
-
"/src/stories/",
|
|
198
|
-
"/src/ui_components/",
|
|
199
|
-
"/src/deckgl_components/",
|
|
200
|
-
"/src/components/MlBasicComponent",
|
|
201
|
-
"/src/components/MlMapDrawTools",
|
|
202
|
-
"/src/components/MlComponentTemplate/",
|
|
203
|
-
"/src/components/MlAerialPhotograph/",
|
|
204
|
-
"/src/components/MapLibreMapDebug/",
|
|
205
|
-
"/src/components/MlDemoDashboard/",
|
|
206
|
-
"/src/components/MlLaufwettbewerbApp/",
|
|
207
|
-
"/src/components/MlLaermkarte/",
|
|
208
|
-
"/src/components/MlMobilerImker/",
|
|
209
|
-
"/src/components/MlWanderApp/",
|
|
210
|
-
"(.test)\\.(ts|tsx|js)$",
|
|
211
|
-
"index\\.js$",
|
|
212
|
-
".*/lib/.*",
|
|
213
|
-
".*/utils/.*",
|
|
214
|
-
".*/util/.*",
|
|
215
|
-
".*/assets/.*",
|
|
216
|
-
".*/custom.d.tsx",
|
|
217
|
-
"custom\\-.*\\-mode\\.js$",
|
|
218
|
-
"(.stories)\\.(ts|tsx|js)$",
|
|
219
|
-
"/distribution/.*\\.(ts|js)$"
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
"resolutions": {
|
|
223
|
-
"jackspeak": "4.1.0"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
2
|
+
"name": "@mapcomponents/react-maplibre",
|
|
3
|
+
"version": "1.5.0-2",
|
|
4
|
+
"main": "dist/index.cjs.js",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"source": "src/index.ts",
|
|
8
|
+
"types": "dist/src/index.d.ts",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@dnd-kit/core": "^6.3.1",
|
|
11
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
12
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
13
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
14
|
+
"@emotion/css": "^11.13.5",
|
|
15
|
+
"@emotion/react": "^11.14.0",
|
|
16
|
+
"@emotion/styled": "^11.14.1",
|
|
17
|
+
"@mapbox/mapbox-gl-draw": "1.4.3",
|
|
18
|
+
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
|
|
19
|
+
"@mui/icons-material": "^7.3.2",
|
|
20
|
+
"@mui/material": "^7.3.2",
|
|
21
|
+
"@mui/system": "^7.3.2",
|
|
22
|
+
"@reduxjs/toolkit": "^2.9.0",
|
|
23
|
+
"@testing-library/dom": "^10.4.1",
|
|
24
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
25
|
+
"@testing-library/user-event": "^14.6.1",
|
|
26
|
+
"@tmcw/togeojson": "^7.1.2",
|
|
27
|
+
"@turf/helpers": "^7.2.0",
|
|
28
|
+
"@turf/turf": "^7.2.0",
|
|
29
|
+
"@types/d3": "^7.4.3",
|
|
30
|
+
"@types/geojson": "^7946.0.16",
|
|
31
|
+
"@types/react-color": "^3.0.13",
|
|
32
|
+
"@types/topojson-client": "^3.1.5",
|
|
33
|
+
"@types/topojson-specification": "^1.0.5",
|
|
34
|
+
"@xmldom/xmldom": "^0.9.8",
|
|
35
|
+
"camelcase": "^8.0.0",
|
|
36
|
+
"csv2geojson": "^5.1.2",
|
|
37
|
+
"d3": "^7.9.0",
|
|
38
|
+
"jspdf": "^3.0.2",
|
|
39
|
+
"maplibre-gl": "5.6.0",
|
|
40
|
+
"osm2geojson-lite": "^1.1.2",
|
|
41
|
+
"pako": "^2.1.0",
|
|
42
|
+
"react-color": "^2.19.3",
|
|
43
|
+
"react-moveable": "^0.56.0",
|
|
44
|
+
"react-redux": "^9.2.0",
|
|
45
|
+
"redux": "^5.0.1",
|
|
46
|
+
"redux-thunk": "^3.1.0",
|
|
47
|
+
"three": "^0.179.1",
|
|
48
|
+
"topojson-client": "^3.1.0",
|
|
49
|
+
"uuid": "^11.1.0",
|
|
50
|
+
"wms-capabilities": "^0.6.0"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@testing-library/react": "^16.3.0",
|
|
54
|
+
"@types/chai": "^5.2.2",
|
|
55
|
+
"@types/elasticlunr": "^0.9.9",
|
|
56
|
+
"@types/enzyme": "^3.10.19",
|
|
57
|
+
"@types/expect": "^24.3.2",
|
|
58
|
+
"@types/jest": "^30.0.0",
|
|
59
|
+
"@types/mapbox__mapbox-gl-draw": "^1.4.9",
|
|
60
|
+
"@types/mapbox__point-geometry": "^0.1.4",
|
|
61
|
+
"@types/mapbox__vector-tile": "^2.0.0",
|
|
62
|
+
"@types/mocha": "^10.0.10",
|
|
63
|
+
"@types/pako": "^2.0.4",
|
|
64
|
+
"@types/react": "^19.1.12",
|
|
65
|
+
"@types/react-dom": "^19.1.9",
|
|
66
|
+
"@types/sql.js": "^1.4.9",
|
|
67
|
+
"@types/three": "^0.179.0",
|
|
68
|
+
"@types/uuid": "^10.0.0",
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
70
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
71
|
+
"avj": "^0.0.0",
|
|
72
|
+
"babel-jest": "^30.1.2",
|
|
73
|
+
"babel-loader": "^10.0.0",
|
|
74
|
+
"babel-plugin-inline-react-svg": "^2.0.2",
|
|
75
|
+
"babel-plugin-styled-components": "^2.1.4",
|
|
76
|
+
"babel-preset-react-app": "^10.1.0",
|
|
77
|
+
"chai": "^6.0.1",
|
|
78
|
+
"elasticlunr": "^0.9.5",
|
|
79
|
+
"eslint-plugin-storybook": "^9.1.4",
|
|
80
|
+
"glob": "^11.0.3",
|
|
81
|
+
"jest": "30.0.5",
|
|
82
|
+
"jest-circus": "30.0.5",
|
|
83
|
+
"jest-environment-jsdom": "^30.1.2",
|
|
84
|
+
"jest-enzyme": "^7.1.2",
|
|
85
|
+
"jest-resolve": "30.0.5",
|
|
86
|
+
"jest-watch-typeahead": "3.0.1",
|
|
87
|
+
"mocha": "^11.7.2",
|
|
88
|
+
"node-fetch": "^3.3.2",
|
|
89
|
+
"path-browserify": "^1.0.1",
|
|
90
|
+
"postcss": "^8.5.6",
|
|
91
|
+
"react-app-polyfill": "^3.0.0",
|
|
92
|
+
"react-dev-utils": "^12.0.1",
|
|
93
|
+
"react-draggable": "^4.5.0",
|
|
94
|
+
"react-i18next": "^15.7.3",
|
|
95
|
+
"showdown": "^2.1.0",
|
|
96
|
+
"sql.js": "^1.13.0",
|
|
97
|
+
"ts-jest": "^29.4.1",
|
|
98
|
+
"ts-loader": "^9.5.4"
|
|
99
|
+
},
|
|
100
|
+
"jest": {
|
|
101
|
+
"roots": [
|
|
102
|
+
"<rootDir>/src"
|
|
103
|
+
],
|
|
104
|
+
"collectCoverageFrom": [
|
|
105
|
+
"src/**/*.{js,jsx,ts,tsx}",
|
|
106
|
+
"!src/**/*.d.ts"
|
|
107
|
+
],
|
|
108
|
+
"setupFiles": [
|
|
109
|
+
"react-app-polyfill/jsdom"
|
|
110
|
+
],
|
|
111
|
+
"setupFilesAfterEnv": [
|
|
112
|
+
"<rootDir>/src/setupTests.js"
|
|
113
|
+
],
|
|
114
|
+
"testMatch": [
|
|
115
|
+
"<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
|
|
116
|
+
"<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}"
|
|
117
|
+
],
|
|
118
|
+
"testEnvironment": "jsdom",
|
|
119
|
+
"transform": {
|
|
120
|
+
"^.+\\.(js|jsx|mjs|cjs|ts|tsx)$": "<rootDir>/config/jest/babelTransform.js",
|
|
121
|
+
"^.+\\.css$": "<rootDir>/config/jest/cssTransform.js",
|
|
122
|
+
"^(?!.*\\.(js|jsx|mjs|cjs|ts|tsx|css|json)$)": "<rootDir>/config/jest/fileTransform.js",
|
|
123
|
+
"^.+\\.svg$": "<rootDir>/config/jest/fileTransform.js"
|
|
124
|
+
},
|
|
125
|
+
"transformIgnorePatterns": [
|
|
126
|
+
"[/\\\\]node_modules[/\\\\](?!three/examples/jsm/).+\\.(js|jsx|mjs|cjs|ts|tsx)$",
|
|
127
|
+
"^.+\\.module\\.(css|sass|scss)$"
|
|
128
|
+
],
|
|
129
|
+
"modulePaths": [],
|
|
130
|
+
"moduleNameMapper": {
|
|
131
|
+
"^react-native$": "react-native-web",
|
|
132
|
+
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
|
|
133
|
+
"^maplibre-gl/dist/maplibre-gl$": "<rootDir>/node_modules/maplibre-gl",
|
|
134
|
+
"d3": "<rootDir>/node_modules/d3/dist/d3.min.js"
|
|
135
|
+
},
|
|
136
|
+
"moduleFileExtensions": [
|
|
137
|
+
"web.js",
|
|
138
|
+
"js",
|
|
139
|
+
"web.ts",
|
|
140
|
+
"ts",
|
|
141
|
+
"web.tsx",
|
|
142
|
+
"tsx",
|
|
143
|
+
"json",
|
|
144
|
+
"web.jsx",
|
|
145
|
+
"jsx",
|
|
146
|
+
"node"
|
|
147
|
+
],
|
|
148
|
+
"watchPlugins": [
|
|
149
|
+
"jest-watch-typeahead/filename",
|
|
150
|
+
"jest-watch-typeahead/testname"
|
|
151
|
+
],
|
|
152
|
+
"resetMocks": true,
|
|
153
|
+
"coveragePathIgnorePatterns": [
|
|
154
|
+
"/node_modules/",
|
|
155
|
+
"/src/decorators/",
|
|
156
|
+
"/src/lab/",
|
|
157
|
+
"/src/stories/",
|
|
158
|
+
"/src/ui_components/",
|
|
159
|
+
"/src/deckgl_components/",
|
|
160
|
+
"/src/components/MlBasicComponent",
|
|
161
|
+
"/src/components/MlMapDrawTools",
|
|
162
|
+
"/src/components/MlComponentTemplate/",
|
|
163
|
+
"/src/components/MlAerialPhotograph/",
|
|
164
|
+
"/src/components/MapLibreMapDebug/",
|
|
165
|
+
"/src/components/MlDemoDashboard/",
|
|
166
|
+
"/src/components/MlLaufwettbewerbApp/",
|
|
167
|
+
"/src/components/MlLaermkarte/",
|
|
168
|
+
"/src/components/MlMobilerImker/",
|
|
169
|
+
"/src/components/MlWanderApp/",
|
|
170
|
+
"(.test)\\.(ts|tsx|js)$",
|
|
171
|
+
"index\\.js$",
|
|
172
|
+
".*/lib/.*",
|
|
173
|
+
".*/utils/.*",
|
|
174
|
+
".*/util/.*",
|
|
175
|
+
".*/assets/.*",
|
|
176
|
+
".*/custom.d.tsx",
|
|
177
|
+
"custom\\-.*\\-mode\\.js$",
|
|
178
|
+
"(.stories)\\.(ts|tsx|js)$",
|
|
179
|
+
"/distribution/.*\\.(ts|js)$"
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"resolutions": {
|
|
183
|
+
"jackspeak": "4.1.0"
|
|
184
|
+
},
|
|
185
|
+
"scripts": {
|
|
186
|
+
"test": "node scripts/test.cjs --watchAll=false --coverage",
|
|
187
|
+
"test:noninteractive": "node scripts/test.cjs --verbose --watchAll=false --coverage",
|
|
188
|
+
"test:generate-output": "node scripts/test.cjs --watchAll=false --json --outputFile=./src/.jest-test-results.json || true",
|
|
189
|
+
"build-storybook": "storybook build -o docs-build",
|
|
190
|
+
"storybook-docs": "storybook dev --docs --no-manager-cache",
|
|
191
|
+
"build-catalogue-meta": "node scripts/build-catalogue-meta.js",
|
|
192
|
+
"create-component": "./scripts/create-map-component.sh"
|
|
193
|
+
}
|
|
194
|
+
}
|
package/project.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-maplibre",
|
|
3
|
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
+
"sourceRoot": "packages/react-maplibre/src",
|
|
5
|
+
"projectType": "library",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"// targets": "to see all targets run: nx show project react-maplibre --web",
|
|
8
|
+
"targets": {
|
|
9
|
+
"build": {
|
|
10
|
+
"executor": "@nx/vite:build",
|
|
11
|
+
"options": {
|
|
12
|
+
"outputPath": "dist/libs/react-maplibre"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"storybook": {
|
|
16
|
+
"options": {
|
|
17
|
+
"port": 4400
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../dist/out-tsc",
|
|
5
|
+
"types": [
|
|
6
|
+
"node",
|
|
7
|
+
"@nx/react/typings/cssmodule.d.ts",
|
|
8
|
+
"@nx/react/typings/image.d.ts",
|
|
9
|
+
"vite/client"
|
|
10
|
+
]
|
|
11
|
+
},
|
|
12
|
+
"exclude": [
|
|
13
|
+
"**/*.spec.ts",
|
|
14
|
+
"**/*.test.ts",
|
|
15
|
+
"**/*.spec.tsx",
|
|
16
|
+
"**/*.test.tsx",
|
|
17
|
+
"**/*.spec.js",
|
|
18
|
+
"**/*.test.js",
|
|
19
|
+
"**/*.spec.jsx",
|
|
20
|
+
"**/*.test.jsx",
|
|
21
|
+
"cypress/**/*",
|
|
22
|
+
"cypress.config.ts",
|
|
23
|
+
"**/*.cy.ts",
|
|
24
|
+
"**/*.cy.js",
|
|
25
|
+
"**/*.cy.tsx",
|
|
26
|
+
"**/*.cy.jsx"
|
|
27
|
+
],
|
|
28
|
+
"include": ["src", "src/**/*.json"]
|
|
29
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/// <reference types='vitest' />
|
|
2
|
+
import { defineConfig } from 'vite';
|
|
3
|
+
import react from '@vitejs/plugin-react';
|
|
4
|
+
import dts from 'vite-plugin-dts';
|
|
5
|
+
import * as path from 'path';
|
|
6
|
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
7
|
+
import { nxCopyAssetsPlugin } from '@nx/vite/plugins/nx-copy-assets.plugin';
|
|
8
|
+
/*import * as fs from 'node:fs';
|
|
9
|
+
|
|
10
|
+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));*/
|
|
11
|
+
|
|
12
|
+
export default defineConfig(() => ({
|
|
13
|
+
root: __dirname,
|
|
14
|
+
cacheDir: '../../node_modules/.vite/packages/react-maplibre',
|
|
15
|
+
plugins: [
|
|
16
|
+
react(),
|
|
17
|
+
nxViteTsPaths(),
|
|
18
|
+
nxCopyAssetsPlugin(['*.md']),
|
|
19
|
+
dts({
|
|
20
|
+
entryRoot: 'src',
|
|
21
|
+
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
22
|
+
pathsToAliases: false,
|
|
23
|
+
}),
|
|
24
|
+
],
|
|
25
|
+
// Uncomment this if you are using workers.
|
|
26
|
+
// worker: {
|
|
27
|
+
// plugins: [ nxViteTsPaths() ],
|
|
28
|
+
// },
|
|
29
|
+
// Configuration for building your library.
|
|
30
|
+
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
31
|
+
build: {
|
|
32
|
+
outDir: '../../dist/packages/react-maplibre',
|
|
33
|
+
emptyOutDir: true,
|
|
34
|
+
reportCompressedSize: true,
|
|
35
|
+
commonjsOptions: {
|
|
36
|
+
transformMixedEsModules: true,
|
|
37
|
+
},
|
|
38
|
+
lib: {
|
|
39
|
+
// Could also be a dictionary or array of multiple entry points.
|
|
40
|
+
entry: 'src/index.ts',
|
|
41
|
+
name: 'react-maplibre',
|
|
42
|
+
fileName: 'index',
|
|
43
|
+
// Change this to the formats you want to support.
|
|
44
|
+
// Don't forget to update your package.json as well.
|
|
45
|
+
formats: ['es' as const, 'cjs' as const],
|
|
46
|
+
},
|
|
47
|
+
sourcemap: true,
|
|
48
|
+
rollupOptions: {
|
|
49
|
+
// External packages that should not be bundled into your library.
|
|
50
|
+
external: [
|
|
51
|
+
'react',
|
|
52
|
+
'react-dom',
|
|
53
|
+
'd3',
|
|
54
|
+
'sql.js',
|
|
55
|
+
/* ...Object.keys(pkg.dependencies),
|
|
56
|
+
...Object.keys(pkg.devDependencies),*/
|
|
57
|
+
],
|
|
58
|
+
input: [path.join(__dirname, 'src/index.ts')],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
}));
|
package/.eslintrc.cjs
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
env: {
|
|
3
|
-
browser: true,
|
|
4
|
-
node: true,
|
|
5
|
-
es2021: true,
|
|
6
|
-
jest: true,
|
|
7
|
-
},
|
|
8
|
-
extends: [
|
|
9
|
-
"eslint:recommended",
|
|
10
|
-
"plugin:react/recommended",
|
|
11
|
-
"plugin:@typescript-eslint/recommended",
|
|
12
|
-
"prettier",
|
|
13
|
-
"plugin:storybook/recommended"
|
|
14
|
-
],
|
|
15
|
-
overrides: [],
|
|
16
|
-
parser: '@typescript-eslint/parser',
|
|
17
|
-
parserOptions: {
|
|
18
|
-
ecmaVersion: 'latest',
|
|
19
|
-
sourceType: 'module',
|
|
20
|
-
},
|
|
21
|
-
plugins: ['react', '@typescript-eslint'],
|
|
22
|
-
rules: {
|
|
23
|
-
'react/prop-types': 'off',
|
|
24
|
-
// empty functions can sometimes be set intentionally. e.g. with useRef/useState, if we want an empty function first
|
|
25
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
26
|
-
"@typescript-eslint/no-explicit-any": "off"
|
|
27
|
-
},
|
|
28
|
-
settings: {
|
|
29
|
-
react: {
|
|
30
|
-
version: 'detect',
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
};
|