@element-editor/ui 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/AGENTS.md +65 -0
  2. package/LICENSE +21 -0
  3. package/README.md +46 -2
  4. package/dist/BooleanOperations-WXcmW9Vy.cjs +1 -0
  5. package/dist/BooleanOperations-oF0WybQP.js +111 -0
  6. package/dist/DataTable-CNfB01y2.cjs +2 -0
  7. package/dist/DataTable-DNmjUwka.js +510 -0
  8. package/dist/DataTablePanel-BknCxC1K.cjs +1 -0
  9. package/dist/DataTablePanel-rWdaQubk.js +208 -0
  10. package/dist/EditToolbarBtn-SZIsnIn3.js +378 -0
  11. package/dist/EditToolbarBtn-dpCmKnzk.cjs +3 -0
  12. package/dist/FeatureEditModal-BF-fGhVD.js +77 -0
  13. package/dist/FeatureEditModal-CM6BObUO.cjs +1 -0
  14. package/dist/FeatureList-CQb2kTrV.js +520 -0
  15. package/dist/FeatureList-Csr-anLA.cjs +1 -0
  16. package/dist/FeatureRowContextMenu-BLt7VlUU.js +130 -0
  17. package/dist/FeatureRowContextMenu-Gwq3OMEA.cjs +1 -0
  18. package/dist/GeoJSONModal-BPFWeaLZ.js +886 -0
  19. package/dist/GeoJSONModal-iwUcvrg7.cjs +9 -0
  20. package/dist/SchemaEditor-BEsKUe2p.js +293 -0
  21. package/dist/SchemaEditor-qkoYMg0C.cjs +1 -0
  22. package/dist/SchemaModal-9nNrgorr.js +95 -0
  23. package/dist/SchemaModal-GrtgA7cH.cjs +1 -0
  24. package/dist/SettingsModal-6_qmRyCi.cjs +1 -0
  25. package/dist/SettingsModal-DTP0Xx_Z.js +237 -0
  26. package/dist/ShortcutsModal-CdyQlrqK.cjs +1 -0
  27. package/dist/ShortcutsModal-DwxZu71W.js +299 -0
  28. package/dist/components/ActiveDrawingToolbar.d.cts +1 -0
  29. package/dist/components/ActiveDrawingToolbar.d.ts +1 -0
  30. package/dist/components/BasemapPicker.d.cts +26 -0
  31. package/dist/components/BasemapPicker.d.ts +26 -0
  32. package/dist/components/BooleanOperations.d.cts +1 -0
  33. package/dist/components/BooleanOperations.d.ts +1 -0
  34. package/dist/components/BufferPanel.d.cts +1 -0
  35. package/dist/components/BufferPanel.d.ts +1 -0
  36. package/dist/components/DataTable.d.cts +9 -0
  37. package/dist/components/DataTable.d.ts +9 -0
  38. package/dist/components/DataTablePanel.d.cts +10 -0
  39. package/dist/components/DataTablePanel.d.ts +10 -0
  40. package/dist/components/EditingToolbar.d.cts +1 -0
  41. package/dist/components/EditingToolbar.d.ts +1 -0
  42. package/dist/components/ElementEditorErrorBoundary.d.cts +28 -0
  43. package/dist/components/ElementEditorErrorBoundary.d.ts +28 -0
  44. package/dist/components/ElementEditorUIProvider.d.cts +50 -0
  45. package/dist/components/ElementEditorUIProvider.d.ts +50 -0
  46. package/dist/components/FeatureMapContextMenu.d.cts +23 -0
  47. package/dist/components/FeatureMapContextMenu.d.ts +23 -0
  48. package/dist/components/FitBoundsButton.d.cts +6 -0
  49. package/dist/components/FitBoundsButton.d.ts +6 -0
  50. package/dist/components/FloatingToolbar.d.cts +3 -0
  51. package/dist/components/FloatingToolbar.d.ts +3 -0
  52. package/dist/components/LocateButton.d.cts +11 -0
  53. package/dist/components/LocateButton.d.ts +11 -0
  54. package/dist/components/ReadonlyBanner.d.cts +1 -0
  55. package/dist/components/ReadonlyBanner.d.ts +1 -0
  56. package/dist/components/ShortcutsModal.d.cts +1 -0
  57. package/dist/components/ShortcutsModal.d.ts +1 -0
  58. package/dist/components/SimplifyPanel.d.cts +1 -0
  59. package/dist/components/SimplifyPanel.d.ts +1 -0
  60. package/dist/components/SmoothPanel.d.cts +1 -0
  61. package/dist/components/SmoothPanel.d.ts +1 -0
  62. package/dist/components/UndoRedoToolbar.d.cts +20 -0
  63. package/dist/components/UndoRedoToolbar.d.ts +20 -0
  64. package/dist/components/VertexSelectionBar.d.cts +12 -0
  65. package/dist/components/VertexSelectionBar.d.ts +12 -0
  66. package/dist/components/ZoomIndicator.d.cts +15 -0
  67. package/dist/components/ZoomIndicator.d.ts +15 -0
  68. package/dist/components/dialogs/DynamicFieldRenderer.d.cts +11 -0
  69. package/dist/components/dialogs/DynamicFieldRenderer.d.ts +11 -0
  70. package/dist/components/dialogs/SettingsModal.d.cts +1 -0
  71. package/dist/components/dialogs/SettingsModal.d.ts +1 -0
  72. package/dist/components/lazyParts.d.cts +12 -0
  73. package/dist/components/lazyParts.d.ts +12 -0
  74. package/dist/components/sidebar/FeatureEditModal.d.cts +6 -0
  75. package/dist/components/sidebar/FeatureEditModal.d.ts +6 -0
  76. package/dist/components/sidebar/FeatureList.d.cts +4 -0
  77. package/dist/components/sidebar/FeatureList.d.ts +4 -0
  78. package/dist/components/sidebar/FeatureRow.d.cts +38 -0
  79. package/dist/components/sidebar/FeatureRow.d.ts +38 -0
  80. package/dist/components/sidebar/FeatureRowContextMenu.d.cts +12 -0
  81. package/dist/components/sidebar/FeatureRowContextMenu.d.ts +12 -0
  82. package/dist/components/sidebar/FeatureSidePanel.d.cts +8 -0
  83. package/dist/components/sidebar/FeatureSidePanel.d.ts +8 -0
  84. package/dist/components/sidebar/GeoJSONModal.d.cts +5 -0
  85. package/dist/components/sidebar/GeoJSONModal.d.ts +5 -0
  86. package/dist/components/sidebar/GroupRow.d.cts +21 -0
  87. package/dist/components/sidebar/GroupRow.d.ts +21 -0
  88. package/dist/components/sidebar/HideLayersToggle.d.cts +2 -0
  89. package/dist/components/sidebar/HideLayersToggle.d.ts +2 -0
  90. package/dist/components/sidebar/LayersPanel.d.cts +5 -0
  91. package/dist/components/sidebar/LayersPanel.d.ts +5 -0
  92. package/dist/components/sidebar/PartSubRow.d.cts +9 -0
  93. package/dist/components/sidebar/PartSubRow.d.ts +9 -0
  94. package/dist/components/sidebar/SchemaEditor.d.cts +4 -0
  95. package/dist/components/sidebar/SchemaEditor.d.ts +4 -0
  96. package/dist/components/sidebar/SchemaModal.d.cts +5 -0
  97. package/dist/components/sidebar/SchemaModal.d.ts +5 -0
  98. package/dist/components/sidebar/codeDock.d.cts +21 -0
  99. package/dist/components/sidebar/codeDock.d.ts +21 -0
  100. package/dist/components/ui/Button.d.cts +9 -0
  101. package/dist/components/ui/Button.d.ts +9 -0
  102. package/dist/components/ui/CloseButton.d.cts +6 -0
  103. package/dist/components/ui/CloseButton.d.ts +6 -0
  104. package/dist/components/ui/ContextMenu.d.cts +28 -0
  105. package/dist/components/ui/ContextMenu.d.ts +28 -0
  106. package/dist/components/ui/EditToolbarBtn.d.cts +13 -0
  107. package/dist/components/ui/EditToolbarBtn.d.ts +13 -0
  108. package/dist/components/ui/ElementToaster.d.cts +3 -0
  109. package/dist/components/ui/ElementToaster.d.ts +3 -0
  110. package/dist/components/ui/GeometryTypeIcon.d.cts +7 -0
  111. package/dist/components/ui/GeometryTypeIcon.d.ts +7 -0
  112. package/dist/components/ui/IconButton.d.cts +28 -0
  113. package/dist/components/ui/IconButton.d.ts +28 -0
  114. package/dist/components/ui/Input.d.cts +14 -0
  115. package/dist/components/ui/Input.d.ts +14 -0
  116. package/dist/components/ui/JsonCode.d.cts +4 -0
  117. package/dist/components/ui/JsonCode.d.ts +4 -0
  118. package/dist/components/ui/Kbd.d.cts +16 -0
  119. package/dist/components/ui/Kbd.d.ts +16 -0
  120. package/dist/components/ui/NoFeaturesEmptyState.d.cts +1 -0
  121. package/dist/components/ui/NoFeaturesEmptyState.d.ts +1 -0
  122. package/dist/components/ui/SearchDropdown.d.cts +28 -0
  123. package/dist/components/ui/SearchDropdown.d.ts +28 -0
  124. package/dist/components/ui/ToolButton.d.cts +19 -0
  125. package/dist/components/ui/ToolButton.d.ts +19 -0
  126. package/dist/components/ui/Tooltip.d.cts +12 -0
  127. package/dist/components/ui/Tooltip.d.ts +12 -0
  128. package/dist/components/ui/panelHeader.d.cts +2 -0
  129. package/dist/components/ui/panelHeader.d.ts +2 -0
  130. package/dist/components/ui/resizeEdge.d.cts +4 -0
  131. package/dist/components/ui/resizeEdge.d.ts +4 -0
  132. package/dist/contexts/ElementEditorConfigContext.d.cts +351 -0
  133. package/dist/contexts/ElementEditorConfigContext.d.ts +351 -0
  134. package/dist/contexts/EventContext.d.cts +69 -0
  135. package/dist/contexts/EventContext.d.ts +69 -0
  136. package/dist/contexts/MapControllerContext.d.cts +24 -0
  137. package/dist/contexts/MapControllerContext.d.ts +24 -0
  138. package/dist/contexts/ShortcutConfigContext.d.cts +16 -0
  139. package/dist/contexts/ShortcutConfigContext.d.ts +16 -0
  140. package/dist/contexts/ThemeContext.d.cts +12 -0
  141. package/dist/contexts/ThemeContext.d.ts +12 -0
  142. package/dist/element-editor-ui.cjs +1 -0
  143. package/dist/element-editor-ui.es.js +102 -0
  144. package/dist/geometryWorker-CCwg4tNC.cjs +1 -0
  145. package/dist/geometryWorker-DgQCFSmD.js +25 -0
  146. package/dist/hooks/dragShield.d.cts +7 -0
  147. package/dist/hooks/dragShield.d.ts +7 -0
  148. package/dist/hooks/themeInputs.d.cts +14 -0
  149. package/dist/hooks/themeInputs.d.ts +14 -0
  150. package/dist/hooks/useAccentPalette.d.cts +15 -0
  151. package/dist/hooks/useAccentPalette.d.ts +15 -0
  152. package/dist/hooks/useAccentStyle.d.cts +39 -0
  153. package/dist/hooks/useAccentStyle.d.ts +39 -0
  154. package/dist/hooks/useAdapterControls.d.cts +280 -0
  155. package/dist/hooks/useAdapterControls.d.ts +280 -0
  156. package/dist/hooks/useBalancedWrap.d.cts +8 -0
  157. package/dist/hooks/useBalancedWrap.d.ts +8 -0
  158. package/dist/hooks/useContextMenu.d.cts +11 -0
  159. package/dist/hooks/useContextMenu.d.ts +11 -0
  160. package/dist/hooks/useDataChangeSubscription.d.cts +9 -0
  161. package/dist/hooks/useDataChangeSubscription.d.ts +9 -0
  162. package/dist/hooks/useDragWindow.d.cts +9 -0
  163. package/dist/hooks/useDragWindow.d.ts +9 -0
  164. package/dist/hooks/useFocusTrap.d.cts +7 -0
  165. package/dist/hooks/useFocusTrap.d.ts +7 -0
  166. package/dist/hooks/useGeoJSONDrop.d.cts +40 -0
  167. package/dist/hooks/useGeoJSONDrop.d.ts +40 -0
  168. package/dist/hooks/useGeoJSONExport.d.cts +69 -0
  169. package/dist/hooks/useGeoJSONExport.d.ts +69 -0
  170. package/dist/hooks/useGeoJSONFileImport.d.cts +24 -0
  171. package/dist/hooks/useGeoJSONFileImport.d.ts +24 -0
  172. package/dist/hooks/useInlineRename.d.cts +26 -0
  173. package/dist/hooks/useInlineRename.d.ts +26 -0
  174. package/dist/hooks/useJumpToFeature.d.cts +3 -0
  175. package/dist/hooks/useJumpToFeature.d.ts +3 -0
  176. package/dist/hooks/useKeyboardShortcuts.d.cts +9 -0
  177. package/dist/hooks/useKeyboardShortcuts.d.ts +9 -0
  178. package/dist/hooks/useNominatim.d.cts +24 -0
  179. package/dist/hooks/useNominatim.d.ts +24 -0
  180. package/dist/hooks/usePanelOffset.d.cts +14 -0
  181. package/dist/hooks/usePanelOffset.d.ts +14 -0
  182. package/dist/hooks/useResizablePanel.d.cts +4 -0
  183. package/dist/hooks/useResizablePanel.d.ts +4 -0
  184. package/dist/hooks/useRootTokens.d.cts +27 -0
  185. package/dist/hooks/useRootTokens.d.ts +27 -0
  186. package/dist/hooks/useSearchState.d.cts +23 -0
  187. package/dist/hooks/useSearchState.d.ts +23 -0
  188. package/dist/hooks/useServiceAttribution.d.cts +13 -0
  189. package/dist/hooks/useServiceAttribution.d.ts +13 -0
  190. package/dist/hooks/useWindowEscape.d.cts +25 -0
  191. package/dist/hooks/useWindowEscape.d.ts +25 -0
  192. package/dist/hooks/useWindowFocus.d.cts +4 -0
  193. package/dist/hooks/useWindowFocus.d.ts +4 -0
  194. package/dist/hooks/useWorkerGeometryPreview.d.cts +22 -0
  195. package/dist/hooks/useWorkerGeometryPreview.d.ts +22 -0
  196. package/dist/index-BKdDZ4Y9.cjs +1 -0
  197. package/dist/index-CtZterPc.js +3165 -0
  198. package/dist/index.d.cts +89 -0
  199. package/dist/index.d.ts +89 -0
  200. package/dist/internal.cjs +1 -0
  201. package/dist/internal.d.cts +16 -0
  202. package/dist/internal.d.ts +16 -0
  203. package/dist/internal.es.js +42 -0
  204. package/dist/primitives.cjs +1 -0
  205. package/dist/primitives.d.cts +19 -0
  206. package/dist/primitives.d.ts +19 -0
  207. package/dist/primitives.es.js +17 -0
  208. package/dist/store/StoreContext.d.cts +17 -0
  209. package/dist/store/StoreContext.d.ts +17 -0
  210. package/dist/types/events.d.cts +95 -0
  211. package/dist/types/events.d.ts +95 -0
  212. package/dist/useAccentStyle-CPo2XqAn.js +412 -0
  213. package/dist/useAccentStyle-hsGvyHZc.cjs +1 -0
  214. package/dist/useAdapterControls-BBObhzVX.cjs +1 -0
  215. package/dist/useAdapterControls-DVjkwRZ_.js +691 -0
  216. package/dist/useContextMenu-DJ2Cti85.js +10 -0
  217. package/dist/useContextMenu-DbxMvb1s.cjs +1 -0
  218. package/dist/useFocusTrap-BBjPCfDR.cjs +1 -0
  219. package/dist/useFocusTrap-CKxKT8De.js +25 -0
  220. package/dist/useJumpToFeature-Bdz2hqOC.js +16 -0
  221. package/dist/useJumpToFeature-LwjxGzfy.cjs +1 -0
  222. package/dist/useWindowFocus-D-_yEm_V.cjs +1 -0
  223. package/dist/useWindowFocus-DGAWA1au.js +80 -0
  224. package/dist/utils/booleanValue.d.cts +4 -0
  225. package/dist/utils/booleanValue.d.ts +4 -0
  226. package/dist/utils/clipboardError.d.cts +3 -0
  227. package/dist/utils/clipboardError.d.ts +3 -0
  228. package/dist/utils/download.d.cts +42 -0
  229. package/dist/utils/download.d.ts +42 -0
  230. package/dist/utils/geojsonDocument.d.cts +168 -0
  231. package/dist/utils/geojsonDocument.d.ts +168 -0
  232. package/dist/utils/geometryWorkerClient.d.cts +6 -0
  233. package/dist/utils/geometryWorkerClient.d.ts +6 -0
  234. package/dist/utils/layerOrder.d.cts +9 -0
  235. package/dist/utils/layerOrder.d.ts +9 -0
  236. package/dist/utils/lazyWithPreload.d.cts +24 -0
  237. package/dist/utils/lazyWithPreload.d.ts +24 -0
  238. package/dist/utils/lineSmooth.d.cts +7 -0
  239. package/dist/utils/lineSmooth.d.ts +7 -0
  240. package/dist/utils/platform.d.cts +2 -0
  241. package/dist/utils/platform.d.ts +2 -0
  242. package/dist/workers/geometryWorker.d.cts +1 -0
  243. package/dist/workers/geometryWorker.d.ts +1 -0
  244. package/package.json +133 -3
