@mailwoman/react 8.0.0 → 8.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 (192) hide show
  1. package/common/ClientOnly.tsx +6 -2
  2. package/common/CopyButton.tsx +9 -3
  3. package/common/KindBadge.tsx +1 -1
  4. package/common/LoadingIndicator.tsx +22 -7
  5. package/common/PresetChips.tsx +6 -2
  6. package/common/cx.ts +3 -1
  7. package/common/useClipboard.ts +7 -2
  8. package/index.ts +5 -0
  9. package/map/BackendControl.tsx +12 -4
  10. package/map/CompareToggle.tsx +27 -9
  11. package/map/DemoControls.tsx +31 -11
  12. package/map/DemoMap.tsx +33 -11
  13. package/map/GeocoderDemo.tsx +25 -8
  14. package/map/OverlayLayers.tsx +7 -3
  15. package/map/PlaceAutocomplete.tsx +25 -9
  16. package/map/PlaceMarker.tsx +18 -6
  17. package/map/ResolvedPlaceLayers.tsx +15 -5
  18. package/map/ResultCamera.tsx +6 -2
  19. package/map/ResultOverlay.tsx +18 -6
  20. package/map/ResultPanel.tsx +21 -7
  21. package/map/VersionPicker.tsx +18 -6
  22. package/map/geometry.ts +28 -8
  23. package/map/index.ts +3 -0
  24. package/map/place-render.ts +36 -12
  25. package/map/types.ts +132 -44
  26. package/map/useCompareState.ts +15 -5
  27. package/map/useDemoGeocode.ts +12 -4
  28. package/map/useMapPlaceRender.ts +3 -1
  29. package/map/usePlaceAutocomplete.ts +52 -18
  30. package/out/common/ClientOnly.d.ts +6 -2
  31. package/out/common/ClientOnly.d.ts.map +1 -1
  32. package/out/common/ClientOnly.js.map +1 -1
  33. package/out/common/CopyButton.d.ts +9 -3
  34. package/out/common/CopyButton.d.ts.map +1 -1
  35. package/out/common/CopyButton.js.map +1 -1
  36. package/out/common/KindBadge.js +1 -1
  37. package/out/common/KindBadge.js.map +1 -1
  38. package/out/common/LoadingIndicator.d.ts +21 -6
  39. package/out/common/LoadingIndicator.d.ts.map +1 -1
  40. package/out/common/LoadingIndicator.js +4 -1
  41. package/out/common/LoadingIndicator.js.map +1 -1
  42. package/out/common/PresetChips.d.ts +6 -2
  43. package/out/common/PresetChips.d.ts.map +1 -1
  44. package/out/common/PresetChips.js.map +1 -1
  45. package/out/common/cx.d.ts +3 -1
  46. package/out/common/cx.d.ts.map +1 -1
  47. package/out/common/cx.js +3 -1
  48. package/out/common/cx.js.map +1 -1
  49. package/out/common/useClipboard.d.ts +3 -1
  50. package/out/common/useClipboard.d.ts.map +1 -1
  51. package/out/common/useClipboard.js +6 -2
  52. package/out/common/useClipboard.js.map +1 -1
  53. package/out/index.d.ts.map +1 -1
  54. package/out/index.js.map +1 -1
  55. package/out/map/BackendControl.d.ts +12 -4
  56. package/out/map/BackendControl.d.ts.map +1 -1
  57. package/out/map/BackendControl.js +3 -1
  58. package/out/map/BackendControl.js.map +1 -1
  59. package/out/map/CompareToggle.d.ts +27 -9
  60. package/out/map/CompareToggle.d.ts.map +1 -1
  61. package/out/map/CompareToggle.js +3 -1
  62. package/out/map/CompareToggle.js.map +1 -1
  63. package/out/map/DemoControls.d.ts +30 -10
  64. package/out/map/DemoControls.d.ts.map +1 -1
  65. package/out/map/DemoControls.js +4 -2
  66. package/out/map/DemoControls.js.map +1 -1
  67. package/out/map/DemoMap.d.ts +33 -11
  68. package/out/map/DemoMap.d.ts.map +1 -1
  69. package/out/map/DemoMap.js.map +1 -1
  70. package/out/map/GeocoderDemo.d.ts +16 -6
  71. package/out/map/GeocoderDemo.d.ts.map +1 -1
  72. package/out/map/GeocoderDemo.js +9 -3
  73. package/out/map/GeocoderDemo.js.map +1 -1
  74. package/out/map/OverlayLayers.d.ts +6 -2
  75. package/out/map/OverlayLayers.d.ts.map +1 -1
  76. package/out/map/OverlayLayers.js +4 -2
  77. package/out/map/OverlayLayers.js.map +1 -1
  78. package/out/map/PlaceAutocomplete.d.ts +24 -8
  79. package/out/map/PlaceAutocomplete.d.ts.map +1 -1
  80. package/out/map/PlaceAutocomplete.js +4 -2
  81. package/out/map/PlaceAutocomplete.js.map +1 -1
  82. package/out/map/PlaceMarker.d.ts +15 -5
  83. package/out/map/PlaceMarker.d.ts.map +1 -1
  84. package/out/map/PlaceMarker.js +6 -2
  85. package/out/map/PlaceMarker.js.map +1 -1
  86. package/out/map/ResolvedPlaceLayers.d.ts +15 -5
  87. package/out/map/ResolvedPlaceLayers.d.ts.map +1 -1
  88. package/out/map/ResolvedPlaceLayers.js +3 -1
  89. package/out/map/ResolvedPlaceLayers.js.map +1 -1
  90. package/out/map/ResultCamera.d.ts +6 -2
  91. package/out/map/ResultCamera.d.ts.map +1 -1
  92. package/out/map/ResultCamera.js +3 -1
  93. package/out/map/ResultCamera.js.map +1 -1
  94. package/out/map/ResultOverlay.d.ts +15 -5
  95. package/out/map/ResultOverlay.d.ts.map +1 -1
  96. package/out/map/ResultOverlay.js +3 -1
  97. package/out/map/ResultOverlay.js.map +1 -1
  98. package/out/map/ResultPanel.d.ts +21 -7
  99. package/out/map/ResultPanel.d.ts.map +1 -1
  100. package/out/map/ResultPanel.js +3 -1
  101. package/out/map/ResultPanel.js.map +1 -1
  102. package/out/map/VersionPicker.d.ts +18 -6
  103. package/out/map/VersionPicker.d.ts.map +1 -1
  104. package/out/map/VersionPicker.js +3 -1
  105. package/out/map/VersionPicker.js.map +1 -1
  106. package/out/map/geometry.d.ts +12 -4
  107. package/out/map/geometry.d.ts.map +1 -1
  108. package/out/map/geometry.js +17 -5
  109. package/out/map/geometry.js.map +1 -1
  110. package/out/map/index.d.ts.map +1 -1
  111. package/out/map/index.js.map +1 -1
  112. package/out/map/place-render.d.ts +27 -9
  113. package/out/map/place-render.d.ts.map +1 -1
  114. package/out/map/place-render.js +9 -3
  115. package/out/map/place-render.js.map +1 -1
  116. package/out/map/types.d.ts +132 -44
  117. package/out/map/types.d.ts.map +1 -1
  118. package/out/map/useCompareState.d.ts +15 -5
  119. package/out/map/useCompareState.d.ts.map +1 -1
  120. package/out/map/useCompareState.js.map +1 -1
  121. package/out/map/useDemoGeocode.d.ts +12 -4
  122. package/out/map/useDemoGeocode.d.ts.map +1 -1
  123. package/out/map/useDemoGeocode.js.map +1 -1
  124. package/out/map/useMapPlaceRender.d.ts +3 -1
  125. package/out/map/useMapPlaceRender.d.ts.map +1 -1
  126. package/out/map/useMapPlaceRender.js +3 -1
  127. package/out/map/useMapPlaceRender.js.map +1 -1
  128. package/out/map/usePlaceAutocomplete.d.ts +45 -15
  129. package/out/map/usePlaceAutocomplete.d.ts.map +1 -1
  130. package/out/map/usePlaceAutocomplete.js +7 -3
  131. package/out/map/usePlaceAutocomplete.js.map +1 -1
  132. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  133. package/out/pipeline/ConfidenceCell.js +9 -1
  134. package/out/pipeline/ConfidenceCell.js.map +1 -1
  135. package/out/pipeline/PipelineExplorer.d.ts +12 -4
  136. package/out/pipeline/PipelineExplorer.d.ts.map +1 -1
  137. package/out/pipeline/PipelineExplorer.js +6 -2
  138. package/out/pipeline/PipelineExplorer.js.map +1 -1
  139. package/out/pipeline/QueryForm.d.ts +6 -2
  140. package/out/pipeline/QueryForm.d.ts.map +1 -1
  141. package/out/pipeline/QueryForm.js +1 -1
  142. package/out/pipeline/QueryForm.js.map +1 -1
  143. package/out/pipeline/ResolvedPlace.js +1 -1
  144. package/out/pipeline/ResolvedPlace.js.map +1 -1
  145. package/out/pipeline/presets.d.ts +7 -0
  146. package/out/pipeline/presets.d.ts.map +1 -1
  147. package/out/pipeline/presets.js +7 -0
  148. package/out/pipeline/presets.js.map +1 -1
  149. package/out/pipeline/types.d.ts +60 -20
  150. package/out/pipeline/types.d.ts.map +1 -1
  151. package/out/pipeline/useParsePipeline.d.ts +12 -4
  152. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  153. package/out/pipeline/useParsePipeline.js +2 -2
  154. package/out/pipeline/useParsePipeline.js.map +1 -1
  155. package/out/poi/LiveResultsBlock.d.ts +6 -2
  156. package/out/poi/LiveResultsBlock.d.ts.map +1 -1
  157. package/out/poi/LiveResultsBlock.js +1 -1
  158. package/out/poi/LiveResultsBlock.js.map +1 -1
  159. package/out/poi/POIExplorer.d.ts +12 -4
  160. package/out/poi/POIExplorer.d.ts.map +1 -1
  161. package/out/poi/POIExplorer.js.map +1 -1
  162. package/out/poi/SubjectPanel.d.ts.map +1 -1
  163. package/out/poi/SubjectPanel.js +4 -2
  164. package/out/poi/SubjectPanel.js.map +1 -1
  165. package/out/poi/runtime.d.ts +9 -2
  166. package/out/poi/runtime.d.ts.map +1 -1
  167. package/out/poi/runtime.js +10 -3
  168. package/out/poi/runtime.js.map +1 -1
  169. package/out/poi/types.d.ts +40 -15
  170. package/out/poi/types.d.ts.map +1 -1
  171. package/out/poi/usePOISearch.d.ts +27 -9
  172. package/out/poi/usePOISearch.d.ts.map +1 -1
  173. package/out/poi/usePOISearch.js +5 -3
  174. package/out/poi/usePOISearch.js.map +1 -1
  175. package/out/runtime/useDemoRuntime.d.ts +81 -27
  176. package/out/runtime/useDemoRuntime.d.ts.map +1 -1
  177. package/out/runtime/useDemoRuntime.js.map +1 -1
  178. package/package.json +4 -4
  179. package/pipeline/ConfidenceCell.tsx +11 -1
  180. package/pipeline/PipelineExplorer.tsx +19 -6
  181. package/pipeline/QueryForm.tsx +7 -3
  182. package/pipeline/ResolvedPlace.tsx +2 -2
  183. package/pipeline/presets.ts +7 -0
  184. package/pipeline/types.ts +60 -20
  185. package/pipeline/useParsePipeline.ts +14 -6
  186. package/poi/LiveResultsBlock.tsx +7 -3
  187. package/poi/POIExplorer.tsx +14 -4
  188. package/poi/SubjectPanel.tsx +4 -2
  189. package/poi/runtime.ts +11 -3
  190. package/poi/types.ts +41 -15
  191. package/poi/usePOISearch.ts +34 -12
  192. package/runtime/useDemoRuntime.ts +82 -27
