@mailwoman/react 9.4.0 → 10.0.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 (127) hide show
  1. package/lib/common/About.tsx +87 -71
  2. package/lib/common/index.ts +22 -0
  3. package/lib/index.ts +4 -99
  4. package/lib/map/BackendControl.tsx +7 -3
  5. package/lib/map/CompareToggle.tsx +3 -2
  6. package/lib/map/Geocoder.tsx +48 -28
  7. package/lib/map/GeocoderControls.tsx +258 -99
  8. package/lib/map/MapChipRow.tsx +77 -0
  9. package/lib/map/MapCompass.tsx +77 -0
  10. package/lib/map/MapControlStack.tsx +98 -0
  11. package/lib/map/MapFooter.tsx +115 -0
  12. package/lib/map/MapProgressBar.tsx +58 -0
  13. package/lib/map/MapSearchBar.tsx +68 -0
  14. package/lib/map/MapSheet.tsx +62 -0
  15. package/lib/map/index.ts +19 -0
  16. package/lib/map/types.ts +18 -4
  17. package/lib/map/useMapBearing.ts +56 -0
  18. package/lib/map/useMapLabelPick.ts +123 -0
  19. package/lib/pipeline/index.ts +36 -0
  20. package/lib/pipeline/useParsePipeline.ts +29 -18
  21. package/lib/poi/index.ts +39 -0
  22. package/lib/runtime/index.ts +16 -0
  23. package/out/common/About.d.ts +13 -4
  24. package/out/common/About.d.ts.map +1 -1
  25. package/out/common/About.js +5 -2
  26. package/out/common/About.js.map +1 -1
  27. package/out/common/index.d.ts +22 -0
  28. package/out/common/index.d.ts.map +1 -0
  29. package/out/common/index.js +15 -0
  30. package/out/common/index.js.map +1 -0
  31. package/out/index.d.ts +4 -59
  32. package/out/index.d.ts.map +1 -1
  33. package/out/index.js +4 -36
  34. package/out/index.js.map +1 -1
  35. package/out/map/BackendControl.d.ts.map +1 -1
  36. package/out/map/BackendControl.js +1 -1
  37. package/out/map/BackendControl.js.map +1 -1
  38. package/out/map/CompareToggle.d.ts.map +1 -1
  39. package/out/map/CompareToggle.js +1 -1
  40. package/out/map/CompareToggle.js.map +1 -1
  41. package/out/map/Geocoder.d.ts +11 -1
  42. package/out/map/Geocoder.d.ts.map +1 -1
  43. package/out/map/Geocoder.js +26 -26
  44. package/out/map/Geocoder.js.map +1 -1
  45. package/out/map/GeocoderControls.d.ts +29 -11
  46. package/out/map/GeocoderControls.d.ts.map +1 -1
  47. package/out/map/GeocoderControls.js +65 -16
  48. package/out/map/GeocoderControls.js.map +1 -1
  49. package/out/map/MapChipRow.d.ts +47 -0
  50. package/out/map/MapChipRow.d.ts.map +1 -0
  51. package/out/map/MapChipRow.js +12 -0
  52. package/out/map/MapChipRow.js.map +1 -0
  53. package/out/map/MapCompass.d.ts +42 -0
  54. package/out/map/MapCompass.d.ts.map +1 -0
  55. package/out/map/MapCompass.js +11 -0
  56. package/out/map/MapCompass.js.map +1 -0
  57. package/out/map/MapControlStack.d.ts +57 -0
  58. package/out/map/MapControlStack.d.ts.map +1 -0
  59. package/out/map/MapControlStack.js +15 -0
  60. package/out/map/MapControlStack.js.map +1 -0
  61. package/out/map/MapFooter.d.ts +40 -0
  62. package/out/map/MapFooter.d.ts.map +1 -0
  63. package/out/map/MapFooter.js +51 -0
  64. package/out/map/MapFooter.js.map +1 -0
  65. package/out/map/MapProgressBar.d.ts +34 -0
  66. package/out/map/MapProgressBar.d.ts.map +1 -0
  67. package/out/map/MapProgressBar.js +8 -0
  68. package/out/map/MapProgressBar.js.map +1 -0
  69. package/out/map/MapSearchBar.d.ts +49 -0
  70. package/out/map/MapSearchBar.d.ts.map +1 -0
  71. package/out/map/MapSearchBar.js +6 -0
  72. package/out/map/MapSearchBar.js.map +1 -0
  73. package/out/map/MapSheet.d.ts +32 -0
  74. package/out/map/MapSheet.d.ts.map +1 -0
  75. package/out/map/MapSheet.js +33 -0
  76. package/out/map/MapSheet.js.map +1 -0
  77. package/out/map/OverlayLayers.js +1 -1
  78. package/out/map/ResolvedPlaceLayers.js +1 -1
  79. package/out/map/ResultPanel.js +1 -1
  80. package/out/map/fake-runtime.js.map +1 -1
  81. package/out/map/index.d.ts +17 -0
  82. package/out/map/index.d.ts.map +1 -1
  83. package/out/map/index.js +10 -0
  84. package/out/map/index.js.map +1 -1
  85. package/out/map/map-debug.d.ts.map +1 -1
  86. package/out/map/map-debug.js.map +1 -1
  87. package/out/map/types.d.ts +20 -4
  88. package/out/map/types.d.ts.map +1 -1
  89. package/out/map/useMapBearing.d.ts +28 -0
  90. package/out/map/useMapBearing.d.ts.map +1 -0
  91. package/out/map/useMapBearing.js +35 -0
  92. package/out/map/useMapBearing.js.map +1 -0
  93. package/out/map/useMapLabelPick.d.ts +23 -0
  94. package/out/map/useMapLabelPick.d.ts.map +1 -0
  95. package/out/map/useMapLabelPick.js +104 -0
  96. package/out/map/useMapLabelPick.js.map +1 -0
  97. package/out/pipeline/CandidatePicker.js +1 -1
  98. package/out/pipeline/PipelineExplorer.js +1 -1
  99. package/out/pipeline/QueryForm.js +1 -1
  100. package/out/pipeline/ResolvedPlace.js +1 -1
  101. package/out/pipeline/TimingPanel.js +1 -1
  102. package/out/pipeline/index.d.ts +33 -0
  103. package/out/pipeline/index.d.ts.map +1 -0
  104. package/out/pipeline/index.js +21 -0
  105. package/out/pipeline/index.js.map +1 -0
  106. package/out/pipeline/useParsePipeline.d.ts +5 -2
  107. package/out/pipeline/useParsePipeline.d.ts.map +1 -1
  108. package/out/pipeline/useParsePipeline.js +6 -2
  109. package/out/pipeline/useParsePipeline.js.map +1 -1
  110. package/out/poi/LiveResultsBlock.js +1 -1
  111. package/out/poi/POIExplorer.js +1 -1
  112. package/out/poi/SubjectPanel.js +1 -1
  113. package/out/poi/index.d.ts +23 -0
  114. package/out/poi/index.d.ts.map +1 -0
  115. package/out/poi/index.js +15 -0
  116. package/out/poi/index.js.map +1 -0
  117. package/out/poi/runtime.d.ts.map +1 -1
  118. package/out/runtime/index.d.ts +9 -0
  119. package/out/runtime/index.d.ts.map +1 -0
  120. package/out/runtime/index.js +8 -0
  121. package/out/runtime/index.js.map +1 -0
  122. package/package.json +87 -6
  123. package/styleframe.config.ts +9 -1
  124. package/styles.css +948 -26
  125. package/tokens/index.css +2 -1
  126. package/tokens/tokens.json +7 -0
  127. package/tokens/tokens.resolver.json +1 -1
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file POI explorer components, hooks, runtime, and contracts.
6
+ */
7
+
8
+ export { AbstainPanel } from "./AbstainPanel.tsx"
9
+ export type { AbstainPanelProps } from "./AbstainPanel.tsx"
10
+ export { LiveResultsBlock } from "./LiveResultsBlock.tsx"
11
+ export type { LiveResultsBlockProps } from "./LiveResultsBlock.tsx"
12
+ export { OverpassBlock } from "./OverpassBlock.tsx"
13
+ export type { OverpassBlockProps } from "./OverpassBlock.tsx"
14
+ export { POIExplorer } from "./POIExplorer.tsx"
15
+ export type { POIExplorerProps } from "./POIExplorer.tsx"
16
+ export { QueryInput } from "./QueryInput.tsx"
17
+ export type { QueryInputProps } from "./QueryInput.tsx"
18
+ export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "#poi/runtime"
19
+ export { SubjectPanel } from "./SubjectPanel.tsx"
20
+ export type { SubjectPanelProps } from "./SubjectPanel.tsx"
21
+
22
+ export type {
23
+ CategoryRecord,
24
+ LiveSearchState,
25
+ LoadPOIRuntime,
26
+ POIBrandSubject,
27
+ POICategorySubject,
28
+ POIExplorerResult,
29
+ POILiveSearch,
30
+ POILiveSearchResult,
31
+ POIRuntime,
32
+ POISearchHit,
33
+ POISubject,
34
+ POISubjectBase,
35
+ TaxonomyLookup,
36
+ } from "#poi/types"
37
+
38
+ export { usePOISearch } from "#poi/usePOISearch"
39
+ export type { UsePOISearch, UsePOISearchOptions } from "#poi/usePOISearch"
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file Node-safe release-runtime exports.
6
+ */
7
+
8
+ export { useReleaseRuntime } from "#runtime/useReleaseRuntime"
9
+
10
+ export type {
11
+ AssetsLoadContext,
12
+ ReleaseBase,
13
+ ReleaseLoaderState,
14
+ ReleaseManifest,
15
+ ReleaseRuntimeConfig,
16
+ } from "#runtime/useReleaseRuntime"
@@ -3,10 +3,19 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `About` — the collapsible explainer for the browser geocoder: the neural model, the confidence colours, the
7
- * gazetteer resolver, the byte-range database and the FST prior. Prose about the product a host places above or
8
- * beside the geocoder; it renders nothing live.
6
+ * `About` — the explainer for the browser geocoder: the neural model, the confidence colours, the gazetteer
7
+ * resolver, the byte-range database and the FST prior. Prose about the product a host places above or beside the
8
+ * geocoder; it renders nothing live.
9
9
  */
