@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
|
@@ -3,24 +3,17 @@
|
|
|
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
|
|
|
11
9
|
import { useCallback, useEffect, useRef, useState } from "react"
|
|
12
10
|
|
|
13
|
-
/**
|
|
14
|
-
* Best-effort clipboard write: async Clipboard API first, hidden-textarea `execCommand` fallback.
|
|
15
|
-
*/
|
|
16
11
|
async function writeToClipboard(value: string): Promise<void> {
|
|
17
12
|
try {
|
|
18
13
|
await navigator.clipboard.writeText(value)
|
|
19
14
|
|
|
20
15
|
return
|
|
21
|
-
} catch {
|
|
22
|
-
// Fall through to the legacy path below.
|
|
23
|
-
}
|
|
16
|
+
} catch {}
|
|
24
17
|
|
|
25
18
|
const textarea = document.createElement("textarea")
|
|
26
19
|
textarea.value = value
|
|
@@ -32,7 +25,6 @@ async function writeToClipboard(value: string): Promise<void> {
|
|
|
32
25
|
try {
|
|
33
26
|
document.execCommand("copy")
|
|
34
27
|
} catch {
|
|
35
|
-
// Nothing else to try — leave `copied` false via the caller's error path.
|
|
36
28
|
} finally {
|
|
37
29
|
document.body.removeChild(textarea)
|
|
38
30
|
}
|
|
@@ -50,7 +42,6 @@ export function useClipboard(resetMs = 1500): UseClipboard {
|
|
|
50
42
|
const [copied, setCopied] = useState(false)
|
|
51
43
|
const timer = useRef<ReturnType<typeof setTimeout> | null>(null)
|
|
52
44
|
|
|
53
|
-
// Clear a pending reset timer on unmount so it never fires against a torn-down component.
|
|
54
45
|
useEffect(
|
|
55
46
|
() => () => {
|
|
56
47
|
if (timer.current) {
|
package/lib/common.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
|
+
|
|
8
|
+
export { ClientOnly } from "./common/ClientOnly.tsx"
|
|
9
|
+
export type { ClientOnlyProps } from "./common/ClientOnly.tsx"
|
|
10
|
+
export { CopyButton } from "./common/CopyButton.tsx"
|
|
11
|
+
export type { CopyButtonProps } from "./common/CopyButton.tsx"
|
|
12
|
+
export { cx } from "#common/cx"
|
|
13
|
+
export type { ClassValue } from "#common/cx"
|
|
14
|
+
export { KindBadge } from "./common/KindBadge.tsx"
|
|
15
|
+
export type { KindBadgeProps } from "./common/KindBadge.tsx"
|
|
16
|
+
export { LoadingIndicator } from "./common/LoadingIndicator.tsx"
|
|
17
|
+
export type { LoadingIndicatorProps, LoadingMode } from "./common/LoadingIndicator.tsx"
|
|
18
|
+
export { PresetChips } from "./common/PresetChips.tsx"
|
|
19
|
+
export type { Preset, PresetChipsProps } from "./common/PresetChips.tsx"
|
|
20
|
+
export { useClipboard } from "#common/useClipboard"
|
|
21
|
+
export type { UseClipboard } from "#common/useClipboard"
|
|
22
|
+
export { useDebouncedValue } from "#common/useDebouncedValue"
|
package/lib/index.ts
CHANGED
|
@@ -2,120 +2,35 @@
|
|
|
2
2
|
* @copyright Sister Software
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
|
-
*
|
|
6
|
-
* `@mailwoman/react` — React components + headless hooks for mailwoman.
|
|
7
|
-
*
|
|
8
|
-
* Two composed explorers plus the small presentational units and headless hooks they decompose into:
|
|
9
|
-
*
|
|
10
|
-
* - `POIExplorer` — a self-contained POI-intent tester (classify → subject → OverpassQL), with an
|
|
11
|
-
* optional injected live poi.db search. No weights, no network on the intent path.
|
|
12
|
-
* - `PipelineExplorer` — a parse+resolve tester driven by an INJECTED `PipelineRuntime`, so the
|
|
13
|
-
* model/gazetteer plumbing (ONNX, httpvfs, node builtins) stays in the host, never in this graph.
|
|
14
|
-
*
|
|
15
|
-
* Styling ships separately as `@mailwoman/react/styles.css` (plain, `mw-`-prefixed, Infima-token
|
|
16
|
-
* aware) — no CSS is imported by the component modules, so the bare package import is node-safe.
|
|
17
5
|
*/
|
|
18
6
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
export
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export
|
|
41
|
-
export { OverpassBlock } from "./poi/OverpassBlock.tsx"
|
|
42
|
-
export type { OverpassBlockProps } from "./poi/OverpassBlock.tsx"
|
|
43
|
-
export { POIExplorer } from "./poi/POIExplorer.tsx"
|
|
44
|
-
export type { POIExplorerProps } from "./poi/POIExplorer.tsx"
|
|
45
|
-
export { QueryInput } from "./poi/QueryInput.tsx"
|
|
46
|
-
export type { QueryInputProps } from "./poi/QueryInput.tsx"
|
|
47
|
-
export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "#poi/runtime"
|
|
48
|
-
export { SubjectPanel } from "./poi/SubjectPanel.tsx"
|
|
49
|
-
export type { SubjectPanelProps } from "./poi/SubjectPanel.tsx"
|
|
50
|
-
|
|
51
|
-
export type {
|
|
52
|
-
CategoryRecord,
|
|
53
|
-
LiveSearchState,
|
|
54
|
-
LoadPOIRuntime,
|
|
55
|
-
POIBrandSubject,
|
|
56
|
-
POICategorySubject,
|
|
57
|
-
POIExplorerResult,
|
|
58
|
-
POILiveSearch,
|
|
59
|
-
POILiveSearchResult,
|
|
60
|
-
POIRuntime,
|
|
61
|
-
POISearchHit,
|
|
62
|
-
POISubject,
|
|
63
|
-
POISubjectBase,
|
|
64
|
-
TaxonomyLookup,
|
|
65
|
-
} from "#poi/types"
|
|
66
|
-
|
|
67
|
-
export { usePOISearch } from "#poi/usePOISearch"
|
|
68
|
-
export type { UsePOISearch, UsePOISearchOptions } from "#poi/usePOISearch"
|
|
69
|
-
|
|
70
|
-
// ── Result visualizers ─────────────────────────────────────────────────────
|
|
71
|
-
|
|
72
|
-
export { About } from "./common/About.tsx"
|
|
73
|
-
export { FailureDiagnostic } from "./pipeline/FailureDiagnostic.tsx"
|
|
74
|
-
export type { FailureDiagnosticProps } from "./pipeline/FailureDiagnostic.tsx"
|
|
75
|
-
export { SpanHighlight } from "./pipeline/SpanHighlight.tsx"
|
|
76
|
-
export type { SpanHighlightProps } from "./pipeline/SpanHighlight.tsx"
|
|
77
|
-
export { TimingPanel } from "./pipeline/TimingPanel.tsx"
|
|
78
|
-
export type { TimingPanelProps } from "./pipeline/TimingPanel.tsx"
|
|
79
|
-
export { TreeView } from "./pipeline/TreeView.tsx"
|
|
80
|
-
export type { TreeViewProps } from "./pipeline/TreeView.tsx"
|
|
81
|
-
|
|
82
|
-
// ── Pipeline explorer ──────────────────────────────────────────────────────
|
|
83
|
-
export { CandidatePicker } from "./pipeline/CandidatePicker.tsx"
|
|
84
|
-
export type { CandidatePickerProps } from "./pipeline/CandidatePicker.tsx"
|
|
85
|
-
export { ComponentTable } from "./pipeline/ComponentTable.tsx"
|
|
86
|
-
export type { ComponentTableProps } from "./pipeline/ComponentTable.tsx"
|
|
87
|
-
export { ConfidenceCell } from "./pipeline/ConfidenceCell.tsx"
|
|
88
|
-
export type { ConfidenceCellProps } from "./pipeline/ConfidenceCell.tsx"
|
|
89
|
-
export { buildParsePayload } from "#pipeline/copy"
|
|
90
|
-
export { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "#pipeline/presets"
|
|
91
|
-
export { PipelineExplorer } from "./pipeline/PipelineExplorer.tsx"
|
|
92
|
-
export type { PipelineExplorerProps } from "./pipeline/PipelineExplorer.tsx"
|
|
93
|
-
export { QueryForm } from "./pipeline/QueryForm.tsx"
|
|
94
|
-
export type { QueryFormProps } from "./pipeline/QueryForm.tsx"
|
|
95
|
-
export { ResolvedPlace } from "./pipeline/ResolvedPlace.tsx"
|
|
96
|
-
export type { ResolvedPlaceProps } from "./pipeline/ResolvedPlace.tsx"
|
|
97
|
-
|
|
98
|
-
export type { PipelineLoadingState, PipelinePanels, PipelineRuntime } from "#pipeline/types"
|
|
99
|
-
|
|
100
|
-
export { useParsePipeline } from "#pipeline/useParsePipeline"
|
|
101
|
-
export type { UseParsePipeline, UseParsePipelineOptions } from "#pipeline/useParsePipeline"
|
|
102
|
-
|
|
103
|
-
// ── Release runtime (shared load orchestration; node-safe — no onnx/httpvfs/maplibre) ──
|
|
104
|
-
export { useReleaseRuntime } from "#runtime/useReleaseRuntime"
|
|
105
|
-
|
|
106
|
-
export type {
|
|
107
|
-
AssetsLoadContext,
|
|
108
|
-
ReleaseBase,
|
|
109
|
-
ReleaseLoaderState,
|
|
110
|
-
ReleaseManifest,
|
|
111
|
-
ReleaseRuntimeConfig,
|
|
112
|
-
} from "#runtime/useReleaseRuntime"
|
|
7
|
+
/**
|
|
8
|
+
* Re-exports the shared presentational components and hooks that both explorers are built from.
|
|
9
|
+
*
|
|
10
|
+
* No module in the root graph imports CSS, so the bare package import is Node-safe
|
|
11
|
+
* and hosts load `@mailwoman/react/styles.css` themselves.
|
|
12
|
+
*/
|
|
13
|
+
export * from "#common"
|
|
14
|
+
/**
|
|
15
|
+
* Re-exports `POIExplorer`, a POI-intent tester that needs no weights or network, with its related exports.
|
|
16
|
+
*/
|
|
17
|
+
export * from "#poi"
|
|
18
|
+
/**
|
|
19
|
+
* Re-exports `PipelineExplorer`, a parse-and-resolve tester with model
|
|
20
|
+
* and gazetteer access injected by the host.
|
|
21
|
+
* It also exports the explorer's related declarations.
|
|
22
|
+
*/
|
|
23
|
+
export * from "#pipeline"
|
|
24
|
+
/**
|
|
25
|
+
* Re-exports `useReleaseRuntime`, the Node-safe hook that loads a release manifest
|
|
26
|
+
* and each selected version's assets through a host-injected loader.
|
|
27
|
+
*/
|
|
28
|
+
export * from "#runtime"
|
|
113
29
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
// runtime linkage): the `MapCanvas` component + hooks are import-able solely via `@mailwoman/react/map`.
|
|
30
|
+
/**
|
|
31
|
+
* Re-exports the map surface's types only, because its runtime lives behind the
|
|
32
|
+
* `@mailwoman/react/map` subpath so that MapLibre stays out of the root import graph.
|
|
33
|
+
*/
|
|
119
34
|
export type {
|
|
120
35
|
GeocoderRuntime,
|
|
121
36
|
InferenceBackend,
|
|
@@ -127,4 +42,4 @@ export type {
|
|
|
127
42
|
OverlaySpec,
|
|
128
43
|
Suggestion,
|
|
129
44
|
VersionOption,
|
|
130
|
-
} from "#map
|
|
45
|
+
} from "#map"
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
|
|
10
|
+
import type { ReactNode } from "react"
|
|
11
|
+
|
|
12
|
+
import { useBuildInfo } from "#common/useBuildInfo"
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The number of commit characters shown in the footer.
|
|
16
|
+
*/
|
|
17
|
+
const DISPLAYED_LENGTH = 6
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Props for {@link AppIdentity}.
|
|
21
|
+
*/
|
|
22
|
+
export interface AppIdentityProps {
|
|
23
|
+
/**
|
|
24
|
+
* The app's display name, such as `Mailwoman Earth`.
|
|
25
|
+
*/
|
|
26
|
+
name: ReactNode
|
|
27
|
+
/**
|
|
28
|
+
* The documentation link's target.
|
|
29
|
+
* The link is omitted when this is unset.
|
|
30
|
+
*/
|
|
31
|
+
docsURL?: string
|
|
32
|
+
/**
|
|
33
|
+
* The documentation link's text. @default "Developer Documentation"
|
|
34
|
+
*/
|
|
35
|
+
docsLabel?: string
|
|
36
|
+
/**
|
|
37
|
+
* The URL of the build record. @default "/build.json"
|
|
38
|
+
*/
|
|
39
|
+
buildInfoURL?: string
|
|
40
|
+
/**
|
|
41
|
+
* Builds the commit link.
|
|
42
|
+
* Without it, the commit is shown as plain text.
|
|
43
|
+
*/
|
|
44
|
+
commitHref?: (commit: string) => string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Renders the app name, documentation link and short build commit.
|
|
49
|
+
* The commit is omitted when no build record loads.
|
|
50
|
+
*/
|
|
51
|
+
export function AppIdentity({
|
|
52
|
+
name,
|
|
53
|
+
docsURL,
|
|
54
|
+
docsLabel = "Developer Documentation",
|
|
55
|
+
buildInfoURL,
|
|
56
|
+
commitHref,
|
|
57
|
+
}: AppIdentityProps): ReactNode {
|
|
58
|
+
const build = useBuildInfo(buildInfoURL)
|
|
59
|
+
const commit = build?.commit
|
|
60
|
+
|
|
61
|
+
return (
|
|
62
|
+
<>
|
|
63
|
+
<strong>{name}</strong>
|
|
64
|
+
{docsURL ? (
|
|
65
|
+
<>
|
|
66
|
+
{" "}
|
|
67
|
+
<a href={docsURL}>{docsLabel}</a>
|
|
68
|
+
</>
|
|
69
|
+
) : null}
|
|
70
|
+
{commit ? (
|
|
71
|
+
<>
|
|
72
|
+
{" ("}
|
|
73
|
+
{commitHref ? (
|
|
74
|
+
<a href={commitHref(commit)} title={`Built from ${commit}`}>
|
|
75
|
+
<code>{commit.slice(0, DISPLAYED_LENGTH)}</code>
|
|
76
|
+
</a>
|
|
77
|
+
) : (
|
|
78
|
+
<code title={`Built from ${commit}`}>{commit.slice(0, DISPLAYED_LENGTH)}</code>
|
|
79
|
+
)}
|
|
80
|
+
{")"}
|
|
81
|
+
</>
|
|
82
|
+
) : null}
|
|
83
|
+
</>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
@@ -3,44 +3,47 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* panel (`_app.tsx:1255-1280`), as a dumb presentational unit. It shows which backend the runtime
|
|
8
|
-
* resolved to (WebGPU / WASM, with the int8 size the host formats into the label) and lets the visitor
|
|
9
|
-
* opt out of WebGPU. Props in, one boolean event out — the host re-loads the bundle on the toggle.
|
|
10
|
-
*
|
|
11
|
-
* NODE-SAFE: pure React, no maplibre.
|
|
6
|
+
* Shows the active inference backend and a checkbox that forces WASM. The host applies the change.
|
|
12
7
|
*/
|
|
13
8
|
|
|
14
9
|
import type { ReactNode } from "react"
|
|
15
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Props for {@link BackendControl}.
|
|
13
|
+
*/
|
|
16
14
|
export interface BackendControlProps {
|
|
17
15
|
/**
|
|
18
|
-
* The backend the runtime
|
|
16
|
+
* The backend the runtime chose, such as `webgpu (28 MB int8)`.
|
|
17
|
+
* It is empty until known.
|
|
19
18
|
*/
|
|
20
19
|
activeBackend?: string
|
|
21
20
|
/**
|
|
22
|
-
* Whether the
|
|
21
|
+
* Whether the WASM backend is forced.
|
|
23
22
|
*/
|
|
24
23
|
forceWASM: boolean
|
|
25
24
|
/**
|
|
26
|
-
*
|
|
25
|
+
* Called when the visitor toggles the "Force WASM" checkbox.
|
|
27
26
|
*/
|
|
28
27
|
onForceWASMChange: (forceWASM: boolean) => void
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
31
|
+
* Renders the backend indicator and the "Force WASM" checkbox.
|
|
33
32
|
*/
|
|
34
33
|
export function BackendControl({ activeBackend, forceWASM, onForceWASMChange }: BackendControlProps): ReactNode {
|
|
35
34
|
return (
|
|
36
35
|
<div className="mw-demo-backend">
|
|
36
|
+
<span className="mw-map-sheet__label">Inference backend</span>
|
|
37
|
+
|
|
37
38
|
{activeBackend ? (
|
|
38
39
|
<span className="mw-demo-backend__active">
|
|
39
|
-
|
|
40
|
+
Running on <code>{activeBackend}</code>
|
|
40
41
|
</span>
|
|
41
42
|
) : null}
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
|
|
44
|
+
<label className="mw-map-sheet__check mw-demo-backend__toggle">
|
|
45
|
+
<input type="checkbox" checked={forceWASM} onChange={(event) => onForceWASMChange(event.target.checked)} />
|
|
46
|
+
Force WASM
|
|
44
47
|
</label>
|
|
45
48
|
</div>
|
|
46
49
|
)
|
|
@@ -3,55 +3,32 @@
|
|
|
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
|
|
|
14
9
|
import type { ReactNode } from "react"
|
|
15
10
|
|
|
16
11
|
import type { VersionOption } from "#map/types"
|
|
17
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Props for {@link CompareToggle}.
|
|
15
|
+
*/
|
|
18
16
|
export interface CompareToggleProps {
|
|
19
|
-
/**
|
|
20
|
-
* The selectable model bundles (the primary version is filtered out of the compare list).
|
|
21
|
-
*/
|
|
22
17
|
versions: ReadonlyArray<VersionOption>
|
|
23
|
-
/**
|
|
24
|
-
* The primary version, excluded from the compare options.
|
|
25
|
-
*/
|
|
26
18
|
primaryVersion: string | null
|
|
27
|
-
/**
|
|
28
|
-
* Whether compare mode is on.
|
|
29
|
-
*/
|
|
30
19
|
compareMode: boolean
|
|
31
|
-
/**
|
|
32
|
-
* Fired when the visitor flips compare mode.
|
|
33
|
-
*/
|
|
34
20
|
onCompareModeChange: (compareMode: boolean) => void
|
|
35
|
-
/**
|
|
36
|
-
* The version chosen to compare against, or `null` when none is chosen.
|
|
37
|
-
*/
|
|
38
21
|
compareVersion: string | null
|
|
39
|
-
/**
|
|
40
|
-
* Fired with the chosen compare version (or `null` when the empty option is picked).
|
|
41
|
-
*/
|
|
42
22
|
onCompareVersionChange: (version: string | null) => void
|
|
43
|
-
/**
|
|
44
|
-
* Disable the compare-version select (e.g. while a parse or compare load runs).
|
|
45
|
-
*/
|
|
46
23
|
disabled?: boolean
|
|
47
|
-
/**
|
|
48
|
-
* A status line rendered under the select (e.g. the compare backend, or a "Loading…" line).
|
|
49
|
-
*/
|
|
50
24
|
status?: ReactNode
|
|
51
25
|
}
|
|
52
26
|
|
|
53
27
|
/**
|
|
54
|
-
*
|
|
28
|
+
* Renders the compare checkbox.
|
|
29
|
+
*
|
|
30
|
+
* In compare mode, it also renders the version selector. and no control at all
|
|
31
|
+
* when fewer than two versions exist.
|
|
55
32
|
*/
|
|
56
33
|
export function CompareToggle({
|
|
57
34
|
versions,
|
|
@@ -69,8 +46,9 @@ export function CompareToggle({
|
|
|
69
46
|
|
|
70
47
|
return (
|
|
71
48
|
<div className="mw-demo-compare">
|
|
72
|
-
<label className="mw-demo-compare__toggle">
|
|
73
|
-
<input type="checkbox" checked={compareMode} onChange={(
|
|
49
|
+
<label className="mw-map-sheet__check mw-demo-compare__toggle">
|
|
50
|
+
<input type="checkbox" checked={compareMode} onChange={(event) => onCompareModeChange(event.target.checked)} />
|
|
51
|
+
Compare two model versions
|
|
74
52
|
</label>
|
|
75
53
|
{compareMode ? (
|
|
76
54
|
<div className="mw-demo-control">
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* Display and log build, model and runtime details for bug reports.
|
|
7
|
+
* Report the actual execution backend because successful loading does not imply WebGPU ran.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { type ReactNode, useEffect, useMemo } from "react"
|
|
11
|
+
|
|
12
|
+
import { useBuildInfo } from "#common/useBuildInfo"
|
|
13
|
+
|
|
14
|
+
export interface DebugInfoProps {
|
|
15
|
+
/**
|
|
16
|
+
* The backend the runtime resolved to (e.g. `webgpu (28 MB int8)`); empty before it is known.
|
|
17
|
+
*/
|
|
18
|
+
activeBackend?: string
|
|
19
|
+
/**
|
|
20
|
+
* Whether the CPU/wasm backend is currently forced.
|
|
21
|
+
*
|
|
22
|
+
* This explains a `wasm` backend that would otherwise indicate a WebGPU failure.
|
|
23
|
+
*/
|
|
24
|
+
forceWASM?: boolean
|
|
25
|
+
/**
|
|
26
|
+
* The model version the runtime loaded.
|
|
27
|
+
*
|
|
28
|
+
* The training series.
|
|
29
|
+
* It differs from the npm version.
|
|
30
|
+
*/
|
|
31
|
+
selectedVersion?: string | null
|
|
32
|
+
/**
|
|
33
|
+
* Whether the asset bundle finished loading.
|
|
34
|
+
*/
|
|
35
|
+
ready?: boolean
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* One row of the record, as a label and a value.
|
|
40
|
+
*/
|
|
41
|
+
function Row({ label, value }: { label: string; value: string }): ReactNode {
|
|
42
|
+
return (
|
|
43
|
+
<div className="mw-debug-info__row">
|
|
44
|
+
<span className="mw-debug-info__label">{label}</span>
|
|
45
|
+
<code className="mw-debug-info__value">{value}</code>
|
|
46
|
+
</div>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function DebugInfo({ activeBackend, forceWASM, selectedVersion, ready }: DebugInfoProps): ReactNode {
|
|
51
|
+
const build = useBuildInfo()
|
|
52
|
+
|
|
53
|
+
// Memoized on the primitives it reads, so the log below fires when a value changes
|
|
54
|
+
// rather than on every render.
|
|
55
|
+
// A record rebuilt each render would be a new object each time and log continuously.
|
|
56
|
+
const record = useMemo(
|
|
57
|
+
() => ({
|
|
58
|
+
app: build?.app ?? "—",
|
|
59
|
+
commit: build?.commit ?? build?.revision ?? "—",
|
|
60
|
+
buildTime: build?.buildTime ?? "—",
|
|
61
|
+
model: selectedVersion ?? "—",
|
|
62
|
+
backend: activeBackend || (ready ? "unknown" : "loading…"),
|
|
63
|
+
forceWASM: Boolean(forceWASM),
|
|
64
|
+
webgpuInBrowser: typeof navigator !== "undefined" && "gpu" in navigator,
|
|
65
|
+
userAgent: typeof navigator !== "undefined" ? navigator.userAgent : "—",
|
|
66
|
+
}),
|
|
67
|
+
[build?.app, build?.commit, build?.revision, build?.buildTime, selectedVersion, activeBackend, forceWASM, ready]
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
useEffect(() => {
|
|
71
|
+
// eslint-disable-next-line no-console -- this is the feature: the record has to reach the console a reporter copies.
|
|
72
|
+
console.info("[mailwoman] debug info", record)
|
|
73
|
+
}, [record])
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<div className="mw-debug-info">
|
|
77
|
+
<Row label="Build" value={record.app} />
|
|
78
|
+
<Row label="Commit" value={record.commit.slice(0, 12)} />
|
|
79
|
+
<Row label="Built" value={record.buildTime} />
|
|
80
|
+
<Row label="Model" value={record.model} />
|
|
81
|
+
<Row label="Backend" value={record.backend} />
|
|
82
|
+
{/* A browser with no WebGPU at all explains a `wasm` backend that is otherwise indistinguishable from a
|
|
83
|
+
WebGPU session that threw. */}
|
|
84
|
+
<Row label="WebGPU available" value={record.webgpuInBrowser ? "yes" : "no"} />
|
|
85
|
+
<Row label="Force WASM" value={record.forceWASM ? "on" : "off"} />
|
|
86
|
+
</div>
|
|
87
|
+
)
|
|
88
|
+
}
|