@@ -19,13 +19,21 @@ import type { LayerSpecification, SourceSpecification } from "react-map-gl/mapli
19
19
  import type { ParseResult, PipelineRuntime, ResolvedPlaceView } from "../pipeline/types.ts";
20
20
  import type { DemoMapStyle } from "./DemoMap.tsx";
21
21
  import type { ResolvedMapPlace } from "./place-render.ts";
22
- /** `[longitude, latitude]`. */
22
+ /**
23
+ * `[longitude, latitude]`.
24
+ */
23
25
  export type LngLatTuple = [number, number];
24
- /** A viewport bias handed to `runParse` — the map's current center (and optionally zoom) as a soft prior. */
26
+ /**
27
+ * A viewport bias handed to `runParse` — the map's current center (and optionally zoom) as a soft prior.
28
+ */
25
29
  export interface MapBias {
26
- /** Map center as `[lon, lat]`, typically read from `map.getCenter()`. */
30
+ /**
31
+ * Map center as `[lon, lat]`, typically read from `map.getCenter()`.
32
+ */
27
33
  center: LngLatTuple;
28
- /** Current zoom, if the host wants distance-aware biasing. */
34
+ /**
35
+ * Current zoom, if the host wants distance-aware biasing.
36
+ */
29
37
  zoom?: number;
30
38
  }
