@mailwoman/react 9.2.0 → 9.3.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 (207) hide show
  1. package/README.md +1 -1
  2. package/{common → lib/common}/CopyButton.tsx +1 -1
  3. package/{common → lib/common}/LoadingIndicator.tsx +1 -1
  4. package/{index.ts → lib/index.ts} +17 -17
  5. package/{map → lib/map}/CompareToggle.tsx +1 -1
  6. package/{map → lib/map}/DemoControls.tsx +5 -4
  7. package/{map → lib/map}/DemoMap.tsx +2 -2
  8. package/{map → lib/map}/GeocoderDemo.tsx +13 -12
  9. package/{map → lib/map}/OverlayLayers.tsx +3 -3
  10. package/{map → lib/map}/PlaceAutocomplete.tsx +2 -2
  11. package/{map → lib/map}/ResolvedPlaceLayers.tsx +2 -1
  12. package/{map → lib/map}/ResultCamera.tsx +2 -2
  13. package/{map → lib/map}/ResultOverlay.tsx +2 -2
  14. package/{map → lib/map}/ResultPanel.tsx +3 -2
  15. package/{map → lib/map}/VersionPicker.tsx +1 -1
  16. package/{map → lib/map}/index.ts +12 -12
  17. package/{map → lib/map}/place-render.ts +3 -3
  18. package/{map → lib/map}/types.ts +12 -9
  19. package/{map → lib/map}/useDemoGeocode.ts +4 -4
  20. package/{map → lib/map}/useMapPlaceRender.ts +2 -2
  21. package/{map → lib/map}/usePlaceAutocomplete.ts +2 -2
  22. package/{pipeline → lib/pipeline}/CandidatePicker.tsx +2 -2
  23. package/{pipeline → lib/pipeline}/ComponentTable.tsx +2 -1
  24. package/{pipeline → lib/pipeline}/ConfidenceCell.tsx +1 -1
  25. package/{pipeline → lib/pipeline}/PipelineExplorer.tsx +5 -4
  26. package/{pipeline → lib/pipeline}/QueryForm.tsx +2 -2
  27. package/{pipeline → lib/pipeline}/ResolvedPlace.tsx +1 -1
  28. package/{pipeline → lib/pipeline}/copy.ts +1 -1
  29. package/{pipeline → lib/pipeline}/presets.ts +2 -1
  30. package/{pipeline → lib/pipeline}/useParsePipeline.ts +1 -1
  31. package/{poi → lib/poi}/LiveResultsBlock.tsx +2 -2
  32. package/{poi → lib/poi}/POIExplorer.tsx +4 -3
  33. package/{poi → lib/poi}/SubjectPanel.tsx +1 -1
  34. package/{poi → lib/poi}/runtime.ts +3 -3
  35. package/{poi → lib/poi}/types.ts +1 -1
  36. package/{poi → lib/poi}/usePOISearch.ts +5 -5
  37. package/{runtime → lib/runtime}/useDemoRuntime.ts +2 -2
  38. package/out/common/ClientOnly.d.ts.map +1 -1
  39. package/out/common/ClientOnly.js.map +1 -1
  40. package/out/common/CopyButton.d.ts.map +1 -1
  41. package/out/common/CopyButton.js +1 -1
  42. package/out/common/CopyButton.js.map +1 -1
  43. package/out/common/KindBadge.d.ts.map +1 -1
  44. package/out/common/KindBadge.js.map +1 -1
  45. package/out/common/LoadingIndicator.d.ts.map +1 -1
  46. package/out/common/LoadingIndicator.js +1 -1
  47. package/out/common/LoadingIndicator.js.map +1 -1
  48. package/out/common/PresetChips.d.ts.map +1 -1
  49. package/out/common/PresetChips.js.map +1 -1
  50. package/out/common/cx.d.ts.map +1 -1
  51. package/out/common/cx.js.map +1 -1
  52. package/out/common/useClipboard.d.ts.map +1 -1
  53. package/out/common/useClipboard.js.map +1 -1
  54. package/out/common/useDebouncedValue.d.ts.map +1 -1
  55. package/out/common/useDebouncedValue.js.map +1 -1
  56. package/out/index.d.ts +17 -17
  57. package/out/index.d.ts.map +1 -1
  58. package/out/index.js +9 -9
  59. package/out/index.js.map +1 -1
  60. package/out/map/BackendControl.d.ts.map +1 -1
  61. package/out/map/BackendControl.js.map +1 -1
  62. package/out/map/CompareToggle.d.ts +1 -1
  63. package/out/map/CompareToggle.d.ts.map +1 -1
  64. package/out/map/CompareToggle.js.map +1 -1
  65. package/out/map/DemoControls.d.ts +4 -4
  66. package/out/map/DemoControls.d.ts.map +1 -1
  67. package/out/map/DemoControls.js.map +1 -1
  68. package/out/map/DemoMap.d.ts +2 -2
  69. package/out/map/DemoMap.d.ts.map +1 -1
  70. package/out/map/DemoMap.js.map +1 -1
  71. package/out/map/GeocoderDemo.d.ts +3 -3
  72. package/out/map/GeocoderDemo.d.ts.map +1 -1
  73. package/out/map/GeocoderDemo.js +10 -10
  74. package/out/map/GeocoderDemo.js.map +1 -1
  75. package/out/map/OverlayLayers.d.ts +3 -3
  76. package/out/map/OverlayLayers.d.ts.map +1 -1
  77. package/out/map/OverlayLayers.js +2 -2
  78. package/out/map/OverlayLayers.js.map +1 -1
  79. package/out/map/PlaceAutocomplete.d.ts +1 -1
  80. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  81. package/out/map/PlaceAutocomplete.js +1 -1
  82. package/out/map/PlaceAutocomplete.js.map +1 -1
  83. package/out/map/PlaceMarker.d.ts.map +1 -1
  84. package/out/map/PlaceMarker.js.map +1 -1
  85. package/out/map/ResolvedPlaceLayers.d.ts +1 -1
  86. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  87. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  88. package/out/map/ResultCamera.d.ts +2 -2
  89. package/out/map/ResultCamera.d.ts.map +1 -1
  90. package/out/map/ResultCamera.js +1 -1
  91. package/out/map/ResultCamera.js.map +1 -1
  92. package/out/map/ResultOverlay.d.ts +2 -2
  93. package/out/map/ResultOverlay.d.ts.map +1 -1
  94. package/out/map/ResultOverlay.js.map +1 -1
  95. package/out/map/ResultPanel.d.ts +1 -1
  96. package/out/map/ResultPanel.d.ts.map +1 -1
  97. package/out/map/ResultPanel.js +1 -1
  98. package/out/map/ResultPanel.js.map +1 -1
  99. package/out/map/VersionPicker.d.ts +1 -1
  100. package/out/map/VersionPicker.d.ts.map +1 -1
  101. package/out/map/VersionPicker.js.map +1 -1
  102. package/out/map/geometry.d.ts.map +1 -1
  103. package/out/map/geometry.js.map +1 -1
  104. package/out/map/index.d.ts +12 -12
  105. package/out/map/index.d.ts.map +1 -1
  106. package/out/map/index.js +6 -6
  107. package/out/map/index.js.map +1 -1
  108. package/out/map/place-render.d.ts +2 -2
  109. package/out/map/place-render.d.ts.map +1 -1
  110. package/out/map/place-render.js +1 -1
  111. package/out/map/place-render.js.map +1 -1
  112. package/out/map/types.d.ts +11 -9
  113. package/out/map/types.d.ts.map +1 -1
  114. package/out/map/types.js +2 -2
  115. package/out/map/types.js.map +1 -1
  116. package/out/map/useCompareState.d.ts.map +1 -1
  117. package/out/map/useCompareState.js.map +1 -1
  118. package/out/map/useDemoGeocode.d.ts +3 -3
  119. package/out/map/useDemoGeocode.d.ts.map +1 -1
  120. package/out/map/useDemoGeocode.js +1 -1
  121. package/out/map/useDemoGeocode.js.map +1 -1
  122. package/out/map/useMapPlaceRender.d.ts +1 -1
  123. package/out/map/useMapPlaceRender.d.ts.map +1 -1
  124. package/out/map/useMapPlaceRender.js +1 -1
  125. package/out/map/useMapPlaceRender.js.map +1 -1
  126. package/out/map/usePlaceAutocomplete.d.ts +1 -1
  127. package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
  128. package/out/map/usePlaceAutocomplete.js +1 -1
  129. package/out/map/usePlaceAutocomplete.js.map +1 -1
  130. package/out/pipeline/CandidatePicker.d.ts +1 -1
  131. package/out/pipeline/CandidatePicker.d.ts.map +1 -1
  132. package/out/pipeline/CandidatePicker.js +1 -1
  133. package/out/pipeline/CandidatePicker.js.map +1 -1
  134. package/out/pipeline/ComponentTable.d.ts +1 -1
  135. package/out/pipeline/ComponentTable.d.ts.map +1 -1
  136. package/out/pipeline/ComponentTable.js.map +1 -1
  137. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  138. package/out/pipeline/ConfidenceCell.js +1 -1
  139. package/out/pipeline/ConfidenceCell.js.map +1 -1
  140. package/out/pipeline/PipelineExplorer.d.ts +1 -1
  141. package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
  142. package/out/pipeline/PipelineExplorer.js +3 -3
  143. package/out/pipeline/PipelineExplorer.js.map +1 -1
  144. package/out/pipeline/QueryForm.d.ts +2 -2
  145. package/out/pipeline/QueryForm.d.ts.map +1 -1
  146. package/out/pipeline/QueryForm.js.map +1 -1
  147. package/out/pipeline/ResolvedPlace.d.ts +1 -1
  148. package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
  149. package/out/pipeline/ResolvedPlace.js.map +1 -1
  150. package/out/pipeline/copy.d.ts +1 -1
  151. package/out/pipeline/copy.d.ts.map +1 -1
  152. package/out/pipeline/copy.js.map +1 -1
  153. package/out/pipeline/presets.d.ts.map +1 -1
  154. package/out/pipeline/presets.js +2 -1
  155. package/out/pipeline/presets.js.map +1 -1
  156. package/out/pipeline/types.d.ts.map +1 -1
  157. package/out/pipeline/types.js.map +1 -1
  158. package/out/pipeline/useParsePipeline.d.ts +1 -1
  159. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  160. package/out/pipeline/useParsePipeline.js.map +1 -1
  161. package/out/poi/AbstainPanel.d.ts.map +1 -1
  162. package/out/poi/AbstainPanel.js.map +1 -1
  163. package/out/poi/LiveResultsBlock.d.ts +1 -1
  164. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  165. package/out/poi/LiveResultsBlock.js +1 -1
  166. package/out/poi/LiveResultsBlock.js.map +1 -1
  167. package/out/poi/OverpassBlock.d.ts.map +1 -1
  168. package/out/poi/OverpassBlock.js.map +1 -1
  169. package/out/poi/POIExplorer.d.ts +1 -1
  170. package/out/poi/POIExplorer.d.ts.map +1 -1
  171. package/out/poi/POIExplorer.js +2 -2
  172. package/out/poi/POIExplorer.js.map +1 -1
  173. package/out/poi/QueryInput.d.ts.map +1 -1
  174. package/out/poi/QueryInput.js.map +1 -1
  175. package/out/poi/SubjectPanel.d.ts +1 -1
  176. package/out/poi/SubjectPanel.d.ts.map +1 -1
  177. package/out/poi/SubjectPanel.js.map +1 -1
  178. package/out/poi/runtime.d.ts +1 -1
  179. package/out/poi/runtime.d.ts.map +1 -1
  180. package/out/poi/runtime.js.map +1 -1
  181. package/out/poi/types.d.ts +1 -1
  182. package/out/poi/types.d.ts.map +1 -1
  183. package/out/poi/types.js +1 -1
  184. package/out/poi/types.js.map +1 -1
  185. package/out/poi/usePOISearch.d.ts +1 -1
  186. package/out/poi/usePOISearch.d.ts.map +1 -1
  187. package/out/poi/usePOISearch.js +4 -4
  188. package/out/poi/usePOISearch.js.map +1 -1
  189. package/out/runtime/useDemoRuntime.d.ts +2 -2
  190. package/out/runtime/useDemoRuntime.d.ts.map +1 -1
  191. package/out/runtime/useDemoRuntime.js +2 -2
  192. package/out/runtime/useDemoRuntime.js.map +1 -1
  193. package/package.json +93 -16
  194. /package/{common → lib/common}/ClientOnly.tsx +0 -0
  195. /package/{common → lib/common}/KindBadge.tsx +0 -0
  196. /package/{common → lib/common}/PresetChips.tsx +0 -0
  197. /package/{common → lib/common}/cx.ts +0 -0
  198. /package/{common → lib/common}/useClipboard.ts +0 -0
  199. /package/{common → lib/common}/useDebouncedValue.ts +0 -0
  200. /package/{map → lib/map}/BackendControl.tsx +0 -0
  201. /package/{map → lib/map}/PlaceMarker.tsx +0 -0
  202. /package/{map → lib/map}/geometry.ts +0 -0
  203. /package/{map → lib/map}/useCompareState.ts +0 -0
  204. /package/{pipeline → lib/pipeline}/types.ts +0 -0
  205. /package/{poi → lib/poi}/AbstainPanel.tsx +0 -0
  206. /package/{poi → lib/poi}/OverpassBlock.tsx +0 -0
  207. /package/{poi → lib/poi}/QueryInput.tsx +0 -0
