@mailwoman/react 9.4.0 → 10.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 +17 -16
- package/fonts.css +97 -22
- package/lib/common/About.tsx +87 -71
- package/lib/common/ClientOnly.tsx +2 -14
- package/lib/common/CopyButton.tsx +3 -1
- package/lib/common/LoadingIndicator.tsx +4 -2
- package/lib/common/PresetChips.tsx +9 -8
- package/lib/common/confidence-tiers.ts +7 -6
- package/lib/common/cx.ts +3 -1
- package/lib/common/text-tokens.ts +7 -4
- 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 -112
- package/lib/map/AppIdentity.tsx +85 -0
- package/lib/map/BackendControl.tsx +16 -13
- package/lib/map/CompareToggle.tsx +11 -33
- package/lib/map/DebugInfo.tsx +88 -0
- package/lib/map/Geocoder.tsx +92 -58
- package/lib/map/GeocoderControls.tsx +582 -127
- package/lib/map/GraticuleLayer.tsx +54 -0
- package/lib/map/MapCanvas.tsx +23 -12
- package/lib/map/MapChipRow.tsx +73 -0
- package/lib/map/MapCompass.tsx +68 -0
- package/lib/map/MapControlStack.tsx +97 -0
- package/lib/map/MapFooter.tsx +101 -0
- package/lib/map/MapProgressBar.tsx +55 -0
- package/lib/map/MapSearchBar.tsx +82 -0
- package/lib/map/MapSheet.tsx +71 -0
- package/lib/map/OverlayLayers.tsx +1 -1
- package/lib/map/PlaceAutocomplete.tsx +10 -21
- package/lib/map/PlaceMarker.tsx +4 -2
- package/lib/map/ResolvedPlaceLayers.tsx +5 -14
- package/lib/map/ResultCamera.tsx +8 -31
- package/lib/map/ResultOverlay.tsx +2 -12
- package/lib/map/ResultPanel.tsx +1 -20
- package/lib/map/VersionPicker.tsx +10 -19
- package/lib/map/fake-runtime.ts +10 -12
- package/lib/map/geometry.ts +14 -47
- package/lib/map/graticule.ts +80 -0
- package/lib/map/map-debug.ts +1 -1
- package/lib/map/place-render.ts +28 -60
- package/lib/map/types.ts +65 -97
- package/lib/map/useCompareState.ts +5 -4
- package/lib/map/useGeocode.ts +7 -5
- package/lib/map/useMapBearing.ts +56 -0
- package/lib/map/useMapLabelPick.ts +114 -0
- package/lib/map/useMapPlaceRender.ts +2 -6
- package/lib/map/usePlaceAutocomplete.ts +44 -50
- package/lib/map.ts +95 -0
- package/lib/pipeline/CandidatePicker.tsx +13 -5
- package/lib/pipeline/ConfidenceCell.tsx +1 -1
- package/lib/pipeline/FailureDiagnostic.tsx +8 -2
- package/lib/pipeline/QueryForm.tsx +5 -2
- package/lib/pipeline/ResolvedPlace.tsx +1 -1
- package/lib/pipeline/SpanHighlight.tsx +7 -5
- package/lib/pipeline/TimingPanel.tsx +1 -1
- package/lib/pipeline/TreeView.tsx +1 -1
- package/lib/pipeline/copy.ts +22 -25
- package/lib/pipeline/presets.ts +15 -13
- package/lib/pipeline/types.ts +21 -14
- package/lib/pipeline/useParsePipeline.ts +38 -24
- 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 +24 -15
- package/lib/poi/QueryInput.tsx +1 -1
- package/lib/poi/SubjectPanel.tsx +4 -3
- package/lib/poi/runtime.ts +5 -16
- package/lib/poi/types.ts +39 -27
- package/lib/poi/usePOISearch.ts +39 -44
- package/lib/poi.ts +39 -0
- package/lib/runtime/useReleaseRuntime.ts +125 -74
- package/lib/runtime.ts +16 -0
- package/lib/search/SearchModal.tsx +317 -0
- package/lib/search/search.css +144 -0
- package/lib/search/types.ts +67 -0
- package/lib/search.ts +11 -0
- package/out/common/About.d.ts +13 -4
- package/out/common/About.d.ts.map +1 -1
- package/out/common/About.js +5 -2
- 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 +3 -1
- package/out/common/CopyButton.d.ts.map +1 -1
- package/out/common/CopyButton.js.map +1 -1
- package/out/common/LoadingIndicator.d.ts +4 -2
- package/out/common/LoadingIndicator.d.ts.map +1 -1
- package/out/common/LoadingIndicator.js.map +1 -1
- package/out/common/PresetChips.d.ts +9 -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 +7 -6
- 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 +4 -3
- 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 -71
- package/out/index.d.ts.map +1 -1
- package/out/index.js +21 -47
- package/out/index.js.map +1 -1
- package/out/map/AppIdentity.d.ts +42 -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/BackendControl.d.ts +9 -10
- package/out/map/BackendControl.d.ts.map +1 -1
- package/out/map/BackendControl.js +2 -2
- package/out/map/BackendControl.js.map +1 -1
- package/out/map/CompareToggle.d.ts +8 -31
- package/out/map/CompareToggle.d.ts.map +1 -1
- package/out/map/CompareToggle.js +5 -2
- package/out/map/CompareToggle.js.map +1 -1
- package/out/map/DebugInfo.d.ts +34 -0
- package/out/map/DebugInfo.d.ts.map +1 -0
- package/out/map/DebugInfo.js +39 -0
- package/out/map/DebugInfo.js.map +1 -0
- package/out/map/Geocoder.d.ts +47 -26
- package/out/map/Geocoder.d.ts.map +1 -1
- package/out/map/Geocoder.js +34 -50
- package/out/map/Geocoder.js.map +1 -1
- package/out/map/GeocoderControls.d.ts +23 -33
- package/out/map/GeocoderControls.d.ts.map +1 -1
- package/out/map/GeocoderControls.js +277 -16
- package/out/map/GeocoderControls.js.map +1 -1
- package/out/map/GraticuleLayer.d.ts +28 -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 +23 -12
- 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 +43 -0
- package/out/map/MapChipRow.d.ts.map +1 -0
- package/out/map/MapChipRow.js +12 -0
- package/out/map/MapChipRow.js.map +1 -0
- package/out/map/MapCompass.d.ts +33 -0
- package/out/map/MapCompass.d.ts.map +1 -0
- package/out/map/MapCompass.js +15 -0
- package/out/map/MapCompass.js.map +1 -0
- package/out/map/MapControlStack.d.ts +56 -0
- package/out/map/MapControlStack.d.ts.map +1 -0
- package/out/map/MapControlStack.js +18 -0
- package/out/map/MapControlStack.js.map +1 -0
- package/out/map/MapFooter.d.ts +27 -0
- package/out/map/MapFooter.d.ts.map +1 -0
- package/out/map/MapFooter.js +37 -0
- package/out/map/MapFooter.js.map +1 -0
- package/out/map/MapProgressBar.d.ts +31 -0
- package/out/map/MapProgressBar.d.ts.map +1 -0
- package/out/map/MapProgressBar.js +8 -0
- package/out/map/MapProgressBar.js.map +1 -0
- package/out/map/MapSearchBar.d.ts +48 -0
- package/out/map/MapSearchBar.d.ts.map +1 -0
- package/out/map/MapSearchBar.js +12 -0
- package/out/map/MapSearchBar.js.map +1 -0
- package/out/map/MapSheet.d.ts +35 -0
- package/out/map/MapSheet.d.ts.map +1 -0
- package/out/map/MapSheet.js +29 -0
- package/out/map/MapSheet.js.map +1 -0
- package/out/map/OverlayLayers.d.ts +1 -1
- package/out/map/OverlayLayers.js +2 -2
- package/out/map/PlaceAutocomplete.d.ts +10 -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 +4 -2
- 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 +5 -14
- package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
- package/out/map/ResolvedPlaceLayers.js +2 -2
- package/out/map/ResolvedPlaceLayers.js.map +1 -1
- package/out/map/ResultCamera.d.ts +8 -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 +2 -12
- 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 +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 +9 -12
- 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 +1 -1
- 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 +23 -43
- 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 +67 -95
- 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 +28 -0
- package/out/map/useMapBearing.d.ts.map +1 -0
- package/out/map/useMapBearing.js +30 -0
- package/out/map/useMapBearing.js.map +1 -0
- package/out/map/useMapLabelPick.d.ts +13 -0
- package/out/map/useMapLabelPick.d.ts.map +1 -0
- package/out/map/useMapLabelPick.js +95 -0
- package/out/map/useMapLabelPick.js.map +1 -0
- package/out/map/useMapPlaceRender.d.ts +2 -6
- 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 +69 -0
- package/out/map.d.ts.map +1 -0
- package/out/map.js +46 -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 +2 -2
- package/out/pipeline/CandidatePicker.js.map +1 -1
- package/out/pipeline/ConfidenceCell.d.ts +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.js +1 -1
- package/out/pipeline/QueryForm.d.ts +5 -2
- package/out/pipeline/QueryForm.d.ts.map +1 -1
- package/out/pipeline/QueryForm.js +1 -1
- package/out/pipeline/QueryForm.js.map +1 -1
- package/out/pipeline/ResolvedPlace.js +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/TimingPanel.js +1 -1
- package/out/pipeline/TreeView.d.ts +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 +21 -14
- 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 +15 -7
- package/out/pipeline/useParsePipeline.d.ts.map +1 -1
- package/out/pipeline/useParsePipeline.js +10 -7
- 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 +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 +10 -9
- 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 +3 -2
- 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 +5 -16
- package/out/poi/runtime.js.map +1 -1
- package/out/poi/types.d.ts +39 -27
- 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 +28 -17
- package/out/poi/usePOISearch.d.ts.map +1 -1
- package/out/poi/usePOISearch.js +6 -32
- 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 +64 -65
- package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
- package/out/runtime/useReleaseRuntime.js +31 -26
- package/out/runtime/useReleaseRuntime.js.map +1 -1
- package/out/runtime.d.ts +9 -0
- package/out/runtime.d.ts.map +1 -0
- package/out/runtime.js +8 -0
- package/out/runtime.js.map +1 -0
- package/out/search/SearchModal.d.ts +33 -0
- package/out/search/SearchModal.d.ts.map +1 -0
- package/out/search/SearchModal.js +187 -0
- package/out/search/SearchModal.js.map +1 -0
- package/out/search/types.d.ts +64 -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 +132 -133
- package/styles.css +1340 -202
- package/tokens/index.css +26 -7
- package/tokens/tokens.json +121 -6
- package/tokens/tokens.resolver.json +1 -1
- package/lib/map/index.ts +0 -76
- package/out/map/index.d.ts +0 -52
- package/out/map/index.d.ts.map +0 -1
- package/out/map/index.js +0 -36
- package/out/map/index.js.map +0 -1
- package/styleframe.config.ts +0 -321
- package/vitest.node.config.ts +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapSheet.d.ts","sourceRoot":"","sources":["../../lib/map/MapSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAIjD,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,SAAS,CAMpF;AAED,MAAM,WAAW,aAAa;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,SAAS,CAwB1F"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @copyright Sister Software
|
|
4
|
+
* @license AGPL-3.0
|
|
5
|
+
* @author Teffen Ellis, et al.
|
|
6
|
+
*
|
|
7
|
+
* Side panel over the map with a heading, close button and Escape dismissal.
|
|
8
|
+
*/
|
|
9
|
+
import { useEffect } from "react";
|
|
10
|
+
import { cx } from "#common/cx";
|
|
11
|
+
/**
|
|
12
|
+
* Accessible button for dismissing a sheet.
|
|
13
|
+
*/
|
|
14
|
+
export function SheetClose({ label, onClose, className }) {
|
|
15
|
+
return (_jsx("button", { type: "button", className: cx("mw-map-sheet__close", className), "aria-label": label, onClick: onClose, children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) }));
|
|
16
|
+
}
|
|
17
|
+
export function MapSheet({ title, onClose, children, className }) {
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const onKeyDown = (event) => {
|
|
20
|
+
if (event.key === "Escape") {
|
|
21
|
+
onClose();
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
document.addEventListener("keydown", onKeyDown);
|
|
25
|
+
return () => document.removeEventListener("keydown", onKeyDown);
|
|
26
|
+
}, [onClose]);
|
|
27
|
+
return (_jsxs("aside", { className: cx("mw-map-sheet mw-map-sheet--side", className), "aria-label": title, children: [_jsxs("div", { className: "mw-map-sheet__header", children: [_jsx("h2", { className: "mw-map-sheet__title", children: title }), _jsx(SheetClose, { label: `Close ${title}`, onClose: onClose })] }), _jsx("div", { className: "mw-map-sheet__body", children: children })] }));
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=MapSheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapSheet.js","sourceRoot":"","sources":["../../lib/map/MapSheet.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAW/B;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAmB;IACxE,OAAO,CACN,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,gBAAc,KAAK,EAAE,OAAO,EAAE,OAAO,YACzG,8BAAkB,MAAM,uBAAS,GACzB,CACT,CAAA;AACF,CAAC;AAgBD,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAiB;IAC9E,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC1C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,EAAE,CAAA;YACV,CAAC;QACF,CAAC,CAAA;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAE/C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IAChE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACN,iBAAO,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,gBAAc,KAAK,aACpF,eAAK,SAAS,EAAC,sBAAsB,aACpC,aAAI,SAAS,EAAC,qBAAqB,YAAE,KAAK,GAAM,EAEhD,KAAC,UAAU,IAAC,KAAK,EAAE,SAAS,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,GAAI,IACpD,EAEN,cAAK,SAAS,EAAC,oBAAoB,YAAE,QAAQ,GAAO,IAC7C,CACR,CAAA;AACF,CAAC"}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the host composes the specs, the package renders them, react-map-gl owns the add/remove lifecycle.
|
|
10
10
|
*
|
|
11
11
|
* Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative control a
|
|
12
|
-
* layer-toggle control drives in a later phase.
|
|
12
|
+
* layer-toggle control drives in a later phase. node-import safety: imports `react-map-gl/maplibre` —
|
|
13
13
|
* reachable only via `@mailwoman/react/map`.
|
|
14
14
|
*/
|
|
15
15
|
import { type ReactNode } from "react";
|
package/out/map/OverlayLayers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
* @copyright Sister Software
|
|
4
4
|
* @license AGPL-3.0
|
|
@@ -10,7 +10,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
10
10
|
* the host composes the specs, the package renders them, react-map-gl owns the add/remove lifecycle.
|
|
11
11
|
*
|
|
12
12
|
* Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative control a
|
|
13
|
-
* layer-toggle control drives in a later phase.
|
|
13
|
+
* layer-toggle control drives in a later phase. node-import safety: imports `react-map-gl/maplibre` —
|
|
14
14
|
* reachable only via `@mailwoman/react/map`.
|
|
15
15
|
*/
|
|
16
16
|
import { Fragment } from "react";
|
|
@@ -3,48 +3,37 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* a dumb presentational unit. It renders the current suggestions with the keyboard-highlighted active
|
|
8
|
-
* descendant; the state + keyboard nav live in {@link usePlaceAutocomplete}. Renders `null` when there
|
|
9
|
-
* is nothing to suggest, so the row only appears when useful. Wire the ids from the hook so the input's
|
|
10
|
-
* `aria-controls` / `aria-activedescendant` match this listbox.
|
|
11
|
-
*
|
|
12
|
-
* NODE-SAFE: pure React, no maplibre.
|
|
6
|
+
* The `usePlaceAutocomplete` hook owns the state and keyboard navigation.
|
|
13
7
|
*/
|
|
14
8
|
import type { ReactNode } from "react";
|
|
15
9
|
import type { Suggestion } from "#map/types";
|
|
10
|
+
/**
|
|
11
|
+
* Props for {@link PlaceAutocomplete}.
|
|
12
|
+
*/
|
|
16
13
|
export interface PlaceAutocompleteProps {
|
|
17
|
-
/**
|
|
18
|
-
* The suggestions to render (from {@link usePlaceAutocomplete}).
|
|
19
|
-
*/
|
|
20
14
|
suggestions: Suggestion[];
|
|
21
15
|
/**
|
|
22
|
-
* The
|
|
16
|
+
* The index highlighted by the keyboard, or `-1` for none.
|
|
23
17
|
*/
|
|
24
18
|
activeIndex: number;
|
|
25
|
-
/**
|
|
26
|
-
* Fired (with the suggestion `value`) when one is clicked.
|
|
27
|
-
*/
|
|
28
19
|
onPick: (value: string) => void;
|
|
29
|
-
/**
|
|
30
|
-
* Fired with the index a pointer entered, so hover matches keyboard highlight.
|
|
31
|
-
*/
|
|
32
20
|
onHover?: (index: number) => void;
|
|
33
21
|
/**
|
|
34
|
-
* The listbox element id
|
|
22
|
+
* The listbox element id, passed from the hook so it matches the input's `aria-controls`.
|
|
35
23
|
*/
|
|
36
24
|
listboxID: string;
|
|
37
25
|
/**
|
|
38
|
-
*
|
|
26
|
+
* Pass `optionID` from the hook.
|
|
39
27
|
*/
|
|
40
28
|
optionID: (index: number) => string;
|
|
41
29
|
/**
|
|
42
|
-
*
|
|
30
|
+
* The label before the suggestions. @default "Did you mean:"
|
|
43
31
|
*/
|
|
44
32
|
caption?: string;
|
|
45
33
|
}
|
|
46
34
|
/**
|
|
47
|
-
*
|
|
35
|
+
* Renders the suggestion listbox when suggestions exist.
|
|
36
|
+
* It renders no listbox otherwise.
|
|
48
37
|
*/
|
|
49
38
|
export declare function PlaceAutocomplete({ suggestions, activeIndex, onPick, onHover, listboxID, optionID, caption, }: PlaceAutocompleteProps): ReactNode;
|
|
50
39
|
//# sourceMappingURL=PlaceAutocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceAutocomplete.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PlaceAutocomplete.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAyB,GACzB,EAAE,sBAAsB,GAAG,SAAS,CAuBpC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cx } from "#common/cx";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Renders the suggestion listbox when suggestions exist.
|
|
5
|
+
* It renders no listbox otherwise.
|
|
5
6
|
*/
|
|
6
7
|
export function PlaceAutocomplete({ suggestions, activeIndex, onPick, onHover, listboxID, optionID, caption = "Did you mean:", }) {
|
|
7
8
|
if (!suggestions.length)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceAutocomplete.js","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"PlaceAutocomplete.js","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AA4B/B;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,EACjC,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAO,GAAG,eAAe,GACD;IACxB,IAAI,CAAC,WAAW,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAC,SAAS,gBAAY,mBAAmB,aAC5F,eAAM,SAAS,EAAC,wBAAwB,YAAE,OAAO,GAAQ,EACxD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,iBAEC,EAAE,EAAE,QAAQ,CAAC,CAAC,CAAC,EACf,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,mBACE,CAAC,KAAK,WAAW,EAChC,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,EAAE,iBAAiB,EAAE,CAAC,KAAK,WAAW,EAAE,CAAC,EAClE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9B,KAAK,EAAE,CAAC,CAAC,SAAS,YAEjB,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,IAVd,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAWd,CACT,CAAC,IACG,CACN,CAAA;AACF,CAAC"}
|
package/out/map/PlaceMarker.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* `markerRef.current.remove()` teardown) from the demo's redraw effect: mounting/unmounting the marker
|
|
9
9
|
* is now React's job, keyed on the resolved candidate. Renders as a child of `<MapCanvas>`.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
11
|
+
* node-import safety: imports `react-map-gl/maplibre` at module scope, so it is reachable only through
|
|
12
12
|
* the `@mailwoman/react/map` subpath, never the package root.
|
|
13
13
|
*/
|
|
14
14
|
import type { ReactNode } from "react";
|
|
@@ -31,7 +31,9 @@ export interface PlaceMarkerProps {
|
|
|
31
31
|
anchor?: "center" | "top" | "bottom" | "left" | "right";
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* A single resolved-place marker.
|
|
34
|
+
* A single resolved-place marker.
|
|
35
|
+
*
|
|
36
|
+
* Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
|
|
35
37
|
*/
|
|
36
38
|
export declare function PlaceMarker({ longitude, latitude, color, anchor, }: PlaceMarkerProps): ReactNode;
|
|
37
39
|
//# sourceMappingURL=PlaceMarker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceMarker.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;CACvD;AAED
|
|
1
|
+
{"version":3,"file":"PlaceMarker.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;CACvD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAoB,EACpB,MAAiB,GACjB,EAAE,gBAAgB,GAAG,SAAS,CAE9B"}
|
package/out/map/PlaceMarker.js
CHANGED
|
@@ -5,7 +5,9 @@ import { Marker } from "react-map-gl/maplibre";
|
|
|
5
5
|
*/
|
|
6
6
|
const MARKER_COLOR = "#e0367c";
|
|
7
7
|
/**
|
|
8
|
-
* A single resolved-place marker.
|
|
8
|
+
* A single resolved-place marker.
|
|
9
|
+
*
|
|
10
|
+
* Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
|
|
9
11
|
*/
|
|
10
12
|
export function PlaceMarker({ longitude, latitude, color = MARKER_COLOR, anchor = "center", }) {
|
|
11
13
|
return _jsx(Marker, { longitude: longitude, latitude: latitude, color: color, anchor: anchor });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlaceMarker.js","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C;;GAEG;AACH,MAAM,YAAY,GAAG,SAAS,CAAA;AAqB9B
|
|
1
|
+
{"version":3,"file":"PlaceMarker.js","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C;;GAEG;AACH,MAAM,YAAY,GAAG,SAAS,CAAA;AAqB9B;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,GAAG,YAAY,EACpB,MAAM,GAAG,QAAQ,GACC;IAClB,OAAO,KAAC,MAAM,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAA;AAC1F,CAAC"}
|
|
@@ -2,30 +2,21 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `<ResolvedPlaceLayers>` — the drop-in that renders a whole {@link MapPlaceRenderSpec} as `<MapCanvas>`
|
|
7
|
-
* children: the marker(s), the outline, and (optionally) the camera move. This is the declarative
|
|
8
|
-
* replacement for the demo's imperative marker/bbox/camera redraw effect — a consumer computes the spec
|
|
9
|
-
* with `useMapPlaceRender(place)` and drops `<ResolvedPlaceLayers spec={spec} />` inside `<MapCanvas>`.
|
|
10
|
-
*
|
|
11
|
-
* `spec = null` (no result / no candidate) renders nothing, which also unmounts the previous marker +
|
|
12
|
-
* outline — the teardown the old effect did by hand (`markerRef.remove()`, `clearBbox`) is now just
|
|
13
|
-
* React unmounting. NODE-IMPORT SAFETY: pulls the map components — `@mailwoman/react/map` only.
|
|
14
5
|
*/
|
|
15
6
|
import type { ReactNode } from "react";
|
|
16
7
|
import type { MapPlaceRenderSpec } from "#map/place-render";
|
|
17
8
|
export interface ResolvedPlaceLayersProps {
|
|
18
9
|
/**
|
|
19
|
-
* The render spec (from {@link useMapPlaceRender}); `null` renders
|
|
10
|
+
* The render spec (from {@link useMapPlaceRender}); `null` renders no layers.
|
|
20
11
|
*/
|
|
21
12
|
spec: MapPlaceRenderSpec | null;
|
|
22
13
|
/**
|
|
23
|
-
* Apply the computed camera target via {@link ResultCamera}
|
|
24
|
-
*
|
|
14
|
+
* Apply the computed camera target via {@link ResultCamera}; set false when the consumer drives the camera
|
|
15
|
+
* itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}). @default true
|
|
25
16
|
*/
|
|
26
17
|
applyCamera?: boolean;
|
|
27
18
|
/**
|
|
28
|
-
* Animate the camera move
|
|
19
|
+
* Animate the camera move, forwarded to {@link ResultCamera}. @default true
|
|
29
20
|
*/
|
|
30
21
|
animateCamera?: boolean;
|
|
31
22
|
/**
|
|
@@ -38,7 +29,7 @@ export interface ResolvedPlaceLayersProps {
|
|
|
38
29
|
markerColor?: string;
|
|
39
30
|
}
|
|
40
31
|
/**
|
|
41
|
-
* Render the marker(s), outline
|
|
32
|
+
* Render the marker(s), outline and optional camera move for one resolved place.
|
|
42
33
|
*/
|
|
43
34
|
export declare function ResolvedPlaceLayers({ spec, applyCamera, animateCamera, outlineID, markerColor, }: ResolvedPlaceLayersProps): ReactNode;
|
|
44
35
|
//# sourceMappingURL=ResolvedPlaceLayers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvedPlaceLayers.d.ts","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResolvedPlaceLayers.d.ts","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EACnC,IAAI,EACJ,WAAkB,EAClB,aAAoB,EACpB,SAAS,EACT,WAAW,GACX,EAAE,wBAAwB,GAAG,SAAS,CAiBtC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { PlaceMarker } from "./PlaceMarker.js";
|
|
3
3
|
import { ResultCamera } from "./ResultCamera.js";
|
|
4
4
|
import { ResultOverlay } from "./ResultOverlay.js";
|
|
5
5
|
/**
|
|
6
|
-
* Render the marker(s), outline
|
|
6
|
+
* Render the marker(s), outline and optional camera move for one resolved place.
|
|
7
7
|
*/
|
|
8
8
|
export function ResolvedPlaceLayers({ spec, applyCamera = true, animateCamera = true, outlineID, markerColor, }) {
|
|
9
9
|
if (!spec)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResolvedPlaceLayers.js","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResolvedPlaceLayers.js","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AA0BnD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,EACnC,IAAI,EACJ,WAAW,GAAG,IAAI,EAClB,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,WAAW,GACe;IAC1B,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,OAAO,CACN,8BACE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CACnD,KAAC,WAAW,IAEX,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,WAAW,IAHb,GAAG,SAAS,IAAI,QAAQ,IAAI,KAAK,EAAE,CAIvC,CACF,CAAC,EACF,KAAC,aAAa,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAI,EAC1E,WAAW,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,GAAI,CAAC,CAAC,CAAC,IAAI,IACjF,CACH,CAAA;AACF,CAAC"}
|
|
@@ -2,54 +2,31 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `<ResultCamera>` — applies the {@link MapCameraTarget} a {@link MapPlaceRenderSpec} computes, by
|
|
7
|
-
* animating the live map to it. This is the ONE deliberately-imperative touch in the phase-2 overlays,
|
|
8
|
-
* and it is justified: maplibre exposes animated camera moves (`flyTo`) and viewport-fitting
|
|
9
|
-
* (`fitBounds`, which needs the map's PIXEL dimensions + padding) ONLY imperatively — react-map-gl has
|
|
10
|
-
* no declarative prop for "animate to these bounds". It is applied the v8-idiomatic way, through
|
|
11
|
-
* `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
|
|
12
|
-
*
|
|
13
|
-
* A consumer that prefers a hard, declarative jump can instead feed the target through
|
|
14
|
-
* {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
|
|
15
|
-
* `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
|
|
16
|
-
*
|
|
17
|
-
* `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
|
|
18
|
-
* as the effect dependency re-runs the camera move exactly when the resolved place changes — no
|
|
19
|
-
* value-key dance, no dependency-lint suppression.
|
|
20
5
|
*/
|
|
21
6
|
import type { FitBoundsOptions } from "maplibre-gl";
|
|
22
7
|
import { type ReactNode } from "react";
|
|
23
8
|
import type { MapCameraTarget } from "#map/place-render";
|
|
24
9
|
/**
|
|
25
|
-
*
|
|
26
|
-
* at the call site.
|
|
10
|
+
* Builds `fitBounds` options without an undefined `duration` key.
|
|
27
11
|
*
|
|
28
|
-
*
|
|
29
|
-
* `Camera.flyTo` (which `fitBounds` funnels into via `_fitInternal`) branches on `'duration' in options`, not on the
|
|
30
|
-
* value: an explicitly-passed `duration: undefined` therefore survives the key test and is coerced with `+undefined` →
|
|
31
|
-
* `NaN`. Every ease frame then computes `k = easing(elapsed / NaN)` → `NaN`, the flight-path math yields a `NaN` world
|
|
32
|
-
* coordinate, and the FIRST frame throws `Invalid LngLat object: (NaN, NaN)` out of the RAF loop — before the map has
|
|
33
|
-
* moved at all, and with no `move` event to notice it by.
|
|
34
|
-
*
|
|
35
|
-
* Measured 2026-08-05 against maplibre-gl 5.24.0, same bounds and same map: `{padding: 40, duration: undefined}` →
|
|
36
|
-
* `map._easeOptions.duration = NaN` + the throw; `{padding: 40}` → `3937.7 ms` + a normal flight. So pass the key or
|
|
37
|
-
* don't — never pass it holding `undefined`.
|
|
12
|
+
* MapLibre checks for existence and can turn into a NaN camera move.
|
|
38
13
|
*/
|
|
39
14
|
export declare function fitBoundsOptionsFor(padding: number, animate: boolean): FitBoundsOptions;
|
|
15
|
+
/**
|
|
16
|
+
* Props for {@link ResultCamera}.
|
|
17
|
+
*/
|
|
40
18
|
export interface ResultCameraProps {
|
|
41
19
|
/**
|
|
42
|
-
* The camera target
|
|
20
|
+
* The camera target; `null` leaves the camera where it is.
|
|
43
21
|
*/
|
|
44
22
|
target: MapCameraTarget | null;
|
|
45
23
|
/**
|
|
46
|
-
*
|
|
47
|
-
* target still uses `fitBounds` (no instantaneous fit exists) but with `duration: 0`.
|
|
24
|
+
* Whether to animate the move. @default true
|
|
48
25
|
*/
|
|
49
26
|
animate?: boolean;
|
|
50
27
|
}
|
|
51
28
|
/**
|
|
52
|
-
*
|
|
29
|
+
* Moves the map to `target`; mount it as a child of `<Map>`.
|
|
53
30
|
*/
|
|
54
31
|
export declare function ResultCamera({ target, animate }: ResultCameraProps): ReactNode;
|
|
55
32
|
//# sourceMappingURL=ResultCamera.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultCamera.d.ts","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResultCamera.d.ts","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnD,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAExD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,gBAAgB,CAEvF;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,MAAM,EAAE,eAAe,GAAG,IAAI,CAAA;IAC9B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,OAAc,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAsBrF"}
|
package/out/map/ResultCamera.js
CHANGED
|
@@ -2,44 +2,19 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `<ResultCamera>` — applies the {@link MapCameraTarget} a {@link MapPlaceRenderSpec} computes, by
|
|
7
|
-
* animating the live map to it. This is the ONE deliberately-imperative touch in the phase-2 overlays,
|
|
8
|
-
* and it is justified: maplibre exposes animated camera moves (`flyTo`) and viewport-fitting
|
|
9
|
-
* (`fitBounds`, which needs the map's PIXEL dimensions + padding) ONLY imperatively — react-map-gl has
|
|
10
|
-
* no declarative prop for "animate to these bounds". It is applied the v8-idiomatic way, through
|
|
11
|
-
* `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
|
|
12
|
-
*
|
|
13
|
-
* A consumer that prefers a hard, declarative jump can instead feed the target through
|
|
14
|
-
* {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
|
|
15
|
-
* `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
|
|
16
|
-
*
|
|
17
|
-
* `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
|
|
18
|
-
* as the effect dependency re-runs the camera move exactly when the resolved place changes — no
|
|
19
|
-
* value-key dance, no dependency-lint suppression.
|
|
20
5
|
*/
|
|
21
6
|
import { useEffect } from "react";
|
|
22
7
|
import { useMap } from "react-map-gl/maplibre";
|
|
23
8
|
/**
|
|
24
|
-
*
|
|
25
|
-
* at the call site.
|
|
26
|
-
*
|
|
27
|
-
* `duration` is present ONLY on the non-animated path, and its ABSENCE on the animated one is required. maplibre's
|
|
28
|
-
* `Camera.flyTo` (which `fitBounds` funnels into via `_fitInternal`) branches on `'duration' in options`, not on the
|
|
29
|
-
* value: an explicitly-passed `duration: undefined` therefore survives the key test and is coerced with `+undefined` →
|
|
30
|
-
* `NaN`. Every ease frame then computes `k = easing(elapsed / NaN)` → `NaN`, the flight-path math yields a `NaN` world
|
|
31
|
-
* coordinate, and the FIRST frame throws `Invalid LngLat object: (NaN, NaN)` out of the RAF loop — before the map has
|
|
32
|
-
* moved at all, and with no `move` event to notice it by.
|
|
9
|
+
* Builds `fitBounds` options without an undefined `duration` key.
|
|
33
10
|
*
|
|
34
|
-
*
|
|
35
|
-
* `map._easeOptions.duration = NaN` + the throw; `{padding: 40}` → `3937.7 ms` + a normal flight. So pass the key or
|
|
36
|
-
* don't — never pass it holding `undefined`.
|
|
11
|
+
* MapLibre checks for existence and can turn into a NaN camera move.
|
|
37
12
|
*/
|
|
38
13
|
export function fitBoundsOptionsFor(padding, animate) {
|
|
39
14
|
return animate ? { padding } : { padding, duration: 0 };
|
|
40
15
|
}
|
|
41
16
|
/**
|
|
42
|
-
*
|
|
17
|
+
* Moves the map to `target`; mount it as a child of `<Map>`.
|
|
43
18
|
*/
|
|
44
19
|
export function ResultCamera({ target, animate = true }) {
|
|
45
20
|
const map = useMap();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultCamera.js","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResultCamera.js","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAI9C;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAAgB;IACpE,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;AACxD,CAAC;AAgBD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,EAAqB;IACzE,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IAEpB,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;QAEtC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;YAAE,OAAM;QAEhC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,IAAI,OAAO,EAAE,CAAC;gBACb,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YAC7D,CAAC;iBAAM,CAAC;gBACP,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YAC9D,CAAC;YAED,OAAM;QACP,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAChF,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAE1B,OAAO,IAAI,CAAA;AACZ,CAAC"}
|
|
@@ -2,21 +2,12 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `<ResultOverlay>` — the resolved-place outline (crisp admin polygon, or an approximate/exact-radius
|
|
7
|
-
* circle) as a declarative `<Source>` + fill/line `<Layer>`s. This replaces the demo's imperative
|
|
8
|
-
* `setPlaceOutline` / `drawApproxCircle` / `drawPlaceGeometry` / `clearBbox` helpers and their
|
|
9
|
-
* `whenStyleReady` guard: react-map-gl owns the "add source/layer once the style is loaded, remove on
|
|
10
|
-
* unmount" lifecycle, so the hand-rolled `isStyleLoaded()` / `styledata` races disappear.
|
|
11
|
-
*
|
|
12
|
-
* Pass the `outline` straight from a {@link MapPlaceRenderSpec}; a `null` outline renders nothing (the
|
|
13
|
-
* bare-point case). NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` — `@mailwoman/react/map` only.
|
|
14
5
|
*/
|
|
15
6
|
import type { ReactNode } from "react";
|
|
16
7
|
import type { PlaceGeometry } from "#map/geometry";
|
|
17
8
|
export interface ResultOverlayProps {
|
|
18
9
|
/**
|
|
19
|
-
* The outline geometry to draw, or `null` to draw
|
|
10
|
+
* The outline geometry to draw, or `null` to draw no geometry (the bare-point result).
|
|
20
11
|
*/
|
|
21
12
|
outline: PlaceGeometry | null;
|
|
22
13
|
/**
|
|
@@ -37,8 +28,7 @@ export interface ResultOverlayProps {
|
|
|
37
28
|
lineWidth?: number;
|
|
38
29
|
}
|
|
39
30
|
/**
|
|
40
|
-
* Render the resolved-place outline.
|
|
41
|
-
* `<Layer>` — the same two layers the imperative `setPlaceOutline` created, now declarative and self-cleaning.
|
|
31
|
+
* Render the resolved-place outline.
|
|
42
32
|
*/
|
|
43
33
|
export declare function ResultOverlay({ outline, id, color, fillOpacity, lineWidth, }: ResultOverlayProps): ReactNode;
|
|
44
34
|
//# sourceMappingURL=ResultOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultOverlay.d.ts","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResultOverlay.d.ts","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAOlD,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,EAAgB,EAChB,KAAqB,EACrB,WAAkB,EAClB,SAAa,GACb,EAAE,kBAAkB,GAAG,SAAS,CAchC"}
|
package/out/map/ResultOverlay.js
CHANGED
|
@@ -5,8 +5,7 @@ import { Layer, Source } from "react-map-gl/maplibre";
|
|
|
5
5
|
*/
|
|
6
6
|
const OUTLINE_COLOR = "#e0367c";
|
|
7
7
|
/**
|
|
8
|
-
* Render the resolved-place outline.
|
|
9
|
-
* `<Layer>` — the same two layers the imperative `setPlaceOutline` created, now declarative and self-cleaning.
|
|
8
|
+
* Render the resolved-place outline.
|
|
10
9
|
*/
|
|
11
10
|
export function ResultOverlay({ outline, id = "mw-result", color = OUTLINE_COLOR, fillOpacity = 0.12, lineWidth = 2, }) {
|
|
12
11
|
if (!outline)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultOverlay.js","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResultOverlay.js","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAIrD;;GAEG;AACH,MAAM,aAAa,GAAG,SAAS,CAAA;AAyB/B;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,OAAO,EACP,EAAE,GAAG,WAAW,EAChB,KAAK,GAAG,aAAa,EACrB,WAAW,GAAG,IAAI,EAClB,SAAS,GAAG,CAAC,GACO;IACpB,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,MAAM,IAAI,GAAG;QACZ,IAAI,EAAE,mBAA4B;QAClC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,SAAkB,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC;KAC3E,CAAA;IAED,OAAO,CACN,MAAC,MAAM,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,SAAS,EAAC,IAAI,EAAE,IAAI,aACxC,KAAC,KAAK,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,GAAI,EACpG,KAAC,KAAK,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAI,IACxF,CACT,CAAA;AACF,CAAC"}
|
package/out/map/ResultPanel.d.ts
CHANGED
|
@@ -2,42 +2,23 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `<ResultPanel>` — the demo's parse+resolve result block, assembled from the SHARED pipeline
|
|
7
|
-
* presentational units (it does not re-implement any of them): `KindBadge`, `ComponentTable`,
|
|
8
|
-
* `ResolvedPlace`, `CandidatePicker`, plus the `CopyButton` + `buildParsePayload` copy affordance. This
|
|
9
|
-
* is the standalone, story-testable unit the demo's floating panel renders (the map analogue of the
|
|
10
|
-
* result block PipelineExplorer inlines), so `Geocoder` composes ONE panel instead of duplicating
|
|
11
|
-
* the marker/table/candidate glue. Heavy host visualizers (span highlight, tree, timing) slot in via
|
|
12
|
-
* `extras`; the no-resolve diagnostic via `failure`.
|
|
13
|
-
*
|
|
14
|
-
* NODE-SAFE: pure React + the shared units, no maplibre.
|
|
15
5
|
*/
|
|
16
6
|
import type { ParseResult, ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result";
|
|
17
7
|
import type { ReactNode } from "react";
|
|
18
8
|
export interface ResultPanelProps {
|
|
19
|
-
/**
|
|
20
|
-
* The parse+resolve result to render.
|
|
21
|
-
*/
|
|
22
9
|
result: ParseResult;
|
|
23
10
|
/**
|
|
24
11
|
* The selected candidate (falls back to the first), used for the resolved-place detail + copy payload.
|
|
25
12
|
*/
|
|
26
13
|
selectedCandidate: ResolvedPlaceView | null;
|
|
27
|
-
/**
|
|
28
|
-
* The selected candidate index, for the picker's active state.
|
|
29
|
-
*/
|
|
30
14
|
selectedCandidateIndex: number;
|
|
31
|
-
/**
|
|
32
|
-
* Fired when a candidate in the picker is chosen.
|
|
33
|
-
*/
|
|
34
15
|
onSelectCandidate: (index: number) => void;
|
|
35
16
|
/**
|
|
36
17
|
* Host-injected heavy visualizers (span highlight, tree, timing, …), rendered from the result.
|
|
37
18
|
*/
|
|
38
19
|
extras?: (result: ParseResult) => ReactNode;
|
|
39
20
|
/**
|
|
40
|
-
* Host-injected no-resolve diagnostic, rendered when
|
|
21
|
+
* Host-injected no-resolve diagnostic, rendered when no place resolved.
|
|
41
22
|
*/
|
|
42
23
|
failure?: (result: ParseResult) => ReactNode;
|
|
43
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC,MAAM,WAAW,gBAAgB;IAChC,MAAM,EAAE,WAAW,CAAA;IACnB;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C,sBAAsB,EAAE,MAAM,CAAA;IAC9B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;CAC5C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACP,EAAE,gBAAgB,GAAG,SAAS,CAkC9B"}
|
package/out/map/ResultPanel.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { buildParsePayload } from "#pipeline/copy";
|
|
3
3
|
import { CopyButton } from "../common/CopyButton.js";
|
|
4
4
|
import { KindBadge } from "../common/KindBadge.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultPanel.js","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ResultPanel.js","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAA0B,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAyB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAiC,CAAA;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,+BAAgC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA+B,CAAA;AAoB7D;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACW;IAClB,OAAO,CACN,eAAK,SAAS,EAAC,WAAW,aACzB,eAAK,SAAS,EAAC,mBAAmB,aACjC,6CAA0B,EAC1B,KAAC,UAAU,IACV,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACzD,KAAK,EAAC,WAAW,EACjB,WAAW,EAAC,eAAU,GACrB,IACG,EAEL,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAI,CAAC,CAAC,CAAC,IAAI,EAEvE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAE/B,KAAC,cAAc,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,EAEtC,iBAAiB,CAAC,CAAC,CAAC,CACpB,8BACC,KAAC,aAAa,IAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI,EACvE,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,eAAe,IACf,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,iBAAiB,GAC1B,CACF,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACb,OAAO,CAAC,MAAM,CAAC,CACf,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
|
|
@@ -3,40 +3,28 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* as a dumb presentational unit: the available bundles + current selection come in as props, the choice
|
|
8
|
-
* goes out through `onSelect`. No load state, no manifest fetch — the host (via `useReleaseRuntime`) owns
|
|
9
|
-
* that. Renders nothing when there is fewer than two versions to choose between.
|
|
10
|
-
*
|
|
11
|
-
* NODE-SAFE: pure React + a `<select>`, no maplibre. It rides the `@mailwoman/react/map` subpath only
|
|
12
|
-
* because it is a demo-specific control, not because it needs WebGL.
|
|
6
|
+
* Renders a selector for the available model versions. The host owns loading and selection.
|
|
13
7
|
*/
|
|
14
8
|
import type { ReactNode } from "react";
|
|
15
9
|
import type { VersionOption } from "#map/types";
|
|
10
|
+
/**
|
|
11
|
+
* Props for {@link VersionPicker}.
|
|
12
|
+
*/
|
|
16
13
|
export interface VersionPickerProps {
|
|
17
|
-
/**
|
|
18
|
-
* The selectable model bundles.
|
|
19
|
-
*/
|
|
20
14
|
versions: ReadonlyArray<VersionOption>;
|
|
21
|
-
/**
|
|
22
|
-
* The currently-selected version tag.
|
|
23
|
-
*/
|
|
24
15
|
selected: string | null;
|
|
25
|
-
/**
|
|
26
|
-
* Fired with the chosen version tag.
|
|
27
|
-
*/
|
|
28
16
|
onSelect: (version: string) => void;
|
|
29
17
|
/**
|
|
30
|
-
*
|
|
18
|
+
* Disables the control, for example while a parse runs.
|
|
31
19
|
*/
|
|
32
20
|
disabled?: boolean;
|
|
33
21
|
/**
|
|
34
|
-
*
|
|
22
|
+
* @default "Model version"
|
|
35
23
|
*/
|
|
36
24
|
label?: string;
|
|
37
25
|
}
|
|
38
26
|
/**
|
|
39
|
-
*
|
|
27
|
+
* Renders the model version selector, or `null` when fewer than two versions exist.
|
|
40
28
|
*/
|
|
41
29
|
export declare function VersionPicker({ versions, selected, onSelect, disabled, label, }: VersionPickerProps): ReactNode;
|
|
42
30
|
//# sourceMappingURL=VersionPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CA0BhC"}
|
package/out/map/VersionPicker.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Renders the model version selector, or `null` when fewer than two versions exist.
|
|
4
4
|
*/
|
|
5
5
|
export function VersionPicker({ versions, selected, onSelect, disabled, label = "Model version", }) {
|
|
6
6
|
if (versions.length < 2)
|
|
7
7
|
return null;
|
|
8
|
-
return (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-version", children: label }), _jsx("select", { id: "mw-demo-version", className: "mw-demo-control__select", value: selected ?? "", onChange: (e) => onSelect(e.target.value), disabled: disabled,
|
|
8
|
+
return (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-version", children: label }), _jsx("select", { id: "mw-demo-version", className: "mw-demo-control__select", value: selected ?? "", onChange: (e) => onSelect(e.target.value), disabled: disabled,
|
|
9
|
+
// The title shows the full label.
|
|
10
|
+
// The field may clip it.
|
|
11
|
+
title: versions.find((v) => v.version === selected)?.label ?? selected ?? undefined, children: versions.map((v) => (_jsx("option", { value: v.version, children: v.label ?? v.version }, v.version))) })] }));
|
|
9
12
|
}
|
|
10
13
|
//# sourceMappingURL=VersionPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":";AA6BA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,eAAe,GACH;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,iBAAiB,YACjE,KAAK,GACC,EACR,iBACC,EAAE,EAAC,iBAAiB,EACpB,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,QAAQ,IAAI,EAAE,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,QAAQ,EAAE,QAAQ;gBAClB,kCAAkC;gBAClC,yBAAyB;gBACzB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,EAAE,KAAK,IAAI,QAAQ,IAAI,SAAS,YAElF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,GACM,IACJ,CACN,CAAA;AACF,CAAC"}
|