31
39
  /**
@@ -33,34 +41,60 @@ export interface MapBias {
33
41
  * race-dots, …). The host composes the specs; the package renders them declaratively in a later phase.
34
42
  */
35
43
  export interface OverlaySpec {
36
- /** Stable id — used as the `<Source>` id and the layer-id prefix. */
44
+ /**
45
+ * Stable id — used as the `<Source>` id and the layer-id prefix.
46
+ */
37
47
  id: string;
38
- /** The map source spec (vector/geojson/raster). */
48
+ /**
49
+ * The map source spec (vector/geojson/raster).
50
+ */
39
51
  source: SourceSpecification;
40
- /** The layers drawn from that source. */
52
+ /**
53
+ * The layers drawn from that source.
54
+ */
41
55
  layers: LayerSpecification[];
42
- /** Whether the overlay is visible initially. @default true */
56
+ /**
57
+ * Whether the overlay is visible initially. @default true
58
+ */
43
59
  visible?: boolean;
44
- /** Human label for a layer-toggle control. */
60
+ /**
61
+ * Human label for a layer-toggle control.
62
+ */
45
63
  label?: string;
46
64
  }
47
- /** One autocomplete suggestion produced by the host's FST prefix-walk. */
65
+ /**
66
+ * One autocomplete suggestion produced by the host's FST prefix-walk.
67
+ */
48
68
  export interface Suggestion {
49
- /** The text inserted when the suggestion is picked. */
69
+ /**
70
+ * The text inserted when the suggestion is picked.
71
+ */
50
72
  value: string;
51
- /** Optional display label if it differs from `value`. */
73
+ /**
74
+ * Optional display label if it differs from `value`.
75
+ */
52
76
  label?: string;
53
- /** Optional place kind for badge/icon rendering. */
77
+ /**
78
+ * Optional place kind for badge/icon rendering.
79
+ */
54
80
  placetype?: string;
55
81
  }
56
- /** A selectable model bundle (version tag + a display label the picker shows). */
82
+ /**
83
+ * A selectable model bundle (version tag + a display label the picker shows).
84
+ */
57
85
  export interface DemoVersionOption {
58
- /** The version tag (e.g. a git tag or model-card version). */
86
+ /**
87
+ * The version tag (e.g. a git tag or model-card version).
88
+ */
59
89
  version: string;
60
- /** Display label; falls back to `version`. */
90
+ /**
91
+ * Display label; falls back to `version`.
92
+ */
61
93
  label?: string;
62
94
  }
63
- /** Which neural backend the demo is currently running on. */
95
+ /**
96
+ * Which neural backend the demo is currently running on.
97
+ */
64
98
  export type DemoBackend = "webgpu" | "wasm";
65
99
  /**
66
100
  * The injected demo runtime. Extends {@link PipelineRuntime} (shared `runParse` / `parseStageLabels` / `loading` /
@@ -70,13 +104,21 @@ export type DemoBackend = "webgpu" | "wasm";
70
104
  * `@mailwoman/neural-web`, httpvfs, or Docusaurus.
71
105
  */
