deps: react-leaflet 1.8 -> 4.2 (+ leaflet 1.9) — the last legacy react-* lib
Ground-up hooks rewrite of the app's core map. Removes the final batch of
React-19-blocking warnings (legacy context on Map/LayersControl/TileLayer/
Marker/CircleMarker/Circle/Tooltip + ReactDOM.render from the old controls).
Core: <Map> -> <MapContainer>; .leafletElement refs (6 files) -> the map/
layer instances directly, via a <MapReady> child (useMap) + plain refs on
Marker/Circle/GeoJSON; controlled viewport (onViewportChanged + state.center/
zoom) -> <MapEvents> (useMapEvents moveend/zoomend) + imperative setView;
onClick -> eventHandlers={{click}}; Path styling -> pathOptions/style;
subsUnion takes the L.Map directly.
The 4 v1-only plugins reimplemented (new in-repo helpers under Maps/):
- react-leaflet-control -> MapControl (L.Control + createPortal)
- react-leaflet-google -> GoogleMutantLayer (createLayerComponent +
leaflet.gridlayer.googlemutant; Google Maps API already loaded by Gkeys)
- react-leaflet-fullscreen -> createControlComponent + leaflet.fullscreen
- leaflet-sleep / leaflet-graphicscale kept as vanilla (work on leaflet 1.9)
Browser-verified: /fires (tiles, OSM+Google layer switch, custom control,
fullscreen, graphic scale, pan/zoom -> re-fetch, no NaN), fire detail
(GeoJSON rect + fitBounds), home (3 maps coexist; SelectionMap draggable
marker -> updatePosition + distance circle). Console now shows 0 React
warnings on home/fires. REST smoke byte-identical.
This commit is contained in:
parent
e61a3a9bcb
commit
bc778bfd97
18 changed files with 276 additions and 220 deletions
111
package-lock.json
generated
111
package-lock.json
generated
|
|
@ -36,9 +36,11 @@
|
|||
"jquery-validation": "^1.17.0",
|
||||
"jsend": "^1.0.2",
|
||||
"juice": "^4.2.2",
|
||||
"leaflet": "^1.3.1",
|
||||
"leaflet": "^1.9.4",
|
||||
"leaflet-graphicscale": "0.0.2",
|
||||
"leaflet-sleep": "^0.5.1",
|
||||
"leaflet.fullscreen": "^3.0.2",
|
||||
"leaflet.gridlayer.googlemutant": "^0.14.1",
|
||||
"lodash": "^4.17.4",
|
||||
"loms.perlin": "^1.0.1",
|
||||
"map-common-utils": "^0.5.0",
|
||||
|
|
@ -66,10 +68,7 @@
|
|||
"react-dom": "^18.3.1",
|
||||
"react-helmet-async": "^2.0.5",
|
||||
"react-i18next": "^14.1.3",
|
||||
"react-leaflet": "^1.8.0",
|
||||
"react-leaflet-control": "^1.4.0",
|
||||
"react-leaflet-fullscreen": "0.0.6",
|
||||
"react-leaflet-google": "^3.2.1",
|
||||
"react-leaflet": "^4.2.1",
|
||||
"react-mobile-store-button": "0.0.3",
|
||||
"react-places-autocomplete": "^5.4.3",
|
||||
"react-resize-detector": "^1.1.0",
|
||||
|
|
@ -1433,6 +1432,17 @@
|
|||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-leaflet/core": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz",
|
||||
"integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==",
|
||||
"license": "Hippocratic-2.1",
|
||||
"peerDependencies": {
|
||||
"leaflet": "^1.9.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-types/shared": {
|
||||
"version": "3.36.0",
|
||||
"resolved": "https://registry.npmjs.org/@react-types/shared/-/shared-3.36.0.tgz",
|
||||
|
|
@ -11138,9 +11148,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/leaflet": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.3.1.tgz",
|
||||
"integrity": "sha512-adQOIzh+bfdridLM1xIgJ9VnJbAUY3wqs/ueF+ITla+PLQ1z47USdBKUf+iD9FuUA8RtlT6j6hZBfZoA6mW+XQ=="
|
||||
"version": "1.9.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.9.4.tgz",
|
||||
"integrity": "sha512-nxS1ynzJOmOlHp+iL3FyWqK89GtNL8U8rvlMOsQdTTssxZwCXh8N2NB3GDQOL+YR3XnWyZAxwQixURb+FA74PA==",
|
||||
"license": "BSD-2-Clause"
|
||||
},
|
||||
"node_modules/leaflet-graphicscale": {
|
||||
"version": "0.0.2",
|
||||
|
|
@ -11154,9 +11165,16 @@
|
|||
"integrity": "sha1-kfhDPzjtu2uKm3jT0E7HOW6fYPY="
|
||||
},
|
||||
"node_modules/leaflet.fullscreen": {
|
||||
"version": "1.4.4",
|
||||
"resolved": "https://registry.npmjs.org/leaflet.fullscreen/-/leaflet.fullscreen-1.4.4.tgz",
|
||||
"integrity": "sha512-HxHDHAQt/Q7nMlo/v3MUhir30GXt4YXIbmyJT53EnnBAyXC6IbKXeCnl2Mlsj6V5kSBwh3J8No6btaBdAz64og=="
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/leaflet.fullscreen/-/leaflet.fullscreen-3.0.2.tgz",
|
||||
"integrity": "sha512-m27waFVmwdrLGXjZw2L8b7w/W28EY+u7IGzK2x8K99XaPuzKbjI+/H1j0OMawLcRPZyDRh+39XpyLsvDwHUEoA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/leaflet.gridlayer.googlemutant": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmjs.org/leaflet.gridlayer.googlemutant/-/leaflet.gridlayer.googlemutant-0.14.1.tgz",
|
||||
"integrity": "sha512-/OYxEjmgxO1U1KOhTzg+m8c0b95J0943LU8DXQmdJu/x2f+1Ur78rvEPO2QCS0cmwZ3m6FvE5I3zXnBzJNWRCA==",
|
||||
"license": "Beerware"
|
||||
},
|
||||
"node_modules/leven": {
|
||||
"version": "2.1.0",
|
||||
|
|
@ -11270,11 +11288,6 @@
|
|||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
||||
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.5",
|
||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.5.tgz",
|
||||
"integrity": "sha512-Ez3ONp3TK9gX1HYKp6IhetcVybD+2F+Yp6GS9dfH8ue6EOCEzQtQEh4K0FYWBP9qLv+lzeQAYXw+3ySfxyZqkw=="
|
||||
},
|
||||
"node_modules/lodash._basecallback": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/lodash._basecallback/-/lodash._basecallback-3.3.1.tgz",
|
||||
|
|
@ -19621,67 +19634,17 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/react-leaflet": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-1.8.0.tgz",
|
||||
"integrity": "sha512-/2mm/ZQodvcknMJpHm0UMbsQIeQVe9TNA62TUYzTWEX6yAqfLxjQmKIio0xKWSoMIRuQ0R1lROvVZFgiHT7KNw==",
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet/-/react-leaflet-4.2.1.tgz",
|
||||
"integrity": "sha512-p9chkvhcKrWn/H/1FFeVSqLdReGwn2qmiobOQGO3BifX+/vV/39qhY8dGqbdcPh1e6jxh/QHriLXr7a4eLFK4Q==",
|
||||
"license": "Hippocratic-2.1",
|
||||
"dependencies": {
|
||||
"lodash": "^4.0.0",
|
||||
"lodash-es": "^4.0.0",
|
||||
"warning": "^3.0.0"
|
||||
"@react-leaflet/core": "^2.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"leaflet": "^1.3.0",
|
||||
"prop-types": "^15.5.0",
|
||||
"react": "^15.0.0 || ^16.0.0",
|
||||
"react-dom": "^15.0.0 || ^16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-leaflet-control": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet-control/-/react-leaflet-control-1.4.0.tgz",
|
||||
"integrity": "sha1-sqNFgZQ+HTsCBi7XoOx556zHuSM=",
|
||||
"dependencies": {
|
||||
"prop-types": "^15.5.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"leaflet": "^0.7.7 || ^1.0.2",
|
||||
"react": "^0.14.7 || ^15.0.0",
|
||||
"react-dom": "^0.14.7 || ^15.0.0",
|
||||
"react-leaflet": "^0.11.5 || ^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-leaflet-fullscreen": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet-fullscreen/-/react-leaflet-fullscreen-0.0.6.tgz",
|
||||
"integrity": "sha512-YWP58+mgpyAbTPGdMRRWGuHV4GrkThmDRXth7qcVGqBxJTj1Nt4xy2zwOKcEYtfTimiG4lEXS18UQ+5cyuh0FQ==",
|
||||
"dependencies": {
|
||||
"leaflet.fullscreen": "^1.4.x"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"prop-types": "^15.6.x",
|
||||
"react": "^15.2.x || ^16.x",
|
||||
"react-dom": "^15.2.x || ^16.x",
|
||||
"react-leaflet": "^0.12.x || ^1.x"
|
||||
}
|
||||
},
|
||||
"node_modules/react-leaflet-google": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-leaflet-google/-/react-leaflet-google-3.2.1.tgz",
|
||||
"integrity": "sha1-WEEcGqvvi92PBjFZF+MjHX3ezb8=",
|
||||
"deprecated": "This npm package is obsolete. Plz, use the npm package react-leaflet-google-v2",
|
||||
"peerDependencies": {
|
||||
"google-maps": "^3.2.1",
|
||||
"leaflet": "^1.0.3",
|
||||
"react": "^15.5.0",
|
||||
"react-leaflet": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-leaflet/node_modules/warning": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz",
|
||||
"integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
"leaflet": "^1.9.0",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-lifecycles-compat": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue