@mailwoman/react 10.0.0 → 10.2.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 +18 -16
- package/fonts.css +97 -22
- package/lib/common/About.tsx +10 -10
- package/lib/common/ClientOnly.tsx +2 -14
- package/lib/common/CopyButton.tsx +9 -3
- package/lib/common/LoadingIndicator.tsx +13 -5
- package/lib/common/PresetChips.tsx +11 -8
- package/lib/common/confidence-tiers.ts +8 -7
- package/lib/common/cx.ts +3 -1
- package/lib/common/text-tokens.ts +10 -13
- package/lib/common/useBuildInfo.ts +54 -0
- package/lib/common/useClipboard.ts +2 -11
- package/lib/common.ts +22 -0
- package/lib/index.ts +27 -18
- package/lib/map/AppIdentity.tsx +89 -0
- package/lib/map/CompareToggle.tsx +8 -31
- package/lib/map/DebugInfo.tsx +75 -0
- package/lib/map/Geocoder.tsx +65 -50
- package/lib/map/GeocoderControls.tsx +425 -141
- package/lib/map/GraticuleLayer.tsx +56 -0
- package/lib/map/MapCanvas.tsx +26 -13
- package/lib/map/MapChipRow.tsx +4 -8
- package/lib/map/MapCompass.tsx +18 -25
- package/lib/map/MapControlStack.tsx +11 -10
- package/lib/map/MapFooter.tsx +5 -17
- package/lib/map/MapProgressBar.tsx +10 -13
- package/lib/map/MapSearchBar.tsx +31 -17
- package/lib/map/MapSheet.tsx +24 -15
- package/lib/map/OverlayLayers.tsx +14 -3
- package/lib/map/PlaceAutocomplete.tsx +12 -21
- package/lib/map/PlaceMarker.tsx +10 -4
- package/lib/map/ResolvedPlaceLayers.tsx +14 -15
- package/lib/map/ResultCamera.tsx +10 -31
- package/lib/map/ResultOverlay.tsx +14 -16
- package/lib/map/ResultPanel.tsx +1 -20
- package/lib/map/VersionPicker.tsx +10 -19
- package/lib/map/fake-runtime.ts +46 -19
- package/lib/map/geometry.ts +14 -47
- package/lib/map/graticule.ts +80 -0
- package/lib/map/map-debug.ts +4 -2
- package/lib/map/place-render.ts +30 -62
- package/lib/map/types.ts +57 -116
- package/lib/map/useCompareState.ts +5 -4
- package/lib/map/useGeocode.ts +7 -5
- package/lib/map/useMapBearing.ts +13 -13
- package/lib/map/useMapLabelPick.ts +21 -30
- package/lib/map/useMapPlaceRender.ts +3 -7
- package/lib/map/usePlaceAutocomplete.ts +44 -50
- package/lib/map.ts +92 -0
- package/lib/pipeline/CandidatePicker.tsx +13 -5
- package/lib/pipeline/ConfidenceCell.tsx +2 -2
- package/lib/pipeline/FailureDiagnostic.tsx +8 -2
- package/lib/pipeline/PipelineExplorer.tsx +6 -3
- package/lib/pipeline/QueryForm.tsx +5 -2
- package/lib/pipeline/ResolvedPlace.tsx +2 -2
- package/lib/pipeline/SpanHighlight.tsx +7 -5
- package/lib/pipeline/TimingPanel.tsx +1 -1
- package/lib/pipeline/TreeView.tsx +2 -2
- package/lib/pipeline/copy.ts +22 -25
- package/lib/pipeline/presets.ts +15 -13
- package/lib/pipeline/types.ts +20 -17
- package/lib/pipeline/useParsePipeline.ts +16 -13
- package/lib/pipeline.ts +36 -0
- package/lib/poi/AbstainPanel.tsx +1 -1
- package/lib/poi/LiveResultsBlock.tsx +2 -1
- package/lib/poi/POIExplorer.tsx +29 -17
- package/lib/poi/QueryInput.tsx +1 -1
- package/lib/poi/SubjectPanel.tsx +4 -3
- package/lib/poi/runtime.ts +14 -16
- package/lib/poi/types.ts +58 -47
- package/lib/poi/usePOISearch.ts +91 -82
- package/lib/poi.ts +40 -0
- package/lib/runtime/useReleaseRuntime.ts +122 -90
- package/lib/search/SearchModal.tsx +478 -0
- package/lib/search/search.css +282 -0
- package/lib/search/types.ts +68 -0
- package/lib/search.ts +11 -0
- package/out/common/About.d.ts +6 -6
- package/out/common/About.d.ts.map +1 -1
- package/out/common/About.js +1 -1
- package/out/common/About.js.map +1 -1
- package/out/common/ClientOnly.d.ts +2 -11
- package/out/common/ClientOnly.d.ts.map +1 -1
- package/out/common/ClientOnly.js +1 -13
- package/out/common/ClientOnly.js.map +1 -1
- package/out/common/CopyButton.d.ts +9 -3
- package/out/common/CopyButton.d.ts.map +1 -1
- package/out/common/CopyButton.js.map +1 -1
- package/out/common/LoadingIndicator.d.ts +13 -5
- package/out/common/LoadingIndicator.d.ts.map +1 -1
- package/out/common/LoadingIndicator.js.map +1 -1
- package/out/common/PresetChips.d.ts +11 -8
- package/out/common/PresetChips.d.ts.map +1 -1
- package/out/common/PresetChips.js.map +1 -1
- package/out/common/confidence-tiers.d.ts +8 -7
- package/out/common/confidence-tiers.d.ts.map +1 -1
- package/out/common/confidence-tiers.js +7 -6
- package/out/common/confidence-tiers.js.map +1 -1
- package/out/common/cx.d.ts +3 -1
- package/out/common/cx.d.ts.map +1 -1
- package/out/common/cx.js +3 -1
- package/out/common/cx.js.map +1 -1
- package/out/common/text-tokens.d.ts +6 -11
- package/out/common/text-tokens.d.ts.map +1 -1
- package/out/common/text-tokens.js +6 -3
- package/out/common/text-tokens.js.map +1 -1
- package/out/common/useBuildInfo.d.ts +27 -0
- package/out/common/useBuildInfo.d.ts.map +1 -0
- package/out/common/useBuildInfo.js +32 -0
- package/out/common/useBuildInfo.js.map +1 -0
- package/out/common/useClipboard.d.ts +1 -3
- package/out/common/useClipboard.d.ts.map +1 -1
- package/out/common/useClipboard.js +2 -11
- package/out/common/useClipboard.js.map +1 -1
- package/out/common.d.ts +22 -0
- package/out/common.d.ts.map +1 -0
- package/out/common.js +15 -0
- package/out/common.js.map +1 -0
- package/out/index.d.ts +26 -16
- package/out/index.d.ts.map +1 -1
- package/out/index.js +21 -15
- package/out/index.js.map +1 -1
- package/out/map/AppIdentity.d.ts +46 -0
- package/out/map/AppIdentity.d.ts.map +1 -0
- package/out/map/AppIdentity.js +16 -0
- package/out/map/AppIdentity.js.map +1 -0
- package/out/map/CompareToggle.d.ts +8 -31
- package/out/map/CompareToggle.d.ts.map +1 -1
- package/out/map/CompareToggle.js +4 -1
- package/out/map/CompareToggle.js.map +1 -1
- package/out/map/DebugInfo.d.ts +27 -0
- package/out/map/DebugInfo.d.ts.map +1 -0
- package/out/map/DebugInfo.js +36 -0
- package/out/map/DebugInfo.js.map +1 -0
- package/out/map/Geocoder.d.ts +41 -30
- package/out/map/Geocoder.d.ts.map +1 -1
- package/out/map/Geocoder.js +23 -37
- package/out/map/Geocoder.js.map +1 -1
- package/out/map/GeocoderControls.d.ts +15 -44
- package/out/map/GeocoderControls.d.ts.map +1 -1
- package/out/map/GeocoderControls.js +250 -39
- package/out/map/GeocoderControls.js.map +1 -1
- package/out/map/GraticuleLayer.d.ts +30 -0
- package/out/map/GraticuleLayer.d.ts.map +1 -0
- package/out/map/GraticuleLayer.js +25 -0
- package/out/map/GraticuleLayer.js.map +1 -0
- package/out/map/MapCanvas.d.ts +26 -13
- package/out/map/MapCanvas.d.ts.map +1 -1
- package/out/map/MapCanvas.js +5 -2
- package/out/map/MapCanvas.js.map +1 -1
- package/out/map/MapChipRow.d.ts +4 -8
- package/out/map/MapChipRow.d.ts.map +1 -1
- package/out/map/MapChipRow.js.map +1 -1
- package/out/map/MapCompass.d.ts +14 -21
- package/out/map/MapCompass.d.ts.map +1 -1
- package/out/map/MapCompass.js +5 -1
- package/out/map/MapCompass.js.map +1 -1
- package/out/map/MapControlStack.d.ts +11 -10
- package/out/map/MapControlStack.d.ts.map +1 -1
- package/out/map/MapControlStack.js +4 -1
- package/out/map/MapControlStack.js.map +1 -1
- package/out/map/MapFooter.d.ts +5 -16
- package/out/map/MapFooter.d.ts.map +1 -1
- package/out/map/MapFooter.js +0 -14
- package/out/map/MapFooter.js.map +1 -1
- package/out/map/MapProgressBar.d.ts +10 -13
- package/out/map/MapProgressBar.d.ts.map +1 -1
- package/out/map/MapProgressBar.js.map +1 -1
- package/out/map/MapSearchBar.d.ts +16 -17
- package/out/map/MapSearchBar.d.ts.map +1 -1
- package/out/map/MapSearchBar.js +6 -0
- package/out/map/MapSearchBar.js.map +1 -1
- package/out/map/MapSheet.d.ts +15 -12
- package/out/map/MapSheet.d.ts.map +1 -1
- package/out/map/MapSheet.js +8 -12
- package/out/map/MapSheet.js.map +1 -1
- package/out/map/OverlayLayers.d.ts +8 -2
- package/out/map/OverlayLayers.d.ts.map +1 -1
- package/out/map/OverlayLayers.js +3 -3
- package/out/map/OverlayLayers.js.map +1 -1
- package/out/map/PlaceAutocomplete.d.ts +12 -21
- package/out/map/PlaceAutocomplete.d.ts.map +1 -1
- package/out/map/PlaceAutocomplete.js +2 -1
- package/out/map/PlaceAutocomplete.js.map +1 -1
- package/out/map/PlaceMarker.d.ts +10 -4
- package/out/map/PlaceMarker.d.ts.map +1 -1
- package/out/map/PlaceMarker.js +3 -1
- package/out/map/PlaceMarker.js.map +1 -1
- package/out/map/ResolvedPlaceLayers.d.ts +14 -15
- package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
- package/out/map/ResolvedPlaceLayers.js +1 -1
- package/out/map/ResolvedPlaceLayers.js.map +1 -1
- package/out/map/ResultCamera.d.ts +10 -31
- package/out/map/ResultCamera.d.ts.map +1 -1
- package/out/map/ResultCamera.js +3 -28
- package/out/map/ResultCamera.js.map +1 -1
- package/out/map/ResultOverlay.d.ts +14 -16
- package/out/map/ResultOverlay.d.ts.map +1 -1
- package/out/map/ResultOverlay.js +1 -2
- package/out/map/ResultOverlay.js.map +1 -1
- package/out/map/ResultPanel.d.ts +1 -20
- package/out/map/ResultPanel.d.ts.map +1 -1
- package/out/map/ResultPanel.js.map +1 -1
- package/out/map/VersionPicker.d.ts +7 -19
- package/out/map/VersionPicker.d.ts.map +1 -1
- package/out/map/VersionPicker.js +5 -2
- package/out/map/VersionPicker.js.map +1 -1
- package/out/map/fake-runtime.d.ts +9 -11
- package/out/map/fake-runtime.d.ts.map +1 -1
- package/out/map/fake-runtime.js +45 -19
- package/out/map/fake-runtime.js.map +1 -1
- package/out/map/geometry.d.ts +13 -34
- package/out/map/geometry.d.ts.map +1 -1
- package/out/map/geometry.js +9 -34
- package/out/map/geometry.js.map +1 -1
- package/out/map/graticule.d.ts +17 -0
- package/out/map/graticule.d.ts.map +1 -0
- package/out/map/graticule.js +67 -0
- package/out/map/graticule.js.map +1 -0
- package/out/map/map-debug.d.ts +4 -2
- package/out/map/map-debug.d.ts.map +1 -1
- package/out/map/map-debug.js +1 -1
- package/out/map/map-debug.js.map +1 -1
- package/out/map/place-render.d.ts +25 -45
- package/out/map/place-render.d.ts.map +1 -1
- package/out/map/place-render.js +4 -39
- package/out/map/place-render.js.map +1 -1
- package/out/map/types.d.ts +57 -113
- package/out/map/types.d.ts.map +1 -1
- package/out/map/types.js +1 -10
- package/out/map/types.js.map +1 -1
- package/out/map/useCompareState.d.ts +5 -4
- package/out/map/useCompareState.d.ts.map +1 -1
- package/out/map/useCompareState.js +3 -3
- package/out/map/useCompareState.js.map +1 -1
- package/out/map/useGeocode.d.ts +5 -3
- package/out/map/useGeocode.d.ts.map +1 -1
- package/out/map/useGeocode.js +4 -4
- package/out/map/useGeocode.js.map +1 -1
- package/out/map/useMapBearing.d.ts +11 -11
- package/out/map/useMapBearing.d.ts.map +1 -1
- package/out/map/useMapBearing.js +6 -11
- package/out/map/useMapBearing.js.map +1 -1
- package/out/map/useMapLabelPick.d.ts +4 -14
- package/out/map/useMapLabelPick.d.ts.map +1 -1
- package/out/map/useMapLabelPick.js +21 -30
- package/out/map/useMapLabelPick.js.map +1 -1
- package/out/map/useMapPlaceRender.d.ts +3 -7
- package/out/map/useMapPlaceRender.d.ts.map +1 -1
- package/out/map/useMapPlaceRender.js +2 -6
- package/out/map/useMapPlaceRender.js.map +1 -1
- package/out/map/usePlaceAutocomplete.d.ts +30 -28
- package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
- package/out/map/usePlaceAutocomplete.js +6 -33
- package/out/map/usePlaceAutocomplete.js.map +1 -1
- package/out/map.d.ts +67 -0
- package/out/map.d.ts.map +1 -0
- package/out/map.js +45 -0
- package/out/map.js.map +1 -0
- package/out/pipeline/CandidatePicker.d.ts +12 -2
- package/out/pipeline/CandidatePicker.d.ts.map +1 -1
- package/out/pipeline/CandidatePicker.js +1 -1
- package/out/pipeline/CandidatePicker.js.map +1 -1
- package/out/pipeline/ConfidenceCell.d.ts +2 -2
- package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
- package/out/pipeline/ConfidenceCell.js +1 -1
- package/out/pipeline/FailureDiagnostic.d.ts +8 -2
- package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
- package/out/pipeline/FailureDiagnostic.js +3 -0
- package/out/pipeline/FailureDiagnostic.js.map +1 -1
- package/out/pipeline/PipelineExplorer.d.ts +6 -2
- 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 +5 -2
- package/out/pipeline/QueryForm.d.ts.map +1 -1
- package/out/pipeline/QueryForm.js.map +1 -1
- package/out/pipeline/ResolvedPlace.d.ts +1 -1
- package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
- package/out/pipeline/SpanHighlight.d.ts +4 -3
- package/out/pipeline/SpanHighlight.d.ts.map +1 -1
- package/out/pipeline/SpanHighlight.js +3 -2
- package/out/pipeline/SpanHighlight.js.map +1 -1
- package/out/pipeline/TimingPanel.d.ts +1 -1
- package/out/pipeline/TreeView.d.ts +1 -1
- package/out/pipeline/TreeView.js.map +1 -1
- package/out/pipeline/copy.d.ts +1 -1
- package/out/pipeline/copy.d.ts.map +1 -1
- package/out/pipeline/copy.js +4 -3
- package/out/pipeline/copy.js.map +1 -1
- package/out/pipeline/presets.d.ts +5 -4
- package/out/pipeline/presets.d.ts.map +1 -1
- package/out/pipeline/presets.js +15 -13
- package/out/pipeline/presets.js.map +1 -1
- package/out/pipeline/types.d.ts +20 -17
- package/out/pipeline/types.d.ts.map +1 -1
- package/out/pipeline/types.js +2 -4
- package/out/pipeline/types.js.map +1 -1
- package/out/pipeline/useParsePipeline.d.ts +14 -9
- package/out/pipeline/useParsePipeline.d.ts.map +1 -1
- package/out/pipeline/useParsePipeline.js +7 -8
- package/out/pipeline/useParsePipeline.js.map +1 -1
- package/out/pipeline.d.ts +33 -0
- package/out/pipeline.d.ts.map +1 -0
- package/out/pipeline.js +21 -0
- package/out/pipeline.js.map +1 -0
- package/out/poi/AbstainPanel.d.ts +1 -1
- package/out/poi/LiveResultsBlock.d.ts +2 -1
- package/out/poi/LiveResultsBlock.d.ts.map +1 -1
- package/out/poi/LiveResultsBlock.js.map +1 -1
- package/out/poi/POIExplorer.d.ts +22 -12
- package/out/poi/POIExplorer.d.ts.map +1 -1
- package/out/poi/POIExplorer.js +11 -10
- package/out/poi/POIExplorer.js.map +1 -1
- package/out/poi/QueryInput.d.ts +1 -1
- package/out/poi/SubjectPanel.d.ts +2 -2
- package/out/poi/SubjectPanel.d.ts.map +1 -1
- package/out/poi/SubjectPanel.js +2 -1
- package/out/poi/SubjectPanel.js.map +1 -1
- package/out/poi/runtime.d.ts +5 -14
- package/out/poi/runtime.d.ts.map +1 -1
- package/out/poi/runtime.js +14 -16
- package/out/poi/runtime.js.map +1 -1
- package/out/poi/types.d.ts +53 -45
- package/out/poi/types.d.ts.map +1 -1
- package/out/poi/types.js +2 -4
- package/out/poi/types.js.map +1 -1
- package/out/poi/usePOISearch.d.ts +30 -17
- package/out/poi/usePOISearch.d.ts.map +1 -1
- package/out/poi/usePOISearch.js +48 -64
- package/out/poi/usePOISearch.js.map +1 -1
- package/out/poi.d.ts +23 -0
- package/out/poi.d.ts.map +1 -0
- package/out/poi.js +15 -0
- package/out/poi.js.map +1 -0
- package/out/runtime/useReleaseRuntime.d.ts +63 -74
- package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
- package/out/runtime/useReleaseRuntime.js +31 -32
- package/out/runtime/useReleaseRuntime.js.map +1 -1
- package/out/{runtime/index.d.ts → runtime.d.ts} +1 -1
- package/out/runtime.d.ts.map +1 -0
- package/out/{runtime/index.js → runtime.js} +1 -1
- package/out/runtime.js.map +1 -0
- package/out/search/SearchModal.d.ts +40 -0
- package/out/search/SearchModal.d.ts.map +1 -0
- package/out/search/SearchModal.js +255 -0
- package/out/search/SearchModal.js.map +1 -0
- package/out/search/types.d.ts +65 -0
- package/out/search/types.d.ts.map +1 -0
- package/out/search/types.js +13 -0
- package/out/search/types.js.map +1 -0
- package/out/search.d.ts +11 -0
- package/out/search.d.ts.map +1 -0
- package/out/search.js +9 -0
- package/out/search.js.map +1 -0
- package/package.json +73 -165
- package/styles.css +482 -266
- package/tokens/index.css +24 -6
- package/tokens/tokens.json +114 -6
- package/lib/common/index.ts +0 -22
- package/lib/map/BackendControl.tsx +0 -51
- package/lib/map/index.ts +0 -95
- package/lib/pipeline/index.ts +0 -36
- package/lib/poi/index.ts +0 -39
- package/out/common/index.d.ts +0 -22
- package/out/common/index.d.ts.map +0 -1
- package/out/common/index.js +0 -15
- package/out/common/index.js.map +0 -1
- package/out/map/BackendControl.d.ts +0 -32
- package/out/map/BackendControl.d.ts.map +0 -1
- package/out/map/BackendControl.js +0 -8
- package/out/map/BackendControl.js.map +0 -1
- package/out/map/index.d.ts +0 -69
- package/out/map/index.d.ts.map +0 -1
- package/out/map/index.js +0 -46
- package/out/map/index.js.map +0 -1
- package/out/pipeline/index.d.ts +0 -33
- package/out/pipeline/index.d.ts.map +0 -1
- package/out/pipeline/index.js +0 -21
- package/out/pipeline/index.js.map +0 -1
- package/out/poi/index.d.ts +0 -23
- package/out/poi/index.d.ts.map +0 -1
- package/out/poi/index.js +0 -15
- package/out/poi/index.js.map +0 -1
- package/out/runtime/index.d.ts.map +0 -1
- package/out/runtime/index.js.map +0 -1
- package/styleframe.config.ts +0 -329
- package/vitest.node.config.ts +0 -20
- /package/lib/{runtime/index.ts → runtime.ts} +0 -0
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file Confidence banding shared by every component that
|
|
5
|
+
* @file Confidence banding shared by every component that colors a span by confidence.
|
|
6
6
|
*
|
|
7
|
-
* It is a presentation choice
|
|
8
|
-
* bounds only decide which
|
|
7
|
+
* It is a presentation choice rather than a model one: the parser emits a continuous confidence and these
|
|
8
|
+
* bounds only decide which color a span is drawn in, so they live here rather than anywhere the
|
|
9
9
|
* pipeline can see them.
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const HIGH_CONFIDENCE_MIN = 0.8;
|
|
15
15
|
/**
|
|
16
|
-
* At or above this the span is drawn as medium-confidence
|
|
16
|
+
* At or above this the span is drawn as medium-confidence.
|
|
17
|
+
* Below it, low.
|
|
17
18
|
*/
|
|
18
19
|
export declare const MID_CONFIDENCE_MIN = 0.5;
|
|
19
20
|
/**
|
|
@@ -29,8 +30,8 @@ export type ConfidenceTier = "high" | "mid" | "low";
|
|
|
29
30
|
*/
|
|
30
31
|
export declare function confidenceTier(confidence: number): ConfidenceTier;
|
|
31
32
|
/**
|
|
32
|
-
* {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
|
|
33
|
-
* older model that emits no confidence never reads as uniformly wrong.
|
|
33
|
+
* {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
|
|
34
|
+
* rather than `low`, so an older model that emits no confidence never reads as uniformly wrong.
|
|
34
35
|
*/
|
|
35
|
-
export declare function confidenceTierOrMid(confidence?: number): ConfidenceTier;
|
|
36
|
+
export declare function confidenceTierOrMid(confidence?: number | null): ConfidenceTier;
|
|
36
37
|
//# sourceMappingURL=confidence-tiers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confidence-tiers.d.ts","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC
|
|
1
|
+
{"version":3,"file":"confidence-tiers.d.ts","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;AAEnD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAMjE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc,CAI9E"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
* @file Confidence banding shared by every component that
|
|
5
|
+
* @file Confidence banding shared by every component that colors a span by confidence.
|
|
6
6
|
*
|
|
7
|
-
* It is a presentation choice
|
|
8
|
-
* bounds only decide which
|
|
7
|
+
* It is a presentation choice rather than a model one: the parser emits a continuous confidence and these
|
|
8
|
+
* bounds only decide which color a span is drawn in, so they live here rather than anywhere the
|
|
9
9
|
* pipeline can see them.
|
|
10
10
|
*/
|
|
11
11
|
/**
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export const HIGH_CONFIDENCE_MIN = 0.8;
|
|
15
15
|
/**
|
|
16
|
-
* At or above this the span is drawn as medium-confidence
|
|
16
|
+
* At or above this the span is drawn as medium-confidence.
|
|
17
|
+
* Below it, low.
|
|
17
18
|
*/
|
|
18
19
|
export const MID_CONFIDENCE_MIN = 0.5;
|
|
19
20
|
/**
|
|
@@ -31,8 +32,8 @@ export function confidenceTier(confidence) {
|
|
|
31
32
|
return "low";
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
|
-
* {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
|
|
35
|
-
* older model that emits no confidence never reads as uniformly wrong.
|
|
35
|
+
* {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
|
|
36
|
+
* rather than `low`, so an older model that emits no confidence never reads as uniformly wrong.
|
|
36
37
|
*/
|
|
37
38
|
export function confidenceTierOrMid(confidence) {
|
|
38
39
|
if (confidence == null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"confidence-tiers.js","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC
|
|
1
|
+
{"version":3,"file":"confidence-tiers.js","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAOrC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAChD,IAAI,UAAU,IAAI,mBAAmB;QAAE,OAAO,MAAM,CAAA;IAEpD,IAAI,UAAU,IAAI,kBAAkB;QAAE,OAAO,KAAK,CAAA;IAElD,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAA0B;IAC7D,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAEpC,OAAO,cAAc,CAAC,UAAU,CAAC,CAAA;AAClC,CAAC"}
|
package/out/common/cx.d.ts
CHANGED
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
export type ClassValue = string | number | false | null | undefined | Record<string, boolean>;
|
|
11
11
|
/**
|
|
12
|
-
* Join truthy class tokens
|
|
12
|
+
* Join truthy class tokens.
|
|
13
|
+
*
|
|
14
|
+
* Object entries contribute their key when the value is truthy.
|
|
13
15
|
*/
|
|
14
16
|
export declare function cx(...values: ClassValue[]): string;
|
|
15
17
|
//# sourceMappingURL=cx.d.ts.map
|
package/out/common/cx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7F
|
|
1
|
+
{"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7F;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAoBlD"}
|
package/out/common/cx.js
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
* siblings and the React peer.
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
|
-
* Join truthy class tokens
|
|
11
|
+
* Join truthy class tokens.
|
|
12
|
+
*
|
|
13
|
+
* Object entries contribute their key when the value is truthy.
|
|
12
14
|
*/
|
|
13
15
|
export function cx(...values) {
|
|
14
16
|
const out = [];
|
package/out/common/cx.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH
|
|
1
|
+
{"version":3,"file":"cx.js","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACzC,MAAM,GAAG,GAAa,EAAE,CAAA;IAExB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK;YAAE,SAAQ;QAEpB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5D,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YAEvB,SAAQ;QACT,CAAC;QAED,KAAK,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,EAAE,EAAE,CAAC;gBACR,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACd,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACrB,CAAC"}
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
* character). Two panels must agree for the BIO labels to line up between them, so the split and
|
|
10
10
|
* the owner walk live here.
|
|
11
11
|
*/
|
|
12
|
+
import type { CharRange } from "@mailwoman/query-shape";
|
|
12
13
|
export interface WordToken {
|
|
13
14
|
/**
|
|
14
15
|
* The word text as it appears in the input.
|
|
15
16
|
*/
|
|
16
17
|
text: string;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Whitespace before this word.
|
|
19
20
|
*/
|
|
20
21
|
whitespace: string;
|
|
21
22
|
/**
|
|
@@ -32,15 +33,9 @@ export interface WordToken {
|
|
|
32
33
|
*/
|
|
33
34
|
export declare function tokenizeWords(input: string): WordToken[];
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
start: number;
|
|
39
|
-
end: number;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word. A word is
|
|
43
|
-
* covered when any part of it falls within the span.
|
|
36
|
+
* Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word.
|
|
37
|
+
*
|
|
38
|
+
* A word is covered when any part of it falls within the span.
|
|
44
39
|
*/
|
|
45
|
-
export declare function shortestSpanOwners(words: readonly
|
|
40
|
+
export declare function shortestSpanOwners(words: readonly CharRange[], spans: readonly CharRange[]): number[];
|
|
46
41
|
//# sourceMappingURL=text-tokens.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-tokens.d.ts","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"text-tokens.d.ts","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CA2BxD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,EAAE,CAcrG"}
|
|
@@ -15,7 +15,9 @@
|
|
|
15
15
|
export function tokenizeWords(input) {
|
|
16
16
|
const words = [];
|
|
17
17
|
let i = 0;
|
|
18
|
-
// `charAt` answers "" past the end
|
|
18
|
+
// `charAt` answers "" past the end.
|
|
19
|
+
// It no whitespace test matches.
|
|
20
|
+
// Therefore, both walks stop at the input's length.
|
|
19
21
|
while (i < input.length) {
|
|
20
22
|
let ws = "";
|
|
21
23
|
while (/\s/.test(input.charAt(i))) {
|
|
@@ -33,8 +35,9 @@ export function tokenizeWords(input) {
|
|
|
33
35
|
return words;
|
|
34
36
|
}
|
|
35
37
|
/**
|
|
36
|
-
* Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word.
|
|
37
|
-
*
|
|
38
|
+
* Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word.
|
|
39
|
+
*
|
|
40
|
+
* A word is covered when any part of it falls within the span.
|
|
38
41
|
*/
|
|
39
42
|
export function shortestSpanOwners(words, spans) {
|
|
40
43
|
return words.map((word) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-tokens.js","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"text-tokens.js","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAuBH;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,KAAa;IAC1C,MAAM,KAAK,GAAgB,EAAE,CAAA;IAC7B,IAAI,CAAC,GAAG,CAAC,CAAA;IAET,oCAAoC;IACpC,iCAAiC;IACjC,oDAAoD;IACpD,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACzB,IAAI,EAAE,GAAG,EAAE,CAAA;QAEX,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACnC,EAAE,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;YAErB,CAAC,EAAE,CAAA;QACJ,CAAC;QAED,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;YAAE,MAAK;QAC5B,MAAM,KAAK,GAAG,CAAC,CAAA;QAEf,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,CAAC,EAAE,CAAA;QACJ,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3E,CAAC;IAED,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA2B,EAAE,KAA2B;IAC1F,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAA;QACb,IAAI,OAAO,GAAG,QAAQ,CAAA;QAEtB,KAAK,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC;gBAC/E,OAAO,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,CAAA;gBAC3B,IAAI,GAAG,CAAC,CAAA;YACT,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAA;IACZ,CAAC,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* `useBuildInfo()` — reads the deployment's own `build.json`, resolving a failed fetch to `null` because a dev server has no such file and the page must not show an error strip.
|
|
7
|
+
*/
|
|
8
|
+
export interface BuildInfoRecord {
|
|
9
|
+
/**
|
|
10
|
+
* The deployment's name: `mailwoman-earth`, `mailwoman-moon`, `mailwoman-mars`.
|
|
11
|
+
*/
|
|
12
|
+
app: string;
|
|
13
|
+
revision: string;
|
|
14
|
+
/**
|
|
15
|
+
* The same revision, full length — what a commit URL wants.
|
|
16
|
+
*/
|
|
17
|
+
commit?: string;
|
|
18
|
+
/**
|
|
19
|
+
* ISO-8601 seconds, `Z` suffix.
|
|
20
|
+
*/
|
|
21
|
+
buildTime: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The deployment record, or `null` while it loads and whenever it cannot be read.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useBuildInfo(url?: string): BuildInfoRecord | null;
|
|
27
|
+
//# sourceMappingURL=useBuildInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBuildInfo.d.ts","sourceRoot":"","sources":["../../lib/common/useBuildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,SAAgB,GAAG,eAAe,GAAG,IAAI,CAwBxE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* `useBuildInfo()` — reads the deployment's own `build.json`, resolving a failed fetch to `null` because a dev server has no such file and the page must not show an error strip.
|
|
7
|
+
*/
|
|
8
|
+
import { useEffect, useState } from "react";
|
|
9
|
+
/**
|
|
10
|
+
* The deployment record, or `null` while it loads and whenever it cannot be read.
|
|
11
|
+
*/
|
|
12
|
+
export function useBuildInfo(url = "/build.json") {
|
|
13
|
+
const [info, setInfo] = useState(null);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const controller = new AbortController();
|
|
16
|
+
void (async () => {
|
|
17
|
+
try {
|
|
18
|
+
const response = await fetch(url, { signal: controller.signal });
|
|
19
|
+
if (!response.ok)
|
|
20
|
+
return;
|
|
21
|
+
const record = (await response.json());
|
|
22
|
+
if (!controller.signal.aborted && record?.revision) {
|
|
23
|
+
setInfo(record);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
catch { }
|
|
27
|
+
})();
|
|
28
|
+
return () => controller.abort();
|
|
29
|
+
}, [url]);
|
|
30
|
+
return info;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=useBuildInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBuildInfo.js","sourceRoot":"","sources":["../../lib/common/useBuildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAkB3C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,GAAG,GAAG,aAAa;IAC/C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAyB,IAAI,CAAC,CAAA;IAE9D,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;QAExC,KAAK,CAAC,KAAK,IAAI,EAAE;YAChB,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;gBAEhE,IAAI,CAAC,QAAQ,CAAC,EAAE;oBAAE,OAAM;gBAExB,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAA;gBAEzD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;oBACpD,OAAO,CAAC,MAAM,CAAC,CAAA;gBAChB,CAAC;YACF,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACX,CAAC,CAAC,EAAE,CAAA;QAEJ,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IAChC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* `execCommand` fallback (for insecure contexts / older browsers), plus a transient "copied" flag
|
|
8
|
-
* that auto-resets. Extracted from the two explorers' duplicated `onCopy` handlers.
|
|
6
|
+
* `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy `execCommand` fallback for insecure contexts, plus a transient "copied" flag that auto-resets.
|
|
9
7
|
*/
|
|
10
8
|
export interface UseClipboard {
|
|
11
9
|
copied: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAO,GAAG,YAAY,CA4BzD"}
|
|
@@ -3,22 +3,15 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* `execCommand` fallback (for insecure contexts / older browsers), plus a transient "copied" flag
|
|
8
|
-
* that auto-resets. Extracted from the two explorers' duplicated `onCopy` handlers.
|
|
6
|
+
* `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy `execCommand` fallback for insecure contexts, plus a transient "copied" flag that auto-resets.
|
|
9
7
|
*/
|
|
10
8
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
11
|
-
/**
|
|
12
|
-
* Best-effort clipboard write: async Clipboard API first, hidden-textarea `execCommand` fallback.
|
|
13
|
-
*/
|
|
14
9
|
async function writeToClipboard(value) {
|
|
15
10
|
try {
|
|
16
11
|
await navigator.clipboard.writeText(value);
|
|
17
12
|
return;
|
|
18
13
|
}
|
|
19
|
-
catch {
|
|
20
|
-
// Fall through to the legacy path below.
|
|
21
|
-
}
|
|
14
|
+
catch { }
|
|
22
15
|
const textarea = document.createElement("textarea");
|
|
23
16
|
textarea.value = value;
|
|
24
17
|
textarea.style.position = "fixed";
|
|
@@ -29,7 +22,6 @@ async function writeToClipboard(value) {
|
|
|
29
22
|
document.execCommand("copy");
|
|
30
23
|
}
|
|
31
24
|
catch {
|
|
32
|
-
// Nothing else to try — leave `copied` false via the caller's error path.
|
|
33
25
|
}
|
|
34
26
|
finally {
|
|
35
27
|
document.body.removeChild(textarea);
|
|
@@ -41,7 +33,6 @@ async function writeToClipboard(value) {
|
|
|
41
33
|
export function useClipboard(resetMs = 1500) {
|
|
42
34
|
const [copied, setCopied] = useState(false);
|
|
43
35
|
const timer = useRef(null);
|
|
44
|
-
// Clear a pending reset timer on unmount so it never fires against a torn-down component.
|
|
45
36
|
useEffect(() => () => {
|
|
46
37
|
if (timer.current) {
|
|
47
38
|
clearTimeout(timer.current);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClipboard.js","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"useClipboard.js","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhE,KAAK,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC;QACJ,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;QAE1C,OAAM;IACP,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IACnD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;IACjC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAA;IAEjB,IAAI,CAAC;QACJ,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAAC,MAAM,CAAC;IACT,CAAC;YAAS,CAAC;QACV,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IACpC,CAAC;AACF,CAAC;AAOD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,OAAO,GAAG,IAAI;IAC1C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC3C,MAAM,KAAK,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAA;IAEhE,SAAS,CACR,GAAG,EAAE,CAAC,GAAG,EAAE;QACV,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC5B,CAAC;IACF,CAAC,EACD,EAAE,CACF,CAAA;IAED,MAAM,IAAI,GAAG,WAAW,CACvB,KAAK,EAAE,KAAa,EAAE,EAAE;QACvB,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAA;QAC7B,SAAS,CAAC,IAAI,CAAC,CAAA;QAEf,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;YACnB,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC5B,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAA;IAC5D,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAA;IAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACxB,CAAC"}
|
package/out/common.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file Common React primitives.
|
|
6
|
+
*/
|
|
7
|
+
export { ClientOnly } from "./common/ClientOnly.tsx";
|
|
8
|
+
export type { ClientOnlyProps } from "./common/ClientOnly.tsx";
|
|
9
|
+
export { CopyButton } from "./common/CopyButton.tsx";
|
|
10
|
+
export type { CopyButtonProps } from "./common/CopyButton.tsx";
|
|
11
|
+
export { cx } from "#common/cx";
|
|
12
|
+
export type { ClassValue } from "#common/cx";
|
|
13
|
+
export { KindBadge } from "./common/KindBadge.tsx";
|
|
14
|
+
export type { KindBadgeProps } from "./common/KindBadge.tsx";
|
|
15
|
+
export { LoadingIndicator } from "./common/LoadingIndicator.tsx";
|
|
16
|
+
export type { LoadingIndicatorProps, LoadingMode } from "./common/LoadingIndicator.tsx";
|
|
17
|
+
export { PresetChips } from "./common/PresetChips.tsx";
|
|
18
|
+
export type { Preset, PresetChipsProps } from "./common/PresetChips.tsx";
|
|
19
|
+
export { useClipboard } from "#common/useClipboard";
|
|
20
|
+
export type { UseClipboard } from "#common/useClipboard";
|
|
21
|
+
export { useDebouncedValue } from "#common/useDebouncedValue";
|
|
22
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../lib/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
|
package/out/common.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
* @file Common React primitives.
|
|
6
|
+
*/
|
|
7
|
+
export { ClientOnly } from "./common/ClientOnly.js";
|
|
8
|
+
export { CopyButton } from "./common/CopyButton.js";
|
|
9
|
+
export { cx } from "#common/cx";
|
|
10
|
+
export { KindBadge } from "./common/KindBadge.js";
|
|
11
|
+
export { LoadingIndicator } from "./common/LoadingIndicator.js";
|
|
12
|
+
export { PresetChips } from "./common/PresetChips.js";
|
|
13
|
+
export { useClipboard } from "#common/useClipboard";
|
|
14
|
+
export { useDebouncedValue } from "#common/useDebouncedValue";
|
|
15
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../lib/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAwB,CAAA;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA+B,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAA0B,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
|
package/out/index.d.ts
CHANGED
|
@@ -2,22 +2,32 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Re-exports the shared presentational components and hooks that both explorers are built from.
|
|
5
8
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* No module in the root graph imports CSS, so the bare package import is Node-safe
|
|
10
|
+
* and hosts load `@mailwoman/react/styles.css` themselves.
|
|
11
|
+
*/
|
|
12
|
+
export * from "#common";
|
|
13
|
+
/**
|
|
14
|
+
* Re-exports `POIExplorer`, a POI-intent tester that needs no weights or network, with its related exports.
|
|
15
|
+
*/
|
|
16
|
+
export * from "#poi";
|
|
17
|
+
/**
|
|
18
|
+
* Re-exports `PipelineExplorer`, a parse-and-resolve tester with model
|
|
19
|
+
* and gazetteer access injected by the host.
|
|
20
|
+
* It also exports the explorer's related declarations.
|
|
21
|
+
*/
|
|
22
|
+
export * from "#pipeline";
|
|
23
|
+
/**
|
|
24
|
+
* Re-exports `useReleaseRuntime`, the Node-safe hook that loads a release manifest
|
|
25
|
+
* and each selected version's assets through a host-injected loader.
|
|
26
|
+
*/
|
|
27
|
+
export * from "#runtime";
|
|
28
|
+
/**
|
|
29
|
+
* Re-exports the map surface's types only, because its runtime lives behind the
|
|
30
|
+
* `@mailwoman/react/map` subpath so that MapLibre stays out of the root import graph.
|
|
17
31
|
*/
|
|
18
|
-
export
|
|
19
|
-
export * from "#poi/index";
|
|
20
|
-
export * from "#pipeline/index";
|
|
21
|
-
export * from "#runtime/index";
|
|
22
|
-
export type { GeocoderRuntime, InferenceBackend, LngLatTuple, MapBias, MapCanvasExtraProps, MapCanvasProps, MapCanvasStyle, OverlaySpec, Suggestion, VersionOption, } from "#map/index";
|
|
32
|
+
export type { GeocoderRuntime, LngLatTuple, MapBias, MapCanvasExtraProps, MapCanvasProps, MapCanvasStyle, OverlaySpec, Suggestion, VersionOption, } from "#map";
|
|
23
33
|
//# sourceMappingURL=index.d.ts.map
|
package/out/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,cAAc,SAAS,CAAA;AACvB;;GAEG;AACH,cAAc,MAAM,CAAA;AACpB;;;;GAIG;AACH,cAAc,WAAW,CAAA;AACzB;;;GAGG;AACH,cAAc,UAAU,CAAA;AAExB;;;GAGG;AACH,YAAY,EACX,eAAe,EACf,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,GACb,MAAM,MAAM,CAAA"}
|
package/out/index.js
CHANGED
|
@@ -2,21 +2,27 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Re-exports the shared presentational components and hooks that both explorers are built from.
|
|
5
8
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* No module in the root graph imports CSS, so the bare package import is Node-safe
|
|
10
|
+
* and hosts load `@mailwoman/react/styles.css` themselves.
|
|
11
|
+
*/
|
|
12
|
+
export * from "#common";
|
|
13
|
+
/**
|
|
14
|
+
* Re-exports `POIExplorer`, a POI-intent tester that needs no weights or network, with its related exports.
|
|
15
|
+
*/
|
|
16
|
+
export * from "#poi";
|
|
17
|
+
/**
|
|
18
|
+
* Re-exports `PipelineExplorer`, a parse-and-resolve tester with model
|
|
19
|
+
* and gazetteer access injected by the host.
|
|
20
|
+
* It also exports the explorer's related declarations.
|
|
21
|
+
*/
|
|
22
|
+
export * from "#pipeline";
|
|
23
|
+
/**
|
|
24
|
+
* Re-exports `useReleaseRuntime`, the Node-safe hook that loads a release manifest
|
|
25
|
+
* and each selected version's assets through a host-injected loader.
|
|
17
26
|
*/
|
|
18
|
-
export * from "#
|
|
19
|
-
export * from "#poi/index";
|
|
20
|
-
export * from "#pipeline/index";
|
|
21
|
-
export * from "#runtime/index";
|
|
27
|
+
export * from "#runtime";
|
|
22
28
|
//# sourceMappingURL=index.js.map
|
package/out/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,cAAc,SAAS,CAAA;AACvB;;GAEG;AACH,cAAc,MAAM,CAAA;AACpB;;;;GAIG;AACH,cAAc,WAAW,CAAA;AACzB;;;GAGG;AACH,cAAc,UAAU,CAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Renders the footer identity with the app name, an optional documentation link and the build
|
|
7
|
+
* commit. This component does not depend on the map.
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
/**
|
|
11
|
+
* Props for {@link AppIdentity}.
|
|
12
|
+
*/
|
|
13
|
+
export interface AppIdentityProps {
|
|
14
|
+
/**
|
|
15
|
+
* The app's display name, such as `Mailwoman Earth`.
|
|
16
|
+
*/
|
|
17
|
+
name: ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* The documentation link's target.
|
|
20
|
+
* The link is omitted when this is unset.
|
|
21
|
+
*/
|
|
22
|
+
docsURL?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The documentation link's text.
|
|
25
|
+
*
|
|
26
|
+
* @defaultValue `"Developer Documentation"`
|
|
27
|
+
*/
|
|
28
|
+
docsLabel?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The URL of the build record.
|
|
31
|
+
*
|
|
32
|
+
* @defaultValue `"/build.json"`
|
|
33
|
+
*/
|
|
34
|
+
buildInfoURL?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Builds the commit link.
|
|
37
|
+
* Without it, the commit is shown as plain text.
|
|
38
|
+
*/
|
|
39
|
+
commitHref?: (commit: string) => string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Renders the app name, documentation link and short build commit.
|
|
43
|
+
* The commit is omitted when no build record loads.
|
|
44
|
+
*/
|
|
45
|
+
export declare function AppIdentity({ name, docsURL, docsLabel, buildInfoURL, commitHref, }: AppIdentityProps): ReactNode;
|
|
46
|
+
//# sourceMappingURL=AppIdentity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppIdentity.d.ts","sourceRoot":"","sources":["../../lib/map/AppIdentity.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CACvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,SAAqC,EACrC,YAAY,EACZ,UAAU,GACV,EAAE,gBAAgB,GAAG,SAAS,CA4B9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useBuildInfo } from "#common/useBuildInfo";
|
|
3
|
+
/**
|
|
4
|
+
* The number of commit characters shown in the footer.
|
|
5
|
+
*/
|
|
6
|
+
const DISPLAYED_LENGTH = 6;
|
|
7
|
+
/**
|
|
8
|
+
* Renders the app name, documentation link and short build commit.
|
|
9
|
+
* The commit is omitted when no build record loads.
|
|
10
|
+
*/
|
|
11
|
+
export function AppIdentity({ name, docsURL, docsLabel = "Developer Documentation", buildInfoURL, commitHref, }) {
|
|
12
|
+
const build = useBuildInfo(buildInfoURL);
|
|
13
|
+
const commit = build?.commit;
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsx("strong", { children: name }), docsURL ? (_jsxs(_Fragment, { children: [" ", _jsx("a", { href: docsURL, children: docsLabel })] })) : null, commit ? (_jsxs(_Fragment, { children: [" (", commitHref ? (_jsx("a", { href: commitHref(commit), title: `Built from ${commit}`, children: _jsx("code", { children: commit.slice(0, DISPLAYED_LENGTH) }) })) : (_jsx("code", { title: `Built from ${commit}`, children: commit.slice(0, DISPLAYED_LENGTH) })), ")"] })) : null] }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=AppIdentity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppIdentity.js","sourceRoot":"","sources":["../../lib/map/AppIdentity.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAkC1B;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,SAAS,GAAG,yBAAyB,EACrC,YAAY,EACZ,UAAU,GACQ;IAClB,MAAM,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;IACxC,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM,CAAA;IAE5B,OAAO,CACN,8BACC,2BAAS,IAAI,GAAU,EACtB,OAAO,CAAC,CAAC,CAAC,CACV,8BACE,GAAG,EACJ,YAAG,IAAI,EAAE,OAAO,YAAG,SAAS,GAAK,IAC/B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACT,8BACE,IAAI,EACJ,UAAU,CAAC,CAAC,CAAC,CACb,YAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,cAAc,MAAM,EAAE,YACzD,yBAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,GAAQ,GAC7C,CACJ,CAAC,CAAC,CAAC,CACH,eAAM,KAAK,EAAE,cAAc,MAAM,EAAE,YAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,GAAQ,CAC/E,EACA,GAAG,IACF,CACH,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAA;AACF,CAAC"}
|
|
@@ -3,51 +3,28 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* control panel (`_app.tsx:1281-1339`), as a dumb presentational unit. Turning it on reveals a second
|
|
8
|
-
* version picker (the primary version filtered out); the actual second parse is a host concern the
|
|
9
|
-
* composed demo surfaces through `panels.compare`. Props in, two events out.
|
|
10
|
-
*
|
|
11
|
-
* NODE-SAFE: pure React, no maplibre.
|
|
6
|
+
* Renders a compare-mode checkbox and a selector for the second model version, leaving the comparison itself to the host.
|
|
12
7
|
*/
|
|
13
8
|
import type { ReactNode } from "react";
|
|
14
9
|
import type { VersionOption } from "#map/types";
|
|
10
|
+
/**
|
|
11
|
+
* Props for {@link CompareToggle}.
|
|
12
|
+
*/
|
|
15
13
|
export interface CompareToggleProps {
|
|
16
|
-
/**
|
|
17
|
-
* The selectable model bundles (the primary version is filtered out of the compare list).
|
|
18
|
-
*/
|
|
19
14
|
versions: ReadonlyArray<VersionOption>;
|
|
20
|
-
/**
|
|
21
|
-
* The primary version, excluded from the compare options.
|
|
22
|
-
*/
|
|
23
15
|
primaryVersion: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* Whether compare mode is on.
|
|
26
|
-
*/
|
|
27
16
|
compareMode: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Fired when the visitor flips compare mode.
|
|
30
|
-
*/
|
|
31
17
|
onCompareModeChange: (compareMode: boolean) => void;
|
|
32
|
-
/**
|
|
33
|
-
* The version chosen to compare against, or `null` when none is chosen.
|
|
34
|
-
*/
|
|
35
18
|
compareVersion: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* Fired with the chosen compare version (or `null` when the empty option is picked).
|
|
38
|
-
*/
|
|
39
19
|
onCompareVersionChange: (version: string | null) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Disable the compare-version select (e.g. while a parse or compare load runs).
|
|
42
|
-
*/
|
|
43
20
|
disabled?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* A status line rendered under the select (e.g. the compare backend, or a "Loading…" line).
|
|
46
|
-
*/
|
|
47
21
|
status?: ReactNode;
|
|
48
22
|
}
|
|
49
23
|
/**
|
|
50
|
-
*
|
|
24
|
+
* Renders the compare checkbox.
|
|
25
|
+
*
|
|
26
|
+
* In compare mode, it also renders the version selector. and no control at all
|
|
27
|
+
* when fewer than two versions exist.
|
|
51
28
|
*/
|
|
52
29
|
export declare function CompareToggle({ versions, primaryVersion, compareMode, onCompareModeChange, compareVersion, onCompareVersionChange, disabled, status, }: CompareToggleProps): ReactNode;
|
|
53
30
|
//# sourceMappingURL=CompareToggle.d.ts.map
|