@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
@@ -0,0 +1,282 @@
1
+ /* ---------------------------------------------------------------------------
2
+ * The docs search modal.
3
+ *
4
+ * The native <dialog> has zero padding, so the only click whose target is the dialog element itself is a click on
5
+ * the backdrop. The padding sits on the form, the body and the footer instead.
6
+ *
7
+ * The selected option is marked by an inset accent bar as well as a fill, so the selection holds 3:1 against the
8
+ * panel without depending on the fill alone. Colors, radii, spacing, type and motion read semantic tokens from
9
+ * tokens.css. The layout literals are the panel width and height caps, the 44px input height, the 3px selection
10
+ * bar, the 640px phone breakpoint, the icon size and the backdrop scrim, for which no token exists.
11
+ * --------------------------------------------------------------------------- */
12
+
13
+ .mw-search {
14
+ width: min(40rem, 92vw);
15
+ max-height: 70vh;
16
+ margin: 12vh auto 0;
17
+ padding: 0;
18
+ overflow: hidden;
19
+ color: var(--color-text-primary);
20
+ font-family: var(--font-family-text);
21
+ font-size: var(--font-size-callout);
22
+ line-height: var(--line-height-body);
23
+ background: var(--color-background-raised);
24
+ border: 1px solid var(--control-border);
25
+ border-radius: var(--radius-panel);
26
+ box-shadow: var(--material-glass-shadow);
27
+ }
28
+
29
+ .mw-search[open] {
30
+ display: flex;
31
+ flex-direction: column;
32
+ }
33
+
34
+ .mw-search::backdrop {
35
+ background: oklch(0% 0 264 / 0.5);
36
+ }
37
+
38
+ .mw-search__form {
39
+ display: flex;
40
+ gap: var(--space-3);
41
+ align-items: center;
42
+ padding: var(--space-4) var(--space-5);
43
+ border-bottom: 1px solid var(--color-separator);
44
+ }
45
+
46
+ .mw-search__field {
47
+ display: flex;
48
+ flex: 1 1 auto;
49
+ gap: var(--space-3);
50
+ align-items: center;
51
+ min-height: 44px;
52
+ padding: 0 var(--space-4);
53
+ color: var(--control-foreground);
54
+ background: var(--control-background);
55
+ border: 1px solid var(--control-border);
56
+ border-radius: var(--radius-control);
57
+ }
58
+
59
+ .mw-search__field:focus-within {
60
+ outline: 2px solid var(--color-accent);
61
+ outline-offset: 1px;
62
+ }
63
+
64
+ .mw-search__icon {
65
+ flex: 0 0 auto;
66
+ width: 20px;
67
+ height: 20px;
68
+ color: var(--color-accent);
69
+ }
70
+
71
+ .mw-search__icon--spinning {
72
+ animation: mw-search-spin 0.8s linear infinite;
73
+ }
74
+
75
+ .mw-search__input {
76
+ flex: 1 1 auto;
77
+ min-width: 0;
78
+ padding: var(--space-3) 0;
79
+ color: inherit;
80
+ font: inherit;
81
+ font-size: var(--font-size-body);
82
+ background: transparent;
83
+ border: 0;
84
+ outline: 0;
85
+ }
86
+
87
+ .mw-search__cancel {
88
+ display: none;
89
+ padding: var(--space-2) var(--space-3);
90
+ color: var(--color-accent);
91
+ font: inherit;
92
+ background: transparent;
93
+ border: 0;
94
+ cursor: pointer;
95
+ }
96
+
97
+ .mw-search__corrected {
98
+ margin: 0;
99
+ padding: var(--space-3) var(--space-5) 0;
100
+ color: var(--color-text-secondary);
101
+ font-size: var(--font-size-footnote);
102
+ }
103
+
104
+ .mw-search__body {
105
+ flex: 1 1 auto;
106
+ min-height: 0;
107
+ padding: var(--space-3) var(--space-4);
108
+ overflow-y: auto;
109
+ }
110
+
111
+ .mw-search__category {
112
+ padding: var(--space-4) var(--space-4) var(--space-2);
113
+ color: var(--color-text-secondary);
114
+ font-size: var(--font-size-footnote);
115
+ font-weight: var(--font-weight-semibold);
116
+ }
117
+
118
+ .mw-search__recent-list {
119
+ margin: 0;
120
+ padding: 0;
121
+ list-style: none;
122
+ }
123
+
124
+ .mw-search__recent-item {
125
+ display: flex;
126
+ align-items: center;
127
+ border-radius: var(--radius-control);
128
+ }
129
+
130
+ .mw-search__recent-item:hover {
131
+ background: var(--color-background-sunken);
132
+ }
133
+
134
+ .mw-search__recent-query {
135
+ flex: 1 1 auto;
136
+ padding: var(--space-3) var(--space-4);
137
+ color: inherit;
138
+ font: inherit;
139
+ text-align: left;
140
+ background: transparent;
141
+ border: 0;
142
+ cursor: pointer;
143
+ }
144
+
145
+ .mw-search__recent-remove {
146
+ flex: 0 0 auto;
147
+ width: 44px;
148
+ height: 44px;
149
+ color: var(--color-text-secondary);
150
+ font: inherit;
151
+ font-size: var(--font-size-body);
152
+ background: transparent;
153
+ border: 0;
154
+ cursor: pointer;
155
+ }
156
+
157
+ .mw-search__recent-remove:hover,
158
+ .mw-search__recent-remove:focus-visible {
159
+ color: var(--color-text-primary);
160
+ }
161
+
162
+ .mw-search__empty {
163
+ margin: 0;
164
+ padding: var(--space-5) var(--space-4);
165
+ color: var(--color-text-secondary);
166
+ text-align: center;
167
+ }
168
+
169
+ .mw-search__option {
170
+ border-radius: var(--radius-control);
171
+ display: flex;
172
+ flex-direction: column;
173
+ gap: var(--space-1);
174
+ padding: var(--space-3) var(--space-4);
175
+ color: inherit;
176
+ text-decoration: none;
177
+ }
178
+
179
+ .mw-search__option--section {
180
+ padding-left: calc(var(--space-4) + var(--space-5));
181
+ }
182
+
183
+ .mw-search__option[aria-selected="true"] {
184
+ background: var(--color-background-sunken);
185
+ box-shadow: inset 3px 0 0 var(--color-accent);
186
+ }
187
+
188
+ .mw-search__path {
189
+ color: var(--color-text-secondary);
190
+ font-size: var(--font-size-footnote);
191
+ }
192
+
193
+ .mw-search__title {
194
+ font-size: var(--font-size-subheadline);
195
+ font-weight: var(--font-weight-semibold);
196
+ }
197
+
198
+ .mw-search__snippet {
199
+ color: var(--color-text-secondary);
200
+ font-size: var(--font-size-footnote);
201
+ }
202
+
203
+ .mw-search mark {
204
+ color: var(--color-text-primary);
205
+ font-weight: var(--font-weight-semibold);
206
+ background: var(--color-accent-background);
207
+ border-radius: var(--radius-tick);
208
+ }
209
+
210
+ .mw-search__footer {
211
+ display: flex;
212
+ gap: var(--space-4);
213
+ align-items: center;
214
+ justify-content: space-between;
215
+ padding: var(--space-3) var(--space-5);
216
+ color: var(--color-text-secondary);
217
+ font-size: var(--font-size-footnote);
218
+ border-top: 1px solid var(--color-separator);
219
+ }
220
+
221
+ .mw-search__status {
222
+ margin: 0;
223
+ }
224
+
225
+ .mw-search__hints {
226
+ display: flex;
227
+ gap: var(--space-4);
228
+ margin: 0;
229
+ padding: 0;
230
+ list-style: none;
231
+ }
232
+
233
+ .mw-search__hints kbd {
234
+ display: inline-block;
235
+ min-width: 1.5em;
236
+ margin-right: var(--space-1);
237
+ padding: 0 var(--space-1);
238
+ font: inherit;
239
+ text-align: center;
240
+ background: var(--color-background-sunken);
241
+ border: 1px solid var(--control-border);
242
+ border-radius: var(--radius-tick);
243
+ }
244
+
245
+ @media (width <= 640px) {
246
+ .mw-search {
247
+ width: 100vw;
248
+ max-width: none;
249
+ height: 100dvh;
250
+ max-height: none;
251
+ margin: 0;
252
+ border: 0;
253
+ border-radius: 0;
254
+ }
255
+
256
+ .mw-search__cancel {
257
+ display: inline-block;
258
+ }
259
+
260
+ .mw-search__hints {
261
+ display: none;
262
+ }
263
+ }
264
+
265
+ @media (prefers-reduced-motion: no-preference) {
266
+ .mw-search[open] {
267
+ animation: mw-search-open var(--duration-standard) var(--easing-decelerate);
268
+ }
269
+ }
270
+
271
+ @keyframes mw-search-open {
272
+ from {
273
+ opacity: 0;
274
+ transform: translateY(calc(var(--space-4) * -1));
275
+ }
276
+ }
277
+
278
+ @keyframes mw-search-spin {
279
+ to {
280
+ transform: rotate(360deg);
281
+ }
282
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * The record the docs build indexes and the response the search modal renders. The modal and the
7
+ * query code share these through `import type`.
8
+ */
9
+
10
+ /**
11
+ * The number of hierarchy entries: the sidebar category, then `h1` through `h6`.
12
+ */
13
+ export const HIERARCHY_DEPTH = 7
14
+
15
+ export interface SearchRecord {
16
+ /**
17
+ * The first 32 hex characters of `sha256(url + "#" + anchor + "\n" + position)`.
18
+ */
19
+ id: string
20
+ /**
21
+ * Site-relative path without the anchor, such as `/docs/developers/reference/cli`.
22
+ */
23
+ url: string
24
+ /**
25
+ * The heading id the record links to, or the empty string for the top of the page.
26
+ */
27
+ anchor: string
28
+ /**
29
+ * Seven entries, `lvl0` through `lvl6`, with `null` below the record's own level.
30
+ */
31
+ hierarchy: (string | null)[]
32
+ /**
33
+ * Aggregated text under the heading, or the empty string for a heading without body text.
34
+ */
35
+ content: string
36
+ /**
37
+ * Depth of the deepest non-null hierarchy entry, 0 through 6.
38
+ */
39
+ level: number
40
+ /**
41
+ * Zero-based order of the record on its page.
42
+ */
43
+ position: number
44
+ }
45
+
46
+ export interface SearchHit {
47
+ url: string
48
+ anchor: string
49
+ hierarchy: (string | null)[]
50
+ /**
51
+ * At most 160 characters of content around the first match.
52
+ */
53
+ snippet: string
54
+ /**
55
+ * Character ranges within `snippet` that matched a query token.
56
+ */
57
+ highlights: [start: number, end: number][]
58
+ }
59
+
60
+ export interface SearchResponse {
61
+ query: string
62
+ /**
63
+ * The text actually searched when a token was corrected against the vocabulary.
64
+ * It is `null` when no token was.
65
+ */
66
+ corrected: string | null
67
+ hits: SearchHit[]
68
+ }
package/lib/search.ts ADDED
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file The docs search modal and its wire types.
6
+ */
7
+
8
+ export { hitHref, SearchModal } from "./search/SearchModal.tsx"
9
+ export type { SearchModalProps } from "./search/SearchModal.tsx"
10
+ export { HIERARCHY_DEPTH } from "./search/types.ts"
11
+ export type { SearchHit, SearchRecord, SearchResponse } from "./search/types.ts"
@@ -3,17 +3,17 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `About` — the explainer for the browser geocoder: the neural model, the confidence colours, the gazetteer
7
- * resolver, the byte-range database and the FST prior. Prose about the product a host places above or beside the
8
- * geocoder; it renders nothing live.
6
+ * `About` — the explainer for the browser geocoder: the neural model, the confidence colors, the gazetteer resolver, the byte-range database and the FST prior. It renders no live content.
9
7
  */
10
8
  import type { ReactNode } from "react";
11
9
  export interface AboutProps {
12
10
  /**
13
- * Wrap the prose in its own `<details>` disclosure. Set false where the host is already the disclosure — inside a
14
- * sheet opened by an About button, a summary repeating that button's words is one control too many.
11
+ * Wraps the prose in its own `<details>` disclosure.
15
12
  *
16
- * @default true
13
+ * Set false where the host is already the disclosure, because a summary repeating
14
+ * an About button's words is one control too many.
15
+ *
16
+ * @defaultValue `true`
17
17
  */
18
18
  collapsible?: boolean;
19
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"About.d.ts","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,UAAU;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,KAAK,CAAC,EAAE,WAAkB,EAAE,GAAE,UAAe,GAAG,SAAS,CAkFxE"}
1
+ {"version":3,"file":"About.d.ts","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,UAAU;IAC1B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,KAAK,CAAC,EAAE,WAAkB,EAAE,GAAE,UAAe,GAAG,SAAS,CAkFxE"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export function About({ collapsible = true } = {}) {
3
- const body = (_jsxs("div", { className: "mw-about__body", children: [_jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Neural model" }), _jsxs("p", { children: ["A ~29M-parameter BERT-style encoder classifies each token into one of 33 BIO labels covering 16 address components (street, house number, unit, locality, region, postcode, venue, country, intersection, etc.). It runs entirely in your browser via ", _jsx("strong", { children: "onnxruntime-web" }), " (WebGPU with WASM SIMD fallback). The model ships as a 37.6 MB int8-quantized ONNX bundle; fp32 weights are also available for higher accuracy."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Confidence colors" }), _jsx("p", { children: "Every classified span carries a confidence score between 0 and 1. The colors in the results table give you a quick visual read:" }), _jsxs("ul", { className: "mw-about__legend", children: [_jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--high" }), _jsx("strong", { children: "Green" }), " (\u2265 0.8) \u2014 high confidence. The model is nearly certain."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--mid" }), _jsx("strong", { children: "Amber" }), " (0.5\u20130.8) \u2014 moderate confidence. Worth verifying."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--low" }), _jsx("strong", { children: "Red" }), " (< 0.5) \u2014 low confidence. The model is unsure \u2014 likely wrong."] })] }), _jsxs("p", { children: ["These are raw model scores. For calibrated probabilities, the library ships a per-locale isotonic calibrator (", _jsx("code", { children: "calibration.json" }), ") that maps the raw scores to well-calibrated probability estimates."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "WOF resolver" }), _jsxs("p", { children: ["After classification, the resolver queries a ", _jsx("strong", { children: "Who's On First" }), " (WOF) SQLite gazetteer to match the parsed components \u2014 locality, region, and postcode \u2014 against real-world places with coordinates. The cascade tries postcode first (most precise), then locality, then the raw input text. The result is a sorted list of candidate places with WOF IDs, placetypes, lat/lon, and bounding boxes."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Byte-range gazetteer" }), _jsxs("p", { children: ["The gazetteer is a multi-gigabyte SQLite file served from a public bucket. It loads via", " ", _jsx("strong", { children: "sql.js-httpvfs" }), ", which range-requests only the pages a lookup touches, so your browser fetches a few hundred kilobytes per session instead of the whole file."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "FST prior" }), _jsxs("p", { children: ["A ", _jsx("strong", { children: "finite-state transducer" }), " (FST) built from ~94K US place names runs before the neural classifier. It pre-annotates known locality, region, and postcode spans in the input \u2014 places like \"Springfield\" or \"Cook County\" that the FST can match exactly. These \"FST prior\" hits feed the classifier as strong hints, improving locality and region recall on addresses where the neural model alone might miss them. The FST is active whenever the selected release includes it."] })] })] }));
3
+ const body = (_jsxs("div", { className: "mw-about__body", children: [_jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Neural model" }), _jsxs("p", { children: ["A ~29M-parameter BERT-style encoder classifies each token into one of 33 BIO labels covering 16 address components (street, house number, unit, locality, region, postcode, venue, country, intersection, etc.). It runs entirely in your browser via ", _jsx("strong", { children: "onnxruntime-web" }), " on its WASM SIMD backend. The model ships as a 37.6 MB int8-quantized ONNX bundle; fp32 weights are also available for higher accuracy."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Confidence colors" }), _jsx("p", { children: "Every classified span carries a confidence score between 0 and 1. The colors in the results table give you a quick visual read:" }), _jsxs("ul", { className: "mw-about__legend", children: [_jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--high" }), _jsx("strong", { children: "Green" }), " (\u2265 0.8) \u2014 high confidence. The model is nearly certain."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--mid" }), _jsx("strong", { children: "Amber" }), " (0.5\u20130.8) \u2014 moderate confidence. Worth verifying."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--low" }), _jsx("strong", { children: "Red" }), " (< 0.5) \u2014 low confidence. The model is unsure \u2014 likely wrong."] })] }), _jsxs("p", { children: ["These are raw model scores. For calibrated probabilities, the library ships a per-locale isotonic calibrator (", _jsx("code", { children: "calibration.json" }), ") that maps the raw scores to well-calibrated probability estimates."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "WOF resolver" }), _jsxs("p", { children: ["After classification, the resolver queries a ", _jsx("strong", { children: "Who's On First" }), " (WOF) SQLite gazetteer to match the parsed components \u2014 locality, region, and postcode \u2014 against real-world places with coordinates. The cascade tries postcode first (most precise), then locality, then the raw input text. The result is a sorted list of candidate places with WOF IDs, placetypes, lat/lon, and bounding boxes."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Byte-range gazetteer" }), _jsxs("p", { children: ["The gazetteer is a multi-gigabyte SQLite file served from a public bucket. It loads via", " ", _jsx("strong", { children: "sqlite-wasm" }), " over a read-only HTTP file system. It range-requests only the pages a lookup touches. Therefore, your browser fetches a few hundred kilobytes per session instead of the whole file."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "FST prior" }), _jsxs("p", { children: ["A ", _jsx("strong", { children: "finite-state transducer" }), " (FST) built from ~94K US place names runs before the neural classifier. It pre-annotates known locality, region, and postcode spans in the input \u2014 places like \"Springfield\" or \"Cook County\" that the FST can match exactly. These \"FST prior\" hits feed the classifier as strong hints, improving locality and region recall on addresses where the neural model alone might miss them. The FST is active whenever the selected release includes it."] })] })] }));
4
4
  if (!collapsible)
5
5
  return body;
6
6
  return (_jsxs("details", { className: "mw-about", children: [_jsxs("summary", { className: "mw-about__summary", children: [_jsx("span", { className: "mw-about__icon", children: "\u2139\uFE0F" }), "About this geocoder"] }), body] }));
@@ -1 +1 @@
1
- {"version":3,"file":"About.js","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":";AAsBA,MAAM,UAAU,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,EAAE,GAAe,EAAE;IAC5D,MAAM,IAAI,GAAG,CACZ,eAAK,SAAS,EAAC,gBAAgB,aAC9B,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,6BAAkB,EACnD,kRAGmC,+CAAgC,wJAE/D,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,kCAAuB,EACxD,0JAGI,EACJ,cAAI,SAAS,EAAC,kBAAkB,aAC/B,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,yCAAyC,GAAG,EAC5D,qCAAsB,0EAClB,EACL,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,wCAAwC,GAAG,EAC3D,qCAAsB,oEAClB,EACL,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,wCAAwC,GAAG,EAC3D,mCAAoB,gFAChB,IACD,EACL,0IAEC,8CAA6B,4EAC1B,IACK,EAEV,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AS,EAAC,wCAAwC,GAAG,EAC3D,mCAAoB,gFAChB,IACD,EACL,0IAEC,8CAA6B,4EAC1B,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,6BAAkB,EACnD,yEAC8C,8CAAoC,uVAI9E,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,qCAA0B,EAC3D,mHACyF,GAAG,EAC3F,2CAA4B,6LAEzB,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,0BAAe,EAChD,8BACG,uDAAwC,0cAKvC,IACK,IACL,CACN,CAAA;IAED,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAA;IAE7B,OAAO,CACN,mBAAS,SAAS,EAAC,UAAU,aAC5B,mBAAS,SAAS,EAAC,mBAAmB,aACrC,eAAM,SAAS,EAAC,gBAAgB,6BAAU,2BAEjC,EACT,IAAI,IACI,CACV,CAAA;AACF,CAAC"}
@@ -3,21 +3,12 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `ClientOnly` — a portable SSR boundary. The docs explorers wrapped Docusaurus's `<BrowserOnly>`;
7
- * this is the framework-agnostic equivalent so the components stay usable in any React app (Next,
8
- * Remix, Docusaurus). It renders `fallback` on the server and the first client paint, then swaps to
9
- * `children()` once mounted — keeping timers, clipboard, and dynamic imports off the server render.
10
- *
11
- * The mount flag comes from `useSyncExternalStore` with a constant snapshot pair — `false` on the
12
- * server, `true` in the browser — which is the store-shaped statement of exactly this boundary. The
13
- * earlier `useState(false)` + `useEffect(() => setMounted(true))` said the same thing with a
14
- * render-cascade the react(set-state-in-effect) rule rightly flags: the second render was the
15
- * mechanism, not an accident, and the store form gets the same second paint without a set-state.
6
+ * `ClientOnly` — a portable SSR boundary that renders `fallback` on the server and first client paint. It swaps to `children()` after mounting, keeping timers, clipboard and dynamic imports off the server render.
16
7
  */
17
8
  import { type ReactNode } from "react";
18
9
  export interface ClientOnlyProps {
19
10
  /**
20
- * Rendered once mounted in the browser. A thunk so its (browser-only) imports never run on the server.
11
+ * Rendered once mounted in the browser, as a thunk so its browser-only imports never run on the server.
21
12
  */
22
13
  children: () => ReactNode;
23
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ClientOnly.d.ts","sourceRoot":"","sources":["../../lib/common/ClientOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAA;AAS5D,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,SAAS,CAAA;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,eAAe,GAAG,SAAS,CAQpF"}
1
+ {"version":3,"file":"ClientOnly.d.ts","sourceRoot":"","sources":["../../lib/common/ClientOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAA;AAM5D,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,QAAQ,EAAE,MAAM,SAAS,CAAA;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAe,EAAE,EAAE,eAAe,GAAG,SAAS,CAQpF"}
@@ -3,21 +3,9 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `ClientOnly` — a portable SSR boundary. The docs explorers wrapped Docusaurus's `<BrowserOnly>`;
7
- * this is the framework-agnostic equivalent so the components stay usable in any React app (Next,
8
- * Remix, Docusaurus). It renders `fallback` on the server and the first client paint, then swaps to
9
- * `children()` once mounted — keeping timers, clipboard, and dynamic imports off the server render.
10
- *
11
- * The mount flag comes from `useSyncExternalStore` with a constant snapshot pair — `false` on the
12
- * server, `true` in the browser — which is the store-shaped statement of exactly this boundary. The
13
- * earlier `useState(false)` + `useEffect(() => setMounted(true))` said the same thing with a
14
- * render-cascade the react(set-state-in-effect) rule rightly flags: the second render was the
15
- * mechanism, not an accident, and the store form gets the same second paint without a set-state.
6
+ * `ClientOnly` — a portable SSR boundary that renders `fallback` on the server and first client paint. It swaps to `children()` after mounting, keeping timers, clipboard and dynamic imports off the server render.
16
7
  */
17
8
  import { useSyncExternalStore } from "react";
18
- /**
19
- * The boundary never changes after mount, so nothing ever notifies.
20
- */
21
9
  function subscribeNever() {
22
10
  return () => { };
23
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ClientOnly.js","sourceRoot":"","sources":["../../lib/common/ClientOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAkB,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAE5D;;GAEG;AACH,SAAS,cAAc;IACtB,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;AAChB,CAAC;AAaD,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAmB;IACxE,MAAM,OAAO,GAAG,oBAAoB,CACnC,cAAc,EACd,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,KAAK,CACX,CAAA;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAA;AACvC,CAAC"}
1
+ {"version":3,"file":"ClientOnly.js","sourceRoot":"","sources":["../../lib/common/ClientOnly.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAkB,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAE5D,SAAS,cAAc;IACtB,OAAO,GAAG,EAAE,GAAE,CAAC,CAAA;AAChB,CAAC;AAaD,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAmB;IACxE,MAAM,OAAO,GAAG,oBAAoB,CACnC,cAAc,EACd,GAAG,EAAE,CAAC,IAAI,EACV,GAAG,EAAE,CAAC,KAAK,CACX,CAAA;IAED,OAAO,OAAO,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAA;AACvC,CAAC"}
@@ -9,15 +9,21 @@
9
9
  import type { ReactNode } from "react";
10
10
  export interface CopyButtonProps {
11
11
  /**
12
- * The text to copy. If a thunk, it's evaluated at click time (so callers can copy the latest value).
12
+ * The text to copy.
13
+ *
14
+ * If a thunk, it's evaluated at click time (so callers can copy the latest value).
13
15
  */
14
16
  value: string | (() => string);
15
17
  /**
16
- * Label in the idle state. @default "Copy"
18
+ * Label in the idle state.
19
+ *
20
+ * @defaultValue `"Copy"`
17
21
  */
18
22
  label?: ReactNode;
19
23
  /**
20
- * Label shown briefly after a successful copy. @default "✓ Copied"
24
+ * Label shown briefly after a successful copy.
25
+ *
26
+ * @defaultValue `"✓ Copied"`
21
27
  */
22
28
  copiedLabel?: ReactNode;
23
29
  className?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../lib/common/CopyButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,KAAc,EACd,WAAwB,EACxB,SAAoB,EACpB,QAAQ,GACR,EAAE,eAAe,GAAG,SAAS,CAa7B"}
1
+ {"version":3,"file":"CopyButton.d.ts","sourceRoot":"","sources":["../../lib/common/CopyButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAItC,MAAM,WAAW,eAAe;IAC/B;;;;OAIG;IACH,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,CAAC,CAAA;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,UAAU,CAAC,EAC1B,KAAK,EACL,KAAc,EACd,WAAwB,EACxB,SAAoB,EACpB,QAAQ,GACR,EAAE,eAAe,GAAG,SAAS,CAa7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CopyButton.js","sourceRoot":"","sources":["../../lib/common/CopyButton.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAmBnD,MAAM,UAAU,UAAU,CAAC,EAC1B,KAAK,EACL,KAAK,GAAG,MAAM,EACd,WAAW,GAAG,UAAU,EACxB,SAAS,GAAG,QAAQ,EACpB,QAAQ,GACS;IACjB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAA;IAEvC,OAAO,CACN,iBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,YAEjE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,GACrB,CACT,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"CopyButton.js","sourceRoot":"","sources":["../../lib/common/CopyButton.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAyBnD,MAAM,UAAU,UAAU,CAAC,EAC1B,KAAK,EACL,KAAK,GAAG,MAAM,EACd,WAAW,GAAG,UAAU,EACxB,SAAS,GAAG,QAAQ,EACpB,QAAQ,GACS;IACjB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,YAAY,EAAE,CAAA;IAEvC,OAAO,CACN,iBACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,YAEjE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,GACrB,CACT,CAAA;AACF,CAAC"}
@@ -11,19 +11,24 @@
11
11
  export type LoadingMode = "pulse" | "spinner" | "staged";
12
12
  export interface LoadingIndicatorProps extends React.HTMLAttributes<HTMLDivElement> {
13
13
  /**
14
- * @default "spinner"
14
+ * @defaultValue `"spinner"`
15
15
  */
16
16
  mode?: LoadingMode;
17
17
  /**
18
- * Optional label; in staged mode it renders above the step list.
18
+ * Optional label.
19
+ * In staged mode it renders above the step list.
19
20
  */
20
21
  label?: string;
21
22
  /**
22
- * Number of skeleton bars (pulse mode). @default 3
23
+ * Number of skeleton bars (pulse mode).
24
+ *
25
+ * @defaultValue `3`
23
26
  */
24
27
  barCount?: number;
25
28
  /**
26
- * Spinner ring size. @default "medium"
29
+ * Spinner ring size.
30
+ *
31
+ * @defaultValue `"medium"`
27
32
  */
28
33
  size?: "small" | "medium" | "large";
29
34
  /**
@@ -31,7 +36,10 @@ export interface LoadingIndicatorProps extends React.HTMLAttributes<HTMLDivEleme
31
36
  */
32
37
  steps?: string[];
33
38
  /**
34
- * 0-based index of the active step; earlier steps are complete, later ones pending. @default -1
39
+ * 0-based index of the active step.
40
+ * Earlier steps are complete, later ones pending.
41
+ *
42
+ * @defaultValue `-1`
35
43
  */
36
44
  activeStep?: number;
37
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingIndicator.d.ts","sourceRoot":"","sources":["../../lib/common/LoadingIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAA;IACnC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAQD;;GAEG;AACH,eAAO,MAAM,gBAAgB,6DAkB3B,CAAA"}
1
+ {"version":3,"file":"LoadingIndicator.d.ts","sourceRoot":"","sources":["../../lib/common/LoadingIndicator.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;AAExD,MAAM,WAAW,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAClF;;OAEG;IACH,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;OAIG;IACH,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,GAAG,CAAC,KAAK,UAAU,CAAA;YAEjC,OAAO,CACN,cAEC,SAAS,EAAE,EAAE,CAAC,iBAAiB,EAAE;oBAChC,2BAA2B,EAAE,UAAU;oBACvC,yBAAyB,EAAE,QAAQ;oBACnC,0BAA0B,EAAE,CAAC,UAAU,IAAI,CAAC,QAAQ;iBACpD,CAAC,aAEF,eAAM,SAAS,EAAC,iBAAiB,YAC/B,UAAU,CAAC,CAAC,CAAC,CACb,eAAM,SAAS,EAAC,kBAAkB,GAAG,CACrC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CACd,eAAM,SAAS,EAAC,gBAAgB,GAAG,CACnC,CAAC,CAAC,CAAC,IAAI,GACF,EACP,yBAAO,IAAI,GAAQ,KAdd,CAAC,CAeF,CACL,CAAA;QACF,CAAC,CAAC,GACE,CACL,CAAA;AACF,CAAC,CAAC,CAAA"}
@@ -3,18 +3,18 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `PresetChips` — the "Try:" row of example buttons shared by both explorers. Presentational: it
7
- * renders a labelled list and calls `onPick` with the chosen preset's value.
6
+ * `PresetChips` is the "Try:" row of example buttons shared by both explorers. Presentational: it
7
+ * renders a labeled list and calls `onPick` with the chosen preset's value.
8
8
  */
9
9
  import type { ReactNode } from "react";
10
10
  export interface Preset {
11
11
  label: string;
12
12
  value: string;
13
13
  /**
14
- * ISO country code for the placetype-pair country pin (#1278 phase 2's `{country}` override). Optional: a host that
15
- * wires the pair prior hands this to `selectPairIndexForText` when the input still equals this preset's text, so a
16
- * locale structural routing can't detect (NZ's 4-digit postcode isn't distinctive) still fires the dependent_locality
17
- * prior. Purely descriptive to `PresetChips` itself (which only emits `value`).
14
+ * ISO country code for the placetype-pair country pin.
15
+ *
16
+ * A host that wires the pair prior hands this to `selectPairIndexForText`
17
+ * when the input still equals this preset's text.
18
18
  */
19
19
  country?: string;
20
20
  }
@@ -23,11 +23,14 @@ export interface PresetChipsProps {
23
23
  onPick: (value: string) => void;
24
24
  disabled?: boolean;
25
25
  /**
26
- * Leading label. @default "Try:"
26
+ * The label shown before the choices.
27
+ *
28
+ * @defaultValue `"Try:"`
27
29
  */
28
30
  caption?: string;
29
31
  /**
30
- * Optional trailing content rendered inside the chip row after the presets (e.g. an inline permalink button).
32
+ * Optional trailing content rendered inside the chip row after the presets
33
+ * (e.g. an inline permalink button).
31
34
  */
32
35
  trailing?: ReactNode;
33
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"PresetChips.d.ts","sourceRoot":"","sources":["../../lib/common/PresetChips.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAgB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAmBlH"}
1
+ {"version":3,"file":"PresetChips.d.ts","sourceRoot":"","sources":["../../lib/common/PresetChips.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,gBAAgB;IAChC,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAgB,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,SAAS,CAmBlH"}
@@ -1 +1 @@
1
- {"version":3,"file":"PresetChips.js","sourceRoot":"","sources":["../../lib/common/PresetChips.tsx"],"names":[],"mappings":";AAqCA,MAAM,UAAU,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,MAAM,EAAE,QAAQ,EAAoB;IACtG,OAAO,CACN,eAAK,SAAS,EAAC,YAAY,aAC1B,eAAM,SAAS,EAAC,mBAAmB,YAAE,OAAO,GAAQ,EACnD,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACxB,iBAEC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,EACnC,KAAK,EAAE,MAAM,CAAC,KAAK,YAElB,MAAM,CAAC,KAAK,IAPR,MAAM,CAAC,KAAK,CAQT,CACT,CAAC,EACD,QAAQ,IACJ,CACN,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"PresetChips.js","sourceRoot":"","sources":["../../lib/common/PresetChips.tsx"],"names":[],"mappings":";AAwCA,MAAM,UAAU,W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