@mailwoman/react 9.3.0 → 9.4.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 (159) hide show
  1. package/fonts.css +59 -0
  2. package/lib/common/About.tsx +89 -0
  3. package/lib/common/KindBadge.tsx +2 -7
  4. package/lib/common/confidence-tiers.ts +50 -0
  5. package/lib/common/text-tokens.ts +88 -0
  6. package/lib/index.ts +30 -28
  7. package/lib/map/CompareToggle.tsx +2 -2
  8. package/lib/map/{GeocoderDemo.tsx → Geocoder.tsx} +40 -40
  9. package/lib/map/{DemoControls.tsx → GeocoderControls.tsx} +16 -17
  10. package/lib/map/{DemoMap.tsx → MapCanvas.tsx} +15 -15
  11. package/lib/map/PlaceMarker.tsx +1 -1
  12. package/lib/map/ResolvedPlaceLayers.tsx +3 -3
  13. package/lib/map/ResultCamera.tsx +1 -1
  14. package/lib/map/ResultPanel.tsx +2 -2
  15. package/lib/map/VersionPicker.tsx +3 -3
  16. package/lib/map/fake-runtime.ts +122 -0
  17. package/lib/map/index.ts +16 -16
  18. package/lib/map/map-debug.ts +51 -0
  19. package/lib/map/place-render.ts +3 -2
  20. package/lib/map/types.ts +41 -39
  21. package/lib/map/{useDemoGeocode.ts → useGeocode.ts} +8 -8
  22. package/lib/pipeline/CandidatePicker.tsx +1 -1
  23. package/lib/pipeline/ComponentTable.tsx +1 -2
  24. package/lib/pipeline/ConfidenceCell.tsx +7 -19
  25. package/lib/pipeline/FailureDiagnostic.tsx +56 -0
  26. package/lib/pipeline/ResolvedPlace.tsx +17 -4
  27. package/lib/pipeline/SpanHighlight.tsx +97 -0
  28. package/lib/pipeline/TimingPanel.tsx +65 -0
  29. package/lib/pipeline/TreeView.tsx +55 -0
  30. package/lib/pipeline/copy.ts +1 -1
  31. package/lib/pipeline/types.ts +2 -75
  32. package/lib/pipeline/useParsePipeline.ts +2 -1
  33. package/lib/poi/types.ts +2 -1
  34. package/lib/runtime/{useDemoRuntime.ts → useReleaseRuntime.ts} +22 -24
  35. package/out/common/About.d.ts +12 -0
  36. package/out/common/About.d.ts.map +1 -0
  37. package/out/common/About.js +5 -0
  38. package/out/common/About.js.map +1 -0
  39. package/out/common/KindBadge.d.ts +2 -9
  40. package/out/common/KindBadge.d.ts.map +1 -1
  41. package/out/common/KindBadge.js.map +1 -1
  42. package/out/common/confidence-tiers.d.ts +36 -0
  43. package/out/common/confidence-tiers.d.ts.map +1 -0
  44. package/out/common/confidence-tiers.js +42 -0
  45. package/out/common/confidence-tiers.js.map +1 -0
  46. package/out/common/text-tokens.d.ts +46 -0
  47. package/out/common/text-tokens.d.ts.map +1 -0
  48. package/out/common/text-tokens.js +52 -0
  49. package/out/common/text-tokens.js.map +1 -0
  50. package/out/index.d.ts +14 -5
  51. package/out/index.d.ts.map +1 -1
  52. package/out/index.js +8 -2
  53. package/out/index.js.map +1 -1
  54. package/out/map/CompareToggle.d.ts +2 -2
  55. package/out/map/CompareToggle.d.ts.map +1 -1
  56. package/out/map/{GeocoderDemo.d.ts → Geocoder.d.ts} +17 -17
  57. package/out/map/Geocoder.d.ts.map +1 -0
  58. package/out/map/{GeocoderDemo.js → Geocoder.js} +25 -25
  59. package/out/map/Geocoder.js.map +1 -0
  60. package/out/map/{DemoControls.d.ts → GeocoderControls.d.ts} +16 -17
  61. package/out/map/GeocoderControls.d.ts.map +1 -0
  62. package/out/map/{DemoControls.js → GeocoderControls.js} +2 -2
  63. package/out/map/GeocoderControls.js.map +1 -0
  64. package/out/map/{DemoMap.d.ts → MapCanvas.d.ts} +15 -15
  65. package/out/map/MapCanvas.d.ts.map +1 -0
  66. package/out/map/{DemoMap.js → MapCanvas.js} +2 -2
  67. package/out/map/MapCanvas.js.map +1 -0
  68. package/out/map/PlaceMarker.d.ts +1 -1
  69. package/out/map/ResolvedPlaceLayers.d.ts +3 -3
  70. package/out/map/ResultCamera.d.ts +1 -1
  71. package/out/map/ResultCamera.js +1 -1
  72. package/out/map/ResultPanel.d.ts +2 -2
  73. package/out/map/ResultPanel.d.ts.map +1 -1
  74. package/out/map/ResultPanel.js.map +1 -1
  75. package/out/map/VersionPicker.d.ts +3 -3
  76. package/out/map/VersionPicker.d.ts.map +1 -1
  77. package/out/map/fake-runtime.d.ts +38 -0
  78. package/out/map/fake-runtime.d.ts.map +1 -0
  79. package/out/map/fake-runtime.js +107 -0
  80. package/out/map/fake-runtime.js.map +1 -0
  81. package/out/map/index.d.ts +10 -10
  82. package/out/map/index.d.ts.map +1 -1
  83. package/out/map/index.js +6 -6
  84. package/out/map/index.js.map +1 -1
  85. package/out/map/map-debug.d.ts +31 -0
  86. package/out/map/map-debug.d.ts.map +1 -0
  87. package/out/map/map-debug.js +31 -0
  88. package/out/map/map-debug.js.map +1 -0
  89. package/out/map/place-render.d.ts +2 -2
  90. package/out/map/place-render.d.ts.map +1 -1
  91. package/out/map/place-render.js +1 -1
  92. package/out/map/place-render.js.map +1 -1
  93. package/out/map/types.d.ts +41 -39
  94. package/out/map/types.d.ts.map +1 -1
  95. package/out/map/types.js +5 -5
  96. package/out/map/{useDemoGeocode.d.ts → useGeocode.d.ts} +9 -9
  97. package/out/map/useGeocode.d.ts.map +1 -0
  98. package/out/map/{useDemoGeocode.js → useGeocode.js} +4 -4
  99. package/out/map/useGeocode.js.map +1 -0
  100. package/out/pipeline/CandidatePicker.d.ts +1 -1
  101. package/out/pipeline/CandidatePicker.d.ts.map +1 -1
  102. package/out/pipeline/CandidatePicker.js.map +1 -1
  103. package/out/pipeline/ComponentTable.d.ts +1 -1
  104. package/out/pipeline/ComponentTable.d.ts.map +1 -1
  105. package/out/pipeline/ComponentTable.js.map +1 -1
  106. package/out/pipeline/ConfidenceCell.d.ts +2 -2
  107. package/out/pipeline/ConfidenceCell.d.ts.map +1 -1
  108. package/out/pipeline/ConfidenceCell.js +4 -16
  109. package/out/pipeline/ConfidenceCell.js.map +1 -1
  110. package/out/pipeline/FailureDiagnostic.d.ts +15 -0
  111. package/out/pipeline/FailureDiagnostic.d.ts.map +1 -0
  112. package/out/pipeline/FailureDiagnostic.js +21 -0
  113. package/out/pipeline/FailureDiagnostic.js.map +1 -0
  114. package/out/pipeline/ResolvedPlace.d.ts +1 -1
  115. package/out/pipeline/ResolvedPlace.d.ts.map +1 -1
  116. package/out/pipeline/ResolvedPlace.js +4 -10
  117. package/out/pipeline/ResolvedPlace.js.map +1 -1
  118. package/out/pipeline/SpanHighlight.d.ts +23 -0
  119. package/out/pipeline/SpanHighlight.d.ts.map +1 -0
  120. package/out/pipeline/SpanHighlight.js +31 -0
  121. package/out/pipeline/SpanHighlight.js.map +1 -0
  122. package/out/pipeline/TimingPanel.d.ts +16 -0
  123. package/out/pipeline/TimingPanel.d.ts.map +1 -0
  124. package/out/pipeline/TimingPanel.js +20 -0
  125. package/out/pipeline/TimingPanel.js.map +1 -0
  126. package/out/pipeline/TreeView.d.ts +17 -0
  127. package/out/pipeline/TreeView.d.ts.map +1 -0
  128. package/out/pipeline/TreeView.js +15 -0
  129. package/out/pipeline/TreeView.js.map +1 -0
  130. package/out/pipeline/copy.d.ts +1 -1
  131. package/out/pipeline/copy.d.ts.map +1 -1
  132. package/out/pipeline/types.d.ts +2 -68
  133. package/out/pipeline/types.d.ts.map +1 -1
  134. package/out/pipeline/types.js +1 -1
  135. package/out/pipeline/useParsePipeline.d.ts +2 -1
  136. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  137. package/out/pipeline/useParsePipeline.js.map +1 -1
  138. package/out/poi/types.d.ts +2 -1
  139. package/out/poi/types.d.ts.map +1 -1
  140. package/out/runtime/{useDemoRuntime.d.ts → useReleaseRuntime.d.ts} +18 -20
  141. package/out/runtime/useReleaseRuntime.d.ts.map +1 -0
  142. package/out/runtime/{useDemoRuntime.js → useReleaseRuntime.js} +4 -4
  143. package/out/runtime/useReleaseRuntime.js.map +1 -0
  144. package/package.json +139 -29
  145. package/styleframe.config.ts +321 -0
  146. package/styles.css +1074 -664
  147. package/tokens/index.css +115 -0
  148. package/tokens/tokens.json +521 -0
  149. package/tokens/tokens.resolver.json +185 -0
  150. package/out/map/DemoControls.d.ts.map +0 -1
  151. package/out/map/DemoControls.js.map +0 -1
  152. package/out/map/DemoMap.d.ts.map +0 -1
  153. package/out/map/DemoMap.js.map +0 -1
  154. package/out/map/GeocoderDemo.d.ts.map +0 -1
  155. package/out/map/GeocoderDemo.js.map +0 -1
  156. package/out/map/useDemoGeocode.d.ts.map +0 -1
  157. package/out/map/useDemoGeocode.js.map +0 -1
  158. package/out/runtime/useDemoRuntime.d.ts.map +0 -1
  159. package/out/runtime/useDemoRuntime.js.map +0 -1
