@mailwoman/react 10.8.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/README.md +2 -2
  2. package/fonts.css +3 -0
  3. package/lib/common/About.tsx +6 -5
  4. package/lib/common/ClientOnly.tsx +6 -4
  5. package/lib/common/CopyButton.tsx +6 -5
  6. package/lib/common/KindBadge.tsx +8 -7
  7. package/lib/common/LoadingIndicator.tsx +7 -7
  8. package/lib/common/PresetChips.tsx +5 -5
  9. package/lib/common/confidence-tiers.ts +3 -3
  10. package/lib/common/cx.ts +6 -6
  11. package/lib/common/text-tokens.ts +3 -3
  12. package/lib/common/useBuildInfo.ts +5 -5
  13. package/lib/common/useClipboard.ts +5 -5
  14. package/lib/common/useDebouncedValue.ts +6 -6
  15. package/lib/common.ts +3 -3
  16. package/lib/index.ts +2 -5
  17. package/lib/map/AppIdentity.tsx +5 -6
  18. package/lib/map/CompareToggle.tsx +5 -5
  19. package/lib/map/DebugInfo.tsx +3 -4
  20. package/lib/map/Geocoder.tsx +55 -17
  21. package/lib/map/GeocoderControls.tsx +140 -40
  22. package/lib/map/GraticuleLayer.tsx +6 -6
  23. package/lib/map/LoadLedgerList.tsx +96 -0
  24. package/lib/map/MapCanvas.tsx +19 -16
  25. package/lib/map/MapChipRow.tsx +3 -4
  26. package/lib/map/MapCompass.tsx +3 -4
  27. package/lib/map/MapContextMenu.tsx +206 -0
  28. package/lib/map/MapControlStack.tsx +3 -4
  29. package/lib/map/MapFooter.tsx +3 -6
  30. package/lib/map/MapPlaceCard.tsx +64 -0
  31. package/lib/map/MapProgressBar.tsx +5 -5
  32. package/lib/map/MapSearchBar.tsx +5 -4
  33. package/lib/map/MapSheet.tsx +4 -5
  34. package/lib/map/OverlayLayers.tsx +11 -10
  35. package/lib/map/PlaceAutocomplete.tsx +3 -4
  36. package/lib/map/PlaceMarker.tsx +10 -9
  37. package/lib/map/ResolvedPlaceLayers.tsx +2 -5
  38. package/lib/map/ResultCamera.tsx +138 -19
  39. package/lib/map/ResultOverlay.tsx +2 -5
  40. package/lib/map/ResultPanel.tsx +11 -6
  41. package/lib/map/StarfieldLayer.tsx +7 -6
  42. package/lib/map/VersionPicker.tsx +5 -5
  43. package/lib/map/fake-runtime.ts +2 -6
  44. package/lib/map/geometry.ts +3 -6
  45. package/lib/map/graticule.ts +6 -6
  46. package/lib/map/jump-curtain.ts +105 -0
  47. package/lib/map/map-debug.ts +4 -4
  48. package/lib/map/place-render.ts +32 -14
  49. package/lib/map/reduced-motion.ts +13 -0
  50. package/lib/map/starfield.ts +9 -8
  51. package/lib/map/types.ts +13 -4
  52. package/lib/map/useCompareState.ts +10 -7
  53. package/lib/map/useGeocode.ts +42 -12
  54. package/lib/map/useMapBearing.ts +7 -7
  55. package/lib/map/useMapPick.ts +277 -0
  56. package/lib/map/useMapPlaceRender.ts +5 -5
  57. package/lib/map/usePlaceAutocomplete.ts +2 -5
  58. package/lib/map.ts +21 -8
  59. package/lib/network/ReachabilityProvider.tsx +219 -0
  60. package/lib/pipeline/CandidatePicker.tsx +18 -11
  61. package/lib/pipeline/ComponentTable.tsx +5 -5
  62. package/lib/pipeline/ConfidenceCell.tsx +6 -5
  63. package/lib/pipeline/FailureDiagnostic.tsx +5 -6
  64. package/lib/pipeline/MatchTable.tsx +46 -0
  65. package/lib/pipeline/PipelineExplorer.tsx +9 -8
  66. package/lib/pipeline/QueryForm.tsx +6 -5
  67. package/lib/pipeline/ResolvedPlace.tsx +11 -24
  68. package/lib/pipeline/SpanHighlight.tsx +7 -6
  69. package/lib/pipeline/TimingPanel.tsx +7 -6
  70. package/lib/pipeline/TreeView.tsx +5 -5
  71. package/lib/pipeline/copy.ts +6 -6
  72. package/lib/pipeline/presets.ts +7 -6
  73. package/lib/pipeline/types.ts +17 -5
  74. package/lib/pipeline/useParsePipeline.ts +50 -23
  75. package/lib/pipeline.ts +3 -3
  76. package/lib/poi/AbstainPanel.tsx +6 -5
  77. package/lib/poi/LiveResultsBlock.tsx +7 -6
  78. package/lib/poi/OverpassBlock.tsx +7 -5
  79. package/lib/poi/POIExplorer.tsx +2 -5
  80. package/lib/poi/QueryInput.tsx +5 -5
  81. package/lib/poi/SubjectPanel.tsx +9 -6
  82. package/lib/poi/runtime.ts +2 -5
  83. package/lib/poi/types.ts +6 -5
  84. package/lib/poi/usePOISearch.ts +77 -49
  85. package/lib/poi.ts +3 -3
  86. package/lib/runtime/useReleaseRuntime.ts +77 -8
  87. package/lib/runtime.ts +3 -3
  88. package/lib/search/SearchModal.tsx +13 -9
  89. package/lib/search/search.css +3 -0
  90. package/lib/search/tokens.ts +7 -6
  91. package/lib/search/types.ts +6 -6
  92. package/lib/search.ts +3 -3
  93. package/out/common/About.d.ts +3 -5
  94. package/out/common/About.d.ts.map +1 -1
  95. package/out/common/About.js.map +1 -1
  96. package/out/common/ClientOnly.d.ts +3 -4
  97. package/out/common/ClientOnly.d.ts.map +1 -1
  98. package/out/common/ClientOnly.js +5 -4
  99. package/out/common/ClientOnly.js.map +1 -1
  100. package/out/common/CopyButton.d.ts +3 -5
  101. package/out/common/CopyButton.d.ts.map +1 -1
  102. package/out/common/CopyButton.js.map +1 -1
  103. package/out/common/KindBadge.d.ts +5 -7
  104. package/out/common/KindBadge.d.ts.map +1 -1
  105. package/out/common/KindBadge.js.map +1 -1
  106. package/out/common/LoadingIndicator.d.ts +0 -10
  107. package/out/common/LoadingIndicator.d.ts.map +1 -1
  108. package/out/common/LoadingIndicator.js +6 -7
  109. package/out/common/LoadingIndicator.js.map +1 -1
  110. package/out/common/PresetChips.d.ts +2 -5
  111. package/out/common/PresetChips.d.ts.map +1 -1
  112. package/out/common/confidence-tiers.d.ts +0 -3
  113. package/out/common/confidence-tiers.d.ts.map +1 -1
  114. package/out/common/confidence-tiers.js +2 -3
  115. package/out/common/confidence-tiers.js.map +1 -1
  116. package/out/common/cx.d.ts +3 -6
  117. package/out/common/cx.d.ts.map +1 -1
  118. package/out/common/cx.js +2 -9
  119. package/out/common/cx.js.map +1 -1
  120. package/out/common/text-tokens.d.ts +0 -3
  121. package/out/common/text-tokens.d.ts.map +1 -1
  122. package/out/common/text-tokens.js +2 -11
  123. package/out/common/text-tokens.js.map +1 -1
  124. package/out/common/useBuildInfo.d.ts +0 -7
  125. package/out/common/useBuildInfo.d.ts.map +1 -1
  126. package/out/common/useBuildInfo.js +4 -5
  127. package/out/common/useBuildInfo.js.map +1 -1
  128. package/out/common/useClipboard.d.ts +0 -7
  129. package/out/common/useClipboard.d.ts.map +1 -1
  130. package/out/common/useClipboard.js +4 -5
  131. package/out/common/useClipboard.js.map +1 -1
  132. package/out/common/useDebouncedValue.d.ts +0 -9
  133. package/out/common/useDebouncedValue.d.ts.map +1 -1
  134. package/out/common/useDebouncedValue.js +5 -6
  135. package/out/common/useDebouncedValue.js.map +1 -1
  136. package/out/common.d.ts +0 -3
  137. package/out/common.d.ts.map +1 -1
  138. package/out/common.js +2 -3
  139. package/out/common.js.map +1 -1
  140. package/out/index.d.ts +0 -5
  141. package/out/index.d.ts.map +1 -1
  142. package/out/index.js +2 -5
  143. package/out/index.js.map +1 -1
  144. package/out/map/AppIdentity.d.ts +2 -6
  145. package/out/map/AppIdentity.d.ts.map +1 -1
  146. package/out/map/AppIdentity.js.map +1 -1
  147. package/out/map/CompareToggle.d.ts +2 -5
  148. package/out/map/CompareToggle.d.ts.map +1 -1
  149. package/out/map/DebugInfo.d.ts +0 -4
  150. package/out/map/DebugInfo.d.ts.map +1 -1
  151. package/out/map/DebugInfo.js +2 -4
  152. package/out/map/DebugInfo.js.map +1 -1
  153. package/out/map/Geocoder.d.ts +21 -9
  154. package/out/map/Geocoder.d.ts.map +1 -1
  155. package/out/map/Geocoder.js +15 -10
  156. package/out/map/Geocoder.js.map +1 -1
  157. package/out/map/GeocoderControls.d.ts +7 -9
  158. package/out/map/GeocoderControls.d.ts.map +1 -1
  159. package/out/map/GeocoderControls.js +99 -31
  160. package/out/map/GeocoderControls.js.map +1 -1
  161. package/out/map/GraticuleLayer.d.ts +3 -6
  162. package/out/map/GraticuleLayer.d.ts.map +1 -1
  163. package/out/map/GraticuleLayer.js +5 -6
  164. package/out/map/GraticuleLayer.js.map +1 -1
  165. package/out/map/LoadLedgerList.d.ts +19 -0
  166. package/out/map/LoadLedgerList.d.ts.map +1 -0
  167. package/out/map/LoadLedgerList.js +59 -0
  168. package/out/map/LoadLedgerList.js.map +1 -0
  169. package/out/map/MapCanvas.d.ts +2 -24
  170. package/out/map/MapCanvas.d.ts.map +1 -1
  171. package/out/map/MapCanvas.js +16 -14
  172. package/out/map/MapCanvas.js.map +1 -1
  173. package/out/map/MapChipRow.d.ts +0 -4
  174. package/out/map/MapChipRow.d.ts.map +1 -1
  175. package/out/map/MapChipRow.js.map +1 -1
  176. package/out/map/MapCompass.d.ts +0 -4
  177. package/out/map/MapCompass.d.ts.map +1 -1
  178. package/out/map/MapCompass.js.map +1 -1
  179. package/out/map/MapContextMenu.d.ts +88 -0
  180. package/out/map/MapContextMenu.d.ts.map +1 -0
  181. package/out/map/MapContextMenu.js +96 -0
  182. package/out/map/MapContextMenu.js.map +1 -0
  183. package/out/map/MapControlStack.d.ts +0 -4
  184. package/out/map/MapControlStack.d.ts.map +1 -1
  185. package/out/map/MapControlStack.js.map +1 -1
  186. package/out/map/MapFooter.d.ts +1 -6
  187. package/out/map/MapFooter.d.ts.map +1 -1
  188. package/out/map/MapFooter.js +2 -5
  189. package/out/map/MapFooter.js.map +1 -1
  190. package/out/map/MapPlaceCard.d.ts +17 -0
  191. package/out/map/MapPlaceCard.d.ts.map +1 -0
  192. package/out/map/MapPlaceCard.js +27 -0
  193. package/out/map/MapPlaceCard.js.map +1 -0
  194. package/out/map/MapProgressBar.d.ts +2 -5
  195. package/out/map/MapProgressBar.d.ts.map +1 -1
  196. package/out/map/MapSearchBar.d.ts +2 -4
  197. package/out/map/MapSearchBar.d.ts.map +1 -1
  198. package/out/map/MapSearchBar.js.map +1 -1
  199. package/out/map/MapSheet.d.ts +1 -5
  200. package/out/map/MapSheet.d.ts.map +1 -1
  201. package/out/map/MapSheet.js +2 -4
  202. package/out/map/MapSheet.js.map +1 -1
  203. package/out/map/OverlayLayers.d.ts +8 -10
  204. package/out/map/OverlayLayers.d.ts.map +1 -1
  205. package/out/map/OverlayLayers.js +10 -10
  206. package/out/map/OverlayLayers.js.map +1 -1
  207. package/out/map/PlaceAutocomplete.d.ts +0 -4
  208. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  209. package/out/map/PlaceAutocomplete.js.map +1 -1
  210. package/out/map/PlaceMarker.d.ts +0 -13
  211. package/out/map/PlaceMarker.d.ts.map +1 -1
  212. package/out/map/PlaceMarker.js +9 -9
  213. package/out/map/PlaceMarker.js.map +1 -1
  214. package/out/map/ResolvedPlaceLayers.d.ts +0 -5
  215. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  216. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  217. package/out/map/ResultCamera.d.ts +53 -7
  218. package/out/map/ResultCamera.d.ts.map +1 -1
  219. package/out/map/ResultCamera.js +103 -17
  220. package/out/map/ResultCamera.js.map +1 -1
  221. package/out/map/ResultOverlay.d.ts +0 -5
  222. package/out/map/ResultOverlay.d.ts.map +1 -1
  223. package/out/map/ResultOverlay.js +2 -5
  224. package/out/map/ResultOverlay.js.map +1 -1
  225. package/out/map/ResultPanel.d.ts +0 -5
  226. package/out/map/ResultPanel.d.ts.map +1 -1
  227. package/out/map/ResultPanel.js +2 -1
  228. package/out/map/ResultPanel.js.map +1 -1
  229. package/out/map/StarfieldLayer.d.ts +0 -11
  230. package/out/map/StarfieldLayer.d.ts.map +1 -1
  231. package/out/map/StarfieldLayer.js +6 -6
  232. package/out/map/StarfieldLayer.js.map +1 -1
  233. package/out/map/VersionPicker.d.ts +2 -5
  234. package/out/map/VersionPicker.d.ts.map +1 -1
  235. package/out/map/fake-runtime.d.ts +0 -5
  236. package/out/map/fake-runtime.d.ts.map +1 -1
  237. package/out/map/fake-runtime.js +2 -6
  238. package/out/map/fake-runtime.js.map +1 -1
  239. package/out/map/geometry.d.ts +1 -6
  240. package/out/map/geometry.d.ts.map +1 -1
  241. package/out/map/geometry.js +3 -6
  242. package/out/map/geometry.js.map +1 -1
  243. package/out/map/graticule.d.ts +3 -6
  244. package/out/map/graticule.d.ts.map +1 -1
  245. package/out/map/graticule.js +2 -9
  246. package/out/map/graticule.js.map +1 -1
  247. package/out/map/jump-curtain.d.ts +61 -0
  248. package/out/map/jump-curtain.d.ts.map +1 -0
  249. package/out/map/jump-curtain.js +69 -0
  250. package/out/map/jump-curtain.js.map +1 -0
  251. package/out/map/map-debug.d.ts +1 -4
  252. package/out/map/map-debug.d.ts.map +1 -1
  253. package/out/map/map-debug.js +2 -10
  254. package/out/map/map-debug.js.map +1 -1
  255. package/out/map/place-render.d.ts +5 -6
  256. package/out/map/place-render.d.ts.map +1 -1
  257. package/out/map/place-render.js +21 -12
  258. package/out/map/place-render.js.map +1 -1
  259. package/out/map/reduced-motion.d.ts +9 -0
  260. package/out/map/reduced-motion.d.ts.map +1 -0
  261. package/out/map/reduced-motion.js +13 -0
  262. package/out/map/reduced-motion.js.map +1 -0
  263. package/out/map/starfield.d.ts +0 -14
  264. package/out/map/starfield.d.ts.map +1 -1
  265. package/out/map/starfield.js +8 -8
  266. package/out/map/starfield.js.map +1 -1
  267. package/out/map/types.d.ts +10 -4
  268. package/out/map/types.d.ts.map +1 -1
  269. package/out/map/types.js +2 -7
  270. package/out/map/types.js.map +1 -1
  271. package/out/map/useCompareState.d.ts +0 -11
  272. package/out/map/useCompareState.d.ts.map +1 -1
  273. package/out/map/useCompareState.js +9 -7
  274. package/out/map/useCompareState.js.map +1 -1
  275. package/out/map/useGeocode.d.ts +13 -20
  276. package/out/map/useGeocode.d.ts.map +1 -1
  277. package/out/map/useGeocode.js +21 -11
  278. package/out/map/useGeocode.js.map +1 -1
  279. package/out/map/useMapBearing.d.ts +2 -9
  280. package/out/map/useMapBearing.d.ts.map +1 -1
  281. package/out/map/useMapBearing.js +4 -5
  282. package/out/map/useMapBearing.js.map +1 -1
  283. package/out/map/useMapPick.d.ts +28 -0
  284. package/out/map/useMapPick.d.ts.map +1 -0
  285. package/out/map/useMapPick.js +206 -0
  286. package/out/map/useMapPick.js.map +1 -0
  287. package/out/map/useMapPlaceRender.d.ts +0 -7
  288. package/out/map/useMapPlaceRender.d.ts.map +1 -1
  289. package/out/map/useMapPlaceRender.js +4 -5
  290. package/out/map/useMapPlaceRender.js.map +1 -1
  291. package/out/map/usePlaceAutocomplete.d.ts +0 -5
  292. package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
  293. package/out/map/usePlaceAutocomplete.js +2 -5
  294. package/out/map/usePlaceAutocomplete.js.map +1 -1
  295. package/out/map.d.ts +10 -8
  296. package/out/map.d.ts.map +1 -1
  297. package/out/map.js +9 -8
  298. package/out/map.js.map +1 -1
  299. package/out/network/ReachabilityProvider.d.ts +76 -0
  300. package/out/network/ReachabilityProvider.d.ts.map +1 -0
  301. package/out/network/ReachabilityProvider.js +120 -0
  302. package/out/network/ReachabilityProvider.js.map +1 -0
  303. package/out/pipeline/CandidatePicker.d.ts +15 -11
  304. package/out/pipeline/CandidatePicker.d.ts.map +1 -1
  305. package/out/pipeline/CandidatePicker.js.map +1 -1
  306. package/out/pipeline/ComponentTable.d.ts +2 -5
  307. package/out/pipeline/ComponentTable.d.ts.map +1 -1
  308. package/out/pipeline/ConfidenceCell.d.ts +0 -8
  309. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  310. package/out/pipeline/ConfidenceCell.js +5 -5
  311. package/out/pipeline/ConfidenceCell.js.map +1 -1
  312. package/out/pipeline/FailureDiagnostic.d.ts +2 -6
  313. package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
  314. package/out/pipeline/FailureDiagnostic.js.map +1 -1
  315. package/out/pipeline/MatchTable.d.ts +7 -0
  316. package/out/pipeline/MatchTable.d.ts.map +1 -0
  317. package/out/pipeline/MatchTable.js +18 -0
  318. package/out/pipeline/MatchTable.js.map +1 -0
  319. package/out/pipeline/PipelineExplorer.d.ts +5 -7
  320. package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
  321. package/out/pipeline/PipelineExplorer.js +1 -1
  322. package/out/pipeline/PipelineExplorer.js.map +1 -1
  323. package/out/pipeline/QueryForm.d.ts +3 -5
  324. package/out/pipeline/QueryForm.d.ts.map +1 -1
  325. package/out/pipeline/QueryForm.js.map +1 -1
  326. package/out/pipeline/ResolvedPlace.d.ts +5 -10
  327. package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
  328. package/out/pipeline/ResolvedPlace.js +2 -3
  329. package/out/pipeline/ResolvedPlace.js.map +1 -1
  330. package/out/pipeline/SpanHighlight.d.ts +4 -6
  331. package/out/pipeline/SpanHighlight.d.ts.map +1 -1
  332. package/out/pipeline/SpanHighlight.js.map +1 -1
  333. package/out/pipeline/TimingPanel.d.ts +4 -6
  334. package/out/pipeline/TimingPanel.d.ts.map +1 -1
  335. package/out/pipeline/TimingPanel.js.map +1 -1
  336. package/out/pipeline/TreeView.d.ts +2 -5
  337. package/out/pipeline/TreeView.d.ts.map +1 -1
  338. package/out/pipeline/copy.d.ts +0 -8
  339. package/out/pipeline/copy.d.ts.map +1 -1
  340. package/out/pipeline/copy.js +5 -6
  341. package/out/pipeline/copy.js.map +1 -1
  342. package/out/pipeline/presets.d.ts +3 -5
  343. package/out/pipeline/presets.d.ts.map +1 -1
  344. package/out/pipeline/presets.js +3 -9
  345. package/out/pipeline/presets.js.map +1 -1
  346. package/out/pipeline/types.d.ts +14 -5
  347. package/out/pipeline/types.d.ts.map +1 -1
  348. package/out/pipeline/types.js +2 -8
  349. package/out/pipeline/types.js.map +1 -1
  350. package/out/pipeline/useParsePipeline.d.ts +6 -6
  351. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  352. package/out/pipeline/useParsePipeline.js +38 -26
  353. package/out/pipeline/useParsePipeline.js.map +1 -1
  354. package/out/pipeline.d.ts +0 -3
  355. package/out/pipeline.d.ts.map +1 -1
  356. package/out/pipeline.js +2 -3
  357. package/out/pipeline.js.map +1 -1
  358. package/out/poi/AbstainPanel.d.ts +3 -5
  359. package/out/poi/AbstainPanel.d.ts.map +1 -1
  360. package/out/poi/AbstainPanel.js.map +1 -1
  361. package/out/poi/LiveResultsBlock.d.ts +4 -6
  362. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  363. package/out/poi/LiveResultsBlock.js.map +1 -1
  364. package/out/poi/OverpassBlock.d.ts +4 -5
  365. package/out/poi/OverpassBlock.d.ts.map +1 -1
  366. package/out/poi/OverpassBlock.js.map +1 -1
  367. package/out/poi/POIExplorer.d.ts +0 -5
  368. package/out/poi/POIExplorer.d.ts.map +1 -1
  369. package/out/poi/POIExplorer.js +2 -5
  370. package/out/poi/POIExplorer.js.map +1 -1
  371. package/out/poi/QueryInput.d.ts +2 -5
  372. package/out/poi/QueryInput.d.ts.map +1 -1
  373. package/out/poi/SubjectPanel.d.ts +6 -6
  374. package/out/poi/SubjectPanel.d.ts.map +1 -1
  375. package/out/poi/SubjectPanel.js.map +1 -1
  376. package/out/poi/runtime.d.ts +0 -5
  377. package/out/poi/runtime.d.ts.map +1 -1
  378. package/out/poi/runtime.js +2 -5
  379. package/out/poi/runtime.js.map +1 -1
  380. package/out/poi/types.d.ts +3 -5
  381. package/out/poi/types.d.ts.map +1 -1
  382. package/out/poi/types.js +2 -8
  383. package/out/poi/types.js.map +1 -1
  384. package/out/poi/usePOISearch.d.ts +7 -5
  385. package/out/poi/usePOISearch.d.ts.map +1 -1
  386. package/out/poi/usePOISearch.js +23 -9
  387. package/out/poi/usePOISearch.js.map +1 -1
  388. package/out/poi.d.ts +0 -3
  389. package/out/poi.d.ts.map +1 -1
  390. package/out/poi.js +2 -3
  391. package/out/poi.js.map +1 -1
  392. package/out/runtime/useReleaseRuntime.d.ts +33 -7
  393. package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
  394. package/out/runtime/useReleaseRuntime.js +36 -6
  395. package/out/runtime/useReleaseRuntime.js.map +1 -1
  396. package/out/runtime.d.ts +0 -3
  397. package/out/runtime.d.ts.map +1 -1
  398. package/out/runtime.js +2 -3
  399. package/out/runtime.js.map +1 -1
  400. package/out/search/SearchModal.d.ts +0 -12
  401. package/out/search/SearchModal.d.ts.map +1 -1
  402. package/out/search/SearchModal.js +12 -9
  403. package/out/search/SearchModal.js.map +1 -1
  404. package/out/search/tokens.d.ts +4 -6
  405. package/out/search/tokens.d.ts.map +1 -1
  406. package/out/search/tokens.js +6 -6
  407. package/out/search/tokens.js.map +1 -1
  408. package/out/search/types.d.ts +3 -6
  409. package/out/search/types.d.ts.map +1 -1
  410. package/out/search/types.js +4 -5
  411. package/out/search/types.js.map +1 -1
  412. package/out/search.d.ts +0 -3
  413. package/out/search.d.ts.map +1 -1
  414. package/out/search.js +2 -3
  415. package/out/search.js.map +1 -1
  416. package/package.json +6 -6
  417. package/styles.css +214 -11
  418. package/tokens/index.css +3 -0
  419. package/lib/map/useMapLabelPick.ts +0 -114
  420. package/out/map/useMapLabelPick.d.ts +0 -13
  421. package/out/map/useMapLabelPick.d.ts.map +0 -1
  422. package/out/map/useMapLabelPick.js +0 -95
  423. package/out/map/useMapLabelPick.js.map +0 -1