10
10
  import type { ReactNode } from "react";
11
- export declare function About(): ReactNode;
11
+ export interface AboutProps {
12
+ /**
13
+ * Wrap the prose in its own `<details>` disclosure. Set false where the host is already the disclosure — inside a
14
+ * sheet opened by an About button, a summary repeating that button's words is one control too many.
15
+ *
16
+ * @default true
17
+ */
18
+ collapsible?: boolean;
19
+ }
20
+ export declare function About({ collapsible }?: AboutProps): ReactNode;
12
21
  //# sourceMappingURL=About.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"About.d.ts","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,wBAAgB,KAAK,IAAI,SAAS,CA4EjC"}
1
+ {"version":3,"file":"About.d.ts","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,UAAU;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,wBAAgB,KAAK,CAAC,EAAE,WAAkB,EAAE,GAAE,UAAe,GAAG,SAAS,CAkFxE"}
@@ -1,5 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export function About() {
3
- return (_jsxs("details", { className: "mw-about", children: [_jsxs("summary", { className: "mw-about__summary", children: [_jsx("span", { className: "mw-about__icon", children: "\u2139\uFE0F" }), "About this geocoder"] }), _jsxs("div", { className: "mw-about__body", children: [_jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Neural model" }), _jsxs("p", { children: ["A ~29M-parameter BERT-style encoder classifies each token into one of 33 BIO labels covering 16 address components (street, house number, unit, locality, region, postcode, venue, country, intersection, etc.). It runs entirely in your browser via ", _jsx("strong", { children: "onnxruntime-web" }), " (WebGPU with WASM SIMD fallback). The model ships as a 37.6 MB int8-quantized ONNX bundle; fp32 weights are also available for higher accuracy."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Confidence colors" }), _jsx("p", { children: "Every classified span carries a confidence score between 0 and 1. The colors in the results table give you a quick visual read:" }), _jsxs("ul", { className: "mw-about__legend", children: [_jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--high" }), _jsx("strong", { children: "Green" }), " (\u2265 0.8) \u2014 high confidence. The model is nearly certain."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--mid" }), _jsx("strong", { children: "Amber" }), " (0.5\u20130.8) \u2014 moderate confidence. Worth verifying."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--low" }), _jsx("strong", { children: "Red" }), " (< 0.5) \u2014 low confidence. The model is unsure \u2014 likely wrong."] })] }), _jsxs("p", { children: ["These are raw model scores. For calibrated probabilities, the library ships a per-locale isotonic calibrator (", _jsx("code", { children: "calibration.json" }), ") that maps the raw scores to well-calibrated probability estimates."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "WOF resolver" }), _jsxs("p", { children: ["After classification, the resolver queries a ", _jsx("strong", { children: "Who's On First" }), " (WOF) SQLite gazetteer to match the parsed components \u2014 locality, region, and postcode \u2014 against real-world places with coordinates. The cascade tries postcode first (most precise), then locality, then the raw input text. The result is a sorted list of candidate places with WOF IDs, placetypes, lat/lon, and bounding boxes."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Byte-range gazetteer" }), _jsxs("p", { children: ["The gazetteer is a multi-gigabyte SQLite file served from a public bucket. It loads via", " ", _jsx("strong", { children: "sql.js-httpvfs" }), ", which range-requests only the pages a lookup touches, so your browser fetches a few hundred kilobytes per session instead of the whole file."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "FST prior" }), _jsxs("p", { children: ["A ", _jsx("strong", { children: "finite-state transducer" }), " (FST) built from ~94K US place names runs before the neural classifier. It pre-annotates known locality, region, and postcode spans in the input \u2014 places like \"Springfield\" or \"Cook County\" that the FST can match exactly. These \"FST prior\" hits feed the classifier as strong hints, improving locality and region recall on addresses where the neural model alone might miss them. The FST is active whenever the selected release includes it."] })] })] })] }));
2
+ export function About({ collapsible = true } = {}) {
3
+ const body = (_jsxs("div", { className: "mw-about__body", children: [_jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Neural model" }), _jsxs("p", { children: ["A ~29M-parameter BERT-style encoder classifies each token into one of 33 BIO labels covering 16 address components (street, house number, unit, locality, region, postcode, venue, country, intersection, etc.). It runs entirely in your browser via ", _jsx("strong", { children: "onnxruntime-web" }), " (WebGPU with WASM SIMD fallback). The model ships as a 37.6 MB int8-quantized ONNX bundle; fp32 weights are also available for higher accuracy."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Confidence colors" }), _jsx("p", { children: "Every classified span carries a confidence score between 0 and 1. The colors in the results table give you a quick visual read:" }), _jsxs("ul", { className: "mw-about__legend", children: [_jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--high" }), _jsx("strong", { children: "Green" }), " (\u2265 0.8) \u2014 high confidence. The model is nearly certain."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--mid" }), _jsx("strong", { children: "Amber" }), " (0.5\u20130.8) \u2014 moderate confidence. Worth verifying."] }), _jsxs("li", { className: "mw-about__item", children: [_jsx("span", { className: "mw-about__swatch mw-about__swatch--low" }), _jsx("strong", { children: "Red" }), " (< 0.5) \u2014 low confidence. The model is unsure \u2014 likely wrong."] })] }), _jsxs("p", { children: ["These are raw model scores. For calibrated probabilities, the library ships a per-locale isotonic calibrator (", _jsx("code", { children: "calibration.json" }), ") that maps the raw scores to well-calibrated probability estimates."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "WOF resolver" }), _jsxs("p", { children: ["After classification, the resolver queries a ", _jsx("strong", { children: "Who's On First" }), " (WOF) SQLite gazetteer to match the parsed components \u2014 locality, region, and postcode \u2014 against real-world places with coordinates. The cascade tries postcode first (most precise), then locality, then the raw input text. The result is a sorted list of candidate places with WOF IDs, placetypes, lat/lon, and bounding boxes."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "Byte-range gazetteer" }), _jsxs("p", { children: ["The gazetteer is a multi-gigabyte SQLite file served from a public bucket. It loads via", " ", _jsx("strong", { children: "sql.js-httpvfs" }), ", which range-requests only the pages a lookup touches, so your browser fetches a few hundred kilobytes per session instead of the whole file."] })] }), _jsxs("section", { className: "mw-about__section", children: [_jsx("h3", { className: "mw-about__heading", children: "FST prior" }), _jsxs("p", { children: ["A ", _jsx("strong", { children: "finite-state transducer" }), " (FST) built from ~94K US place names runs before the neural classifier. It pre-annotates known locality, region, and postcode spans in the input \u2014 places like \"Springfield\" or \"Cook County\" that the FST can match exactly. These \"FST prior\" hits feed the classifier as strong hints, improving locality and region recall on addresses where the neural model alone might miss them. The FST is active whenever the selected release includes it."] })] })] }));
4
+ if (!collapsible)
5
+ return body;
6
+ return (_jsxs("details", { className: "mw-about", children: [_jsxs("summary", { className: "mw-about__summary", children: [_jsx("span", { className: "mw-about__icon", children: "\u2139\uFE0F" }), "About this geocoder"] }), body] }));
4
7
  }
