@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
@@ -3,33 +3,21 @@
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
  import type { ReactNode } from "react";
10
+ /**
11
+ * Props for {@link MapCompass}.
12
+ */
26
13
  export interface MapCompassProps {
27
14
  /**
28
- * The map's bearing in degrees, as MapLibre reports it: 0 is north, positive is counter-clockwise.
15
+ * The map's bearing in degrees as MapLibre reports it, where 0 is north.
29
16
  */
30
17
  bearing: number;
31
18
  /**
32
- * Fired when the compass is pressed — the host resets its map to north.
19
+ * Called when the compass is pressed.
20
+ * The host should reset its map to north.
33
21
  */
34
22
  onResetNorth: () => void;
35
23
  /**
@@ -38,5 +26,8 @@ export interface MapCompassProps {
38
26
  label?: string;
39
27
  className?: string;
40
28
  }
29
+ /**
30
+ * Renders the compass button.
31
+ */
41
32
  export declare function MapCompass({ bearing, onResetNorth, label, className }: MapCompassProps): ReactNode;
42
33
  //# sourceMappingURL=MapCompass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapCompass.d.ts","sourceRoot":"","sources":["../../lib/map/MapCompass.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAStC,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,SAAS,CA0BlG"}
1
+ {"version":3,"file":"MapCompass.d.ts","sourceRoot":"","sources":["../../lib/map/MapCompass.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,SAAS,CAyBlG"}
@@ -1,9 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from "#common/cx";
3
3
  /**
4
- * Below this many degrees off north the compass is treated as pointing north and fades out.
4
+ * The compass counts as facing north below this bearing.
5
+ * It fades out below the same threshold.
5
6
  */
6
7
  const HIDE_BELOW_DEGREES = 0.5;
8
+ /**
9
+ * Renders the compass button.
10
+ */
7
11
  export function MapCompass({ bearing, onResetNorth, label, className }) {
8
12
  const facingNorth = Math.abs(bearing) < HIDE_BELOW_DEGREES;
9
13
  return (_jsx("button", { type: "button", className: cx("mw-map-compass", facingNorth && "mw-map-compass--north", className), "aria-label": label ?? "Reset bearing to north", title: label ?? "Reset bearing to north", "aria-hidden": facingNorth, tabIndex: facingNorth ? -1 : 0, onClick: onResetNorth, children: _jsx("svg", { viewBox: "0 0 32 32", width: "26", height: "26", "aria-hidden": "true", focusable: "false", children: _jsxs("g", { style: { transform: `rotate(${-bearing}deg)`, transformOrigin: "16px 16px" }, children: [_jsx("circle", { cx: "16", cy: "16", r: "12.5", className: "mw-map-compass__dial" }), _jsx("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" }), _jsx("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" })] }) }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"MapCompass.js","sourceRoot":"","sources":["../../lib/map/MapCompass.tsx"],"names":[],"mappings":";AA2BA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B;;GAEG;AACH,MAAM,kBAAkB,GAAG,GAAG,CAAA;AAkB9B,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EA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IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAA;IAE1D,OAAO,CACN,iBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,WAAW,IAAI,uBAAuB,EAAE,SAAS,CAAC,gBACtE,KAAK,IAAI,wBAAwB,EAC7C,KAAK,EAAE,KAAK,IAAI,wBAAwB,iBAE3B,WAAW,EACxB,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAC9B,OAAO,EAAE,YAAY,YAErB,cAAK,OAAO,EAAC,WAAW,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,iBAAa,MAAM,EAAC,SAAS,EAAC,OAAO,YACnF,aAAG,KAAK,EAAE,EAAE,SAAS,EAAE,UAAU,CAAC,OAAO,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,aAC9E,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,MAAM,EAAC,SAAS,EAAC,sBAAsB,GAAG,EAGpE,eAAM,CAAC,EAAC,qDAAqD,EAAC,SAAS,EAAC,uBAAuB,GAAG,EAClG,eAAM,CAAC,EAAC,uDAAuD,EAAC,SAAS,EAAC,uBAAuB,GAAG,IACjG,GACC,GACE,CACT,CAAA;AACF,CAAC"}
@@ -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
  import type { ReactNode } from "react";
15
9
  export interface MapControlButtonProps {
@@ -18,7 +12,9 @@ export interface MapControlButtonProps {
18
12
  */
19
13
  children: ReactNode;
20
14
  /**
21
- * The control's accessible name. Required: the visible content is a mark, not a word.
15
+ * The control's accessible name.
16
+ *
17
+ * Required: the visible content is a mark rather than a word.
22
18
  */
23
19
  label: string;
24
20
  onPress: () => void;
@@ -35,7 +31,10 @@ export interface MapControlGroupProps {
35
31
  className?: string;
36
32
  }
37
33
  /**
38
- * One capsule. Put related controls in the same group; give an unrelated one its own.
34
+ * One capsule.
35
+ *
36
+ * Put related controls in the same group.
37
+ * Give an unrelated one its own.
39
38
  */
40
39
  export declare function MapControlGroup({ children, className }: MapControlGroupProps): ReactNode;
41
40
  export interface MapControlStackProps {
@@ -1 +1 @@
1
- {"version":3,"file":"MapControlStack.d.ts","sourceRoot":"","sources":["../../lib/map/MapControlStack.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,gBAAgB,CAAC,EAChC,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,GACT,EAAE,qBAAqB,GAAG,SAAS,CAcnC;AAED,MAAM,WAAW,oBAAoB;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,oBAAoB,G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GAAG,OAAO,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,IAAc,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,oBAAoB,GAAG,SAAS,CAU/G"}
@@ -4,7 +4,10 @@ export function MapControlButton({ children, label, onPress, active, disabled, c
4
4
  return (_jsx("button", { type: "button", className: cx("mw-map-control", active && "mw-map-control--active", className), "aria-label": label, "aria-pressed": active, title: label, disabled: disabled, onClick: onPress, children: children }));
5
5
  }
6
6
  /**
7
- * One capsule. Put related controls in the same group; give an unrelated one its own.
7
+ * One capsule.
8
+ *
9
+ * Put related controls in the same group.
10
+ * Give an unrelated one its own.
8
11
  */
9
12
  export function MapControlGroup({ children, className }) {
10
13
  return _jsx("div", { className: cx("mw-map-control-group", className), children: children });
@@ -1 +1 @@
1
- {"version":3,"file":"MapControlStack.js","sourceRoot":"","sources":["../../lib/map/MapControlStack.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAoB/B,MAAM,UAAU,gBAAgB,CAAC,EAChC,QAAQ,EACR,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,EACR,SAAS,GACc;IACvB,OAAO,CACN,iBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,MAAM,IAAI,wBAAwB,EAAE,SAAS,CAAC,gBAClE,KAAK,kBACH,MAAM,EACpB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,YAEf,QAAQ,GACD,CACT,CAAA;AACF,CAAC;AAOD;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAwB;IAC5E,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,sBAAsB,EAAE,SAAS,CAAC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,KAAK,YAEhB,QAAQ,GACJ,CACN,CAAA;AACF,CAAC"}
@@ -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
  import { type ReactNode } from "react";
20
7
  export interface MapFooterProps {
@@ -23,11 +10,11 @@ export interface MapFooterProps {
23
10
  */
24
11
  identity?: ReactNode;
25
12
  /**
26
- * Beside the identity: what is loading right now. Absent when nothing is.
13
+ * What is loading right now, beside the identity.
27
14
  */
28
15
  status?: ReactNode;
29
16
  /**
30
- * The credits, one entry per source. Shown in the popover the attribution button opens.
17
+ * The credits, one entry per source, shown in the popover the attribution button opens.
31
18
  */
32
19
  attribution?: ReactNode[];
33
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MapFooter.d.ts","sourceRoot":"","sources":["../../lib/map/MapFooter.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAA;AAI1E,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,EAAE,CAAA;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,EACzB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAA4B,EAC5B,SAAS,GACT,EAAE,cAAc,GAAG,SAAS,CAiE5B"}
1
+ {"version":3,"file":"MapFooter.d.ts","sourceRoot":"","sources":["../../lib/map/MapFooter.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAsC,MAAM,OAAO,CAAA;AAI1E,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,EAAE,CAAA;IACzB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,SAAS,CAAC,EACzB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAA4B,EAC5B,SAAS,GACT,EAAE,cAAc,GAAG,SAAS,CAgE5B"}
@@ -3,19 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * @copyright Sister Software
4
4
  * @license AGPL-3.0
5
5
  * @author Teffen Ellis, et al.
6
- *
7
- * `<MapFooter>` — the strip along the bottom of a map: identity and load status on the left, an attribution button
8
- * on the right.
9
- *
10
- * Attribution is a licence obligation for every source these apps draw, so it is a first-class slot rather than
11
- * something an app remembers to add. It sits behind a button because the strip has to stay ONE line: spelled out, the
12
- * credits ran three lines deep on a phone and covered the sheet above them. The button names the obligation, and
13
- * pressing it shows every credit — which is the treatment the reference map apps use.
14
- *
15
- * The status slot is where the loader says WHAT it is fetching while the bar at the top of the viewport says how far
16
- * along it is.
17
- *
18
- * NODE-SAFE: pure React, no maplibre.
19
6
  */
20
7
  import { useEffect, useId, useRef, useState } from "react";
21
8
  import { cx } from "#common/cx";
@@ -23,7 +10,6 @@ export function MapFooter({ identity, status, attribution, attributionLabel = "S
23
10
  const [open, setOpen] = useState(false);
24
11
  const popoverID = useId();
25
12
  const root = useRef(null);
26
- // A popover closes when the conversation moves elsewhere: a press outside it, or Escape.
27
13
  useEffect(() => {
28
14
  if (!open)
29
15
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"MapFooter.js","sourceRoot":"","sources":["../../lib/map/MapFooter.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAkB,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAE1E,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAsB/B,MAAM,UAAU,SAAS,CAAC,EACzB,QAAQ,EACR,MAAM,EACN,WAAW,EACX,gBAAgB,GAAG,SAAS,EAC5B,SAAS,GACO;IAChB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvC,MAAM,SAAS,GAAG,KAAK,EAAE,CAAA;IACzB,MAAM,IAAI,GAAG,MAAM,CAAc,IAAI,CAAC,CAAA;IAEtC,yFAAyF;IACzF,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,IAAI;YAAE,OAAM;QAEjB,MAAM,aAAa,GAAG,CAAC,KAAmB,EAAE,EAAE;YAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAc,CAAC,EAAE,CAAC;gBACnD,OAAO,CAAC,KAAK,CAAC,CAAA;YACf,CAAC;QACF,CAAC,CAAA;QAED,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC1C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,CAAC,KAAK,CAAC,CAAA;YACf,CAAC;QACF,CAAC,CAAA;QAED,QAAQ,CAAC,gBAAgB,CAA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@ -3,29 +3,26 @@
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
  import type { ReactNode } from "react";
18
10
  export interface MapProgressBarProps {
19
11
  /**
20
- * Whether the bar is showing at all. It stays mounted through its fade rather than unmounting on the transition.
12
+ * Whether the bar is showing at all.
13
+ *
14
+ * It stays mounted through its fade rather than unmounting on the transition.
21
15
  */
22
16
  active: boolean;
23
17
  /**
24
- * Completed steps over total steps, in [0, 1]. Omit for work whose length is unknown.
18
+ * Completed steps over total steps, in [0, 1].
19
+ *
20
+ * Omit for work whose length is unknown.
25
21
  */
26
22
  fraction?: number | null;
27
23
  /**
28
- * The bar's accessible name — what is loading, in a few words.
24
+ * The bar's accessible name.
25
+ * What is loading, in a few words.
29
26
  */
30
27
  label: string;
31
28
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"MapProgressBar.d.ts","sourceRoot":"","sources":["../../lib/map/MapProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAoBrG"}
1
+ {"version":3,"file":"MapProgressBar.d.ts","sourceRoot":"","sources":["../../lib/map/MapProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAoBrG"}
@@ -1 +1 @@
1
- {"version":3,"file":"MapProgressBar.js","sourceRoot":"","sources":["../../lib/map/MapProgressBar.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAkB/B,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAuB;IACzF,MAAM,WAAW,GAAG,OAAO,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC7E,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;IAEpE,OAAO,CACN,cACC,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE,CAAC,MAAM,IAAI,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CAAC,CAAC,SAAS,mBAC3B,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,mBAC7B,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,YAElE,cACC,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,CAAC,WAAW,IAAI,sCAAsC,CAAC,EAC9F,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,SAAS,GACnE,GACG,CACN,CAAA;AACF,CAAC"}
@@ -3,25 +3,19 @@
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
  import type { ReactNode } from "react";
10
+ /**
11
+ * Draw a consistently sized magnifier for the leading slot.
12
+ */
13
+ export declare function SearchGlyph(): ReactNode;
22
14
  export interface MapSearchBarProps {
23
15
  /**
24
- * The input (or combobox) the host owns. Rendered between the two slots.
16
+ * The input (or combobox) the host owns.
17
+ *
18
+ * Rendered between the two slots.
25
19
  */
26
20
  children: ReactNode;
27
21
  /**
@@ -29,11 +23,16 @@ export interface MapSearchBarProps {
29
23
  */
30
24
  leading?: ReactNode;
31
25
  /**
32
- * Rendered after the input — a microphone, a menu. Not a spinner: pass {@link busy} instead.
26
+ * Rendered after the input — a microphone, a menu.
27
+ *
28
+ * Not a spinner: pass {@link busy} instead.
33
29
  */
34
30
  trailing?: ReactNode;
35
31
  /**
36
- * A query is running. Draws a progress hairline along the pill's lower edge, which takes no layout.
32
+ * A query is running.
33
+ *
34
+ * Draws a progress hairline along the pill's lower edge.
35
+ * The hairline takes no layout space.
37
36
  */
38
37
  busy?: boolean;
39
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MapSearchBar.d.ts","sourceRoot":"","sources":["../../lib/map/MapSearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAelH"}
1
+ {"version":3,"file":"MapSearchBar.d.ts","sourceRoot":"","sources":["../../lib/map/MapSearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC;;GAEG;AACH,wBAAgB,WAAW,IAAI,SAAS,CAcvC;AAED,MAAM,WAAW,iBAAiB;IACjC;;;;OAIG;IACH,QAAQ,EAAE,SAAS,CAAA;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAA;IACnB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,iBAAiB,GAAG,SAAS,CAelH"}
@@ -1,5 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from "#common/cx";
3
+ /**
4
+ * Draw a consistently sized magnifier for the leading slot.
5
+ */
6
+ export function SearchGlyph() {
7
+ return (_jsxs("svg", { viewBox: "0 0 20 20", width: "18", height: "18", "aria-hidden": "true", focusable: "false", className: "mw-map-searchbar__glyph", children: [_jsx("circle", { cx: "8.75", cy: "8.75", r: "5.5", fill: "none", stroke: "currentColor", strokeWidth: "1.8" }), _jsx("line", { x1: "12.9", y1: "12.9", x2: "17", y2: "17", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round" })] }));
8
+ }
3
9
  export function MapSearchBar({ children, leading, trailing, busy, className, label }) {
4
10
  return (_jsxs("div", { className: cx("mw-map-searchbar", busy && "mw-map-searchbar--busy", className), role: label ? "search" : undefined, "aria-label": label, "aria-busy": busy, children: [leading ? _jsx("span", { className: "mw-map-searchbar__slot mw-map-searchbar__slot--leading", children: leading }) : null, _jsx("span", { className: "mw-map-searchbar__field", children: children }), trailing ? _jsx("span", { className: "mw-map-searchbar__slot mw-map-searchbar__slot--trailing", children: trailing }) : null] }));
5
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MapSearchBar.js","sourceRoot":"","sources":["../../lib/map/MapSearchBar.tsx"],"names":[],"mappings":";AAuBA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AA6B/B,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAqB;IACtG,OAAO,CACN,eACC,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,IAAI,IAAI,wBAAwB,EAAE,SAAS,CAAC,EAC9E,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gBACtB,KAAK,eACN,IAAI,aAEd,OAAO,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,wDAAwD,YAAE,OAAO,GAAQ,CAAC,CAAC,CAAC,IAAI,EAE3G,eAAM,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAQ,EAE1D,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,yDAAyD,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,IACzG,CACN,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"MapSearchBar.js","sourceRoot":"","sources":["../../lib/map/MapSearchBar.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B;;GAEG;AACH,MAAM,UAAU,WAAW;IAC1B,OAAO,CACN,eACC,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,iBACC,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,SAAS,EAAC,yBAAyB,aAEnC,iBAAQ,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,GAAG,EAC1F,eAAM,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,MAAM,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,KAAK,EAAC,aAAa,EAAC,OAAO,GAAG,IACrG,CACN,CAAA;AACF,CAAC;AAoCD,MAAM,UAAU,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAqB;IACtG,OAAO,CACN,eACC,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,IAAI,IAAI,wBAAwB,EAAE,SAAS,CAAC,EAC9E,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,gBACtB,KAAK,eACN,IAAI,aAEd,OAAO,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,wDAAwD,YAAE,OAAO,GAAQ,CAAC,CAAC,CAAC,IAAI,EAE3G,eAAM,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAQ,EAE1D,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,yDAAyD,YAAE,QAAQ,GAAQ,CAAC,CAAC,CAAC,IAAI,IACzG,CACN,CAAA;AACF,CAAC"}
@@ -3,22 +3,25 @@
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
  import { type ReactNode } from "react";
9
+ export interface SheetCloseProps {
10
+ /**
11
+ * What is being closed, for the accessible name: "Close the result", "Close About".
12
+ */
13
+ label: string;
14
+ onClose: () => void;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * Accessible button for dismissing a sheet.
19
+ */
20
+ export declare function SheetClose({ label, onClose, className }: SheetCloseProps): ReactNode;
19
21
  export interface MapSheetProps {
20
22
  /**
21
- * The sheet's heading, and its accessible name.
23
+ * The sheet's heading.
24
+ * It also supplies the accessible name.
22
25
  */
23
26
  title: string;
24
27
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"MapSheet.d.ts","sourceRoot":"","sources":["../../lib/map/MapSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAIjD,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,SAAS,CA0B1F"}
1
+ {"version":3,"file":"MapSheet.d.ts","sourceRoot":"","sources":["../../lib/map/MapSheet.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAA;AAIjD,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,eAAe,GAAG,SAAS,CAMpF;AAED,MAAM,WAAW,aAAa;IAC7B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,SAAS,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,GAAG,SAAS,CAwB1F"}
@@ -4,20 +4,16 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * @license AGPL-3.0
5
5
  * @author Teffen Ellis, et al.
6
6
  *
7
- * `<MapSheet>` — a side panel over the map: a title, a close button, and content.
8
- *
9
- * The close button is not optional. On a wide screen the control that opened the sheet stays visible beside it and
10
- * could close it again, but on a phone the sheet is the whole panel and covers that control — so a sheet without its
11
- * own close is a sheet a phone cannot dismiss. One component carries it so the four sheets in these apps cannot
12
- * disagree about that.
13
- *
14
- * Escape closes it too, because a panel over the whole screen is a modal in every way that matters to someone
15
- * holding a keyboard.
16
- *
17
- * NODE-SAFE: pure React, no maplibre.
7
+ * Side panel over the map with a heading, close button and Escape dismissal.
18
8
  */
19
9
  import { useEffect } from "react";
20
10
  import { cx } from "#common/cx";
11
+ /**
12
+ * Accessible button for dismissing a sheet.
13
+ */
14
+ export function SheetClose({ label, onClose, className }) {
15
+ return (_jsx("button", { type: "button", className: cx("mw-map-sheet__close", className), "aria-label": label, onClick: onClose, children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) }));
16
+ }
21
17
  export function MapSheet({ title, onClose, children, className }) {
22
18
  useEffect(() => {
23
19
  const onKeyDown = (event) => {
@@ -28,6 +24,6 @@ export function MapSheet({ title, onClose, children, className }) {
28
24
  document.addEventListener("keydown", onKeyDown);
29
25
  return () => document.removeEventListener("keydown", onKeyDown);
30
26
  }, [onClose]);
31
- return (_jsxs("aside", { className: cx("mw-map-sheet mw-map-sheet--side", className), "aria-label": title, children: [_jsxs("div", { className: "mw-map-sheet__header", children: [_jsx("h2", { className: "mw-map-sheet__title", children: title }), _jsx("button", { type: "button", className: "mw-map-sheet__close", "aria-label": `Close ${title}`, onClick: onClose, children: _jsx("span", { "aria-hidden": "true", children: "\u00D7" }) })] }), _jsx("div", { className: "mw-map-sheet__body", children: children })] }));
27
+ return (_jsxs("aside", { className: cx("mw-map-sheet mw-map-sheet--side", className), "aria-label": title, children: [_jsxs("div", { className: "mw-map-sheet__header", children: [_jsx("h2", { className: "mw-map-sheet__title", children: title }), _jsx(SheetClose, { label: `Close ${title}`, onClose: onClose })] }), _jsx("div", { className: "mw-map-sheet__body", children: children })] }));
32
28
  }
33
29
  //# sourceMappingURL=MapSheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapSheet.js","sourceRoot":"","sources":["../../lib/map/MapSheet.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAkB,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAe/B,MAAM,UAAU,QAAQ,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAiB;IAC9E,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,SAAS,GAAG,CAAC,KAAoB,EAAE,EAAE;YAC1C,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;gBAC5B,OAAO,EAAE,CAAA;YACV,CAAC;QACF,CAAC,CAAA;QAED,QAAQ,CAAC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAE/C,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;IAChE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACN,iBAAO,SAAS,EAAE,EAAE,CAAC,iCAAiC,E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,SAAS,CAAC,CAAA;IAChE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,OAAO,CACN,iBAAO,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,SAAS,CAAC,gBAAc,KAAK,aACpF,eAAK,SAAS,EAAC,sBAAsB,aACpC,aAAI,SAAS,EAAC,qBAAqB,YAAE,KAAK,GAAM,EAEhD,KAAC,UAAU,IAAC,KAAK,EAAE,SAAS,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,GAAI,IACpD,EAEN,cAAK,SAAS,EAAC,oBAAoB,YAAE,QAAQ,GAAO,IAC7C,CACR,CAAA;AACF,CAAC"}
@@ -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
  import { type ReactNode } from "react";
@@ -10,7 +10,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
10
10
  * the host composes the specs, the package renders them, react-map-gl owns the add/remove lifecycle.
11
11
  *
12
12
  * Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative control a
13
- * layer-toggle control drives in a later phase. NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` —
13
+ * layer-toggle control drives in a later phase. node-import safety: imports `react-map-gl/maplibre` —
14
14
  * reachable only via `@mailwoman/react/map`.
15
15
  */
16
16
  import { Fragment } from "react";
@@ -3,48 +3,37 @@
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
  import type { ReactNode } from "react";
15
9
  import type { Suggestion } from "#map/types";
10
+ /**
11
+ * Props for {@link PlaceAutocomplete}.
12
+ */
16
13
  export interface PlaceAutocompleteProps {
17
- /**
18
- * The suggestions to render (from {@link usePlaceAutocomplete}).
19
- */
20
14
  suggestions: Suggestion[];
21
15
  /**
22
- * The keyboard-highlighted index; `-1` for none.
16
+ * The index highlighted by the keyboard, or `-1` for none.
23
17
  */
24
18
  activeIndex: number;
25
- /**
26
- * Fired (with the suggestion `value`) when one is clicked.
27
- */
28
19
  onPick: (value: string) => void;
29
- /**
30
- * Fired with the index a pointer entered, so hover matches keyboard highlight.
31
- */
32
20
  onHover?: (index: number) => void;
33
21
  /**
34
- * The listbox element id — pass `listboxID` from the hook (matches the input's `aria-controls`).
22
+ * The listbox element id, passed from the hook so it matches the input's `aria-controls`.
35
23
  */
36
24
  listboxID: string;
37
25
  /**
38
- * Build the option element id — pass `optionID` from the hook.
26
+ * Pass `optionID` from the hook.
39
27
  */
40
28
  optionID: (index: number) => string;
41
29
  /**
42
- * Leading label. @default "Did you mean:"
30
+ * The label before the suggestions. @default "Did you mean:"
43
31
  */
44
32
  caption?: string;
45
33
  }
46
34
  /**
47
- * The suggestion listbox.
35
+ * Renders the suggestion listbox when suggestions exist.
36
+ * It renders no listbox otherwise.
48
37
  */
49
38
  export declare function PlaceAutocomplete({ suggestions, activeIndex, onPick, onHover, listboxID, optionID, caption, }: PlaceAutocompleteProps): ReactNode;
50
39
  //# sourceMappingURL=PlaceAutocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlaceAutocomplete.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAyB,GACzB,EAAE,sBAAsB,GAAG,SAAS,CAuBpC"}
1
+ {"version":3,"file":"PlaceAutocomplete.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACnC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAyB,GACzB,EAAE,sBAAsB,GAAG,SAAS,CAuBpC"}
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from "#common/cx";
3
3
  /**
4
- * The suggestion listbox.
4
+ * Renders the suggestion listbox when suggestions exist.
5
+ * It renders no listbox otherwise.
5
6
  */
6
7
  export function PlaceAutocomplete({ suggestions, activeIndex, onPick, onHover, listboxID, optionID, caption = "Did you mean:", }) {
7
8
  if (!suggestions.length)
@@ -1 +1 @@
1
- {"version":3,"file":"PlaceAutocomplete.js","sourceRoot":"","sources":["../../lib/map/PlaceAutocomplete.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAkC/B;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,EACjC,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,EACT,QAAQ,EACR,OAAO,GAAG,eAAe,GACD;IACxB,IAAI,CAAC,WAAW,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAEpC,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,EAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAC,SAAS,gBAAY,mBAAmB,aAC5F,eAAM,SAAS,EAAC,wBAAwB,YAAE,OAAO,GAAQ,EACxD,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAC1B,iBAEC,EA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E,EAAE,CAAC,SAAS,EAAE,EAAE,iBAAiB,EAAE,CAAC,KAAK,WAAW,EAAE,CAAC,EAClE,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAChC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9B,KAAK,EAAE,CAAC,CAAC,SAAS,YAEjB,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,IAVd,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAWd,CACT,CAAC,IACG,CACN,CAAA;AACF,CAAC"}
@@ -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
  import type { ReactNode } from "react";
@@ -31,7 +31,9 @@ export interface PlaceMarkerProps {
31
31
  anchor?: "center" | "top" | "bottom" | "left" | "right";
32
32
  }
33
33
  /**
34
- * A single resolved-place marker. Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
34
+ * A single resolved-place marker.
35
+ *
36
+ * Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
35
37
  */
36
38
  export declare function PlaceMarker({ longitude, latitude, color, anchor, }: PlaceMarkerProps): ReactNode;
37
39
  //# sourceMappingURL=PlaceMarker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlaceMarker.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;CACvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAoB,EACpB,MAAiB,GACjB,EAAE,gBAAgB,GAAG,SAAS,CAE9B"}
1
+ {"version":3,"file":"PlaceMarker.d.ts","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAQtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;CACvD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAoB,EACpB,MAAiB,GACjB,EAAE,gBAAgB,GAAG,SAAS,CAE9B"}
@@ -5,7 +5,9 @@ import { Marker } from "react-map-gl/maplibre";
5
5
  */
6
6
  const MARKER_COLOR = "#e0367c";
7
7
  /**
8
- * A single resolved-place marker. Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
8
+ * A single resolved-place marker.
9
+ *
10
+ * Wraps `react-map-gl`'s `<Marker>` with the demo's default color.
9
11
  */
10
12
  export function PlaceMarker({ longitude, latitude, color = MARKER_COLOR, anchor = "center", }) {
11
13
  return _jsx(Marker, { longitude: longitude, latitude: latitude, color: color, anchor: anchor });
@@ -1 +1 @@
1
- {"version":3,"file":"PlaceMarker.js","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C;;GAEG;AACH,MAAM,YAAY,GAAG,SAAS,CAAA;AAqB9B;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,GAAG,YAAY,EACpB,MAAM,GAAG,QAAQ,GACC;IAClB,OAAO,KAAC,MAAM,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAA;AAC1F,CAAC"}
1
+ {"version":3,"file":"PlaceMarker.js","sourceRoot":"","sources":["../../lib/map/PlaceMarker.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAE9C;;GAEG;AACH,MAAM,YAAY,GAAG,SAAS,CAAA;AAqB9B;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,GAAG,YAAY,EACpB,MAAM,GAAG,QAAQ,GACC;IAClB,OAAO,KAAC,MAAM,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,CAAA;AAC1F,CAAC"}