@@ -0,0 +1,277 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
4
+ /**
5
+ * Every click on the map as what it landed on: a place label, a rendered feature with
6
+ * a name such as a lake or a park, or bare ground, each with a coordinate.
7
+ *
8
+ * A label is hit within a padded box around the pointer, because a label's glyphs are a small target.
9
+ * The hook resolves the layer list once per style and throttles the hover
10
+ * query to one per animation frame.
11
+ */
12
+
13
+ import { pointInMultiPolygon, pointInPolygon, type PolygonRings } from "@mailwoman/spatial/geometries/polygon"
14
+ import { useEffect, useEffectEvent } from "react"
15
+ import type { MapGeoJSONFeature, MapInstance, MapLayerMouseEvent } from "react-map-gl/maplibre"
16
+
17
+ import type { LngLat } from "#map/place-render"
18
+
19
+ /**
20
+ * The protomaps label layers (`<theme>_label`, `places_*`); other layers are geometry
21
+ * rather than readable place names.
22
+ */
23
+ const LABEL_LAYER = /_label|^places_/
24
+
25
+ /**
26
+ * Properties that may contain a label's text, in trust order.
27
+ *
28
+ * `name` comes from Protomaps.
29
+ * Localized variants appear in script-specific styles.
30
+ */
31
+ const NAME_KEYS = ["name", "name:en", "name_en"] as const
32
+
33
+ /**
34
+ * Properties that say what kind of feature this is, in trust order: Protomaps writes `kind_detail`
35
+ * for the finer kind (`lake` under `water`) and `kind`, and older tiles `pmap:kind`.
36
+ */
37
+ const KIND_KEYS = ["kind_detail", "kind", "pmap:kind"] as const
38
+
39
+ /**
40
+ * The land polygon's kind: it is under every click on land, so it identifies no place.
41
+ */
42
+ const EARTH_KIND = "earth"
43
+
44
+ /**
45
+ * How far from the pointer, in CSS pixels, a label still counts as clicked.
46
+ */
47
+ const LABEL_PADDING_PX = 8
48
+
49
+ /**
50
+ * What a click landed on.
51
+ */
52
+ export interface MapPick {
53
+ /**
54
+ * `label` for a place label, `feature` for another rendered feature with a name, `ground` for the rest.
55
+ */
56
+ kind: "label" | "feature" | "ground"
57
+ /**
58
+ * The feature's name, or `null` for bare ground.
59
+ */
60
+ name: string | null
61
+ /**
62
+ * The feature's kind as the tiles record it, such as `locality` or `lake`, or `null`.
63
+ */
64
+ placetype: string | null
65
+ /**
66
+ * The feature's own point for a point feature, else the clicked coordinate, as `[lon, lat]`.
67
+ */
68
+ lngLat: LngLat
69
+ }
70
+
71
+ /**
72
+ * The style's label layer ids.
73
+ *
74
+ * An empty result must stay unqueried, since an empty `layers` option isn't the
75
+ * same as an absent one in `queryRenderedFeatures`.
76
+ */
77
+ function labelLayerIDs(map: MapInstance): string[] {
78
+ const layers = map.getStyle()?.layers ?? []
79
+
80
+ return layers.map((layer) => layer.id).filter((id) => LABEL_LAYER.test(id))
81
+ }
82
+
83
+ function nameOf(feature: MapGeoJSONFeature): string | null {
84
+ for (const key of NAME_KEYS) {
85
+ const value = feature.properties?.[key]
86
+
87
+ if (typeof value === "string" && value.trim()) return value
88
+ }
89
+
90
+ return null
91
+ }
92
+
93
+ function kindOf(feature: MapGeoJSONFeature): string | null {
94
+ for (const key of KIND_KEYS) {
95
+ const value = feature.properties?.[key]
96
+
97
+ if (typeof value === "string" && value) return value
98
+ }
99
+
100
+ return null
101
+ }
102
+
103
+ /**
104
+ * The feature's own point when it is one, else the clicked coordinate.
105
+ */
106
+ function pointOf(feature: MapGeoJSONFeature, fallback: LngLat): LngLat {
107
+ if (feature.geometry.type === "Point") {
108
+ const [lon, lat] = feature.geometry.coordinates
109
+
110
+ if (typeof lon === "number" && typeof lat === "number") return [lon, lat]
111
+ }
112
+
113
+ return fallback
114
+ }
115
+
116
+ /**
117
+ * The topmost label with a name within the padded box around `point`, or `null`.
118
+ *
119
+ * `queryRenderedFeatures` answers topmost-first, so the first feature with a
120
+ * name is the one the click landed on.
121
+ */
122
+ function labelAt(map: MapInstance, point: MapLayerMouseEvent["point"], layers: string[]): MapGeoJSONFeature | null {
123
+ if (!layers.length) return null
124
+
125
+ const box: [[number, number], [number, number]] = [
126
+ [point.x - LABEL_PADDING_PX, point.y - LABEL_PADDING_PX],
127
+ [point.x + LABEL_PADDING_PX, point.y + LABEL_PADDING_PX],
128
+ ]
129
+
130
+ return map.queryRenderedFeatures(box, { layers }).find((feature) => nameOf(feature) !== null) ?? null
131
+ }
132
+
133
+ /**
134
+ * Whether `lngLat` falls inside a rendered polygon feature.
135
+ *
136
+ * A rendered polygon is the piece inside its tile, so a point in another tile reads as outside.
137
+ */
138
+ function polygonContains(feature: MapGeoJSONFeature, [lon, lat]: LngLat): boolean {
139
+ const { geometry } = feature
140
+
141
+ if (geometry.type === "Polygon") return pointInPolygon(lon, lat, geometry.coordinates as PolygonRings)
142
+
143
+ if (geometry.type === "MultiPolygon") {
144
+ return pointInMultiPolygon(lon, lat, geometry.coordinates as PolygonRings[])
145
+ }
146
+
147
+ return false
148
+ }
149
+
150
+ /**
151
+ * The name of an unnamed polygon, read from a rendered label point of the polygon's own label layers
152
+ * that falls inside it: the tiles name a lake on its label point and not on its water polygon.
153
+ *
154
+ * The label layers of a feature layer share its id as a prefix, `water_label_lakes` for `water`.
155
+ * A label in another tile than the clicked piece isn't found, and the polygon then stays unnamed.
156
+ */
157
+ function nameFromLabelInside(map: MapInstance, polygon: MapGeoJSONFeature, layers: string[]): string | null {
158
+ const ownLabels = layers.filter((id) => id.startsWith(`${polygon.layer.id}_label`))
159
+
160
+ if (!ownLabels.length) return null
161
+
162
+ for (const label of map.queryRenderedFeatures(undefined, { layers: ownLabels })) {
163
+ if (label.geometry.type !== "Point") continue
164
+
165
+ const name = nameOf(label)
166
+ const [lon, lat] = label.geometry.coordinates
167
+
168
+ if (name && typeof lon === "number" && typeof lat === "number" && polygonContains(polygon, [lon, lat])) {
169
+ return name
170
+ }
171
+ }
172
+
173
+ return null
174
+ }
175
+
176
+ /**
177
+ * The topmost feature under `point` on any layer but the land polygon, with its name, or `null`.
178
+ *
179
+ * A feature with a name answers first.
180
+ * An unnamed polygon answers with the name of its own label when that label is inside
181
+ * the rendered piece, and else with its kind and no name.
182
+ */
183
+ function featureAt(
184
+ map: MapInstance,
185
+ point: MapLayerMouseEvent["point"],
186
+ layers: string[]
187
+ ): { feature: MapGeoJSONFeature; name: string | null } | null {
188
+ const features = map.queryRenderedFeatures(point).filter((feature) => kindOf(feature) !== EARTH_KIND)
189
+ const named = features.find((feature) => nameOf(feature) !== null)
190
+
191
+ if (named) return { feature: named, name: nameOf(named) }
192
+
193
+ const polygon = features.find((feature) => feature.geometry.type.endsWith("Polygon"))
194
+
195
+ if (!polygon) return null
196
+
197
+ return { feature: polygon, name: nameFromLabelInside(map, polygon, layers) }
198
+ }
199
+
200
+ /**
201
+ * What a click at `event` landed on.
202
+ */
203
+ function pickAt(map: MapInstance, event: MapLayerMouseEvent, layers: string[]): MapPick {
204
+ const clicked: LngLat = [event.lngLat.lng, event.lngLat.lat]
205
+ const label = labelAt(map, event.point, layers)
206
+
207
+ if (label) {
208
+ return { kind: "label", name: nameOf(label), placetype: kindOf(label), lngLat: pointOf(label, clicked) }
209
+ }
210
+
211
+ const found = featureAt(map, event.point, layers)
212
+
213
+ if (found) {
214
+ return { kind: "feature", name: found.name, placetype: kindOf(found.feature), lngLat: clicked }
215
+ }
216
+
217
+ return { kind: "ground", name: null, placetype: null, lngLat: clicked }
218
+ }
219
+
220
+ /**
221
+ * Routes every map click to `onPick` with what it landed on, and shows a pointer over a label.
222
+ */
223
+ export function useMapPick(map: MapInstance | null, onPick: (pick: MapPick) => void): void {
224
+ // The subscription depends only on the map.
225
+ // `onPick` changes on every render.
226
+ // `useEffectEvent` reads the latest callback without adding it as a reactive dependency.
227
+ const pick = useEffectEvent((picked: MapPick) => onPick(picked))
228
+
229
+ useEffect(() => {
230
+ if (!map) return
231
+
232
+ // Recomputed when the style swaps.
233
+ // Pointer moves read the cached list.
234
+ let layers = labelLayerIDs(map)
235
+
236
+ const readLayers = () => {
237
+ layers = labelLayerIDs(map)
238
+ }
239
+
240
+ const onClick = (event: MapLayerMouseEvent) => {
241
+ pick(pickAt(map, event, layers))
242
+ }
243
+
244
+ let frame = 0
245
+
246
+ const onMove = (event: MapLayerMouseEvent) => {
247
+ if (frame) return
248
+
249
+ frame = requestAnimationFrame(() => {
250
+ frame = 0
251
+
252
+ const canvas = map.getCanvas()
253
+
254
+ // The drag cursor belongs to the pan gesture.
255
+ // An override mid-drag would fight the map for the pointer.
256
+ if (canvas.style.cursor === "grabbing") return
257
+
258
+ canvas.style.cursor = labelAt(map, event.point, layers) ? "pointer" : ""
259
+ })
260
+ }
261
+
262
+ map.on("styledata", readLayers)
263
+ map.on("click", onClick)
264
+ map.on("mousemove", onMove)
265
+
266
+ return () => {
267
+ if (frame) {
268
+ cancelAnimationFrame(frame)
269
+ }
270
+
271
+ map.off("styledata", readLayers)
272
+ map.off("click", onClick)
273
+ map.off("mousemove", onMove)
274
+ map.getCanvas().style.cursor = ""
275
+ }
276
+ }, [map])
277
+ }
@@ -1,9 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * The thin React memo wrapper over the pure {@link computeMapPlaceRenderSpec}; a `null` place yields `null`.
5
+ * The thin React memo wrapper over the pure {@link computeMapPlaceRenderSpec};
6
+ * a `null` place yields `null`.
7
7
  */
