@mailwoman/react 10.8.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/fonts.css +3 -0
- package/lib/common/About.tsx +6 -5
- package/lib/common/ClientOnly.tsx +6 -4
- package/lib/common/CopyButton.tsx +6 -5
- package/lib/common/KindBadge.tsx +8 -7
- package/lib/common/LoadingIndicator.tsx +7 -7
- package/lib/common/PresetChips.tsx +5 -5
- package/lib/common/confidence-tiers.ts +3 -3
- package/lib/common/cx.ts +6 -6
- package/lib/common/text-tokens.ts +3 -3
- package/lib/common/useBuildInfo.ts +5 -5
- package/lib/common/useClipboard.ts +5 -5
- package/lib/common/useDebouncedValue.ts +6 -6
- package/lib/common.ts +3 -3
- package/lib/index.ts +2 -5
- package/lib/map/AppIdentity.tsx +5 -6
- package/lib/map/CompareToggle.tsx +5 -5
- package/lib/map/DebugInfo.tsx +3 -4
- package/lib/map/Geocoder.tsx +55 -17
- package/lib/map/GeocoderControls.tsx +140 -40
- package/lib/map/GraticuleLayer.tsx +6 -6
- package/lib/map/LoadLedgerList.tsx +96 -0
- package/lib/map/MapCanvas.tsx +19 -16
- package/lib/map/MapChipRow.tsx +3 -4
- package/lib/map/MapCompass.tsx +3 -4
- package/lib/map/MapContextMenu.tsx +206 -0
- package/lib/map/MapControlStack.tsx +3 -4
- package/lib/map/MapFooter.tsx +3 -6
- package/lib/map/MapPlaceCard.tsx +64 -0
- package/lib/map/MapProgressBar.tsx +5 -5
- package/lib/map/MapSearchBar.tsx +5 -4
- package/lib/map/MapSheet.tsx +4 -5
- package/lib/map/OverlayLayers.tsx +11 -10
- package/lib/map/PlaceAutocomplete.tsx +3 -4
- package/lib/map/PlaceMarker.tsx +10 -9
- package/lib/map/ResolvedPlaceLayers.tsx +2 -5
- package/lib/map/ResultCamera.tsx +138 -19
- package/lib/map/ResultOverlay.tsx +2 -5
- package/lib/map/ResultPanel.tsx +11 -6
- package/lib/map/StarfieldLayer.tsx +7 -6
- package/lib/map/VersionPicker.tsx +5 -5
- package/lib/map/fake-runtime.ts +2 -6
- package/lib/map/geometry.ts +3 -6
- package/lib/map/graticule.ts +6 -6
- package/lib/map/jump-curtain.ts +105 -0
- package/lib/map/map-debug.ts +4 -4
- package/lib/map/place-render.ts +32 -14
- package/lib/map/reduced-motion.ts +13 -0
- package/lib/map/starfield.ts +9 -8
- package/lib/map/types.ts +13 -4
- package/lib/map/useCompareState.ts +10 -7
- package/lib/map/useGeocode.ts +42 -12
- package/lib/map/useMapBearing.ts +7 -7
- package/lib/map/useMapPick.ts +277 -0
- package/lib/map/useMapPlaceRender.ts +5 -5
- package/lib/map/usePlaceAutocomplete.ts +2 -5
- package/lib/map.ts +21 -8
- package/lib/network/ReachabilityProvider.tsx +219 -0
- package/lib/pipeline/CandidatePicker.tsx +18 -11
- package/lib/pipeline/ComponentTable.tsx +5 -5
- package/lib/pipeline/ConfidenceCell.tsx +6 -5
- package/lib/pipeline/FailureDiagnostic.tsx +5 -6
- package/lib/pipeline/MatchTable.tsx +46 -0
- package/lib/pipeline/PipelineExplorer.tsx +9 -8
- package/lib/pipeline/QueryForm.tsx +6 -5
- package/lib/pipeline/ResolvedPlace.tsx +11 -24
- package/lib/pipeline/SpanHighlight.tsx +7 -6
- package/lib/pipeline/TimingPanel.tsx +7 -6
- package/lib/pipeline/TreeView.tsx +5 -5
- package/lib/pipeline/copy.ts +6 -6
- package/lib/pipeline/presets.ts +7 -6
- package/lib/pipeline/types.ts +17 -5
- package/lib/pipeline/useParsePipeline.ts +50 -23
- package/lib/pipeline.ts +3 -3
- package/lib/poi/AbstainPanel.tsx +6 -5
- package/lib/poi/LiveResultsBlock.tsx +7 -6
- package/lib/poi/OverpassBlock.tsx +7 -5
- package/lib/poi/POIExplorer.tsx +2 -5
- package/lib/poi/QueryInput.tsx +5 -5
- package/lib/poi/SubjectPanel.tsx +9 -6
- package/lib/poi/runtime.ts +2 -5
- package/lib/poi/types.ts +6 -5
- package/lib/poi/usePOISearch.ts +77 -49
- package/lib/poi.ts +3 -3
- package/lib/runtime/useReleaseRuntime.ts +77 -8
- package/lib/runtime.ts +3 -3
- package/lib/search/SearchModal.tsx +13 -9
- package/lib/search/search.css +3 -0
- package/lib/search/tokens.ts +7 -6
- package/lib/search/types.ts +6 -6
- package/lib/search.ts +3 -3
- package/out/common/About.d.ts +3 -5
- package/out/common/About.d.ts.map +1 -1
- package/out/common/About.js.map +1 -1
- package/out/common/ClientOnly.d.ts +3 -4
- package/out/common/ClientOnly.d.ts.map +1 -1
- package/out/common/ClientOnly.js +5 -4
- package/out/common/ClientOnly.js.map +1 -1
- package/out/common/CopyButton.d.ts +3 -5
- package/out/common/CopyButton.d.ts.map +1 -1
- package/out/common/CopyButton.js.map +1 -1
- package/out/common/KindBadge.d.ts +5 -7
- package/out/common/KindBadge.d.ts.map +1 -1
- package/out/common/KindBadge.js.map +1 -1
- package/out/common/LoadingIndicator.d.ts +0 -10
- package/out/common/LoadingIndicator.d.ts.map +1 -1
- package/out/common/LoadingIndicator.js +6 -7
- package/out/common/LoadingIndicator.js.map +1 -1
- package/out/common/PresetChips.d.ts +2 -5
- package/out/common/PresetChips.d.ts.map +1 -1
- package/out/common/confidence-tiers.d.ts +0 -3
- package/out/common/confidence-tiers.d.ts.map +1 -1
- package/out/common/confidence-tiers.js +2 -3
- package/out/common/confidence-tiers.js.map +1 -1
- package/out/common/cx.d.ts +3 -6
- package/out/common/cx.d.ts.map +1 -1
- package/out/common/cx.js +2 -9
- package/out/common/cx.js.map +1 -1
- package/out/common/text-tokens.d.ts +0 -3
- package/out/common/text-tokens.d.ts.map +1 -1
- package/out/common/text-tokens.js +2 -11
- package/out/common/text-tokens.js.map +1 -1
- package/out/common/useBuildInfo.d.ts +0 -7
- package/out/common/useBuildInfo.d.ts.map +1 -1
- package/out/common/useBuildInfo.js +4 -5
- package/out/common/useBuildInfo.js.map +1 -1
- package/out/common/useClipboard.d.ts +0 -7
- package/out/common/useClipboard.d.ts.map +1 -1
- package/out/common/useClipboard.js +4 -5
- package/out/common/useClipboard.js.map +1 -1
- package/out/common/useDebouncedValue.d.ts +0 -9
- package/out/common/useDebouncedValue.d.ts.map +1 -1
- package/out/common/useDebouncedValue.js +5 -6
- package/out/common/useDebouncedValue.js.map +1 -1
- package/out/common.d.ts +0 -3
- package/out/common.d.ts.map +1 -1
- package/out/common.js +2 -3
- package/out/common.js.map +1 -1
- package/out/index.d.ts +0 -5
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -5
- package/out/index.js.map +1 -1
- package/out/map/AppIdentity.d.ts +2 -6
- package/out/map/AppIdentity.d.ts.map +1 -1
- package/out/map/AppIdentity.js.map +1 -1
- package/out/map/CompareToggle.d.ts +2 -5
- package/out/map/CompareToggle.d.ts.map +1 -1
- package/out/map/DebugInfo.d.ts +0 -4
- package/out/map/DebugInfo.d.ts.map +1 -1
- package/out/map/DebugInfo.js +2 -4
- package/out/map/DebugInfo.js.map +1 -1
- package/out/map/Geocoder.d.ts +21 -9
- package/out/map/Geocoder.d.ts.map +1 -1
- package/out/map/Geocoder.js +15 -10
- package/out/map/Geocoder.js.map +1 -1
- package/out/map/GeocoderControls.d.ts +7 -9
- package/out/map/GeocoderControls.d.ts.map +1 -1
- package/out/map/GeocoderControls.js +99 -31
- package/out/map/GeocoderControls.js.map +1 -1
- package/out/map/GraticuleLayer.d.ts +3 -6
- package/out/map/GraticuleLayer.d.ts.map +1 -1
- package/out/map/GraticuleLayer.js +5 -6
- package/out/map/GraticuleLayer.js.map +1 -1
- package/out/map/LoadLedgerList.d.ts +19 -0
- package/out/map/LoadLedgerList.d.ts.map +1 -0
- package/out/map/LoadLedgerList.js +59 -0
- package/out/map/LoadLedgerList.js.map +1 -0
- package/out/map/MapCanvas.d.ts +2 -24
- package/out/map/MapCanvas.d.ts.map +1 -1
- package/out/map/MapCanvas.js +16 -14
- package/out/map/MapCanvas.js.map +1 -1
- package/out/map/MapChipRow.d.ts +0 -4
- package/out/map/MapChipRow.d.ts.map +1 -1
- package/out/map/MapChipRow.js.map +1 -1
- package/out/map/MapCompass.d.ts +0 -4
- package/out/map/MapCompass.d.ts.map +1 -1
- package/out/map/MapCompass.js.map +1 -1
- package/out/map/MapContextMenu.d.ts +88 -0
- package/out/map/MapContextMenu.d.ts.map +1 -0
- package/out/map/MapContextMenu.js +96 -0
- package/out/map/MapContextMenu.js.map +1 -0
- package/out/map/MapControlStack.d.ts +0 -4
- package/out/map/MapControlStack.d.ts.map +1 -1
- package/out/map/MapControlStack.js.map +1 -1
- package/out/map/MapFooter.d.ts +1 -6
- package/out/map/MapFooter.d.ts.map +1 -1
- package/out/map/MapFooter.js +2 -5
- package/out/map/MapFooter.js.map +1 -1
- package/out/map/MapPlaceCard.d.ts +17 -0
- package/out/map/MapPlaceCard.d.ts.map +1 -0
- package/out/map/MapPlaceCard.js +27 -0
- package/out/map/MapPlaceCard.js.map +1 -0
- package/out/map/MapProgressBar.d.ts +2 -5
- package/out/map/MapProgressBar.d.ts.map +1 -1
- package/out/map/MapSearchBar.d.ts +2 -4
- package/out/map/MapSearchBar.d.ts.map +1 -1
- package/out/map/MapSearchBar.js.map +1 -1
- package/out/map/MapSheet.d.ts +1 -5
- package/out/map/MapSheet.d.ts.map +1 -1
- package/out/map/MapSheet.js +2 -4
- package/out/map/MapSheet.js.map +1 -1
- package/out/map/OverlayLayers.d.ts +8 -10
- package/out/map/OverlayLayers.d.ts.map +1 -1
- package/out/map/OverlayLayers.js +10 -10
- package/out/map/OverlayLayers.js.map +1 -1
- package/out/map/PlaceAutocomplete.d.ts +0 -4
- package/out/map/PlaceAutocomplete.d.ts.map +1 -1
- package/out/map/PlaceAutocomplete.js.map +1 -1
- package/out/map/PlaceMarker.d.ts +0 -13
- package/out/map/PlaceMarker.d.ts.map +1 -1
- package/out/map/PlaceMarker.js +9 -9
- package/out/map/PlaceMarker.js.map +1 -1
- package/out/map/ResolvedPlaceLayers.d.ts +0 -5
- package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
- package/out/map/ResolvedPlaceLayers.js.map +1 -1
- package/out/map/ResultCamera.d.ts +53 -7
- package/out/map/ResultCamera.d.ts.map +1 -1
- package/out/map/ResultCamera.js +103 -17
- package/out/map/ResultCamera.js.map +1 -1
- package/out/map/ResultOverlay.d.ts +0 -5
- package/out/map/ResultOverlay.d.ts.map +1 -1
- package/out/map/ResultOverlay.js +2 -5
- package/out/map/ResultOverlay.js.map +1 -1
- package/out/map/ResultPanel.d.ts +0 -5
- package/out/map/ResultPanel.d.ts.map +1 -1
- package/out/map/ResultPanel.js +2 -1
- package/out/map/ResultPanel.js.map +1 -1
- package/out/map/StarfieldLayer.d.ts +0 -11
- package/out/map/StarfieldLayer.d.ts.map +1 -1
- package/out/map/StarfieldLayer.js +6 -6
- package/out/map/StarfieldLayer.js.map +1 -1
- package/out/map/VersionPicker.d.ts +2 -5
- package/out/map/VersionPicker.d.ts.map +1 -1
- package/out/map/fake-runtime.d.ts +0 -5
- package/out/map/fake-runtime.d.ts.map +1 -1
- package/out/map/fake-runtime.js +2 -6
- package/out/map/fake-runtime.js.map +1 -1
- package/out/map/geometry.d.ts +1 -6
- package/out/map/geometry.d.ts.map +1 -1
- package/out/map/geometry.js +3 -6
- package/out/map/geometry.js.map +1 -1
- package/out/map/graticule.d.ts +3 -6
- package/out/map/graticule.d.ts.map +1 -1
- package/out/map/graticule.js +2 -9
- package/out/map/graticule.js.map +1 -1
- package/out/map/jump-curtain.d.ts +61 -0
- package/out/map/jump-curtain.d.ts.map +1 -0
- package/out/map/jump-curtain.js +69 -0
- package/out/map/jump-curtain.js.map +1 -0
- package/out/map/map-debug.d.ts +1 -4
- package/out/map/map-debug.d.ts.map +1 -1
- package/out/map/map-debug.js +2 -10
- package/out/map/map-debug.js.map +1 -1
- package/out/map/place-render.d.ts +5 -6
- package/out/map/place-render.d.ts.map +1 -1
- package/out/map/place-render.js +21 -12
- package/out/map/place-render.js.map +1 -1
- package/out/map/reduced-motion.d.ts +9 -0
- package/out/map/reduced-motion.d.ts.map +1 -0
- package/out/map/reduced-motion.js +13 -0
- package/out/map/reduced-motion.js.map +1 -0
- package/out/map/starfield.d.ts +0 -14
- package/out/map/starfield.d.ts.map +1 -1
- package/out/map/starfield.js +8 -8
- package/out/map/starfield.js.map +1 -1
- package/out/map/types.d.ts +10 -4
- package/out/map/types.d.ts.map +1 -1
- package/out/map/types.js +2 -7
- package/out/map/types.js.map +1 -1
- package/out/map/useCompareState.d.ts +0 -11
- package/out/map/useCompareState.d.ts.map +1 -1
- package/out/map/useCompareState.js +9 -7
- package/out/map/useCompareState.js.map +1 -1
- package/out/map/useGeocode.d.ts +13 -20
- package/out/map/useGeocode.d.ts.map +1 -1
- package/out/map/useGeocode.js +21 -11
- package/out/map/useGeocode.js.map +1 -1
- package/out/map/useMapBearing.d.ts +2 -9
- package/out/map/useMapBearing.d.ts.map +1 -1
- package/out/map/useMapBearing.js +4 -5
- package/out/map/useMapBearing.js.map +1 -1
- package/out/map/useMapPick.d.ts +28 -0
- package/out/map/useMapPick.d.ts.map +1 -0
- package/out/map/useMapPick.js +206 -0
- package/out/map/useMapPick.js.map +1 -0
- package/out/map/useMapPlaceRender.d.ts +0 -7
- package/out/map/useMapPlaceRender.d.ts.map +1 -1
- package/out/map/useMapPlaceRender.js +4 -5
- package/out/map/useMapPlaceRender.js.map +1 -1
- package/out/map/usePlaceAutocomplete.d.ts +0 -5
- package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
- package/out/map/usePlaceAutocomplete.js +2 -5
- package/out/map/usePlaceAutocomplete.js.map +1 -1
- package/out/map.d.ts +10 -8
- package/out/map.d.ts.map +1 -1
- package/out/map.js +9 -8
- package/out/map.js.map +1 -1
- package/out/network/ReachabilityProvider.d.ts +76 -0
- package/out/network/ReachabilityProvider.d.ts.map +1 -0
- package/out/network/ReachabilityProvider.js +120 -0
- package/out/network/ReachabilityProvider.js.map +1 -0
- package/out/pipeline/CandidatePicker.d.ts +15 -11
- package/out/pipeline/CandidatePicker.d.ts.map +1 -1
- package/out/pipeline/CandidatePicker.js.map +1 -1
- package/out/pipeline/ComponentTable.d.ts +2 -5
- package/out/pipeline/ComponentTable.d.ts.map +1 -1
- package/out/pipeline/ConfidenceCell.d.ts +0 -8
- package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
- package/out/pipeline/ConfidenceCell.js +5 -5
- package/out/pipeline/ConfidenceCell.js.map +1 -1
- package/out/pipeline/FailureDiagnostic.d.ts +2 -6
- package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
- package/out/pipeline/FailureDiagnostic.js.map +1 -1
- package/out/pipeline/MatchTable.d.ts +7 -0
- package/out/pipeline/MatchTable.d.ts.map +1 -0
- package/out/pipeline/MatchTable.js +18 -0
- package/out/pipeline/MatchTable.js.map +1 -0
- package/out/pipeline/PipelineExplorer.d.ts +5 -7
- package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
- package/out/pipeline/PipelineExplorer.js +1 -1
- package/out/pipeline/PipelineExplorer.js.map +1 -1
- package/out/pipeline/QueryForm.d.ts +3 -5
- package/out/pipeline/QueryForm.d.ts.map +1 -1
- package/out/pipeline/QueryForm.js.map +1 -1
- package/out/pipeline/ResolvedPlace.d.ts +5 -10
- package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
- package/out/pipeline/ResolvedPlace.js +2 -3
- package/out/pipeline/ResolvedPlace.js.map +1 -1
- package/out/pipeline/SpanHighlight.d.ts +4 -6
- package/out/pipeline/SpanHighlight.d.ts.map +1 -1
- package/out/pipeline/SpanHighlight.js.map +1 -1
- package/out/pipeline/TimingPanel.d.ts +4 -6
- package/out/pipeline/TimingPanel.d.ts.map +1 -1
- package/out/pipeline/TimingPanel.js.map +1 -1
- package/out/pipeline/TreeView.d.ts +2 -5
- package/out/pipeline/TreeView.d.ts.map +1 -1
- package/out/pipeline/copy.d.ts +0 -8
- package/out/pipeline/copy.d.ts.map +1 -1
- package/out/pipeline/copy.js +5 -6
- package/out/pipeline/copy.js.map +1 -1
- package/out/pipeline/presets.d.ts +3 -5
- package/out/pipeline/presets.d.ts.map +1 -1
- package/out/pipeline/presets.js +3 -9
- package/out/pipeline/presets.js.map +1 -1
- package/out/pipeline/types.d.ts +14 -5
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +2 -8
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline/useParsePipeline.d.ts +6 -6
- package/out/pipeline/useParsePipeline.d.ts.map +1 -1
- package/out/pipeline/useParsePipeline.js +38 -26
- package/out/pipeline/useParsePipeline.js.map +1 -1
- package/out/pipeline.d.ts +0 -3
- package/out/pipeline.d.ts.map +1 -1
- package/out/pipeline.js +2 -3
- package/out/pipeline.js.map +1 -1
- package/out/poi/AbstainPanel.d.ts +3 -5
- package/out/poi/AbstainPanel.d.ts.map +1 -1
- package/out/poi/AbstainPanel.js.map +1 -1
- package/out/poi/LiveResultsBlock.d.ts +4 -6
- package/out/poi/LiveResultsBlock.d.ts.map +1 -1
- package/out/poi/LiveResultsBlock.js.map +1 -1
- package/out/poi/OverpassBlock.d.ts +4 -5
- package/out/poi/OverpassBlock.d.ts.map +1 -1
- package/out/poi/OverpassBlock.js.map +1 -1
- package/out/poi/POIExplorer.d.ts +0 -5
- package/out/poi/POIExplorer.d.ts.map +1 -1
- package/out/poi/POIExplorer.js +2 -5
- package/out/poi/POIExplorer.js.map +1 -1
- package/out/poi/QueryInput.d.ts +2 -5
- package/out/poi/QueryInput.d.ts.map +1 -1
- package/out/poi/SubjectPanel.d.ts +6 -6
- package/out/poi/SubjectPanel.d.ts.map +1 -1
- package/out/poi/SubjectPanel.js.map +1 -1
- package/out/poi/runtime.d.ts +0 -5
- package/out/poi/runtime.d.ts.map +1 -1
- package/out/poi/runtime.js +2 -5
- package/out/poi/runtime.js.map +1 -1
- package/out/poi/types.d.ts +3 -5
- package/out/poi/types.d.ts.map +1 -1
- package/out/poi/types.js +2 -8
- package/out/poi/types.js.map +1 -1
- package/out/poi/usePOISearch.d.ts +7 -5
- package/out/poi/usePOISearch.d.ts.map +1 -1
- package/out/poi/usePOISearch.js +23 -9
- package/out/poi/usePOISearch.js.map +1 -1
- package/out/poi.d.ts +0 -3
- package/out/poi.d.ts.map +1 -1
- package/out/poi.js +2 -3
- package/out/poi.js.map +1 -1
- package/out/runtime/useReleaseRuntime.d.ts +33 -7
- package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
- package/out/runtime/useReleaseRuntime.js +36 -6
- package/out/runtime/useReleaseRuntime.js.map +1 -1
- package/out/runtime.d.ts +0 -3
- package/out/runtime.d.ts.map +1 -1
- package/out/runtime.js +2 -3
- package/out/runtime.js.map +1 -1
- package/out/search/SearchModal.d.ts +0 -12
- package/out/search/SearchModal.d.ts.map +1 -1
- package/out/search/SearchModal.js +12 -9
- package/out/search/SearchModal.js.map +1 -1
- package/out/search/tokens.d.ts +4 -6
- package/out/search/tokens.d.ts.map +1 -1
- package/out/search/tokens.js +6 -6
- package/out/search/tokens.js.map +1 -1
- package/out/search/types.d.ts +3 -6
- package/out/search/types.d.ts.map +1 -1
- package/out/search/types.js +4 -5
- package/out/search/types.js.map +1 -1
- package/out/search.d.ts +0 -3
- package/out/search.d.ts.map +1 -1
- package/out/search.js +2 -3
- package/out/search.js.map +1 -1
- package/package.json +6 -6
- package/styles.css +214 -11
- package/tokens/index.css +3 -0
- package/lib/map/useMapLabelPick.ts +0 -114
- package/out/map/useMapLabelPick.d.ts +0 -13
- package/out/map/useMapLabelPick.d.ts.map +0 -1
- package/out/map/useMapLabelPick.js +0 -95
- package/out/map/useMapLabelPick.js.map +0 -1
package/out/search/tokens.d.ts
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
2
|
+
* How a docs search query divides into terms.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* The query code matches these terms against the index, and the modal emphasizes
|
|
5
|
+
* the same terms in a hit's title, so the two agree on what matched.
|
|
8
6
|
*/
|
|
9
7
|
/**
|
|
10
8
|
* The parts of the text that the index tokenizer can index: its runs of letters and digits.
|
|
11
9
|
*
|
|
12
10
|
* The index drops term positions, so a quoted FTS5 string must hold one token.
|
|
13
11
|
* The text is split where the `unicode61` tokenizer splits it, at any character
|
|
14
|
-
* that
|
|
12
|
+
* that's neither a letter nor a digit.
|
|
15
13
|
*/
|
|
16
14
|
export declare function queryTokens(text: string): string[];
|
|
17
15
|
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../lib/search/tokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../lib/search/tokens.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAElD"}
|
package/out/search/tokens.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
4
|
+
* How a docs search query divides into terms.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* The query code matches these terms against the index, and the modal emphasizes
|
|
7
|
+
* the same terms in a hit's title, so the two agree on what matched.
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
10
|
* The parts of the text that the index tokenizer can index: its runs of letters and digits.
|
|
11
11
|
*
|
|
12
12
|
* The index drops term positions, so a quoted FTS5 string must hold one token.
|
|
13
13
|
* The text is split where the `unicode61` tokenizer splits it, at any character
|
|
14
|
-
* that
|
|
14
|
+
* that's neither a letter nor a digit.
|
|
15
15
|
*/
|
|
16
16
|
export function queryTokens(text) {
|
|
17
17
|
return text.split(/[^\p{L}\p{N}]+/u).filter((token) => token !== "");
|
package/out/search/tokens.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../lib/search/tokens.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../lib/search/tokens.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;;GAKG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,CAAA;AACrE,CAAC"}
|
package/out/search/types.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
2
|
+
* The record the docs build indexes and the response the search modal renders.
|
|
5
3
|
*
|
|
6
|
-
* The
|
|
7
|
-
* query code share these through `import type`.
|
|
4
|
+
* The modal and the query code share these through `import type`.
|
|
8
5
|
*/
|
|
9
6
|
/**
|
|
10
7
|
* The number of hierarchy entries: the sidebar category, then `h1` through `h6`.
|
|
@@ -21,7 +18,7 @@ export interface SearchRecord {
|
|
|
21
18
|
*/
|
|
22
19
|
id: string;
|
|
23
20
|
/**
|
|
24
|
-
* Site-relative path without the anchor, such as `/docs/
|
|
21
|
+
* Site-relative path without the anchor, such as `/docs/reference/cli`.
|
|
25
22
|
*/
|
|
26
23
|
url: string;
|
|
27
24
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC;;;GAGG;AACH,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAA;IACV;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,SAAS,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IAC5B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,SAAS;IACzB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IAC5B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,CAAA;CAC1C;AAED,MAAM,WAAW,cAAc;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,IAAI,EAAE,SAAS,EAAE,CAAA;CACjB"}
|
package/out/search/types.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
1
3
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
4
|
+
* The record the docs build indexes and the response the search modal renders.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
7
|
-
* query code share these through `import type`.
|
|
6
|
+
* The modal and the query code share these through `import type`.
|
|
8
7
|
*/
|
|
9
8
|
/**
|
|
10
9
|
* The number of hierarchy entries: the sidebar category, then `h1` through `h6`.
|
package/out/search/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../lib/search/types.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA;AAEhC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAA"}
|
package/out/search.d.ts
CHANGED
package/out/search.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../lib/search.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../lib/search.ts"],"names":[],"mappings":"AAGA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA"}
|
package/out/search.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
1
3
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
4
|
* @file The docs search modal and its wire types.
|
|
6
5
|
*/
|
|
7
6
|
export { hitHref, SearchModal } from "./search/SearchModal.js";
|
package/out/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../lib/search.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../lib/search.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,kEAAkE;AAElE;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAA0B,CAAA;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.1.0",
|
|
4
4
|
"description": "React components + headless hooks for mailwoman — parse/geocode/POI explorers, Storybook-tested, Docusaurus-independent.",
|
|
5
5
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
6
6
|
"repository": {
|
|
@@ -457,11 +457,11 @@
|
|
|
457
457
|
"test:node": "vitest run --config vitest.node.config.ts"
|
|
458
458
|
},
|
|
459
459
|
"dependencies": {
|
|
460
|
-
"@mailwoman/core": "
|
|
461
|
-
"@mailwoman/kind-classifier": "
|
|
462
|
-
"@mailwoman/poi-taxonomy": "
|
|
463
|
-
"@mailwoman/query-shape": "
|
|
464
|
-
"@mailwoman/spatial": "
|
|
460
|
+
"@mailwoman/core": "11.1.0",
|
|
461
|
+
"@mailwoman/kind-classifier": "11.1.0",
|
|
462
|
+
"@mailwoman/poi-taxonomy": "11.1.0",
|
|
463
|
+
"@mailwoman/query-shape": "11.1.0",
|
|
464
|
+
"@mailwoman/spatial": "11.1.0",
|
|
465
465
|
"@sister.software/fonts": "^14.8.0",
|
|
466
466
|
"@sister.software/theme": "^14.8.0",
|
|
467
467
|
"@types/geojson": "^7946.0.16"
|
package/styles.css
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors */
|
|
2
|
+
/* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial */
|
|
3
|
+
|
|
1
4
|
/* ---------------------------------------------------------------------------
|
|
2
5
|
* @mailwoman/react — component styles.
|
|
3
6
|
*
|
|
@@ -282,6 +285,63 @@
|
|
|
282
285
|
white-space: pre-wrap;
|
|
283
286
|
}
|
|
284
287
|
|
|
288
|
+
.mw-load-error {
|
|
289
|
+
display: flex;
|
|
290
|
+
flex-wrap: wrap;
|
|
291
|
+
align-items: baseline;
|
|
292
|
+
gap: 0.5rem;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.mw-load-error__retry {
|
|
296
|
+
padding: 0.15rem 0.6rem;
|
|
297
|
+
border: 1px solid var(--ss-color-emphasis-300);
|
|
298
|
+
border-radius: var(--ss-radius-global);
|
|
299
|
+
background: var(--ss-color-emphasis-100);
|
|
300
|
+
color: var(--ss-color-content);
|
|
301
|
+
font: inherit;
|
|
302
|
+
cursor: pointer;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.mw-load-error__retry:focus-visible {
|
|
306
|
+
outline: 2px solid var(--ss-color-primary);
|
|
307
|
+
outline-offset: 2px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* #endregion */
|
|
311
|
+
|
|
312
|
+
/* #region LoadLedgerList */
|
|
313
|
+
|
|
314
|
+
.mw-load-ledger {
|
|
315
|
+
font-size: 0.8rem;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.mw-load-ledger summary {
|
|
319
|
+
cursor: pointer;
|
|
320
|
+
color: var(--ss-color-content-secondary);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.mw-load-ledger__list {
|
|
324
|
+
display: grid;
|
|
325
|
+
grid-template-columns: minmax(8rem, max-content) minmax(5rem, max-content) 1fr;
|
|
326
|
+
gap: 0.15rem 0.75rem;
|
|
327
|
+
margin: 0.4rem 0 0;
|
|
328
|
+
padding: 0;
|
|
329
|
+
list-style: none;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.mw-load-ledger__row {
|
|
333
|
+
display: contents;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.mw-load-ledger__bytes {
|
|
337
|
+
font-variant-numeric: tabular-nums;
|
|
338
|
+
color: var(--ss-color-content-secondary);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.mw-load-ledger__row--failed .mw-load-ledger__state {
|
|
342
|
+
color: var(--ss-color-danger-contrast-foreground);
|
|
343
|
+
}
|
|
344
|
+
|
|
285
345
|
/* #endregion */
|
|
286
346
|
|
|
287
347
|
/* #region KindBadge */
|
|
@@ -543,14 +603,6 @@
|
|
|
543
603
|
margin: 0;
|
|
544
604
|
}
|
|
545
605
|
|
|
546
|
-
.mw-resolved__dual {
|
|
547
|
-
margin: var(--ss-spacing-2) 0 0;
|
|
548
|
-
padding: calc(var(--ss-spacing-1) * 1.5) var(--ss-spacing-2);
|
|
549
|
-
border-radius: var(--ss-radius-global);
|
|
550
|
-
background: var(--ss-color-info-contrast-background);
|
|
551
|
-
font-size: 0.9rem;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
606
|
/* #endregion */
|
|
555
607
|
|
|
556
608
|
/* #region Candidate picker */
|
|
@@ -1688,6 +1740,142 @@
|
|
|
1688
1740
|
justify-content: flex-end;
|
|
1689
1741
|
}
|
|
1690
1742
|
|
|
1743
|
+
/*
|
|
1744
|
+
* The place card a map click opens: a glass strip across the bottom of the map, as the reference map apps
|
|
1745
|
+
* show, with the name on the left, the actions on the right and a close at the end. The phone rule below
|
|
1746
|
+
* moves it to the top, because the search drawer owns the bottom edge there.
|
|
1747
|
+
*/
|
|
1748
|
+
.mw-map-card {
|
|
1749
|
+
position: absolute;
|
|
1750
|
+
left: 50%;
|
|
1751
|
+
bottom: calc(var(--mw-map-footer-height) + var(--mw-safe-area-bottom) + 1rem);
|
|
1752
|
+
z-index: 4;
|
|
1753
|
+
display: flex;
|
|
1754
|
+
align-items: center;
|
|
1755
|
+
gap: var(--ss-spacing-3);
|
|
1756
|
+
box-sizing: border-box;
|
|
1757
|
+
width: min(32rem, calc(100vw - 2rem));
|
|
1758
|
+
padding: var(--ss-spacing-2) var(--ss-spacing-2) var(--ss-spacing-2) var(--ss-spacing-4);
|
|
1759
|
+
border-radius: var(--ss-radius-global);
|
|
1760
|
+
box-shadow: var(--mw-material-glass-shadow);
|
|
1761
|
+
transform: translateX(-50%);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.mw-map-card__body {
|
|
1765
|
+
flex: 1 1 auto;
|
|
1766
|
+
min-width: 0;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
.mw-map-card__title {
|
|
1770
|
+
margin: 0;
|
|
1771
|
+
overflow: hidden;
|
|
1772
|
+
text-overflow: ellipsis;
|
|
1773
|
+
white-space: nowrap;
|
|
1774
|
+
font-family: var(--ss-font-family-heading);
|
|
1775
|
+
font-size: var(--mw-font-size-body);
|
|
1776
|
+
font-weight: var(--ss-font-weight-bold);
|
|
1777
|
+
color: var(--ss-color-content);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
.mw-map-card__line {
|
|
1781
|
+
display: flex;
|
|
1782
|
+
gap: var(--ss-spacing-2);
|
|
1783
|
+
margin: 0;
|
|
1784
|
+
overflow: hidden;
|
|
1785
|
+
white-space: nowrap;
|
|
1786
|
+
font-size: var(--mw-font-size-caption);
|
|
1787
|
+
color: var(--ss-color-content-secondary);
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
.mw-map-card__coords {
|
|
1791
|
+
font-family: var(--ss-font-family-monospace);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
.mw-map-card__actions {
|
|
1795
|
+
display: flex;
|
|
1796
|
+
flex: 0 0 auto;
|
|
1797
|
+
gap: var(--ss-spacing-1);
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
/*
|
|
1801
|
+
* The right-click menu: a glass panel at the pointer, above every other surface, because it answers a
|
|
1802
|
+
* gesture on the map itself. Each row reads label, value, copy on one line, and the actions follow the rows.
|
|
1803
|
+
*/
|
|
1804
|
+
.mw-map-menu {
|
|
1805
|
+
position: absolute;
|
|
1806
|
+
z-index: 7;
|
|
1807
|
+
display: grid;
|
|
1808
|
+
min-width: 16rem;
|
|
1809
|
+
max-width: min(20rem, calc(100vw - 2rem));
|
|
1810
|
+
padding: var(--ss-spacing-2);
|
|
1811
|
+
border-radius: var(--ss-radius-global);
|
|
1812
|
+
box-shadow: var(--mw-material-glass-shadow);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
.mw-map-menu__row {
|
|
1816
|
+
display: grid;
|
|
1817
|
+
grid-template-columns: auto 1fr auto;
|
|
1818
|
+
align-items: center;
|
|
1819
|
+
gap: var(--ss-spacing-2);
|
|
1820
|
+
padding: var(--ss-spacing-1) var(--ss-spacing-2);
|
|
1821
|
+
border-radius: var(--ss-radius-tag);
|
|
1822
|
+
}
|
|
1823
|
+
|
|
1824
|
+
.mw-map-menu__row:hover {
|
|
1825
|
+
background: var(--ss-color-emphasis-100);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.mw-map-menu__label {
|
|
1829
|
+
font-size: var(--mw-font-size-caption);
|
|
1830
|
+
font-weight: var(--ss-font-weight-semibold);
|
|
1831
|
+
color: var(--ss-color-content-secondary);
|
|
1832
|
+
white-space: nowrap;
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
.mw-map-menu__value {
|
|
1836
|
+
min-width: 0;
|
|
1837
|
+
overflow: hidden;
|
|
1838
|
+
text-overflow: ellipsis;
|
|
1839
|
+
white-space: nowrap;
|
|
1840
|
+
font-family: var(--ss-font-family-monospace);
|
|
1841
|
+
font-size: var(--mw-font-size-footnote);
|
|
1842
|
+
color: var(--ss-color-content);
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
.mw-map-menu__copy,
|
|
1846
|
+
.mw-map-menu__action {
|
|
1847
|
+
font: inherit;
|
|
1848
|
+
font-size: var(--mw-font-size-caption);
|
|
1849
|
+
color: var(--ss-color-content);
|
|
1850
|
+
background: transparent;
|
|
1851
|
+
border: 1px solid var(--ss-color-emphasis-300);
|
|
1852
|
+
border-radius: var(--ss-radius-tag);
|
|
1853
|
+
cursor: pointer;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
.mw-map-menu__copy {
|
|
1857
|
+
padding: 0.1rem var(--ss-spacing-2);
|
|
1858
|
+
white-space: nowrap;
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
.mw-map-menu__action {
|
|
1862
|
+
margin-top: var(--ss-spacing-2);
|
|
1863
|
+
padding: var(--ss-spacing-2);
|
|
1864
|
+
font-weight: var(--ss-font-weight-semibold);
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
.mw-map-menu__copy:hover,
|
|
1868
|
+
.mw-map-menu__action:hover {
|
|
1869
|
+
background: var(--mw-material-glass-fallback-background);
|
|
1870
|
+
border-color: var(--ss-color-primary);
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
.mw-map-menu__copy:focus-visible,
|
|
1874
|
+
.mw-map-menu__action:focus-visible {
|
|
1875
|
+
outline: 2px solid var(--ss-color-primary);
|
|
1876
|
+
outline-offset: 1px;
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1691
1879
|
/*
|
|
1692
1880
|
* On a phone the chrome spans the width and the sheet becomes a true bottom sheet against the edge, which is what
|
|
1693
1881
|
* leaves the map its full height.
|
|
@@ -1778,6 +1966,15 @@
|
|
|
1778
1966
|
padding: calc(var(--ss-spacing-4) + var(--mw-safe-area-top)) var(--ss-spacing-4) var(--ss-spacing-4);
|
|
1779
1967
|
}
|
|
1780
1968
|
|
|
1969
|
+
/* The search drawer owns the bottom edge, so the place card opens under the top safe area instead. */
|
|
1970
|
+
.mw-map-card {
|
|
1971
|
+
top: calc(1rem + var(--mw-safe-area-top));
|
|
1972
|
+
bottom: auto;
|
|
1973
|
+
width: calc(100vw - 6rem);
|
|
1974
|
+
left: 1rem;
|
|
1975
|
+
transform: none;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1781
1978
|
/* The chips take the full width on a phone, so the fade has less to hide behind. */
|
|
1782
1979
|
.mw-map-chiprow {
|
|
1783
1980
|
-webkit-mask-image: linear-gradient(to right, black calc(100% - 1.25rem), transparent);
|
|
@@ -1814,7 +2011,9 @@
|
|
|
1814
2011
|
.mw-map-footer,
|
|
1815
2012
|
.mw-map-footer__popover,
|
|
1816
2013
|
.mw-map-sheet,
|
|
1817
|
-
.mw-map-panel
|
|
2014
|
+
.mw-map-panel,
|
|
2015
|
+
.mw-map-menu,
|
|
2016
|
+
.mw-map-card {
|
|
1818
2017
|
background: var(--mw-material-glass-background);
|
|
1819
2018
|
border: 1px solid var(--mw-material-glass-border);
|
|
1820
2019
|
/*
|
|
@@ -2334,7 +2533,9 @@
|
|
|
2334
2533
|
.mw-map-footer,
|
|
2335
2534
|
.mw-map-footer__popover,
|
|
2336
2535
|
.mw-map-sheet,
|
|
2337
|
-
.mw-map-panel
|
|
2536
|
+
.mw-map-panel,
|
|
2537
|
+
.mw-map-menu,
|
|
2538
|
+
.mw-map-card {
|
|
2338
2539
|
background: var(--mw-material-glass-fallback-background);
|
|
2339
2540
|
}
|
|
2340
2541
|
}
|
|
@@ -2346,7 +2547,9 @@
|
|
|
2346
2547
|
.mw-map-footer,
|
|
2347
2548
|
.mw-map-footer__popover,
|
|
2348
2549
|
.mw-map-sheet,
|
|
2349
|
-
.mw-map-panel
|
|
2550
|
+
.mw-map-panel,
|
|
2551
|
+
.mw-map-menu,
|
|
2552
|
+
.mw-map-card {
|
|
2350
2553
|
background: var(--mw-material-glass-fallback-background);
|
|
2351
2554
|
-webkit-backdrop-filter: none;
|
|
2352
2555
|
backdrop-filter: none;
|
package/tokens/index.css
CHANGED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* A place-label click searches for its own name. The hook resolves the layer list once per style and throttles the hover query to one per animation frame.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import { useEffect, useEffectEvent } from "react"
|
|
10
|
-
import type { MapInstance, MapLayerMouseEvent } from "react-map-gl/maplibre"
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* The protomaps label layers (`<theme>_label`, `places_*`); other layers are geometry
|
|
14
|
-
* rather than readable place names.
|
|
15
|
-
*/
|
|
16
|
-
const LABEL_LAYER = /_label|^places_/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Properties that may contain a label's text, in trust order.
|
|
20
|
-
*
|
|
21
|
-
* `name` comes from Protomaps.
|
|
22
|
-
* Localized variants appear in script-specific styles.
|
|
23
|
-
*/
|
|
24
|
-
const NAME_KEYS = ["name", "name:en", "name_en"] as const
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The style's label layer ids.
|
|
28
|
-
*
|
|
29
|
-
* An empty result must stay unqueried, since an empty `layers` option is not the
|
|
30
|
-
* same as an absent one in `queryRenderedFeatures`.
|
|
31
|
-
*/
|
|
32
|
-
function labelLayerIDs(map: MapInstance): string[] {
|
|
33
|
-
const layers = map.getStyle()?.layers ?? []
|
|
34
|
-
|
|
35
|
-
return layers.map((layer) => layer.id).filter((id) => LABEL_LAYER.test(id))
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function labelNameAt(map: MapInstance, point: MapLayerMouseEvent["point"], layers: string[]): string | null {
|
|
39
|
-
if (!layers.length) return null
|
|
40
|
-
|
|
41
|
-
// `queryRenderedFeatures` answers topmost-first, so the first feature with a label is the one the click landed on.
|
|
42
|
-
for (const feature of map.queryRenderedFeatures(point, { layers })) {
|
|
43
|
-
for (const key of NAME_KEYS) {
|
|
44
|
-
const value = feature.properties?.[key]
|
|
45
|
-
|
|
46
|
-
if (typeof value === "string" && value.trim()) return value
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return null
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Routes clicks on map labels to `onPick` with the clicked label's own name.
|
|
55
|
-
*/
|
|
56
|
-
export function useMapLabelPick(map: MapInstance | null, onPick: (name: string) => void): void {
|
|
57
|
-
// The subscription depends only on the map.
|
|
58
|
-
// `onPick` changes on every render.
|
|
59
|
-
// `useEffectEvent` reads the latest callback without adding it as a reactive dependency.
|
|
60
|
-
const pick = useEffectEvent((name: string) => onPick(name))
|
|
61
|
-
|
|
62
|
-
useEffect(() => {
|
|
63
|
-
if (!map) return
|
|
64
|
-
|
|
65
|
-
// Recomputed when the style swaps.
|
|
66
|
-
// Pointer moves read the cached list.
|
|
67
|
-
let layers = labelLayerIDs(map)
|
|
68
|
-
|
|
69
|
-
const readLayers = () => {
|
|
70
|
-
layers = labelLayerIDs(map)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const onClick = (event: MapLayerMouseEvent) => {
|
|
74
|
-
const name = labelNameAt(map, event.point, layers)
|
|
75
|
-
|
|
76
|
-
if (name) {
|
|
77
|
-
pick(name)
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
let frame = 0
|
|
82
|
-
|
|
83
|
-
const onMove = (event: MapLayerMouseEvent) => {
|
|
84
|
-
if (frame) return
|
|
85
|
-
|
|
86
|
-
frame = requestAnimationFrame(() => {
|
|
87
|
-
frame = 0
|
|
88
|
-
|
|
89
|
-
const canvas = map.getCanvas()
|
|
90
|
-
|
|
91
|
-
// The drag cursor belongs to the pan gesture.
|
|
92
|
-
// An override mid-drag would fight the map for the pointer.
|
|
93
|
-
if (canvas.style.cursor === "grabbing") return
|
|
94
|
-
|
|
95
|
-
canvas.style.cursor = labelNameAt(map, event.point, layers) ? "pointer" : ""
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
map.on("styledata", readLayers)
|
|
100
|
-
map.on("click", onClick)
|
|
101
|
-
map.on("mousemove", onMove)
|
|
102
|
-
|
|
103
|
-
return () => {
|
|
104
|
-
if (frame) {
|
|
105
|
-
cancelAnimationFrame(frame)
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
map.off("styledata", readLayers)
|
|
109
|
-
map.off("click", onClick)
|
|
110
|
-
map.off("mousemove", onMove)
|
|
111
|
-
map.getCanvas().style.cursor = ""
|
|
112
|
-
}
|
|
113
|
-
}, [map])
|
|
114
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* A place-label click searches for its own name. The hook resolves the layer list once per style and throttles the hover query to one per animation frame.
|
|
7
|
-
*/
|
|
8
|
-
import type { MapInstance } from "react-map-gl/maplibre";
|
|
9
|
-
/**
|
|
10
|
-
* Routes clicks on map labels to `onPick` with the clicked label's own name.
|
|
11
|
-
*/
|
|
12
|
-
export declare function useMapLabelPick(map: MapInstance | null, onPick: (name: string) => void): void;
|
|
13
|
-
//# sourceMappingURL=useMapLabelPick.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useMapLabelPick.d.ts","sourceRoot":"","sources":["../../lib/map/useMapLabelPick.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,uBAAuB,CAAA;AA2C5E;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CA0D7F"}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* A place-label click searches for its own name. The hook resolves the layer list once per style and throttles the hover query to one per animation frame.
|
|
7
|
-
*/
|
|
8
|
-
import { useEffect, useEffectEvent } from "react";
|
|
9
|
-
/**
|
|
10
|
-
* The protomaps label layers (`<theme>_label`, `places_*`); other layers are geometry
|
|
11
|
-
* rather than readable place names.
|
|
12
|
-
*/
|
|
13
|
-
const LABEL_LAYER = /_label|^places_/;
|
|
14
|
-
/**
|
|
15
|
-
* Properties that may contain a label's text, in trust order.
|
|
16
|
-
*
|
|
17
|
-
* `name` comes from Protomaps.
|
|
18
|
-
* Localized variants appear in script-specific styles.
|
|
19
|
-
*/
|
|
20
|
-
const NAME_KEYS = ["name", "name:en", "name_en"];
|
|
21
|
-
/**
|
|
22
|
-
* The style's label layer ids.
|
|
23
|
-
*
|
|
24
|
-
* An empty result must stay unqueried, since an empty `layers` option is not the
|
|
25
|
-
* same as an absent one in `queryRenderedFeatures`.
|
|
26
|
-
*/
|
|
27
|
-
function labelLayerIDs(map) {
|
|
28
|
-
const layers = map.getStyle()?.layers ?? [];
|
|
29
|
-
return layers.map((layer) => layer.id).filter((id) => LABEL_LAYER.test(id));
|
|
30
|
-
}
|
|
31
|
-
function labelNameAt(map, point, layers) {
|
|
32
|
-
if (!layers.length)
|
|
33
|
-
return null;
|
|
34
|
-
// `queryRenderedFeatures` answers topmost-first, so the first feature with a label is the one the click landed on.
|
|
35
|
-
for (const feature of map.queryRenderedFeatures(point, { layers })) {
|
|
36
|
-
for (const key of NAME_KEYS) {
|
|
37
|
-
const value = feature.properties?.[key];
|
|
38
|
-
if (typeof value === "string" && value.trim())
|
|
39
|
-
return value;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Routes clicks on map labels to `onPick` with the clicked label's own name.
|
|
46
|
-
*/
|
|
47
|
-
export function useMapLabelPick(map, onPick) {
|
|
48
|
-
// The subscription depends only on the map.
|
|
49
|
-
// `onPick` changes on every render.
|
|
50
|
-
// `useEffectEvent` reads the latest callback without adding it as a reactive dependency.
|
|
51
|
-
const pick = useEffectEvent((name) => onPick(name));
|
|
52
|
-
useEffect(() => {
|
|
53
|
-
if (!map)
|
|
54
|
-
return;
|
|
55
|
-
// Recomputed when the style swaps.
|
|
56
|
-
// Pointer moves read the cached list.
|
|
57
|
-
let layers = labelLayerIDs(map);
|
|
58
|
-
const readLayers = () => {
|
|
59
|
-
layers = labelLayerIDs(map);
|
|
60
|
-
};
|
|
61
|
-
const onClick = (event) => {
|
|
62
|
-
const name = labelNameAt(map, event.point, layers);
|
|
63
|
-
if (name) {
|
|
64
|
-
pick(name);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
let frame = 0;
|
|
68
|
-
const onMove = (event) => {
|
|
69
|
-
if (frame)
|
|
70
|
-
return;
|
|
71
|
-
frame = requestAnimationFrame(() => {
|
|
72
|
-
frame = 0;
|
|
73
|
-
const canvas = map.getCanvas();
|
|
74
|
-
// The drag cursor belongs to the pan gesture.
|
|
75
|
-
// An override mid-drag would fight the map for the pointer.
|
|
76
|
-
if (canvas.style.cursor === "grabbing")
|
|
77
|
-
return;
|
|
78
|
-
canvas.style.cursor = labelNameAt(map, event.point, layers) ? "pointer" : "";
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
|
-
map.on("styledata", readLayers);
|
|
82
|
-
map.on("click", onClick);
|
|
83
|
-
map.on("mousemove", onMove);
|
|
84
|
-
return () => {
|
|
85
|
-
if (frame) {
|
|
86
|
-
cancelAnimationFrame(frame);
|
|
87
|
-
}
|
|
88
|
-
map.off("styledata", readLayers);
|
|
89
|
-
map.off("click", onClick);
|
|
90
|
-
map.off("mousemove", onMove);
|
|
91
|
-
map.getCanvas().style.cursor = "";
|
|
92
|
-
};
|
|
93
|
-
}, [map]);
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=useMapLabelPick.js.map
|