@element-editor/ui 0.0.0-stage → 0.2.1

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-BRO7NHUY.js +111 -0
  5. package/dist/BooleanOperations-C2uOHRu3.cjs +1 -0
  6. package/dist/DataTable-B-2VjBEz.cjs +2 -0
  7. package/dist/DataTable-CS-3dIqY.js +510 -0
  8. package/dist/DataTablePanel-58LwzXQR.cjs +1 -0
  9. package/dist/DataTablePanel-DDFUmMaM.js +208 -0
  10. package/dist/EditToolbarBtn-Ch9HCLHq.cjs +3 -0
  11. package/dist/EditToolbarBtn-SR4xHd8G.js +378 -0
  12. package/dist/FeatureEditModal-Cc8N6vei.cjs +1 -0
  13. package/dist/FeatureEditModal-Dr10p3nE.js +77 -0
  14. package/dist/FeatureList-Bo9w9nre.js +520 -0
  15. package/dist/FeatureList-VRYesXCq.cjs +1 -0
  16. package/dist/FeatureRowContextMenu-CtBqdC1j.cjs +1 -0
  17. package/dist/FeatureRowContextMenu-DCUIiDwc.js +130 -0
  18. package/dist/GeoJSONModal-BV9Tamf4.js +886 -0
  19. package/dist/GeoJSONModal-Dd-nBufy.cjs +9 -0
  20. package/dist/SchemaEditor-B4L17K1e.cjs +1 -0
  21. package/dist/SchemaEditor-ryoTgaLb.js +293 -0
  22. package/dist/SchemaModal-DvMbWskS.js +95 -0
  23. package/dist/SchemaModal-gAuDkd-L.cjs +1 -0
  24. package/dist/SettingsModal-BScVTjpn.js +237 -0
  25. package/dist/SettingsModal-CqaSFxxR.cjs +1 -0
  26. package/dist/ShortcutsModal-D1Y2bGT8.cjs +1 -0
  27. package/dist/ShortcutsModal-ozuS2Ysb.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-CILw1Du5.js +3165 -0
  197. package/dist/index-DG4wEjGj.cjs +1 -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-DuQVjnHE.js +80 -0
  223. package/dist/useWindowFocus-EemgNOuz.cjs +1 -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,26 @@