8
8
 
9
9
  import { useMemo } from "react"
@@ -1,8 +1,5 @@
1
- /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- */
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
6
3
 
7
4
  import { type KeyboardEvent, useCallback, useEffect, useState } from "react"
8
5
 
package/lib/map.ts CHANGED
@@ -1,12 +1,12 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * `@mailwoman/react/map` — the geocoder map surface, kept behind its own subpath
6
+ * so `maplibre-gl` / `react-map-gl` (WebGL + DOM at import) never enter the package-root graph.
5
7
  *
6
- * `@mailwoman/react/map` — the geocoder map surface, kept behind its own subpath so `maplibre-gl`
7
- * / `react-map-gl` (WebGL + DOM at import) never enter the package-root graph. This subpath import
8
- * pulls the map deps. importing `@mailwoman/react` (root) does not. Consumers who only want the
9
- * parse/POI explorers never pay for maplibre.
8
+ * This subpath import pulls the map deps. importing `@mailwoman/react` (root) doesn't.
9
+ * Consumers who only want the parse/POI explorers never pay for maplibre.
10
10
  *
11
11
  * The host must supply `maplibre-gl` + `react-map-gl` (peer deps) and import
12
12
  * `maplibre-gl/dist/maplibre-gl.css` + `@mailwoman/react/styles.css` itself.