package/README.md CHANGED
@@ -10,7 +10,7 @@ Two composed explorers, plus the small presentational units and headless hooks t
10
10
  - **`POIExplorer`** — a self-contained POI-intent tester (classify → subject → OverpassQL). The intent
11
11
  path runs entirely offline over `@mailwoman/kind-classifier`, `@mailwoman/poi-taxonomy`, and
12
12
  `@mailwoman/query-shape` — no weights, no network. A live poi.db search is opt-in via an injected
13
- `runLiveSearch` probe, so the httpvfs/worker machinery never enters this package's graph.
13
+ `runLiveSearch` probe, so the httpvfs/worker implementation never enters this package's graph.
14
14
  - **`PipelineExplorer`** — a parse + resolve tester driven by an **injected `PipelineRuntime`**. The
15
15
  host supplies `runParse` (compute shape → classify → resolve) and the heavy visualizers as `panels`,
16
16
  keeping onnxruntime-web, sql.js-httpvfs, and node builtins out of this package entirely.
@@ -9,7 +9,7 @@
9
9
 
10
10
  import type { ReactNode } from "react"
11
11
 
12
- import { useClipboard } from "./useClipboard.ts"
12
+ import { useClipboard } from "#common/useClipboard"
13
13
 
14
14
  export interface CopyButtonProps {
15
15
  /**
@@ -11,7 +11,7 @@
11
11
 
12
12
  import { memo, type ReactNode } from "react"
13
13
 
14
- import { cx } from "./cx.ts"
14
+ import { cx } from "#common/cx"
15
15
 
16
16
  export type LoadingMode = "pulse" | "spinner" | "staged"
17
17
 
@@ -21,17 +21,17 @@ export { ClientOnly } from "./common/ClientOnly.tsx"
21
21
  export type { ClientOnlyProps } from "./common/ClientOnly.tsx"
22
22
  export { CopyButton } from "./common/CopyButton.tsx"
23
23
  export type { CopyButtonProps } from "./common/CopyButton.tsx"
24
- export { cx } from "./common/cx.ts"
25
- export type { ClassValue } from "./common/cx.ts"
24
+ export { cx } from "#common/cx"
25
+ export type { ClassValue } from "#common/cx"
26
26
  export { KindBadge } from "./common/KindBadge.tsx"
27
27
  export type { KindBadgeProps, KindBadgeResult } from "./common/KindBadge.tsx"
28
28
  export { LoadingIndicator } from "./common/LoadingIndicator.tsx"
29
29
  export type { LoadingIndicatorProps, LoadingMode } from "./common/LoadingIndicator.tsx"
30
30
  export { PresetChips } from "./common/PresetChips.tsx"
31
31
  export type { Preset, PresetChipsProps } from "./common/PresetChips.tsx"
32
- export { useClipboard } from "./common/useClipboard.ts"
33
- export type { UseClipboard } from "./common/useClipboard.ts"
34
- export { useDebouncedValue } from "./common/useDebouncedValue.ts"
32
+ export { useClipboard } from "#common/useClipboard"
33
+ export type { UseClipboard } from "#common/useClipboard"
34
+ export { useDebouncedValue } from "#common/useDebouncedValue"
35
35
 
36
36
  // ── POI explorer ───────────────────────────────────────────────────────────
37
37
  export { AbstainPanel } from "./poi/AbstainPanel.tsx"
@@ -44,7 +44,7 @@ export { POIExplorer } from "./poi/POIExplorer.tsx"
44
44
  export type { POIExplorerProps } from "./poi/POIExplorer.tsx"
45
45
  export { QueryInput } from "./poi/QueryInput.tsx"
46
46
  export type { QueryInputProps } from "./poi/QueryInput.tsx"
47
- export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "./poi/runtime.ts"
47
+ export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "#poi/runtime"
48
48
  export { SubjectPanel } from "./poi/SubjectPanel.tsx"
49
49
  export type { SubjectPanelProps } from "./poi/SubjectPanel.tsx"
50
50
 
@@ -62,10 +62,10 @@ export type {
62
62
  POISubject,
63
63
  POISubjectBase,
64
64
  TaxonomyLookup,
65
- } from "./poi/types.ts"
65
+ } from "#poi/types"
66
66
 
67
- export { usePOISearch } from "./poi/usePOISearch.ts"
68
- export type { UsePOISearch, UsePOISearchOptions } from "./poi/usePOISearch.ts"
67
+ export { usePOISearch } from "#poi/usePOISearch"
68
+ export type { UsePOISearch, UsePOISearchOptions } from "#poi/usePOISearch"
69
69
 
70
70
  // ── Pipeline explorer ──────────────────────────────────────────────────────
71
71
  export { CandidatePicker } from "./pipeline/CandidatePicker.tsx"
@@ -74,8 +74,8 @@ export { ComponentTable } from "./pipeline/ComponentTable.tsx"
74
74
  export type { ComponentTableProps } from "./pipeline/ComponentTable.tsx"
75
75
  export { ConfidenceCell } from "./pipeline/ConfidenceCell.tsx"
76
76
  export type { ConfidenceCellProps } from "./pipeline/ConfidenceCell.tsx"
77
- export { buildParsePayload } from "./pipeline/copy.ts"
78
- export { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "./pipeline/presets.ts"
77
+ export { buildParsePayload } from "#pipeline/copy"
78
+ export { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "#pipeline/presets"
79
79
  export { PipelineExplorer } from "./pipeline/PipelineExplorer.tsx"
80
80
  export type { PipelineExplorerProps } from "./pipeline/PipelineExplorer.tsx"
81
81
  export { QueryForm } from "./pipeline/QueryForm.tsx"
@@ -93,13 +93,13 @@ export type {
93
93
  PipelineRuntime,
94
94
  ResolvedPlaceView,
95
95
  StageTiming,
96
- } from "./pipeline/types.ts"
96
+ } from "#pipeline/types"
97
97
 
98
- export { useParsePipeline } from "./pipeline/useParsePipeline.ts"
99
- export type { UseParsePipeline, UseParsePipelineOptions } from "./pipeline/useParsePipeline.ts"
98
+ export { useParsePipeline } from "#pipeline/useParsePipeline"
99
+ export type { UseParsePipeline, UseParsePipelineOptions } from "#pipeline/useParsePipeline"
100
100
 
101
101
  // ── Demo runtime (shared load orchestration; node-safe — no onnx/httpvfs/maplibre) ──
102
- export { useDemoRuntime } from "./runtime/useDemoRuntime.ts"
102
+ export { useDemoRuntime } from "#runtime/useDemoRuntime"
103
103
 
104
104
  export type {
105
105
  DemoAssetsLoadContext,
@@ -107,7 +107,7 @@ export type {
107
107
  DemoManifest,
108
108
  DemoReleaseBase,
109
109
  DemoRuntimeConfig,
110
- } from "./runtime/useDemoRuntime.ts"
110
+ } from "#runtime/useDemoRuntime"
111
111
 
112
112
  // ── Map (types only from root) ──────────────────────────────────────────────
113
113
  // The demo-map SURFACE lives behind the `@mailwoman/react/map` subpath so `maplibre-gl` / `react-map-gl`
@@ -125,4 +125,4 @@ export type {
125
125
  MapBias,
126
126
  OverlaySpec,
127
127
  Suggestion,
128
- } from "./map/index.ts"
128
+ } from "#map/index"
@@ -13,7 +13,7 @@
13
13
 
14
14
  import type { ReactNode } from "react"
15
15
 
16
- import type { DemoVersionOption } from "./types.ts"
16
+ import type { DemoVersionOption } from "#map/types"
17
17
 
18
18
  export interface CompareToggleProps {
19
19
  /**
@@ -16,6 +16,11 @@
16
16
 
17
17
  import type { ReactNode } from "react"
18
18
 
19
+ import type { DemoPanels, DemoRuntime } from "#map/types"
20
+ import type { UseCompareState } from "#map/useCompareState"
21
+ import type { UseDemoGeocode } from "#map/useDemoGeocode"
22
+ import type { UsePlaceAutocomplete } from "#map/usePlaceAutocomplete"
23
+
19
24
  import { LoadingIndicator } from "../common/LoadingIndicator.tsx"
20
25
  import { PresetChips, type Preset } from "../common/PresetChips.tsx"
21
26
  import { QueryForm } from "../pipeline/QueryForm.tsx"
@@ -23,10 +28,6 @@ import { BackendControl } from "./BackendControl.tsx"
23
28
  import { CompareToggle } from "./CompareToggle.tsx"
24
29
  import { PlaceAutocomplete } from "./PlaceAutocomplete.tsx"
25
30
  import { ResultPanel } from "./ResultPanel.tsx"
26
- import type { DemoPanels, DemoRuntime } from "./types.ts"
27
- import type { UseCompareState } from "./useCompareState.ts"
28
- import type { UseDemoGeocode } from "./useDemoGeocode.ts"
29
- import type { UsePlaceAutocomplete } from "./usePlaceAutocomplete.ts"
30
31
  import { VersionPicker } from "./VersionPicker.tsx"
31
32
 
32
33
  export interface DemoControlsProps {
@@ -31,7 +31,7 @@ import type { MapProps, MapRef, ViewStateChangeEvent } from "react-map-gl/maplib
31
31
  export type DemoMapStyle = NonNullable<MapProps["mapStyle"]>
32
32
 
33
33
  /**
34
- * Escape hatch for the `<Map>` props `<DemoMap>` does not surface explicitly (e.g. `minZoom`, `attributionControl`,
34
+ * Override for the `<Map>` props `<DemoMap>` does not surface explicitly (e.g. `minZoom`, `attributionControl`,
35
35
  * `maplibreLogo`). The controlled fields DemoMap owns are omitted so they can't be set twice.
36
36
  */
37
37
  export type DemoMapExtraProps = Partial<
@@ -52,7 +52,7 @@ export interface DemoMapProps {
52
52
  */
53
53
  viewState?: MapProps["viewState"]
54
54
  /**
55
- * Fired on every camera change (drag/zoom/rotate) — the seam for viewport-bias persistence.
55
+ * Fired on every camera change (drag/zoom/rotate) — the hook for viewport-bias persistence.
56
56
  */
57
57
  onMove?: (event: ViewStateChangeEvent) => void
58
58
  /**
@@ -4,7 +4,7 @@
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
6
  * `<GeocoderDemo>` — the WHOLE geocoder demo, composed. It is the map analogue of `PipelineExplorer`
7
- * and takes the SAME DI seam shape: an injected {@link DemoRuntime} (the host owns ONNX / httpvfs / R2 /
7
+ * and takes the SAME DI shape: an injected {@link DemoRuntime} (the host owns ONNX / httpvfs / R2 /
8
8
  * the composed map style) plus a {@link DemoPanels} bag (the host's ModelVisualizer / VersionCompare /
9
9
  * About / Permalink). Everything here is composition + a `ClientOnly` boundary:
10
10
  *
@@ -22,17 +22,18 @@
22
22
  import { type ReactNode, useCallback, useEffect, useRef } from "react"
23
23
  import type { MapRef } from "react-map-gl/maplibre"
24
24
 
25
+ import type { DemoPanels, DemoRuntime, MapBias } from "#map/types"
26
+ import { useCompareState } from "#map/useCompareState"
27
+ import { useDemoGeocode } from "#map/useDemoGeocode"
28
+ import { useMapPlaceRender } from "#map/useMapPlaceRender"
29
+ import { usePlaceAutocomplete } from "#map/usePlaceAutocomplete"
30
+
25
31
  import { ClientOnly } from "../common/ClientOnly.tsx"
26
32
  import type { Preset } from "../common/PresetChips.tsx"
27
33
  import { DemoControls } from "./DemoControls.tsx"
28
34
  import { DemoMap } from "./DemoMap.tsx"
29
35
  import { OverlayLayers } from "./OverlayLayers.tsx"
30
36
  import { ResolvedPlaceLayers } from "./ResolvedPlaceLayers.tsx"
31
- import type { DemoPanels, DemoRuntime, MapBias } from "./types.ts"
32
- import { useCompareState } from "./useCompareState.ts"
33
- import { useDemoGeocode } from "./useDemoGeocode.ts"
34
- import { useMapPlaceRender } from "./useMapPlaceRender.ts"
35
- import { usePlaceAutocomplete } from "./usePlaceAutocomplete.ts"
36
37
 
37
38
  export interface GeocoderDemoProps {
38
39
  /**
@@ -53,7 +54,7 @@ export interface GeocoderDemoProps {
53
54
  presets?: ReadonlyArray<Preset>
54
55
  /**
55
56
  * Only hint the viewport bias once the visitor has zoomed past the global view — a whole-globe center is noise.
56
- * Matches the demo's `map.getZoom() >= 4` gate. @default 4
57
+ * Matches the demo's `map.getZoom() >= 4` threshold. @default 4
57
58
  */
58
59
  minBiasZoom?: number
59
60
  /**
@@ -81,26 +82,26 @@ function GeocoderDemoInner({
81
82
  }: GeocoderDemoInnerProps): ReactNode {
82
83
  const mapRef = useRef<MapRef>(null)
83
84
 
84
- // TEST SEAM: the e2e viewport-bias suite drives the REAL map (pan + zoom past the bias gate)
85
+ // TEST INJECTION POINT: the e2e viewport-bias suite drives the REAL map (pan + zoom past the bias threshold)
85
86
  // before submitting, and a browser test cannot reach a React ref — so the live map handle is
86
- // republished on `globalThis.__mailwomanDemoMap`, the same seam the pre-port demo carried. The
87
+ // republished on `globalThis.__mailwomanDemoMap`, the same global the pre-port demo carried. The
87
88
  // ref fills only after react-map-gl instantiates the map, hence the short poll; cleared on
88
89
  // unmount so a torn-down demo never leaves a stale handle behind.
89
90
  useEffect(() => {
90
- const seam = globalThis as { __mailwomanDemoMap?: ReturnType<MapRef["getMap"]> }
91
+ const host = globalThis as { __mailwomanDemoMap?: ReturnType<MapRef["getMap"]> }
91
92
 
92
93
  const timer = setInterval(() => {
93
94
  const map = mapRef.current?.getMap()
94
95
 
95
96
  if (map) {
96
- seam.__mailwomanDemoMap = map
97
+ host.__mailwomanDemoMap = map
97
98
  clearInterval(timer)
98
99
  }
99
100
  }, 250)
100
101
 
101
102
  return () => {
102
103
  clearInterval(timer)
103
- delete seam.__mailwomanDemoMap
104
+ delete host.__mailwomanDemoMap
104
105
  }
105
106
  }, [])
106
107
 
@@ -5,10 +5,10 @@
5
5
  *
6
6
  * `<OverlayLayers>` — renders the host-supplied {@link OverlaySpec}s (coverage "fog of war",
7
7
  * race-dots, …) as declarative `<Source>` + `<Layer>`s. This replaces the demo's imperative
8
- * `map.addSource` / `map.addLayer` overlay loops (and their `isStyleLoaded()` / `styledata` gates):
8
+ * `map.addSource` / `map.addLayer` overlay loops (and their `isStyleLoaded()` / `styledata` guards):
9
9
  * the host composes the specs, the package renders them, react-map-gl owns the add/remove lifecycle.
10
10
  *
11
- * Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative seam a
11
+ * Each overlay's `visible` flag flips the layers' `visibility` layout property — the declarative control a
12
12
  * layer-toggle control drives in a later phase. NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` —
13
13
  * reachable only via `@mailwoman/react/map`.
14
14
  */
@@ -16,7 +16,7 @@
16
16
  import { Fragment, type ReactNode } from "react"
17
17
  import { Layer, Source } from "react-map-gl/maplibre"
18
18
 
19
- import type { OverlaySpec } from "./types.ts"
19
+ import type { OverlaySpec } from "#map/types"
20
20
 
21
21
  export interface OverlayLayersProps {
22
22
  /**
@@ -14,8 +14,8 @@
14
14
 
15
15
  import type { ReactNode } from "react"
16
16
 
17
- import { cx } from "../common/cx.ts"
18
- import type { Suggestion } from "./types.ts"
17
+ import { cx } from "#common/cx"
18
+ import type { Suggestion } from "#map/types"
19
19
 
20
20
  export interface PlaceAutocompleteProps {
21
21
  /**
@@ -15,7 +15,8 @@
15
15
 
16
16
  import type { ReactNode } from "react"
17
17
 
18
- import type { MapPlaceRenderSpec } from "./place-render.ts"
18
+ import type { MapPlaceRenderSpec } from "#map/place-render"
19
+
19
20
  import { PlaceMarker } from "./PlaceMarker.tsx"
20
21
  import { ResultCamera } from "./ResultCamera.tsx"
21
22
  import { ResultOverlay } from "./ResultOverlay.tsx"
@@ -23,13 +23,13 @@ import type { FitBoundsOptions } from "maplibre-gl"
23
23
  import { type ReactNode, useEffect } from "react"
24
24
  import { useMap } from "react-map-gl/maplibre"
25
25
 
26
- import type { MapCameraTarget } from "./place-render.ts"
26
+ import type { MapCameraTarget } from "#map/place-render"
27
27
 
28
28
  /**
29
29
  * The `fitBounds` options for a `bounds` target — and the reason this is a named function rather than an object literal
30
30
  * at the call site.
31
31
  *
32
- * `duration` is present ONLY on the non-animated path, and its ABSENCE on the animated one is load-bearing. maplibre's
32
+ * `duration` is present ONLY on the non-animated path, and its ABSENCE on the animated one is required. maplibre's
33
33
  * `Camera.flyTo` (which `fitBounds` funnels into via `_fitInternal`) branches on `'duration' in options`, not on the
34
34
  * value: an explicitly-passed `duration: undefined` therefore survives the key test and is coerced with `+undefined` →
35
35
  * `NaN`. Every ease frame then computes `k = easing(elapsed / NaN)` → `NaN`, the flight-path math yields a `NaN` world
@@ -6,7 +6,7 @@
6
6
  * `<ResultOverlay>` — the resolved-place outline (crisp admin polygon, or an approximate/exact-radius
7
7
  * circle) as a declarative `<Source>` + fill/line `<Layer>`s. This replaces the demo's imperative
8
8
  * `setPlaceOutline` / `drawApproxCircle` / `drawPlaceGeometry` / `clearBbox` helpers and their
9
- * `whenStyleReady` gate: react-map-gl owns the "add source/layer once the style is loaded, remove on
9
+ * `whenStyleReady` guard: react-map-gl owns the "add source/layer once the style is loaded, remove on
10
10
  * unmount" lifecycle, so the hand-rolled `isStyleLoaded()` / `styledata` races disappear.
11
11
  *
12
12
  * Pass the `outline` straight from a {@link MapPlaceRenderSpec}; a `null` outline renders nothing (the
@@ -16,7 +16,7 @@
16
16
  import type { ReactNode } from "react"
17
17
  import { Layer, Source } from "react-map-gl/maplibre"
18
18
 
19
- import type { PlaceGeometry } from "./geometry.ts"
19
+ import type { PlaceGeometry } from "#map/geometry"
20
20
 
21
21
  /**
22
22
  * The house pink, matched to {@link PlaceMarker}.
@@ -16,13 +16,14 @@
16
16
 
17
17
  import type { ReactNode } from "react"
18
18
 
19
+ import { buildParsePayload } from "#pipeline/copy"
20
+ import type { ParseResult, ResolvedPlaceView } from "#pipeline/types"
21
+
19
22
  import { CopyButton } from "../common/CopyButton.tsx"
20
23
  import { KindBadge } from "../common/KindBadge.tsx"
21
24
  import { CandidatePicker } from "../pipeline/CandidatePicker.tsx"
22
25
  import { ComponentTable } from "../pipeline/ComponentTable.tsx"
23
- import { buildParsePayload } from "../pipeline/copy.ts"
24
26
  import { ResolvedPlace } from "../pipeline/ResolvedPlace.tsx"
25
- import type { ParseResult, ResolvedPlaceView } from "../pipeline/types.ts"
26
27
 
27
28
  export interface ResultPanelProps {
28
29
  /**
@@ -14,7 +14,7 @@
14
14
 
15
15
  import type { ReactNode } from "react"
16
16
 
17
- import type { DemoVersionOption } from "./types.ts"
17
+ import type { DemoVersionOption } from "#map/types"
18
18
 
19
19
  export interface VersionPickerProps {
20
20
  /**
@@ -26,14 +26,14 @@ export type {
26
26
  MapBias,
27
27
  OverlaySpec,
28
28
  Suggestion,
29
- } from "./types.ts"
29
+ } from "#map/types"
30
30
 
31
31
  // ── Pure geometry + render spec (node-safe; no react-map-gl at runtime) ──────
32
- export { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "./geometry.ts"
33
- export type { BoundsTuple, PlaceBBox, PlaceGeometry } from "./geometry.ts"
34
- export { cameraToViewState, computeMapPlaceRenderSpec } from "./place-render.ts"
35
- export type { LngLat, MapCameraTarget, MapPlaceRenderSpec, PlaceTier, ResolvedMapPlace } from "./place-render.ts"
36
- export { useMapPlaceRender } from "./useMapPlaceRender.ts"
32
+ export { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "#map/geometry"
33
+ export type { BoundsTuple, PlaceBBox, PlaceGeometry } from "#map/geometry"
34
+ export { cameraToViewState, computeMapPlaceRenderSpec } from "#map/place-render"
35
+ export type { LngLat, MapCameraTarget, MapPlaceRenderSpec, PlaceTier, ResolvedMapPlace } from "#map/place-render"
36
+ export { useMapPlaceRender } from "#map/useMapPlaceRender"
37
37
 
38
38
  // ── Declarative overlays (react-map-gl `<Marker>`/`<Source>`/`<Layer>`) ──────
39
39
  export { OverlayLayers } from "./OverlayLayers.tsx"
@@ -60,17 +60,17 @@ export { PlaceAutocomplete } from "./PlaceAutocomplete.tsx"
60
60
  export type { PlaceAutocompleteProps } from "./PlaceAutocomplete.tsx"
61
61
  export { ResultPanel } from "./ResultPanel.tsx"
62
62
  export type { ResultPanelProps } from "./ResultPanel.tsx"
63
- export { useCompareState } from "./useCompareState.ts"
64
- export type { UseCompareState } from "./useCompareState.ts"
65
- export { useDemoGeocode } from "./useDemoGeocode.ts"
66
- export type { UseDemoGeocode, UseDemoGeocodeOptions } from "./useDemoGeocode.ts"
67
- export { usePlaceAutocomplete } from "./usePlaceAutocomplete.ts"
63
+ export { useCompareState } from "#map/useCompareState"
64
+ export type { UseCompareState } from "#map/useCompareState"
65
+ export { useDemoGeocode } from "#map/useDemoGeocode"
66
+ export type { UseDemoGeocode, UseDemoGeocodeOptions } from "#map/useDemoGeocode"
67
+ export { usePlaceAutocomplete } from "#map/usePlaceAutocomplete"
68
68
 
69
69
  export type {
70
70
  AutocompleteInputProps,
71
71
  UsePlaceAutocomplete,
72
72
  UsePlaceAutocompleteOptions,
73
- } from "./usePlaceAutocomplete.ts"
73
+ } from "#map/usePlaceAutocomplete"
74
74
 
75
75
  export { VersionPicker } from "./VersionPicker.tsx"
76
76
  export type { VersionPickerProps } from "./VersionPicker.tsx"
@@ -19,9 +19,9 @@
19
19
  * 5. bare point → no outline, fly to zoom 12
20
20
  */
21
21
 
22
- import type { ResolvedPlaceView } from "../pipeline/types.ts"
23
- import { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "./geometry.ts"
24
- import type { BoundsTuple, PlaceBBox, PlaceGeometry } from "./geometry.ts"
22
+ import { approxCircleGeometry, bboxToBounds, geomBounds, radiusCircleGeometry } from "#map/geometry"
23
+ import type { BoundsTuple, PlaceBBox, PlaceGeometry } from "#map/geometry"
24
+ import type { ResolvedPlaceView } from "#pipeline/types"
25
25
 
26
26
  /**
27
27
  * `[longitude, latitude]`.
@@ -3,7 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * Types for the geocoder-demo map surface. Mirrors the pipeline seam: the package owns the UI state
6
+ * Types for the geocoder-demo map surface. Mirrors the pipeline boundary: the package owns the UI state
7
7
  * machine + the declarative map, while the host injects a {@link DemoRuntime} that owns ONNX / httpvfs
8
8
  * / R2 and the composed map style. {@link DemoRuntime} EXTENDS {@link PipelineRuntime} so the shared
9
9
  * `runParse` / `parseStageLabels` / `loading` contract is reused, and adds the map-specific surface
@@ -12,20 +12,23 @@
12
12
  *
13
13
  * The map-spec types are imported type-only from `react-map-gl/maplibre`; nothing here loads maplibre at
14
14
  * runtime, so this module stays node-safe (its concrete-value CONSUMERS — `DemoMap`, `GeocoderDemo` —
15
- * are the ones gated behind the `@mailwoman/react/map` subpath).
15
+ * are the ones behind the `@mailwoman/react/map` subpath).
16
16
  */
17
17
 
18
18
  import type { ReactNode } from "react"
19
19
  import type { LayerSpecification, SourceSpecification } from "react-map-gl/maplibre"
20
20
 
21
- import type { ParseResult, PipelineRuntime, ResolvedPlaceView } from "../pipeline/types.ts"
21
+ import type { LngLat, ResolvedMapPlace } from "#map/place-render"
22
+ import type { ParseResult, PipelineRuntime, ResolvedPlaceView } from "#pipeline/types"
23
+
22
24
  import type { DemoMapStyle } from "./DemoMap.tsx"
23
- import type { ResolvedMapPlace } from "./place-render.ts"
24
25
 
25
26
  /**
26
27
  * `[longitude, latitude]`.
28
+ *
29
+ * @deprecated Alias kept for existing imports — {@link LngLat} (from `@mailwoman/react/map`) is the canonical name.
27
30
  */
28
- export type LngLatTuple = [number, number]
31
+ export type LngLatTuple = LngLat
29
32
 
30
33
  /**
31
34
  * A viewport bias handed to `runParse` — the map's current center (and optionally zoom) as a soft prior.
@@ -34,7 +37,7 @@ export interface MapBias {
34
37
  /**
35
38
  * Map center as `[lon, lat]`, typically read from `map.getCenter()`.
36
39
  */
37
- center: LngLatTuple
40
+ center: LngLat
38
41
  /**
39
42
  * Current zoom, if the host wants distance-aware biasing.
40
43
  */
@@ -125,7 +128,7 @@ export interface DemoRuntime extends PipelineRuntime {
125
128
  /**
126
129
  * Initial map center as `[lon, lat]` (the host's browser-geolocation result).
127
130
  */
128
- initialCenter: LngLatTuple
131
+ initialCenter: LngLat
129
132
  /**
130
133
  * Initial zoom for the first camera.
131
134
  */
@@ -280,8 +283,8 @@ export interface DemoPanels {
280
283
  compare?: (context: DemoCompareContext) => ReactNode
281
284
  /**
282
285
  * The model-visualizer / debug drawer, mounted beside the map (host's ModelVisualizer). A render-prop so the host can
283
- * trace the CURRENT result (its input) — the package passes the live parse result; the host gates on its own dev-mode
284
- * state and returns `null` when the drawer is closed.
286
+ * trace the CURRENT result (its input) — the package passes the live parse result; the host decides on its own
287
+ * dev-mode state and returns `null` when the drawer is closed.
285
288
  */
286
289
  debugDrawer?: (context: { result: ParseResult | null }) => ReactNode
287
290
  /**
@@ -20,10 +20,10 @@
20
20
 
21
21
  import { useMemo } from "react"
22
22
 
23
- import type { PipelineRuntime } from "../pipeline/types.ts"
24
- import { useParsePipeline, type UseParsePipeline } from "../pipeline/useParsePipeline.ts"
25
- import type { ResolvedMapPlace } from "./place-render.ts"
26
- import type { DemoRuntime, MapBias } from "./types.ts"
23
+ import type { ResolvedMapPlace } from "#map/place-render"
24
+ import type { DemoRuntime, MapBias } from "#map/types"
25
+ import type { PipelineRuntime } from "#pipeline/types"
26
+ import { useParsePipeline, type UseParsePipeline } from "#pipeline/useParsePipeline"
27
27
 
28
28
  export interface UseDemoGeocodeOptions {
29
29
  /**
@@ -12,8 +12,8 @@
12
12
 
13
13
  import { useMemo } from "react"
14
14
 
15
- import { computeMapPlaceRenderSpec } from "./place-render.ts"
16
- import type { MapPlaceRenderSpec, ResolvedMapPlace } from "./place-render.ts"
15
+ import { computeMapPlaceRenderSpec } from "#map/place-render"
16
+ import type { MapPlaceRenderSpec, ResolvedMapPlace } from "#map/place-render"
17
17
 
18
18
  /**
19
19
  * Memoize the render spec for a resolved place; `null` in → `null` out (nothing to draw).
@@ -17,8 +17,8 @@
17
17
 
18
18
  import { type KeyboardEvent, useCallback, useEffect, useState } from "react"
19
19
 
20
- import { useDebouncedValue } from "../common/useDebouncedValue.ts"
21
- import type { Suggestion } from "./types.ts"
20
+ import { useDebouncedValue } from "#common/useDebouncedValue"
21
+ import type { Suggestion } from "#map/types"
22
22
 
23
23
  export interface UsePlaceAutocompleteOptions {
24
24
  /**
@@ -9,8 +9,8 @@
9
9
 
10
10
  import type { ReactNode } from "react"
11
11
 
12
- import { cx } from "../common/cx.ts"
13
- import type { ResolvedPlaceView } from "./types.ts"
12
+ import { cx } from "#common/cx"
13
+ import type { ResolvedPlaceView } from "#pipeline/types"
14
14
 
15
15
  export interface CandidatePickerProps {
16
16
  candidates: ResolvedPlaceView[]
@@ -8,8 +8,9 @@
8
8
 
9
9
  import type { ReactNode } from "react"
10
10
 
11
+ import type { ParsedComponent } from "#pipeline/types"
12
+
11
13
  import { ConfidenceCell } from "./ConfidenceCell.tsx"
12
- import type { ParsedComponent } from "./types.ts"
13
14
 
14
15
  export interface ComponentTableProps {
15
16
  nodes: ParsedComponent[]
@@ -7,7 +7,7 @@
7
7
  * at 0.8 / 0.5. Presentational.
8
8
  */
9
9
 
10
- import { cx } from "../common/cx.ts"
10
+ import { cx } from "#common/cx"
11
11
 
12
12
  /**
13
13
  * At or above this the cell is drawn as high-confidence. Presentation only — see docs/src/shared/confidence-tiers.ts.
@@ -11,6 +11,11 @@
11
11
 
12
12
  import type { ReactNode } from "react"
13
13
 
14
+ import { buildParsePayload } from "#pipeline/copy"
15
+ import { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "#pipeline/presets"
16
+ import type { PipelinePanels, PipelineRuntime } from "#pipeline/types"
17
+ import { useParsePipeline } from "#pipeline/useParsePipeline"
18
+
14
19
  import { ClientOnly } from "../common/ClientOnly.tsx"
15
20
  import { CopyButton } from "../common/CopyButton.tsx"
16
21
  import { KindBadge } from "../common/KindBadge.tsx"
@@ -18,12 +23,8 @@ import { LoadingIndicator } from "../common/LoadingIndicator.tsx"
18
23
  import { PresetChips, type Preset } from "../common/PresetChips.tsx"
19
24
  import { CandidatePicker } from "./CandidatePicker.tsx"
20
25
  import { ComponentTable } from "./ComponentTable.tsx"
21
- import { buildParsePayload } from "./copy.ts"
22
- import { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "./presets.ts"
23
26
  import { QueryForm } from "./QueryForm.tsx"
24
27
  import { ResolvedPlace } from "./ResolvedPlace.tsx"
25
- import type { PipelinePanels, PipelineRuntime } from "./types.ts"
26
- import { useParsePipeline } from "./useParsePipeline.ts"
27
28
 
28
29
  export interface PipelineExplorerProps {
29
30
  /**
@@ -19,11 +19,11 @@ export interface QueryFormProps {
19
19
  busy?: boolean
20
20
  placeholder?: string
21
21
  /**
22
- * Keydown on the input — the seam a combobox (the demo's place-autocomplete) needs for arrow/Enter/Esc nav.
22
+ * Keydown on the input — the hook a combobox (the demo's place-autocomplete) needs for arrow/Enter/Esc nav.
23
23
  */
24
24
  onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void
25
25
  /**
26
- * Escape hatch for extra `<input>` attributes (aria-combobox props, `autoComplete`, …). Merged last.
26
+ * Override for extra `<input>` attributes (aria-combobox props, `autoComplete`, …). Merged last.
27
27
  */
28
28
  inputProps?: InputHTMLAttributes<HTMLInputElement>
29
29
  }
@@ -9,7 +9,7 @@
9
9
 
10
10
  import { Fragment, type ReactNode } from "react"
11
11
 
12
- import type { DualRoleView, ResolvedPlaceView } from "./types.ts"
12
+ import type { DualRoleView, ResolvedPlaceView } from "#pipeline/types"
13
13
 
14
14
  export interface ResolvedPlaceProps {
15
15
  place: ResolvedPlaceView
@@ -7,7 +7,7 @@
7
7
  * pretty-printed. Pure; shared by the explorer's copy button.
8
8
  */
9
9
 
10
- import type { ParseResult, ResolvedPlaceView } from "./types.ts"
10
+ import type { ParseResult, ResolvedPlaceView } from "#pipeline/types"
11
11
 
12
12
  export function buildParsePayload(result: ParseResult, selected: ResolvedPlaceView | null): string {
13
13
  return JSON.stringify(