1
+ import { IconButtonSize } from './ui/IconButton.js';
2
+ import { TooltipSide } from './ui/Tooltip.js';
3
+ export interface BasemapPickerOption {
4
+ id: string;
5
+ label: string;
6
+ /** Image URL, or two (shown side by side, e.g. light + dark for a theme-following option). */
7
+ thumbnail?: string | [string, string];
8
+ }
9
+ export interface BasemapPickerProps {
10
+ options: BasemapPickerOption[];
11
+ value: string;
12
+ onChange: (id: string) => void;
13
+ /** Button label and the panel's accessible name. Default: 'Basemap'. */
14
+ label?: string;
15
+ size?: IconButtonSize;
16
+ tooltipSide?: TooltipSide;
17
+ }
18
+ /**
19
+ * Basemap switcher: an icon button that opens a panel of thumbnail tiles.
20
+ * Engine-neutral: it applies nothing, the host reacts to `onChange`.
21
+ * The panel opens away from the screen edge the button sits on and stays open until the user
22
+ * closes it (the button again, or Escape); picking a basemap or using the map keeps it open.
23
+ * Opening focuses the active tile (the panel is portalled to the end of <body>); Escape
24
+ * returns focus to the button.
25
+ */
26
+ export declare function BasemapPicker({ options, value, onChange, label, size, tooltipSide }: BasemapPickerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export default function BooleanOperations(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function BooleanOperations(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function BufferPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function BufferPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ schemaFilter: string;
3
+ focusRowId?: string | null;
4
+ onFocusRowHandled?: () => void;
5
+ selectedRows: ReadonlySet<string>;
6
+ onSelectedRowsChange: (ids: ReadonlySet<string>) => void;
7
+ }
8
+ export default function DataTable({ schemaFilter, focusRowId, onFocusRowHandled, selectedRows, onSelectedRowsChange }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ interface Props {
2
+ schemaFilter: string;
3
+ focusRowId?: string | null;
4
+ onFocusRowHandled?: () => void;
5
+ selectedRows: ReadonlySet<string>;
6
+ onSelectedRowsChange: (ids: ReadonlySet<string>) => void;
7
+ }
8
+ export default function DataTable({ schemaFilter, focusRowId, onFocusRowHandled, selectedRows, onSelectedRowsChange }: Props): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ interface DataTablePanelProps {
2
+ /**
3
+ * Embedded mode: fills its parent container (no absolute positioning,
4
+ * no resize handle, no show/hide animation, no fullscreen toggle, no
5
+ * close button). Used by the split layout which owns the container.
6
+ */
7
+ embedded?: boolean;
8
+ }
9
+ export default function DataTablePanel({ embedded }?: DataTablePanelProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,10 @@
1
+ interface DataTablePanelProps {
2
+ /**
3
+ * Embedded mode: fills its parent container (no absolute positioning,
4
+ * no resize handle, no show/hide animation, no fullscreen toggle, no
5
+ * close button). Used by the split layout which owns the container.
6
+ */
7
+ embedded?: boolean;
8
+ }
9
+ export default function DataTablePanel({ embedded }?: DataTablePanelProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1 @@
1
+ export default function EditingToolbar(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function EditingToolbar(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+ import { ElementEditorError } from '@element-editor/core';
3
+ interface Props {
4
+ children: React.ReactNode;
5
+ /** Gets the caught error as an `ElementEditorError` with `code: 'crash'` (the original is its `cause`). */
6
+ onError?: (error: ElementEditorError) => unknown;
7
+ }
8
+ interface State {
9
+ hasError: boolean;
10
+ error: Error | null;
11
+ }
12
+ /**
13
+ * Class-based ErrorBoundary that catches render errors anywhere inside the
14
+ * Element editor tree and shows a minimal "Try again" fallback. Originally
15
+ * lived inside `@element-editor/react`'s `ElementEditor.tsx`; promoted to `@element-editor/ui`
16
+ * so standalone adapter consumers (adapter-leaflet / adapter-maplibre) can
17
+ * wrap their tree in the same safety net.
18
+ *
19
+ * Intentionally minimal styling (inline) so it works even if the CSS bundle
20
+ * itself failed to load.
21
+ */
22
+ export declare class ElementEditorErrorBoundary extends React.Component<Props, State> {
23
+ state: State;
24
+ static getDerivedStateFromError(error: Error): State;
25
+ componentDidCatch(error: Error): void;
26
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
27
+ }
28
+ export {};
@@ -0,0 +1,28 @@
1
+ import { default as React } from 'react';
2
+ import { ElementEditorError } from '@element-editor/core';
3
+ interface Props {
4
+ children: React.ReactNode;
5
+ /** Gets the caught error as an `ElementEditorError` with `code: 'crash'` (the original is its `cause`). */
6
+ onError?: (error: ElementEditorError) => unknown;
7
+ }
8
+ interface State {
9
+ hasError: boolean;
10
+ error: Error | null;
11
+ }
12
+ /**
13
+ * Class-based ErrorBoundary that catches render errors anywhere inside the
14
+ * Element editor tree and shows a minimal "Try again" fallback. Originally
15
+ * lived inside `@element-editor/react`'s `ElementEditor.tsx`; promoted to `@element-editor/ui`
16
+ * so standalone adapter consumers (adapter-leaflet / adapter-maplibre) can
17
+ * wrap their tree in the same safety net.
18
+ *
19
+ * Intentionally minimal styling (inline) so it works even if the CSS bundle
20
+ * itself failed to load.
21
+ */
22
+ export declare class ElementEditorErrorBoundary extends React.Component<Props, State> {
23
+ state: State;
24
+ static getDerivedStateFromError(error: Error): State;
25
+ componentDidCatch(error: Error): void;
26
+ render(): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
27
+ }
28
+ export {};
@@ -0,0 +1,50 @@
1
+ import { ReactNode } from 'react';
2
+ import { ElementEditorConfig } from '../contexts/ElementEditorConfigContext.cjs';
3
+ import { ElementEditorEvent, ElementEditorErrorHandler } from '../types/events.cjs';
4
+ export interface ElementEditorUIProviderProps {
5
+ /** Structured configuration: theme, toolbar position/direction, UI visibility, units. */
6
+ config?: ElementEditorConfig;
7
+ /**
8
+ * Brand accent: any CSS colour. Wins over `config.accentColor`. The whole
9
+ * primary scale is derived from it. This provider renders no DOM, so
10
+ * `<ElementEditorControls>` writes it as `--elm-accent` onto your themed root
11
+ * (the nearest `[data-elm-theme]` ancestor of the map container); Element's
12
+ * portals get it too. Updates live. Default: blue.
13
+ */
14
+ accentColor?: string;
15
+ /**
16
+ * Default colour of every feature (polygon outline + fill, line, point): any CSS colour.
17
+ * Wins over `config.featureColor`; `getFeatureStyle` and the selected look win over it,
18
+ * hover keeps it. Opacity and weight keep their defaults. Default: slate `#475569`.
19
+ */
20
+ featureColor?: string;
21
+ /** Intercept all Element events. When provided, built-in sonner toasts are suppressed. */
22
+ onEvent?: (event: ElementEditorEvent) => void;
23
+ /**
24
+ * Called first for every runtime failure with an `ElementEditorError` (`code`, `source`,
25
+ * honest English `message`), including a render crash (`code: 'crash'`, the original error is
26
+ * its `cause`). Return `false` to stop the built-in toast / `onEvent` error event, or a string to
27
+ * show that text instead. See {@link ElementEditorErrorHandler}.
28
+ */
29
+ onError?: ElementEditorErrorHandler;
30
+ /**
31
+ * Render Element's own sonner `<Toaster>` (default true). Its toasts carry a
32
+ * per-instance id, so a host `<Toaster>` or a second editor never shows them
33
+ * twice. Pass false to send toasts to your own untagged `<Toaster>` instead.
34
+ */
35
+ toaster?: boolean;
36
+ children: ReactNode;
37
+ }
38
+ /**
39
+ * Provides all Element UI context needed to render FloatingToolbar, EditingToolbar,
40
+ * and other UI components around an adapter's (Leaflet or MapLibre) ElementEditorControls.
41
+ * Engine-neutral: both `@element-editor/adapter-leaflet` and `adapter-maplibre` re-export it.
42
+ *
43
+ * Wrap your app (or the relevant section) with this provider, then place
44
+ * GeoStoreProvider + your map + ElementEditorControls inside your map component.
45
+ *
46
+ * Includes (in order): ElementEditorErrorBoundary, ElementEditorConfigProvider,
47
+ * ShortcutConfigProvider, EventProvider, MapControllerProvider. Matches the
48
+ * full context stack the `@element-editor/react` wrapper sets up.
49
+ */
50
+ export declare function ElementEditorUIProvider({ config, accentColor, featureColor, onEvent, onError, toaster, children }: ElementEditorUIProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { ReactNode } from 'react';
2
+ import { ElementEditorConfig } from '../contexts/ElementEditorConfigContext.js';
3
+ import { ElementEditorEvent, ElementEditorErrorHandler } from '../types/events.js';
4
+ export interface ElementEditorUIProviderProps {
5
+ /** Structured configuration: theme, toolbar position/direction, UI visibility, units. */
6
+ config?: ElementEditorConfig;
7
+ /**
8
+ * Brand accent: any CSS colour. Wins over `config.accentColor`. The whole
9
+ * primary scale is derived from it. This provider renders no DOM, so
10
+ * `<ElementEditorControls>` writes it as `--elm-accent` onto your themed root
11
+ * (the nearest `[data-elm-theme]` ancestor of the map container); Element's
12
+ * portals get it too. Updates live. Default: blue.
13
+ */
14
+ accentColor?: string;
15
+ /**
16
+ * Default colour of every feature (polygon outline + fill, line, point): any CSS colour.
17
+ * Wins over `config.featureColor`; `getFeatureStyle` and the selected look win over it,
18
+ * hover keeps it. Opacity and weight keep their defaults. Default: slate `#475569`.
19
+ */
20
+ featureColor?: string;
21
+ /** Intercept all Element events. When provided, built-in sonner toasts are suppressed. */
22
+ onEvent?: (event: ElementEditorEvent) => void;
23
+ /**
24
+ * Called first for every runtime failure with an `ElementEditorError` (`code`, `source`,
25
+ * honest English `message`), including a render crash (`code: 'crash'`, the original error is
26
+ * its `cause`). Return `false` to stop the built-in toast / `onEvent` error event, or a string to
27
+ * show that text instead. See {@link ElementEditorErrorHandler}.
28
+ */
29
+ onError?: ElementEditorErrorHandler;
30
+ /**
31
+ * Render Element's own sonner `<Toaster>` (default true). Its toasts carry a
32
+ * per-instance id, so a host `<Toaster>` or a second editor never shows them
33
+ * twice. Pass false to send toasts to your own untagged `<Toaster>` instead.
34
+ */
35
+ toaster?: boolean;
36
+ children: ReactNode;
37
+ }
38
+ /**
39
+ * Provides all Element UI context needed to render FloatingToolbar, EditingToolbar,
40
+ * and other UI components around an adapter's (Leaflet or MapLibre) ElementEditorControls.
41
+ * Engine-neutral: both `@element-editor/adapter-leaflet` and `adapter-maplibre` re-export it.
42
+ *
43
+ * Wrap your app (or the relevant section) with this provider, then place
44
+ * GeoStoreProvider + your map + ElementEditorControls inside your map component.
45
+ *
46
+ * Includes (in order): ElementEditorErrorBoundary, ElementEditorConfigProvider,
47
+ * ShortcutConfigProvider, EventProvider, MapControllerProvider. Matches the
48
+ * full context stack the `@element-editor/react` wrapper sets up.
49
+ */
50
+ export declare function ElementEditorUIProvider({ config, accentColor, featureColor, onEvent, onError, toaster, children }: ElementEditorUIProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ import { GeoJSONFeature } from '@element-editor/core';
2
+ export interface FeatureContextMenuData {
3
+ feature: GeoJSONFeature;
4
+ /** POI-only: trigger the inline "Precise coordinates" popup on the marker. */
5
+ requestPreciseCoords?: () => void;
6
+ }
7
+ interface Props {
8
+ x: number;
9
+ y: number;
10
+ data: FeatureContextMenuData;
11
+ onClose: () => void;
12
+ }
13
+ /**
14
+ * Right-click menu for features on the map. Mirrors the selection toolbar
15
+ * (minus Duplicate) so users can reach the same editing actions without
16
+ * moving the cursor away from the feature.
17
+ *
18
+ * Selection invariant: the adapter selects the clicked feature before
19
+ * opening the menu (unless it's already part of a 2+ multi-selection), so
20
+ * handlers here read the current selection and don't re-select.
21
+ */
22
+ export declare function FeatureMapContextMenu({ x, y, data, onClose }: Props): import("react/jsx-runtime").JSX.Element | null;
23
+ export {};
@@ -0,0 +1,23 @@
1
+ import { GeoJSONFeature } from '@element-editor/core';
2
+ export interface FeatureContextMenuData {
3
+ feature: GeoJSONFeature;
4
+ /** POI-only: trigger the inline "Precise coordinates" popup on the marker. */
5
+ requestPreciseCoords?: () => void;
6
+ }
7
+ interface Props {
8
+ x: number;
9
+ y: number;
10
+ data: FeatureContextMenuData;
11
+ onClose: () => void;
12
+ }
13
+ /**
14
+ * Right-click menu for features on the map. Mirrors the selection toolbar
15
+ * (minus Duplicate) so users can reach the same editing actions without
16
+ * moving the cursor away from the feature.
17
+ *
18
+ * Selection invariant: the adapter selects the clicked feature before
19
+ * opening the menu (unless it's already part of a 2+ multi-selection), so
20
+ * handlers here read the current selection and don't re-select.
21
+ */
22
+ export declare function FeatureMapContextMenu({ x, y, data, onClose }: Props): import("react/jsx-runtime").JSX.Element | null;
23
+ export {};
@@ -0,0 +1,6 @@
1
+ import { IconButtonSize } from './ui/IconButton.cjs';
2
+ import { TooltipSide } from './ui/Tooltip.cjs';
3
+ export default function FitBoundsButton({ size, tooltipSide }?: {
4
+ size?: IconButtonSize;
5
+ tooltipSide?: TooltipSide;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { IconButtonSize } from './ui/IconButton.js';
2
+ import { TooltipSide } from './ui/Tooltip.js';
3
+ export default function FitBoundsButton({ size, tooltipSide }?: {
4
+ size?: IconButtonSize;
5
+ tooltipSide?: TooltipSide;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function FloatingToolbar({ embedded }?: {
2
+ embedded?: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export default function FloatingToolbar({ embedded }?: {
2
+ embedded?: boolean;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { IconButtonSize } from './ui/IconButton.cjs';
2
+ import { TooltipSide } from './ui/Tooltip.cjs';
3
+ interface Props {
4
+ /** Zoom level to fly to after locating. Default 15 (street-level). */
5
+ zoom?: number;
6
+ /** `'sm'` for the status bar, `'group'` inside a joined pill. Default `'md'`. */
7
+ size?: IconButtonSize;
8
+ tooltipSide?: TooltipSide;
9
+ }
10
+ export default function LocateButton({ zoom, size, tooltipSide }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { IconButtonSize } from './ui/IconButton.js';
2
+ import { TooltipSide } from './ui/Tooltip.js';
3
+ interface Props {
4
+ /** Zoom level to fly to after locating. Default 15 (street-level). */
5
+ zoom?: number;
6
+ /** `'sm'` for the status bar, `'group'` inside a joined pill. Default `'md'`. */
7
+ size?: IconButtonSize;
8
+ tooltipSide?: TooltipSide;
9
+ }
10
+ export default function LocateButton({ zoom, size, tooltipSide }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export default function ReadonlyBanner(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function ReadonlyBanner(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function ShortcutsModal(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function ShortcutsModal(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function SimplifyPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function SimplifyPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function SmoothPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function SmoothPanel(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconButtonSize } from './ui/IconButton.cjs';
3
+ import { TooltipSide } from './ui/Tooltip.cjs';
4
+ interface HistoryButtonProps {
5
+ /** `'md'` map button, `'sm'` status bar, `'group'` inside a `ControlGroup`. Default `'md'`. */
6
+ size?: IconButtonSize;
7
+ tooltipSide?: TooltipSide;
8
+ }
9
+ export declare function UndoButton({ size, tooltipSide }: HistoryButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function RedoButton({ size, tooltipSide }: HistoryButtonProps): import("react/jsx-runtime").JSX.Element;
11
+ /** Joined pill surface for map controls (same look as the floating toolbar). Put `size="group"` buttons inside. */
12
+ export declare function ControlGroup({ direction, children }: {
13
+ direction?: 'horizontal' | 'vertical';
14
+ children: ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ /** Undo + redo in one pill. `<ElementEditor>` places them via `config.ui.layout`; adapter users can drop this in. */
17
+ export default function UndoRedoToolbar({ direction }: {
18
+ direction?: 'horizontal' | 'vertical';
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,20 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconButtonSize } from './ui/IconButton.js';
3
+ import { TooltipSide } from './ui/Tooltip.js';
4
+ interface HistoryButtonProps {
5
+ /** `'md'` map button, `'sm'` status bar, `'group'` inside a `ControlGroup`. Default `'md'`. */
6
+ size?: IconButtonSize;
7
+ tooltipSide?: TooltipSide;
8
+ }
9
+ export declare function UndoButton({ size, tooltipSide }: HistoryButtonProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function RedoButton({ size, tooltipSide }: HistoryButtonProps): import("react/jsx-runtime").JSX.Element;
11
+ /** Joined pill surface for map controls (same look as the floating toolbar). Put `size="group"` buttons inside. */
12
+ export declare function ControlGroup({ direction, children }: {
13
+ direction?: 'horizontal' | 'vertical';
14
+ children: ReactNode;
15
+ }): import("react/jsx-runtime").JSX.Element;
16
+ /** Undo + redo in one pill. `<ElementEditor>` places them via `config.ui.layout`; adapter users can drop this in. */
17
+ export default function UndoRedoToolbar({ direction }: {
18
+ direction?: 'horizontal' | 'vertical';
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Bar shown while vertex points are selected: count, Simplify, Delete.
3
+ * Portals into the map container's parent (not <body>) so it inherits
4
+ * [data-elm-theme] and the offset vars, while its clicks never bubble through
5
+ * the map container itself.
6
+ */
7
+ export declare function VertexSelectionBar({ mapContainer, count, onSimplify, onDelete }: {
8
+ mapContainer: HTMLElement;
9
+ count: number;
10
+ onSimplify: () => void;
11
+ onDelete: () => void;
12
+ }): import('react').ReactPortal | null;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Bar shown while vertex points are selected: count, Simplify, Delete.
3
+ * Portals into the map container's parent (not <body>) so it inherits
4
+ * [data-elm-theme] and the offset vars, while its clicks never bubble through
5
+ * the map container itself.
6
+ */
7
+ export declare function VertexSelectionBar({ mapContainer, count, onSimplify, onDelete }: {
8
+ mapContainer: HTMLElement;
9
+ count: number;
10
+ onSimplify: () => void;
11
+ onDelete: () => void;
12
+ }): import('react').ReactPortal | null;
@@ -0,0 +1,15 @@
1
+ import { TooltipSide } from './ui/Tooltip.cjs';
2
+ interface Props {
3
+ /** Inclusive lower bound for the zoom input. Default 1. */
4
+ minZoom?: number;
5
+ /** Inclusive upper bound for the zoom input. Default 22 (Leaflet/MapLibre standard). */
6
+ maxZoom?: number;
7
+ /** Show one decimal place and accept fractional input. For MapLibre which supports sub-integer zoom. */
8
+ fractional?: boolean;
9
+ /** `'sm'`: compact flat text for the status bar. `'group'`: flat, inside a joined pill. Default `'md'`. */
10
+ size?: 'md' | 'sm' | 'group';
11
+ /** Tooltip side. Default `'top'`. */
12
+ tooltipSide?: TooltipSide;
13
+ }
14
+ export default function ZoomIndicator({ minZoom, maxZoom, fractional, size, tooltipSide }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,15 @@
1
+ import { TooltipSide } from './ui/Tooltip.js';
2
+ interface Props {
3
+ /** Inclusive lower bound for the zoom input. Default 1. */
4
+ minZoom?: number;
5
+ /** Inclusive upper bound for the zoom input. Default 22 (Leaflet/MapLibre standard). */
6
+ maxZoom?: number;
7
+ /** Show one decimal place and accept fractional input. For MapLibre which supports sub-integer zoom. */
8
+ fractional?: boolean;
9
+ /** `'sm'`: compact flat text for the status bar. `'group'`: flat, inside a joined pill. Default `'md'`. */
10
+ size?: 'md' | 'sm' | 'group';
11
+ /** Tooltip side. Default `'top'`. */
12
+ tooltipSide?: TooltipSide;
13
+ }
14
+ export default function ZoomIndicator({ minZoom, maxZoom, fractional, size, tooltipSide }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,11 @@
1
+ import { SchemaField } from '@element-editor/core';
2
+ interface Props {
3
+ fields: SchemaField[];
4
+ values: Record<string, unknown>;
5
+ onChange: (key: string, value: unknown) => void;
6
+ errors?: Record<string, string>;
7
+ autoFocusFirst?: boolean;
8
+ readonly?: boolean;
9
+ }
10
+ export default function DynamicFieldRenderer({ fields, values, onChange, errors, autoFocusFirst, readonly }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,11 @@
1
+ import { SchemaField } from '@element-editor/core';
2
+ interface Props {
3
+ fields: SchemaField[];
4
+ values: Record<string, unknown>;
5
+ onChange: (key: string, value: unknown) => void;
6
+ errors?: Record<string, string>;
7
+ autoFocusFirst?: boolean;
8
+ readonly?: boolean;
9
+ }
10
+ export default function DynamicFieldRenderer({ fields, values, onChange, errors, autoFocusFirst, readonly }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1 @@
1
+ export default function SettingsModal(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function SettingsModal(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,12 @@
1
+ /** The layers list (@hello-pangea/dnd + its redux, @tanstack/react-virtual). */
2
+ export declare const FeatureList: typeof import('./sidebar/FeatureList.cjs').default & {
3
+ preload: () => Promise<unknown>;
4
+ };
5
+ /** The data grid (react-data-grid). */
6
+ export declare const DataTable: typeof import('./DataTable.cjs').default & {
7
+ preload: () => Promise<unknown>;
8
+ };
9
+ /** Schema field editor (only ever shown in the schema window). */
10
+ export declare const SchemaEditor: typeof import('./sidebar/SchemaEditor.cjs').default & {
11
+ preload: () => Promise<unknown>;
12
+ };
@@ -0,0 +1,12 @@
1
+ /** The layers list (@hello-pangea/dnd + its redux, @tanstack/react-virtual). */
2
+ export declare const FeatureList: typeof import('./sidebar/FeatureList.js').default & {
3
+ preload: () => Promise<unknown>;
4
+ };
5
+ /** The data grid (react-data-grid). */
6
+ export declare const DataTable: typeof import('./DataTable.js').default & {
7
+ preload: () => Promise<unknown>;
8
+ };
9
+ /** Schema field editor (only ever shown in the schema window). */
10
+ export declare const SchemaEditor: typeof import('./sidebar/SchemaEditor.js').default & {
11
+ preload: () => Promise<unknown>;
12
+ };
@@ -0,0 +1,6 @@
1
+ import { DialogState } from '@element-editor/core';
2
+ export default function FeatureEditModal({ dialogState }: {
3
+ dialogState: Exclude<DialogState, {
4
+ type: 'closed';
5
+ }>;
6
+ }): import('react').ReactPortal;
@@ -0,0 +1,6 @@
1
+ import { DialogState } from '@element-editor/core';
2
+ export default function FeatureEditModal({ dialogState }: {
3
+ dialogState: Exclude<DialogState, {
4
+ type: 'closed';
5
+ }>;
6
+ }): import('react').ReactPortal;
@@ -0,0 +1,4 @@
1
+ export default function FeatureList({ autoFocusGroupId, scrollElement, }: {
2
+ autoFocusGroupId?: string | null;
3
+ scrollElement?: HTMLElement | null;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function FeatureList({ autoFocusGroupId, scrollElement, }: {
2
+ autoFocusGroupId?: string | null;
3
+ scrollElement?: HTMLElement | null;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,38 @@
1
+ import { GeoJSONFeature } from '@element-editor/core';
2
+ /** A feature's display name: its `name`, else its geometry type in plain words (Point, Line, Area, …). */
3
+ export declare function featureLabel(feature: GeoJSONFeature): string;
4
+ interface FeatureRowProps {
5
+ feature: GeoJSONFeature;
6
+ isSelected: boolean;
7
+ onRowClick: (id: string) => void;
8
+ /** Selection without the map move — used to keep multi/range-select chains
9
+ * responsive when a name-click defers the row's pan/fit. */
10
+ onRowSelectOnly?: (id: string) => void;
11
+ /** Just the pan/fit — invoked by the name-click's deferred timer so a
12
+ * follow-up dblclick (rename) can cancel it. */
13
+ onRowJump?: (id: string) => void;
14
+ onEdit: (id: string) => void;
15
+ onToggleHidden: (id: string) => void;
16
+ containerProps?: Record<string, unknown>;
17
+ dragHandleProps?: Record<string, unknown>;
18
+ isDragging?: boolean;
19
+ innerRef?: (node: HTMLElement | null) => void;
20
+ isMultiSelected?: boolean;
21
+ onMultiSelectToggle?: (id: string) => void;
22
+ onRangeSelect?: (id: string) => void;
23
+ isContextMenuActive?: boolean;
24
+ /** When dragging multiple selected items, shows a count badge on the drag preview */
25
+ dragCountBadge?: number;
26
+ /** Dims the row when it's being dragged along as part of a multi-drag */
27
+ isGhosted?: boolean;
28
+ onRename?: (id: string, name: string) => void;
29
+ /** Parent-controlled rename activation (drives Tab / Shift+Tab navigation between rows). */
30
+ renameActive?: boolean;
31
+ onRenameEnd?: () => void;
32
+ onRenameTab?: (direction: 'next' | 'prev') => void;
33
+ /** Square off the top / bottom corners (selected neighbour joins this row). */
34
+ joinTop?: boolean;
35
+ joinBottom?: boolean;
36
+ }
37
+ declare const FeatureRow: import('react').NamedExoticComponent<FeatureRowProps>;
38
+ export default FeatureRow;