@mailwoman/react 10.0.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (376) hide show
  1. package/README.md +17 -16
  2. package/fonts.css +97 -22
  3. package/lib/common/About.tsx +7 -7
  4. package/lib/common/ClientOnly.tsx +2 -14
  5. package/lib/common/CopyButton.tsx +3 -1
  6. package/lib/common/LoadingIndicator.tsx +4 -2
  7. package/lib/common/PresetChips.tsx +9 -8
  8. package/lib/common/confidence-tiers.ts +7 -6
  9. package/lib/common/cx.ts +3 -1
  10. package/lib/common/text-tokens.ts +7 -4
  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 -17
  15. package/lib/map/AppIdentity.tsx +85 -0
  16. package/lib/map/BackendControl.tsx +9 -10
  17. package/lib/map/CompareToggle.tsx +8 -31
  18. package/lib/map/DebugInfo.tsx +88 -0
  19. package/lib/map/Geocoder.tsx +60 -46
  20. package/lib/map/GeocoderControls.tsx +430 -134
  21. package/lib/map/GraticuleLayer.tsx +54 -0
  22. package/lib/map/MapCanvas.tsx +23 -12
  23. package/lib/map/MapChipRow.tsx +4 -8
  24. package/lib/map/MapCompass.tsx +15 -24
  25. package/lib/map/MapControlStack.tsx +8 -9
  26. package/lib/map/MapFooter.tsx +2 -16
  27. package/lib/map/MapProgressBar.tsx +10 -13
  28. package/lib/map/MapSearchBar.tsx +31 -17
  29. package/lib/map/MapSheet.tsx +24 -15
  30. package/lib/map/OverlayLayers.tsx +1 -1
  31. package/lib/map/PlaceAutocomplete.tsx +10 -21
  32. package/lib/map/PlaceMarker.tsx +4 -2
  33. package/lib/map/ResolvedPlaceLayers.tsx +5 -14
  34. package/lib/map/ResultCamera.tsx +8 -31
  35. package/lib/map/ResultOverlay.tsx +2 -12
  36. package/lib/map/ResultPanel.tsx +1 -20
  37. package/lib/map/VersionPicker.tsx +10 -19
  38. package/lib/map/fake-runtime.ts +10 -12
  39. package/lib/map/geometry.ts +14 -47
  40. package/lib/map/graticule.ts +80 -0
  41. package/lib/map/map-debug.ts +1 -1
  42. package/lib/map/place-render.ts +28 -60
  43. package/lib/map/types.ts +58 -104
  44. package/lib/map/useCompareState.ts +5 -4
  45. package/lib/map/useGeocode.ts +7 -5
  46. package/lib/map/useMapBearing.ts +13 -13
  47. package/lib/map/useMapLabelPick.ts +21 -30
  48. package/lib/map/useMapPlaceRender.ts +2 -6
  49. package/lib/map/usePlaceAutocomplete.ts +44 -50
  50. package/lib/map.ts +95 -0
  51. package/lib/pipeline/CandidatePicker.tsx +13 -5
  52. package/lib/pipeline/ConfidenceCell.tsx +1 -1
  53. package/lib/pipeline/FailureDiagnostic.tsx +8 -2
  54. package/lib/pipeline/QueryForm.tsx +5 -2
  55. package/lib/pipeline/ResolvedPlace.tsx +1 -1
  56. package/lib/pipeline/SpanHighlight.tsx +7 -5
  57. package/lib/pipeline/TimingPanel.tsx +1 -1
  58. package/lib/pipeline/TreeView.tsx +1 -1
  59. package/lib/pipeline/copy.ts +22 -25
  60. package/lib/pipeline/presets.ts +15 -13
  61. package/lib/pipeline/types.ts +21 -14
  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 +24 -15
  67. package/lib/poi/QueryInput.tsx +1 -1
  68. package/lib/poi/SubjectPanel.tsx +4 -3
  69. package/lib/poi/runtime.ts +5 -16
  70. package/lib/poi/types.ts +39 -27
  71. package/lib/poi/usePOISearch.ts +39 -44
  72. package/lib/poi.ts +39 -0
  73. package/lib/runtime/useReleaseRuntime.ts +125 -74
  74. package/lib/search/SearchModal.tsx +317 -0
  75. package/lib/search/search.css +144 -0
  76. package/lib/search/types.ts +67 -0
  77. package/lib/search.ts +11 -0
  78. package/out/common/About.d.ts +5 -5
  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 +3 -1
  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 +4 -2
  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 +9 -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 +7 -6
  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 +4 -3
  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 +42 -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/BackendControl.d.ts +9 -10
  128. package/out/map/BackendControl.d.ts.map +1 -1
  129. package/out/map/BackendControl.js +1 -1
  130. package/out/map/BackendControl.js.map +1 -1
  131. package/out/map/CompareToggle.d.ts +8 -31
  132. package/out/map/CompareToggle.d.ts.map +1 -1
  133. package/out/map/CompareToggle.js +4 -1
  134. package/out/map/CompareToggle.js.map +1 -1
  135. package/out/map/DebugInfo.d.ts +34 -0
  136. package/out/map/DebugInfo.d.ts.map +1 -0
  137. package/out/map/DebugInfo.js +39 -0
  138. package/out/map/DebugInfo.js.map +1 -0
  139. package/out/map/Geocoder.d.ts +41 -30
  140. package/out/map/Geocoder.d.ts.map +1 -1
  141. package/out/map/Geocoder.js +20 -36
  142. package/out/map/Geocoder.js.map +1 -1
  143. package/out/map/GeocoderControls.d.ts +14 -42
  144. package/out/map/GeocoderControls.d.ts.map +1 -1
  145. package/out/map/GeocoderControls.js +250 -38
  146. package/out/map/GeocoderControls.js.map +1 -1
  147. package/out/map/GraticuleLayer.d.ts +28 -0
  148. package/out/map/GraticuleLayer.d.ts.map +1 -0
  149. package/out/map/GraticuleLayer.js +25 -0
  150. package/out/map/GraticuleLayer.js.map +1 -0
  151. package/out/map/MapCanvas.d.ts +23 -12
  152. package/out/map/MapCanvas.d.ts.map +1 -1
  153. package/out/map/MapCanvas.js +5 -2
  154. package/out/map/MapCanvas.js.map +1 -1
  155. package/out/map/MapChipRow.d.ts +4 -8
  156. package/out/map/MapChipRow.d.ts.map +1 -1
  157. package/out/map/MapChipRow.js.map +1 -1
  158. package/out/map/MapCompass.d.ts +11 -20
  159. package/out/map/MapCompass.d.ts.map +1 -1
  160. package/out/map/MapCompass.js +5 -1
  161. package/out/map/MapCompass.js.map +1 -1
  162. package/out/map/MapControlStack.d.ts +8 -9
  163. package/out/map/MapControlStack.d.ts.map +1 -1
  164. package/out/map/MapControlStack.js +4 -1
  165. package/out/map/MapControlStack.js.map +1 -1
  166. package/out/map/MapFooter.d.ts +2 -15
  167. package/out/map/MapFooter.d.ts.map +1 -1
  168. package/out/map/MapFooter.js +0 -14
  169. package/out/map/MapFooter.js.map +1 -1
  170. package/out/map/MapProgressBar.d.ts +10 -13
  171. package/out/map/MapProgressBar.d.ts.map +1 -1
  172. package/out/map/MapProgressBar.js.map +1 -1
  173. package/out/map/MapSearchBar.d.ts +16 -17
  174. package/out/map/MapSearchBar.d.ts.map +1 -1
  175. package/out/map/MapSearchBar.js +6 -0
  176. package/out/map/MapSearchBar.js.map +1 -1
  177. package/out/map/MapSheet.d.ts +15 -12
  178. package/out/map/MapSheet.d.ts.map +1 -1
  179. package/out/map/MapSheet.js +8 -12
  180. package/out/map/MapSheet.js.map +1 -1
  181. package/out/map/OverlayLayers.d.ts +1 -1
  182. package/out/map/OverlayLayers.js +1 -1
  183. package/out/map/PlaceAutocomplete.d.ts +10 -21
  184. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  185. package/out/map/PlaceAutocomplete.js +2 -1
  186. package/out/map/PlaceAutocomplete.js.map +1 -1
  187. package/out/map/PlaceMarker.d.ts +4 -2
  188. package/out/map/PlaceMarker.d.ts.map +1 -1
  189. package/out/map/PlaceMarker.js +3 -1
  190. package/out/map/PlaceMarker.js.map +1 -1
  191. package/out/map/ResolvedPlaceLayers.d.ts +5 -14
  192. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  193. package/out/map/ResolvedPlaceLayers.js +1 -1
  194. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  195. package/out/map/ResultCamera.d.ts +8 -31
  196. package/out/map/ResultCamera.d.ts.map +1 -1
  197. package/out/map/ResultCamera.js +3 -28
  198. package/out/map/ResultCamera.js.map +1 -1
  199. package/out/map/ResultOverlay.d.ts +2 -12
  200. package/out/map/ResultOverlay.d.ts.map +1 -1
  201. package/out/map/ResultOverlay.js +1 -2
  202. package/out/map/ResultOverlay.js.map +1 -1
  203. package/out/map/ResultPanel.d.ts +1 -20
  204. package/out/map/ResultPanel.d.ts.map +1 -1
  205. package/out/map/ResultPanel.js.map +1 -1
  206. package/out/map/VersionPicker.d.ts +7 -19
  207. package/out/map/VersionPicker.d.ts.map +1 -1
  208. package/out/map/VersionPicker.js +5 -2
  209. package/out/map/VersionPicker.js.map +1 -1
  210. package/out/map/fake-runtime.d.ts +9 -11
  211. package/out/map/fake-runtime.d.ts.map +1 -1
  212. package/out/map/fake-runtime.js +9 -12
  213. package/out/map/fake-runtime.js.map +1 -1
  214. package/out/map/geometry.d.ts +13 -34
  215. package/out/map/geometry.d.ts.map +1 -1
  216. package/out/map/geometry.js +9 -34
  217. package/out/map/geometry.js.map +1 -1
  218. package/out/map/graticule.d.ts +17 -0
  219. package/out/map/graticule.d.ts.map +1 -0
  220. package/out/map/graticule.js +67 -0
  221. package/out/map/graticule.js.map +1 -0
  222. package/out/map/map-debug.d.ts +1 -1
  223. package/out/map/map-debug.js +1 -1
  224. package/out/map/place-render.d.ts +23 -43
  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 +58 -102
  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 +2 -6
  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 +69 -0
  257. package/out/map.d.ts.map +1 -0
  258. package/out/map.js +46 -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 +1 -1
  265. package/out/pipeline/ConfidenceCell.js +1 -1
  266. package/out/pipeline/FailureDiagnostic.d.ts +8 -2
  267. package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
  268. package/out/pipeline/FailureDiagnostic.js +3 -0
  269. package/out/pipeline/FailureDiagnostic.js.map +1 -1
  270. package/out/pipeline/QueryForm.d.ts +5 -2
  271. package/out/pipeline/QueryForm.d.ts.map +1 -1
  272. package/out/pipeline/QueryForm.js.map +1 -1
  273. package/out/pipeline/SpanHighlight.d.ts +4 -3
  274. package/out/pipeline/SpanHighlight.d.ts.map +1 -1
  275. package/out/pipeline/SpanHighlight.js +3 -2
  276. package/out/pipeline/SpanHighlight.js.map +1 -1
  277. package/out/pipeline/TimingPanel.d.ts +1 -1
  278. package/out/pipeline/TreeView.d.ts +1 -1
  279. package/out/pipeline/copy.d.ts +1 -1
  280. package/out/pipeline/copy.d.ts.map +1 -1
  281. package/out/pipeline/copy.js +4 -3
  282. package/out/pipeline/copy.js.map +1 -1
  283. package/out/pipeline/presets.d.ts +5 -4
  284. package/out/pipeline/presets.d.ts.map +1 -1
  285. package/out/pipeline/presets.js +15 -13
  286. package/out/pipeline/presets.js.map +1 -1
  287. package/out/pipeline/types.d.ts +21 -14
  288. package/out/pipeline/types.d.ts.map +1 -1
  289. package/out/pipeline/types.js +2 -4
  290. package/out/pipeline/types.js.map +1 -1
  291. package/out/pipeline/useParsePipeline.d.ts +14 -9
  292. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  293. package/out/pipeline/useParsePipeline.js +7 -8
  294. package/out/pipeline/useParsePipeline.js.map +1 -1
  295. package/out/pipeline.d.ts +33 -0
  296. package/out/pipeline.d.ts.map +1 -0
  297. package/out/pipeline.js +21 -0
  298. package/out/pipeline.js.map +1 -0
  299. package/out/poi/AbstainPanel.d.ts +1 -1
  300. package/out/poi/LiveResultsBlock.d.ts +2 -1
  301. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  302. package/out/poi/LiveResultsBlock.js.map +1 -1
  303. package/out/poi/POIExplorer.d.ts +22 -12
  304. package/out/poi/POIExplorer.d.ts.map +1 -1
  305. package/out/poi/POIExplorer.js +9 -8
  306. package/out/poi/POIExplorer.js.map +1 -1
  307. package/out/poi/QueryInput.d.ts +1 -1
  308. package/out/poi/SubjectPanel.d.ts +2 -2
  309. package/out/poi/SubjectPanel.d.ts.map +1 -1
  310. package/out/poi/SubjectPanel.js +2 -1
  311. package/out/poi/SubjectPanel.js.map +1 -1
  312. package/out/poi/runtime.d.ts +5 -14
  313. package/out/poi/runtime.d.ts.map +1 -1
  314. package/out/poi/runtime.js +5 -16
  315. package/out/poi/runtime.js.map +1 -1
  316. package/out/poi/types.d.ts +39 -27
  317. package/out/poi/types.d.ts.map +1 -1
  318. package/out/poi/types.js +2 -4
  319. package/out/poi/types.js.map +1 -1
  320. package/out/poi/usePOISearch.d.ts +28 -17
  321. package/out/poi/usePOISearch.d.ts.map +1 -1
  322. package/out/poi/usePOISearch.js +6 -32
  323. package/out/poi/usePOISearch.js.map +1 -1
  324. package/out/poi.d.ts +23 -0
  325. package/out/poi.d.ts.map +1 -0
  326. package/out/poi.js +15 -0
  327. package/out/poi.js.map +1 -0
  328. package/out/runtime/useReleaseRuntime.d.ts +64 -65
  329. package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
  330. package/out/runtime/useReleaseRuntime.js +31 -26
  331. package/out/runtime/useReleaseRuntime.js.map +1 -1
  332. package/out/{runtime/index.d.ts → runtime.d.ts} +1 -1
  333. package/out/runtime.d.ts.map +1 -0
  334. package/out/{runtime/index.js → runtime.js} +1 -1
  335. package/out/runtime.js.map +1 -0
  336. package/out/search/SearchModal.d.ts +33 -0
  337. package/out/search/SearchModal.d.ts.map +1 -0
  338. package/out/search/SearchModal.js +187 -0
  339. package/out/search/SearchModal.js.map +1 -0
  340. package/out/search/types.d.ts +64 -0
  341. package/out/search/types.d.ts.map +1 -0
  342. package/out/search/types.js +13 -0
  343. package/out/search/types.js.map +1 -0
  344. package/out/search.d.ts +11 -0
  345. package/out/search.d.ts.map +1 -0
  346. package/out/search.js +9 -0
  347. package/out/search.js.map +1 -0
  348. package/package.json +60 -142
  349. package/styles.css +482 -266
  350. package/tokens/index.css +24 -6
  351. package/tokens/tokens.json +114 -6
  352. package/lib/common/index.ts +0 -22
  353. package/lib/map/index.ts +0 -95
  354. package/lib/pipeline/index.ts +0 -36
  355. package/lib/poi/index.ts +0 -39
  356. package/out/common/index.d.ts +0 -22
  357. package/out/common/index.d.ts.map +0 -1
  358. package/out/common/index.js +0 -15
  359. package/out/common/index.js.map +0 -1
  360. package/out/map/index.d.ts +0 -69
  361. package/out/map/index.d.ts.map +0 -1
  362. package/out/map/index.js +0 -46
  363. package/out/map/index.js.map +0 -1
  364. package/out/pipeline/index.d.ts +0 -33
  365. package/out/pipeline/index.d.ts.map +0 -1
  366. package/out/pipeline/index.js +0 -21
  367. package/out/pipeline/index.js.map +0 -1
  368. package/out/poi/index.d.ts +0 -23
  369. package/out/poi/index.d.ts.map +0 -1
  370. package/out/poi/index.js +0 -15
  371. package/out/poi/index.js.map +0 -1
  372. package/out/runtime/index.d.ts.map +0 -1
  373. package/out/runtime/index.js.map +0 -1
  374. package/styleframe.config.ts +0 -329
  375. package/vitest.node.config.ts +0 -20
  376. /package/lib/{runtime/index.ts → runtime.ts} +0 -0