@@ -22,7 +22,20 @@ export { MapCompass } from "./map/MapCompass.tsx"
22
22
  export type { MapCompassProps } from "./map/MapCompass.tsx"
23
23
  export { useMapBearing } from "./map/useMapBearing.ts"
24
24
  export type { UseMapBearing } from "./map/useMapBearing.ts"
25
- export { useMapLabelPick } from "./map/useMapLabelPick.ts"
25
+ export { useMapPick } from "./map/useMapPick.ts"
26
+ export type { MapPick } from "./map/useMapPick.ts"
27
+ export { MapPlaceCard, pickQuery } from "./map/MapPlaceCard.tsx"
28
+ export type { MapPlaceCardProps } from "./map/MapPlaceCard.tsx"
29
+ export { MapContextMenu, MapContextMenuAction, MapContextMenuRow, useMapContextMenu } from "./map/MapContextMenu.tsx"
30
+
31
+ export type {
32
+ MapContextMenuActionProps,
33
+ MapContextMenuPoint,
34
+ MapContextMenuProps,
35
+ MapContextMenuRowProps,
36
+ UseMapContextMenu,
37
+ } from "./map/MapContextMenu.tsx"
38
+
26
39
  export { MapControlButton, MapControlGroup, MapControlStack } from "./map/MapControlStack.tsx"