5
8
  //# sourceMappingURL=About.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"About.js","sourceRoot":"","sources":["../../lib/common/About.tsx"],"names":[],"mappings":";AAYA,MAAM,UAAU,KAAK;IACpB,OAAO,CACN,mBAAS,SAAS,EAAC,UAAU,aAC5B,mBAAS,SAAS,EAAC,mBAAmB,aACrC,eAAM,SAAS,EAAC,gBAAgB,6BAAU,2BAEjC,EACV,eAAK,SAAS,EAAC,gBAAgB,aAC9B,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,6BAAkB,EACnD,kRAGmC,+CAAgC,wJAE/D,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,kCAAuB,EACxD,0JAGI,EACJ,cAAI,SAAS,EAAC,kBAAkB,aAC/B,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,yCAAyC,GAAG,EAC5D,qCAAsB,0EAClB,EACL,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,wCAAwC,GAAG,EAC3D,qCAAsB,oEAClB,EACL,cAAI,SAAS,EAAC,gBAAgB,aAC7B,eAAM,SAAS,EAAC,wCAAwC,GAAG,EAC3D,mCAAoB,gFAChB,IACD,EACL,0IAEE,8CAA6B,4EAC3B,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBAAmB,6BAAkB,EACnD,yEAC8C,8CAAoC,uVAI9E,IACK,EAEV,mBAAS,SAAS,EAAC,mBAAmB,aACrC,aAAI,SAAS,EAAC,mBA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AAI,SAAS,EAAC,mBAAmB,0BAAe,EAChD,8BACG,uDAAwC,0cAKvC,IACK,IACL,CACN,CAAA;IAED,IAAI,CAAC,WAAW;QAAE,OAAO,IAAI,CAAA;IAE7B,OAAO,CACN,mBAAS,SAAS,EAAC,UAAU,aAC5B,mBAAS,SAAS,EAAC,mBAAmB,aACrC,eAAM,SAAS,EAAC,gBAAgB,6BAAU,2BAEjC,EACT,IAAI,IACI,CACV,CAAA;AACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file Common React primitives.