@@ -2,30 +2,21 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<ResolvedPlaceLayers>` — the drop-in that renders a whole {@link MapPlaceRenderSpec} as `<MapCanvas>`
7
- * children: the marker(s), the outline, and (optionally) the camera move. This is the declarative
8
- * replacement for the demo's imperative marker/bbox/camera redraw effect — a consumer computes the spec
9
- * with `useMapPlaceRender(place)` and drops `<ResolvedPlaceLayers spec={spec} />` inside `<MapCanvas>`.
10
- *
11
- * `spec = null` (no result / no candidate) renders nothing, which also unmounts the previous marker +
12
- * outline — the teardown the old effect did by hand (`markerRef.remove()`, `clearBbox`) is now just
13
- * React unmounting. NODE-IMPORT SAFETY: pulls the map components — `@mailwoman/react/map` only.
14
5
  */
15
6
  import type { ReactNode } from "react";
16
7
  import type { MapPlaceRenderSpec } from "#map/place-render";
17
8
  export interface ResolvedPlaceLayersProps {
18
9
  /**
19
- * The render spec (from {@link useMapPlaceRender}); `null` renders nothing.
10
+ * The render spec (from {@link useMapPlaceRender}); `null` renders no layers.
20
11
  */
21
12
  spec: MapPlaceRenderSpec | null;
22
13
  /**
23
- * Apply the computed camera target via {@link ResultCamera}. @default true. Set false when the consumer drives the
24
- * camera itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}).
14
+ * Apply the computed camera target via {@link ResultCamera}; set false when the consumer drives the camera
15
+ * itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}). @default true
25
16
  */
26
17
  applyCamera?: boolean;
27
18
  /**
28
- * Animate the camera move. Forwarded to {@link ResultCamera}. @default true
19
+ * Animate the camera move, forwarded to {@link ResultCamera}. @default true
29
20
  */
30
21
  animateCamera?: boolean;
31
22
  /**
@@ -38,7 +29,7 @@ export interface ResolvedPlaceLayersProps {
38
29
  markerColor?: string;
39
30
  }
40
31
  /**
41
- * Render the marker(s), outline, and (optional) camera move for one resolved place.
32
+ * Render the marker(s), outline and optional camera move for one resolved place.
42
33
  */
43
34
  export declare function ResolvedPlaceLayers({ spec, applyCamera, animateCamera, outlineID, markerColor, }: ResolvedPlaceLayersProps): ReactNode;
44
35
  //# sourceMappingURL=ResolvedPlaceLayers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResolvedPlaceLayers.d.ts","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EACnC,IAAI,EACJ,WAAkB,EAClB,aAAoB,EACpB,SAAS,EACT,WAAW,GACX,EAAE,wBAAwB,GAAG,SAAS,CAiBtC"}
1
+ {"version":3,"file":"ResolvedPlaceLayers.d.ts","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAM3D,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,EACnC,IAAI,EACJ,WAAkB,EAClB,aAAoB,EACpB,SAAS,EACT,WAAW,GACX,EAAE,wBAAwB,GAAG,SAAS,CAiBtC"}
@@ -3,7 +3,7 @@ import { PlaceMarker } from "./PlaceMarker.js";
3
3
  import { ResultCamera } from "./ResultCamera.js";
4
4
  import { ResultOverlay } from "./ResultOverlay.js";
5
5
  /**
6
- * Render the marker(s), outline, and (optional) camera move for one resolved place.
6
+ * Render the marker(s), outline and optional camera move for one resolved place.
7
7
  */
8
8
  export function ResolvedPlaceLayers({ spec, applyCamera = true, animateCamera = true, outlineID, markerColor, }) {
9
9
  if (!spec)
@@ -1 +1 @@
1
- {"version":3,"file":"ResolvedPlaceLayers.js","sourceRoot":"","sources":["../../lib/map/ResolvedPlaceLayers.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAoB,CAAA;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AA0BnD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,EACnC,IAAI,EACJ,WAAW,GAAG,IAAI,EAClB,aAAa,GAAG,IAAI,EACpB,SAAS,EACT,WAAW,GACe;IAC1B,I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KAAK,EAAE,WAAW,IAHb,GAAG,SAAS,IAAI,QAAQ,IAAI,KAAK,EAAE,CAIvC,CACF,CAAC,EACF,KAAC,aAAa,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAI,EAC1E,WAAW,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,aAAa,GAAI,CAAC,CAAC,CAAC,IAAI,IACjF,CACH,CAAA;AACF,CAAC"}
@@ -2,54 +2,31 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<ResultCamera>` — applies the {@link MapCameraTarget} a {@link MapPlaceRenderSpec} computes, by
7
- * animating the live map to it. This is the ONE deliberately-imperative touch in the phase-2 overlays,
8
- * and it is justified: maplibre exposes animated camera moves (`flyTo`) and viewport-fitting
9
- * (`fitBounds`, which needs the map's PIXEL dimensions + padding) ONLY imperatively — react-map-gl has
10
- * no declarative prop for "animate to these bounds". It is applied the v8-idiomatic way, through
11
- * `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
12
- *
13
- * A consumer that prefers a hard, declarative jump can instead feed the target through
14
- * {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
15
- * `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
16
- *
17
- * `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
18
- * as the effect dependency re-runs the camera move exactly when the resolved place changes — no
19
- * value-key dance, no dependency-lint suppression.
20
5
  */
21
6
  import type { FitBoundsOptions } from "maplibre-gl";
22
7
  import { type ReactNode } from "react";
23
8
  import type { MapCameraTarget } from "#map/place-render";
24
9
  /**
25
- * The `fitBounds` options for a `bounds` target — and the reason this is a named function rather than an object literal
26
- * at the call site.
10
+ * Builds `fitBounds` options without an undefined `duration` key.
27
11
  *
28
- * `duration` is present ONLY on the non-animated path, and its ABSENCE on the animated one is required. maplibre's
29
- * `Camera.flyTo` (which `fitBounds` funnels into via `_fitInternal`) branches on `'duration' in options`, not on the
30
- * value: an explicitly-passed `duration: undefined` therefore survives the key test and is coerced with `+undefined` →
31
- * `NaN`. Every ease frame then computes `k = easing(elapsed / NaN)` → `NaN`, the flight-path math yields a `NaN` world
32
- * coordinate, and the FIRST frame throws `Invalid LngLat object: (NaN, NaN)` out of the RAF loop — before the map has
33
- * moved at all, and with no `move` event to notice it by.
34
- *
35
- * Measured 2026-08-05 against maplibre-gl 5.24.0, same bounds and same map: `{padding: 40, duration: undefined}` →
36
- * `map._easeOptions.duration = NaN` + the throw; `{padding: 40}` → `3937.7 ms` + a normal flight. So pass the key or
37
- * don't — never pass it holding `undefined`.
12
+ * MapLibre checks for existence and can turn into a NaN camera move.
38
13
  */
39
14
  export declare function fitBoundsOptionsFor(padding: number, animate: boolean): FitBoundsOptions;
15
+ /**
16
+ * Props for {@link ResultCamera}.
17
+ */
40
18
  export interface ResultCameraProps {
41
19
  /**
42
- * The camera target to animate to. `null` leaves the camera untouched (no result yet).
20
+ * The camera target; `null` leaves the camera where it is.
43
21
  */
44
22
  target: MapCameraTarget | null;
45
23
  /**
46
- * Animate (`flyTo`/`fitBounds`) vs jump. @default true. When false, a `center` target jumps with `jumpTo`; a `bounds`
47
- * target still uses `fitBounds` (no instantaneous fit exists) but with `duration: 0`.
24
+ * Whether to animate the move. @default true
48
25
  */
49
26
  animate?: boolean;
50
27
  }
51
28
  /**
52
- * Drive the live map to `target`. No DOM of its own — it is a behavior mounted as a `<Map>` child.
29
+ * Moves the map to `target`; mount it as a child of `<Map>`.
53
30
  */
54
31
  export declare function ResultCamera({ target, animate }: ResultCameraProps): ReactNode;
55
32
  //# sourceMappingURL=ResultCamera.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResultCamera.d.ts","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],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right Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<ResultCamera>` — applies the {@link MapCameraTarget} a {@link MapPlaceRenderSpec} computes, by
7
- * animating the live map to it. This is the ONE deliberately-imperative touch in the phase-2 overlays,
8
- * and it is justified: maplibre exposes animated camera moves (`flyTo`) and viewport-fitting
9
- * (`fitBounds`, which needs the map's PIXEL dimensions + padding) ONLY imperatively — react-map-gl has
10
- * no declarative prop for "animate to these bounds". It is applied the v8-idiomatic way, through
11
- * `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
12
- *
13
- * A consumer that prefers a hard, declarative jump can instead feed the target through
14
- * {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
15
- * `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
16
- *
17
- * `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
18
- * as the effect dependency re-runs the camera move exactly when the resolved place changes — no
19
- * value-key dance, no dependency-lint suppression.
20
5
  */
21
6
  import { useEffect } from "react";
22
7
  import { useMap } from "react-map-gl/maplibre";
23
8
  /**
24
- * The `fitBounds` options for a `bounds` target — and the reason this is a named function rather than an object literal
25
- * at the call site.
26
- *
27
- * `duration` is present ONLY on the non-animated path, and its ABSENCE on the animated one is required. maplibre's
28
- * `Camera.flyTo` (which `fitBounds` funnels into via `_fitInternal`) branches on `'duration' in options`, not on the
29
- * value: an explicitly-passed `duration: undefined` therefore survives the key test and is coerced with `+undefined` →
30
- * `NaN`. Every ease frame then computes `k = easing(elapsed / NaN)` → `NaN`, the flight-path math yields a `NaN` world
31
- * coordinate, and the FIRST frame throws `Invalid LngLat object: (NaN, NaN)` out of the RAF loop — before the map has
32
- * moved at all, and with no `move` event to notice it by.
9
+ * Builds `fitBounds` options without an undefined `duration` key.
33
10
  *
34
- * Measured 2026-08-05 against maplibre-gl 5.24.0, same bounds and same map: `{padding: 40, duration: undefined}` →
35
- * `map._easeOptions.duration = NaN` + the throw; `{padding: 40}` → `3937.7 ms` + a normal flight. So pass the key or
36
- * don't — never pass it holding `undefined`.
11
+ * MapLibre checks for existence and can turn into a NaN camera move.
37
12
  */
38
13
  export function fitBoundsOptionsFor(padding, animate) {
39
14
  return animate ? { padding } : { padding, duration: 0 };
40
15
  }
41
16
  /**
42
- * Drive the live map to `target`. No DOM of its own — it is a behavior mounted as a `<Map>` child.
17
+ * Moves the map to `target`; mount it as a child of `<Map>`.
43
18
  */
44
19
  export function ResultCamera({ target, animate = true }) {
45
20
  const map = useMap();
@@ -1 +1 @@
1
- {"version":3,"file":"ResultCamera.js","sourceRoot":"","sources":["../../lib/map/ResultCamera.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAI9C;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAAgB;IACpE,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAA;AACxD,CAAC;AAcD;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,EAAqB;IACzE,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;IAEpB,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,QAAQ,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,CAAA;QAEtC,IAAI,CAAC,QAAQ,IAAI,CAAC,MAAM;YAAE,OAAM;QAEhC,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC9B,IAAI,OAAO,EAAE,CAAC;gBACb,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM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;gBACb,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YAC7D,CAAC;iBAAM,CAAC;gBACP,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAA;YAC9D,CAAC;YAED,OAAM;QACP,CAAC;QAED,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAA;IAChF,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAE1B,OAAO,IAAI,CAAA;AACZ,CAAC"}
@@ -2,21 +2,12 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<ResultOverlay>` — the resolved-place outline (crisp admin polygon, or an approximate/exact-radius
7
- * circle) as a declarative `<Source>` + fill/line `<Layer>`s. This replaces the demo's imperative
8
- * `setPlaceOutline` / `drawApproxCircle` / `drawPlaceGeometry` / `clearBbox` helpers and their
9
- * `whenStyleReady` guard: react-map-gl owns the "add source/layer once the style is loaded, remove on
10
- * unmount" lifecycle, so the hand-rolled `isStyleLoaded()` / `styledata` races disappear.
11
- *
12
- * Pass the `outline` straight from a {@link MapPlaceRenderSpec}; a `null` outline renders nothing (the
13
- * bare-point case). NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` — `@mailwoman/react/map` only.
14
5
  */
15
6
  import type { ReactNode } from "react";
16
7
  import type { PlaceGeometry } from "#map/geometry";
17
8
  export interface ResultOverlayProps {
18
9
  /**
19
- * The outline geometry to draw, or `null` to draw nothing (the bare-point result).
10
+ * The outline geometry to draw, or `null` to draw no geometry (the bare-point result).
20
11
  */
21
12
  outline: PlaceGeometry | null;
22
13
  /**
@@ -37,8 +28,7 @@ export interface ResultOverlayProps {
37
28
  lineWidth?: number;
38
29
  }
39
30
  /**
40
- * Render the resolved-place outline. One geojson `<Source>` feeds a translucent fill `<Layer>` and a solid line
41
- * `<Layer>` — the same two layers the imperative `setPlaceOutline` created, now declarative and self-cleaning.
31
+ * Render the resolved-place outline.
42
32
  */
43
33
  export declare function ResultOverlay({ outline, id, color, fillOpacity, lineWidth, }: ResultOverlayProps): ReactNode;
44
34
  //# sourceMappingURL=ResultOverlay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResultOverlay.d.ts","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAOlD,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,EAAgB,EAChB,KAAqB,EACrB,WAAkB,EAClB,SAAa,GACb,EAAE,kBAAkB,GAAG,SAAS,CAchC"}
1
+ {"version":3,"file":"ResultOverlay.d.ts","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAOlD,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,OAAO,EACP,EAAgB,EAChB,KAAqB,EACrB,WAAkB,EAClB,SAAa,GACb,EAAE,kBAAkB,GAAG,SAAS,CAchC"}
@@ -5,8 +5,7 @@ import { Layer, Source } from "react-map-gl/maplibre";
5
5
  */
6
6
  const OUTLINE_COLOR = "#e0367c";
7
7
  /**
8
- * Render the resolved-place outline. One geojson `<Source>` feeds a translucent fill `<Layer>` and a solid line
9
- * `<Layer>` — the same two layers the imperative `setPlaceOutline` created, now declarative and self-cleaning.
8
+ * Render the resolved-place outline.
10
9
  */
11
10
  export function ResultOverlay({ outline, id = "mw-result", color = OUTLINE_COLOR, fillOpacity = 0.12, lineWidth = 2, }) {
12
11
  if (!outline)
@@ -1 +1 @@
1
- {"version":3,"file":"ResultOverlay.js","sourceRoot":"","sources":["../../lib/map/ResultOverlay.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAIrD;;GAEG;AACH,MAAM,aAAa,GAAG,SAAS,CAAA;AAyB/B;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,OAAO,EACP,EAAE,GAAG,WAAW,EAChB,KAAK,GAAG,aAAa,EACrB,WAAW,GAAG,IAAI,EAClB,SAAS,GAAG,CAAC,GACO;IACpB,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,MAAM,IAAI,GAAG;QACZ,IAAI,EAAE,mBAA4B;QAClC,QAAQ,EAAE,CAAC,EAAE,IAAI,EAA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,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,GAAI,EACpG,KAAC,KAAK,IAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,GAAI,IACxF,CACT,CAAA;AACF,CAAC"}
@@ -2,42 +2,23 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<ResultPanel>` — the demo's parse+resolve result block, assembled from the SHARED pipeline
7
- * presentational units (it does not re-implement any of them): `KindBadge`, `ComponentTable`,
8
- * `ResolvedPlace`, `CandidatePicker`, plus the `CopyButton` + `buildParsePayload` copy affordance. This
9
- * is the standalone, story-testable unit the demo's floating panel renders (the map analogue of the
10
- * result block PipelineExplorer inlines), so `Geocoder` composes ONE panel instead of duplicating
11
- * the marker/table/candidate glue. Heavy host visualizers (span highlight, tree, timing) slot in via
12
- * `extras`; the no-resolve diagnostic via `failure`.
13
- *
14
- * NODE-SAFE: pure React + the shared units, no maplibre.
15
5
  */
16
6
  import type { ParseResult, ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result";
17
7
  import type { ReactNode } from "react";
18
8
  export interface ResultPanelProps {
19
- /**
20
- * The parse+resolve result to render.
21
- */
22
9
  result: ParseResult;
23
10
  /**
24
11
  * The selected candidate (falls back to the first), used for the resolved-place detail + copy payload.
25
12
  */
26
13
  selectedCandidate: ResolvedPlaceView | null;
27
- /**
28
- * The selected candidate index, for the picker's active state.
29
- */
30
14
  selectedCandidateIndex: number;
31
- /**
32
- * Fired when a candidate in the picker is chosen.
33
- */
34
15
  onSelectCandidate: (index: number) => void;
35
16
  /**
36
17
  * Host-injected heavy visualizers (span highlight, tree, timing, …), rendered from the result.
37
18
  */
38
19
  extras?: (result: ParseResult) => ReactNode;
39
20
  /**
40
- * Host-injected no-resolve diagnostic, rendered when nothing resolved.
21
+ * Host-injected no-resolve diagnostic, rendered when no place resolved.
41
22
  */
42
23
  failure?: (result: ParseResult) => ReactNode;
43
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;CAC5C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACP,EAAE,gBAAgB,GAAG,SAAS,CAkC9B"}
1
+ {"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC,MAAM,WAAW,gB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M,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACW;IAClB,OAAO,CACN,eAAK,SAAS,EAAC,WAAW,aACzB,eAAK,SAAS,EAAC,mBAAmB,aACjC,6CAA0B,EAC1B,KAAC,UAAU,IACV,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACzD,KAAK,EAAC,WAAW,EACjB,WAAW,EAAC,eAAU,GACrB,IACG,EAEL,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAI,CAAC,CAAC,CAAC,IAAI,EAEvE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAE/B,KAAC,cAAc,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,EAEtC,iBAAiB,CAAC,CAAC,CAAC,CACpB,8BACC,KAAC,aAAa,IAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI,EACvE,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,eAAe,IACf,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,iBAAiB,GAC1B,CACF,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACb,OAAO,CAAC,MAAM,CAAC,CACf,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
@@ -3,40 +3,28 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<VersionPicker>` — the model-version `<select>` from the demo's control panel (`_app.tsx:1230-1254`),
7
- * as a dumb presentational unit: the available bundles + current selection come in as props, the choice
8
- * goes out through `onSelect`. No load state, no manifest fetch — the host (via `useReleaseRuntime`) owns
9
- * that. Renders nothing when there is fewer than two versions to choose between.
10
- *
11
- * NODE-SAFE: pure React + a `<select>`, no maplibre. It rides the `@mailwoman/react/map` subpath only
12
- * because it is a demo-specific control, not because it needs WebGL.
6
+ * Renders a selector for the available model versions. The host owns loading and selection.
13
7
  */
14
8
  import type { ReactNode } from "react";
15
9
  import type { VersionOption } from "#map/types";
10
+ /**
11
+ * Props for {@link VersionPicker}.
12
+ */
16
13
  export interface VersionPickerProps {
17
- /**
18
- * The selectable model bundles.
19
- */
20
14
  versions: ReadonlyArray<VersionOption>;
21
- /**
22
- * The currently-selected version tag.
23
- */
24
15
  selected: string | null;
25
- /**
26
- * Fired with the chosen version tag.
27
- */
28
16
  onSelect: (version: string) => void;
29
17
  /**
30
- * Disable the control (e.g. while a parse is running).
18
+ * Disables the control, for example while a parse runs.
31
19
  */
32
20
  disabled?: boolean;
33
21
  /**
34
- * Field label. @default "Model version"
22
+ * @default "Model version"
35
23
  */
36
24
  label?: string;
37
25
  }
38
26
  /**
39
- * The model-version selector. Renders `null` when there is nothing meaningful to pick.
27
+ * Renders the model version selector, or `null` when fewer than two versions exist.
40
28
  */
41
29
  export declare function VersionPicker({ versions, selected, onSelect, disabled, label, }: VersionPickerProps): ReactNode;
42
30
  //# sourceMappingURL=VersionPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CAuBhC"}
1
+ {"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CA0BhC"}
@@ -1,10 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
- * The model-version selector. Renders `null` when there is nothing meaningful to pick.
3
+ * Renders the model version selector, or `null` when fewer than two versions exist.
4
4
  */
5
5
  export function VersionPicker({ versions, selected, onSelect, disabled, label = "Model version", }) {
6
6
  if (versions.length < 2)
7
7
  return null;
8
- return (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-version", children: label }), _jsx("select", { id: "mw-demo-version", className: "mw-demo-control__select", value: selected ?? "", onChange: (e) => onSelect(e.target.value), disabled: disabled, children: versions.map((v) => (_jsx("option", { value: v.version, children: v.label ?? v.version }, v.version))) })] }));
8
+ return (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-version", children: label }), _jsx("select", { id: "mw-demo-version", className: "mw-demo-control__select", value: selected ?? "", onChange: (e) => onSelect(e.target.value), disabled: disabled,
9
+ // The title shows the full label.
10
+ // The field may clip it.
11
+ title: versions.find((v) => v.version === selected)?.label ?? selected ?? undefined, children: versions.map((v) => (_jsx("option", { value: v.version, children: v.label ?? v.version }, v.version))) })] }));
9
12
  }
10
13
  //# sourceMappingURL=VersionPicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":";AAyCA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,eAAe,GACH;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,iBAAiB,YACjE,KAAK,GACC,EACR,iBACC,EAAE,EAAC,iBAAiB,EACpB,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,QAAQ,IAAI,EAAE,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,QAAQ,EAAE,QAAQ,YAEjB,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,GACM,IACJ,CACN,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"VersionPicker.js","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":";AA6BA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAK,GAAG,eAAe,GACH;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,iBAAiB,YACjE,KAAK,GACC,EACR,iBACC,EAAE,EAAC,iBAAiB,EACpB,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,QAAQ,IAAI,EAAE,EACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EACzC,QAAQ,EAAE,QAAQ;gBAClB,kCAAkC;gBAClC,yBAAyB;gBACzB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,EAAE,KAAK,IAAI,QAAQ,IAAI,SAAS,YAElF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACpB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,GACM,IACJ,CACN,CAAA;AACF,CAAC"}
@@ -2,17 +2,14 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * A fake geocoder runtime: canned parse + resolve, an offline stub map style, canned autocomplete, a version list.
7
- * No network, no ONNX, no maplibre at run time — everything is data. It is what the stories and component tests
8
- * mount, and what a host mounts to show the UI without the model.
9
5
  */
10
6
  import type { ParseResult } from "@mailwoman/core/pipeline/client-result";
11
7
  import type { GeocoderRuntime, Suggestion } from "#map/types";
12
8
  import type { PipelineRuntime } from "#pipeline/types";
13
9
  import type { MapCanvasStyle } from "./MapCanvas.tsx";
14
10
  /**
15
- * An offline stub map style — one solid `background` layer, zero sources, zero network. Safe for headless Storybook.
11
+ * Defines an offline map style with a single background layer and no sources,
12
+ * so it renders in headless Storybook without network access.
16
13
  */
17
14
  export declare const STUB_MAP_STYLE: MapCanvasStyle;
18
15
  /**
@@ -20,15 +17,16 @@ export declare const STUB_MAP_STYLE: MapCanvasStyle;
20
17
  */
21
18
  export declare const FAKE_SUGGESTIONS: Suggestion[];
22
19
  /**
23
- * A fake DEMO runtime — the map analogue of {@link makePipelineRuntime}. It composes the pipeline fake (canned
24
- * parse+resolve) with the map surface: the offline stub style, a version list, a backend, an injected autocomplete, and
25
- * a `resolveMapPlace` that hands the selected candidate a bbox so the declarative overlays draw a marker + outline. No
26
- * network, no ONNX, no maplibre-at-runtime — everything is data. `runParseWithBias` delegates to the base parse (the
27
- * bias is ignored by the fake but present so the parameter is exercised).
20
+ * Creates an offline {@link GeocoderRuntime} that extends {@link makePipelineRuntime}
21
+ * with the stub style, canned suggestions and versions.
22
+ *
23
+ * It also provides `resolveMapPlace` that gives the candidate a bounding box so overlays draw.
24
+ * The fake ignores the bias passed to `runParseWithBias`.
28
25
  */
29
26
  export declare function makeFakeGeocoderRuntime(overrides?: Partial<GeocoderRuntime>): GeocoderRuntime;
30
27
  /**
31
- * A fixed, fully-populated parse+resolve result — the shared fixture behind the pipeline runtime + the result panel.
28
+ * Creates a fixed, fully populated parse-and-resolve result for the given input,
29
+ * shared by the fake pipeline runtime and result-panel fixtures.
32
30
  */
33
31
  export declare function makeFakeParseResult(input?: string): ParseResult;
34
32
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fake-runtime.d.ts","sourceRoot":"","sources":["../../lib/map/fake-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAK5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAIxC,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAkCjG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,SAAoC,GAAG,WAAW,CAmB1F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAc7F"}
1
+ {"version":3,"file":"fake-runtime.d.ts","sourceRoot":"","sources":["../../lib/map/fake-runtime.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,cAK5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAIxC,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAkCjG;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,SAAoC,GAAG,WAAW,CAmB1F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAc7F"}
@@ -2,13 +2,10 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * A fake geocoder runtime: canned parse + resolve, an offline stub map style, canned autocomplete, a version list.
7
- * No network, no ONNX, no maplibre at run time — everything is data. It is what the stories and component tests
8
- * mount, and what a host mounts to show the UI without the model.
9
5
  */
10
6
  /**
11
- * An offline stub map style — one solid `background` layer, zero sources, zero network. Safe for headless Storybook.
7
+ * Defines an offline map style with a single background layer and no sources,
8
+ * so it renders in headless Storybook without network access.
12
9
  */
13
10
  export const STUB_MAP_STYLE = {
14
11
  version: 8,
@@ -25,11 +22,11 @@ export const FAKE_SUGGESTIONS = [
25
22
  { value: "Newark", placetype: "locality" },
26
23
  ];
27
24
  /**
28
- * A fake DEMO runtime — the map analogue of {@link makePipelineRuntime}. It composes the pipeline fake (canned
29
- * parse+resolve) with the map surface: the offline stub style, a version list, a backend, an injected autocomplete, and
30
- * a `resolveMapPlace` that hands the selected candidate a bbox so the declarative overlays draw a marker + outline. No
31
- * network, no ONNX, no maplibre-at-runtime — everything is data. `runParseWithBias` delegates to the base parse (the
32
- * bias is ignored by the fake but present so the parameter is exercised).
25
+ * Creates an offline {@link GeocoderRuntime} that extends {@link makePipelineRuntime}
26
+ * with the stub style, canned suggestions and versions.
27
+ *
28
+ * It also provides `resolveMapPlace` that gives the candidate a bounding box so overlays draw.
29
+ * The fake ignores the bias passed to `runParseWithBias`.
33
30
  */
34
31
  export function makeFakeGeocoderRuntime(overrides = {}) {
35
32
  const base = makePipelineRuntime();
@@ -51,7 +48,6 @@ export function makeFakeGeocoderRuntime(overrides = {}) {
51
48
  activeBackend: "webgpu (28 MB int8)",
52
49
  forceWASM: false,
53
50
  setForceWASM: () => { },
54
- // Enrich the selected candidate with a bbox so an outline renders (case 4: bbox → approximate circle + fit).
55
51
  resolveMapPlace: (candidate) => ({
56
52
  ...candidate,
57
53
  bbox: {
@@ -65,7 +61,8 @@ export function makeFakeGeocoderRuntime(overrides = {}) {
65
61
  };
66
62
  }
67
63
  /**
68
- * A fixed, fully-populated parse+resolve result — the shared fixture behind the pipeline runtime + the result panel.
64
+ * Creates a fixed, fully populated parse-and-resolve result for the given input,
65
+ * shared by the fake pipeline runtime and result-panel fixtures.
69
66
  */
70
67
  export function makeFakeParseResult(input = "350 5th Ave, New York, NY 10118") {
71
68
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"fake-runtime.js","sourceRoot":"","sources":["../../lib/map/fake-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC7C,OAAO,EAAE,CAAC;IACV,IAAI,EAAE,mBAAmB;IACzB,OAAO,EAAE,EAAE;IACX,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,EAAE,kBAAkB,EAAE,SAAS,EAAE,EAAE,CAAC;CAC5F,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAiB;IAC7C,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE;IAC5C,EAAE,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE;IAC/C,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE;CAC1C,CAAA;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,SAAS,GA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,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE;YACpG,EAAE,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE;SAC1F;QACD,SAAS,EAAE,IAAI;QACf,aAAa,EAAE,EAAE,OAAO,EAAE,sBAAsB,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE;KACjH,CAAA;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAS,GAA6B,EAAE;IAC3E,OAAO;QACN,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,CAAC,wBAAwB,EAAE,4BAA4B,EAAE,yBAAyB,CAAC;QACrG,YAAY,EAAE,IAAI;QAClB,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAwB,EAAE;YAC5D,OAAO,CAAC,CAAC,CAAC,CAAA;YACV,OAAO,CAAC,CAAC,CAAC,CAAA;YAEV,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAA;QAClC,CAAC;QACD,GAAG,SAAS;KACZ,CAAA;AACF,CAAC"}
@@ -2,19 +2,8 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * Pure map geometry for the geocoder demo — the resolved-place outline math, lifted verbatim from the
7
- * docs demo's `_map-helpers.ts`. Zero imports: no React, no `react-map-gl`, no `maplibre-gl`, no DOM.
8
- * Every function takes plain numbers and returns plain GeoJSON, so the whole module runs (and is
9
- * tested) under bare node — see `geometry.node.test.ts`.
10
- *
11
- * WHY NOT `@mailwoman/spatial`: the only truly-spatial primitive here is the bbox half-diagonal (a
12
- * great-circle-ish distance). `@mailwoman/spatial` exposes `haversineKm`, but ONLY via its root barrel,
13
- * which pulls `@mailwoman/core` + `h3-js` + `wkx` — a heavy, partly node-only graph — into what must
14
- * stay a lightweight, browser-only map bundle (the `@mailwoman/react/map` subpath). The original
15
- * `_map-helpers.ts` made the same call: a planar `kmPerDeg` approximation, local, no dependency. We
16
- * preserve it so the ported behavior is byte-identical and the browser graph stays clean.
17
5
  */
6
+ import type { LatLonBounds } from "@mailwoman/spatial";
18
7
  /**
19
8
  * A GeoJSON Polygon / MultiPolygon — what the polygon DB stores and the map draws as the place outline.
20
9
  */
@@ -25,39 +14,29 @@ export type PlaceGeometry = {
25
14
  type: "MultiPolygon";
26
15
  coordinates: number[][][][];
27
16
  };
28
- /**
29
- * A place bounding box in the demo's object form (the WOF points DB carries only these four numbers).
30
- */
31
- export interface PlaceBBox {
32
- minLat: number;
33
- maxLat: number;
34
- minLon: number;
35
- maxLon: number;
36
- }
37
17
  /**
38
18
  * A `[west, south, east, north]` → `[[minLon, minLat], [maxLon, maxLat]]` pair, the shape `fitBounds` wants.
39
19
  */
40
20
  export type BoundsTuple = [[number, number], [number, number]];
41
21
  /**
42
- * Approximate-extent circle for places without a crisp polygon: centered on the place point, radius from the bbox
43
- * half-diagonal (clamped 0.5–50 km). 64-point ring with latitude correction — visually a circle anywhere outside the
44
- * poles. With no bbox (anchor-centroid postcodes carry no extent) it defaults to a ~ZIP-sized 3 km radius.
22
+ * Returns a circle approximating the extent of a place that has no polygon, with a radius
23
+ * of half the bbox diagonal clamped to 0.5–50 km, or 3 km when there is no bbox.
45
24
  */
46
- export declare function approxCircleGeometry(lat: number, lon: number, bbox?: PlaceBBox): PlaceGeometry;
25
+ export declare function approxCircleGeometry(lat: number, lon: number, bbox?: LatLonBounds): PlaceGeometry;
47
26
  /**
48
- * A circle of an EXACT radius in meters — for the street-level uncertainty (#377): a 10 m situs floor or a calibrated
49
- * interp radius. Unlike {@link approxCircleGeometry} (clamped to a ~ZIP-sized 0.5 km floor for admin fallbacks), this
50
- * honors small radii so an exact building reads as a tight dot (an ~8 m floor keeps a 10 m situs circle visible).
27
+ * Returns a circle with the given radius in meters for street-level uncertainty, floored at 8 m
28
+ * so that a precise point stays visible, unlike {@link approxCircleGeometry}'s 0.5 km floor.
51
29
  */
52
30
  export declare function radiusCircleGeometry(lat: number, lon: number, radiusM: number): PlaceGeometry;
53
31
  /**
54
- * Bounding box of a Polygon / MultiPolygon, for `fitBounds`. Walks the nested coordinate arrays, so it handles both a
55
- * single-ring polygon and a multi-part polygon uniformly. Antimeridian-crossing geometry is NOT normalized (the naive
56
- * min/max is returned) — matching the ported behavior; callers that need a wrapped bbox must handle it upstream.
32
+ * Returns the bounding box of a Polygon or MultiPolygon for `fitBounds`.
33
+ *
34
+ * Geometry that crosses the antimeridian gets a naive min/max box, so callers
35
+ * that need a wrapped box must handle it themselves.
57
36
  */
58
- export declare function geomBounds(geometry: PlaceGeometry): PlaceBBox;
37
+ export declare function geomBounds(geometry: PlaceGeometry): LatLonBounds;
59
38
  /**
60
- * Reshape a {@link PlaceBBox} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
39
+ * Reshape a {@link LatLonBounds} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
61
40
  */
62
- export declare function bboxToBounds(bbox: PlaceBBox): BoundsTuple;
41
+ export declare function bboxToBounds(bbox: LatLonBounds): BoundsTuple;
63
42
  //# sourceMappingURL=geometry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../lib/map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH;;GAEG;AACH,MAAM,MAAM,aAAa,GACtB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,WAAW,EAAE,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