@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
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Draws a grid of meridians and parallels under the basemap so that the globe is readable while
7
+ * tiles load. Loaded tiles cover the grid.
8
+ */
9
+
10
+ import { type ReactNode, useMemo } from "react"
11
+ import { Layer, Source } from "react-map-gl/maplibre"
12
+
13
+ import { buildGraticule } from "./graticule.ts"
14
+
15
+ /**
16
+ * Props for {@link GraticuleLayer}.
17
+ */
18
+ export interface GraticuleLayerProps {
19
+ /**
20
+ * The basemap layer to draw the grid beneath.
21
+ * Without it, the grid is drawn on top.
22
+ */
23
+ beforeID?: string
24
+ /**
25
+ * Hides the grid. @default false
26
+ */
27
+ hidden?: boolean
28
+ }
29
+
30
+ /**
31
+ * Renders the graticule source and line layer.
32
+ */
33
+ export function GraticuleLayer({ beforeID, hidden = false }: GraticuleLayerProps): ReactNode {
34
+ const data = useMemo(() => buildGraticule(), [])
35
+
36
+ return (
37
+ <>
38
+ <Source id="mw-graticule" type="geojson" data={data} />
39
+ <Layer
40
+ id="mw-graticule-line"
41
+ type="line"
42
+ source="mw-graticule"
43
+ {...(beforeID ? { beforeId: beforeID } : {})}
44
+ layout={{ visibility: hidden ? "none" : "visible", "line-cap": "round" }}
45
+ paint={{
46
+ "line-color": "#8aa0c8",
47
+ // The grid fades out by zoom 8, where map detail makes it unnecessary.
48
+ "line-opacity": ["interpolate", ["linear"], ["zoom"], 0, 0.3, 3, 0.2, 6, 0.09, 8, 0],
49
+ "line-width": ["interpolate", ["linear"], ["zoom"], 0, 0.5, 4, 0.75],
50
+ }}
51
+ />
52
+ </>
53
+ )
54
+ }
@@ -5,18 +5,18 @@
5
5
  *
6
6
  * `<MapCanvas>` — the declarative map shell for the geocoder demo, over `react-map-gl/maplibre` (v8).
7
7
  * Phase 1 is the shell only: a `<Map>` that takes a host-composed `mapStyle`, an initial (or
8
- * controlled) view state, and a `children` slot for the overlays/markers that land in later phases.
8
+ * controlled) view state and a `children` slot for overlays/markers from later phases.
9
9
  * No overlay/marker/camera logic lives here yet.
10
10
  *
11
- * NODE-IMPORT SAFETY: this module imports `react-map-gl/maplibre` (which pulls `maplibre-gl` — WebGL
12
- * + DOM at import) at module scope, so it is reachable ONLY through the `@mailwoman/react/map`
11
+ * node-import safety: this module imports `react-map-gl/maplibre` (which pulls `maplibre-gl` — WebGL
12
+ * + DOM at import) at module scope, so it is reachable only through the `@mailwoman/react/map`
13
13
  * subpath, never from the package root (`index.ts`). The bare `import("@mailwoman/react")` a node
14
14
  * consumer (or the CI smoke IMPORT_CHECK) runs must never transitively load this file. Keep it out of
15
15
  * the root barrel.
16
16
  *
17
17
  * CSS: the package imports no CSS from its modules (the node-safe invariant), so a host that renders
