@mailwoman/react 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/README.md +18 -16
  2. package/fonts.css +97 -22
  3. package/lib/common/About.tsx +10 -10
  4. package/lib/common/ClientOnly.tsx +2 -14
  5. package/lib/common/CopyButton.tsx +9 -3
  6. package/lib/common/LoadingIndicator.tsx +13 -5
  7. package/lib/common/PresetChips.tsx +11 -8
  8. package/lib/common/confidence-tiers.ts +8 -7
  9. package/lib/common/cx.ts +3 -1
  10. package/lib/common/text-tokens.ts +10 -13
  11. package/lib/common/useBuildInfo.ts +54 -0
  12. package/lib/common/useClipboard.ts +2 -11
  13. package/lib/common.ts +22 -0
  14. package/lib/index.ts +27 -18
  15. package/lib/map/AppIdentity.tsx +89 -0
  16. package/lib/map/CompareToggle.tsx +8 -31
  17. package/lib/map/DebugInfo.tsx +75 -0
  18. package/lib/map/Geocoder.tsx +65 -50
  19. package/lib/map/GeocoderControls.tsx +425 -141
  20. package/lib/map/GraticuleLayer.tsx +56 -0
  21. package/lib/map/MapCanvas.tsx +26 -13
  22. package/lib/map/MapChipRow.tsx +4 -8
  23. package/lib/map/MapCompass.tsx +18 -25
  24. package/lib/map/MapControlStack.tsx +11 -10
  25. package/lib/map/MapFooter.tsx +5 -17
  26. package/lib/map/MapProgressBar.tsx +10 -13
  27. package/lib/map/MapSearchBar.tsx +31 -17
  28. package/lib/map/MapSheet.tsx +24 -15
  29. package/lib/map/OverlayLayers.tsx +14 -3
  30. package/lib/map/PlaceAutocomplete.tsx +12 -21
  31. package/lib/map/PlaceMarker.tsx +10 -4
  32. package/lib/map/ResolvedPlaceLayers.tsx +14 -15
  33. package/lib/map/ResultCamera.tsx +10 -31
  34. package/lib/map/ResultOverlay.tsx +14 -16
  35. package/lib/map/ResultPanel.tsx +1 -20
  36. package/lib/map/VersionPicker.tsx +10 -19
  37. package/lib/map/fake-runtime.ts +46 -19
  38. package/lib/map/geometry.ts +14 -47
  39. package/lib/map/graticule.ts +80 -0
  40. package/lib/map/map-debug.ts +4 -2
  41. package/lib/map/place-render.ts +30 -62
  42. package/lib/map/types.ts +57 -116
  43. package/lib/map/useCompareState.ts +5 -4
  44. package/lib/map/useGeocode.ts +7 -5
  45. package/lib/map/useMapBearing.ts +13 -13
  46. package/lib/map/useMapLabelPick.ts +21 -30
  47. package/lib/map/useMapPlaceRender.ts +3 -7
  48. package/lib/map/usePlaceAutocomplete.ts +44 -50
  49. package/lib/map.ts +92 -0
  50. package/lib/pipeline/CandidatePicker.tsx +13 -5
  51. package/lib/pipeline/ConfidenceCell.tsx +2 -2
  52. package/lib/pipeline/FailureDiagnostic.tsx +8 -2
  53. package/lib/pipeline/PipelineExplorer.tsx +6 -3
  54. package/lib/pipeline/QueryForm.tsx +5 -2
  55. package/lib/pipeline/ResolvedPlace.tsx +2 -2
  56. package/lib/pipeline/SpanHighlight.tsx +7 -5
  57. package/lib/pipeline/TimingPanel.tsx +1 -1
  58. package/lib/pipeline/TreeView.tsx +2 -2
  59. package/lib/pipeline/copy.ts +22 -25
  60. package/lib/pipeline/presets.ts +15 -13
  61. package/lib/pipeline/types.ts +20 -17
  62. package/lib/pipeline/useParsePipeline.ts +16 -13
  63. package/lib/pipeline.ts +36 -0
  64. package/lib/poi/AbstainPanel.tsx +1 -1
  65. package/lib/poi/LiveResultsBlock.tsx +2 -1
  66. package/lib/poi/POIExplorer.tsx +29 -17
  67. package/lib/poi/QueryInput.tsx +1 -1
  68. package/lib/poi/SubjectPanel.tsx +4 -3
  69. package/lib/poi/runtime.ts +14 -16
  70. package/lib/poi/types.ts +58 -47
  71. package/lib/poi/usePOISearch.ts +91 -82
  72. package/lib/poi.ts +40 -0
  73. package/lib/runtime/useReleaseRuntime.ts +122 -90
  74. package/lib/search/SearchModal.tsx +478 -0
  75. package/lib/search/search.css +282 -0
  76. package/lib/search/types.ts +68 -0
  77. package/lib/search.ts +11 -0
  78. package/out/common/About.d.ts +6 -6
  79. package/out/common/About.d.ts.map +1 -1
  80. package/out/common/About.js +1 -1
  81. package/out/common/About.js.map +1 -1
  82. package/out/common/ClientOnly.d.ts +2 -11
  83. package/out/common/ClientOnly.d.ts.map +1 -1
  84. package/out/common/ClientOnly.js +1 -13
  85. package/out/common/ClientOnly.js.map +1 -1
  86. package/out/common/CopyButton.d.ts +9 -3
  87. package/out/common/CopyButton.d.ts.map +1 -1
  88. package/out/common/CopyButton.js.map +1 -1
  89. package/out/common/LoadingIndicator.d.ts +13 -5
  90. package/out/common/LoadingIndicator.d.ts.map +1 -1
  91. package/out/common/LoadingIndicator.js.map +1 -1
  92. package/out/common/PresetChips.d.ts +11 -8
  93. package/out/common/PresetChips.d.ts.map +1 -1
  94. package/out/common/PresetChips.js.map +1 -1
  95. package/out/common/confidence-tiers.d.ts +8 -7
  96. package/out/common/confidence-tiers.d.ts.map +1 -1
  97. package/out/common/confidence-tiers.js +7 -6
  98. package/out/common/confidence-tiers.js.map +1 -1
  99. package/out/common/cx.d.ts +3 -1
  100. package/out/common/cx.d.ts.map +1 -1
  101. package/out/common/cx.js +3 -1
  102. package/out/common/cx.js.map +1 -1
  103. package/out/common/text-tokens.d.ts +6 -11
  104. package/out/common/text-tokens.d.ts.map +1 -1
  105. package/out/common/text-tokens.js +6 -3
  106. package/out/common/text-tokens.js.map +1 -1
  107. package/out/common/useBuildInfo.d.ts +27 -0
  108. package/out/common/useBuildInfo.d.ts.map +1 -0
  109. package/out/common/useBuildInfo.js +32 -0
  110. package/out/common/useBuildInfo.js.map +1 -0
  111. package/out/common/useClipboard.d.ts +1 -3
  112. package/out/common/useClipboard.d.ts.map +1 -1
  113. package/out/common/useClipboard.js +2 -11
  114. package/out/common/useClipboard.js.map +1 -1
  115. package/out/common.d.ts +22 -0
  116. package/out/common.d.ts.map +1 -0
  117. package/out/common.js +15 -0
  118. package/out/common.js.map +1 -0
  119. package/out/index.d.ts +26 -16
  120. package/out/index.d.ts.map +1 -1
  121. package/out/index.js +21 -15
  122. package/out/index.js.map +1 -1
  123. package/out/map/AppIdentity.d.ts +46 -0
  124. package/out/map/AppIdentity.d.ts.map +1 -0
  125. package/out/map/AppIdentity.js +16 -0
  126. package/out/map/AppIdentity.js.map +1 -0
  127. package/out/map/CompareToggle.d.ts +8 -31
  128. package/out/map/CompareToggle.d.ts.map +1 -1
  129. package/out/map/CompareToggle.js +4 -1
  130. package/out/map/CompareToggle.js.map +1 -1
  131. package/out/map/DebugInfo.d.ts +27 -0
  132. package/out/map/DebugInfo.d.ts.map +1 -0
  133. package/out/map/DebugInfo.js +36 -0
  134. package/out/map/DebugInfo.js.map +1 -0
  135. package/out/map/Geocoder.d.ts +41 -30
  136. package/out/map/Geocoder.d.ts.map +1 -1
  137. package/out/map/Geocoder.js +23 -37
  138. package/out/map/Geocoder.js.map +1 -1
  139. package/out/map/GeocoderControls.d.ts +15 -44
  140. package/out/map/GeocoderControls.d.ts.map +1 -1
  141. package/out/map/GeocoderControls.js +250 -39
  142. package/out/map/GeocoderControls.js.map +1 -1
  143. package/out/map/GraticuleLayer.d.ts +30 -0
  144. package/out/map/GraticuleLayer.d.ts.map +1 -0
  145. package/out/map/GraticuleLayer.js +25 -0
  146. package/out/map/GraticuleLayer.js.map +1 -0
  147. package/out/map/MapCanvas.d.ts +26 -13
  148. package/out/map/MapCanvas.d.ts.map +1 -1
  149. package/out/map/MapCanvas.js +5 -2
  150. package/out/map/MapCanvas.js.map +1 -1
  151. package/out/map/MapChipRow.d.ts +4 -8
  152. package/out/map/MapChipRow.d.ts.map +1 -1
  153. package/out/map/MapChipRow.js.map +1 -1
  154. package/out/map/MapCompass.d.ts +14 -21
  155. package/out/map/MapCompass.d.ts.map +1 -1
  156. package/out/map/MapCompass.js +5 -1
  157. package/out/map/MapCompass.js.map +1 -1
  158. package/out/map/MapControlStack.d.ts +11 -10
  159. package/out/map/MapControlStack.d.ts.map +1 -1
  160. package/out/map/MapControlStack.js +4 -1
  161. package/out/map/MapControlStack.js.map +1 -1
  162. package/out/map/MapFooter.d.ts +5 -16
  163. package/out/map/MapFooter.d.ts.map +1 -1
  164. package/out/map/MapFooter.js +0 -14
  165. package/out/map/MapFooter.js.map +1 -1
  166. package/out/map/MapProgressBar.d.ts +10 -13
  167. package/out/map/MapProgressBar.d.ts.map +1 -1
  168. package/out/map/MapProgressBar.js.map +1 -1
  169. package/out/map/MapSearchBar.d.ts +16 -17
  170. package/out/map/MapSearchBar.d.ts.map +1 -1
  171. package/out/map/MapSearchBar.js +6 -0
  172. package/out/map/MapSearchBar.js.map +1 -1
  173. package/out/map/MapSheet.d.ts +15 -12
  174. package/out/map/MapSheet.d.ts.map +1 -1
  175. package/out/map/MapSheet.js +8 -12
  176. package/out/map/MapSheet.js.map +1 -1
  177. package/out/map/OverlayLayers.d.ts +8 -2
  178. package/out/map/OverlayLayers.d.ts.map +1 -1
  179. package/out/map/OverlayLayers.js +3 -3
  180. package/out/map/OverlayLayers.js.map +1 -1
  181. package/out/map/PlaceAutocomplete.d.ts +12 -21
  182. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  183. package/out/map/PlaceAutocomplete.js +2 -1
  184. package/out/map/PlaceAutocomplete.js.map +1 -1
  185. package/out/map/PlaceMarker.d.ts +10 -4
  186. package/out/map/PlaceMarker.d.ts.map +1 -1
  187. package/out/map/PlaceMarker.js +3 -1
  188. package/out/map/PlaceMarker.js.map +1 -1
  189. package/out/map/ResolvedPlaceLayers.d.ts +14 -15
  190. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  191. package/out/map/ResolvedPlaceLayers.js +1 -1
  192. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  193. package/out/map/ResultCamera.d.ts +10 -31
  194. package/out/map/ResultCamera.d.ts.map +1 -1
  195. package/out/map/ResultCamera.js +3 -28
  196. package/out/map/ResultCamera.js.map +1 -1
  197. package/out/map/ResultOverlay.d.ts +14 -16
  198. package/out/map/ResultOverlay.d.ts.map +1 -1
  199. package/out/map/ResultOverlay.js +1 -2
  200. package/out/map/ResultOverlay.js.map +1 -1
  201. package/out/map/ResultPanel.d.ts +1 -20
  202. package/out/map/ResultPanel.d.ts.map +1 -1
  203. package/out/map/ResultPanel.js.map +1 -1
  204. package/out/map/VersionPicker.d.ts +7 -19
  205. package/out/map/VersionPicker.d.ts.map +1 -1
  206. package/out/map/VersionPicker.js +5 -2
  207. package/out/map/VersionPicker.js.map +1 -1
  208. package/out/map/fake-runtime.d.ts +9 -11
  209. package/out/map/fake-runtime.d.ts.map +1 -1
  210. package/out/map/fake-runtime.js +45 -19
  211. package/out/map/fake-runtime.js.map +1 -1
  212. package/out/map/geometry.d.ts +13 -34
  213. package/out/map/geometry.d.ts.map +1 -1
  214. package/out/map/geometry.js +9 -34
  215. package/out/map/geometry.js.map +1 -1
  216. package/out/map/graticule.d.ts +17 -0
  217. package/out/map/graticule.d.ts.map +1 -0
  218. package/out/map/graticule.js +67 -0
  219. package/out/map/graticule.js.map +1 -0
  220. package/out/map/map-debug.d.ts +4 -2
  221. package/out/map/map-debug.d.ts.map +1 -1
  222. package/out/map/map-debug.js +1 -1
  223. package/out/map/map-debug.js.map +1 -1
  224. package/out/map/place-render.d.ts +25 -45
  225. package/out/map/place-render.d.ts.map +1 -1
  226. package/out/map/place-render.js +4 -39
  227. package/out/map/place-render.js.map +1 -1
  228. package/out/map/types.d.ts +57 -113
  229. package/out/map/types.d.ts.map +1 -1
  230. package/out/map/types.js +1 -10
  231. package/out/map/types.js.map +1 -1
  232. package/out/map/useCompareState.d.ts +5 -4
  233. package/out/map/useCompareState.d.ts.map +1 -1
  234. package/out/map/useCompareState.js +3 -3
  235. package/out/map/useCompareState.js.map +1 -1
  236. package/out/map/useGeocode.d.ts +5 -3
  237. package/out/map/useGeocode.d.ts.map +1 -1
  238. package/out/map/useGeocode.js +4 -4
  239. package/out/map/useGeocode.js.map +1 -1
  240. package/out/map/useMapBearing.d.ts +11 -11
  241. package/out/map/useMapBearing.d.ts.map +1 -1
  242. package/out/map/useMapBearing.js +6 -11
  243. package/out/map/useMapBearing.js.map +1 -1
  244. package/out/map/useMapLabelPick.d.ts +4 -14
  245. package/out/map/useMapLabelPick.d.ts.map +1 -1
  246. package/out/map/useMapLabelPick.js +21 -30
  247. package/out/map/useMapLabelPick.js.map +1 -1
  248. package/out/map/useMapPlaceRender.d.ts +3 -7
  249. package/out/map/useMapPlaceRender.d.ts.map +1 -1
  250. package/out/map/useMapPlaceRender.js +2 -6
  251. package/out/map/useMapPlaceRender.js.map +1 -1
  252. package/out/map/usePlaceAutocomplete.d.ts +30 -28
  253. package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
  254. package/out/map/usePlaceAutocomplete.js +6 -33
  255. package/out/map/usePlaceAutocomplete.js.map +1 -1
  256. package/out/map.d.ts +67 -0
  257. package/out/map.d.ts.map +1 -0
  258. package/out/map.js +45 -0
  259. package/out/map.js.map +1 -0
  260. package/out/pipeline/CandidatePicker.d.ts +12 -2
  261. package/out/pipeline/CandidatePicker.d.ts.map +1 -1
  262. package/out/pipeline/CandidatePicker.js +1 -1
  263. package/out/pipeline/CandidatePicker.js.map +1 -1
  264. package/out/pipeline/ConfidenceCell.d.ts +2 -2
  265. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  266. package/out/pipeline/ConfidenceCell.js +1 -1
  267. package/out/pipeline/FailureDiagnostic.d.ts +8 -2
  268. package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
  269. package/out/pipeline/FailureDiagnostic.js +3 -0
  270. package/out/pipeline/FailureDiagnostic.js.map +1 -1
  271. package/out/pipeline/PipelineExplorer.d.ts +6 -2
  272. package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
  273. package/out/pipeline/PipelineExplorer.js +1 -1
  274. package/out/pipeline/PipelineExplorer.js.map +1 -1
  275. package/out/pipeline/QueryForm.d.ts +5 -2
  276. package/out/pipeline/QueryForm.d.ts.map +1 -1
  277. package/out/pipeline/QueryForm.js.map +1 -1
  278. package/out/pipeline/ResolvedPlace.d.ts +1 -1
  279. package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
  280. package/out/pipeline/SpanHighlight.d.ts +4 -3
  281. package/out/pipeline/SpanHighlight.d.ts.map +1 -1
  282. package/out/pipeline/SpanHighlight.js +3 -2
  283. package/out/pipeline/SpanHighlight.js.map +1 -1
  284. package/out/pipeline/TimingPanel.d.ts +1 -1
  285. package/out/pipeline/TreeView.d.ts +1 -1
  286. package/out/pipeline/TreeView.js.map +1 -1
  287. package/out/pipeline/copy.d.ts +1 -1
  288. package/out/pipeline/copy.d.ts.map +1 -1
  289. package/out/pipeline/copy.js +4 -3
  290. package/out/pipeline/copy.js.map +1 -1
  291. package/out/pipeline/presets.d.ts +5 -4
  292. package/out/pipeline/presets.d.ts.map +1 -1
  293. package/out/pipeline/presets.js +15 -13
  294. package/out/pipeline/presets.js.map +1 -1
  295. package/out/pipeline/types.d.ts +20 -17
  296. package/out/pipeline/types.d.ts.map +1 -1
  297. package/out/pipeline/types.js +2 -4
  298. package/out/pipeline/types.js.map +1 -1
  299. package/out/pipeline/useParsePipeline.d.ts +14 -9
  300. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  301. package/out/pipeline/useParsePipeline.js +7 -8
  302. package/out/pipeline/useParsePipeline.js.map +1 -1
  303. package/out/pipeline.d.ts +33 -0
  304. package/out/pipeline.d.ts.map +1 -0
  305. package/out/pipeline.js +21 -0
  306. package/out/pipeline.js.map +1 -0
  307. package/out/poi/AbstainPanel.d.ts +1 -1
  308. package/out/poi/LiveResultsBlock.d.ts +2 -1
  309. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  310. package/out/poi/LiveResultsBlock.js.map +1 -1
  311. package/out/poi/POIExplorer.d.ts +22 -12
  312. package/out/poi/POIExplorer.d.ts.map +1 -1
  313. package/out/poi/POIExplorer.js +11 -10
  314. package/out/poi/POIExplorer.js.map +1 -1
  315. package/out/poi/QueryInput.d.ts +1 -1
  316. package/out/poi/SubjectPanel.d.ts +2 -2
  317. package/out/poi/SubjectPanel.d.ts.map +1 -1
  318. package/out/poi/SubjectPanel.js +2 -1
  319. package/out/poi/SubjectPanel.js.map +1 -1
  320. package/out/poi/runtime.d.ts +5 -14
  321. package/out/poi/runtime.d.ts.map +1 -1
  322. package/out/poi/runtime.js +14 -16
  323. package/out/poi/runtime.js.map +1 -1
  324. package/out/poi/types.d.ts +53 -45
  325. package/out/poi/types.d.ts.map +1 -1
  326. package/out/poi/types.js +2 -4
  327. package/out/poi/types.js.map +1 -1
  328. package/out/poi/usePOISearch.d.ts +30 -17
  329. package/out/poi/usePOISearch.d.ts.map +1 -1
  330. package/out/poi/usePOISearch.js +48 -64
  331. package/out/poi/usePOISearch.js.map +1 -1
  332. package/out/poi.d.ts +23 -0
  333. package/out/poi.d.ts.map +1 -0
  334. package/out/poi.js +15 -0
  335. package/out/poi.js.map +1 -0
  336. package/out/runtime/useReleaseRuntime.d.ts +63 -74
  337. package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
  338. package/out/runtime/useReleaseRuntime.js +31 -32
  339. package/out/runtime/useReleaseRuntime.js.map +1 -1
  340. package/out/{runtime/index.d.ts → runtime.d.ts} +1 -1
  341. package/out/runtime.d.ts.map +1 -0
  342. package/out/{runtime/index.js → runtime.js} +1 -1
  343. package/out/runtime.js.map +1 -0
  344. package/out/search/SearchModal.d.ts +40 -0
  345. package/out/search/SearchModal.d.ts.map +1 -0
  346. package/out/search/SearchModal.js +255 -0
  347. package/out/search/SearchModal.js.map +1 -0
  348. package/out/search/types.d.ts +65 -0
  349. package/out/search/types.d.ts.map +1 -0
  350. package/out/search/types.js +13 -0
  351. package/out/search/types.js.map +1 -0
  352. package/out/search.d.ts +11 -0
  353. package/out/search.d.ts.map +1 -0
  354. package/out/search.js +9 -0
  355. package/out/search.js.map +1 -0
  356. package/package.json +73 -165
  357. package/styles.css +482 -266
  358. package/tokens/index.css +24 -6
  359. package/tokens/tokens.json +114 -6
  360. package/lib/common/index.ts +0 -22
  361. package/lib/map/BackendControl.tsx +0 -51
  362. package/lib/map/index.ts +0 -95
  363. package/lib/pipeline/index.ts +0 -36
  364. package/lib/poi/index.ts +0 -39
  365. package/out/common/index.d.ts +0 -22
  366. package/out/common/index.d.ts.map +0 -1
  367. package/out/common/index.js +0 -15
  368. package/out/common/index.js.map +0 -1
  369. package/out/map/BackendControl.d.ts +0 -32
  370. package/out/map/BackendControl.d.ts.map +0 -1
  371. package/out/map/BackendControl.js +0 -8
  372. package/out/map/BackendControl.js.map +0 -1
  373. package/out/map/index.d.ts +0 -69
  374. package/out/map/index.d.ts.map +0 -1
  375. package/out/map/index.js +0 -46
  376. package/out/map/index.js.map +0 -1
  377. package/out/pipeline/index.d.ts +0 -33
  378. package/out/pipeline/index.d.ts.map +0 -1
  379. package/out/pipeline/index.js +0 -21
  380. package/out/pipeline/index.js.map +0 -1
  381. package/out/poi/index.d.ts +0 -23
  382. package/out/poi/index.d.ts.map +0 -1
  383. package/out/poi/index.js +0 -15
  384. package/out/poi/index.js.map +0 -1
  385. package/out/runtime/index.d.ts.map +0 -1
  386. package/out/runtime/index.js.map +0 -1
  387. package/styleframe.config.ts +0 -329
  388. package/vitest.node.config.ts +0 -20
  389. /package/lib/{runtime/index.ts → runtime.ts} +0 -0
