@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,36 +2,12 @@
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
- */
18
- /**
19
- * Segments used to approximate a circle as a polygon ring.
20
5
  */
21
6
  const CIRCLE_SEGMENTS = 64;
22
- /**
23
- * Mean km per degree of latitude (WGS84 average).
24
- */
25
7
  const KM_PER_DEG_LAT = 111.32;
26
- /**
27
- * Km per degree of longitude at a given latitude — the meridians converge toward the poles.
28
- */
29
8
  function kmPerDegLon(lat) {
30
9
  return KM_PER_DEG_LAT * Math.cos((lat * Math.PI) / 180);
31
10
  }
32
- /**
33
- * A closed 64-segment (65-point) GeoJSON ring of `radiusKM` around `[lon, lat]`, with latitude correction.
34
- */
35
11
  function circleRing(lat, lon, radiusKM) {
36
12
  const perLon = kmPerDegLon(lat);
37
13
  const ring = [];
@@ -42,9 +18,8 @@ function circleRing(lat, lon, radiusKM) {
42
18
  return ring;
43
19
  }
44
20
  /**
45
- * Approximate-extent circle for places without a crisp polygon: centered on the place point, radius from the bbox
46
- * half-diagonal (clamped 0.5–50 km). 64-point ring with latitude correction — visually a circle anywhere outside the
47
- * poles. With no bbox (anchor-centroid postcodes carry no extent) it defaults to a ~ZIP-sized 3 km radius.
21
+ * Returns a circle approximating the extent of a place that has no polygon, with a radius
22
+ * of half the bbox diagonal clamped to 0.5–50 km, or 3 km when there is no bbox.
48
23
  */
49
24
  export function approxCircleGeometry(lat, lon, bbox) {
50
25
  const halfDiagKm = bbox
@@ -54,18 +29,18 @@ export function approxCircleGeometry(lat, lon, bbox) {
54
29
  return { type: "Polygon", coordinates: [circleRing(lat, lon, radiusKM)] };
55
30
  }
56
31
  /**
57
- * A circle of an EXACT radius in meters — for the street-level uncertainty (#377): a 10 m situs floor or a calibrated
58
- * interp radius. Unlike {@link approxCircleGeometry} (clamped to a ~ZIP-sized 0.5 km floor for admin fallbacks), this
59
- * honors small radii so an exact building reads as a tight dot (an ~8 m floor keeps a 10 m situs circle visible).
32
+ * Returns a circle with the given radius in meters for street-level uncertainty, floored at 8 m
33
+ * so that a precise point stays visible, unlike {@link approxCircleGeometry}'s 0.5 km floor.
60
34
  */
61
35
  export function radiusCircleGeometry(lat, lon, radiusM) {
62
36
  const radiusKM = Math.max(0.008, radiusM / 1000);
63
37
  return { type: "Polygon", coordinates: [circleRing(lat, lon, radiusKM)] };
64
38
  }
65
39
  /**
66
- * Bounding box of a Polygon / MultiPolygon, for `fitBounds`. Walks the nested coordinate arrays, so it handles both a
67
- * single-ring polygon and a multi-part polygon uniformly. Antimeridian-crossing geometry is NOT normalized (the naive
68
- * min/max is returned) — matching the ported behavior; callers that need a wrapped bbox must handle it upstream.
40
+ * Returns the bounding box of a Polygon or MultiPolygon for `fitBounds`.
41
+ *
42
+ * Geometry that crosses the antimeridian gets a naive min/max box, so callers
43
+ * that need a wrapped box must handle it themselves.
69
44
  */
70
45
  export function geomBounds(geometry) {
71
46
  let minLon = Infinity;
@@ -100,7 +75,7 @@ export function geomBounds(geometry) {
100
75
  return { minLon, minLat, maxLon, maxLat };
101
76
  }
102
77
  /**
103
- * Reshape a {@link PlaceBBox} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
78
+ * Reshape a {@link LatLonBounds} into the `[[minLon, minLat], [maxLon, maxLat]]` pair `fitBounds` expects.
104
79
  */
105
80
  export function bboxToBounds(bbox) {
106
81
  return [
@@ -1 +1 @@
1
- {"version":3,"file":"geometry.js","sourceRoot":"","sources":["../../lib/map/geometry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;GAEG;AACH,MAAM,eAAe,GAAG,EAAE,CAAA;AAE1B;;GAEG;AACH,MAAM,cAAc,GAAG,MAAM,CAAA;AAwB7B;;GAEG;AACH,SAAS,WAAW,CAAC,GAAW;IAC/B,OAAO,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAA;AACxD,CAAC;AAED;;GAEG;AACH,SAAS,UAAU,CAAC,GAAW,EAAE,GAAW,EAAE,QAAgB;IAC7D,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAA;IAC/B,MAAM,IAAI,GAAe,EAAE,CAAA;IAE3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,eAAe,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAEpC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,GAAG,CAA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AAW,IAAI,CAAC,CAAC,CAAC,CAAA;YAE3B,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,CAAA;YACb,CAAC;YAED,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,CAAA;YACb,CAAC;YAED,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,CAAA;YACb,CAAC;YAED,IAAI,GAAG,GAAG,MAAM,EAAE,CAAC;gBAClB,MAAM,GAAG,GAAG,CAAA;YACb,CAAC;YAED,OAAM;QACP,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;gBAC1B,KAAK,CAAC,KAAK,CAAC,CAAA;YACb,CAAC;QACF,CAAC;IACF,CAAC,CAAA;IAED,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAA;IAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAkB;IAC9C,OAAO;QACN,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAC1B,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;KAC1B,CAAA;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The graticule's geometry, apart from its component — the same split `place-render.ts` keeps from
7
+ * `ResolvedPlaceLayers.tsx`. Pure and node-testable; `#*` resolves `.ts` only, so this is also the file the test can
8
+ * import.
9
+ */
10
+ import type { FeatureCollection, MultiLineString } from "geojson";
11
+ /**
12
+ * Build the graticule as one MultiLineString.
13
+ *
14
+ * Pure — same step, same geometry — so it is built once at module scope and never rebuilt for a render.
15
+ */
16
+ export declare function buildGraticule(stepDegrees?: number): FeatureCollection<MultiLineString>;
17
+ //# sourceMappingURL=graticule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graticule.d.ts","sourceRoot":"","sources":["../../lib/map/graticule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAgCjE;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,WAAW,GAAE,MAA6B,GAAG,iBAAiB,CAAC,eAAe,CAAC,CAgC7G"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The graticule's geometry, apart from its component — the same split `place-render.ts` keeps from
7
+ * `ResolvedPlaceLayers.tsx`. Pure and node-testable; `#*` resolves `.ts` only, so this is also the file the test can
8
+ * import.
9
+ */
10
+ /**
11
+ * Degrees between grid lines. 15° is one hour of longitude — twelve meridians and eleven
12
+ * parallels, dense enough to read as a globe and sparse enough not to read as graph paper.
13
+ */
14
+ const DEFAULT_STEP_DEGREES = 15;
15
+ /**
16
+ * Degrees between vertices along each line.
17
+ *
18
+ * A meridian drawn as two points is a straight chord through the sphere under a globe projection.
19
+ * It has to be densified to curve. 2° keeps the longest line under 100 vertices.
20
+ */
21
+ /**
22
+ * The antimeridian, in degrees.
23
+ *
24
+ * Longitude runs [-180, 180]; meridians are drawn from the first bound up to but not including
25
+ * the second, because -180 and 180 are the same line and drawing both puts two strokes on one pixel.
26
+ */
27
+ const MAX_LONGITUDE = 180;
28
+ const VERTEX_STEP_DEGREES = 2;
29
+ /**
30
+ * The latitude the parallels stop at.
31
+ *
32
+ * Past ~85° the meridians have converged close enough that more rings read as a smudge at the pole.
33
+ * Web Mercator's own limit is 85.051129.
34
+ */
35
+ const MAX_LATITUDE = 85;
36
+ /**
37
+ * Build the graticule as one MultiLineString.
38
+ *
39
+ * Pure — same step, same geometry — so it is built once at module scope and never rebuilt for a render.
40
+ */
41
+ export function buildGraticule(stepDegrees = DEFAULT_STEP_DEGREES) {
42
+ const lines = [];
43
+ // Meridians: constant longitude, walking latitude pole to pole.
44
+ for (let lon = -MAX_LONGITUDE; lon < MAX_LONGITUDE; lon += stepDegrees) {
45
+ const line = [];
46
+ for (let lat = -MAX_LATITUDE; lat <= MAX_LATITUDE; lat += VERTEX_STEP_DEGREES) {
47
+ line.push([lon, lat]);
48
+ }
49
+ line.push([lon, MAX_LATITUDE]);
50
+ lines.push(line);
51
+ }
52
+ // Parallels: constant latitude, walking longitude all the way round.
53
+ // The equator is included.
54
+ // The poles are not.
55
+ for (let lat = -MAX_LATITUDE + stepDegrees; lat < MAX_LATITUDE; lat += stepDegrees) {
56
+ const line = [];
57
+ for (let lon = -MAX_LONGITUDE; lon <= MAX_LONGITUDE; lon += VERTEX_STEP_DEGREES) {
58
+ line.push([lon, lat]);
59
+ }
60
+ lines.push(line);
61
+ }
62
+ return {
63
+ type: "FeatureCollection",
64
+ features: [{ type: "Feature", properties: {}, geometry: { type: "MultiLineString", coordinates: lines } }],
65
+ };
66
+ }
67
+ //# sourceMappingURL=graticule.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graticule.js","sourceRoot":"","sources":["../../lib/map/graticule.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH;;;GAGG;AACH,MAAM,oBAAoB,GAAG,EAAE,CAAA;AAE/B;;;;;GAKG;AACH;;;;;GAKG;AACH,MAAM,aAAa,GAAG,GAAG,CAAA;AAEzB,MAAM,mBAAmB,GAAG,CAAC,CAAA;AAE7B;;;;;GAKG;AACH,MAAM,YAAY,GAAG,EAAE,CAAA;AAEvB;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,WAAW,GAAW,oBAAoB;IACxE,MAAM,KAAK,GAAiB,EAAE,CAAA;IAE9B,gEAAgE;IAChE,KAAK,IAAI,GAAG,GAAG,CAAC,aAAa,EAAE,GAAG,GAAG,aAAa,EAAE,GAAG,IAAI,WAAW,EAAE,CAAC;QACxE,MAAM,IAAI,GAAe,EAAE,CAAA;QAE3B,KAAK,IAAI,GAAG,GAAG,CAAC,YAAY,EAAE,GAAG,IAAI,YAAY,EAAE,GAAG,IAAI,mBAAmB,EAAE,CAAC;YAC/E,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;QACtB,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC,CAAA;QAC9B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACjB,CAAC;IAED,qEAAqE;IACrE,2BAA2B;IAC3B,qBAAqB;IACrB,KAAK,IAAI,GAAG,GAAG,CAAC,YAAY,GAAG,WAAW,EAAE,GAAG,GAAG,YAAY,EAAE,GAAG,IAAI,WAAW,EAAE,CAAC;QACpF,MAAM,IAAI,GAAe,EAAE,CAAA;QAE3B,KAAK,IAAI,GAAG,GAAG,CAAC,aAAa,EAAE,GAAG,IAAI,aAAa,EAAE,GAAG,IAAI,mBAAmB,EAAE,CAAC;YACjF,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,CAAA;QACtB,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACjB,CAAC;IAED,OAAO;QACN,IAAI,EAAE,mBAAmB;QACzB,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,CAAC;KAC1G,CAAA;AACF,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * @file The bare MapLibre control both debug panels portal into.
6
6
  *
7
7
  * `DashboardMap`'s inspector and the demo page's `_debug.tsx` panel each need an `IControl` whose
8
- * only job is to own a container element for `createPortal`. The class was duplicated in both;
8
+ * only job is to own a container element for `createPortal`. The class was duplicated in both.
9
9
  * the position and container class are the only differences, so they are parameters here.
10
10
  */
11
11
  import type { ControlPosition } from "maplibre-gl";
@@ -5,7 +5,7 @@
5
5
  * @file The bare MapLibre control both debug panels portal into.
6
6
  *
7
7
  * `DashboardMap`'s inspector and the demo page's `_debug.tsx` panel each need an `IControl` whose
8
- * only job is to own a container element for `createPortal`. The class was duplicated in both;
8
+ * only job is to own a container element for `createPortal`. The class was duplicated in both.
9
9
  * the position and container class are the only differences, so they are parameters here.
10
10
  */
11
11
  export class DebugControlBase {
@@ -2,60 +2,45 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `computeMapPlaceRenderSpec` — the PURE core that replaces the docs demo's ~100-line imperative
7
- * marker/bbox/camera redraw effect (`_app.tsx:601-705`). It takes an ALREADY-RESOLVED place (the async
8
- * polygon-DB fetch is a host/runtime concern — a later phase — so a crisp polygon arrives pre-fetched
9
- * as `place.geometry`) and returns a declarative render spec: the marker position(s), the outline
10
- * geometry to draw, and the camera target. No map instance, no DOM, no `react-map-gl` — so it is
11
- * node-testable (see `place-render.node.test.ts`). The declarative components in this folder render
12
- * the spec; a controlled-viewport consumer applies the camera.
13
- *
14
- * The decision cascade is a faithful, side-effect-free transcription of the imperative effect:
15
- * 1. street tier (situs / interp) → exact-radius circle, fly to a tight zoom
16
- * 2. crisp admin polygon (pre-fetched) → draw the polygon, fit its bounds
17
- * 3. anchor-centroid postcode (no bbox) → ~3 km "around here" circle, fly to zoom 11
18
- * 4. bbox with real extent → bbox-sized approximate circle, fit the bbox
19
- * 5. bare point → no outline, fly to zoom 12
20
5
  */
21
6
  import type { ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result";
22
- import type { BoundsTuple, PlaceBBox, PlaceGeometry } from "#map/geometry";
7
+ import type { LatLonBounds } from "@mailwoman/spatial";
8
+ import type { BoundsTuple, PlaceGeometry } from "#map/geometry";
23
9
  /**
24
- * `[longitude, latitude]`.
10
+ * A coordinate pair as `[longitude, latitude]`.
25
11
  */
26
12
  export type LngLat = [number, number];
27
13
  /**
28
- * The street-level resolution tier (#377): `address_point` = exact building; `interpolated` = TIGER estimate.
14
+ * How a street-level result was located: `address_point` is an exact building point
15
+ * and `interpolated` an estimate from a TIGER address range.
29
16
  */
30
17
  export type PlaceTier = "address_point" | "interpolated";
31
18
  /**
32
- * The resolved-place shape the map render consumes — the pipeline {@link ResolvedPlaceView} plus the map-only extras the
33
- * demo's `ResolvedHit` carries (bbox, street tier + uncertainty), and an optional PRE-FETCHED crisp polygon. Extending
34
- * `ResolvedPlaceView` keeps the map render aligned with the shared parse result; the extras are additive.
19
+ * A resolved place with the extra fields the map uses to draw it.
35
20
  */
36
21
  export interface ResolvedMapPlace extends ResolvedPlaceView {
37
22
  /**
38
- * The place's bounding box, when the gazetteer carries one (admin places). Absent for anchor-centroid postcodes.
23
+ * The place's bounding box.
24
+ * Postcodes located by an anchor centroid have none.
39
25
  */
40
- bbox?: PlaceBBox;
26
+ bbox?: LatLonBounds;
41
27
  /**
42
- * Street-level tier, when this hit came from the situs/interp tier rather than the WOF admin cascade.
28
+ * The street-level tier, set only for results from address points or interpolation.
43
29
  */
44
30
  tier?: PlaceTier;
45
31
  /**
46
- * Honest uncertainty radius in meters for a street-level tier (10 m situs floor; calibrated interp).
32
+ * The uncertainty radius in meters of a street-level result, drawn as a circle when `tier` is set.
47
33
  */
48
34
  uncertaintyM?: number;
49
35
  /**
50
- * The crisp admin polygon, when the host has ALREADY fetched it from the sibling polygon DB. Its presence drives the
51
- * polygon path; the async fetch itself stays out of this pure function (a runtime concern in a later phase).
36
+ * The admin polygon, if the host has already fetched it.
37
+ * When present the outline and camera follow it.
52
38
  */
53
39
  geometry?: PlaceGeometry;
54
40
  }
55
41
  /**
56
- * The camera target the render computes. `center` (fly to a point at a zoom) HAS a declarative equivalent — a consumer
57
- * can feed it to a controlled `viewState` (see {@link cameraToViewState}). `bounds` (fit a box with pixel padding) does
58
- * NOT — `fitBounds` needs the map's pixel dimensions, so it is applied imperatively by `<ResultCamera>`.
42
+ * Only a `center` target can be applied declaratively through {@link cameraToViewState};
43
+ * fitting bounds needs the map's pixel size, so `<ResultCamera>` applies it imperatively.
59
44
  */
60
45
  export type MapCameraTarget = {
61
46
  kind: "center";
@@ -67,33 +52,28 @@ export type MapCameraTarget = {
67
52
  padding: number;
68
53
  };
69
54
  /**
70
- * The declarative render spec for one resolved place — the pure output of {@link computeMapPlaceRenderSpec}.
55
+ * The markers, outline and camera target for one resolved place, as returned
56
+ * by {@link computeMapPlaceRenderSpec}.
71
57
  */
72
58
  export interface MapPlaceRenderSpec {
73
59
  /**
74
- * Marker position(s) as `[lon, lat]`. Single-element today; an array leaves room for multi-marker later.
60
+ * The marker positions as `[lon, lat]`; there is always exactly one marker.
75
61
  */
76
62
  markers: LngLat[];
77
63
  /**
78
- * The outline geometry (polygon / circle) to draw, or `null` when the place renders as a bare point.
64
+ * The polygon or circle outline to draw, or `null` when the place renders as a bare point.
79
65
  */
80
66
  outline: PlaceGeometry | null;
81
- /**
82
- * The camera target — animate or fit to this.
83
- */
84
67
  camera: MapCameraTarget;
85
68
  }
86
69
  /**
87
- * Map a resolved place to its declarative render spec. Pure — same input, same output, no side effects. The `place`
88
- * arrives fully resolved (crisp polygon pre-fetched into `place.geometry` when available), so this is the honest
89
- * inverse of the old redraw effect with the imperative map mutation and the async DB load removed.
70
+ * Computes the markers, outline and camera target for a resolved place without loading data,
71
+ * so the caller must put any fetched polygon in `place.geometry` first.
90
72
  */
91
73
  export declare function computeMapPlaceRenderSpec(place: ResolvedMapPlace): MapPlaceRenderSpec;
92
74
  /**
93
- * The DECLARATIVE camera path: reshape a `center` target into a `viewState` patch a controlled `<MapCanvas viewState>`
94
- * can apply directly (a hard jump, no animation). Returns `null` for a `bounds` target — fitting a box to the viewport
95
- * needs the map's pixel dimensions, which only the live map has, so that case is applied imperatively by
96
- * `<ResultCamera>`. Pure + node-testable.
75
+ * Converts a `center` camera target into a `viewState` patch for a controlled `<MapCanvas>`,
76
+ * returning `null` for a `bounds` target that `<ResultCamera>` must fit imperatively.
97
77
  */
98
78
  export declare function cameraToViewState(camera: MapCameraTarget): {
99
79
  longitude: number;
@@ -1 +1 @@
1
- {"version":3,"file":"place-render.d.ts","sourceRoot":"","sources":["../../lib/map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAG/E,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAE1E;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErC;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,cAAc,CAAA;AAExD;;;;GAIG;AACH,MAAM,WAAW,gBAAiB,SAAQ,iBAAiB;IAC1D;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB;;OAEG;IACH,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AE,WAAW,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3D;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAA;IAEjB;;OAEG;IACH,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAE7B,MAAM,EAAE,eAAe,CAAA;CACvB;AAaD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,gBAAgB,GAAG,kBAAkB,CA8CrF;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,MAAM,EAAE,eAAe,GACrB;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAI9D"}
@@ -2,49 +2,22 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `computeMapPlaceRenderSpec` — the PURE core that replaces the docs demo's ~100-line imperative
7
- * marker/bbox/camera redraw effect (`_app.tsx:601-705`). It takes an ALREADY-RESOLVED place (the async
8
- * polygon-DB fetch is a host/runtime concern — a later phase — so a crisp polygon arrives pre-fetched
9
- * as `place.geometry`) and returns a declarative render spec: the marker position(s), the outline
10
- * geometry to draw, and the camera target. No map instance, no DOM, no `react-map-gl` — so it is
11
- * node-testable (see `place-render.node.test.ts`). The declarative components in this folder render
12
- * the spec; a controlled-viewport consumer applies the camera.
13
- *
14
- * The decision cascade is a faithful, side-effect-free transcription of the imperative effect:
15
- * 1. street tier (situs / interp) → exact-radius circle, fly to a tight zoom
16
- * 2. crisp admin polygon (pre-fetched) → draw the polygon, fit its bounds
17
- * 3. anchor-centroid postcode (no bbox) → ~3 km "around here" circle, fly to zoom 11
18
- * 4. bbox with real extent → bbox-sized approximate circle, fit the bbox
19
- * 5. bare point → no outline, fly to zoom 12
20
5
  */
21
6
  import { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "#map/geometry";
22
- /**
23
- * Zoom levels the imperative effect flew to, kept named so the cascade reads as intent, not magic numbers.
24
- */
25
7
  const ZOOM = {
26
8
  addressPoint: 17,
27
9
  interpolated: 15,
28
10
  postcode: 11,
29
11
  point: 12,
30
12
  };
31
- /**
32
- * Padding (px) `fitBounds` insets a fitted box by, matching the ported effect.
33
- */
34
13
  const FIT_PADDING = 40;
35
- /**
36
- * The minimum lat/lon span (degrees) a bbox must exceed to be treated as a real extent rather than a point.
37
- */
38
14
  const MIN_EXTENT_DEG = 0.001;
39
15
  /**
40
- * Map a resolved place to its declarative render spec. Pure — same input, same output, no side effects. The `place`
41
- * arrives fully resolved (crisp polygon pre-fetched into `place.geometry` when available), so this is the honest
42
- * inverse of the old redraw effect with the imperative map mutation and the async DB load removed.
16
+ * Computes the markers, outline and camera target for a resolved place without loading data,
17
+ * so the caller must put any fetched polygon in `place.geometry` first.
43
18
  */
44
19
  export function computeMapPlaceRenderSpec(place) {
45
20
  const markers = [[place.lon, place.lat]];
46
- // 1. Street tier (#377): the honest uncertainty circle (exact meter radius) + a tight zoom. Takes precedence over
47
- // the admin polygon/bbox paths — a precise point gets no admin boundary.
48
21
  if (place.tier && place.uncertaintyM != null) {
49
22
  return {
50
23
  markers,
@@ -56,7 +29,6 @@ export function computeMapPlaceRenderSpec(place) {
56
29
  },
57
30
  };
58
31
  }
59
- // 2. Crisp admin polygon (host pre-fetched it from the polygon DB) — draw the real boundary and fit it.
60
32
  if (place.geometry) {
61
33
  return {
62
34
  markers,
@@ -64,8 +36,6 @@ export function computeMapPlaceRenderSpec(place) {
64
36
  camera: { kind: "bounds", bounds: bboxToBounds(geomBounds(place.geometry)), padding: FIT_PADDING },
65
37
  };
66
38
  }
67
- // 3. Anchor-centroid postcode: no bbox, no polygon — a default ~3 km circle says "approximately here" without
68
- // inventing a boundary.
69
39
  if (!place.bbox && place.placetype === "postcode") {
70
40
  return {
71
41
  markers,
@@ -73,8 +43,6 @@ export function computeMapPlaceRenderSpec(place) {
73
43
  camera: { kind: "center", center: [place.lon, place.lat], zoom: ZOOM.postcode },
74
44
  };
75
45
  }
76
- // 4. A bbox with real extent — draw an approximate CIRCLE sized from the bbox (a rectangle would read as a wrong,
77
- // real boundary) and fit the bbox.
78
46
  const bbox = place.bbox;
79
47
  if (bbox && Math.max(bbox.maxLat - bbox.minLat, bbox.maxLon - bbox.minLon) > MIN_EXTENT_DEG) {
80
48
  return {
@@ -83,7 +51,6 @@ export function computeMapPlaceRenderSpec(place) {
83
51
  camera: { kind: "bounds", bounds: bboxToBounds(bbox), padding: FIT_PADDING },
84
52
  };
85
53
  }
86
- // 5. A bare point (no tier, no polygon, no meaningful bbox) — just a marker and a mid zoom.
87
54
  return {
88
55
  markers,
89
56
  outline: null,
@@ -91,10 +58,8 @@ export function computeMapPlaceRenderSpec(place) {
91
58
  };
92
59
  }
93
60
  /**
94
- * The DECLARATIVE camera path: reshape a `center` target into a `viewState` patch a controlled `<MapCanvas viewState>`
95
- * can apply directly (a hard jump, no animation). Returns `null` for a `bounds` target — fitting a box to the viewport
96
- * needs the map's pixel dimensions, which only the live map has, so that case is applied imperatively by
97
- * `<ResultCamera>`. Pure + node-testable.
61
+ * Converts a `center` camera target into a `viewState` patch for a controlled `<MapCanvas>`,
62
+ * returning `null` for a `bounds` target that `<ResultCamera>` must fit imperatively.
98
63
  */
99
64
  export function cameraToViewState(camera) {
100
65
  if (camera.kind !== "center")
@@ -1 +1 @@
1
- {"version":3,"file":"place-render.js","sourceRoot":"","sources":["../../lib/map/place-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAiEpG;;GAEG;AACH,MAAM,IAAI,GAAG;IACZ,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,QAAQ,EAAE,EAAE;IACZ,K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