72
106
  export interface DemoRuntime extends PipelineRuntime {
73
- /** The composed basemap style (URL or `StyleSpecification`). */
107
+ /**
108
+ * The composed basemap style (URL or `StyleSpecification`).
109
+ */
74
110
  mapStyle: DemoMapStyle;
75
- /** Host-supplied overlays (coverage, race-dots, …). */
111
+ /**
112
+ * Host-supplied overlays (coverage, race-dots, …).
113
+ */
76
114
  overlays?: OverlaySpec[];
77
- /** Initial map center as `[lon, lat]` (the host's browser-geolocation result). */
115
+ /**
116
+ * Initial map center as `[lon, lat]` (the host's browser-geolocation result).
117
+ */
78
118
  initialCenter: LngLatTuple;
79
- /** Initial zoom for the first camera. */
119
+ /**
120
+ * Initial zoom for the first camera.
121
+ */
80
122
  initialZoom?: number;
81
123
  /**
82
124
  * A bias-aware parse. The map demo feeds the current viewport center as a soft prior; when absent the host falls back
@@ -85,9 +127,13 @@ export interface DemoRuntime extends PipelineRuntime {
85
127
  runParseWithBias?: (input: string, bias: MapBias | null, hooks: {
86
128
  onStage: (stage: number) => void;
87
129
  }) => ReturnType<PipelineRuntime["runParse"]>;
88
- /** FST prefix-walk autocomplete, wrapped by the host. */
130
+ /**
131
+ * FST prefix-walk autocomplete, wrapped by the host.
132
+ */
89
133
  autocomplete?: (query: string) => Promise<Suggestion[]>;
90
- /** Maps a raw model score to a calibrated one; `null` when no calibration table is loaded. */
134
+ /**
135
+ * Maps a raw model score to a calibrated one; `null` when no calibration table is loaded.
136
+ */
91
137
  calibrator?: (raw: number) => number | null;
92
138
  /**
93
139
  * Enrich the selected candidate into the richer {@link ResolvedMapPlace} the declarative map render consumes (bbox,
@@ -97,26 +143,46 @@ export interface DemoRuntime extends PipelineRuntime {
97
143
  * renders as a bare point (marker + a mid-zoom fly-to). Returning `null` also renders nothing.
98
144
  */
99
145
  resolveMapPlace?: (candidate: ResolvedPlaceView, result: ParseResult) => ResolvedMapPlace | null;
100
- /** The selectable model bundles the version picker offers. */
146
+ /**
147
+ * The selectable model bundles the version picker offers.
148
+ */
101
149
  availableVersions?: DemoVersionOption[];
102
- /** The currently-selected model version. */
150
+ /**
151
+ * The currently-selected model version.
152
+ */
103
153
  selectedVersion?: string;
104
- /** Switch the active model bundle (re-loads weights/tokenizer/gazetteer). */
154
+ /**
155
+ * Switch the active model bundle (re-loads weights/tokenizer/gazetteer).
156
+ */
105
157
  selectVersion?: (version: string) => void;
106
- /** The backend the neural runtime resolved to (e.g. `webgpu (28 MB int8)`); free-form for the label. */
158
+ /**
159
+ * The backend the neural runtime resolved to (e.g. `webgpu (28 MB int8)`); free-form for the label.
160
+ */
107
161
  activeBackend?: string;
108
- /** Whether the CPU/WASM backend is currently forced (the controlled value for the backend toggle). */
162
+ /**
163
+ * Whether the CPU/WASM backend is currently forced (the controlled value for the backend toggle).
164
+ */
109
165
  forceWASM?: boolean;
110
- /** Force the WASM backend (opt out of WebGPU), for the backend toggle. */
166
+ /**
167
+ * Force the WASM backend (opt out of WebGPU), for the backend toggle.
168
+ */
111
169
  setForceWASM?: (forceWASM: boolean) => void;
112
170
  }
113
- /** The compare-mode state a {@link DemoPanels.compare} render-prop receives (the second parse itself stays host-side). */
171
+ /**
172
+ * The compare-mode state a {@link DemoPanels.compare} render-prop receives (the second parse itself stays host-side).
173
+ */
114
174
  export interface DemoCompareContext {
115
- /** The current primary parse result, or `null` before the first submit. */
175
+ /**
176
+ * The current primary parse result, or `null` before the first submit.
177
+ */
116
178
  result: ParseResult | null;
117
- /** Whether the compare toggle is on. */
179
+ /**
180
+ * Whether the compare toggle is on.
181
+ */
118
182
  compareMode: boolean;
119
- /** The version selected to compare against, or `null` when none is chosen. */
183
+ /**
184
+ * The version selected to compare against, or `null` when none is chosen.
185
+ */
120
186
  compareVersion: string | null;
121
187
  }
122
188
  /**
@@ -126,13 +192,21 @@ export interface DemoCompareContext {
126
192
  * by the package (`useDemoGeocode`).
127
193
  */
128
194
  export interface DemoResultContext {
129
- /** The current parse+resolve result. */
195
+ /**
196
+ * The current parse+resolve result.
197
+ */
130
198
  result: ParseResult;
131
- /** The selected candidate (falls back to the first), enriched for the resolved-place detail. */
199
+ /**
200
+ * The selected candidate (falls back to the first), enriched for the resolved-place detail.
201
+ */
132
202
  selectedCandidate: ResolvedPlaceView | null;
133
- /** The selected candidate index, for the picker's active state. */
203
+ /**
204
+ * The selected candidate index, for the picker's active state.
205
+ */
134
206
  selectedCandidateIndex: number;
135
- /** Fired when a candidate in the picker is chosen. */
207
+ /**
208
+ * Fired when a candidate in the picker is chosen.
209
+ */
136
210
  onSelectCandidate: (index: number) => void;
137
211
  }