@@ -2,10 +2,10 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file Confidence banding shared by every component that colours a span by confidence.
5
+ * @file Confidence banding shared by every component that colors a span by confidence.
6
6
  *
7
- * It is a presentation choice, not a model one: the parser emits a continuous confidence and these
8
- * bounds only decide which colour a span is drawn in, so they live here rather than anywhere the
7
+ * It is a presentation choice rather than a model one: the parser emits a continuous confidence and these
8
+ * bounds only decide which color a span is drawn in, so they live here rather than anywhere the
9
9
  * pipeline can see them.
10
10
  */
11
11
  /**
@@ -13,7 +13,8 @@
13
13
  */
14
14
  export declare const HIGH_CONFIDENCE_MIN = 0.8;
15
15
  /**
16
- * At or above this the span is drawn as medium-confidence; below it, low.
16
+ * At or above this the span is drawn as medium-confidence.
17
+ * Below it, low.
17
18
  */
18
19
  export declare const MID_CONFIDENCE_MIN = 0.5;
19
20
  /**
@@ -29,8 +30,8 @@ export type ConfidenceTier = "high" | "mid" | "low";
29
30
  */
30
31
  export declare function confidenceTier(confidence: number): ConfidenceTier;
31
32
  /**
32
- * {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid` rather than `low`, so an
33
- * older model that emits no confidence never reads as uniformly wrong.
33
+ * {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
34
+ * rather than `low`, so an older model that emits no confidence never reads as uniformly wrong.
34
35
  */