@@ -3,33 +3,33 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<GeocoderDemo>` — the WHOLE geocoder demo, composed. It is the map analogue of `PipelineExplorer`
7
- * and takes the SAME DI shape: an injected {@link DemoRuntime} (the host owns ONNX / httpvfs / R2 /
8
- * the composed map style) plus a {@link DemoPanels} bag (the host's ModelVisualizer / VersionCompare /
6
+ * `<Geocoder>` — the WHOLE geocoder, composed. It is the map analogue of `PipelineExplorer`
7
+ * and takes the SAME DI shape: an injected {@link GeocoderRuntime} (the host owns ONNX / httpvfs / R2 /
8
+ * the composed map style) plus a {@link GeocoderPanels} bag (the host's ModelVisualizer / VersionCompare /
9
9
  * About / Permalink). Everything here is composition + a `ClientOnly` boundary:
10
10
  *
11
- * - the floating {@link DemoControls} panel (version / compare / backend / query+autocomplete / result),
12
- * - the declarative {@link DemoMap} with the phase-2 overlays ({@link OverlayLayers}) and the
11
+ * - the floating {@link GeocoderControls} panel (version / compare / backend / query+autocomplete / result),
12
+ * - the declarative {@link MapCanvas} with the phase-2 overlays ({@link OverlayLayers}) and the
13
13
  * resolved-place marker/outline/camera ({@link ResolvedPlaceLayers}) driven by the parse state,
14
- * - the hooks that wire them: {@link useDemoGeocode} (parse + viewport bias + map place),
14
+ * - the hooks that wire them: {@link useGeocode} (parse + viewport bias + map place),
15
15
  * {@link usePlaceAutocomplete}, {@link useCompareState}.
16
16
  *
17
- * Because it pulls {@link DemoMap} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
17
+ * Because it pulls {@link MapCanvas} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
18
18
  * the `@mailwoman/react/map` subpath ONLY — never the package root. The whole thing renders in Storybook
19
19
  * over a fake runtime (offline stub style + canned geocode) with no network, no ONNX, no gazetteer.
20
20
  */
21
21
  import { type ReactNode } from "react";
22
- import type { DemoPanels, DemoRuntime } from "#map/types";
22
+ import type { GeocoderPanels, GeocoderRuntime } from "#map/types";
23
23
  import type { Preset } from "../common/PresetChips.tsx";
24
- export interface GeocoderDemoProps {
24
+ export interface GeocoderProps {
25
25
  /**
26
- * The injected demo runtime (map style + overlays + parse + version/backend).
26
+ * The injected geocoder runtime (map style + overlays + parse + version/backend).
27
27
  */
28
- runtime: DemoRuntime;
28
+ runtime: GeocoderRuntime;
29
29
  /**
30
30
  * Host-injected panels (about, release blurb, compare, permalink, debug drawer, map controls, …).
31
31
  */
32
- panels?: DemoPanels;
32
+ panels?: GeocoderPanels;
33
33
  /**
34
34
  * Address to pre-fill.
35
35
  */
@@ -40,18 +40,18 @@ export interface GeocoderDemoProps {
40
40
  presets?: ReadonlyArray<Preset>;
41
41
  /**
42
42
  * Only hint the viewport bias once the visitor has zoomed past the global view — a whole-globe center is noise.
43
- * Matches the demo's `map.getZoom() >= 4` threshold. @default 4
43
+ * Matches the `map.getZoom() >= 4` threshold. @default 4
44
44
  */
45
45
  minBiasZoom?: number;
46
46
  /**
47
47
  * Fly/fit the map to the resolved place on each result (via {@link ResolvedPlaceLayers}). @default true. Set false
48
- * for a host that drives the camera itself (a controlled `<DemoMap viewState>`), or to keep a headless test
48
+ * for a host that drives the camera itself (a controlled `<MapCanvas viewState>`), or to keep a headless test
49
49
  * deterministic — the marker + outline still render, only the animated camera move is skipped.
50
50
  */
51
51
  applyResultCamera?: boolean;
52
52
  }
53
53
  /**
54
- * The composed geocoder demo, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
54
+ * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
55
55
  */
56
- export declare function GeocoderDemo({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }: GeocoderDemoProps): ReactNode;
57
- //# sourceMappingURL=GeocoderDemo.d.ts.map
56
+ export declare function Geocoder({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }: GeocoderProps): ReactNode;
57
+ //# sourceMappingURL=Geocoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Geocoder.d.ts","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAA;AAGtE,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAW,MAAM,YAAY,CAAA;AAO1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAMvD,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC/B;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B;AA0HD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACxB,OAAO,EACP,MAAkB,EAClB,cAAmB,EACnB,OAAoB,EACpB,WAAe,EACf,iBAAwB,GACxB,EAAE,aAAa,GAAG,SAAS,CAqB3B"}
@@ -4,50 +4,50 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
4
  * @license AGPL-3.0
5
5
  * @author Teffen Ellis, et al.
6
6
  *
7
- * `<GeocoderDemo>` — the WHOLE geocoder demo, composed. It is the map analogue of `PipelineExplorer`
8
- * and takes the SAME DI shape: an injected {@link DemoRuntime} (the host owns ONNX / httpvfs / R2 /
9
- * the composed map style) plus a {@link DemoPanels} bag (the host's ModelVisualizer / VersionCompare /
7
+ * `<Geocoder>` — the WHOLE geocoder, composed. It is the map analogue of `PipelineExplorer`
8
+ * and takes the SAME DI shape: an injected {@link GeocoderRuntime} (the host owns ONNX / httpvfs / R2 /
9
+ * the composed map style) plus a {@link GeocoderPanels} bag (the host's ModelVisualizer / VersionCompare /
10
10
  * About / Permalink). Everything here is composition + a `ClientOnly` boundary:
11
11
  *
12
- * - the floating {@link DemoControls} panel (version / compare / backend / query+autocomplete / result),
13
- * - the declarative {@link DemoMap} with the phase-2 overlays ({@link OverlayLayers}) and the
12
+ * - the floating {@link GeocoderControls} panel (version / compare / backend / query+autocomplete / result),
13
+ * - the declarative {@link MapCanvas} with the phase-2 overlays ({@link OverlayLayers}) and the
14
14
  * resolved-place marker/outline/camera ({@link ResolvedPlaceLayers}) driven by the parse state,
15
- * - the hooks that wire them: {@link useDemoGeocode} (parse + viewport bias + map place),
15
+ * - the hooks that wire them: {@link useGeocode} (parse + viewport bias + map place),
16
16
  * {@link usePlaceAutocomplete}, {@link useCompareState}.
17
17
  *
18
- * Because it pulls {@link DemoMap} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
18
+ * Because it pulls {@link MapCanvas} (→ `react-map-gl` → `maplibre-gl`, WebGL + DOM at import), it lives on
19
19
  * the `@mailwoman/react/map` subpath ONLY — never the package root. The whole thing renders in Storybook
20
20
  * over a fake runtime (offline stub style + canned geocode) with no network, no ONNX, no gazetteer.
21
21
  */
22
22
  import { useCallback, useEffect, useRef } from "react";
23
23
  import { useCompareState } from "#map/useCompareState";
24
- import { useDemoGeocode } from "#map/useDemoGeocode";
24
+ import { useGeocode } from "#map/useGeocode";
25
25
  import { useMapPlaceRender } from "#map/useMapPlaceRender";
26
26
  import { usePlaceAutocomplete } from "#map/usePlaceAutocomplete";
27
27
  import { ClientOnly } from "../common/ClientOnly.js";
28
- import { DemoControls } from "./DemoControls.js";
29
- import { DemoMap } from "./DemoMap.js";
28
+ import { GeocoderControls } from "./GeocoderControls.js";
29
+ import { MapCanvas } from "./MapCanvas.js";
30
30
  import { OverlayLayers } from "./OverlayLayers.js";
31
31
  import { ResolvedPlaceLayers } from "./ResolvedPlaceLayers.js";
32
- function GeocoderDemoInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }) {
32
+ function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }) {
33
33
  const mapRef = useRef(null);
34
34
  // TEST INJECTION POINT: the e2e viewport-bias suite drives the REAL map (pan + zoom past the bias threshold)
35
35
  // before submitting, and a browser test cannot reach a React ref — so the live map handle is
36
- // republished on `globalThis.__mailwomanDemoMap`, the same global the pre-port demo carried. The
37
- // ref fills only after react-map-gl instantiates the map, hence the short poll; cleared on
38
- // unmount so a torn-down demo never leaves a stale handle behind.
36
+ // republished on `globalThis.__mailwomanMapCanvas`. The ref fills only after react-map-gl instantiates
37
+ // the map, hence the short poll; cleared on unmount so a torn-down geocoder never leaves a stale
38
+ // handle behind.
39
39
  useEffect(() => {
40
40
  const host = globalThis;
41
41
  const timer = setInterval(() => {
42
42
  const map = mapRef.current?.getMap();
43
43
  if (map) {
44
- host.__mailwomanDemoMap = map;
44
+ host.__mailwomanMapCanvas = map;
45
45
  clearInterval(timer);
46
46
  }
47
47
  }, 250);
48
48
  return () => {
49
49
  clearInterval(timer);
50
- delete host.__mailwomanDemoMap;
50
+ delete host.__mailwomanMapCanvas;
51
51
  };
52
52
  }, []);
53
53
  // Read the viewport bias at submit time — through the map handle, never a threaded state value, so granting/zooming
@@ -62,7 +62,7 @@ function GeocoderDemoInner({ runtime, panels, defaultAddress, presets, minBiasZo
62
62
  const center = map.getCenter();
63
63
  return { center: [center.lng, center.lat], zoom };
64
64
  }, [minBiasZoom]);
65
- const geocode = useDemoGeocode({ runtime, defaultText: defaultAddress, getBias });
65
+ const geocode = useGeocode({ runtime, defaultText: defaultAddress, getBias });
66
66
  const compare = useCompareState();
67
67
  const autocomplete = usePlaceAutocomplete({
68
68
  text: geocode.text,
@@ -75,14 +75,14 @@ function GeocoderDemoInner({ runtime, panels, defaultAddress, presets, minBiasZo
75
75
  compare.clearIfPrimary(version);
76
76
  }, [runtime, compare]);
77
77
  const onForceWASMChange = useCallback((forceWASM) => runtime.setForceWASM?.(forceWASM), [runtime]);
78
- return (_jsxs("div", { className: "mw-geocoder-demo", children: [_jsx("div", { className: "mw-geocoder-demo__map", children: _jsxs(DemoMap, { mapStyle: runtime.mapStyle, mapRef: mapRef, initialViewState: {
78
+ return (_jsxs("div", { className: "mw-geocoder-demo", children: [_jsx("div", { className: "mw-geocoder-demo__map", children: _jsxs(MapCanvas, { mapStyle: runtime.mapStyle, mapRef: mapRef, initialViewState: {
79
79
  longitude: runtime.initialCenter[0],
80
80
  latitude: runtime.initialCenter[1],
81
81
  zoom: runtime.initialZoom ?? 3,
82
82
  }, style: { width: "100%", height: "100%" },
83
- // Match the live demo's chrome: one compact attribution pill (the map's own default is a wide, always-open
84
- // "MapLibre | © …" bar), no maplibre wordmark logo.
85
- mapProps: { attributionControl: { compact: true }, maplibreLogo: false }, children: [_jsx(OverlayLayers, { overlays: runtime.overlays }), _jsx(ResolvedPlaceLayers, { spec: spec, applyCamera: applyResultCamera }), panels.mapControls] }) }), _jsx(DemoControls, { runtime: runtime, geocode: geocode, autocomplete: autocomplete, compare: compare, panels: panels, presets: presets, placeholder: defaultAddress, onSelectVersion: onSelectVersion, onForceWASMChange: onForceWASMChange }), panels.debugDrawer ? panels.debugDrawer({ result: geocode.result }) : null] }));
83
+ // One compact attribution pill (the map's own default is a wide, always-open "MapLibre | © …" bar), no
84
+ // maplibre wordmark logo.
85
+ mapProps: { attributionControl: { compact: true }, maplibreLogo: false }, children: [_jsx(OverlayLayers, { overlays: runtime.overlays }), _jsx(ResolvedPlaceLayers, { spec: spec, applyCamera: applyResultCamera }), panels.mapControls] }) }), _jsx(GeocoderControls, { runtime: runtime, geocode: geocode, autocomplete: autocomplete, compare: compare, panels: panels, presets: presets, placeholder: defaultAddress, onSelectVersion: onSelectVersion, onForceWASMChange: onForceWASMChange }), panels.debugDrawer ? panels.debugDrawer({ result: geocode.result }) : null] }));
86
86
  }
87
87
  /**
88
88
  * Stable empty defaults — a fresh `{}`/`[]` per render would churn every downstream memo dep.
@@ -90,9 +90,9 @@ function GeocoderDemoInner({ runtime, panels, defaultAddress, presets, minBiasZo
90
90
  const NO_PANELS = {};
91
91
  const NO_PRESETS = [];
92
92
  /**
93
- * The composed geocoder demo, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
93
+ * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
94
94
  */
95
- export function GeocoderDemo({ runtime, panels = NO_PANELS, defaultAddress = "", presets = NO_PRESETS, minBiasZoom = 4, applyResultCamera = true, }) {
96
- return (_jsx(ClientOnly, { fallback: _jsx("div", { className: "mw-geocoder-demo", children: _jsx("p", { children: "Loading demo\u2026" }) }), children: () => (_jsx(GeocoderDemoInner, { runtime: runtime, panels: panels, defaultAddress: defaultAddress, presets: presets, minBiasZoom: minBiasZoom, applyResultCamera: applyResultCamera })) }));
95
+ export function Geocoder({ runtime, panels = NO_PANELS, defaultAddress = "", presets = NO_PRESETS, minBiasZoom = 4, applyResultCamera = true, }) {
96
+ return (_jsx(ClientOnly, { fallback: _jsx("div", { className: "mw-geocoder-demo", children: _jsx("p", { children: "Loading the geocoder\u2026" }) }), children: () => (_jsx(GeocoderInner, { runtime: runtime, panels: panels, defaultAddress: defaultAddress, presets: presets, minBiasZoom: minBiasZoom, applyResultCamera: applyResultCamera })) }));
97
97
  }
98
- //# sourceMappingURL=GeocoderDemo.js.map
98
+ //# sourceMappingURL=Geocoder.js.map
@@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,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,IACtE,CACN,CAAA;AACF,CAAC;AAED;;GAEG;AACH,MAAM,SAAS,GAAmB,EAAE,CAAA;AACpC,MAAM,UAAU,GAA0B,EAAE,CAAA;AAE5C;;GAEG;AACH,MAAM,UAAU,QAAQ,CAAC,EACxB,OAAO,EACP,MAAM,GAAG,SAAS,EAClB,cAAc,GAAG,EAAE,EACnB,OAAO,GAAG,UAAU,EACpB,WAAW,GAAG,CAAC,EACf,iBAAiB,GAAG,IAAI,GACT;IACf,OAAO,CACN,KAAC,UAAU,IACV,QAAQ,EACP,cAAK,SAAS,EAAC,kBAAkB,YAChC,qDAA4B,GACvB,YAGN,GAAG,EAAE,CAAC,CACN,KAAC,aAAa,IACb,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,GACnC,CACF,GACW,CACb,CAAA;AACF,CAAC"}
@@ -3,31 +3,30 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<DemoControls>` — the geocoder demo's floating control panel, assembled from the demo-specific units
6
+ * `<GeocoderControls>` — the geocoder's floating control panel, assembled from the geocoder-specific units
7
7
  * (VersionPicker / CompareToggle / BackendControl / PlaceAutocomplete / ResultPanel) and the REUSED