6
+ */
7
+ export { ClientOnly } from "./ClientOnly.tsx";
8
+ export type { ClientOnlyProps } from "./ClientOnly.tsx";
9
+ export { CopyButton } from "./CopyButton.tsx";
10
+ export type { CopyButtonProps } from "./CopyButton.tsx";
11
+ export { cx } from "#common/cx";
12
+ export type { ClassValue } from "#common/cx";
13
+ export { KindBadge } from "./KindBadge.tsx";
14
+ export type { KindBadgeProps } from "./KindBadge.tsx";
15
+ export { LoadingIndicator } from "./LoadingIndicator.tsx";
16
+ export type { LoadingIndicatorProps, LoadingMode } from "./LoadingIndicator.tsx";
17
+ export { PresetChips } from "./PresetChips.tsx";
18
+ export type { Preset, PresetChipsProps } from "./PresetChips.tsx";
19
+ export { useClipboard } from "#common/useClipboard";
20
+ export type { UseClipboard } from "#common/useClipboard";
21
+ export { useDebouncedValue } from "#common/useDebouncedValue";
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/common/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzD,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAC/C,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @copyright Sister Software
3
+ * @license AGPL-3.0
4
+ * @author Teffen Ellis, et al.
5
+ * @file Common React primitives.
6
+ */
7
+ export { ClientOnly } from "./ClientOnly.js";
8
+ export { CopyButton } from "./CopyButton.js";
9
+ export { cx } from "#common/cx";
10
+ export { KindBadge } from "./KindBadge.js";
11
+ export { LoadingIndicator } from "./LoadingIndicator.js";
12
+ export { PresetChips } from "./PresetChips.js";
13
+ export { useClipboard } from "#common/useClipboard";
14
+ export { useDebouncedValue } from "#common/useDebouncedValue";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/common/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAA;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAkB,CAAA;AAE7C,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAiB,CAAA;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAwB,CAAA;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAmB,CAAA;AAE/C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA"}
package/out/index.d.ts CHANGED
@@ -15,64 +15,9 @@
15
15
  * Styling ships separately as `@mailwoman/react/styles.css` (plain, `mw-`-prefixed, Infima-token
16
16
  * aware) — no CSS is imported by the component modules, so the bare package import is node-safe.
17
17
  */