27
40
  export type { MapControlButtonProps, MapControlGroupProps, MapControlStackProps } from "./map/MapControlStack.tsx"
28
41
  export { MapFooter } from "./map/MapFooter.tsx"
@@ -0,0 +1,219 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
4
+ /**
5
+ * `<ReachabilityProvider>` keeps a {@linkcode ConnectivityReading} for one service:
6
+ * the browser's `navigator.onLine` and the latest probe of a route on that service.
7
+ */
8
+
9
+ import {
10
+ type ConnectivityReading,
11
+ readNavigatorOnline,
12
+ UNKNOWN_CONNECTIVITY,
13
+ } from "@mailwoman/core/network/connectivity"
14
+ import { ReachabilityProbe } from "@mailwoman/core/network/reachability"
15
+ import {
16
+ createContext,
17
+ type FC,
18
+ type ReactNode,
19
+ useCallback,
20
+ useContext,
21
+ useEffect,
22
+ useMemo,
23
+ useRef,
24
+ useState,
25
+ } from "react"
26
+
27
+ /**
28
+ * The milliseconds between probes while the service answers.
29
+ */
30
+ export const REACHABLE_PROBE_INTERVAL_MS = 60_000
31
+
32
+ /**
33
+ * The milliseconds between probes while the service doesn't answer,
34
+ * so a recovered service is noticed sooner.
35
+ */
36
+ export const UNREACHABLE_PROBE_INTERVAL_MS = 10_000
37
+
38
+ export interface ConnectivityContextValue {
39
+ /**
40
+ * The reading as of the last render.
41
+ */
42
+ reading: ConnectivityReading
43
+
44
+ /**
45
+ * The latest reading, including changes since the last render.
46
+ *
47
+ * Its identity is stable, so a long-lived consumer such as a geocoder service can hold it.
48
+ */
49
+ read: () => ConnectivityReading
50
+
51
+ /**
52
+ * Probes the service now, as after a request to it failed, instead of at the next scheduled probe.
53
+ */
54
+ recheck: () => void
55
+ }
56
+
57
+ const ConnectivityContext = createContext<ConnectivityContextValue>({
58
+ reading: UNKNOWN_CONNECTIVITY,
59
+ read: () => UNKNOWN_CONNECTIVITY,
60
+ recheck: () => {},
61
+ })
62
+
63
+ ConnectivityContext.displayName = "ConnectivityContext"
64
+
65
+ /**
66
+ * The connectivity reading of the nearest {@linkcode ReachabilityProvider},
67
+ * with its stable `read` and `recheck`.
68
+ */
69
+ export function useConnectivity(): ConnectivityContextValue {
70
+ return useContext(ConnectivityContext)
71
+ }
72
+
73
+ /**
74
+ * Whether neither signal of the nearest {@linkcode ReachabilityProvider} rules out a request to its service.
75
+ * An unknown signal counts as allowing one.
76
+ */
77
+ export function useReachability(): boolean {
78
+ const { online, reachable } = useContext(ConnectivityContext).reading
79
+
80
+ return online !== false && reachable !== false
81
+ }
82
+
83
+ export interface ReachabilityProviderProps {
84
+ children: ReactNode
85
+
86
+ /**
87
+ * The service route to probe, such as the geocoder API's `/health`.
88
+ *
89
+ * It must answer CORS requests from the page's origin.
90
+ * `null` leaves `reachable` unknown and reports only `navigator.onLine`.
91
+ */
92
+ url: string | URL | null
93
+
94
+ /**
95
+ * Suspends probing and keeps the last reading.
96
+ */
97
+ disable?: boolean
98
+
99
+ /**
100
+ * @see {@linkcode REACHABLE_PROBE_INTERVAL_MS}
101
+ */
102
+ reachableIntervalMs?: number
103
+
104
+ /**
105
+ * @see {@linkcode UNREACHABLE_PROBE_INTERVAL_MS}
106
+ */
107
+ unreachableIntervalMs?: number
108
+ }
109
+
110
+ /**
111
+ * Keeps a connectivity reading for the service at `url` and provides it to
112
+ * {@linkcode useConnectivity} and {@linkcode useReachability}.
113
+ *
114
+ * The provider probes on mount, on the browser's `online` event, when the page
115
+ * becomes visible again and when a consumer calls `recheck`.
116
+ * Between those it probes on an interval that depends on the last result.
117
+ *
118
+ * It stops probing while the page is hidden, as when a home-screen web app moves to
119
+ * the background, and while the browser reports itself offline.
120
+ */
121
+ export const ReachabilityProvider: FC<ReachabilityProviderProps> = ({
122
+ children,
123
+ url,
124
+ disable = false,
125
+ reachableIntervalMs = REACHABLE_PROBE_INTERVAL_MS,
126
+ unreachableIntervalMs = UNREACHABLE_PROBE_INTERVAL_MS,
127
+ }) => {
128
+ const [reading, setReading] = useState<ConnectivityReading>(() => ({
129
+ online: readNavigatorOnline(),
130
+ reachable: null,
131
+ }))
132
+
133
+ const latest = useRef(reading)
134
+ const recheckRef = useRef<() => void>(() => {})
135
+ const probeURL = url == null ? null : String(url)
136
+
137
+ useEffect(() => {
138
+ if (disable) return
139
+
140
+ const probe = probeURL ? new ReachabilityProbe(probeURL) : null
141
+
142
+ let stopped = false
143
+ let revision = 0
144
+ let timeoutID: ReturnType<typeof setTimeout> | undefined
145
+
146
+ const publish = (next: ConnectivityReading) => {
147
+ latest.current = next
148
+
149
+ setReading((previous) =>
150
+ previous.online === next.online && previous.reachable === next.reachable ? previous : next
151
+ )
152
+ }
153
+
154
+ const refresh = () => {
155
+ if (stopped) return
156
+
157
+ clearTimeout(timeoutID)
158
+
159
+ // A result from an earlier refresh is discarded once this one starts.
160
+ const currentRevision = ++revision
161
+ const online = readNavigatorOnline()
162
+
163
+ if (online === false) {
164
+ probe?.abort()
165
+ publish({ online, reachable: false })
166
+
167
+ return
168
+ }
169
+
170
+ if (!probe || document.visibilityState === "hidden") {
171
+ publish({ online, reachable: latest.current.reachable })
172
+
173
+ return
174
+ }
175
+
176
+ void probe.test().then((reachable) => {
177
+ if (stopped || currentRevision !== revision) return
178
+
179
+ publish({ online: readNavigatorOnline(), reachable })
180
+
181
+ timeoutID = setTimeout(refresh, reachable ? reachableIntervalMs : unreachableIntervalMs)
182
+ })
183
+ }
184
+
185
+ const onVisibilityChange = () => {
186
+ if (document.visibilityState === "visible") {
187
+ refresh()
188
+ }
189
+ }
190
+
191
+ recheckRef.current = refresh
192
+
193
+ self.addEventListener("online", refresh)
194
+ self.addEventListener("offline", refresh)
195
+ document.addEventListener("visibilitychange", onVisibilityChange)
196
+
197
+ refresh()
198
+
199
+ return () => {
200
+ stopped = true
201
+
202
+ ++revision
203
+ recheckRef.current = () => {}
204
+
205
+ self.removeEventListener("online", refresh)
206
+ self.removeEventListener("offline", refresh)
207
+ document.removeEventListener("visibilitychange", onVisibilityChange)
208
+
209
+ clearTimeout(timeoutID)
210
+ probe?.[Symbol.dispose]()
211
+ }
212
+ }, [disable, probeURL, reachableIntervalMs, unreachableIntervalMs])
213
+
214
+ const read = useCallback(() => latest.current, [])
215
+ const recheck = useCallback(() => recheckRef.current(), [])
216
+ const value = useMemo(() => ({ reading, read, recheck }), [reading, read, recheck])
217
+
218
+ return <ConnectivityContext.Provider value={value}>{children}</ConnectivityContext.Provider>
219
+ }
@@ -1,20 +1,27 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
5
  * `CandidatePicker` — the ranked list of alternate gazetteer candidates. clicking one selects it.
