@mailwoman/react 10.0.0 → 10.2.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 (389) hide show
  1. package/README.md +18 -16
  2. package/fonts.css +97 -22
  3. package/lib/common/About.tsx +10 -10
  4. package/lib/common/ClientOnly.tsx +2 -14
  5. package/lib/common/CopyButton.tsx +9 -3
  6. package/lib/common/LoadingIndicator.tsx +13 -5
  7. package/lib/common/PresetChips.tsx +11 -8
  8. package/lib/common/confidence-tiers.ts +8 -7
  9. package/lib/common/cx.ts +3 -1
  10. package/lib/common/text-tokens.ts +10 -13
  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 -18
  15. package/lib/map/AppIdentity.tsx +89 -0
  16. package/lib/map/CompareToggle.tsx +8 -31
  17. package/lib/map/DebugInfo.tsx +75 -0
  18. package/lib/map/Geocoder.tsx +65 -50
  19. package/lib/map/GeocoderControls.tsx +425 -141
  20. package/lib/map/GraticuleLayer.tsx +56 -0
  21. package/lib/map/MapCanvas.tsx +26 -13
  22. package/lib/map/MapChipRow.tsx +4 -8
  23. package/lib/map/MapCompass.tsx +18 -25
  24. package/lib/map/MapControlStack.tsx +11 -10
  25. package/lib/map/MapFooter.tsx +5 -17
  26. package/lib/map/MapProgressBar.tsx +10 -13
  27. package/lib/map/MapSearchBar.tsx +31 -17
  28. package/lib/map/MapSheet.tsx +24 -15
  29. package/lib/map/OverlayLayers.tsx +14 -3
  30. package/lib/map/PlaceAutocomplete.tsx +12 -21
  31. package/lib/map/PlaceMarker.tsx +10 -4
  32. package/lib/map/ResolvedPlaceLayers.tsx +14 -15
  33. package/lib/map/ResultCamera.tsx +10 -31
  34. package/lib/map/ResultOverlay.tsx +14 -16
  35. package/lib/map/ResultPanel.tsx +1 -20
  36. package/lib/map/VersionPicker.tsx +10 -19
  37. package/lib/map/fake-runtime.ts +46 -19
  38. package/lib/map/geometry.ts +14 -47
  39. package/lib/map/graticule.ts +80 -0
  40. package/lib/map/map-debug.ts +4 -2
  41. package/lib/map/place-render.ts +30 -62
  42. package/lib/map/types.ts +57 -116
  43. package/lib/map/useCompareState.ts +5 -4
  44. package/lib/map/useGeocode.ts +7 -5
  45. package/lib/map/useMapBearing.ts +13 -13
  46. package/lib/map/useMapLabelPick.ts +21 -30
  47. package/lib/map/useMapPlaceRender.ts +3 -7
  48. package/lib/map/usePlaceAutocomplete.ts +44 -50
  49. package/lib/map.ts +92 -0
  50. package/lib/pipeline/CandidatePicker.tsx +13 -5
  51. package/lib/pipeline/ConfidenceCell.tsx +2 -2
  52. package/lib/pipeline/FailureDiagnostic.tsx +8 -2
  53. package/lib/pipeline/PipelineExplorer.tsx +6 -3
  54. package/lib/pipeline/QueryForm.tsx +5 -2
  55. package/lib/pipeline/ResolvedPlace.tsx +2 -2
  56. package/lib/pipeline/SpanHighlight.tsx +7 -5
  57. package/lib/pipeline/TimingPanel.tsx +1 -1
  58. package/lib/pipeline/TreeView.tsx +2 -2
  59. package/lib/pipeline/copy.ts +22 -25
  60. package/lib/pipeline/presets.ts +15 -13
  61. package/lib/pipeline/types.ts +20 -17
  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 +29 -17
  67. package/lib/poi/QueryInput.tsx +1 -1
  68. package/lib/poi/SubjectPanel.tsx +4 -3
  69. package/lib/poi/runtime.ts +14 -16
  70. package/lib/poi/types.ts +58 -47
  71. package/lib/poi/usePOISearch.ts +91 -82
  72. package/lib/poi.ts +40 -0
  73. package/lib/runtime/useReleaseRuntime.ts +122 -90
  74. package/lib/search/SearchModal.tsx +478 -0
  75. package/lib/search/search.css +282 -0
  76. package/lib/search/types.ts +68 -0
  77. package/lib/search.ts +11 -0
  78. package/out/common/About.d.ts +6 -6
  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 +9 -3
  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 +13 -5
  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 +11 -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 +8 -7
  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 +6 -11
  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 +46 -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/CompareToggle.d.ts +8 -31
  128. package/out/map/CompareToggle.d.ts.map +1 -1
  129. package/out/map/CompareToggle.js +4 -1
  130. package/out/map/CompareToggle.js.map +1 -1
  131. package/out/map/DebugInfo.d.ts +27 -0
  132. package/out/map/DebugInfo.d.ts.map +1 -0
  133. package/out/map/DebugInfo.js +36 -0
  134. package/out/map/DebugInfo.js.map +1 -0
  135. package/out/map/Geocoder.d.ts +41 -30
  136. package/out/map/Geocoder.d.ts.map +1 -1
  137. package/out/map/Geocoder.js +23 -37
  138. package/out/map/Geocoder.js.map +1 -1
  139. package/out/map/GeocoderControls.d.ts +15 -44
  140. package/out/map/GeocoderControls.d.ts.map +1 -1
  141. package/out/map/GeocoderControls.js +250 -39
  142. package/out/map/GeocoderControls.js.map +1 -1
  143. package/out/map/GraticuleLayer.d.ts +30 -0
  144. package/out/map/GraticuleLayer.d.ts.map +1 -0
  145. package/out/map/GraticuleLayer.js +25 -0
  146. package/out/map/GraticuleLayer.js.map +1 -0
  147. package/out/map/MapCanvas.d.ts +26 -13
  148. package/out/map/MapCanvas.d.ts.map +1 -1
  149. package/out/map/MapCanvas.js +5 -2
  150. package/out/map/MapCanvas.js.map +1 -1
  151. package/out/map/MapChipRow.d.ts +4 -8
  152. package/out/map/MapChipRow.d.ts.map +1 -1
  153. package/out/map/MapChipRow.js.map +1 -1
  154. package/out/map/MapCompass.d.ts +14 -21
  155. package/out/map/MapCompass.d.ts.map +1 -1
  156. package/out/map/MapCompass.js +5 -1
  157. package/out/map/MapCompass.js.map +1 -1
  158. package/out/map/MapControlStack.d.ts +11 -10
  159. package/out/map/MapControlStack.d.ts.map +1 -1
  160. package/out/map/MapControlStack.js +4 -1
  161. package/out/map/MapControlStack.js.map +1 -1
  162. package/out/map/MapFooter.d.ts +5 -16
  163. package/out/map/MapFooter.d.ts.map +1 -1
  164. package/out/map/MapFooter.js +0 -14
  165. package/out/map/MapFooter.js.map +1 -1
  166. package/out/map/MapProgressBar.d.ts +10 -13
  167. package/out/map/MapProgressBar.d.ts.map +1 -1
  168. package/out/map/MapProgressBar.js.map +1 -1
  169. package/out/map/MapSearchBar.d.ts +16 -17
  170. package/out/map/MapSearchBar.d.ts.map +1 -1
  171. package/out/map/MapSearchBar.js +6 -0
  172. package/out/map/MapSearchBar.js.map +1 -1
  173. package/out/map/MapSheet.d.ts +15 -12
  174. package/out/map/MapSheet.d.ts.map +1 -1
  175. package/out/map/MapSheet.js +8 -12
  176. package/out/map/MapSheet.js.map +1 -1
  177. package/out/map/OverlayLayers.d.ts +8 -2
  178. package/out/map/OverlayLayers.d.ts.map +1 -1
  179. package/out/map/OverlayLayers.js +3 -3
  180. package/out/map/OverlayLayers.js.map +1 -1
  181. package/out/map/PlaceAutocomplete.d.ts +12 -21
  182. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  183. package/out/map/PlaceAutocomplete.js +2 -1
  184. package/out/map/PlaceAutocomplete.js.map +1 -1
  185. package/out/map/PlaceMarker.d.ts +10 -4
  186. package/out/map/PlaceMarker.d.ts.map +1 -1
  187. package/out/map/PlaceMarker.js +3 -1
  188. package/out/map/PlaceMarker.js.map +1 -1
  189. package/out/map/ResolvedPlaceLayers.d.ts +14 -15
  190. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  191. package/out/map/ResolvedPlaceLayers.js +1 -1
  192. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  193. package/out/map/ResultCamera.d.ts +10 -31
  194. package/out/map/ResultCamera.d.ts.map +1 -1
  195. package/out/map/ResultCamera.js +3 -28
  196. package/out/map/ResultCamera.js.map +1 -1
  197. package/out/map/ResultOverlay.d.ts +14 -16
  198. package/out/map/ResultOverlay.d.ts.map +1 -1
  199. package/out/map/ResultOverlay.js +1 -2
  200. package/out/map/ResultOverlay.js.map +1 -1
  201. package/out/map/ResultPanel.d.ts +1 -20
  202. package/out/map/ResultPanel.d.ts.map +1 -1
  203. package/out/map/ResultPanel.js.map +1 -1
  204. package/out/map/VersionPicker.d.ts +7 -19
  205. package/out/map/VersionPicker.d.ts.map +1 -1
  206. package/out/map/VersionPicker.js +5 -2
  207. package/out/map/VersionPicker.js.map +1 -1
  208. package/out/map/fake-runtime.d.ts +9 -11
  209. package/out/map/fake-runtime.d.ts.map +1 -1
  210. package/out/map/fake-runtime.js +45 -19
  211. package/out/map/fake-runtime.js.map +1 -1
  212. package/out/map/geometry.d.ts +13 -34
  213. package/out/map/geometry.d.ts.map +1 -1
  214. package/out/map/geometry.js +9 -34
  215. package/out/map/geometry.js.map +1 -1
  216. package/out/map/graticule.d.ts +17 -0
  217. package/out/map/graticule.d.ts.map +1 -0
  218. package/out/map/graticule.js +67 -0
  219. package/out/map/graticule.js.map +1 -0
  220. package/out/map/map-debug.d.ts +4 -2
  221. package/out/map/map-debug.d.ts.map +1 -1
  222. package/out/map/map-debug.js +1 -1
  223. package/out/map/map-debug.js.map +1 -1
  224. package/out/map/place-render.d.ts +25 -45
  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 +57 -113
  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 +3 -7
  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 +67 -0
  257. package/out/map.d.ts.map +1 -0
  258. package/out/map.js +45 -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 +2 -2
  265. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  266. package/out/pipeline/ConfidenceCell.js +1 -1
  267. package/out/pipeline/FailureDiagnostic.d.ts +8 -2
  268. package/out/pipeline/FailureDiagnostic.d.ts.map +1 -1
  269. package/out/pipeline/FailureDiagnostic.js +3 -0
  270. package/out/pipeline/FailureDiagnostic.js.map +1 -1
  271. package/out/pipeline/PipelineExplorer.d.ts +6 -2
  272. package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
  273. package/out/pipeline/PipelineExplorer.js +1 -1
  274. package/out/pipeline/PipelineExplorer.js.map +1 -1
  275. package/out/pipeline/QueryForm.d.ts +5 -2
  276. package/out/pipeline/QueryForm.d.ts.map +1 -1
  277. package/out/pipeline/QueryForm.js.map +1 -1
  278. package/out/pipeline/ResolvedPlace.d.ts +1 -1
  279. package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
  280. package/out/pipeline/SpanHighlight.d.ts +4 -3
  281. package/out/pipeline/SpanHighlight.d.ts.map +1 -1
  282. package/out/pipeline/SpanHighlight.js +3 -2
  283. package/out/pipeline/SpanHighlight.js.map +1 -1
  284. package/out/pipeline/TimingPanel.d.ts +1 -1
  285. package/out/pipeline/TreeView.d.ts +1 -1
  286. package/out/pipeline/TreeView.js.map +1 -1
  287. package/out/pipeline/copy.d.ts +1 -1
  288. package/out/pipeline/copy.d.ts.map +1 -1
  289. package/out/pipeline/copy.js +4 -3
  290. package/out/pipeline/copy.js.map +1 -1
  291. package/out/pipeline/presets.d.ts +5 -4
  292. package/out/pipeline/presets.d.ts.map +1 -1
  293. package/out/pipeline/presets.js +15 -13
  294. package/out/pipeline/presets.js.map +1 -1
  295. package/out/pipeline/types.d.ts +20 -17
  296. package/out/pipeline/types.d.ts.map +1 -1
  297. package/out/pipeline/types.js +2 -4
  298. package/out/pipeline/types.js.map +1 -1
  299. package/out/pipeline/useParsePipeline.d.ts +14 -9
  300. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  301. package/out/pipeline/useParsePipeline.js +7 -8
  302. package/out/pipeline/useParsePipeline.js.map +1 -1
  303. package/out/pipeline.d.ts +33 -0
  304. package/out/pipeline.d.ts.map +1 -0
  305. package/out/pipeline.js +21 -0
  306. package/out/pipeline.js.map +1 -0
  307. package/out/poi/AbstainPanel.d.ts +1 -1
  308. package/out/poi/LiveResultsBlock.d.ts +2 -1
  309. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  310. package/out/poi/LiveResultsBlock.js.map +1 -1
  311. package/out/poi/POIExplorer.d.ts +22 -12
  312. package/out/poi/POIExplorer.d.ts.map +1 -1
  313. package/out/poi/POIExplorer.js +11 -10
  314. package/out/poi/POIExplorer.js.map +1 -1
  315. package/out/poi/QueryInput.d.ts +1 -1
  316. package/out/poi/SubjectPanel.d.ts +2 -2
  317. package/out/poi/SubjectPanel.d.ts.map +1 -1
  318. package/out/poi/SubjectPanel.js +2 -1
  319. package/out/poi/SubjectPanel.js.map +1 -1
  320. package/out/poi/runtime.d.ts +5 -14
  321. package/out/poi/runtime.d.ts.map +1 -1
  322. package/out/poi/runtime.js +14 -16
  323. package/out/poi/runtime.js.map +1 -1
  324. package/out/poi/types.d.ts +53 -45
  325. package/out/poi/types.d.ts.map +1 -1
  326. package/out/poi/types.js +2 -4
  327. package/out/poi/types.js.map +1 -1
  328. package/out/poi/usePOISearch.d.ts +30 -17
  329. package/out/poi/usePOISearch.d.ts.map +1 -1
  330. package/out/poi/usePOISearch.js +48 -64
  331. package/out/poi/usePOISearch.js.map +1 -1
  332. package/out/poi.d.ts +23 -0
  333. package/out/poi.d.ts.map +1 -0
  334. package/out/poi.js +15 -0
  335. package/out/poi.js.map +1 -0
  336. package/out/runtime/useReleaseRuntime.d.ts +63 -74
  337. package/out/runtime/useReleaseRuntime.d.ts.map +1 -1
  338. package/out/runtime/useReleaseRuntime.js +31 -32
  339. package/out/runtime/useReleaseRuntime.js.map +1 -1
  340. package/out/{runtime/index.d.ts → runtime.d.ts} +1 -1
  341. package/out/runtime.d.ts.map +1 -0
  342. package/out/{runtime/index.js → runtime.js} +1 -1
  343. package/out/runtime.js.map +1 -0
  344. package/out/search/SearchModal.d.ts +40 -0
  345. package/out/search/SearchModal.d.ts.map +1 -0
  346. package/out/search/SearchModal.js +255 -0
  347. package/out/search/SearchModal.js.map +1 -0
  348. package/out/search/types.d.ts +65 -0
  349. package/out/search/types.d.ts.map +1 -0
  350. package/out/search/types.js +13 -0
  351. package/out/search/types.js.map +1 -0
  352. package/out/search.d.ts +11 -0
  353. package/out/search.d.ts.map +1 -0
  354. package/out/search.js +9 -0
  355. package/out/search.js.map +1 -0
  356. package/package.json +73 -165
  357. package/styles.css +482 -266
  358. package/tokens/index.css +24 -6
  359. package/tokens/tokens.json +114 -6
  360. package/lib/common/index.ts +0 -22
  361. package/lib/map/BackendControl.tsx +0 -51
  362. package/lib/map/index.ts +0 -95
  363. package/lib/pipeline/index.ts +0 -36
  364. package/lib/poi/index.ts +0 -39
  365. package/out/common/index.d.ts +0 -22
  366. package/out/common/index.d.ts.map +0 -1
  367. package/out/common/index.js +0 -15
  368. package/out/common/index.js.map +0 -1
  369. package/out/map/BackendControl.d.ts +0 -32
  370. package/out/map/BackendControl.d.ts.map +0 -1
  371. package/out/map/BackendControl.js +0 -8
  372. package/out/map/BackendControl.js.map +0 -1
  373. package/out/map/index.d.ts +0 -69
  374. package/out/map/index.d.ts.map +0 -1
  375. package/out/map/index.js +0 -46
  376. package/out/map/index.js.map +0 -1
  377. package/out/pipeline/index.d.ts +0 -33
  378. package/out/pipeline/index.d.ts.map +0 -1
  379. package/out/pipeline/index.js +0 -21
  380. package/out/pipeline/index.js.map +0 -1
  381. package/out/poi/index.d.ts +0 -23
  382. package/out/poi/index.d.ts.map +0 -1
  383. package/out/poi/index.js +0 -15
  384. package/out/poi/index.js.map +0 -1
  385. package/out/runtime/index.d.ts.map +0 -1
  386. package/out/runtime/index.js.map +0 -1
  387. package/styleframe.config.ts +0 -329
  388. package/vitest.node.config.ts +0 -20
  389. /package/lib/{runtime/index.ts → runtime.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CompareToggle.d.ts","sourceRoot":"","sources":["../../lib/map/CompareToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,mBAAmB,EAAE,CAAC,WAAW,EAAE,OAAO,KA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AG,SAAS,CAmChC"}
@@ -1,6 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /**
3
- * The compare toggle + (when on) the compare-version selector. Renders `null` with fewer than two versions.
3
+ * Renders the compare checkbox.
4
+ *
5
+ * In compare mode, it also renders the version selector. and no control at all
6
+ * when fewer than two versions exist.
4
7
  */
5
8
  export function CompareToggle({ versions, primaryVersion, compareMode, onCompareModeChange, compareVersion, onCompareVersionChange, disabled, status, }) {
6
9
  if (versions.length < 2)
@@ -1 +1 @@
1
- {"version":3,"file":"CompareToggle.js","sourceRoot":"","sources":["../../lib/map/CompareToggle.tsx"],"names":[],"mappings":";AAoDA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,MAAM,GACc;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,cAAc,CAAC,CAAA;IAEpE,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,iBAAO,SAAS,EAAC,6CAA6C,aAC7D,gBAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAI,kCAExG,EACP,WAAW,CAAC,CAAC,CAAC,CACd,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,yBAAyB,6BAEnE,EACR,kBACC,EAAE,EAAC,yBAAyB,EAC5B,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,cAAc,IAAI,EAAE,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,CAAC,CACd,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,yBAAyB,6BAEnE,EACR,kBACC,EAAE,EAAC,yBAAyB,EAC5B,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,cAAc,IAAI,EAAE,EAC3B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,EAC/D,QAAQ,EAAE,QAAQ,aAElB,iBAAQ,KAAK,EAAC,EAAE,qCAAyB,EACxC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACnB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,IACM,EACR,MAAM,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,yBAAyB,YAAE,MAAM,GAAK,CAAC,CAAC,CAAC,IAAI,IAC/D,CACN,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * Display and log build, model and runtime details for bug reports.
7
+ */
8
+ import { type ReactNode } from "react";
9
+ export interface DebugInfoProps {
10
+ /**
11
+ * The runtime's backend and model size (e.g. `wasm (28 MB int8)`); empty before the model loads.
12
+ */
13
+ activeBackend?: string;
14
+ /**
15
+ * The model version the runtime loaded.
16
+ *
17
+ * The training series.
18
+ * It differs from the npm version.
19
+ */
20
+ selectedVersion?: string | null;
21
+ /**
22
+ * Whether the asset bundle finished loading.
23
+ */
24
+ ready?: boolean;
25
+ }
26
+ export declare function DebugInfo({ activeBackend, selectedVersion, ready }: DebugInfoProps): ReactNode;
27
+ //# sourceMappingURL=DebugInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugInfo.d.ts","sourceRoot":"","sources":["../../lib/map/DebugInfo.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAsB,MAAM,OAAO,CAAA;AAI1D,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAA;CACf;AAcD,wBAAgB,SAAS,CAAC,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,EAAE,EAAE,cAAc,GAAG,SAAS,CAgC9F"}
@@ -0,0 +1,36 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @copyright Sister Software
4
+ * @license AGPL-3.0
5
+ * @author Teffen Ellis, et al.
6
+ *
7
+ * Display and log build, model and runtime details for bug reports.
8
+ */
9
+ import { useEffect, useMemo } from "react";
10
+ import { useBuildInfo } from "#common/useBuildInfo";
11
+ /**
12
+ * One row of the record, as a label and a value.
13
+ */
14
+ function Row({ label, value }) {
15
+ return (_jsxs("div", { className: "mw-debug-info__row", children: [_jsx("span", { className: "mw-debug-info__label", children: label }), _jsx("code", { className: "mw-debug-info__value", children: value })] }));
16
+ }
17
+ export function DebugInfo({ activeBackend, selectedVersion, ready }) {
18
+ const build = useBuildInfo();
19
+ // Memoized on the primitives it reads, so the log below fires when a value changes
20
+ // rather than on every render.
21
+ // A record rebuilt each render would be a new object each time and log continuously.
22
+ const record = useMemo(() => ({
23
+ app: build?.app ?? "—",
24
+ commit: build?.commit ?? build?.revision ?? "—",
25
+ buildTime: build?.buildTime ?? "—",
26
+ model: selectedVersion ?? "—",
27
+ backend: activeBackend || (ready ? "unknown" : "loading…"),
28
+ userAgent: typeof navigator !== "undefined" ? navigator.userAgent : "—",
29
+ }), [build?.app, build?.commit, build?.revision, build?.buildTime, selectedVersion, activeBackend, ready]);
30
+ useEffect(() => {
31
+ // eslint-disable-next-line no-console -- this is the feature: the record has to reach the console a reporter copies.
32
+ console.info("[mailwoman] debug info", record);
33
+ }, [record]);
34
+ return (_jsxs("div", { className: "mw-debug-info", children: [_jsx(Row, { label: "Build", value: record.app }), _jsx(Row, { label: "Commit", value: record.commit.slice(0, 12) }), _jsx(Row, { label: "Built", value: record.buildTime }), _jsx(Row, { label: "Model", value: record.model }), _jsx(Row, { label: "Backend", value: record.backend })] }));
35
+ }
36
+ //# sourceMappingURL=DebugInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugInfo.js","sourceRoot":"","sources":["../../lib/map/DebugInfo.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAkB,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAoBnD;;GAEG;AACH,SAAS,GAAG,CAAC,EAAE,KAAK,EAAE,KAAK,EAAoC;IAC9D,OAAO,CACN,eAAK,SAAS,EAAC,oBAAoB,aAClC,eAAM,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAQ,EACrD,eAAM,SAAS,EAAC,sBAAsB,YAAE,KAAK,GAAQ,IAChD,CACN,CAAA;AACF,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,EAAkB;IAClF,MAAM,KAAK,GAAG,YAAY,EAAE,CAAA;IAE5B,mFAAmF;IACnF,+BAA+B;IAC/B,qFAAqF;IACrF,MAAM,MAAM,GAAG,OAAO,CACrB,GAAG,EAAE,CAAC,CAAC;QACN,GAAG,EAAE,KAAK,EAAE,GAAG,IAAI,GAAG;QACtB,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,EAAE,QAAQ,IAAI,GAAG;QAC/C,S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
- * `<Geocoder>` — the WHOLE geocoder, composed. It is the map analogue of `PipelineExplorer`
7
- * and takes the SAME DI shape: an injected {@link GeocoderRuntime} (the host owns ONNX / httpvfs / R2 /
8
- * the composed map style) plus a {@link GeocoderPanels} bag (the host's ModelVisualizer / VersionCompare /
9
- * About / Permalink). Everything here is composition + a `ClientOnly` boundary:
10
- *
11
- * - the floating {@link GeocoderControls} panel (version / compare / backend / query+autocomplete / result),
12
- * - the declarative {@link MapCanvas} with the phase-2 overlays ({@link OverlayLayers}) and the
13
- * resolved-place marker/outline/camera ({@link ResolvedPlaceLayers}) driven by the parse state,
14
- * - the hooks that wire them: {@link useGeocode} (parse + viewport bias + map place),
15
- * {@link usePlaceAutocomplete}, {@link useCompareState}.
16
- *
17
- * Because it pulls {@link MapCanvas} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
18
- * the `@mailwoman/react/map` subpath ONLY — never the package root. The whole thing renders in Storybook
19
- * over a fake runtime (offline stub style + canned geocode) with no network, no ONNX, no gazetteer.
20
5
  */
21
6
  import { type ReactNode } from "react";
22
7
  import type { GeocoderPanels, GeocoderRuntime } from "#map/types";
23
8
  import type { Preset } from "../common/PresetChips.tsx";
9
+ /**
10
+ * Props for {@linkcode Geocoder}.
11
+ */
24
12
  export interface GeocoderProps {
25
13
  /**
26
- * The injected geocoder runtime (map style + overlays + parse + version/backend).
14
+ * The geocoder runtime supplies the map style and overlays.
15
+ *
16
+ * It also supplies the parser and version and backend controls.
27
17
  */
28
18
  runtime: GeocoderRuntime;
29
19
  /**
30
- * Host-injected panels (about, release blurb, compare, permalink, debug drawer, map controls, …).
20
+ * Panels supplied by the host.
31
21
  */
32
22
  panels?: GeocoderPanels;
33
23
  /**
34
- * Address to pre-fill.
24
+ * The address that pre-fills the search field.
25
+ * It is not run automatically.
35
26
  */
36
27
  defaultAddress?: string;
37
28
  /**
38
- * Example chips. @default the empty set (host supplies its own).
29
+ * A query to run once when the runtime is ready, such as a permalink's `?q=` value.
30
+ *
31
+ * Unlike {@link GeocoderProps.defaultAddress}, this query is submitted,
32
+ * so a shared link reproduces its result.
33
+ */
34
+ initialQuery?: string | null;
35
+ /**
36
+ * The example chips.
37
+ *
38
+ * @defaultValue []
39
39
  */
40
40
  presets?: ReadonlyArray<Preset>;
41
41
  /**
42
- * Open the developer disclosure on mount — the model version, the backend readout and compare. Collapsed by default
43
- * so the address field is the first thing a visitor meets. @default false
42
+ * Whether the developer panel starts open.
43
+ *
44
+ * @defaultValue `false`
44
45
  */
45
46
  developer?: boolean;
46
47
  /**
47
- * Fired with the query each time one is submitted. The host writes it into its own URL — this package never touches
48
- * `location`, because which parameter carries a query is the app's decision.
48
+ * Called with each user-submitted query.
49
+ *
50
+ * The host decides how to write the query to its URL.
51
+ * This package never touches `location`.
49
52
  */
50
53
  onSubmitQuery?: (query: string) => void;
51
54
  /**
52
- * Only hint the viewport bias once the visitor has zoomed past the global view — a whole-globe center is noise.
53
- * Matches the `map.getZoom() >= 4` threshold. @default 4
55
+ * The minimum map zoom at which the viewport is sent as a location bias.
56
+ *
57
+ * @defaultValue `4`
54
58
  */
55
59
  minBiasZoom?: number;
56
60
  /**
57
- * Fly/fit the map to the resolved place on each result (via {@link ResolvedPlaceLayers}). @default true. Set false
58
- * for a host that drives the camera itself (a controlled `<MapCanvas viewState>`), or to keep a headless test
59
- * deterministic — the marker + outline still render, only the animated camera move is skipped.
61
+ * Whether the map moves to each resolved place.
62
+ *
63
+ * Set it to false when the host controls the camera or a test needs a fixed view.
64
+ * The marker and outline render either way.
65
+ *
66
+ * @defaultValue `true`
60
67
  */
61
68
  applyResultCamera?: boolean;
62
69
  }
63
70
  /**
64
- * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
71
+ * Renders the map and search controls as one geocoder.
72
+ * It also renders host panels.
73
+ *
74
+ * It renders only on the client because MapLibre needs browser APIs.
75
+ * Import it from `@mailwoman/react/map`.
65
76
  */
66
- export declare function Geocoder({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, onSubmitQuery, }: GeocoderProps): ReactNode;
77
+ export declare function Geocoder({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, initialQuery, onSubmitQuery, }: GeocoderProps): ReactNode;
67
78
  //# sourceMappingURL=Geocoder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Geocoder.d.ts","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAGhF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAW,MAAM,YAAY,CAAA;AAO1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAMvD,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAgID;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACxB,OAAO,EACP,MAAkB,EAClB,cAAmB,EACnB,OAAoB,EACpB,WAAe,EACf,iBAAwB,EACxB,SAAiB,EACjB,aAAa,GACb,EAAE,aAAa,GAAG,SAAS,CAuB3B"}
1
+ {"version":3,"file":"Geocoder.d.ts","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAGhF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAW,MAAM,YAAY,CAAA;AAO1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAOvD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;;;OAIG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC/B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;;OAKG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAiID;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,EACxB,OAAO,EACP,MAAkB,EAClB,cAAmB,EACnB,OAAoB,EACpB,WAAe,EACf,iBAAwB,EACxB,SAAiB,EACjB,YAAmB,EACnB,aAAa,GACb,EAAE,aAAa,GAAG,SAAS,CAwB3B"}
@@ -3,21 +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
- * `<Geocoder>` — the WHOLE geocoder, composed. It is the map analogue of `PipelineExplorer`
8
- * and takes the SAME DI shape: an injected {@link GeocoderRuntime} (the host owns ONNX / httpvfs / R2 /
9
- * the composed map style) plus a {@link GeocoderPanels} bag (the host's ModelVisualizer / VersionCompare /
10
- * About / Permalink). Everything here is composition + a `ClientOnly` boundary:
11
- *
12
- * - the floating {@link GeocoderControls} panel (version / compare / backend / query+autocomplete / result),
13
- * - the declarative {@link MapCanvas} with the phase-2 overlays ({@link OverlayLayers}) and the
14
- * resolved-place marker/outline/camera ({@link ResolvedPlaceLayers}) driven by the parse state,
15
- * - the hooks that wire them: {@link useGeocode} (parse + viewport bias + map place),
16
- * {@link usePlaceAutocomplete}, {@link useCompareState}.
17
- *
18
- * Because it pulls {@link MapCanvas} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
19
- * the `@mailwoman/react/map` subpath ONLY — never the package root. The whole thing renders in Storybook
20
- * over a fake runtime (offline stub style + canned geocode) with no network, no ONNX, no gazetteer.
21
6
  */
22
7
  import { useCallback, useEffect, useRef, useState } from "react";
23
8
  import { useCompareState } from "#map/useCompareState";
@@ -26,32 +11,32 @@ import { useMapPlaceRender } from "#map/useMapPlaceRender";
26
11
  import { usePlaceAutocomplete } from "#map/usePlaceAutocomplete";
27
12
  import { ClientOnly } from "../common/ClientOnly.js";
28
13
  import { GeocoderControls } from "./GeocoderControls.js";
14
+ import { GraticuleLayer } from "./GraticuleLayer.js";
29
15
  import { MapCanvas } from "./MapCanvas.js";
30
16
  import { OverlayLayers } from "./OverlayLayers.js";
31
17
  import { ResolvedPlaceLayers } from "./ResolvedPlaceLayers.js";
32
- function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, onSubmitQuery, }) {
18
+ function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, initialQuery, onSubmitQuery, }) {
33
19
  const mapRef = useRef(null);
34
- // The chrome sits OUTSIDE `<MapCanvas>`, so it cannot take the handle from `useMap()`. A ref alone does not
35
- // re-render the compass or the layer control when the map arrives, so the same poll that publishes the test
36
- // handle also puts it in state — one poll, two consumers.
20
+ // The controls render outside `<MapCanvas>` and cannot call `useMap()`.
21
+ // The map is kept in state so they re-render when it loads.
37
22
  const [map, setMap] = useState(null);
38
- // The map announces itself; nothing polls for it. `onLoad` carries the instance, so the compass and the layer
39
- // control render on the frame the map is ready rather than up to an interval later.
40
- //
41
- // TEST INJECTION POINT: the e2e viewport-bias suite drives the REAL map (pan + zoom past the bias threshold)
42
- // before submitting, and a browser test cannot reach a React ref — so the same handle is republished on
43
- // `globalThis.__mailwomanMapCanvas`, and cleared on unmount so a torn-down geocoder leaves no stale handle.
23
+ // The graticule is inserted before the first non-background layer, so it draws under the data layers.
24
+ const [baseLayerID, setBaseLayerID] = useState(undefined);
25
+ // Overlays are inserted before the first label layer, so place names stay readable over a fill.
26
+ const [labelLayerID, setLabelLayerID] = useState(undefined);
44
27
  const onMapLoad = useCallback((event) => {
28
+ // Browser tests read the map from this global.
45
29
  ;
46
30
  globalThis.__mailwomanMapCanvas = event.target;
47
31
  setMap(event.target);
32
+ const layers = event.target.getStyle()?.layers ?? [];
33
+ setBaseLayerID(layers.find((layer) => layer.type !== "background")?.id);
34
+ setLabelLayerID(layers.find((layer) => layer.type === "symbol")?.id);
48
35
  }, []);
49
36
  useEffect(() => () => {
50
37
  setMap(null);
51
38
  delete globalThis.__mailwomanMapCanvas;
52
39
  }, []);
53
- // Read the viewport bias at submit time — through the map handle, never a threaded state value, so granting/zooming
54
- // mid-session doesn't re-create the parse callback. Below the min-bias zoom, a whole-globe center is noise → null.
55
40
  const getBias = useCallback(() => {
56
41
  const live = mapRef.current?.getMap();
57
42
  if (!live)
@@ -74,25 +59,26 @@ function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom,
74
59
  runtime.selectVersion?.(version);
75
60
  compare.clearIfPrimary(version);
76
61
  }, [runtime, compare]);
77
- const onForceWASMChange = useCallback((forceWASM) => runtime.setForceWASM?.(forceWASM), [runtime]);
78
62
  return (_jsxs("div", { className: "mw-geocoder-demo", children: [_jsx("div", { className: "mw-geocoder-demo__map", children: _jsxs(MapCanvas, { mapStyle: runtime.mapStyle, mapRef: mapRef, initialViewState: {
79
63
  longitude: runtime.initialCenter[0],
80
64
  latitude: runtime.initialCenter[1],
81
65
  zoom: runtime.initialZoom ?? 3,
82
66
  }, style: { width: "100%", height: "100%" },
83
- // One compact attribution pill (the map's own default is a wide, always-open "MapLibre | © …" bar), no
84
- // maplibre wordmark logo.
85
- mapProps: { attributionControl: { compact: true }, maplibreLogo: false, onLoad: onMapLoad }, children: [_jsx(OverlayLayers, { overlays: runtime.overlays }), _jsx(ResolvedPlaceLayers, { spec: spec, applyCamera: applyResultCamera }), panels.mapControls] }) }), _jsx(GeocoderControls, { runtime: runtime, geocode: geocode, autocomplete: autocomplete, compare: compare, panels: panels, presets: presets, placeholder: defaultAddress, map: map, onSubmitQuery: onSubmitQuery, onSelectVersion: onSelectVersion, onForceWASMChange: onForceWASMChange, developer: developer }), panels.debugDrawer ? panels.debugDrawer({ result: geocode.result }) : null] }));
67
+ // The attribution is compact.
68
+ // The MapLibre logo is hidden.
69
+ mapProps: { attributionControl: { compact: true }, maplibreLogo: false, onLoad: onMapLoad }, children: [_jsx(GraticuleLayer, { beforeID: baseLayerID }), _jsx(OverlayLayers, { overlays: runtime.overlays, beforeID: labelLayerID }), _jsx(ResolvedPlaceLayers, { spec: spec, applyCamera: applyResultCamera }), panels.mapControls] }) }), _jsx(GeocoderControls, { runtime: runtime, geocode: geocode, autocomplete: autocomplete, compare: compare, panels: panels, presets: presets, placeholder: defaultAddress, initialQuery: initialQuery, map: map, onSubmitQuery: onSubmitQuery, onSelectVersion: onSelectVersion, developer: developer }), panels.debugDrawer ? panels.debugDrawer({ result: geocode.result }) : null] }));
86
70
  }