18
- export { ClientOnly } from "./common/ClientOnly.tsx";
19
- export type { ClientOnlyProps } from "./common/ClientOnly.tsx";
20
- export { CopyButton } from "./common/CopyButton.tsx";
21
- export type { CopyButtonProps } from "./common/CopyButton.tsx";
22
- export { cx } from "#common/cx";
23
- export type { ClassValue } from "#common/cx";
24
- export { KindBadge } from "./common/KindBadge.tsx";
25
- export type { KindBadgeProps } from "./common/KindBadge.tsx";
26
- export { LoadingIndicator } from "./common/LoadingIndicator.tsx";
27
- export type { LoadingIndicatorProps, LoadingMode } from "./common/LoadingIndicator.tsx";
28
- export { PresetChips } from "./common/PresetChips.tsx";
29
- export type { Preset, PresetChipsProps } from "./common/PresetChips.tsx";
30
- export { useClipboard } from "#common/useClipboard";
31
- export type { UseClipboard } from "#common/useClipboard";
32
- export { useDebouncedValue } from "#common/useDebouncedValue";
33
- export { AbstainPanel } from "./poi/AbstainPanel.tsx";
34
- export type { AbstainPanelProps } from "./poi/AbstainPanel.tsx";
35
- export { LiveResultsBlock } from "./poi/LiveResultsBlock.tsx";
36
- export type { LiveResultsBlockProps } from "./poi/LiveResultsBlock.tsx";
37
- export { OverpassBlock } from "./poi/OverpassBlock.tsx";
38
- export type { OverpassBlockProps } from "./poi/OverpassBlock.tsx";
39
- export { POIExplorer } from "./poi/POIExplorer.tsx";
40
- export type { POIExplorerProps } from "./poi/POIExplorer.tsx";
41
- export { QueryInput } from "./poi/QueryInput.tsx";
42
- export type { QueryInputProps } from "./poi/QueryInput.tsx";
43
- export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "#poi/runtime";
44
- export { SubjectPanel } from "./poi/SubjectPanel.tsx";
45
- export type { SubjectPanelProps } from "./poi/SubjectPanel.tsx";
46
- export type { CategoryRecord, LiveSearchState, LoadPOIRuntime, POIBrandSubject, POICategorySubject, POIExplorerResult, POILiveSearch, POILiveSearchResult, POIRuntime, POISearchHit, POISubject, POISubjectBase, TaxonomyLookup, } from "#poi/types";
47
- export { usePOISearch } from "#poi/usePOISearch";
48
- export type { UsePOISearch, UsePOISearchOptions } from "#poi/usePOISearch";
49
- export { About } from "./common/About.tsx";
50
- export { FailureDiagnostic } from "./pipeline/FailureDiagnostic.tsx";
51
- export type { FailureDiagnosticProps } from "./pipeline/FailureDiagnostic.tsx";
52
- export { SpanHighlight } from "./pipeline/SpanHighlight.tsx";
53
- export type { SpanHighlightProps } from "./pipeline/SpanHighlight.tsx";
54
- export { TimingPanel } from "./pipeline/TimingPanel.tsx";
55
- export type { TimingPanelProps } from "./pipeline/TimingPanel.tsx";
56
- export { TreeView } from "./pipeline/TreeView.tsx";
57
- export type { TreeViewProps } from "./pipeline/TreeView.tsx";
58
- export { CandidatePicker } from "./pipeline/CandidatePicker.tsx";
59
- export type { CandidatePickerProps } from "./pipeline/CandidatePicker.tsx";
60
- export { ComponentTable } from "./pipeline/ComponentTable.tsx";
61
- export type { ComponentTableProps } from "./pipeline/ComponentTable.tsx";
62
- export { ConfidenceCell } from "./pipeline/ConfidenceCell.tsx";
63
- export type { ConfidenceCellProps } from "./pipeline/ConfidenceCell.tsx";
64
- export { buildParsePayload } from "#pipeline/copy";
65
- export { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "#pipeline/presets";
66
- export { PipelineExplorer } from "./pipeline/PipelineExplorer.tsx";
67
- export type { PipelineExplorerProps } from "./pipeline/PipelineExplorer.tsx";
68
- export { QueryForm } from "./pipeline/QueryForm.tsx";
69
- export type { QueryFormProps } from "./pipeline/QueryForm.tsx";
70
- export { ResolvedPlace } from "./pipeline/ResolvedPlace.tsx";
71
- export type { ResolvedPlaceProps } from "./pipeline/ResolvedPlace.tsx";
72
- export type { PipelineLoadingState, PipelinePanels, PipelineRuntime } from "#pipeline/types";
73
- export { useParsePipeline } from "#pipeline/useParsePipeline";
74
- export type { UseParsePipeline, UseParsePipelineOptions } from "#pipeline/useParsePipeline";
75
- export { useReleaseRuntime } from "#runtime/useReleaseRuntime";
76
- export type { AssetsLoadContext, ReleaseBase, ReleaseLoaderState, ReleaseManifest, ReleaseRuntimeConfig, } from "#runtime/useReleaseRuntime";
18
+ export * from "#common/index";
19
+ export * from "#poi/index";
20
+ export * from "#pipeline/index";
21
+ export * from "#runtime/index";
77
22
  export type { GeocoderRuntime, InferenceBackend, LngLatTuple, MapBias, MapCanvasExtraProps, MapCanvasProps, MapCanvasStyle, OverlaySpec, Suggestion, VersionOption, } from "#map/index";
78
23
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AACpD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAC/B,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB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M,0BAA0B,CAAA;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AAEtE,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAE5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AAG3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAE9D,YAAY,EACX,iBAAiB,EACjB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,GACpB,MAAM,4BAA4B,CAAA;AAOnC,YAAY,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,GACb,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA;AAE9B,YAAY,EACX,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,EACX,UAAU,EACV,aAAa,GACb,MAAM,YAAY,CAAA"}
package/out/index.js CHANGED
@@ -15,40 +15,8 @@
15
15
  * Styling ships separately as `@mailwoman/react/styles.css` (plain, `mw-`-prefixed, Infima-token
16
16
  * aware) — no CSS is imported by the component modules, so the bare package import is node-safe.
17
17
  */
18
- // ── Common primitives ──────────────────────────────────────────────────────
19
- export { ClientOnly } from "./common/ClientOnly.js";
20
- export { CopyButton } from "./common/CopyButton.js";
21
- export { cx } from "#common/cx";
22
- export { KindBadge } from "./common/KindBadge.js";
23
- export { LoadingIndicator } from "./common/LoadingIndicator.js";
24
- export { PresetChips } from "./common/PresetChips.js";
25
- export { useClipboard } from "#common/useClipboard";
26
- export { useDebouncedValue } from "#common/useDebouncedValue";
27
- // ── POI explorer ───────────────────────────────────────────────────────────
28
- export { AbstainPanel } from "./poi/AbstainPanel.js";
29
- export { LiveResultsBlock } from "./poi/LiveResultsBlock.js";
30
- export { OverpassBlock } from "./poi/OverpassBlock.js";
31
- export { POIExplorer } from "./poi/POIExplorer.js";
32
- export { QueryInput } from "./poi/QueryInput.js";
33
- export { formatDistance, loadPOIRuntime, POI_DEFAULT_TEXT, POI_PRESETS } from "#poi/runtime";
34
- export { SubjectPanel } from "./poi/SubjectPanel.js";
35
- export { usePOISearch } from "#poi/usePOISearch";
36
- // ── Result visualizers ─────────────────────────────────────────────────────
37
- export { About } from "./common/About.js";
38
- export { FailureDiagnostic } from "./pipeline/FailureDiagnostic.js";
39
- export { SpanHighlight } from "./pipeline/SpanHighlight.js";
40
- export { TimingPanel } from "./pipeline/TimingPanel.js";
41
- export { TreeView } from "./pipeline/TreeView.js";
42
- // ── Pipeline explorer ──────────────────────────────────────────────────────
43
- export { CandidatePicker } from "./pipeline/CandidatePicker.js";
44
- export { ComponentTable } from "./pipeline/ComponentTable.js";
45
- export { ConfidenceCell } from "./pipeline/ConfidenceCell.js";
46
- export { buildParsePayload } from "#pipeline/copy";
47
- export { PIPELINE_DEFAULT_ADDRESS, PIPELINE_PRESETS } from "#pipeline/presets";
48
- export { PipelineExplorer } from "./pipeline/PipelineExplorer.js";
49
- export { QueryForm } from "./pipeline/QueryForm.js";
50
- export { ResolvedPlace } from "./pipeline/ResolvedPlace.js";
51
- export { useParsePipeline } from "#pipeline/useParsePipeline";
52
- // ── Release runtime (shared load orchestration; node-safe — no onnx/httpvfs/maplibre) ──
53
- export { useReleaseRuntime } from "#runtime/useReleaseRuntime";
18
+ export * from "#common/index";
19
+ export * from "#poi/index";
20
+ export * from "#pipeline/index";
21
+ export * from "#runtime/index";
54
22
  //# sourceMappingURL=index.js.map
package/out/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,8EAA8E;AAC9E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAyB,CAAA;AAEpD,OAAO,EAAE,EAAE,EAAE,MAAM,YAAY,CAAA;AAE/B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAwB,CAAA;AAElD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA+B,CAAA;AAEhE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAA0B,CAAA;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,8EAA8E;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAwB,CAAA;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA4B,CAAA;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAyB,CAAA;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAuB,CAAA;AAEnD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAsB,CAAA;AAEjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAwB,CAAA;AAmBrD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGhD,8EAA8E;AAE9E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAoB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAkC,CAAA;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA8B,CAAA;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA4B,CAAA;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAyB,CAAA;AAGlD,8EAA8E;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,+BAAgC,CAAA;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA+B,CAAA;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA+B,CAAA;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAiC,CAAA;AAElE,OAAO,EAAE,SAAS,EAAE,MAAM,yBAA0B,CAAA;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA8B,CAAA;AAK5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAG7D,0FAA0F;AAC1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"BackendControl.d.ts","sourceRoot":"","sources":["../../lib/map/BackendControl.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAa9G"}
1
+ {"version":3,"file":"BackendControl.d.ts","sourceRoot":"","sources":["../../lib/map/BackendControl.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;OAEG;IACH,SAAS,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,iBAAiB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;CAC/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAE,EAAE,mBAAmB,GAAG,SAAS,CAiB9G"}
@@ -3,6 +3,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  * The backend indicator + WASM opt-out.
4
4
  */
5
5
  export function BackendControl({ activeBackend, forceWASM, onForceWASMChange }) {
6
- return (_jsxs("div", { className: "mw-demo-backend", children: [activeBackend ? (_jsxs("span", { className: "mw-demo-backend__active", children: ["Backend: ", _jsx("code", { children: activeBackend })] })) : null, _jsxs("label", { className: "mw-demo-backend__toggle", children: [_jsx("input", { type: "checkbox", checked: forceWASM, onChange: (e) => onForceWASMChange(e.target.checked) }), " Force WASM"] })] }));
6
+ return (_jsxs("div", { className: "mw-demo-backend", children: [_jsx("span", { className: "mw-map-sheet__label", children: "Inference backend" }), activeBackend ? (_jsxs("span", { className: "mw-demo-backend__active", children: ["Running on ", _jsx("code", { children: activeBackend })] })) : null, _jsxs("label", { className: "mw-map-sheet__check mw-demo-backend__toggle", children: [_jsx("input", { type: "checkbox", checked: forceWASM, onChange: (event) => onForceWASMChange(event.target.checked) }), "Force WASM"] })] }));
7
7
  }
8
8
  //# sourceMappingURL=BackendControl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackendControl.js","sourceRoot":"","sources":["../../lib/map/BackendControl.tsx"],"names":[],"mappings":";AA8BA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAuB;IAClG,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC9B,aAAa,CAAC,CAAC,CAAC,CAChB,gBAAM,SAAS,EAAC,yBAAyB,0BAC/B,yBAAO,aAAa,GAAQ,IAC/B,CACP,CAAC,CAAC,CAAC,IAAI,EACR,iBAAO,SAAS,EAAC,yBAAyB,aACzC,gBAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAI,mBAC5F,IACH,CACN,CAAA;AACF,CAAC"}
1
+ {"version":3,"file":"BackendControl.js","sourceRoot":"","sources":["../../lib/map/BackendControl.tsx"],"names":[],"mappings":";AA8BA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,aAAa,EAAE,SAAS,EAAE,iBAAiB,EAAuB;IAClG,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,eAAM,SAAS,EAAC,qBAAqB,kCAAyB,EAE7D,aAAa,CAAC,CAAC,CAAC,CAChB,gBAAM,SAAS,EAAC,yBAAyB,4BAC7B,yBAAO,aAAa,GAAQ,IACjC,CACP,CAAC,CAAC,CAAC,IAAI,EAER,iBAAO,SAAS,EAAC,6CAA6C,aAC7D,gBAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAI,kBAEpG,IACH,CACN,CAAA;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompareToggle.d.ts","sourceRoot":"","sources":["../../lib/map/CompareToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,mBAAmB,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,MAAM,GACN,EAAE,kBAAkB,GAAG,SAAS,CAkChC"}
1
+ {"version":3,"file":"CompareToggle.d.ts","sourceRoot":"","sources":["../../lib/map/CompareToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACtC;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAA;IACpB;;OAEG;IACH,mBAAmB,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAA;IACnD;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B;;OAEG;IACH,sBAAsB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAA;CAClB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,MAAM,GACN,EAAE,kBAAkB,GAAG,SAAS,CAmChC"}
@@ -6,6 +6,6 @@ export function CompareToggle({ versions, primaryVersion, compareMode, onCompare
6
6
  if (versions.length < 2)
7
7
  return null;
8
8
  const options = versions.filter((v) => v.version !== primaryVersion);
9
- return (_jsxs("div", { className: "mw-demo-compare", children: [_jsxs("label", { className: "mw-demo-compare__toggle", children: [_jsx("input", { type: "checkbox", checked: compareMode, onChange: (e) => onCompareModeChange(e.target.checked) }), " Compare"] }), compareMode ? (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-compare-version", children: "Compare with" }), _jsxs("select", { id: "mw-demo-compare-version", className: "mw-demo-control__select", value: compareVersion ?? "", onChange: (e) => onCompareVersionChange(e.target.value || null), disabled: disabled, children: [_jsx("option", { value: "", children: "Select version\u2026" }), options.map((v) => (_jsx("option", { value: v.version, children: v.label ?? v.version }, v.version)))] }), status ? _jsx("p", { className: "mw-demo-compare__status", children: status }) : null] })) : null] }));
9
+ return (_jsxs("div", { className: "mw-demo-compare", children: [_jsxs("label", { className: "mw-map-sheet__check mw-demo-compare__toggle", children: [_jsx("input", { type: "checkbox", checked: compareMode, onChange: (event) => onCompareModeChange(event.target.checked) }), "Compare two model versions"] }), compareMode ? (_jsxs("div", { className: "mw-demo-control", children: [_jsx("label", { className: "mw-demo-control__label", htmlFor: "mw-demo-compare-version", children: "Compare with" }), _jsxs("select", { id: "mw-demo-compare-version", className: "mw-demo-control__select", value: compareVersion ?? "", onChange: (e) => onCompareVersionChange(e.target.value || null), disabled: disabled, children: [_jsx("option", { value: "", children: "Select version\u2026" }), options.map((v) => (_jsx("option", { value: v.version, children: v.label ?? v.version }, v.version)))] }), status ? _jsx("p", { className: "mw-demo-compare__status", children: status }) : null] })) : null] }));
10
10
  }
11
11
  //# sourceMappingURL=CompareToggle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CompareToggle.js","sourceRoot":"","sources":["../../lib/map/CompareToggle.tsx"],"names":[],"mappings":";AAoDA;;GAEG;AACH,MAAM,UAAU,aAAa,CAAC,EAC7B,QAAQ,EACR,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,QAAQ,EACR,MAAM,GACc;IACpB,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAA;IAEpC,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,cAAc,CAAC,CAAA;IAEpE,OAAO,CACN,eAAK,SAAS,EAAC,iBAAiB,aAC/B,iBAAO,SAAS,EAAC,yBAAyB,aACzC,gBAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAA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N,eAAK,SAAS,EAAC,iBAAiB,aAC/B,iBAAO,SAAS,EAAC,6CAA6C,aAC7D,gBAAO,IAAI,EAAC,UAAU,EAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,mBAAmB,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAI,kCAExG,EACP,WAAW,CAAC,CAAC,CAAC,CACd,eAAK,SAAS,EAAC,iBAAiB,aAC/B,gBAAO,SAAS,EAAC,wBAAwB,EAAC,OAAO,EAAC,yBAAyB,6BAEnE,EACR,kBACC,EAAE,EAAC,yBAAyB,EAC5B,SAAS,EAAC,yBAAyB,EACnC,KAAK,EAAE,cAAc,IAAI,EAAE,EAC3B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,sBAAsB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,IAAI,CAAC,EAC/D,QAAQ,EAAE,QAAQ,aAElB,iBAAQ,KAAK,EAAC,EAAE,qCAAyB,EACxC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACnB,iBAAwB,KAAK,EAAE,CAAC,CAAC,OAAO,YACtC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,OAAO,IADT,CAAC,CAAC,OAAO,CAEb,CACT,CAAC,IACM,EACR,MAAM,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,yBAAyB,YAAE,MAAM,GAAK,CAAC,CAAC,CAAC,IAAI,IAC/D,CACN,CAAC,CAAC,CAAC,IAAI,IACH,CACN,CAAA;AACF,CAAC"}
@@ -38,6 +38,16 @@ export interface GeocoderProps {
38
38
  * Example chips. @default the empty set (host supplies its own).
39
39
  */
40
40
  presets?: ReadonlyArray<Preset>;
41
+ /**
42
+ * Open the developer disclosure on mount — the model version, the backend readout and compare. Collapsed by default
43
+ * so the address field is the first thing a visitor meets. @default false
44
+ */
45
+ developer?: boolean;
46
+ /**
47
+ * Fired with the query each time one is submitted. The host writes it into its own URL — this package never touches
48
+ * `location`, because which parameter carries a query is the app's decision.
49
+ */
50
+ onSubmitQuery?: (query: string) => void;
41
51
  /**
42
52
  * Only hint the viewport bias once the visitor has zoomed past the global view — a whole-globe center is noise.
43
53
  * Matches the `map.getZoom() >= 4` threshold. @default 4
@@ -53,5 +63,5 @@ export interface GeocoderProps {
53
63
  /**
54
64
  * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
55
65
  */
56
- export declare function Geocoder({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }: GeocoderProps): ReactNode;
66
+ export declare function Geocoder({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, onSubmitQuery, }: GeocoderProps): ReactNode;
57
67
  //# sourceMappingURL=Geocoder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Geocoder.d.ts","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,SAAS,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"}
1
+ {"version":3,"file":"Geocoder.d.ts","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAA;AAGhF,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAW,MAAM,YAAY,CAAA;AAO1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAMvD,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,OAAO,EAAE,eAAe,CAAA;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAgID;;GAEG;AACH,wBAAgB,QAAQ,CAAC,EACxB,OAAO,EACP,MAAkB,EAClB,cAAmB,EACnB,OAAoB,EACpB,WAAe,EACf,iBAAwB,EACxB,SAAiB,EACjB,aAAa,GACb,EAAE,aAAa,GAAG,SAAS,CAuB3B"}
@@ -19,7 +19,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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
- import { useCallback, useEffect, useRef } from "react";
22
+ import { useCallback, useEffect, useRef, useState } from "react";
23
23
  import { useCompareState } from "#map/useCompareState";
24
24
  import { useGeocode } from "#map/useGeocode";
25
25
  import { useMapPlaceRender } from "#map/useMapPlaceRender";
@@ -29,37 +29,37 @@ import { GeocoderControls } from "./GeocoderControls.js";
29
29
  import { MapCanvas } from "./MapCanvas.js";
30
30
  import { OverlayLayers } from "./OverlayLayers.js";
31
31
  import { ResolvedPlaceLayers } from "./ResolvedPlaceLayers.js";
32
- function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, }) {
32
+ function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom, applyResultCamera, developer, onSubmitQuery, }) {
33
33
  const mapRef = useRef(null);
34
+ // The chrome sits OUTSIDE `<MapCanvas>`, so it cannot take the handle from `useMap()`. A ref alone does not
35
+ // re-render the compass or the layer control when the map arrives, so the same poll that publishes the test
36
+ // handle also puts it in state — one poll, two consumers.
37
+ const [map, setMap] = useState(null);
38
+ // The map announces itself; nothing polls for it. `onLoad` carries the instance, so the compass and the layer
39
+ // control render on the frame the map is ready rather than up to an interval later.
40
+ //
34
41
  // TEST INJECTION POINT: the e2e viewport-bias suite drives the REAL map (pan + zoom past the bias threshold)
35
- // before submitting, and a browser test cannot reach a React ref — so the live map handle is
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
- useEffect(() => {
40
- const host = globalThis;
41
- const timer = setInterval(() => {
42
- const map = mapRef.current?.getMap();
43
- if (map) {
44
- host.__mailwomanMapCanvas = map;
45
- clearInterval(timer);
46
- }
47
- }, 250);
48
- return () => {
49
- clearInterval(timer);
50
- delete host.__mailwomanMapCanvas;
51
- };
42
+ // before submitting, and a browser test cannot reach a React ref — so the same handle is republished on
43
+ // `globalThis.__mailwomanMapCanvas`, and cleared on unmount so a torn-down geocoder leaves no stale handle.
44
+ const onMapLoad = useCallback((event) => {
45
+ ;
46
+ globalThis.__mailwomanMapCanvas = event.target;
47
+ setMap(event.target);
48
+ }, []);
49
+ useEffect(() => () => {
50
+ setMap(null);
51
+ delete globalThis.__mailwomanMapCanvas;
52
52
  }, []);
53
53
  // Read the viewport bias at submit time — through the map handle, never a threaded state value, so granting/zooming
54
54
  // mid-session doesn't re-create the parse callback. Below the min-bias zoom, a whole-globe center is noise → null.
55
55
  const getBias = useCallback(() => {
56
- const map = mapRef.current?.getMap();
57
- if (!map)
56
+ const live = mapRef.current?.getMap();
57
+ if (!live)
58
58
  return null;
59
- const zoom = map.getZoom();
59
+ const zoom = live.getZoom();
60
60
  if (zoom < minBiasZoom)
61
61
  return null;
62
- const center = map.getCenter();
62
+ const center = live.getCenter();
63
63
  return { center: [center.lng, center.lat], zoom };
64
64
  }, [minBiasZoom]);
65
65
  const geocode = useGeocode({ runtime, defaultText: defaultAddress, getBias });
@@ -82,7 +82,7 @@ function GeocoderInner({ runtime, panels, defaultAddress, presets, minBiasZoom,
82
82
  }, style: { width: "100%", height: "100%" },
83
83
  // One compact attribution pill (the map's own default is a wide, always-open "MapLibre | © …" bar), no
84
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] }));
85
+ mapProps: { attributionControl: { compact: true }, maplibreLogo: false, onLoad: onMapLoad }, children: [_jsx(OverlayLayers, { overlays: runtime.overlays }), _jsx(ResolvedPlaceLayers, { spec: spec, applyCamera: applyResultCamera }), panels.mapControls] }) }), _jsx(GeocoderControls, { runtime: runtime, geocode: geocode, autocomplete: autocomplete, compare: compare, panels: panels, presets: presets, placeholder: defaultAddress, map: map, onSubmitQuery: onSubmitQuery, onSelectVersion: onSelectVersion, onForceWASMChange: onForceWASMChange, developer: developer }), panels.debugDrawer ? panels.debugDrawer({ result: geocode.result }) : null] }));
86
86
  }