6
+ *
7
7
  * Presentational. the selected index is owned by the caller (the pipeline hook).
8
8
  *
9
- * The row shows the rank rather than the score. `ResolvedPlaceView.score` is implementation-defined. Its type specifies
10
- * "callers should treat as ordinal" — and the backends do not agree on a scale: the FTS regime is a negated bm25
11
- * plus additive tiers, while the candidate regime is exactly `log10(population + 1)`. Both regimes put
12
- * "New York · 6.95" (log10 of 8.9M) directly under "350 5th Ave · 1.00" from a bounded blend. That reads as one
13
- * number beating another by a factor of seven rather than as two numbers that never shared a scale.
9
+ * The row shows the rank rather than the score.
10
+ * `ResolvedPlaceView.score` is implementation-defined.
11
+ *
12
+ * Its type specifies "callers should treat as ordinal" — and the backends do
13
+ * not agree on a scale: the FTS regime is a negated bm25 plus additive tiers,
14
+ * while the candidate regime is exactly `log10(population + 1)`.
15
+ * Both regimes put "New York · 6.95" (log10 of 8.9M) directly under "350 5th
16
+ * Ave · 1.00" from a bounded blend.
17
+ *
18
+ * That reads as one number beating another by a factor of seven rather than
19
+ * as two numbers that never shared a scale.
14
20
  * `docs/records/reviews/2026-08-04-resolver-score-abstention.md` measures this in full.