8
- * pipeline units (QueryForm / PresetChips / LoadingIndicator). It is the presentational composition the
9
- * `_app.tsx` control `<section>` (`:1222-1514`) becomes it reads the injected {@link DemoRuntime} for
10
- * ready/version/backend/loading state and threads the {@link useDemoGeocode} + {@link usePlaceAutocomplete}
11
- * + {@link useCompareState} hooks into the controls. Host-specific visualizers arrive via {@link DemoPanels}.
8
+ * pipeline units (QueryForm / PresetChips / LoadingIndicator). It reads the injected {@link GeocoderRuntime}
9
+ * for ready/version/backend/loading state and threads the {@link useGeocode} + {@link usePlaceAutocomplete}
10
+ * + {@link useCompareState} hooks into the controls. Host-specific visualizers arrive via {@link GeocoderPanels}.
12
11
  *
13
- * NODE-SAFE: pure React + the shared/demo units, no maplibre. It rides `@mailwoman/react/map` as a
14
- * demo-specific control, not for WebGL.
12
+ * NODE-SAFE: pure React + the shared/geocoder units, no maplibre. It rides `@mailwoman/react/map` as a
13
+ * geocoder-specific control, not for WebGL.
15
14
  */
16
15
  import type { ReactNode } from "react";
17
- import type { DemoPanels, DemoRuntime } from "#map/types";
16
+ import type { GeocoderPanels, GeocoderRuntime } from "#map/types";
18
17
  import type { UseCompareState } from "#map/useCompareState";