35
- export declare function confidenceTierOrMid(confidence?: number): ConfidenceTier;
36
+ export declare function confidenceTierOrMid(confidence?: number | null): ConfidenceTier;
36
37
  //# sourceMappingURL=confidence-tiers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"confidence-tiers.d.ts","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC;;GAEG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;AAEnD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAMjE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,cAAc,CAIvE"}
1
+ {"version":3,"file":"confidence-tiers.d.ts","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,MAAM,CAAA;AAEtC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;AAEnD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,CAMjE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,cAAc,CAI9E"}
@@ -2,10 +2,10 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- * @file Confidence banding shared by every component that colours a span by confidence.
5
+ * @file Confidence banding shared by every component that colors a span by confidence.
6
6
  *
7
- * It is a presentation choice, not a model one: the parser emits a continuous confidence and these
8
- * bounds only decide which colour a span is drawn in, so they live here rather than anywhere the
7
+ * It is a presentation choice rather than a model one: the parser emits a continuous confidence and these
8
+ * bounds only decide which color a span is drawn in, so they live here rather than anywhere the
9
9
  * pipeline can see them.
10
10
  */
11
11
  /**
@@ -13,7 +13,8 @@
13
13
  */
14
14
  export const HIGH_CONFIDENCE_MIN = 0.8;