@@ -0,0 +1,208 @@
1
+ import { jsxs as d, jsx as t, Fragment as re } from "react/jsx-runtime";
2
+ import { e as oe, u as c, f as W, g as ne } from "./useAdapterControls-DVjkwRZ_.js";
3
+ import { s as ae, r as se, p as le, N as ie, D as ce, a as ue } from "./index-CtZterPc.js";
4
+ import { useState as i, useEffect as I, useRef as v, useCallback as H, Suspense as de, useLayoutEffect as me } from "react";
5
+ import { clsx as D } from "clsx";
6
+ import { Plus as fe, ArrowsInSimple as he, ArrowsOutSimple as pe, X as ge } from "@phosphor-icons/react";
7
+ import { useShallow as be } from "zustand/react/shallow";
8
+ import { sidebarTakesSpace as ye } from "@element-editor/core/internal";
9
+ import { u as xe } from "./useAccentStyle-CPo2XqAn.js";
10
+ import { f as L, B as ve } from "./EditToolbarBtn-SZIsnIn3.js";
11
+ const we = 160, Se = 80;
12
+ try {
13
+ CSS.registerProperty({ name: "--elm-table-offset", syntax: "<length>", inherits: !0, initialValue: "0px" });
14
+ } catch {
15
+ }
16
+ const U = "px-2.5 py-1 rounded-elm-control text-xs font-medium bg-elm-surface text-elm-text ring-1 ring-primary-400 outline-none";
17
+ function Ce({
18
+ initialValue: n,
19
+ onCommit: m,
20
+ onCancel: w
21
+ }) {
22
+ const [r, f] = i(n), x = v(null), [h, S] = i(void 0);
23
+ return me(() => {
24
+ const o = x.current;
25
+ o && S(o.offsetWidth + 4);
26
+ }, [r]), /* @__PURE__ */ d(re, { children: [
27
+ /* @__PURE__ */ t(
28
+ "span",
29
+ {
30
+ ref: x,
31
+ "aria-hidden": !0,
32
+ className: `${U} absolute invisible pointer-events-none whitespace-pre left-[-9999px] top-[-9999px]`,
33
+ children: r || " "
34
+ }
35
+ ),
36
+ /* @__PURE__ */ t(
37
+ "input",
38
+ {
39
+ autoFocus: !0,
40
+ value: r,
41
+ onFocus: (o) => o.currentTarget.select(),
42
+ onChange: (o) => f(o.target.value),
43
+ onBlur: () => m(r.trim()),
44
+ onKeyDown: (o) => {
45
+ o.key === "Enter" && o.currentTarget.blur(), o.key === "Escape" && (w(), o.preventDefault());
46
+ },
47
+ style: { width: h },
48
+ className: U
49
+ }
50
+ )
51
+ ] });
52
+ }
53
+ const _ = `flex ${ue.replace("hover:bg-(--elm-surface-hover,var(--color-gray-100))", "hover:bg-(--elm-surface-hover,var(--color-gray-200))")}`;
54
+ function Ae({ embedded: n = !1 } = {}) {
55
+ const { dataStore: m } = oe(), w = xe(), r = c((e) => e.tableOpen), f = c((e) => e.readonly), x = c((e) => e.toggleTable), h = c((e) => e.setTableFullscreen), S = c(ye), o = c((e) => e.sidebarWidth), O = c((e) => e.codeDockWidth), j = w.ui.layerList && S, C = W((e) => e.features.length), E = W(be((e) => e.getVisibleSchemas())), { getCenter: k } = ne(), [p, G] = i(() => typeof window > "u" ? 360 : Math.round(window.innerHeight * 0.42)), [g, X] = i("all"), [s, q] = i(!1);
56
+ I(() => (h(s), () => h(!1)), [s, h]);
57
+ const [K, P] = i(null), [N, Y] = i(/* @__PURE__ */ new Set()), [J, T] = i(null), R = v(!1);
58
+ (r || n) && (R.current = !0);
59
+ const [z, A] = i(!r);
60
+ I(() => {
61
+ if (r) {
62
+ A(!1);
63
+ return;
64
+ }
65
+ const e = setTimeout(() => A(!0), 200);
66
+ return () => clearTimeout(e);
67
+ }, [r]);
68
+ const u = v(null), Q = H((e) => {
69
+ e.button === 0 && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), u.current = ae("row-resize", e.currentTarget));
70
+ }, []), Z = H((e) => {
71
+ if (!u.current) return;
72
+ const l = Math.round(window.innerHeight * Se / 100), a = Math.min(l, Math.max(we, window.innerHeight - e.clientY));
73
+ G(a);
74
+ }, []), M = H(() => {
75
+ var e;
76
+ (e = u.current) == null || e.call(u), u.current = null;
77
+ }, []), B = v(null);
78
+ I(() => {
79
+ var a;
80
+ if (n) return;
81
+ const e = (a = B.current) == null ? void 0 : a.closest("[data-elm-theme]");
82
+ if (!e) return;
83
+ const l = r ? s ? e.clientHeight : p : 0;
84
+ return e.style.setProperty("--elm-table-offset", `${l}px`), e.style.transition || requestAnimationFrame(() => {
85
+ e.style.transition = "--elm-table-offset 200ms ease";
86
+ }), () => {
87
+ e.style.setProperty("--elm-table-offset", "0px");
88
+ };
89
+ }, [n, r, s, p]);
90
+ const ee = n ? "absolute inset-0 bg-elm-surface flex flex-col" : D(
91
+ // `right` follows the layers panel / docked inspector, which animate
92
+ // `right` with the same 200 ms `ease`: same mechanism + same curve =
93
+ // edges stay together every frame (a compositor transform or another
94
+ // easing on either side drifts and opens a gap).
95
+ // Show/hide: `bottom` rides the (transitioned) --elm-table-offset, so
96
+ // the table slides with everything stacked on it. min() keeps it put
97
+ // while the offset comes back down from fullscreen height.
98
+ "absolute left-0 z-20 bg-elm-surface border-t border-elm-border/80 flex flex-col transition-[right] duration-200 ease-[ease]",
99
+ // Closed, the panel waits just below the editor's bottom edge. Hidden once the slide-out
100
+ // is over, so a host container that doesn't clip its overflow never shows it.
101
+ !r && z && "invisible"
102
+ ), te = n ? void 0 : s ? { top: 0, bottom: 0, right: 0, height: "100%" } : {
103
+ height: p,
104
+ bottom: `calc(min(var(--elm-table-offset, 0px), ${p}px) - ${p}px)`,
105
+ right: (j ? o : 0) + O
106
+ };
107
+ return /* @__PURE__ */ d("div", { ref: B, className: ee, style: te, children: [
108
+ !n && !s && /* @__PURE__ */ t(
109
+ "div",
110
+ {
111
+ className: se,
112
+ onPointerDown: Q,
113
+ onPointerMove: Z,
114
+ onPointerUp: M,
115
+ onLostPointerCapture: M
116
+ }
117
+ ),
118
+ /* @__PURE__ */ d("div", { className: `${le} gap-3 px-4`, children: [
119
+ !f && /* @__PURE__ */ t(L, { content: "Add new entry", children: /* @__PURE__ */ d(
120
+ ve,
121
+ {
122
+ variant: "primary",
123
+ size: "sm",
124
+ onClick: () => {
125
+ const e = (k == null ? void 0 : k()) ?? [0, 0], { schemas: l, getDefaultSchema: a } = m.getState(), F = g !== "all" && l.find((y) => y.id === g) ? g : a().id, b = l.find((y) => y.id === F) ?? a(), $ = {};
126
+ for (const y of b.fields) $[y.key] = "";
127
+ const V = crypto.randomUUID();
128
+ m.getState().addFeature({
129
+ type: "Feature",
130
+ id: V,
131
+ schemaId: F,
132
+ geometry: { type: "Point", coordinates: e },
133
+ properties: $
134
+ }) && P(V);
135
+ },
136
+ children: [
137
+ /* @__PURE__ */ t(fe, { size: 11, weight: "bold" }),
138
+ "Add new"
139
+ ]
140
+ }
141
+ ) }),
142
+ /* @__PURE__ */ d("span", { className: "text-xs text-elm-text-muted", children: [
143
+ C,
144
+ " feature",
145
+ C !== 1 ? "s" : "",
146
+ N.size > 0 && `, ${N.size} selected`
147
+ ] }),
148
+ E.length > 1 && /* @__PURE__ */ t("div", { role: "tablist", "aria-label": "Filter by schema", className: "ml-1 flex items-center gap-0.5 text-xs", children: [{ id: "all", name: "All" }, ...E].map((e) => {
149
+ const l = g === e.id, a = e.id === "all";
150
+ return J === e.id ? /* @__PURE__ */ t(
151
+ Ce,
152
+ {
153
+ initialValue: e.name,
154
+ onCommit: (b) => {
155
+ b && b !== e.name && m.getState().updateSchema(e.id, { name: b }), T(null);
156
+ },
157
+ onCancel: () => T(null)
158
+ },
159
+ e.id
160
+ ) : /* @__PURE__ */ t(
161
+ "button",
162
+ {
163
+ type: "button",
164
+ role: "tab",
165
+ "aria-selected": l,
166
+ onClick: () => X(e.id),
167
+ onDoubleClick: () => {
168
+ !a && !f && T(e.id);
169
+ },
170
+ title: a || f ? void 0 : "Double-click to rename",
171
+ className: D(
172
+ "px-2.5 py-1 rounded-elm-control transition-colors whitespace-nowrap",
173
+ l ? "bg-elm-surface hover:bg-(--elm-surface-hover,var(--color-gray-50)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-800)) text-elm-text font-medium shadow-sm ring-1 ring-(--elm-border,var(--color-gray-200)) dark:ring-(--elm-border,var(--color-gray-700))" : "text-(--elm-text-secondary,var(--color-gray-600)) dark:text-(--elm-text-secondary,var(--color-gray-300)) hover:bg-(--elm-surface-hover,var(--color-gray-200)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700))"
174
+ ),
175
+ children: e.name
176
+ },
177
+ e.id
178
+ );
179
+ }) }),
180
+ !n && /* @__PURE__ */ d("div", { className: "ml-auto flex items-center gap-1", children: [
181
+ /* @__PURE__ */ t(L, { content: s ? "Exit fullscreen" : "Fullscreen", children: /* @__PURE__ */ t(
182
+ "button",
183
+ {
184
+ type: "button",
185
+ onClick: () => q((e) => !e),
186
+ "aria-label": s ? "Exit fullscreen" : "Fullscreen",
187
+ className: _,
188
+ children: s ? /* @__PURE__ */ t(he, { size: 16 }) : /* @__PURE__ */ t(pe, { size: 16 })
189
+ }
190
+ ) }),
191
+ /* @__PURE__ */ t("button", { type: "button", onClick: x, "aria-label": "Close data table", className: _, children: /* @__PURE__ */ t(ge, { size: 16 }) })
192
+ ] })
193
+ ] }),
194
+ /* @__PURE__ */ t("div", { className: D("flex-1 min-h-0 overflow-hidden", !n && !r && z && "hidden"), children: C === 0 ? /* @__PURE__ */ t(ie, {}) : R.current && /* @__PURE__ */ t(de, { fallback: /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center text-sm text-(--elm-text-subtle,var(--color-gray-400))", children: "Loading grid..." }), children: /* @__PURE__ */ t(
195
+ ce,
196
+ {
197
+ schemaFilter: g,
198
+ focusRowId: K,
199
+ onFocusRowHandled: () => P(null),
200
+ selectedRows: N,
201
+ onSelectedRowsChange: Y
202
+ }
203
+ ) }) })
204
+ ] });
205
+ }
206
+ export {
207
+ Ae as default
208
+ };
@@ -0,0 +1,378 @@
1
+ import { jsxs as f, Fragment as j, jsx as e } from "react/jsx-runtime";
2
+ import { useRef as M, useState as E, useLayoutEffect as $, useEffect as K, forwardRef as W, useImperativeHandle as V } from "react";
3
+ import { createPortal as U } from "react-dom";
4
+ import { clsx as T } from "clsx";
5
+ import { e as F, u as G } from "./useAccentStyle-CPo2XqAn.js";
6
+ import { CaretDown as q, ArrowUpRight as I, Plus as X, Polygon as J } from "@phosphor-icons/react";
7
+ const O = "data-elm-context-menu";
8
+ function me() {
9
+ return document.querySelector(`[${O}]`) !== null;
10
+ }
11
+ function ue({ x: t, y: o, items: n, onClose: s }) {
12
+ const i = M(null), [h, x] = E({ left: t, top: o }), a = M(null), [v, l] = E(!1), y = F();
13
+ return $(() => {
14
+ var r, u;
15
+ l(((u = (r = a.current) == null ? void 0 : r.closest("[data-elm-theme]")) == null ? void 0 : u.getAttribute("data-elm-theme")) === "dark");
16
+ }, []), $(() => {
17
+ const r = i.current;
18
+ if (!r) return;
19
+ const { width: u, height: p } = r.getBoundingClientRect();
20
+ x({
21
+ left: t + u > window.innerWidth ? t - u : t,
22
+ top: o + p > window.innerHeight ? o - p : o
23
+ });
24
+ }, [t, o]), K(() => {
25
+ function r(p) {
26
+ i.current && !i.current.contains(p.target) && s();
27
+ }
28
+ function u(p) {
29
+ p.key === "Escape" && (p.stopImmediatePropagation(), p.preventDefault(), s());
30
+ }
31
+ return document.addEventListener("mousedown", r), document.addEventListener("keydown", u, { capture: !0 }), () => {
32
+ document.removeEventListener("mousedown", r), document.removeEventListener("keydown", u, { capture: !0 });
33
+ };
34
+ }, [s]), /* @__PURE__ */ f(j, { children: [
35
+ /* @__PURE__ */ e("span", { ref: a, hidden: !0 }),
36
+ U(
37
+ /* @__PURE__ */ e(
38
+ "div",
39
+ {
40
+ ref: i,
41
+ "data-elm-portal": !0,
42
+ "data-elm-theme": v ? "dark" : "light",
43
+ onMouseDown: (r) => r.stopPropagation(),
44
+ [O]: "",
45
+ style: { ...y, position: "fixed", left: h.left, top: h.top, zIndex: 9999 },
46
+ className: T(
47
+ "elm-kbd-on-surface bg-elm-surface/95 backdrop-blur-md text-(--elm-text-secondary,var(--color-gray-700)) dark:text-(--elm-text-secondary,var(--color-gray-200)) rounded-elm shadow-elm py-1.5 min-w-[180px] border border-elm-border/80 select-none",
48
+ !v && "elm-tooltip-light"
49
+ ),
50
+ children: n.map(
51
+ (r, u) => "separator" in r ? /* @__PURE__ */ e("div", { className: "my-1.5 border-t border-elm-border" }, u) : /* @__PURE__ */ f(
52
+ "button",
53
+ {
54
+ onClick: (p) => {
55
+ p.stopPropagation(), r.onClick(), s();
56
+ },
57
+ disabled: r.disabled,
58
+ className: T(
59
+ // No colour transition: moving down the list should feel instant.
60
+ "w-full text-left px-3 py-2 text-sm flex items-center gap-2.5",
61
+ r.disabled ? "opacity-40 cursor-not-allowed" : "hover:bg-elm-surface-hover hover:text-(--elm-text,var(--color-gray-900)) dark:hover:text-(--elm-text,var(--color-gray-50))"
62
+ ),
63
+ children: [
64
+ r.icon && /* @__PURE__ */ e("span", { className: "flex-shrink-0 opacity-70", children: r.icon }),
65
+ /* @__PURE__ */ e("span", { className: "flex-1 truncate", children: r.label }),
66
+ r.shortcut && /* @__PURE__ */ e("span", { className: "flex-shrink-0 ml-4 opacity-80", children: r.shortcut })
67
+ ]
68
+ },
69
+ u
70
+ )
71
+ )
72
+ }
73
+ ),
74
+ document.body
75
+ )
76
+ ] });
77
+ }
78
+ const L = "w-full h-9 px-2.5 py-1.5 text-sm border rounded-elm-control focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-elm-surface-raised text-(--elm-text,var(--color-gray-900)) dark:text-(--elm-text,var(--color-gray-100)) placeholder:text-(--elm-text-subtle,var(--color-gray-400)) dark:placeholder:text-(--elm-text-subtle,var(--color-gray-600))";
79
+ function be({ error: t, className: o, ...n }) {
80
+ return /* @__PURE__ */ e(
81
+ "input",
82
+ {
83
+ autoComplete: "off",
84
+ className: T(L, t ? "border-rose-400" : "border-(--elm-border-strong,var(--color-gray-300))", o),
85
+ ...n
86
+ }
87
+ );
88
+ }
89
+ function he({ error: t, className: o, ...n }) {
90
+ return /* @__PURE__ */ e(
91
+ "textarea",
92
+ {
93
+ autoComplete: "off",
94
+ className: T(L, "resize-none h-auto", t ? "border-rose-400" : "border-(--elm-border-strong,var(--color-gray-300))", o),
95
+ ...n
96
+ }
97
+ );
98
+ }
99
+ function pe({ error: t, className: o, children: n, ...s }) {
100
+ return (
101
+ // Native arrow is hidden (appearance-none) — it can't be padded reliably
102
+ // and sits flush against the right border. Draw our own caret with the
103
+ // same right inset as the left text padding.
104
+ /* @__PURE__ */ f("div", { className: "relative w-full", children: [
105
+ /* @__PURE__ */ e(
106
+ "select",
107
+ {
108
+ className: T(L, "appearance-none pr-8", t ? "border-rose-400" : "border-(--elm-border-strong,var(--color-gray-300))", o),
109
+ ...s,
110
+ children: n
111
+ }
112
+ ),
113
+ /* @__PURE__ */ e(q, { size: 14, "aria-hidden": !0, className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-elm-text-muted" })
114
+ ] })
115
+ );
116
+ }
117
+ const Q = {
118
+ primary: "bg-primary-500 text-white hover:bg-primary-600 disabled:hover:bg-primary-500",
119
+ secondary: "bg-elm-surface-hover text-elm-text-secondary hover:bg-(--elm-surface-hover,var(--color-gray-200)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700)) disabled:hover:bg-elm-surface-hover",
120
+ ghost: "text-elm-text-muted hover:bg-elm-surface-hover hover:text-(--elm-text-secondary,var(--color-gray-700)) dark:hover:text-(--elm-text-secondary,var(--color-gray-300)) disabled:hover:bg-transparent",
121
+ success: "bg-green-500 text-white hover:bg-green-600 disabled:hover:bg-green-500",
122
+ emerald: "bg-emerald-500 text-white hover:bg-emerald-600 disabled:hover:bg-emerald-500",
123
+ warning: "bg-amber-500 text-white hover:bg-amber-600 disabled:hover:bg-amber-500",
124
+ dashed: "text-primary-500 hover:text-primary-700 hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-black)_5%,transparent)) dark:hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-white)_5%,transparent)) disabled:hover:bg-transparent border border-dashed border-primary-300 hover:border-primary-500 dark:text-primary-400 dark:border-primary-700 dark:hover:border-primary-500"
125
+ }, Y = {
126
+ sm: "px-2 py-1 text-xs rounded-elm-card",
127
+ md: "px-3 py-1.5 text-sm rounded-elm-control",
128
+ icon: "w-7 h-7 rounded-elm-card",
129
+ "icon-sm": "w-6 h-6 rounded-elm-chip"
130
+ }, Z = W(({ variant: t = "secondary", size: o = "md", className: n, children: s, ...i }, h) => /* @__PURE__ */ e(
131
+ "button",
132
+ {
133
+ ref: h,
134
+ className: T(
135
+ "transition-colors flex items-center justify-center gap-1.5",
136
+ "active:scale-[0.95] disabled:opacity-40 disabled:cursor-not-allowed disabled:active:scale-100",
137
+ Q[t],
138
+ Y[o],
139
+ n
140
+ ),
141
+ ...i,
142
+ children: s
143
+ }
144
+ ));
145
+ Z.displayName = "Button";
146
+ function fe({ children: t }) {
147
+ return /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 text-[11px] font-medium font-elm rounded-elm-chip border border-elm-border-strong bg-(--elm-surface-hover,var(--color-gray-100)) dark:bg-(--elm-surface-hover,var(--color-gray-700)) text-elm-text-muted shadow-[0_1px_0_0_rgba(0,0,0,0.15)] dark:shadow-[0_1px_0_0_rgba(0,0,0,0.4)]", children: t });
148
+ }
149
+ function H({ children: t }) {
150
+ return /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-[1.25rem] h-4 px-1 text-[10px] font-medium font-elm rounded-elm-chip border border-(--_elm-kbd-border,var(--color-neutral-600)) bg-(--_elm-kbd-bg,var(--color-neutral-700)) text-(--_elm-kbd-text,var(--color-neutral-300)) in-[.elm-tooltip-light]:border-(--_elm-kbd-border,var(--color-neutral-300)) in-[.elm-tooltip-light]:bg-(--_elm-kbd-bg,var(--color-neutral-100)) in-[.elm-tooltip-light]:text-(--_elm-kbd-text,var(--color-neutral-600)) in-[.elm-tooltip-light]:shadow-[0_1px_0_0_rgba(0,0,0,0.12)] shadow-[0_1px_0_0_rgba(0,0,0,0.3)] leading-none", children: t });
151
+ }
152
+ function ge({ children: t }) {
153
+ return /* @__PURE__ */ e("kbd", { className: "inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 text-[11px] font-medium font-elm rounded-elm-chip border border-primary-400 bg-primary-500 text-primary-100 shadow-[0_1px_0_0_rgba(0,0,0,0.2)]", children: t });
154
+ }
155
+ const w = 8, k = 8;
156
+ function ee(t) {
157
+ return t === "top" ? "bottom" : t === "bottom" ? "top" : t === "left" ? "right" : "left";
158
+ }
159
+ function A({ content: t, shortcut: o, side: n = "top", multiline: s = !1, children: i }) {
160
+ const [h, x] = E(!1), [a, v] = E(null), [l, y] = E(null), [r, u] = E(!1), p = F(), _ = M(null), c = M(null), b = M(null);
161
+ K(() => () => {
162
+ b.current && clearTimeout(b.current);
163
+ }, []), $(() => {
164
+ if (!h || !c.current || !a) return;
165
+ const { width: m, height: g } = c.current.getBoundingClientRect(), d = window.innerWidth, R = window.innerHeight, P = (S) => S === "top" ? a.top - w - g >= k : S === "bottom" ? a.bottom + w + g <= R - k : S === "left" ? a.left - w - m >= k : a.right + w + m <= d - k, z = (() => {
166
+ const S = n === "top" || n === "bottom" ? ["right", "left"] : ["bottom", "top"];
167
+ return [n, ee(n), ...S];
168
+ })().find(P) ?? n;
169
+ let N = 0, C = 0;
170
+ z === "top" ? (N = a.cx - m / 2, C = a.top - w - g) : z === "bottom" ? (N = a.cx - m / 2, C = a.bottom + w) : z === "left" ? (N = a.left - w - m, C = a.cy - g / 2) : (N = a.right + w, C = a.cy - g / 2), N = Math.max(k, Math.min(N, d - m - k)), C = Math.max(k, Math.min(C, R - g - k)), y({ left: Math.round(N), top: Math.round(C) });
171
+ }, [h, a, n]);
172
+ function B() {
173
+ b.current = setTimeout(() => {
174
+ var g, d, R, P;
175
+ const m = (d = ((g = _.current) == null ? void 0 : g.firstElementChild) ?? _.current) == null ? void 0 : d.getBoundingClientRect();
176
+ m && (y(null), v({
177
+ left: m.left,
178
+ top: m.top,
179
+ right: m.right,
180
+ bottom: m.bottom,
181
+ cx: Math.round(m.left + m.width / 2),
182
+ cy: Math.round(m.top + m.height / 2)
183
+ }), u(((P = (R = _.current) == null ? void 0 : R.closest("[data-elm-theme]")) == null ? void 0 : P.getAttribute("data-elm-theme")) === "dark"), x(!0));
184
+ }, 0);
185
+ }
186
+ function D() {
187
+ b.current && clearTimeout(b.current), x(!1);
188
+ }
189
+ return /* @__PURE__ */ f("div", { ref: _, onMouseEnter: B, onMouseLeave: D, className: "contents", children: [
190
+ i,
191
+ h && U(
192
+ /* @__PURE__ */ e(
193
+ "div",
194
+ {
195
+ ref: c,
196
+ "data-elm-portal": !0,
197
+ "data-elm-theme": r ? "dark" : "light",
198
+ className: "fixed z-[9999] pointer-events-none",
199
+ style: {
200
+ ...p,
201
+ left: (l == null ? void 0 : l.left) ?? 0,
202
+ top: (l == null ? void 0 : l.top) ?? 0,
203
+ visibility: l ? void 0 : "hidden",
204
+ // Match the Mantine "pop" tooltip transition exactly: 100ms ease,
205
+ // scale(0.9) → scale(1), opacity 0 → 1, center origin, no slide.
206
+ animation: l ? "tooltip-in 100ms ease" : void 0
207
+ },
208
+ children: /* @__PURE__ */ f("div", { className: `flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-elm-card shadow-elm backdrop-blur-sm ${s ? "max-w-64 whitespace-normal leading-snug" : "whitespace-nowrap"} bg-elm-tooltip/95 text-elm-tooltip-text elm-kbd-on-tooltip ${r ? "elm-tooltip-light" : ""}`, children: [
209
+ /* @__PURE__ */ e("span", { children: t }),
210
+ o && /* @__PURE__ */ e("span", { className: "flex items-center gap-0.5 opacity-60", children: o })
211
+ ] })
212
+ }
213
+ ),
214
+ document.body
215
+ )
216
+ ] });
217
+ }
218
+ function te(t) {
219
+ return t.split(",").map((i) => i.trim()).filter(Boolean).slice(1).filter((i) => !/^\d+$/.test(i)).slice(-2).join(", ");
220
+ }
221
+ const xe = W(function({ results: o, loading: n, error: s, onGo: i, onAdd: h, onAddShape: x, activeIndex: a = -1, onHoverIndex: v, onNavigate: l, className: y, layout: r = "stack" }, u) {
222
+ const p = M([]), _ = M([]);
223
+ return V(u, () => ({
224
+ focusAdd(c) {
225
+ var b;
226
+ (b = _.current[c]) == null || b.focus();
227
+ }
228
+ })), K(() => {
229
+ var c;
230
+ a >= 0 && ((c = p.current[a]) == null || c.scrollIntoView({ block: "nearest" }));
231
+ }, [a]), /* @__PURE__ */ f("div", { className: y, children: [
232
+ s && /* @__PURE__ */ e("p", { className: "px-3 py-2.5 text-sm text-rose-500", children: s }),
233
+ !s && n && o.length === 0 && /* @__PURE__ */ e("p", { className: "px-3 py-2.5 text-sm text-(--elm-text-subtle,var(--color-gray-400))", children: "Searching…" }),
234
+ !s && !n && o.length === 0 && /* @__PURE__ */ e("p", { className: "px-3 py-2.5 text-sm text-(--elm-text-subtle,var(--color-gray-400))", children: "No results found" }),
235
+ !s && o.map((c, b) => {
236
+ const B = c.geojson && c.geojson.type !== "Point", D = /* @__PURE__ */ f(j, { children: [
237
+ /* @__PURE__ */ e(A, { content: "Fly to location", children: /* @__PURE__ */ f("button", { onClick: (d) => {
238
+ d.stopPropagation(), i(c);
239
+ }, className: "flex-shrink-0 px-2 py-1 text-xs text-elm-text-muted hover:bg-(--elm-surface-hover,var(--color-gray-200)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700)) dark:hover:text-(--elm-text-secondary,var(--color-gray-300)) rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface", children: [
240
+ /* @__PURE__ */ e(I, { size: 12 }),
241
+ " Go"
242
+ ] }) }),
243
+ h && /* @__PURE__ */ e(A, { content: "Add as point", children: /* @__PURE__ */ f(
244
+ "button",
245
+ {
246
+ ref: (d) => {
247
+ _.current[b] = d;
248
+ },
249
+ onClick: (d) => {
250
+ d.stopPropagation(), h(c);
251
+ },
252
+ className: "flex-shrink-0 px-2 py-1 text-xs bg-primary-500 text-white hover:bg-primary-600 rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-300 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface",
253
+ children: [
254
+ /* @__PURE__ */ e(X, { size: 12 }),
255
+ " Add"
256
+ ]
257
+ }
258
+ ) }),
259
+ B && x && /* @__PURE__ */ e(A, { content: "Add as boundary shape", children: /* @__PURE__ */ f("button", { onClick: (d) => {
260
+ d.stopPropagation(), x(c);
261
+ }, className: "flex-shrink-0 px-2 py-1 text-xs bg-emerald-500 text-white hover:bg-emerald-600 rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-300 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface", children: [
262
+ /* @__PURE__ */ e(J, { size: 12 }),
263
+ " Shape"
264
+ ] }) })
265
+ ] }), m = /* @__PURE__ */ f("div", { className: "flex items-center gap-1.5 min-w-0", children: [
266
+ /* @__PURE__ */ e("span", { className: "text-sm text-(--elm-text,var(--color-gray-800)) dark:text-(--elm-text,var(--color-gray-200)) font-medium truncate", children: c.display_name.split(",")[0] }),
267
+ c.addresstype && /* @__PURE__ */ e("span", { className: "flex-shrink-0 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-elm-surface-hover text-elm-text-muted capitalize", children: c.addresstype.replace(/_/g, " ") })
268
+ ] }), g = /* @__PURE__ */ e("span", { className: "block text-xs text-elm-text-subtle mt-0.5 truncate", children: te(c.display_name) });
269
+ return /* @__PURE__ */ e(
270
+ "div",
271
+ {
272
+ ref: (d) => {
273
+ p.current[b] = d;
274
+ },
275
+ onClick: () => i(c),
276
+ onMouseEnter: () => v == null ? void 0 : v(b),
277
+ onKeyDown: (d) => {
278
+ d.key === "ArrowDown" ? (d.preventDefault(), l == null || l(1, b)) : d.key === "ArrowUp" && (d.preventDefault(), l == null || l(-1, b));
279
+ },
280
+ className: r === "row" ? `flex items-center gap-2 px-3 py-2 border-b border-elm-border-subtle last:border-b-0 transition-colors cursor-pointer ${b === a ? "bg-primary-50 dark:bg-white/5" : ""}` : `flex flex-col gap-1.5 px-3 py-2 border-b border-elm-border-subtle last:border-b-0 transition-colors cursor-pointer ${b === a ? "bg-primary-50 dark:bg-white/5" : ""}`,
281
+ children: r === "row" ? /* @__PURE__ */ f(j, { children: [
282
+ /* @__PURE__ */ f("div", { className: "flex-1 min-w-0", children: [
283
+ m,
284
+ g
285
+ ] }),
286
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1 flex-shrink-0", children: D })
287
+ ] }) : /* @__PURE__ */ f(j, { children: [
288
+ /* @__PURE__ */ f("div", { className: "min-w-0", children: [
289
+ m,
290
+ g
291
+ ] }),
292
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-1 justify-start", children: D })
293
+ ] })
294
+ },
295
+ c.place_id
296
+ );
297
+ })
298
+ ] });
299
+ }), re = {
300
+ blue: "bg-primary-500 hover:bg-primary-600 disabled:hover:bg-primary-500 text-white shadow-sm",
301
+ emerald: "bg-emerald-500 hover:bg-emerald-600 disabled:hover:bg-emerald-500 text-white shadow-sm",
302
+ amber: "bg-amber-500 hover:bg-amber-600 disabled:hover:bg-amber-500 text-white shadow-sm",
303
+ violet: "bg-violet-500 hover:bg-violet-600 disabled:hover:bg-violet-500 text-white shadow-sm"
304
+ };
305
+ function oe(t, o) {
306
+ return o === "vertical" ? t.endsWith("-right") || t.startsWith("right") ? "left" : "right" : t.startsWith("bottom") ? "top" : "bottom";
307
+ }
308
+ function ve({ active: t, onClick: o, label: n, shortcut: s, shortcutId: i, color: h = "blue", tooltipSide: x, disabled: a, children: v }) {
309
+ const l = G(), y = l.ui.keyboardShortcuts.enabled && s, r = x ?? oe(l.toolbar.position, l.toolbar.direction);
310
+ return /* @__PURE__ */ e(A, { content: n, shortcut: y && /* @__PURE__ */ e(H, { children: s }), side: r, children: /* @__PURE__ */ e(
311
+ "button",
312
+ {
313
+ "aria-label": n,
314
+ "data-elm-shortcut": i,
315
+ onClick: (u) => {
316
+ o(), u.currentTarget.blur();
317
+ },
318
+ disabled: a,
319
+ className: T(
320
+ "p-1 text-sm rounded-elm-control flex items-center justify-center active:scale-[0.95] disabled:cursor-not-allowed disabled:text-elm-text-disabled disabled:active:scale-100",
321
+ t ? re[h] : "text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent"
322
+ ),
323
+ children: v
324
+ }
325
+ ) });
326
+ }
327
+ function ye({ vertical: t } = {}) {
328
+ return t ? /* @__PURE__ */ e("div", { className: "h-px w-5 bg-elm-border my-0.5 flex-shrink-0" }) : /* @__PURE__ */ e("div", { className: "w-px h-5 bg-elm-border mx-1 flex-shrink-0" });
329
+ }
330
+ function we({
331
+ label: t,
332
+ shortcut: o,
333
+ shortcutId: n,
334
+ onClick: s,
335
+ active: i,
336
+ disabled: h,
337
+ tooltipSide: x = "top",
338
+ children: a
339
+ }) {
340
+ const l = G().ui.keyboardShortcuts.enabled ? o : void 0;
341
+ return /* @__PURE__ */ e(A, { content: t, shortcut: l, side: x, children: /* @__PURE__ */ e(
342
+ "button",
343
+ {
344
+ "aria-label": t,
345
+ "aria-pressed": i,
346
+ "data-elm-shortcut": n,
347
+ onClick: (y) => {
348
+ s(), y.currentTarget.blur();
349
+ },
350
+ disabled: h,
351
+ className: `p-1 rounded-elm-control flex items-center justify-center text-sm
352
+ active:scale-[0.95] disabled:cursor-not-allowed disabled:text-elm-text-disabled disabled:active:scale-100
353
+ ${i ? "bg-primary-50 dark:bg-white/10 hover:bg-primary-100 dark:hover:bg-white/15 disabled:hover:bg-primary-50 dark:disabled:hover:bg-white/10 text-primary-600 dark:text-primary-400" : "text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent"}`,
354
+ children: a
355
+ }
356
+ ) });
357
+ }
358
+ function ke() {
359
+ return /* @__PURE__ */ e("div", { className: "w-px h-5 bg-elm-border mx-0.5 flex-shrink-0" });
360
+ }
361
+ export {
362
+ Z as B,
363
+ ue as C,
364
+ we as E,
365
+ be as I,
366
+ fe as K,
367
+ xe as S,
368
+ he as T,
369
+ H as a,
370
+ ge as b,
371
+ pe as c,
372
+ ve as d,
373
+ ke as e,
374
+ A as f,
375
+ ye as g,
376
+ O as h,
377
+ me as i
378
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("react"),L=require("react-dom"),R=require("clsx"),D=require("./useAccentStyle-hsGvyHZc.cjs"),A=require("@phosphor-icons/react"),K="data-elm-context-menu";function F(){return document.querySelector(`[${K}]`)!==null}function W({x:t,y:o,items:n,onClose:a}){const c=i.useRef(null),[x,g]=i.useState({left:t,top:o}),s=i.useRef(null),[v,l]=i.useState(!1),y=D.useAccentStyle();return i.useLayoutEffect(()=>{var r,b;l(((b=(r=s.current)==null?void 0:r.closest("[data-elm-theme]"))==null?void 0:b.getAttribute("data-elm-theme"))==="dark")},[]),i.useLayoutEffect(()=>{const r=c.current;if(!r)return;const{width:b,height:p}=r.getBoundingClientRect();g({left:t+b>window.innerWidth?t-b:t,top:o+p>window.innerHeight?o-p:o})},[t,o]),i.useEffect(()=>{function r(p){c.current&&!c.current.contains(p.target)&&a()}function b(p){p.key==="Escape"&&(p.stopImmediatePropagation(),p.preventDefault(),a())}return document.addEventListener("mousedown",r),document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("keydown",b,{capture:!0})}},[a]),e.jsxs(e.Fragment,{children:[e.jsx("span",{ref:s,hidden:!0}),L.createPortal(e.jsx("div",{ref:c,"data-elm-portal":!0,"data-elm-theme":v?"dark":"light",onMouseDown:r=>r.stopPropagation(),[K]:"",style:{...y,position:"fixed",left:x.left,top:x.top,zIndex:9999},className:R.clsx("elm-kbd-on-surface bg-elm-surface/95 backdrop-blur-md text-(--elm-text-secondary,var(--color-gray-700)) dark:text-(--elm-text-secondary,var(--color-gray-200)) rounded-elm shadow-elm py-1.5 min-w-[180px] border border-elm-border/80 select-none",!v&&"elm-tooltip-light"),children:n.map((r,b)=>"separator"in r?e.jsx("div",{className:"my-1.5 border-t border-elm-border"},b):e.jsxs("button",{onClick:p=>{p.stopPropagation(),r.onClick(),a()},disabled:r.disabled,className:R.clsx("w-full text-left px-3 py-2 text-sm flex items-center gap-2.5",r.disabled?"opacity-40 cursor-not-allowed":"hover:bg-elm-surface-hover hover:text-(--elm-text,var(--color-gray-900)) dark:hover:text-(--elm-text,var(--color-gray-50))"),children:[r.icon&&e.jsx("span",{className:"flex-shrink-0 opacity-70",children:r.icon}),e.jsx("span",{className:"flex-1 truncate",children:r.label}),r.shortcut&&e.jsx("span",{className:"flex-shrink-0 ml-4 opacity-80",children:r.shortcut})]},b))}),document.body)]})}const z="w-full h-9 px-2.5 py-1.5 text-sm border rounded-elm-control focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-elm-surface-raised text-(--elm-text,var(--color-gray-900)) dark:text-(--elm-text,var(--color-gray-100)) placeholder:text-(--elm-text-subtle,var(--color-gray-400)) dark:placeholder:text-(--elm-text-subtle,var(--color-gray-600))";function O({error:t,className:o,...n}){return e.jsx("input",{autoComplete:"off",className:R.clsx(z,t?"border-rose-400":"border-(--elm-border-strong,var(--color-gray-300))",o),...n})}function U({error:t,className:o,...n}){return e.jsx("textarea",{autoComplete:"off",className:R.clsx(z,"resize-none h-auto",t?"border-rose-400":"border-(--elm-border-strong,var(--color-gray-300))",o),...n})}function I({error:t,className:o,children:n,...a}){return e.jsxs("div",{className:"relative w-full",children:[e.jsx("select",{className:R.clsx(z,"appearance-none pr-8",t?"border-rose-400":"border-(--elm-border-strong,var(--color-gray-300))",o),...a,children:n}),e.jsx(A.CaretDown,{size:14,"aria-hidden":!0,className:"pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-elm-text-muted"})]})}const G={primary:"bg-primary-500 text-white hover:bg-primary-600 disabled:hover:bg-primary-500",secondary:"bg-elm-surface-hover text-elm-text-secondary hover:bg-(--elm-surface-hover,var(--color-gray-200)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700)) disabled:hover:bg-elm-surface-hover",ghost:"text-elm-text-muted hover:bg-elm-surface-hover hover:text-(--elm-text-secondary,var(--color-gray-700)) dark:hover:text-(--elm-text-secondary,var(--color-gray-300)) disabled:hover:bg-transparent",success:"bg-green-500 text-white hover:bg-green-600 disabled:hover:bg-green-500",emerald:"bg-emerald-500 text-white hover:bg-emerald-600 disabled:hover:bg-emerald-500",warning:"bg-amber-500 text-white hover:bg-amber-600 disabled:hover:bg-amber-500",dashed:"text-primary-500 hover:text-primary-700 hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-black)_5%,transparent)) dark:hover:bg-(--elm-control-hover,color-mix(in_oklab,var(--color-white)_5%,transparent)) disabled:hover:bg-transparent border border-dashed border-primary-300 hover:border-primary-500 dark:text-primary-400 dark:border-primary-700 dark:hover:border-primary-500"},V={sm:"px-2 py-1 text-xs rounded-elm-card",md:"px-3 py-1.5 text-sm rounded-elm-control",icon:"w-7 h-7 rounded-elm-card","icon-sm":"w-6 h-6 rounded-elm-chip"},$=i.forwardRef(({variant:t="secondary",size:o="md",className:n,children:a,...c},x)=>e.jsx("button",{ref:x,className:R.clsx("transition-colors flex items-center justify-center gap-1.5","active:scale-[0.95] disabled:opacity-40 disabled:cursor-not-allowed disabled:active:scale-100",G[t],V[o],n),...c,children:a}));$.displayName="Button";function X({children:t}){return e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 text-[11px] font-medium font-elm rounded-elm-chip border border-elm-border-strong bg-(--elm-surface-hover,var(--color-gray-100)) dark:bg-(--elm-surface-hover,var(--color-gray-700)) text-elm-text-muted shadow-[0_1px_0_0_rgba(0,0,0,0.15)] dark:shadow-[0_1px_0_0_rgba(0,0,0,0.4)]",children:t})}function q({children:t}){return e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[1.25rem] h-4 px-1 text-[10px] font-medium font-elm rounded-elm-chip border border-(--_elm-kbd-border,var(--color-neutral-600)) bg-(--_elm-kbd-bg,var(--color-neutral-700)) text-(--_elm-kbd-text,var(--color-neutral-300)) in-[.elm-tooltip-light]:border-(--_elm-kbd-border,var(--color-neutral-300)) in-[.elm-tooltip-light]:bg-(--_elm-kbd-bg,var(--color-neutral-100)) in-[.elm-tooltip-light]:text-(--_elm-kbd-text,var(--color-neutral-600)) in-[.elm-tooltip-light]:shadow-[0_1px_0_0_rgba(0,0,0,0.12)] shadow-[0_1px_0_0_rgba(0,0,0,0.3)] leading-none",children:t})}function J({children:t}){return e.jsx("kbd",{className:"inline-flex items-center justify-center min-w-[1.25rem] h-5 px-1.5 text-[11px] font-medium font-elm rounded-elm-chip border border-primary-400 bg-primary-500 text-primary-100 shadow-[0_1px_0_0_rgba(0,0,0,0.2)]",children:t})}const w=8,k=8;function Q(t){return t==="top"?"bottom":t==="bottom"?"top":t==="left"?"right":"left"}function T({content:t,shortcut:o,side:n="top",multiline:a=!1,children:c}){const[x,g]=i.useState(!1),[s,v]=i.useState(null),[l,y]=i.useState(null),[r,b]=i.useState(!1),p=D.useAccentStyle(),j=i.useRef(null),d=i.useRef(null),h=i.useRef(null);i.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]),i.useLayoutEffect(()=>{if(!x||!d.current||!s)return;const{width:u,height:f}=d.current.getBoundingClientRect(),m=window.innerWidth,E=window.innerHeight,C=S=>S==="top"?s.top-w-f>=k:S==="bottom"?s.bottom+w+f<=E-k:S==="left"?s.left-w-u>=k:s.right+w+u<=m-k,B=(()=>{const S=n==="top"||n==="bottom"?["right","left"]:["bottom","top"];return[n,Q(n),...S]})().find(C)??n;let _=0,N=0;B==="top"?(_=s.cx-u/2,N=s.top-w-f):B==="bottom"?(_=s.cx-u/2,N=s.bottom+w):B==="left"?(_=s.left-w-u,N=s.cy-f/2):(_=s.right+w,N=s.cy-f/2),_=Math.max(k,Math.min(_,m-u-k)),N=Math.max(k,Math.min(N,E-f-k)),y({left:Math.round(_),top:Math.round(N)})},[x,s,n]);function P(){h.current=setTimeout(()=>{var f,m,E,C;const u=(m=((f=j.current)==null?void 0:f.firstElementChild)??j.current)==null?void 0:m.getBoundingClientRect();u&&(y(null),v({left:u.left,top:u.top,right:u.right,bottom:u.bottom,cx:Math.round(u.left+u.width/2),cy:Math.round(u.top+u.height/2)}),b(((C=(E=j.current)==null?void 0:E.closest("[data-elm-theme]"))==null?void 0:C.getAttribute("data-elm-theme"))==="dark"),g(!0))},0)}function M(){h.current&&clearTimeout(h.current),g(!1)}return e.jsxs("div",{ref:j,onMouseEnter:P,onMouseLeave:M,className:"contents",children:[c,x&&L.createPortal(e.jsx("div",{ref:d,"data-elm-portal":!0,"data-elm-theme":r?"dark":"light",className:"fixed z-[9999] pointer-events-none",style:{...p,left:(l==null?void 0:l.left)??0,top:(l==null?void 0:l.top)??0,visibility:l?void 0:"hidden",animation:l?"tooltip-in 100ms ease":void 0},children:e.jsxs("div",{className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-elm-card shadow-elm backdrop-blur-sm ${a?"max-w-64 whitespace-normal leading-snug":"whitespace-nowrap"} bg-elm-tooltip/95 text-elm-tooltip-text elm-kbd-on-tooltip ${r?"elm-tooltip-light":""}`,children:[e.jsx("span",{children:t}),o&&e.jsx("span",{className:"flex items-center gap-0.5 opacity-60",children:o})]})}),document.body)]})}function Y(t){return t.split(",").map(c=>c.trim()).filter(Boolean).slice(1).filter(c=>!/^\d+$/.test(c)).slice(-2).join(", ")}const Z=i.forwardRef(function({results:o,loading:n,error:a,onGo:c,onAdd:x,onAddShape:g,activeIndex:s=-1,onHoverIndex:v,onNavigate:l,className:y,layout:r="stack"},b){const p=i.useRef([]),j=i.useRef([]);return i.useImperativeHandle(b,()=>({focusAdd(d){var h;(h=j.current[d])==null||h.focus()}})),i.useEffect(()=>{var d;s>=0&&((d=p.current[s])==null||d.scrollIntoView({block:"nearest"}))},[s]),e.jsxs("div",{className:y,children:[a&&e.jsx("p",{className:"px-3 py-2.5 text-sm text-rose-500",children:a}),!a&&n&&o.length===0&&e.jsx("p",{className:"px-3 py-2.5 text-sm text-(--elm-text-subtle,var(--color-gray-400))",children:"Searching…"}),!a&&!n&&o.length===0&&e.jsx("p",{className:"px-3 py-2.5 text-sm text-(--elm-text-subtle,var(--color-gray-400))",children:"No results found"}),!a&&o.map((d,h)=>{const P=d.geojson&&d.geojson.type!=="Point",M=e.jsxs(e.Fragment,{children:[e.jsx(T,{content:"Fly to location",children:e.jsxs("button",{onClick:m=>{m.stopPropagation(),c(d)},className:"flex-shrink-0 px-2 py-1 text-xs text-elm-text-muted hover:bg-(--elm-surface-hover,var(--color-gray-200)) dark:hover:bg-(--elm-surface-hover,var(--color-gray-700)) dark:hover:text-(--elm-text-secondary,var(--color-gray-300)) rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface",children:[e.jsx(A.ArrowUpRight,{size:12})," Go"]})}),x&&e.jsx(T,{content:"Add as point",children:e.jsxs("button",{ref:m=>{j.current[h]=m},onClick:m=>{m.stopPropagation(),x(d)},className:"flex-shrink-0 px-2 py-1 text-xs bg-primary-500 text-white hover:bg-primary-600 rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-300 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface",children:[e.jsx(A.Plus,{size:12})," Add"]})}),P&&g&&e.jsx(T,{content:"Add as boundary shape",children:e.jsxs("button",{onClick:m=>{m.stopPropagation(),g(d)},className:"flex-shrink-0 px-2 py-1 text-xs bg-emerald-500 text-white hover:bg-emerald-600 rounded-elm-card flex items-center gap-1 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-emerald-300 focus-visible:ring-offset-1 focus-visible:ring-offset-elm-surface",children:[e.jsx(A.Polygon,{size:12})," Shape"]})})]}),u=e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("span",{className:"text-sm text-(--elm-text,var(--color-gray-800)) dark:text-(--elm-text,var(--color-gray-200)) font-medium truncate",children:d.display_name.split(",")[0]}),d.addresstype&&e.jsx("span",{className:"flex-shrink-0 text-[10px] font-medium px-1.5 py-0.5 rounded-full bg-elm-surface-hover text-elm-text-muted capitalize",children:d.addresstype.replace(/_/g," ")})]}),f=e.jsx("span",{className:"block text-xs text-elm-text-subtle mt-0.5 truncate",children:Y(d.display_name)});return e.jsx("div",{ref:m=>{p.current[h]=m},onClick:()=>c(d),onMouseEnter:()=>v==null?void 0:v(h),onKeyDown:m=>{m.key==="ArrowDown"?(m.preventDefault(),l==null||l(1,h)):m.key==="ArrowUp"&&(m.preventDefault(),l==null||l(-1,h))},className:r==="row"?`flex items-center gap-2 px-3 py-2 border-b border-elm-border-subtle last:border-b-0 transition-colors cursor-pointer ${h===s?"bg-primary-50 dark:bg-white/5":""}`:`flex flex-col gap-1.5 px-3 py-2 border-b border-elm-border-subtle last:border-b-0 transition-colors cursor-pointer ${h===s?"bg-primary-50 dark:bg-white/5":""}`,children:r==="row"?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[u,f]}),e.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:M})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"min-w-0",children:[u,f]}),e.jsx("div",{className:"flex items-center gap-1 justify-start",children:M})]})},d.place_id)})]})}),H={blue:"bg-primary-500 hover:bg-primary-600 disabled:hover:bg-primary-500 text-white shadow-sm",emerald:"bg-emerald-500 hover:bg-emerald-600 disabled:hover:bg-emerald-500 text-white shadow-sm",amber:"bg-amber-500 hover:bg-amber-600 disabled:hover:bg-amber-500 text-white shadow-sm",violet:"bg-violet-500 hover:bg-violet-600 disabled:hover:bg-violet-500 text-white shadow-sm"};function ee(t,o){return o==="vertical"?t.endsWith("-right")||t.startsWith("right")?"left":"right":t.startsWith("bottom")?"top":"bottom"}function te({active:t,onClick:o,label:n,shortcut:a,shortcutId:c,color:x="blue",tooltipSide:g,disabled:s,children:v}){const l=D.useElementEditorConfig(),y=l.ui.keyboardShortcuts.enabled&&a,r=g??ee(l.toolbar.position,l.toolbar.direction);return e.jsx(T,{content:n,shortcut:y&&e.jsx(q,{children:a}),side:r,children:e.jsx("button",{"aria-label":n,"data-elm-shortcut":c,onClick:b=>{o(),b.currentTarget.blur()},disabled:s,className:R.clsx("p-1 text-sm rounded-elm-control flex items-center justify-center active:scale-[0.95] disabled:cursor-not-allowed disabled:text-elm-text-disabled disabled:active:scale-100",t?H[x]:"text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent"),children:v})})}function re({vertical:t}={}){return t?e.jsx("div",{className:"h-px w-5 bg-elm-border my-0.5 flex-shrink-0"}):e.jsx("div",{className:"w-px h-5 bg-elm-border mx-1 flex-shrink-0"})}function oe({label:t,shortcut:o,shortcutId:n,onClick:a,active:c,disabled:x,tooltipSide:g="top",children:s}){const l=D.useElementEditorConfig().ui.keyboardShortcuts.enabled?o:void 0;return e.jsx(T,{content:t,shortcut:l,side:g,children:e.jsx("button",{"aria-label":t,"aria-pressed":c,"data-elm-shortcut":n,onClick:y=>{a(),y.currentTarget.blur()},disabled:x,className:`p-1 rounded-elm-control flex items-center justify-center text-sm
2
+ active:scale-[0.95] disabled:cursor-not-allowed disabled:text-elm-text-disabled disabled:active:scale-100
3
+ ${c?"bg-primary-50 dark:bg-white/10 hover:bg-primary-100 dark:hover:bg-white/15 disabled:hover:bg-primary-50 dark:disabled:hover:bg-white/10 text-primary-600 dark:text-primary-400":"text-elm-text hover:bg-elm-control-hover disabled:hover:bg-transparent"}`,children:s})})}function se(){return e.jsx("div",{className:"w-px h-5 bg-elm-border mx-0.5 flex-shrink-0"})}exports.Button=$;exports.CONTEXT_MENU_MARKER_ATTR=K;exports.ContextMenu=W;exports.EditToolbarBtn=oe;exports.Input=O;exports.Kbd=X;exports.KbdDark=q;exports.KbdInvert=J;exports.SearchDropdown=Z;exports.SelectInput=I;exports.Textarea=U;exports.ToolButton=te;exports.ToolbarDivider=se;exports.ToolbarDivider$1=re;exports.Tooltip=T;exports.isContextMenuOpen=F;