18
18
  * `<MapCanvas>` must import `maplibre-gl/dist/maplibre-gl.css` itself (plus `@mailwoman/react/styles.css`
19
- * for the `.mw-demo-map` container). `<MapCanvas>` is intrinsically a client component — a host that
19
+ * for the `.mw-demo-map` container). `<MapCanvas>` is intrinsically a client component. A host that
20
20
  * server-renders should wrap it in a client boundary (the package's `ClientOnly`), exactly as the
21
21
  * composed `Geocoder` will in a later phase.
22
22
  */
@@ -31,8 +31,10 @@ import type { MapProps, MapRef, ViewStateChangeEvent } from "react-map-gl/maplib
31
31
  export type MapCanvasStyle = NonNullable<MapProps["mapStyle"]>
32
32
 
33
33
  /**
34
- * Override for the `<Map>` props `<MapCanvas>` does not surface explicitly (e.g. `minZoom`, `attributionControl`,
35
- * `maplibreLogo`). The controlled fields MapCanvas owns are omitted so they can't be set twice.
34
+ * Override for the `<Map>` props `<MapCanvas>` does not surface explicitly
35
+ * (e.g. `minZoom`, `attributionControl`, `maplibreLogo`).
36
+ *
37
+ * The controlled fields MapCanvas owns are omitted so they can't be set twice.
36
38
  */
37
39
  export type MapCanvasExtraProps = Partial<
38
40
  Omit<MapProps, "mapStyle" | "initialViewState" | "viewState" | "onMove" | "children" | "style" | "ref">
@@ -44,11 +46,15 @@ export interface MapCanvasProps {
44
46
  */
45
47
  mapStyle: MapCanvasStyle
46
48
  /**
47
- * Uncontrolled initial camera. Use this OR `viewState`, not both.
49
+ * Uncontrolled initial camera.
50
+ *
51
+ * Use this or `viewState`, not both.
48
52
  */
49
53
  initialViewState?: MapProps["initialViewState"]
50
54
  /**
51
- * Controlled camera. Pair with `onMove` to persist it.
55
+ * Controlled camera.
56
+ *
57
+ * Pair with `onMove` to persist it.
52
58
  */
53
59
  viewState?: MapProps["viewState"]
54
60
  /**
@@ -64,7 +70,9 @@ export interface MapCanvasProps {
64
70
  */
65
71
  mapRef?: Ref<MapRef>
66
72
  /**
67
- * Overlays, markers, and controls — rendered as `<Map>` children. Empty in phase 1.
73
+ * Overlays, markers and controls — rendered as `<Map>` children.
74
+ *
75
+ * Empty in phase 1.
68
76
  */
69
77
  children?: ReactNode
70
78
  /**
@@ -76,7 +84,7 @@ export interface MapCanvasProps {
76
84
  */
77
85
  style?: CSSProperties
78
86
  /**
79
- * Remaining `<Map>` props MapCanvas does not surface explicitly.
87
+ * Other `<Map>` props that MapCanvas does not surface explicitly.
80
88
  */
81
89
  mapProps?: MapCanvasExtraProps
82
90
  }
@@ -84,8 +92,11 @@ export interface MapCanvasProps {
84
92
  const FILL: CSSProperties = { width: "100%", height: "100%" }
85
93
 
86
94
  /**
87
- * The controlled-viewport map shell. Renders a sized wrapper around a `react-map-gl/maplibre` `<Map>`; everything
88
- * host-specific (the composed `mapStyle`, the initial center) is injected, and overlays ride in as `children`.
95
+ * The controlled-viewport map shell.
96
+ *
97
+ * Renders a sized wrapper around a `react-map-gl/maplibre` `<Map>`; everything
98
+ * host-specific (the composed `mapStyle`, the initial center) is injected.
99
+ * Overlays arrive as `children`.
89
100
  */
90
101
  export function MapCanvas({
91
102
  mapStyle,
@@ -3,13 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapChipRow>` — the row of example queries under a search bar.
7
- *
8
- * It SCROLLS horizontally and never wraps. Earth's twelve examples wrapped down five ragged rows (3/3/2/1/1/1) and
9
- * took a third of the panel; one scrolling line is the shape the reference map apps use, and it costs a fixed
10
- * height whatever the number of examples.
11
- *
12
- * NODE-SAFE: pure React, no maplibre.
6
+ * Render example-query chips in a single horizontally scrollable row.
13
7
  */
14
8
 
15
9
  import type { ReactNode } from "react"
@@ -22,7 +16,9 @@ export interface MapChip {
22
16
  */
23
17
  label: string
24
18
  /**
25
- * The query the chip stands for, handed back on press. Defaults to the label.
19
+ * The query the chip stands for, handed back on press.
20
+ *
21
+ * Defaults to the label.
26
22
  */
27
23
  value?: string
28
24
  /**
@@ -3,24 +3,8 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapCompass>` — the needle that appears when the map leaves north and fades out when it returns.
7
- *
8
- * It is a compass ROSE, the way the reference map apps draw it: a ringed dial carrying a two-tone needle whose red
9
- * half points north and whose pale half points south. A single-color arrow cannot say which end is north, so a
10
- * reader has to already know the convention to read it; two tones say it outright. There is no `N` on the dial —
11
- * at this size the letter and the needle's north tip want the same few pixels, and the tip is the clearer of them.
12
- *
13
- * The whole dial counter-rotates the bearing, so the needle keeps pointing at true north while the map turns under
14
- * it. Pressing it returns the map to north, which is why the control is a button rather than an ornament.
15
- *
16
- * It stays mounted through the fade rather than unmounting on the bearing crossing zero, because a control that
17
- * vanishes mid-gesture is the thing that reads as a glitch. `HIDE_BELOW_DEGREES` is the dead zone: a map settled by
18
- * a snap-to-north lands a fraction off zero, and a compass that lingers over that fraction never goes away.
19
- *
20
- * Under `prefers-reduced-motion` it appears and disappears with no transition, and the dial still rotates —
21
- * rotation IS the information, not decoration.
22
- *
23
- * NODE-SAFE: pure React, no maplibre. The host reads the bearing off its own map and passes it in.
6
+ * Shows a compass that rotates with the map bearing and hides when the map faces north. A press
7
+ * it asks the host to reset the bearing.
24
8
  */
25
9
 
26
10
  import type { ReactNode } from "react"
@@ -28,17 +12,22 @@ import type { ReactNode } from "react"
28
12
  import { cx } from "#common/cx"
29
13
 
30
14
  /**
31
- * Below this many degrees off north the compass is treated as pointing north and fades out.
15
+ * The compass counts as facing north below this bearing.
16
+ * It fades out below the same threshold.
32
17
  */
33
18
  const HIDE_BELOW_DEGREES = 0.5
34
19
 
20
+ /**
21
+ * Props for {@link MapCompass}.
22
+ */
35
23
  export interface MapCompassProps {
36
24
  /**
37
- * The map's bearing in degrees, as MapLibre reports it: 0 is north, positive is counter-clockwise.
25
+ * The map's bearing in degrees as MapLibre reports it, where 0 is north.
38
26
  */
39
27
  bearing: number
40
28
  /**
41
- * Fired when the compass is pressed — the host resets its map to north.
29
+ * Called when the compass is pressed.
30
+ * The host should reset its map to north.
42
31
  */
43
32
  onResetNorth: () => void
44
33
  /**
@@ -48,6 +37,9 @@ export interface MapCompassProps {
48
37
  className?: string
49
38
  }
50
39
 
40
+ /**
41
+ * Renders the compass button.
42
+ */
51
43
  export function MapCompass({ bearing, onResetNorth, label, className }: MapCompassProps): ReactNode {
52
44
  const facingNorth = Math.abs(bearing) < HIDE_BELOW_DEGREES
53
45
 
@@ -57,8 +49,7 @@ export function MapCompass({ bearing, onResetNorth, label, className }: MapCompa
57
49
  className={cx("mw-map-compass", facingNorth && "mw-map-compass--north", className)}
58
50
  aria-label={label ?? "Reset bearing to north"}
59
51
  title={label ?? "Reset bearing to north"}
60
- // Out of the tab order and out of the accessibility tree while it is invisible, so a keyboard reaches only
61
- // the controls a pointer can see.
52
+ // The hidden compass leaves the tab order and the accessibility tree.
62
53
  aria-hidden={facingNorth}
63
54
  tabIndex={facingNorth ? -1 : 0}
64
55
  onClick={onResetNorth}
@@ -67,7 +58,7 @@ export function MapCompass({ bearing, onResetNorth, label, className }: MapCompa
67
58
  <g style={{ transform: `rotate(${-bearing}deg)`, transformOrigin: "16px 16px" }}>
68
59
  <circle cx="16" cy="16" r="12.5" className="mw-map-compass__dial" />
69
60
 
70
- {/* North, then south. Two triangles meeting at the hub rather than one arrow through it. */}
61
+ {/* The north needle, then the south needle. */}
71
62
  <path d="M16 5.5 L20.5 16 L16 16 Z M16 5.5 L11.5 16 L16 16 Z" className="mw-map-compass__north" />
72
63
  <path d="M16 26.5 L20.5 16 L16 16 Z M16 26.5 L11.5 16 L16 16 Z" className="mw-map-compass__south" />
73
64
  </g>
@@ -3,13 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapControlStack>` — the column of map controls down one edge, and `<MapControlButton>`, the control inside it.
7
- *
8
- * Controls sit in GROUPS: a group is one glass capsule with hairlines between its buttons, and separate groups are
9
- * separate capsules with a gap. That grouping is the whole layout idea — related controls read as one object, and
10
- * an unrelated one (a compass that comes and goes) does not join a capsule it would resize.
11
- *
12
- * NODE-SAFE: pure React, no maplibre.
6
+ * Provide accessible map-control buttons arranged in grouped capsules.
13
7
  */
14
8
 
15
9
  import type { ReactNode } from "react"
@@ -22,7 +16,9 @@ export interface MapControlButtonProps {
22
16
  */
23
17
  children: ReactNode
24
18
  /**
25
- * The control's accessible name. Required: the visible content is a mark, not a word.
19
+ * The control's accessible name.
20
+ *
21
+ * Required: the visible content is a mark rather than a word.
26
22
  */
27
23
  label: string
28
24
  onPress: () => void
@@ -63,7 +59,10 @@ export interface MapControlGroupProps {
63
59
  }
64
60
 
65
61
  /**
66
- * One capsule. Put related controls in the same group; give an unrelated one its own.
62
+ * One capsule.
63
+ *
64
+ * Put related controls in the same group.
65
+ * Give an unrelated one its own.
67
66
  */
68
67
  export function MapControlGroup({ children, className }: MapControlGroupProps): ReactNode {
69
68
  return <div className={cx("mw-map-control-group", className)}>{children}</div>
@@ -2,19 +2,6 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * `<MapFooter>` — the strip along the bottom of a map: identity and load status on the left, an attribution button
7
- * on the right.
8
- *
9
- * Attribution is a licence obligation for every source these apps draw, so it is a first-class slot rather than
10
- * something an app remembers to add. It sits behind a button because the strip has to stay ONE line: spelled out, the
11
- * credits ran three lines deep on a phone and covered the sheet above them. The button names the obligation, and
12
- * pressing it shows every credit — which is the treatment the reference map apps use.
13
- *
14
- * The status slot is where the loader says WHAT it is fetching while the bar at the top of the viewport says how far
15
- * along it is.
16
- *
17
- * NODE-SAFE: pure React, no maplibre.
18
5
  */
19
6
 
20
7
  import { type ReactNode, useEffect, useId, useRef, useState } from "react"
@@ -27,11 +14,11 @@ export interface MapFooterProps {
27
14
  */
28
15
  identity?: ReactNode
29
16
  /**
30
- * Beside the identity: what is loading right now. Absent when nothing is.
17
+ * What is loading right now, beside the identity.
31
18
  */
32
19
  status?: ReactNode
33
20
  /**
34
- * The credits, one entry per source. Shown in the popover the attribution button opens.
21
+ * The credits, one entry per source, shown in the popover the attribution button opens.
35
22
  */
36
23
  attribution?: ReactNode[]
37
24
  /**
@@ -52,7 +39,6 @@ export function MapFooter({
52
39
  const popoverID = useId()
53
40
  const root = useRef<HTMLElement>(null)
54
41
 
55
- // A popover closes when the conversation moves elsewhere: a press outside it, or Escape.
56
42
  useEffect(() => {
57
43
  if (!open) return
58
44
 
@@ -3,16 +3,8 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapProgressBar>` — the loading bar pinned across the top of the viewport.
7
- *
8
- * Loading a 38 MB model is a page-level event, not a control-level one, so it reports at the page's edge rather than
9
- * inside the search field: a spinner in the field resizes the one control a visitor is trying to type into, and a
10
- * staged list in the result sheet claims the space an answer will need.
11
- *
12
- * It reports a FRACTION when the loader names its steps and runs indeterminate when it does not, because a bar that
13
- * invents a percentage is worse than one that admits it is only saying "still working".
14
- *
15
- * NODE-SAFE: pure React, no maplibre.
6
+ * Show loading progress at the top of the viewport.
7
+ * Use a determinate bar when progress is known, otherwise an indeterminate bar.
16
8
  */
17
9
 
18
10
  import type { ReactNode } from "react"
@@ -21,15 +13,20 @@ import { cx } from "#common/cx"
21
13
 
22
14
  export interface MapProgressBarProps {
23
15
  /**
24
- * Whether the bar is showing at all. It stays mounted through its fade rather than unmounting on the transition.
16
+ * Whether the bar is showing at all.
17
+ *
18
+ * It stays mounted through its fade rather than unmounting on the transition.
25
19
  */
26
20
  active: boolean
27
21
  /**
28
- * Completed steps over total steps, in [0, 1]. Omit for work whose length is unknown.
22
+ * Completed steps over total steps, in [0, 1].
23
+ *
24
+ * Omit for work whose length is unknown.
29
25
  */
30
26
  fraction?: number | null
31
27
  /**
32
- * The bar's accessible name — what is loading, in a few words.
28
+ * The bar's accessible name.
29
+ * What is loading, in a few words.
33
30
  */
34
31
  label: string
35
32
  className?: string
@@ -3,29 +3,38 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapSearchBar>` — the floating search pill that sits over a map. Presentational only: it supplies the glass
7
- * material, the pill shape and the two icon slots, and the host supplies the input and whatever backend answers it.
8
- * Earth searches an address through the geocoder runtime and the planetary apps search a nomenclature artifact, so
9
- * nothing about the query belongs here.
10
- *
11
- * The slots are elements rather than icon names because a leading mark and a trailing control differ per app — a
12
- * magnifier on one, a body glyph on another.
13
- *
14
- * BUSY IS A LINE, NOT A SLOT. A spinner placed in the trailing slot changed the pill's height on every submit,
15
- * because a slot is laid out and an indicator is not part of the query. `busy` draws a hairline across the pill's
16
- * lower edge instead, which costs no layout. A host that wants `type="search"` also gets the browser's own clear
17
- * button in that corner, and two crosses side by side is one control too many.
18
- *
19
- * NODE-SAFE: pure React, no maplibre.
6
+ * Presentational search pill for map UIs. The host supplies the input and icons.
7
+ * Busy state uses a bottom-edge indicator to avoid changing the pill layout.
20
8
  */
21
9
 
22
10
  import type { ReactNode } from "react"
23
11
 
24
12
  import { cx } from "#common/cx"
25
13
 
14
+ /**
15
+ * Draw a consistently sized magnifier for the leading slot.
16
+ */
17
+ export function SearchGlyph(): ReactNode {
18
+ return (
19
+ <svg
20
+ viewBox="0 0 20 20"
21
+ width="18"
22
+ height="18"
23
+ aria-hidden="true"
24
+ focusable="false"
25
+ className="mw-map-searchbar__glyph"
26
+ >
27
+ <circle cx="8.75" cy="8.75" r="5.5" fill="none" stroke="currentColor" strokeWidth="1.8" />
28
+ <line x1="12.9" y1="12.9" x2="17" y2="17" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
29
+ </svg>
30
+ )
31
+ }
32
+
26
33
  export interface MapSearchBarProps {
27
34
  /**
28
- * The input (or combobox) the host owns. Rendered between the two slots.
35
+ * The input (or combobox) the host owns.
36
+ *
37
+ * Rendered between the two slots.
29
38
  */
30
39
  children: ReactNode
31
40
  /**
@@ -33,11 +42,16 @@ export interface MapSearchBarProps {
33
42
  */
34
43
  leading?: ReactNode
35
44
  /**
36
- * Rendered after the input — a microphone, a menu. Not a spinner: pass {@link busy} instead.
45
+ * Rendered after the input — a microphone, a menu.
46
+ *
47
+ * Not a spinner: pass {@link busy} instead.
37
48
  */
38
49
  trailing?: ReactNode
39
50
  /**
40
- * A query is running. Draws a progress hairline along the pill's lower edge, which takes no layout.
51
+ * A query is running.
52
+ *
53
+ * Draws a progress hairline along the pill's lower edge.
54
+ * The hairline takes no layout space.
41
55
  */
42
56
  busy?: boolean
43
57
  /**
@@ -3,26 +3,37 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<MapSheet>` — a side panel over the map: a title, a close button, and content.
7
- *
8
- * The close button is not optional. On a wide screen the control that opened the sheet stays visible beside it and
9
- * could close it again, but on a phone the sheet is the whole panel and covers that control — so a sheet without its
10
- * own close is a sheet a phone cannot dismiss. One component carries it so the four sheets in these apps cannot
11
- * disagree about that.
12
- *
13
- * Escape closes it too, because a panel over the whole screen is a modal in every way that matters to someone
14
- * holding a keyboard.
15
- *
16
- * NODE-SAFE: pure React, no maplibre.
6
+ * Side panel over the map with a heading, close button and Escape dismissal.
17
7
  */
18
8
 
19
9
  import { type ReactNode, useEffect } from "react"
20
10
 
21
11
  import { cx } from "#common/cx"
22
12
 
13
+ export interface SheetCloseProps {
14
+ /**
15
+ * What is being closed, for the accessible name: "Close the result", "Close About".
16
+ */
17
+ label: string
18
+ onClose: () => void
19
+ className?: string
20
+ }
21
+
22
+ /**
23
+ * Accessible button for dismissing a sheet.
24
+ */
25
+ export function SheetClose({ label, onClose, className }: SheetCloseProps): ReactNode {
26
+ return (
27
+ <button type="button" className={cx("mw-map-sheet__close", className)} aria-label={label} onClick={onClose}>
28
+ <span aria-hidden="true">×</span>
29
+ </button>
30
+ )
31
+ }
32
+
23
33
  export interface MapSheetProps {
24
34
  /**
25
- * The sheet's heading, and its accessible name.
35
+ * The sheet's heading.
36
+ * It also supplies the accessible name.
26
37
  */
27
38
  title: string
28
39
  /**
@@ -51,9 +62,7 @@ export function MapSheet({ title, onClose, children, className }: MapSheetProps)
51
62
  <div className="mw-map-sheet__header">
52
63
  <h2 className="mw-map-sheet__title">{title}</h2>
53
64
 
54
- <button type="button" className="mw-map-sheet__close" aria-label={`Close ${title}`} onClick={onClose}>
55
- <span aria-hidden="true">×</span>
56
- </button>
65
+ <SheetClose label={`Close ${title}`} onClose={onClose} />
57
66
  </div>
58
67
 
59
68
  <div className="mw-map-sheet__body">{children}</div>
@@ -9,7 +9,7 @@
9
9
  * the host composes the specs, the package renders them, react-map-gl owns the add/remove lifecycle.
10
10
  *
11
11
  * Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative control a
12
- * layer-toggle control drives in a later phase. NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` —
12
+ * layer-toggle control drives in a later phase. node-import safety: imports `react-map-gl/maplibre` —
13
13
  * reachable only via `@mailwoman/react/map`.
14
14
  */
15
15
 
@@ -3,13 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<PlaceAutocomplete>` — the "Did you mean" suggestion listbox from the demo (`_app.tsx:1394-1418`), as
7
- * a dumb presentational unit. It renders the current suggestions with the keyboard-highlighted active
8
- * descendant; the state + keyboard nav live in {@link usePlaceAutocomplete}. Renders `null` when there
9
- * is nothing to suggest, so the row only appears when useful. Wire the ids from the hook so the input's
10
- * `aria-controls` / `aria-activedescendant` match this listbox.
11
- *
12
- * NODE-SAFE: pure React, no maplibre.
6
+ * The `usePlaceAutocomplete` hook owns the state and keyboard navigation.
13
7
  */
14
8
 
15
9
  import type { ReactNode } from "react"
@@ -17,39 +11,34 @@ import type { ReactNode } from "react"
17
11
  import { cx } from "#common/cx"
18
12
  import type { Suggestion } from "#map/types"
19
13
 
14
+ /**
15
+ * Props for {@link PlaceAutocomplete}.
16
+ */
20
17
  export interface PlaceAutocompleteProps {
21
- /**
22
- * The suggestions to render (from {@link usePlaceAutocomplete}).
23
- */
24
18
  suggestions: Suggestion[]
25
19
  /**
26
- * The keyboard-highlighted index; `-1` for none.
20
+ * The index highlighted by the keyboard, or `-1` for none.
27
21
  */
28
22
  activeIndex: number
29
- /**
30
- * Fired (with the suggestion `value`) when one is clicked.
31
- */
32
23
  onPick: (value: string) => void
33
- /**
34
- * Fired with the index a pointer entered, so hover matches keyboard highlight.
35
- */
36
24
  onHover?: (index: number) => void
37
25
  /**
38
- * The listbox element id — pass `listboxID` from the hook (matches the input's `aria-controls`).
26
+ * The listbox element id, passed from the hook so it matches the input's `aria-controls`.
39
27
  */
40
28
  listboxID: string
41
29
  /**
42
- * Build the option element id — pass `optionID` from the hook.
30
+ * Pass `optionID` from the hook.
43
31
  */
44
32
  optionID: (index: number) => string
45
33
  /**
46
- * Leading label. @default "Did you mean:"
34
+ * The label before the suggestions. @default "Did you mean:"
47
35
  */
48
36
  caption?: string
49
37
  }
50
38
 
51
39
  /**
52
- * The suggestion listbox.
40
+ * Renders the suggestion listbox when suggestions exist.
41
+ * It renders no listbox otherwise.
53
42
  */
54
43
  export function PlaceAutocomplete({
55
44
  suggestions,
@@ -8,7 +8,7 @@
8
8
  * `markerRef.current.remove()` teardown) from the demo's redraw effect: mounting/unmounting the marker
9
9
  * is now React's job, keyed on the resolved candidate. Renders as a child of `<MapCanvas>`.
10
10
  *
11
- * NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` at module scope, so it is reachable ONLY through
11
+ * node-import safety: imports `react-map-gl/maplibre` at module scope, so it is reachable only through
12
12
  * the `@mailwoman/react/map` subpath, never the package root.
13
13
  */
14
14
 
@@ -40,7 +40,9 @@ export interface PlaceMarkerProps {
40
40
  }
41
41
 
42
42
  /**
43
- * A single resolved-place marker. Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
43
+ * A single resolved-place marker.
44
+ *
45
+ * Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
44
46
  */
45
47
  export function PlaceMarker({
46
48
  longitude,
@@ -2,15 +2,6 @@
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
 
16
7
  import type { ReactNode } from "react"
@@ -23,16 +14,16 @@ import { ResultOverlay } from "./ResultOverlay.tsx"
23
14
 
24
15
  export interface ResolvedPlaceLayersProps {
25
16
  /**
26
- * The render spec (from {@link useMapPlaceRender}); `null` renders nothing.
17
+ * The render spec (from {@link useMapPlaceRender}); `null` renders no layers.
27
18
  */
28
19
  spec: MapPlaceRenderSpec | null
29
20
  /**
30
- * Apply the computed camera target via {@link ResultCamera}. @default true. Set false when the consumer drives the
31
- * camera itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}).
21
+ * Apply the computed camera target via {@link ResultCamera}; set false when the consumer drives the camera
22
+ * itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}). @default true
32
23
  */
33
24
  applyCamera?: boolean
34
25
  /**
35
- * Animate the camera move. Forwarded to {@link ResultCamera}. @default true
26
+ * Animate the camera move, forwarded to {@link ResultCamera}. @default true
36
27
  */
37
28
  animateCamera?: boolean
38
29
  /**
@@ -46,7 +37,7 @@ export interface ResolvedPlaceLayersProps {
46
37
  }
47
38
 
48
39
  /**
49
- * Render the marker(s), outline, and (optional) camera move for one resolved place.
40
+ * Render the marker(s), outline and optional camera move for one resolved place.
50
41
  */
51
42
  export function ResolvedPlaceLayers({
52
43
  spec,