87
- /**
88
- * Stable empty defaults — a fresh `{}`/`[]` per render would churn every downstream memo dep.
89
- */
71
+ // These defaults are module constants so each render sees the same reference and memo dependencies stay stable.
90
72
  const NO_PANELS = {};
91
73
  const NO_PRESETS = [];
92
74
  /**
93
- * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
75
+ * Renders the map and search controls as one geocoder.
76
+ * It also renders host panels.
77
+ *
78
+ * It renders only on the client because MapLibre needs browser APIs.
79
+ * Import it from `@mailwoman/react/map`.
94
80
  */
95
- export function Geocoder({ runtime, panels = NO_PANELS, defaultAddress = "", presets = NO_PRESETS, minBiasZoom = 4, applyResultCamera = true, developer = false, onSubmitQuery, }) {
96
- return (_jsx(ClientOnly, { fallback: _jsx("div", { className: "mw-geocoder-demo", children: _jsx("p", { children: "Loading the geocoder\u2026" }) }), children: () => (_jsx(GeocoderInner, { runtime: runtime, panels: panels, defaultAddress: defaultAddress, presets: presets, minBiasZoom: minBiasZoom, applyResultCamera: applyResultCamera, developer: developer, onSubmitQuery: onSubmitQuery })) }));
81
+ export function Geocoder({ runtime, panels = NO_PANELS, defaultAddress = "", presets = NO_PRESETS, minBiasZoom = 4, applyResultCamera = true, developer = false, initialQuery = null, onSubmitQuery, }) {
82
+ return (_jsx(ClientOnly, { fallback: _jsx("div", { className: "mw-geocoder-demo", children: _jsx("p", { children: "Loading the geocoder\u2026" }) }), children: () => (_jsx(GeocoderInner, { runtime: runtime, panels: panels, defaultAddress: defaultAddress, presets: presets, minBiasZoom: minBiasZoom, applyResultCamera: applyResultCamera, developer: developer, initialQuery: initialQuery, onSubmitQuery: onSubmitQuery })) }));
97
83
  }
98
84
  //# sourceMappingURL=Geocoder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Geocoder.js","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAkB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAIhF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAA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ACpC,MAAM,UAAU,GAA0B,EAAE,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,UAAU,QAAQ,CAAC,EACxB,OAAO,EACP,MAAM,GAAG,SAAS,EAClB,cAAc,GAAG,EAAE,EACnB,OAAO,GAAG,UAAU,EACpB,WAAW,GAAG,CAAC,EACf,iBAAiB,GAAG,IAAI,EACxB,SAAS,GAAG,KAAK,EACjB,YAAY,GAAG,IAAI,EACnB,aAAa,GACE;IACf,OAAO,CACN,KAAC,UAAU,IACV,QAAQ,EACP,cAAK,SAAS,EAAC,kBAAkB,YAChC,qDAA4B,GACvB,YAGN,GAAG,EAAE,CAAC,CACN,KAAC,aAAa,IACb,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,aAAa,EAAE,aAAa,GAC3B,CACF,GACW,CACb,CAAA;AACF,CAAC"}
@@ -2,15 +2,6 @@
2
2
  * @copyright Sister Software
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
- *
6
- * The geocoder's chrome over the map: a search pill on top, example chips on one line beneath it, a control column
7
- * down the right edge, and a result sheet that rises from the bottom when there is something to show.
8
- *
9
- * It replaces a 400px full-height panel that carried every control at once. The layout is the one the reference
10
- * map apps use, and the reason is the map: chrome that floats over it leaves the map the page, where a slab makes
11
- * the map the leftover third.
12
- *
13
- * NODE-SAFE: pure React + the shared units, no maplibre.
14
5
  */
15
6
  import { type ReactNode } from "react";
16
7
  import type { MapInstance } from "react-map-gl/maplibre";
@@ -19,63 +10,43 @@ import type { UseCompareState } from "#map/useCompareState";
19
10
  import type { UseGeocode } from "#map/useGeocode";
20
11
  import type { UsePlaceAutocomplete } from "#map/usePlaceAutocomplete";
21
12
  import type { Preset } from "../common/PresetChips.tsx";
13
+ /**
14
+ * Props for {@linkcode GeocoderControls}.
15
+ */
22
16
  export interface GeocoderControlsProps {
23
- /**
24
- * The injected geocoder runtime.
25
- */
26
17
  runtime: GeocoderRuntime;
27
- /**
28
- * The parse+resolve state machine.
29
- */
30
18
  geocode: UseGeocode;
31
- /**
32
- * The place-autocomplete combobox state.
33
- */
34
19
  autocomplete: UsePlaceAutocomplete;
35
- /**
36
- * The compare-mode state.
37
- */
38
20
  compare: UseCompareState;
39
21
  /**
40
- * Host-injected panels (about, release blurb, compare, permalink, extras, failure).
22
+ * A query from the URL to run once the runtime is ready.
41
23
  */
24
+ initialQuery?: string | null;
42
25
  panels: GeocoderPanels;
43
- /**
44
- * Example chips.
45
- */
46
26
  presets: ReadonlyArray<Preset>;
47
27
  /**
48
- * Input placeholder.
28
+ * The input placeholder.
29
+ *
30
+ * The field also selects its value on focus while it still equals this text.
49
31
  */
50
32
  placeholder: string;
51
- /**
52
- * The live map, for the controls that read it: the compass takes its bearing, the host's layer control reads its
53
- * style. `null` until react-map-gl instantiates the map.
54
- */
55
33
  map?: MapInstance | null;
56
34
  /**
57
- * Fired with the query whenever one is submitted, before the parse starts. The host writes it into the URL; this
58
- * package never touches `location`, because the address bar is the app's state, not a control's.
35
+ * Called before each user-initiated query, so the host can write the query to its URL.
59
36
  */
60
37
  onSubmitQuery?: (query: string) => void;
61
- /**
62
- * Select a model version (the composed geocoder also clears a now-colliding compare selection).
63
- */
64
38
  onSelectVersion: (version: string) => void;
65
39
  /**
66
- * Toggle the forced WASM backend.
67
- */
68
- onForceWASMChange: (forceWASM: boolean) => void;
69
- /**
70
- * Open the developer panel on mount. The model version, the backend readout and compare live inside it: they read on
71
- * the model rather than on an address, and above the query field they were the first thing every visitor met.
40
+ * Whether the developer panel starts open.
72
41
  *
73
- * @default false
42
+ * @defaultValue `false`
74
43
  */
75
44
  developer?: boolean;
76
45
  }
77
46
  /**
78
- * The chrome. Everything positioned here floats over the map; nothing occupies a column of the page.
47
+ * Renders the search and result panels, map control rail and side sheets over the map.
48
+ *
49
+ * On narrow screens, users can drag the search panel between bottom-drawer detents.
79
50
  */
80
- export declare function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, map, onSubmitQuery, onSelectVersion, onForceWASMChange, developer, }: GeocoderControlsProps): ReactNode;
51
+ export declare function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, map, initialQuery, onSubmitQuery, onSelectVersion, developer, }: GeocoderControlsProps): ReactNode;
81
52
  //# sourceMappingURL=GeocoderControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeocoderControls.d.ts","sourceRoot":"","sources":["../../lib/map/GeocoderControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAyB,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAGjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAGrE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAavD,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,UAAU,CAAA;IACnB;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAA;IAClC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;;OAGG;I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