15
15
  /**
16
- * At or above this the span is drawn as medium-confidence; below it, low.
16
+ * At or above this the span is drawn as medium-confidence.
17
+ * Below it, low.
17
18
  */
18
19
  export const MID_CONFIDENCE_MIN = 0.5;
19
20
  /**
@@ -31,8 +32,8 @@ export function confidenceTier(confidence) {
31
32
  return "low";
32
33
  }
33
34
  /**
34
- * {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid` rather than `low`, so an
35
- * older model that emits no confidence never reads as uniformly wrong.
35
+ * {@link confidenceTier} for a possibly-absent confidence: an unmeasured span is drawn as `mid`
36
+ * rather than `low`, so an older model that emits no confidence never reads as uniformly wrong.
36
37
  */
37
38
  export function confidenceTierOrMid(confidence) {
38
39
  if (confidence == null)
@@ -1 +1 @@
1
- {"version":3,"file":"confidence-tiers.js","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAOrC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAChD,IAAI,UAAU,IAAI,mBAAmB;QAAE,OAAO,MAAM,CAAA;IAEpD,IAAI,UAAU,IAAI,kBAAkB;QAAE,OAAO,KAAK,CAAA;IAElD,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAmB;IACtD,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAEpC,OAAO,cAAc,CAAC,UAAU,CAAC,CAAA;AAClC,CAAC"}
1
+ {"version":3,"file":"confidence-tiers.js","sourceRoot":"","sources":["../../lib/common/confidence-tiers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAA;AAEtC;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAOrC;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAChD,IAAI,UAAU,IAAI,mBAAmB;QAAE,OAAO,MAAM,CAAA;IAEpD,IAAI,UAAU,IAAI,kBAAkB;QAAE,OAAO,KAAK,CAAA;IAElD,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAA0B;IAC7D,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAEpC,OAAO,cAAc,CAAC,UAAU,CAAC,CAAA;AAClC,CAAC"}
@@ -9,7 +9,9 @@
9
9
  */
10
10
  export type ClassValue = string | number | false | null | undefined | Record<string, boolean>;
11
11
  /**
12
- * Join truthy class tokens; object entries contribute their key when the value is truthy.
12
+ * Join truthy class tokens.
13
+ *
14
+ * Object entries contribute their key when the value is truthy.
13
15
  */
14
16
  export declare function cx(...values: ClassValue[]): string;
15
17
  //# sourceMappingURL=cx.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7F;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAoBlD"}
1
+ {"version":3,"file":"cx.d.ts","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7F;;;;GAIG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAoBlD"}
package/out/common/cx.js CHANGED
@@ -8,7 +8,9 @@
8
8
  * siblings and the React peer.
9
9
  */
10
10
  /**
11
- * Join truthy class tokens; object entries contribute their key when the value is truthy.
11
+ * Join truthy class tokens.
12
+ *
13
+ * Object entries contribute their key when the value is truthy.
12
14
  */
13
15
  export function cx(...values) {
14
16
  const out = [];
@@ -1 +1 @@
1
- {"version":3,"file":"cx.js","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;GAEG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACzC,MAAM,GAAG,GAAa,EAAE,CAAA;IAExB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK;YAAE,SAAQ;QAEpB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5D,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YAEvB,SAAQ;QACT,CAAC;QAED,KAAK,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,EAAE,EAAE,CAAC;gBACR,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACd,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACrB,CAAC"}
1
+ {"version":3,"file":"cx.js","sourceRoot":"","sources":["../../lib/common/cx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;;GAIG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACzC,MAAM,GAAG,GAAa,EAAE,CAAA;IAExB,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK;YAAE,SAAQ;QAEpB,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC5D,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YAEvB,SAAQ;QACT,CAAC;QAED,KAAK,MAAM,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC/C,IAAI,EAAE,EAAE,CAAC;gBACR,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;YACd,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACrB,CAAC"}
@@ -9,13 +9,14 @@
9
9
  * character). Two panels must agree for the BIO labels to line up between them, so the split and
10
10
  * the owner walk live here.
11
11
  */
12
+ import type { CharRange } from "@mailwoman/query-shape";
12
13
  export interface WordToken {
13
14
  /**
14
15
  * The word text as it appears in the input.
15
16
  */
16
17
  text: string;
17
18
  /**
18
- * Leading whitespace before this word.
19
+ * Whitespace before this word.
19
20
  */
20
21
  whitespace: string;
21
22
  /**
@@ -32,15 +33,9 @@ export interface WordToken {
32
33
  */
33
34
  export declare function tokenizeWords(input: string): WordToken[];
34
35
  /**
35
- * A half-open `[start, end)` character range into the input.
36
- */
37
- export interface CharSpan {
38
- start: number;
39
- end: number;
40
- }
41
- /**
42
- * Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word. A word is
43
- * covered when any part of it falls within the span.
36
+ * Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word.
37
+ *
38
+ * A word is covered when any part of it falls within the span.
44
39
  */
45
- export declare function shortestSpanOwners(words: readonly CharSpan[], spans: readonly CharSpan[]): number[];
40
+ export declare function shortestSpanOwners(words: readonly CharRange[], spans: readonly CharRange[]): number[];
46
41
  //# sourceMappingURL=text-tokens.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text-tokens.d.ts","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CAyBxD;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,QAAQ,EAAE,GAAG,MAAM,EAAE,CAcnG"}
1
+ {"version":3,"file":"text-tokens.d.ts","sourceRoot":"","sources":["../../lib/common/text-tokens.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,WAAW,SAAS;IACzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,CA2BxD;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,SAAS,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,SAAS,EAAE,GAAG,MAAM,EAAE,CAcrG"}
@@ -15,7 +15,9 @@
15
15
  export function tokenizeWords(input) {
16
16
  const words = [];
17
17
  let i = 0;
18
- // `charAt` answers "" past the end, which no whitespace test matches, so both walks stop at the input's length.
18
+ // `charAt` answers "" past the end.
19
+ // It no whitespace test matches.
20
+ // Therefore, both walks stop at the input's length.
19
21
  while (i < input.length) {
20
22
  let ws = "";
21
23
  while (/\s/.test(input.charAt(i))) {
@@ -33,8 +35,9 @@ export function tokenizeWords(input) {
33
35
  return words;
34
36
  }
35
37
  /**
36
- * Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word. A word is
37
- * covered when any part of it falls within the span.
38
+ * Per-word index of the most specific (shortest) span covering it, or `-1` when no span overlaps the word.
39
+ *
40
+ * A word is covered when any part of it falls within the span.
38
41
  */
39
42
  export function shortestSpanOwners(words, spans) {
40
43
  return words.map((word) => {
@@ -1 +1 @@
1
- {"version":3,"file":"text-tokens.js","sourceRoot":"","s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AC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3E,CAAC;IAED,OAAO,KAAK,CAAA;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAA2B,EAAE,KAA2B;IAC1F,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACzB,IAAI,IAAI,GAAG,CAAC,CAAC,CAAA;QACb,IAAI,OAAO,GAAG,QAAQ,CAAA;QAEtB,KAAK,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACvC,IAAI,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC;gBAC/E,OAAO,GAAG,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,KAAK,CAAA;gBAC3B,IAAI,GAAG,CAAC,CAAA;YACT,CAAC;QACF,CAAC;QAED,OAAO,IAAI,CAAA;IACZ,CAAC,CAAC,CAAA;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * `useBuildInfo()` — reads the deployment's own `build.json`, resolving a failed fetch to `null` because a dev server has no such file and the page must not show an error strip.
7
+ */
8
+ export interface BuildInfoRecord {
9
+ /**
10
+ * The deployment's name: `mailwoman-earth`, `mailwoman-moon`, `mailwoman-mars`.
11
+ */
12
+ app: string;
13
+ revision: string;
14
+ /**
15
+ * The same revision, full length — what a commit URL wants.
16
+ */
17
+ commit?: string;
18
+ /**
19
+ * ISO-8601 seconds, `Z` suffix.
20
+ */
21
+ buildTime: string;
22
+ }
23
+ /**
24
+ * The deployment record, or `null` while it loads and whenever it cannot be read.
25
+ */
26
+ export declare function useBuildInfo(url?: string): BuildInfoRecord | null;
27
+ //# sourceMappingURL=useBuildInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBuildInfo.d.ts","sourceRoot":"","sources":["../../lib/common/useBuildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,SAAgB,GAAG,eAAe,GAAG,IAAI,CAwBxE"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * `useBuildInfo()` — reads the deployment's own `build.json`, resolving a failed fetch to `null` because a dev server has no such file and the page must not show an error strip.
7
+ */
8
+ import { useEffect, useState } from "react";
9
+ /**
10
+ * The deployment record, or `null` while it loads and whenever it cannot be read.
11
+ */
12
+ export function useBuildInfo(url = "/build.json") {
13
+ const [info, setInfo] = useState(null);
14
+ useEffect(() => {
15
+ const controller = new AbortController();
16
+ void (async () => {
17
+ try {
18
+ const response = await fetch(url, { signal: controller.signal });
19
+ if (!response.ok)
20
+ return;
21
+ const record = (await response.json());
22
+ if (!controller.signal.aborted && record?.revision) {
23
+ setInfo(record);
24
+ }
25
+ }
26
+ catch { }
27
+ })();
28
+ return () => controller.abort();
29
+ }, [url]);
30
+ return info;
31
+ }
32
+ //# sourceMappingURL=useBuildInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBuildInfo.js","sourceRoot":"","sources":["../../lib/common/useBuildInfo.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAkB3C;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,GAAG,GAAG,aAAa;IAC/C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAyB,IAAI,CAAC,CAAA;IAE9D,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAA;QAExC,KAAK,CAAC,KAAK,IAAI,EAAE;YAChB,IAAI,CAAC;gBACJ,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;gBAEhE,IAAI,CAAC,QAAQ,CAAC,EAAE;oBAAE,OAAM;gBAExB,MAAM,MAAM,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAoB,CAAA;gBAEzD,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;oBACpD,OAAO,CAAC,MAAM,CAAC,CAAA;gBAChB,CAAC;YACF,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACX,CAAC,CAAC,EAAE,CAAA;QAEJ,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAA;IAChC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAA;IAET,OAAO,IAAI,CAAA;AACZ,CAAC"}
@@ -3,9 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy
7
- * `execCommand` fallback (for insecure contexts / older browsers), plus a transient "copied" flag
8
- * that auto-resets. Extracted from the two explorers' duplicated `onCopy` handlers.
6
+ * `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy `execCommand` fallback for insecure contexts, plus a transient "copied" flag that auto-resets.
9
7
  */
10
8
  export interface UseClipboard {
11
9
  copied: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAO,GAAG,YAAY,CA6BzD"}
1
+ {"version":3,"file":"useClipboard.d.ts","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,MAAM,WAAW,YAAY;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAO,GAAG,YAAY,CA4BzD"}
@@ -3,22 +3,15 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy
7
- * `execCommand` fallback (for insecure contexts / older browsers), plus a transient "copied" flag
8
- * that auto-resets. Extracted from the two explorers' duplicated `onCopy` handlers.
6
+ * `useClipboard` — headless copy-to-clipboard with the async Clipboard API and a legacy `execCommand` fallback for insecure contexts, plus a transient "copied" flag that auto-resets.
9
7
  */
10
8
  import { useCallback, useEffect, useRef, useState } from "react";
11
- /**
12
- * Best-effort clipboard write: async Clipboard API first, hidden-textarea `execCommand` fallback.
13
- */
14
9
  async function writeToClipboard(value) {
15
10
  try {
16
11
  await navigator.clipboard.writeText(value);
17
12
  return;
18
13
  }
19
- catch {
20
- // Fall through to the legacy path below.
21
- }
14
+ catch { }
22
15
  const textarea = document.createElement("textarea");
23
16
  textarea.value = value;
24
17
  textarea.style.position = "fixed";
@@ -29,7 +22,6 @@ async function writeToClipboard(value) {
29
22
  document.execCommand("copy");
30
23
  }
31
24
  catch {
32
- // Nothing else to try — leave `copied` false via the caller's error path.
33
25
  }
34
26
  finally {
35
27
  document.body.removeChild(textarea);
@@ -41,7 +33,6 @@ async function writeToClipboard(value) {
41
33
  export function useClipboard(resetMs = 1500) {
42
34
  const [copied, setCopied] = useState(false);
43
35
  const timer = useRef(null);
44
- // Clear a pending reset timer on unmount so it never fires against a torn-down component.
45
36
  useEffect(() => () => {
46
37
  if (timer.current) {
47
38
  clearTimeout(timer.current);
@@ -1 +1 @@
1
- {"version":3,"file":"useClipboard.js","sourceRoot":"","sources":["../../lib/common/useClipboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhE;;GAEG;AACH,KAAK,UAAU,gBAAgB,CAAC,KAAa;IAC5C,IAAI,CAAC;QACJ,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;QAE1C,OAAM;IACP,CAAC;IAAC,MAAM,CAAC;QACR,yCAAyC;IAC1C,CAAC;IAED,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;IACnD,QAAQ,CAAC,KAAK,GAAG,KAAK,CAAA;IACtB,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAA;IACjC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAA;IAC5B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;IACnC,QAAQ,CAAC,MAAM,EAAE,CAAA;IAEjB,IAAI,CAAC;QACJ,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAAC,MAAM,CAAC;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AK,CAAC,OAAO,CAAC,CAAA;QAC5B,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,CAAA;IAC5D,CAAC,EACD,CAAC,OAAO,CAAC,CACT,CAAA;IAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AACxB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file Common React primitives.
6
+ */
7
+ export { ClientOnly } from "./common/ClientOnly.tsx";
8
+ export type { ClientOnlyProps } from "./common/ClientOnly.tsx";
9
+ export { CopyButton } from "./common/CopyButton.tsx";
10
+ export type { CopyButtonProps } from "./common/CopyButton.tsx";
11
+ export { cx } from "#common/cx";
12
+ export type { ClassValue } from "#common/cx";
13
+ export { KindBadge } from "./common/KindBadge.tsx";
14
+ export type { KindBadgeProps } from "./common/KindBadge.tsx";
15
+ export { LoadingIndicator } from "./common/LoadingIndicator.tsx";
16
+ export type { LoadingIndicatorProps, LoadingMode } from "./common/LoadingIndicator.tsx";
17
+ export { PresetChips } from "./common/PresetChips.tsx";
18
+ export type { Preset, PresetChipsProps } from "./common/PresetChips.tsx";
19
+ export { useClipboard } from "#common/useClipboard";
20
+ export type { UseClipboard } from "#common/useClipboard";
21
+ export { useDebouncedValue } from "#common/useDebouncedValue";
22
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../lib/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAA;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
package/out/common.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file Common React primitives.
6
+ */
7
+ export { ClientOnly } from "./common/ClientOnly.js";
8
+ export { CopyButton } from "./common/CopyButton.js";
9
+ export { cx } from "#common/cx";
10
+ export { KindBadge } from "./common/KindBadge.js";
11
+ export { LoadingIndicator } from "./common/LoadingIndicator.js";
12
+ export { PresetChips } from "./common/PresetChips.js";
13
+ export { useClipboard } from "#common/useClipboard";
14
+ export { useDebouncedValue } from "#common/useDebouncedValue";
15
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../lib/common.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAwB,CAAA;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA+B,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAA0B,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
package/out/index.d.ts CHANGED
@@ -2,22 +2,32 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
+ */
6
+ /**
7
+ * Re-exports the shared presentational components and hooks that both explorers are built from.
5
8
  *
6
- * `@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.
9
+ * No module in the root graph imports CSS, so the bare package import is Node-safe
10
+ * and hosts load `@mailwoman/react/styles.css` themselves.
11
+ */
12
+ export * from "#common";
13
+ /**
14
+ * Re-exports `POIExplorer`, a POI-intent tester that needs no weights or network, with its related exports.
15
+ */
16
+ export * from "#poi";
17
+ /**
18
+ * Re-exports `PipelineExplorer`, a parse-and-resolve tester with model
19
+ * and gazetteer access injected by the host.
20
+ * It also exports the explorer's related declarations.
21
+ */
22
+ export * from "#pipeline";
23
+ /**
24
+ * Re-exports `useReleaseRuntime`, the Node-safe hook that loads a release manifest
25
+ * and each selected version's assets through a host-injected loader.
26
+ */
27
+ export * from "#runtime";
28
+ /**
29
+ * Re-exports the map surface's types only, because its runtime lives behind the
30
+ * `@mailwoman/react/map` subpath so that MapLibre stays out of the root import graph.
17
31
  */
18
- export * from "#common/index";
19
- export * from "#poi/index";
20
- export * from "#pipeline/index";
21
- export * from "#runtime/index";
22
- export type { GeocoderRuntime, InferenceBackend, LngLatTuple, MapBias, MapCanvasExtraProps, MapCanvasProps, MapCanvasStyle, OverlaySpec, Suggestion, VersionOption, } from "#map/index";
32
+ export type { GeocoderRuntime, LngLatTuple, MapBias, MapCanvasExtraProps, MapCanvasProps, MapCanvasStyle, OverlaySpec, Suggestion, VersionOption, } from "#map";
23
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAE9B,YAAY,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,GACb,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,cAAc,SAAS,CAAA;AACvB;;GAEG;AACH,cAAc,MAAM,CAAA;AACpB;;;;GAIG;AACH,cAAc,WAAW,CAAA;AACzB;;;GAGG;AACH,cAAc,UAAU,CAAA;AAExB;;;GAGG;AACH,YAAY,EACX,eAAe,EACf,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,GACb,MAAM,MAAM,CAAA"}
package/out/index.js CHANGED
@@ -2,21 +2,27 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
+ */
6
+ /**
7
+ * Re-exports the shared presentational components and hooks that both explorers are built from.
5
8
  *
6
- * `@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.
9
+ * No module in the root graph imports CSS, so the bare package import is Node-safe
10
+ * and hosts load `@mailwoman/react/styles.css` themselves.
11
+ */
12
+ export * from "#common";
13
+ /**
14
+ * Re-exports `POIExplorer`, a POI-intent tester that needs no weights or network, with its related exports.
15
+ */
16
+ export * from "#poi";
17
+ /**
18
+ * Re-exports `PipelineExplorer`, a parse-and-resolve tester with model
19
+ * and gazetteer access injected by the host.
20
+ * It also exports the explorer's related declarations.
21
+ */
22
+ export * from "#pipeline";
23
+ /**
24
+ * Re-exports `useReleaseRuntime`, the Node-safe hook that loads a release manifest
25
+ * and each selected version's assets through a host-injected loader.
17
26
  */
18
- export * from "#common/index";
19
- export * from "#poi/index";
20
- export * from "#pipeline/index";
21
- export * from "#runtime/index";
27
+ export * from "#runtime";
22
28
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;GAKG;AACH,cAAc,SAAS,CAAA;AACvB;;GAEG;AACH,cAAc,MAAM,CAAA;AACpB;;;;GAIG;AACH,cAAc,WAAW,CAAA;AACzB;;;GAGG;AACH,cAAc,UAAU,CAAA"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Renders the footer identity with the app name, an optional documentation link and the build
7
+ * commit. This component does not depend on the map.
8
+ */
9
+ import type { ReactNode } from "react";
10
+ /**
11
+ * Props for {@link AppIdentity}.
12
+ */
13
+ export interface AppIdentityProps {
14
+ /**
15
+ * The app's display name, such as `Mailwoman Earth`.
16
+ */
17
+ name: ReactNode;
18
+ /**
19
+ * The documentation link's target.
20
+ * The link is omitted when this is unset.
21
+ */
22
+ docsURL?: string;
23
+ /**
24
+ * The documentation link's text.
25
+ *
26
+ * @defaultValue `"Developer Documentation"`
27
+ */
28
+ docsLabel?: string;
29
+ /**
30
+ * The URL of the build record.
31
+ *
32
+ * @defaultValue `"/build.json"`
33
+ */
34
+ buildInfoURL?: string;
35
+ /**
36
+ * Builds the commit link.
37
+ * Without it, the commit is shown as plain text.
38
+ */
39
+ commitHref?: (commit: string) => string;
40
+ }
41
+ /**
42
+ * Renders the app name, documentation link and short build commit.
43
+ * The commit is omitted when no build record loads.
44
+ */
45
+ export declare function AppIdentity({ name, docsURL, docsLabel, buildInfoURL, commitHref, }: AppIdentityProps): ReactNode;
46
+ //# sourceMappingURL=AppIdentity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppIdentity.d.ts","sourceRoot":"","sources":["../../lib/map/AppIdentity.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,SAAS,CAAA;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAA;CACvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,SAAqC,EACrC,YAAY,EACZ,UAAU,GACV,EAAE,gBAAgB,GAAG,SAAS,CA4B9B"}
@@ -0,0 +1,16 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useBuildInfo } from "#common/useBuildInfo";
3
+ /**
4
+ * The number of commit characters shown in the footer.
5
+ */
6
+ const DISPLAYED_LENGTH = 6;
7
+ /**
8
+ * Renders the app name, documentation link and short build commit.
9
+ * The commit is omitted when no build record loads.
10
+ */
11
+ export function AppIdentity({ name, docsURL, docsLabel = "Developer Documentation", buildInfoURL, commitHref, }) {
12
+ const build = useBuildInfo(buildInfoURL);
13
+ const commit = build?.commit;
14
+ return (_jsxs(_Fragment, { children: [_jsx("strong", { children: name }), docsURL ? (_jsxs(_Fragment, { children: [" ", _jsx("a", { href: docsURL, children: docsLabel })] })) : null, commit ? (_jsxs(_Fragment, { children: [" (", commitHref ? (_jsx("a", { href: commitHref(commit), title: `Built from ${commit}`, children: _jsx("code", { children: commit.slice(0, DISPLAYED_LENGTH) }) })) : (_jsx("code", { title: `Built from ${commit}`, children: commit.slice(0, DISPLAYED_LENGTH) })), ")"] })) : null] }));
15
+ }
16
+ //# sourceMappingURL=AppIdentity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppIdentity.js","sourceRoot":"","sources":["../../lib/map/AppIdentity.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAA;AAkC1B;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,IAAI,EACJ,OAAO,EACP,SAAS,GAAG,yBAAyB,EACrC,YAAY,EACZ,UAAU,GACQ;IAClB,MAAM,KAAK,GAAG,YAAY,CAAC,YAAY,CAAC,CAAA;IACxC,MAAM,MAAM,GAAG,KAAK,EAAE,MAAM,CAAA;IAE5B,OAAO,CACN,8BACC,2BAAS,IAAI,GAAU,EACtB,OAAO,CAAC,CAAC,CAAC,CACV,8BACE,GAAG,EACJ,YAAG,IAAI,EAAE,OAAO,YAAG,SAAS,GAAK,IAC/B,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACT,8BACE,IAAI,EACJ,UAAU,CAAC,CAAC,CAAC,CACb,YAAG,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,cAAc,MAAM,EAAE,YACzD,yBAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,GAAQ,GAC7C,CACJ,CAAC,CAAC,CAAC,CACH,eAAM,KAAK,EAAE,cAAc,MAAM,EAAE,YAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,gBAAgB,CAAC,GAAQ,CAC/E,EACA,GAAG,IACF,CACH,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAA;AACF,CAAC"}
@@ -3,51 +3,28 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<CompareToggle>` — the "Compare" checkbox plus the compare-version `<select>` from the demo's
7
- * control panel (`_app.tsx:1281-1339`), as a dumb presentational unit. Turning it on reveals a second
8
- * version picker (the primary version filtered out); the actual second parse is a host concern the
9
- * composed demo surfaces through `panels.compare`. Props in, two events out.
10
- *
11
- * NODE-SAFE: pure React, no maplibre.
6
+ * Renders a compare-mode checkbox and a selector for the second model version, leaving the comparison itself to the host.
12
7
  */
13
8
  import type { ReactNode } from "react";
14
9
  import type { VersionOption } from "#map/types";
10
+ /**
11
+ * Props for {@link CompareToggle}.
12
+ */
15
13
  export interface CompareToggleProps {
16
- /**
17
- * The selectable model bundles (the primary version is filtered out of the compare list).
18
- */
19
14
  versions: ReadonlyArray<VersionOption>;
20
- /**
21
- * The primary version, excluded from the compare options.
22
- */
23
15
  primaryVersion: string | null;
24
- /**
25
- * Whether compare mode is on.
26
- */
27
16
  compareMode: boolean;
28
- /**
29
- * Fired when the visitor flips compare mode.
30
- */
31
17
  onCompareModeChange: (compareMode: boolean) => void;
32
- /**
33
- * The version chosen to compare against, or `null` when none is chosen.
34
- */
35
18
  compareVersion: string | null;
36
- /**
37
- * Fired with the chosen compare version (or `null` when the empty option is picked).
38
- */
39
19
  onCompareVersionChange: (version: string | null) => void;
40
- /**
41
- * Disable the compare-version select (e.g. while a parse or compare load runs).
42
- */
43
20
  disabled?: boolean;
44
- /**
45
- * A status line rendered under the select (e.g. the compare backend, or a "Loading…" line).
46
- */
47
21
  status?: ReactNode;
48
22
  }
49
23
  /**
50
- * The compare toggle + (when on) the compare-version selector. Renders `null` with fewer than two versions.
24
+ * Renders the compare checkbox.
25
+ *
26
+ * In compare mode, it also renders the version selector. and no control at all
27
+ * when fewer than two versions exist.
51
28
  */
52
29
  export declare function CompareToggle({ versions, primaryVersion, compareMode, onCompareModeChange, compareVersion, onCompareVersionChange, disabled, status, }: CompareToggleProps): ReactNode;
53
30
  //# sourceMappingURL=CompareToggle.d.ts.map