19
- import type { UseDemoGeocode } from "#map/useDemoGeocode";
18
+ import type { UseGeocode } from "#map/useGeocode";
20
19
  import type { UsePlaceAutocomplete } from "#map/usePlaceAutocomplete";
21
20
  import { type Preset } from "../common/PresetChips.tsx";
22
- export interface DemoControlsProps {
21
+ export interface GeocoderControlsProps {
23
22
  /**
24
- * The injected demo runtime.
23
+ * The injected geocoder runtime.
25
24
  */
26
- runtime: DemoRuntime;
25
+ runtime: GeocoderRuntime;
27
26
  /**
28
27
  * The parse+resolve state machine.
29
28
  */
30
- geocode: UseDemoGeocode;
29
+ geocode: UseGeocode;
31
30
  /**
32
31
  * The place-autocomplete combobox state.
33
32
  */
@@ -39,7 +38,7 @@ export interface DemoControlsProps {
39
38
  /**
40
39
  * Host-injected panels (about, release blurb, compare, permalink, extras, failure).
41
40
  */
42
- panels: DemoPanels;
41
+ panels: GeocoderPanels;
43
42
  /**
44
43
  * Example chips.
45
44
  */
@@ -49,7 +48,7 @@ export interface DemoControlsProps {
49
48
  */
50
49
  placeholder: string;
51
50
  /**
52
- * Select a model version (the composed demo also clears a now-colliding compare selection).
51
+ * Select a model version (the composed geocoder also clears a now-colliding compare selection).
53
52
  */
54
53
  onSelectVersion: (version: string) => void;
55
54
  /**
@@ -60,5 +59,5 @@ export interface DemoControlsProps {
60
59
  /**
61
60
  * The floating control panel.
62
61
  */
63
- export declare function DemoControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, onSelectVersion, onForceWASMChange, }: DemoControlsProps): ReactNode;
64
- //# sourceMappingURL=DemoControls.d.ts.map
62
+ export declare function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, onSelectVersion, onForceWASMChange, }: GeocoderControlsProps): ReactNode;
63
+ //# sourceMappingURL=GeocoderControls.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeocoderControls.d.ts","sourceRoot":"","sources":["../../lib/map/GeocoderControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAGrE,OAAO,EAAe,KAAK,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAQpE,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,UAAU,CAAA;IACnB;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAA;IAClC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,EAAE,cAAc,CAAA;IACtB;;OAEG;IACH,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAA;IACnB;;OAEG;IACH,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;OAEG;IACH,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAChC,OAAO,EACP,OAAO,EACP,YAAY,EACZ,OAAO,EACP,MAAM,EACN,OAAO,EACP,WAAW,EACX,eAAe,EACf,iBAAiB,GACjB,EAAE,qBAAqB,GAAG,SAAS,CA6GnC"}
@@ -10,7 +10,7 @@ import { VersionPicker } from "./VersionPicker.js";
10
10
  /**
11
11
  * The floating control panel.
12
12
  */