15
21
  *
16
- * The raw value stays on the button's `title`, at full precision, because it is exactly the right thing to have
17
- * when you are debugging a ranking and exactly the wrong thing to put in a visitor's eyeline.
22
+ * The raw value stays on the button's `title`, at full precision,
23
+ * because it is exactly the right thing to have when you're debugging a ranking
24
+ * and exactly the wrong thing to put in a visitor's eyeline.
18
25
  */
19
26
 
20
27
  import type { ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result"
@@ -1,9 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * `ComponentTable` — the tag / value / confidence table of decoded components. Presentational.
5
+ * `ComponentTable` — the tag / value / confidence table of decoded components.
6
+ * Presentational.
7
7
  */
8
8
 
9
9
  import type { ParsedComponent } from "@mailwoman/core/pipeline/client-result"
@@ -1,10 +1,11 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
+ * `ConfidenceCell` — a compact confidence bar + value for the component table.
5
6
  *
6
- * `ConfidenceCell` — a compact confidence bar + value for the component table. The fill color follows the shared
7
- * confidence tiers. Presentational.
7
+ * The fill color follows the shared confidence tiers.
8
+ * Presentational.
8
9
  */
9
10
 
10
11
  import { confidenceTierOrMid } from "#common/confidence-tiers"
@@ -1,10 +1,9 @@
1
+ // SPDX-FileCopyrightText: Teffen Ellis and Mailwoman contributors
2
+ // SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Commercial
3
+
1
4
  /**
2
- * @copyright Sister Software
3
- * @license AGPL-3.0
4
- * @author Teffen Ellis, et al.
5
- *
6
- * Explains a query that resolved to no place and suggests which component, such as a city or a
7
- * state, the visitor could add.
5
+ * Explains a query that resolved to no place and suggests which component,
6
+ * such as a city or a state, the visitor could add.
8
7
  */
9
8
 
10
9
  import type { ParsedComponent } from "@mailwoman/core/pipeline/client-result"