138
212
  /**
@@ -142,11 +216,17 @@ export interface DemoResultContext {
142
216
  * fake-runtime Storybook stories pass none and still render the whole demo.
143
217
  */
144
218
  export interface DemoPanels {
145
- /** Rendered at the top of the control panel (e.g. the docs "About this demo"). */
219
+ /**
220
+ * Rendered at the top of the control panel (e.g. the docs "About this demo").
221
+ */
146
222
  header?: ReactNode;
147
- /** One-line release blurb for the selected version. */
223
+ /**
224
+ * One-line release blurb for the selected version.
225
+ */
148
226
  releaseInfo?: ReactNode;
149
- /** Rendered at the bottom of the control panel (e.g. a guided tour). */
227
+ /**
228
+ * Rendered at the bottom of the control panel (e.g. a guided tour).
229
+ */
150
230
  footer?: ReactNode;
151
231
  /**
152
232
  * A device-location / proximity-bias control, rendered between the query form and the autocomplete list (the demo's
@@ -154,7 +234,9 @@ export interface DemoPanels {
154
234
  * {@link DemoRuntime.runParseWithBias} stay a host concern.
155
235
  */
156
236
  bias?: ReactNode;
157
- /** Heavy visualizers (span highlight, tree, timing, BIO, …), rendered from the result. */
237
+ /**
238
+ * Heavy visualizers (span highlight, tree, timing, BIO, …), rendered from the result.
239
+ */
158
240
  extras?: (result: ParseResult) => ReactNode;
159
241
  /**
160
242
  * Rendered just above the result block (present or empty). The demo's opt-in display toggles live here — calibrated
@@ -175,7 +257,9 @@ export interface DemoPanels {
175
257
  * {@link result} is set.
176
258
  */
177
259
  failure?: (result: ParseResult) => ReactNode;
178
- /** The version-compare view — the host renders its own diff from the compare state it owns. */
260
+ /**
261
+ * The version-compare view — the host renders its own diff from the compare state it owns.
262
+ */
179
263
  compare?: (context: DemoCompareContext) => ReactNode;
180
264
  /**
181
265
  * The model-visualizer / debug drawer, mounted beside the map (host's ModelVisualizer). A render-prop so the host can
@@ -185,9 +269,13 @@ export interface DemoPanels {
185
269
  debugDrawer?: (context: {
186
270
  result: ParseResult | null;
187
271
  }) => ReactNode;
188
- /** Extra map controls mounted as `<DemoMap>` children (host's DebugControl / LayerToggle via `useControl`). */
272
+ /**
273
+ * Extra map controls mounted as `<DemoMap>` children (host's DebugControl / LayerToggle via `useControl`).
274
+ */
189
275
  mapControls?: ReactNode;
190
- /** A permalink control for the current address (host's PermalinkButton). */
276
+ /**
277
+ * A permalink control for the current address (host's PermalinkButton).
278
+ */
191
279
  permalink?: (text: string) => ReactNode;
192
280
  }
193
281
  //#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E;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,SAAS,CAAA;IAClD;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC5C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,SAAS,CAAA;IACpD;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;KAAE,KAAK,SAAS,CAAA;IACpE;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,SAAS,CAAA;CACvC"}
@@ -10,15 +10,25 @@
10
10
  * host concern surfaced through `panels.compare` — this hook owns only the toggle + selection.
11
11
  */
12
12
  export interface UseCompareState {
13
- /** Whether compare mode is on. */
13
+ /**
14
+ * Whether compare mode is on.
15
+ */
14
16
  compareMode: boolean;
15
- /** The version chosen to compare against, or `null`. */
17
+ /**
18
+ * The version chosen to compare against, or `null`.
19
+ */
16
20
  compareVersion: string | null;
17
- /** Flip compare mode; turning it off clears the chosen version. */
21
+ /**
22
+ * Flip compare mode; turning it off clears the chosen version.
23
+ */
18
24
  setCompareMode: (compareMode: boolean) => void;
19
- /** Choose a compare version (`null` clears it). */
25
+ /**
26
+ * Choose a compare version (`null` clears it).
27
+ */
20
28
  setCompareVersion: (version: string | null) => void;
21
- /** Keep the compare selection distinct from the primary — call when the primary version changes. */
29
+ /**
30
+ * Keep the compare selection distinct from the primary — call when the primary version changes.
31
+ */
22
32
  clearIfPrimary: (primaryVersion: string) => void;
23
33
  }
24
34
  export declare function useCompareState(): UseCompareState;