87
87
  /**
88
88
  * Stable empty defaults — a fresh `{}`/`[]` per render would churn every downstream memo dep.
@@ -92,7 +92,7 @@ const NO_PRESETS = [];
92
92
  /**
93
93
  * The composed geocoder, behind a `ClientOnly` SSR boundary (the map is intrinsically a client component).
94
94
  */
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 })) }));
95
+ export function Geocoder({ runtime, panels = NO_PANELS, defaultAddress = "", presets = NO_PRESETS, minBiasZoom = 4, applyResultCamera = true, developer = false, onSubmitQuery, }) {
96
+ return (_jsx(ClientOnly, { fallback: _jsx("div", { className: "mw-geocoder-demo", children: _jsx("p", { children: "Loading the geocoder\u2026" }) }), children: () => (_jsx(GeocoderInner, { runtime: runtime, panels: panels, defaultAddress: defaultAddress, presets: presets, minBiasZoom: minBiasZoom, applyResultCamera: applyResultCamera, developer: developer, onSubmitQuery: onSubmitQuery })) }));
97
97
  }
98
98
  //# sourceMappingURL=Geocoder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Geocoder.js","sourceRoot":"","sources":["../../lib/map/Geocoder.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAkB,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAA;AAItE,OAAO,EAAE,eA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,OAAO,EAChB,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,iBAAiB,EACpC,SAAS,EAAE,SAAS,EACpB,aAAa,EAAE,aAAa,GAC3B,CACF,GACW,CACb,CAAA;AACF,CAAC"}