13
- export function DemoControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, onSelectVersion, onForceWASMChange, }) {
13
+ export function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, onSelectVersion, onForceWASMChange, }) {
14
14
  const versions = runtime.availableVersions ?? [];
15
15
  const { busy, result, selectedCandidate } = geocode;
16
16
  const loading = runtime.loading;
@@ -27,4 +27,4 @@ export function DemoControls({ runtime, geocode, autocomplete, compare, panels,
27
27
  ? panels.compare({ result, compareMode: compare.compareMode, compareVersion: compare.compareVersion })
28
28
  : null, panels.footer] }));
29
29
  }
30
- //# sourceMappingURL=DemoControls.js.map
30
+ //# sourceMappingURL=GeocoderControls.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeocoderControls.js","sourceRoot":"","sources":["../../lib/map/GeocoderControls.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAAgC,CAAA;AACjE,OAAO,EAAE,WAAW,EAAe,MAAM,0BAA2B,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA2B,CAAA;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAA;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAA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C,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAE1D,IAAI,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,WAAW,YACzB,KAAC,gBAAgB,IAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,OAAO,CAAC,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,GAAI,GAC9F,CACN,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CACZ,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CACf,MAAM,CAAC,MAAM,CAAC;gBACb,MAAM;gBACN,iBAAiB;gBACjB,sBAAsB,EAAE,OAAO,CAAC,sBAAsB;gBACtD,iBAAiB,EAAE,OAAO,CAAC,eAAe;aAC1C,CAAC,CACF,CAAC,CAAC,CAAC,CACH,KAAC,WAAW,IACX,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,EACtD,iBAAiB,EAAE,OAAO,CAAC,eAAe,EAC1C,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,OAAO,EAAE,MAAM,CAAC,OAAO,GACtB,CACF,CACD,CAAC,CAAC,CAAC,IAAI,EAEP,MAAM,CAAC,OAAO;gBACd,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,WAAW,EAAE,cAAc,EAAE,OAAO,CAAC,cAAc,EAAE,CAAC;gBACtG,CAAC,CAAC,IAAI,EAEN,MAAM,CAAC,MAAM,IACL,CACV,CAAA;AACF,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<DemoMap>` — the declarative map shell for the geocoder demo, over `react-map-gl/maplibre` (v8).
6
+ * `<MapCanvas>` — the declarative map shell for the geocoder demo, over `react-map-gl/maplibre` (v8).
7
7
  * Phase 1 is the shell only: a `<Map>` that takes a host-composed `mapStyle`, an initial (or
8
8
  * controlled) view state, and a `children` slot for the overlays/markers that land in later phases.