@@ -1 +1 @@
1
- {"version":3,"file":"useCompareState.d.ts","sourceRoot":"","sources":["../../map/useCompareState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,WAAW,eAAe;IAC/B,kCAAkC;IAClC,WAAW,EAAE,OAAO,CAAA;IACpB,wDAAwD;IACxD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,mEAAmE;IACnE,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C,mDAAmD;IACnD,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD,oGAAoG;IACpG,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,wBAAgB,eAAe,IAAI,eAAe,CAiBjD"}
1
+ {"version":3,"file":"useCompareState.d.ts","sourceRoot":"","sources":["../../map/useCompareState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACnD;;OAEG;IACH,cAAc,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,wBAAgB,eAAe,IAAI,eAAe,CAiBjD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useCompareState.js","sourceRoot":"","sources":["../../map/useCompareState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAe7C,MAAM,UAAU,eAAe;IAC9B,MAAM,CAAC,WAAW,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;IAC1D,MAAM,CAAC,cAAc,EAAE,iBAAiB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AE,EAAE;QAC7D,iBAAiB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;IACrE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAA;AAC1F,CAAC"}
@@ -21,15 +21,23 @@ import { type UseParsePipeline } from "../pipeline/useParsePipeline.ts";
21
21
  import type { ResolvedMapPlace } from "./place-render.ts";
22
22
  import type { DemoRuntime, MapBias } from "./types.ts";
23
23
  export interface UseDemoGeocodeOptions {
24
- /** The injected demo runtime (extends `PipelineRuntime` with the map + bias surface). */
24
+ /**
25
+ * The injected demo runtime (extends `PipelineRuntime` with the map + bias surface).
26
+ */
25
27
  runtime: DemoRuntime;
26
- /** Address to pre-fill. */
28
+ /**
29
+ * Address to pre-fill.
30
+ */
27
31
  defaultText: string;
28
- /** Read the current viewport bias (the map center) at submit time. Absent → no bias. */
32
+ /**
33
+ * Read the current viewport bias (the map center) at submit time. Absent → no bias.
34
+ */
29
35
  getBias?: () => MapBias | null;
30
36
  }
31
37
  export interface UseDemoGeocode extends UseParsePipeline {
32
- /** The selected candidate enriched into the map-render shape (bbox / tier / polygon), or `null`. */
38
+ /**
39
+ * The selected candidate enriched into the map-render shape (bbox / tier / polygon), or `null`.
40
+ */
33
41
  mapPlace: ResolvedMapPlace | null;
34
42
  }
35
43
  export declare function useDemoGeocode({ runtime, defaultText, getBias }: UseDemoGeocodeOptions): UseDemoGeocode;
@@ -1 +1 @@
1
- {"version":3,"file":"useDemoGeocode.d.ts","sourceRoot":"","sources":["../../map/useDemoGeocode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,iCAAiC,CAAA;AACzF,OAAO,KAAK,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Q,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IAE1D,OAAO,EAAE,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAA;AACjC,CAAC"}
@@ -10,6 +10,8 @@
10
10
  * candidate) yields `null` — the overlays render nothing.
11
11
  */
12
12
  import type { MapPlaceRenderSpec, ResolvedMapPlace } from "./place-render.ts";
13
- /** Memoize the render spec for a resolved place; `null` in → `null` out (nothing to draw). */
13
+ /**
14
+ * Memoize the render spec for a resolved place; `null` in → `null` out (nothing to draw).
15
+ */
14
16
  export declare function useMapPlaceRender(place: ResolvedMapPlace | null | undefined): MapPlaceRenderSpec | null;
15
17
  //# sourceMappingURL=useMapPlaceRender.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMapPlaceRender.d.ts","sourceRoot":"","sources":["../../map/useMapPlaceRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAE7E,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAEvG"}
1
+ {"version":3,"file":"useMapPlaceRender.d.ts","sourceRoot":"","sources":["../../map/useMapPlaceRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAE7E;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,GAAG,kBAAkB,GAAG,IAAI,CAEvG"}
@@ -11,7 +11,9 @@
11
11
  */
12
12
  import { useMemo } from "react";
13
13
  import { computeMapPlaceRenderSpec } from "./place-render.js";
14
- /** Memoize the render spec for a resolved place; `null` in → `null` out (nothing to draw). */
14
+ /**
15
+ * Memoize the render spec for a resolved place; `null` in → `null` out (nothing to draw).
16
+ */
15
17
  export function useMapPlaceRender(place) {
16
18
  return useMemo(() => (place ? computeMapPlaceRenderSpec(place) : null), [place]);
17
19
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useMapPlaceRender.js","sourceRoot":"","sources":["../../map/useMapPlaceRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAG7D,8FAA8F;AAC9F,MAAM,UAAU,iBAAiB,CAAC,KAA0C;IAC3E,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;AACjF,CAAC"}
1
+ {"version":3,"file":"useMapPlaceRender.js","sourceRoot":"","sources":["../../map/useMapPlaceRender.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAG7D;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAA0C;IAC3E,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,yBAAyB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;AACjF,CAAC"}
@@ -17,18 +17,30 @@
17
17
  import { type KeyboardEvent } from "react";
18
18
  import type { Suggestion } from "./types.ts";
19
19
  export interface UsePlaceAutocompleteOptions {
20
- /** The current input text. */
20
+ /**
21
+ * The current input text.
22
+ */
21
23
  text: string;
22
- /** Setter for the input text (a pick rewrites the last-comma segment). */
24
+ /**
25
+ * Setter for the input text (a pick rewrites the last-comma segment).
26
+ */
23
27
  setText: (text: string) => void;
24
- /** The host's autocomplete fetcher (FST prefix-walk). Absent → the combobox is inert. */
28
+ /**
29
+ * The host's autocomplete fetcher (FST prefix-walk). Absent → the combobox is inert.
30
+ */
25
31
  autocomplete?: (query: string) => Promise<Suggestion[]>;
26
- /** Minimum query length before suggesting. @default 2 */
32
+ /**
33
+ * Minimum query length before suggesting. @default 2
34
+ */
27
35
  minChars?: number;
28
- /** Debounce before firing the fetcher. @default 150 */
36
+ /**
37
+ * Debounce before firing the fetcher. @default 150
38
+ */
29
39
  debounceMs?: number;
30
40
  }
31
- /** The combobox aria props to spread onto the input the suggestions describe. */
41
+ /**
42
+ * The combobox aria props to spread onto the input the suggestions describe.
43
+ */
32
44
  export interface AutocompleteInputProps {
33
45
  role: "combobox";
34
46
  "aria-expanded": boolean;
@@ -38,23 +50,41 @@ export interface AutocompleteInputProps {
38
50
  autoComplete: "off";
39
51
  }
40
52
  export interface UsePlaceAutocomplete {
41
- /** The current suggestions (empty when nothing matches — the listbox then hides). */
53
+ /**
54
+ * The current suggestions (empty when nothing matches — the listbox then hides).
55
+ */
42
56
  suggestions: Suggestion[];
43
- /** The keyboard-highlighted suggestion index; `-1` when none is highlighted. */
57
+ /**
58
+ * The keyboard-highlighted suggestion index; `-1` when none is highlighted.
59
+ */
44
60
  activeIndex: number;
45
- /** Set the highlighted index (the listbox calls this on mouse-enter). */
61
+ /**
62
+ * Set the highlighted index (the listbox calls this on mouse-enter).
63
+ */
46
64
  setActiveIndex: (index: number) => void;
47
- /** Keydown handler for the input: ↑/↓ highlight, Enter accepts (+ suppresses submit), Esc dismisses. */
65
+ /**
66
+ * Keydown handler for the input: ↑/↓ highlight, Enter accepts (+ suppresses submit), Esc dismisses.
67
+ */
48
68
  onInputKeyDown: (event: KeyboardEvent<HTMLInputElement>) => void;
49
- /** Accept a suggestion by value (rewrites the last-comma segment, closes the list). */
69
+ /**
70
+ * Accept a suggestion by value (rewrites the last-comma segment, closes the list).
71
+ */
50
72
  pick: (value: string) => void;
51
- /** Close the list without picking. */
73
+ /**
74
+ * Close the list without picking.
75
+ */
52
76
  dismiss: () => void;
53
- /** Aria/combobox props for the input the suggestions describe. */
77
+ /**
78
+ * Aria/combobox props for the input the suggestions describe.
79
+ */
54
80
  inputProps: AutocompleteInputProps;
55
- /** The listbox element id (matches `inputProps["aria-controls"]`). */
81
+ /**
82
+ * The listbox element id (matches `inputProps["aria-controls"]`).
83
+ */
56
84
  listboxId: string;
57
- /** Build the option element id for suggestion `index`. */
85
+ /**
86
+ * Build the option element id for suggestion `index`.
87
+ */
58
88
  optionId: (index: number) => string;
59
89
  }
60
90
  export declare function usePlaceAutocomplete({ text, setText, autocomplete, minChars, debounceMs, }: UsePlaceAutocompleteOptions): UsePlaceAutocomplete;
@@ -1 +1 @@
1
- {"version":3,"file":"usePlaceAutocomplete.d.ts","sourceRoot":"","sources":["../../map/usePlaceAutocomplete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,KAAK,aAAa,EAA4C,MAAM,OAAO,CAAA;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,2BAA2B;IAC3C,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,0EAA0E;IAC1E,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,yFAAyF;IACzF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACvD,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,iFAAiF;AACjF,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,UAAU,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,EAAE,MAAM,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G;IACH,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,IAAI,EAAE,UAAU,CAAA;IAChB,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;IACvB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,uBAAuB,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3C,YAAY,EAAE,KAAK,CAAA;CACnB;AAED,MAAM,WAAW,oBAAoB;IACpC;;OAEG;IACH,WAAW,EAAE,UAAU,EAAE,CAAA;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;IAChE;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB;;OAEG;IACH,UAAU,EAAE,sBAAsB,CAAA;IAClC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACnC;AAmBD,wBAAgB,oBAAoB,CAAC,EACpC,IAAI,EACJ,OAAO,EACP,YAAY,EACZ,QAAY,EACZ,UAAgB,GAChB,EAAE,2BAA2B,GAAG,oBAAoB,CA6GpD"}
@@ -18,11 +18,15 @@ import { useCallback, useEffect, useRef, useState } from "react";
18
18
  import { useDebouncedValue } from "../common/useDebouncedValue.js";
19
19
  const LISTBOX_ID = "mw-demo-suggest-list";
20
20
  const optionId = (index) => `mw-demo-suggest-${index}`;
21
- /** Extract the locality segment being typed — the text after the last comma, trimmed. */
21
+ /**
22
+ * Extract the locality segment being typed — the text after the last comma, trimmed.
23
+ */
22
24
  function localitySegment(text) {
23
25
  return (text.includes(",") ? text.slice(text.lastIndexOf(",") + 1) : text).trim();
24
26
  }
25
- /** Replace the locality segment (after the last comma) with `name`, preserving the address prefix. */
27
+ /**
28
+ * Replace the locality segment (after the last comma) with `name`, preserving the address prefix.
29
+ */
26
30
  function replaceSegment(current, name) {
27
31
  return current.includes(",") ? `${current.slice(0, current.lastIndexOf(",") + 1)} ${name}` : name;
28
32
  }
@@ -77,7 +81,7 @@ export function usePlaceAutocomplete({ text, setText, autocomplete, minChars = 2
77
81
  setActiveIndex(-1);
78
82
  }, []);
79
83
  const onInputKeyDown = useCallback((event) => {
80
- if (suggestions.length === 0)
84
+ if (!suggestions.length)
81
85
  return;
82
86
  switch (event.key) {
83
87
  case "ArrowDown":
@@ -1 +1 @@
1
- {"version":3,"file":"usePlaceAutocomplete.js","sourceRoot":"","sources":["../../map/usePlaceAutocomplete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAsB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AA+ClE,MAAM,UAAU,GAAG,sBAAsB,CAAA;AACzC,MAAM,QAAQ,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,mBAAmB,KAAK,EAAE,CAAA;AAE9D,yFAAyF;AACzF,SAAS,eAAe,CAAC,IAAY;IACpC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAA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C;gBAED,MAAK;YACN,KAAK,QAAQ;gBACZ,KAAK,CAAC,cAAc,EAAE,CAAA;gBACtB,OAAO,EAAE,CAAA;gBACT,MAAK;QACP,CAAC;IACF,CAAC,EACD,CAAC,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,CAAC,CACzC,CAAA;IAED,OAAO;QACN,WAAW;QACX,WAAW;QACX,cAAc;QACd,cAAc;QACd,IAAI;QACJ,OAAO;QACP,UAAU,EAAE;YACX,IAAI,EAAE,UAAU;YAChB,eAAe,EAAE,WAAW,CAAC,MAAM,GAAG,CAAC;YACvC,eAAe,EAAE,UAAU;YAC3B,mBAAmB,EAAE,MAAM;YAC3B,uBAAuB,EAAE,WAAW,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;YAC7E,YAAY,EAAE,KAAK;SACnB;QACD,SAAS,EAAE,UAAU;QACrB,QAAQ;KACR,CAAA;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConfidenceCell.d.ts","sourceRoot":"","sources":["../../pipeline/ConfidenceCell.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,MAAM,WAAW,mBAAmB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,EAAE,mBAAmB,+BAWjE"}
1
+ {"version":3,"file":"ConfidenceCell.d.ts","sourceRoot":"","sources":["../../pipeline/ConfidenceCell.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoBH,MAAM,WAAW,mBAAmB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,cAAc,CAAC,EAAE,UAAU,EAAE,EAAE,mBAAmB,+BAWjE"}
@@ -8,10 +8,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
8
  * at 0.8 / 0.5. Presentational.
9
9
  */
10
10
  import { cx } from "../common/cx.js";
11
+ /**
12
+ * At or above this the cell is drawn as high-confidence. Presentation only — see docs/src/shared/confidence-tiers.ts.
13
+ */
14
+ const HIGH_CONFIDENCE_MIN = 0.8;
15
+ /**
16
+ * At or above this the cell is drawn as medium-confidence; below it, low.
17
+ */
18
+ const MID_CONFIDENCE_MIN = 0.5;
11
19
  function tier(confidence) {
12
20
  if (confidence == null)
13
21
  return "mid";
14
- return confidence >= 0.8 ? "high" : confidence >= 0.5 ? "mid" : "low";
22
+ return confidence >= HIGH_CONFIDENCE_MIN ? "high" : confidence >= MID_CONFIDENCE_MIN ? "mid" : "low";
15
23
  }
16
24
  export function ConfidenceCell({ confidence }) {
17
25
  if (confidence == null)
@@ -1 +1 @@
1
- {"version":3,"file":"ConfidenceCell.js","sourceRoot":"","sources":["../../pipeline/ConfidenceCell.tsx"],"names":[],"mappings":";AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAA;AAEpC,SAAS,IAAI,CAAC,UAAmB;IAChC,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAEpC,OAAO,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAA;AACtE,CAAC;AAMD,MAAM,UAAU,cAAc,CAAC,EAAE,UAAU,EAAuB;IACjE,IAAI,UAAU,IAAI,IAAI;QAAE,OAAO,eAAM,SAAS,EAAC,eAAe,uBAAS,CAAA;IAEvE,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,GAAG,GAAG,CAAA;IAEtD,OAAO,CACN,eAAK,SAAS,EAAC,SAAS,aACvB,cAAK,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,iBAAiB,IAAI,CAAC,UAAU,CAAC,EA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,GAAQ,IAC1D,CACN,CAAA;AACF,CAAC"}
@@ -12,13 +12,21 @@ import type { ReactNode } from "react";
12
12
  import { type Preset } from "../common/PresetChips.tsx";
13
13
  import type { PipelinePanels, PipelineRuntime } from "./types.ts";
14
14
  export interface PipelineExplorerProps {
15
- /** The injected model/gazetteer runtime (the host wires this to its bundle). */
15
+ /**
16
+ * The injected model/gazetteer runtime (the host wires this to its bundle).
17
+ */
16
18
  runtime: PipelineRuntime;
17
- /** Address to pre-fill. @default the White House */
19
+ /**
20
+ * Address to pre-fill. @default the White House
21
+ */
18
22
  defaultAddress?: string;
19
- /** Example chips. @default the built-in address presets */
23
+ /**
24
+ * Example chips. @default the built-in address presets
25
+ */
20
26
  presets?: ReadonlyArray<Preset>;
21
- /** Host-injected panels + controls (version selector, span highlight, tree, …). */
27
+ /**
28
+ * Host-injected panels + controls (version selector, span highlight, tree, …).
29
+ */
22
30
  panels?: PipelinePanels;
23
31
  }
24
32
  export declare function PipelineExplorer({ runtime, defaultAddress, presets, panels, }: PipelineExplorerProps): ReactNode;