@@ -3,21 +3,22 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * `<GeocoderControls>` — the geocoder's floating control panel, assembled from the geocoder-specific units
7
- * (VersionPicker / CompareToggle / BackendControl / PlaceAutocomplete / ResultPanel) and the REUSED
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}.
6
+ * The geocoder's chrome over the map: a search pill on top, example chips on one line beneath it, a control column
7
+ * down the right edge, and a result sheet that rises from the bottom when there is something to show.
11
8
  *
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.
9
+ * It replaces a 400px full-height panel that carried every control at once. The layout is the one the reference
10
+ * map apps use, and the reason is the map: chrome that floats over it leaves the map the page, where a slab makes
11
+ * the map the leftover third.
12
+ *
13
+ * NODE-SAFE: pure React + the shared units, no maplibre.
14
14
  */
15
- import type { ReactNode } from "react";
15
+ import { type ReactNode } from "react";
16
+ import type { MapInstance } from "react-map-gl/maplibre";
16
17
  import type { GeocoderPanels, GeocoderRuntime } from "#map/types";
17
18
  import type { UseCompareState } from "#map/useCompareState";
18
19
  import type { UseGeocode } from "#map/useGeocode";
19
20
  import type { UsePlaceAutocomplete } from "#map/usePlaceAutocomplete";
