@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
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* `MatchTable` — what the data held for each parsed component.
|
|
6
|
+
* Presentational.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { isPresent } from "@mailwoman/core/objects"
|
|
10
|
+
import type { ComponentMatch } from "@mailwoman/core/pipeline/client-result"
|
|
11
|
+
import type { ReactNode } from "react"
|
|
12
|
+
|
|
13
|
+
export interface MatchTableProps {
|
|
14
|
+
matches: ComponentMatch[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function describeMatch({ matched, name, placetype, placeID, note }: ComponentMatch): string {
|
|
18
|
+
if (!matched) return note ? `no match: ${note}` : "no match"
|
|
19
|
+
|
|
20
|
+
const found = [name, placetype ? `(${placetype})` : null, placeID].filter(isPresent).join(" ")
|
|
21
|
+
|
|
22
|
+
return note ? `${found}: ${note}` : found
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function MatchTable({ matches }: MatchTableProps): ReactNode {
|
|
26
|
+
return (
|
|
27
|
+
<table className="mw-components">
|
|
28
|
+
<thead>
|
|
29
|
+
<tr>
|
|
30
|
+
<th>tag</th>
|
|
31
|
+
<th>value</th>
|
|
32
|
+
<th>matched</th>
|
|
33
|
+
</tr>
|
|
34
|
+
</thead>
|
|
35
|
+
<tbody>
|
|
36
|
+
{matches.map((match, i) => (
|
|
37
|
+
<tr key={i}>
|
|
38
|
+
<td>{match.tag}</td>
|
|
39
|
+
<td>{match.value}</td>
|
|
40
|
+
<td>{describeMatch(match)}</td>
|
|
41
|
+
</tr>
|
|
42
|
+
))}
|
|
43
|
+
</tbody>
|
|
44
|
+
</table>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `PipelineExplorer` — the composed parse+resolve tester.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Drives the injected {@link PipelineRuntime} through {@link useParsePipeline},
|
|
8
|
+
* renders the core result (kind badge, component table, resolved place, candidate picker),
|
|
9
|
+
* and slots host-supplied panels (span highlight, tree, timing, …) around it.
|
|
10
|
+
* No model/gazetteer code here — composition + a `ClientOnly` SSR boundary only.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
import type { ReactNode } from "react"
|
|
@@ -118,7 +119,7 @@ function PipelineExplorerInner({ runtime, defaultAddress, presets, panels }: Pip
|
|
|
118
119
|
|
|
119
120
|
{selectedCandidate ? (
|
|
120
121
|
<>
|
|
121
|
-
<ResolvedPlace place={selectedCandidate}
|
|
122
|
+
<ResolvedPlace place={selectedCandidate} />
|
|
122
123
|
{result.candidates.length > 1 ? (
|
|
123
124
|
<CandidatePicker
|
|
124
125
|
candidates={result.candidates}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `QueryForm` — the address input + submit button for the pipeline explorer.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Shows a spinner while parsing.
|
|
8
|
+
* Presentational; `onSubmit` fires on form submission.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { InputHTMLAttributes, KeyboardEvent, ReactNode } from "react"
|
|
@@ -1,21 +1,19 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `ResolvedPlace` — the "Resolved place" detail list (name, placetype, WOF id, coords, score) plus an
|
|
7
|
-
* optional dual-role note. Presentational.
|
|
5
|
+
* `ResolvedPlace` — the "Resolved place" detail list (name, placetype, WOF id, coords, score).
|
|
6
|
+
* Presentational.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import type {
|
|
11
|
-
import {
|
|
9
|
+
import type { ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result"
|
|
10
|
+
import type { ReactNode } from "react"
|
|
12
11
|
|
|
13
12
|
export interface ResolvedPlaceProps {
|
|
14
13
|
place: ResolvedPlaceView
|
|
15
|
-
dualRoles?: DualRoleView[] | null
|
|
16
14
|
}
|
|
17
15
|
|
|
18
|
-
export function ResolvedPlace({ place
|
|
16
|
+
export function ResolvedPlace({ place }: ResolvedPlaceProps): ReactNode {
|
|
19
17
|
return (
|
|
20
18
|
<div className="mw-resolved">
|
|
21
19
|
<h2>Resolved place</h2>
|
|
@@ -25,7 +23,7 @@ export function ResolvedPlace({ place, dualRoles }: ResolvedPlaceProps): ReactNo
|
|
|
25
23
|
<dt>placetype</dt>
|
|
26
24
|
<dd>{place.placetype}</dd>
|
|
27
25
|
{place.tier ? (
|
|
28
|
-
// A street-tier answer
|
|
26
|
+
// A street-tier answer isn't a gazetteer place: it has a precision instead of an id.
|
|
29
27
|
<>
|
|
30
28
|
<dt>precision</dt>
|
|
31
29
|
<dd>
|
|
@@ -34,12 +32,12 @@ export function ResolvedPlace({ place, dualRoles }: ResolvedPlaceProps): ReactNo
|
|
|
34
32
|
: `≈ interpolated · ±${place.uncertaintyM ?? "?"} m`}
|
|
35
33
|
</dd>
|
|
36
34
|
</>
|
|
37
|
-
) : (
|
|
35
|
+
) : place.id > 0 ? (
|
|
38
36
|
<>
|
|
39
37
|
<dt>WOF id</dt>
|
|
40
38
|
<dd>{place.id}</dd>
|
|
41
39
|
</>
|
|
42
|
-
)}
|
|
40
|
+
) : null}
|
|
43
41
|
<dt>coords</dt>
|
|
44
42
|
<dd>
|
|
45
43
|
{place.lat.toFixed(4)}, {place.lon.toFixed(4)}
|
|
@@ -47,17 +45,6 @@ export function ResolvedPlace({ place, dualRoles }: ResolvedPlaceProps): ReactNo
|
|
|
47
45
|
<dt>score</dt>
|
|
48
46
|
<dd>{place.score == null ? "unscored" : place.score.toFixed(3)}</dd>
|
|
49
47
|
</dl>
|
|
50
|
-
{dualRoles && dualRoles.length ? (
|
|
51
|
-
<p className="mw-resolved__dual">
|
|
52
|
-
🏛️ <strong>Dual-role place.</strong> {place.name} also resolves as{" "}
|
|
53
|
-
{dualRoles.map((role, i) => (
|
|
54
|
-
<Fragment key={`${role.role}-${role.id}`}>
|
|
55
|
-
{i > 0 ? ", " : ""}a <strong>{role.role}</strong> ({role.relationshipType.replaceAll("-", " ")})
|
|
56
|
-
</Fragment>
|
|
57
|
-
))}
|
|
58
|
-
.
|
|
59
|
-
</p>
|
|
60
|
-
) : null}
|
|
61
48
|
</div>
|
|
62
49
|
)
|
|
63
50
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `SpanHighlight` — a displaCy-style span ribbon over the raw input: each tagged span is
|
|
6
|
+
* a column with the text on top, tinted by its confidence tier, with the tag beneath.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* plain text, so a dropped span is visible as a literal break in the color.
|
|
8
|
+
* Gaps (delimiters, unparsed characters) fall through as plain text,
|
|
9
|
+
* so a dropped span is visible as a literal break in the color.
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import type { ParsedComponent } from "@mailwoman/core/pipeline/client-result"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `TimingPanel` — the per-stage timing breakdown: a stacked bar sized by each
|
|
6
|
+
* stage's wall-clock, plus a legend.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* not quality.
|
|
8
|
+
* Stage colors are distinct hues, never the confidence red/amber/green,
|
|
9
|
+
* because they encode the pipeline stage and not quality.
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import type { StageTiming } from "@mailwoman/core/pipeline/client-result"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `TreeView` — the parse's containment tree as nested lists with a guide rail per level.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* confidence tier. the value and score render in monospace.
|
|
7
|
+
* The tag tint follows the confidence tier. the value and score render in monospace.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import type { ReactNode } from "react"
|
package/lib/pipeline/copy.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* Builds the "Copy JSON" payload for a parse result — the components + the selected resolved place,
|
|
7
|
-
* pretty-printed. Pure. shared by the explorer's copy button.
|
|
5
|
+
* Builds the "Copy JSON" payload for a parse result — the components + the
|
|
6
|
+
* selected resolved place, pretty-printed.
|
|
7
|
+
* Pure. shared by the explorer's copy button.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import { prettyJSON } from "@mailwoman/core/json"
|
package/lib/pipeline/presets.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Default query + example addresses for the pipeline explorer.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
* mirror the docs demo's set so the extracted component looks identical out of the box.
|
|
7
|
+
* Hosts can override via props.
|
|
8
|
+
* These mirror the docs demo's set so the extracted component looks identical out of the box.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { Preset } from "../common/PresetChips.tsx"
|
|
@@ -44,7 +45,7 @@ export const PIPELINE_PRESETS: ReadonlyArray<Preset> = [
|
|
|
44
45
|
// The postcode is deliberately omitted, since a trailing "Porirua 5026" folds "porirua
|
|
45
46
|
// 5026" in segment mode and misses the index's bare "porirua" key.
|
|
46
47
|
// The `country: "nz"` pin is required, since locale-hint cannot structurally
|
|
47
|
-
// detect NZ (a 4-digit postcode
|
|
48
|
+
// detect NZ (a 4-digit postcode isn't distinctive).
|
|
48
49
|
// Only the pin selects the nz index.
|
|
49
50
|
{ label: "Plimmerton (NZ dependent_locality)", value: "35 Steyne Avenue, Plimmerton, Porirua", country: "nz" },
|
|
50
51
|
]
|
package/lib/pipeline/types.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Types for the pipeline (parse + resolve) explorer.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* The runtime is injected as a {@link PipelineRuntime}, keeping onnxruntime-web,
|
|
8
|
+
* sqlite-wasm and node builtins out of this package's browser graph.
|
|
8
9
|
*/
|
|
9
10
|
|
|
11
|
+
import type { LoadLedgerSnapshot } from "@mailwoman/core/load-ledger"
|
|
10
12
|
import type { ParseResult } from "@mailwoman/core/pipeline/client-result"
|
|
11
13
|
import type { ReactNode } from "react"
|
|
12
14
|
|
|
@@ -24,6 +26,10 @@ export interface PipelineLoadingState {
|
|
|
24
26
|
* The step index cannot report this download because the model is fetched before the first step begins.
|
|
25
27
|
*/
|
|
26
28
|
byteFraction?: number | null
|
|
29
|
+
/**
|
|
30
|
+
* One entry per artifact the load requested, with its bytes, source, state and error.
|
|
31
|
+
*/
|
|
32
|
+
ledger?: LoadLedgerSnapshot | null
|
|
27
33
|
}
|
|
28
34
|
|
|
29
35
|
/**
|
|
@@ -54,6 +60,12 @@ export interface PipelineRuntime {
|
|
|
54
60
|
* Error surfaced by the bundle load, distinct from a per-parse error.
|
|
55
61
|
*/
|
|
56
62
|
errorMessage?: string | null
|
|
63
|
+
/**
|
|
64
|
+
* Loads the bundle again after a failed load.
|
|
65
|
+
*
|
|
66
|
+
* A page shows a Retry button beside `errorMessage` when the host provides this.
|
|
67
|
+
*/
|
|
68
|
+
retryLoad?: () => void
|
|
57
69
|
}
|
|
58
70
|
|
|
59
71
|
/**
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* The headless core of the pipeline explorer.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
+
* It owns query text, busy/stage flags, result and candidate selection.
|
|
7
8
|
* It delegates parse and resolve to the injected {@link PipelineRuntime}.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { ParseResult, ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result"
|
|
11
|
-
import { useCallback, useState } from "react"
|
|
12
|
+
import { useCallback, useRef, useState } from "react"
|
|
12
13
|
|
|
13
14
|
import type { PipelineRuntime } from "#pipeline/types"
|
|
14
15
|
|
|
@@ -41,11 +42,13 @@ export interface UseParsePipeline {
|
|
|
41
42
|
selectedCandidate: ResolvedPlaceView | null
|
|
42
43
|
/**
|
|
43
44
|
* Parse and resolve the current text, safe to bind to a form's `onSubmit`;
|
|
44
|
-
* pass `query` to submit a value the field
|
|
45
|
+
* pass `query` to submit a value the field hasn't re-rendered with yet.
|
|
46
|
+
*
|
|
47
|
+
* A submit during a parse queues its query, and the latest queued query runs when that parse settles.
|
|
45
48
|
*/
|
|
46
49
|
submit: (query?: string) => Promise<void>
|
|
47
50
|
/**
|
|
48
|
-
* Clear the result, used when a preset replaces the input.
|
|
51
|
+
* Clear the result and the parse error, used when a preset replaces the input.
|
|
49
52
|
*/
|
|
50
53
|
reset: () => void
|
|
51
54
|
}
|
|
@@ -61,33 +64,57 @@ export function useParsePipeline({ runtime, defaultText }: UseParsePipelineOptio
|
|
|
61
64
|
const [selectedCandidateIndex, setSelectedCandidateIndex] = useState(0)
|
|
62
65
|
const [parseError, setParseError] = useState<string | null>(null)
|
|
63
66
|
|
|
64
|
-
// `
|
|
67
|
+
// A ref rather than the `busy` state, because a submit made during a parse runs
|
|
68
|
+
// in a closure rendered before `busy` became true.
|
|
69
|
+
const parsingRef = useRef(false)
|
|
70
|
+
// The latest query submitted during a parse.
|
|
71
|
+
// It runs when that parse settles, and an earlier one it replaced is dropped.
|
|
72
|
+
const queuedRef = useRef<string | null>(null)
|
|
73
|
+
|
|
74
|
+
// `setText` doesn't reach this closure before the call after it runs,
|
|
65
75
|
// so a caller that already knows the query passes it.
|
|
66
76
|
const submit = useCallback(
|
|
67
77
|
async (query?: string) => {
|
|
68
|
-
if (!runtime.ready
|
|
78
|
+
if (!runtime.ready) return
|
|
69
79
|
|
|
70
80
|
const input = query ?? text
|
|
71
81
|
|
|
82
|
+
if (parsingRef.current) {
|
|
83
|
+
queuedRef.current = input
|
|
84
|
+
|
|
85
|
+
return
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
parsingRef.current = true
|
|
72
89
|
setBusy(true)
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
|
|
91
|
+
for (let next: string | null = input; next !== null; next = queuedRef.current) {
|
|
92
|
+
queuedRef.current = null
|
|
93
|
+
setParseStage(0)
|
|
94
|
+
setParseError(null)
|
|
95
|
+
|
|
96
|
+
try {
|
|
97
|
+
const parsed = await runtime.runParse(next, { onStage: setParseStage })
|
|
98
|
+
setSelectedCandidateIndex(0)
|
|
99
|
+
setResult(parsed)
|
|
100
|
+
} catch (error) {
|
|
101
|
+
// The error answers this query, so the previous query's result leaves with it.
|
|
102
|
+
setResult(null)
|
|
103
|
+
setParseError(error instanceof Error ? error.message : String(error))
|
|
104
|
+
}
|
|
85
105
|
}
|
|
106
|
+
|
|
107
|
+
parsingRef.current = false
|
|
108
|
+
setBusy(false)
|
|
109
|
+
setParseStage(-1)
|
|
86
110
|
},
|
|
87
|
-
[runtime, text
|
|
111
|
+
[runtime, text]
|
|
88
112
|
)
|
|
89
113
|
|
|
90
|
-
const reset = useCallback(() =>
|
|
114
|
+
const reset = useCallback(() => {
|
|
115
|
+
setResult(null)
|
|
116
|
+
setParseError(null)
|
|
117
|
+
}, [])
|
|
91
118
|
|
|
92
119
|
const selectedCandidate = result ? (result.candidates[selectedCandidateIndex] ?? result.candidates[0] ?? null) : null
|
|
93
120
|
|
package/lib/pipeline.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
* @copyright Sister Software
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
5
|
* @file Pipeline explorer components, visualizers, hooks and interfaces.
|
|
6
6
|
*/
|
|
7
7
|
|
package/lib/poi/AbstainPanel.tsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `AbstainPanel` — shown when the query has no POI intent (it parses as an address).
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Names the classifier's kind so the abstention is legible.
|
|
8
|
+
* Presentational.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { ReactNode } from "react"
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `LiveResultsBlock` — the on-demand live poi.db search affordance: a "Search live"
|
|
6
|
+
* button plus the idle / loading / error / results states.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* `usePOISearch` hook owns the state machine + the injected probe).
|
|
8
|
+
* Presentational — all behavior comes in via props
|
|
9
|
+
* (the `usePOISearch` hook owns the state machine + the injected probe).
|
|
9
10
|
*/
|
|
10
11
|
|
|
11
12
|
import type { ReactNode } from "react"
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* `OverpassBlock` — the OverpassQL export panel: a header with a copy button
|
|
6
|
+
* and the query in a code block.
|
|
5
7
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
+
* Renders the emitter error instead when the export failed.
|
|
9
|
+
* Presentational.
|
|
8
10
|
*/
|
|
9
11
|
|
|
10
12
|
import type { ReactNode } from "react"
|
package/lib/poi/POIExplorer.tsx
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
6
3
|
|
|
7
4
|
import { type ReactNode, useState } from "react"
|
|
8
5
|
|
package/lib/poi/QueryInput.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `QueryInput` — the labeled text field for the POI explorer. Controlled. presentational only.
|
|
5
|
+
* `QueryInput` — the labeled text field for the POI explorer.
|
|
6
|
+
* Controlled. presentational only.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import type { ReactNode } from "react"
|
package/lib/poi/SubjectPanel.tsx
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
+
* `SubjectPanel` — renders the detected POI subject.
|
|
6
|
+
*
|
|
7
|
+
* For a category: the category chip, the optional build-local badge + note.
|
|
8
|
+
* For a brand: the brand-name chip + a Wikidata QID chip (linked).
|
|
5
9
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* share the match-detail list (matched phrase, confidence, anchor). Presentational.
|
|
10
|
+
* Both share the match-detail list (matched phrase, confidence, anchor).
|
|
11
|
+
* Presentational.
|
|
9
12
|
*/
|
|
10
13
|
|
|
11
14
|
import type { ReactNode } from "react"
|
package/lib/poi/runtime.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
-
*/
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
6
3
|
|
|
7
4
|
import { createKindClassifier } from "@mailwoman/kind-classifier"
|
|
8
5
|
import type { POIPhraseLookup } from "@mailwoman/kind-classifier"
|
package/lib/poi/types.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
|
|
2
|
+
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @license AGPL-3.0
|
|
4
|
-
* @author Teffen Ellis, et al.
|
|
5
|
+
* Types for the POI explorer.
|
|
5
6
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
7
|
+
* Live poi.db search is injected as {@link POILiveSearch} so the httpvfs worker
|
|
8
|
+
* stays out of this package's browser graph.
|
|
8
9
|
*/
|
|
9
10
|
|
|
10
11
|
import type { QueryKindResult } from "@mailwoman/core/pipeline"
|