9
9
  * No overlay/marker/camera logic lives here yet.
@@ -15,27 +15,27 @@
15
15
  * the root barrel.
16
16
  *
17
17
  * CSS: the package imports no CSS from its modules (the node-safe invariant), so a host that renders
18
- * `<DemoMap>` must import `maplibre-gl/dist/maplibre-gl.css` itself (plus `@mailwoman/react/styles.css`
19
- * for the `.mw-demo-map` container). `<DemoMap>` is intrinsically a client component — a host that
18
+ * `<MapCanvas>` must import `maplibre-gl/dist/maplibre-gl.css` itself (plus `@mailwoman/react/styles.css`
19
+ * for the `.mw-demo-map` container). `<MapCanvas>` is intrinsically a client component — a host that
20
20
  * server-renders should wrap it in a client boundary (the package's `ClientOnly`), exactly as the
21
- * composed `GeocoderDemo` will in a later phase.
21
+ * composed `Geocoder` will in a later phase.
22
22
  */
23
23
  import type { CSSProperties, ReactNode, Ref } from "react";
24
24
  import type { MapProps, MapRef, ViewStateChangeEvent } from "react-map-gl/maplibre";
25
25
  /**
26
- * The style a `<DemoMap>` renders — a style URL or an inline/composed `StyleSpecification`.
26
+ * The style a `<MapCanvas>` renders — a style URL or an inline/composed `StyleSpecification`.
27
27
  */
28
- export type DemoMapStyle = NonNullable<MapProps["mapStyle"]>;
28
+ export type MapCanvasStyle = NonNullable<MapProps["mapStyle"]>;
29
29
  /**
30
- * Override for the `<Map>` props `<DemoMap>` does not surface explicitly (e.g. `minZoom`, `attributionControl`,
31
- * `maplibreLogo`). The controlled fields DemoMap owns are omitted so they can't be set twice.
30
+ * Override for the `<Map>` props `<MapCanvas>` does not surface explicitly (e.g. `minZoom`, `attributionControl`,
31
+ * `maplibreLogo`). The controlled fields MapCanvas owns are omitted so they can't be set twice.
32
32
  */
33
- export type DemoMapExtraProps = Partial<Omit<MapProps, "mapStyle" | "initialViewState" | "viewState" | "onMove" | "children" | "style" | "ref">>;
34
- export interface DemoMapProps {
33
+ export type MapCanvasExtraProps = Partial<Omit<MapProps, "mapStyle" | "initialViewState" | "viewState" | "onMove" | "children" | "style" | "ref">>;
34
+ export interface MapCanvasProps {
35
35
  /**
36
36
  * The map style — host-composed `StyleSpecification` or a style URL.
37
37
  */
38
- mapStyle: DemoMapStyle;
38
+ mapStyle: MapCanvasStyle;
39
39
  /**
40
40
  * Uncontrolled initial camera. Use this OR `viewState`, not both.
41
41
  */
@@ -69,13 +69,13 @@ export interface DemoMapProps {
69
69
  */
70
70
  style?: CSSProperties;
71
71
  /**
72
- * Remaining `<Map>` props DemoMap does not surface explicitly.
72
+ * Remaining `<Map>` props MapCanvas does not surface explicitly.
73
73
  */
74
- mapProps?: DemoMapExtraProps;
74
+ mapProps?: MapCanvasExtraProps;
75
75
  }
76
76
  /**
77
77
  * The controlled-viewport map shell. Renders a sized wrapper around a `react-map-gl/maplibre` `<Map>`; everything
78
78
  * host-specific (the composed `mapStyle`, the initial center) is injected, and overlays ride in as `children`.
79
79
  */
80
- export declare function DemoMap({ mapStyle, initialViewState, viewState, onMove, projection, mapRef, children, className, style, mapProps, }: DemoMapProps): ReactNode;
81
- //# sourceMappingURL=DemoMap.d.ts.map
80
+ export declare function MapCanvas({ mapStyle, initialViewState, viewState, onMove, projection, mapRef, children, className, style, mapProps, }: MapCanvasProps): ReactNode;
81
+ //# sourceMappingURL=MapCanvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapCanvas.d.ts","sourceRoot":"","sources":["../../lib/map/MapCanvas.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEnF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAA;AAE9D;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACxC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,kBAAkB,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,KAAK,CAAC,CACvG,CAAA;AAED,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,QAAQ,EAAE,cAAc,CAAA;IACxB;;OAEG;IACH,gBAAgB,CAAC,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAA;IAC/C;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAA;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,CAAA;IAC9C;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,YAAY,CAAC,CAAA;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAC9B;AAID;;;GAGG;AACH,wBAAgB,SAAS,CAAC,EACzB,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,UAAoB,EACpB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,GACR,EAAE,cAAc,GAAG,SAAS,CAmB5B"}
@@ -5,8 +5,8 @@ const FILL = { width: "100%", height: "100%" };
5
5
  * The controlled-viewport map shell. Renders a sized wrapper around a `react-map-gl/maplibre` `<Map>`; everything
6
6
  * host-specific (the composed `mapStyle`, the initial center) is injected, and overlays ride in as `children`.
7
7
  */
8
- export function DemoMap({ mapStyle, initialViewState, viewState, onMove, projection = "globe", mapRef, children, className, style, mapProps, }) {
8
+ export function MapCanvas({ mapStyle, initialViewState, viewState, onMove, projection = "globe", mapRef, children, className, style, mapProps, }) {
9
9
  const wrapperClassName = className ? `mw-demo-map ${className}` : "mw-demo-map";
10
10
  return (_jsx("div", { className: wrapperClassName, style: style, children: _jsx(Map, { ...mapProps, ref: mapRef, mapStyle: mapStyle, initialViewState: initialViewState, viewState: viewState, onMove: onMove, projection: projection, style: FILL, children: children }) }));
11
11
  }
12
- //# sourceMappingURL=DemoMap.js.map
12
+ //# sourceMappingURL=MapCanvas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapCanvas.js","sourceRoot":"","sources":["../../lib/map/MapCanvas.tsx"],"names":[],"mappings":";AAwBA,OAAO,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAA;AA2D3C,MAAM,IAAI,GAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;AAE7D;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,EACzB,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,MAAM,EACN,UAAU,GAAG,OAAO,EACpB,MAAM,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EACL,QAAQ,GACQ;IAChB,MAAM,gBAAgB,GAAG,SAAS,CAAC,CAAC,CAAC,eAAe,SAAS,EAAE,CAAC,CAAC,CAAC,aAAa,CAAA;IAE/E,OAAO,CACN,cAAK,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,YAC7C,KAAC,GAAG,OACC,QAAQ,EACZ,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,IAAI,YAEV,QAAQ,GACJ,GACD,CACN,CAAA;AACF,CAAC"}
@@ -6,7 +6,7 @@
6
6
  * `<PlaceMarker>` — the resolved-place pin, as a declarative `react-map-gl/maplibre` `<Marker>`. This
7
7
  * replaces the old imperative `new maplibre.Marker(...).setLngLat(...).addTo(map)` (+ the manual
8
8
  * `markerRef.current.remove()` teardown) from the demo's redraw effect: mounting/unmounting the marker
9
- * is now React's job, keyed on the resolved candidate. Renders as a child of `<DemoMap>`.
9
+ * is now React's job, keyed on the resolved candidate. Renders as a child of `<MapCanvas>`.
10
10
  *
11
11
  * NODE-IMPORT SAFETY: imports `react-map-gl/maplibre` at module scope, so it is reachable ONLY through
12
12
  * the `@mailwoman/react/map` subpath, never the package root.
@@ -3,10 +3,10 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<ResolvedPlaceLayers>` — the drop-in that renders a whole {@link MapPlaceRenderSpec} as `<DemoMap>`
6
+ * `<ResolvedPlaceLayers>` — the drop-in that renders a whole {@link MapPlaceRenderSpec} as `<MapCanvas>`
7
7
  * children: the marker(s), the outline, and (optionally) the camera move. This is the declarative
8
8
  * replacement for the demo's imperative marker/bbox/camera redraw effect — a consumer computes the spec
9
- * with `useMapPlaceRender(place)` and drops `<ResolvedPlaceLayers spec={spec} />` inside `<DemoMap>`.
9
+ * with `useMapPlaceRender(place)` and drops `<ResolvedPlaceLayers spec={spec} />` inside `<MapCanvas>`.
10
10
  *
11
11
  * `spec = null` (no result / no candidate) renders nothing, which also unmounts the previous marker +
12
12
  * outline — the teardown the old effect did by hand (`markerRef.remove()`, `clearBbox`) is now just
@@ -21,7 +21,7 @@ export interface ResolvedPlaceLayersProps {
21
21
  spec: MapPlaceRenderSpec | null;
22
22
  /**
23
23
  * Apply the computed camera target via {@link ResultCamera}. @default true. Set false when the consumer drives the
24
- * camera itself (e.g. a controlled `<DemoMap viewState>` fed by {@link cameraToViewState}).
24
+ * camera itself (e.g. a controlled `<MapCanvas viewState>` fed by {@link cameraToViewState}).
25
25
  */
26
26
  applyCamera?: boolean;
27
27
  /**
@@ -11,7 +11,7 @@
11
11
  * `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
12
12
  *
13
13
  * A consumer that prefers a hard, declarative jump can instead feed the target through
14
- * {@link cameraToViewState} into a controlled `<DemoMap viewState>` and skip this component — the
14
+ * {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
15
15
  * `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
16
16
  *
17
17
  * `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
@@ -11,7 +11,7 @@
11
11
  * `useMap()` (exactly as `DashboardMap`/`GeoJSONClipboardLayer` reach the map), never a threaded handle.
12
12
  *
13
13
  * A consumer that prefers a hard, declarative jump can instead feed the target through
14
- * {@link cameraToViewState} into a controlled `<DemoMap viewState>` and skip this component — the
14
+ * {@link cameraToViewState} into a controlled `<MapCanvas viewState>` and skip this component — the
15
15
  * `center` case has that declarative path; only `bounds` strictly requires this. Renders nothing.
16
16
  *
17
17
  * `target` is expected to be the STABLE, memoized `camera` off a `useMapPlaceRender` spec, so listing it
@@ -7,14 +7,14 @@
7
7
  * presentational units (it does not re-implement any of them): `KindBadge`, `ComponentTable`,
8
8
  * `ResolvedPlace`, `CandidatePicker`, plus the `CopyButton` + `buildParsePayload` copy affordance. This
9
9
  * is the standalone, story-testable unit the demo's floating panel renders (the map analogue of the
10
- * result block PipelineExplorer inlines), so `GeocoderDemo` composes ONE panel instead of duplicating
10
+ * result block PipelineExplorer inlines), so `Geocoder` composes ONE panel instead of duplicating
11
11
  * the marker/table/candidate glue. Heavy host visualizers (span highlight, tree, timing) slot in via
12
12
  * `extras`; the no-resolve diagnostic via `failure`.
13
13
  *
14
14
  * NODE-SAFE: pure React + the shared units, no maplibre.
15
15
  */
16
+ import type { ParseResult, ResolvedPlaceView } from "@mailwoman/core/pipeline/client-result";
16
17
  import type { ReactNode } from "react";
17
- import type { ParseResult, ResolvedPlaceView } from "#pipeline/types";
18
18
  export interface ResultPanelProps {
19
19
  /**
20
20
  * The parse+resolve result to render.
@@ -1 +1 @@
1
- {"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAQrE,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAA;IAC9B;;OAEG;IACH,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;IAC3C;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,SAAS,CAAA;CAC5C;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC3B,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,OAAO,GACP,EAAE,gBAAgB,GAAG,SAAS,CAkC9B"}
1
+ {"version":3,"file":"ResultPanel.d.ts","sourceRoot":"","sources":["../../lib/map/ResultPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUtC,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,MAAM,EAAE,WAAW,CAAA;IACnB;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3C;;O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,OAAO,CACN,eAAK,SAAS,EAAC,WAAW,aACzB,eAAK,SAAS,EAAC,mBAAmB,aACjC,6CAA0B,EAC1B,KAAC,UAAU,IACV,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACzD,KAAK,EAAC,WAAW,EACjB,WAAW,EAAC,eAAU,GACrB,IACG,EAEL,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,UAAU,EAAE,MAAM,CAAC,UAAU,GAAI,CAAC,CAAC,CAAC,IAAI,EAEvE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAE/B,KAAC,cAAc,IAAC,KAAK,EAAE,MAAM,CAAC,KAAK,GAAI,EAEtC,iBAAiB,CAAC,CAAC,CAAC,CACpB,8BACC,KAAC,aAAa,IAAC,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,GAAI,EACvE,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/B,KAAC,eAAe,IACf,UAAU,EAAE,MAAM,CAAC,UAAU,EAC7B,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,iBAAiB,GAC1B,CACF,CAAC,CAAC,CAAC,IAAI,IACN,CACH,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACb,OAAO,CAAC,MAAM,CAAC,CACf,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
@@ -5,19 +5,19 @@
5
5
  *
6
6
  * `<VersionPicker>` — the model-version `<select>` from the demo's control panel (`_app.tsx:1230-1254`),
7
7
  * as a dumb presentational unit: the available bundles + current selection come in as props, the choice
8
- * goes out through `onSelect`. No load state, no manifest fetch — the host (via `useDemoRuntime`) owns
8
+ * goes out through `onSelect`. No load state, no manifest fetch — the host (via `useReleaseRuntime`) owns
9
9
  * that. Renders nothing when there is fewer than two versions to choose between.
10
10
  *
11
11
  * NODE-SAFE: pure React + a `<select>`, no maplibre. It rides the `@mailwoman/react/map` subpath only
12
12
  * because it is a demo-specific control, not because it needs WebGL.
13
13
  */
14
14
  import type { ReactNode } from "react";
15
- import type { DemoVersionOption } from "#map/types";
15
+ import type { VersionOption } from "#map/types";
16
16
  export interface VersionPickerProps {
17
17
  /**
18
18
  * The selectable model bundles.
19
19
  */
20
- versions: ReadonlyArray<DemoVersionOption>;
20
+ versions: ReadonlyArray<VersionOption>;
21
21
  /**
22
22
  * The currently-selected version tag.
23
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CAuBhC"}
1
+ {"version":3,"file":"VersionPicker.d.ts","sourceRoot":"","sources":["../../lib/map/VersionPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB;;OAEG;IACH,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,KAAuB,GACvB,EAAE,kBAAkB,GAAG,SAAS,CAuBhC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ *
6
+ * A fake geocoder runtime: canned parse + resolve, an offline stub map style, canned autocomplete, a version list.
7
+ * No network, no ONNX, no maplibre at run time — everything is data. It is what the stories and component tests
8
+ * mount, and what a host mounts to show the UI without the model.
9
+ */
10
+ import type { ParseResult } from "@mailwoman/core/pipeline/client-result";
11
+ import type { GeocoderRuntime, Suggestion } from "#map/types";
12
+ import type { PipelineRuntime } from "#pipeline/types";
13
+ import type { MapCanvasStyle } from "./MapCanvas.tsx";
14
+ /**
15
+ * An offline stub map style — one solid `background` layer, zero sources, zero network. Safe for headless Storybook.
16
+ */
17
+ export declare const STUB_MAP_STYLE: MapCanvasStyle;
18
+ /**
19
+ * Canned place-autocomplete suggestions — a synchronous fake for the FST prefix-walk.
20
+ */
21
+ export declare const FAKE_SUGGESTIONS: Suggestion[];
22
+ /**
23
+ * A fake DEMO runtime — the map analogue of {@link makePipelineRuntime}. It composes the pipeline fake (canned
24
+ * parse+resolve) with the map surface: the offline stub style, a version list, a backend, an injected autocomplete, and
25
+ * a `resolveMapPlace` that hands the selected candidate a bbox so the declarative overlays draw a marker + outline. No
26
+ * network, no ONNX, no maplibre-at-runtime — everything is data. `runParseWithBias` delegates to the base parse (the
27
+ * bias is ignored by the fake but present so the parameter is exercised).
28
+ */
29
+ export declare function makeFakeGeocoderRuntime(overrides?: Partial<GeocoderRuntime>): GeocoderRuntime;
30
+ /**
31
+ * A fixed, fully-populated parse+resolve result — the shared fixture behind the pipeline runtime + the result panel.
32
+ */
33
+ export declare function makeFakeParseResult(input?: string): ParseResult;
34
+ /**
35
+ * A fake parse+resolve runtime that returns a fixed, fully-populated result.
36
+ */
37
+ export declare function makePipelineRuntime(overrides?: Partial<PipelineRuntime>): PipelineRuntime;
38
+ //# sourceMappingURL=fake-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fake-runtime.d.ts","sourceRoot":"","sources":["../../lib/map/fake-runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAA;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,cAK5B,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,EAIxC,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAkCjG;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,SAAoC,GAAG,WAAW,CAmB1F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GAAG,eAAe,CAc7F"}