20
- import { type Preset } from "../common/PresetChips.tsx";
21
+ import type { Preset } from "../common/PresetChips.tsx";
21
22
  export interface GeocoderControlsProps {
22
23
  /**
23
24
  * The injected geocoder runtime.
@@ -47,6 +48,16 @@ export interface GeocoderControlsProps {
47
48
  * Input placeholder.
48
49
  */
49
50
  placeholder: string;
51
+ /**
52
+ * The live map, for the controls that read it: the compass takes its bearing, the host's layer control reads its
53
+ * style. `null` until react-map-gl instantiates the map.
54
+ */
55
+ map?: MapInstance | null;
56
+ /**
57
+ * Fired with the query whenever one is submitted, before the parse starts. The host writes it into the URL; this
58
+ * package never touches `location`, because the address bar is the app's state, not a control's.
59
+ */
60
+ onSubmitQuery?: (query: string) => void;
50
61
  /**
51
62
  * Select a model version (the composed geocoder also clears a now-colliding compare selection).
52
63
  */
@@ -55,9 +66,16 @@ export interface GeocoderControlsProps {
55
66
  * Toggle the forced WASM backend.
56
67
  */
57
68
  onForceWASMChange: (forceWASM: boolean) => void;
69
+ /**
70
+ * Open the developer panel on mount. The model version, the backend readout and compare live inside it: they read on
71
+ * the model rather than on an address, and above the query field they were the first thing every visitor met.
72
+ *
73
+ * @default false
74
+ */
75
+ developer?: boolean;
58
76
  }
59
77
  /**
60
- * The floating control panel.
78
+ * The chrome. Everything positioned here floats over the map; nothing occupies a column of the page.
61
79
  */
62
- export declare function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, onSelectVersion, onForceWASMChange, }: GeocoderControlsProps): ReactNode;
80
+ export declare function GeocoderControls({ runtime, geocode, autocomplete, compare, panels, presets, placeholder, map, onSubmitQuery, onSelectVersion, onForceWASMChange, developer, }: GeocoderControlsProps): ReactNode;
63
81
  //# sourceMappingURL=GeocoderControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GeocoderControls.d.ts","sourceRoot":"","sources":["../../lib/map/GeocoderControls.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,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,K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