@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.
- package/AGENTS.md +65 -0
- package/LICENSE +21 -0
- package/README.md +46 -2
- package/dist/BooleanOperations-WXcmW9Vy.cjs +1 -0
- package/dist/BooleanOperations-oF0WybQP.js +111 -0
- package/dist/DataTable-CNfB01y2.cjs +2 -0
- package/dist/DataTable-DNmjUwka.js +510 -0
- package/dist/DataTablePanel-BknCxC1K.cjs +1 -0
- package/dist/DataTablePanel-rWdaQubk.js +208 -0
- package/dist/EditToolbarBtn-SZIsnIn3.js +378 -0
- package/dist/EditToolbarBtn-dpCmKnzk.cjs +3 -0
- package/dist/FeatureEditModal-BF-fGhVD.js +77 -0
- package/dist/FeatureEditModal-CM6BObUO.cjs +1 -0
- package/dist/FeatureList-CQb2kTrV.js +520 -0
- package/dist/FeatureList-Csr-anLA.cjs +1 -0
- package/dist/FeatureRowContextMenu-BLt7VlUU.js +130 -0
- package/dist/FeatureRowContextMenu-Gwq3OMEA.cjs +1 -0
- package/dist/GeoJSONModal-BPFWeaLZ.js +886 -0
- package/dist/GeoJSONModal-iwUcvrg7.cjs +9 -0
- package/dist/SchemaEditor-BEsKUe2p.js +293 -0
- package/dist/SchemaEditor-qkoYMg0C.cjs +1 -0
- package/dist/SchemaModal-9nNrgorr.js +95 -0
- package/dist/SchemaModal-GrtgA7cH.cjs +1 -0
- package/dist/SettingsModal-6_qmRyCi.cjs +1 -0
- package/dist/SettingsModal-DTP0Xx_Z.js +237 -0
- package/dist/ShortcutsModal-CdyQlrqK.cjs +1 -0
- package/dist/ShortcutsModal-DwxZu71W.js +299 -0
- package/dist/components/ActiveDrawingToolbar.d.cts +1 -0
- package/dist/components/ActiveDrawingToolbar.d.ts +1 -0
- package/dist/components/BasemapPicker.d.cts +26 -0
- package/dist/components/BasemapPicker.d.ts +26 -0
- package/dist/components/BooleanOperations.d.cts +1 -0
- package/dist/components/BooleanOperations.d.ts +1 -0
- package/dist/components/BufferPanel.d.cts +1 -0
- package/dist/components/BufferPanel.d.ts +1 -0
- package/dist/components/DataTable.d.cts +9 -0
- package/dist/components/DataTable.d.ts +9 -0
- package/dist/components/DataTablePanel.d.cts +10 -0
- package/dist/components/DataTablePanel.d.ts +10 -0
- package/dist/components/EditingToolbar.d.cts +1 -0
- package/dist/components/EditingToolbar.d.ts +1 -0
- package/dist/components/ElementEditorErrorBoundary.d.cts +28 -0
- package/dist/components/ElementEditorErrorBoundary.d.ts +28 -0
- package/dist/components/ElementEditorUIProvider.d.cts +50 -0
- package/dist/components/ElementEditorUIProvider.d.ts +50 -0
- package/dist/components/FeatureMapContextMenu.d.cts +23 -0
- package/dist/components/FeatureMapContextMenu.d.ts +23 -0
- package/dist/components/FitBoundsButton.d.cts +6 -0
- package/dist/components/FitBoundsButton.d.ts +6 -0
- package/dist/components/FloatingToolbar.d.cts +3 -0
- package/dist/components/FloatingToolbar.d.ts +3 -0
- package/dist/components/LocateButton.d.cts +11 -0
- package/dist/components/LocateButton.d.ts +11 -0
- package/dist/components/ReadonlyBanner.d.cts +1 -0
- package/dist/components/ReadonlyBanner.d.ts +1 -0
- package/dist/components/ShortcutsModal.d.cts +1 -0
- package/dist/components/ShortcutsModal.d.ts +1 -0
- package/dist/components/SimplifyPanel.d.cts +1 -0
- package/dist/components/SimplifyPanel.d.ts +1 -0
- package/dist/components/SmoothPanel.d.cts +1 -0
- package/dist/components/SmoothPanel.d.ts +1 -0
- package/dist/components/UndoRedoToolbar.d.cts +20 -0
- package/dist/components/UndoRedoToolbar.d.ts +20 -0
- package/dist/components/VertexSelectionBar.d.cts +12 -0
- package/dist/components/VertexSelectionBar.d.ts +12 -0
- package/dist/components/ZoomIndicator.d.cts +15 -0
- package/dist/components/ZoomIndicator.d.ts +15 -0
- package/dist/components/dialogs/DynamicFieldRenderer.d.cts +11 -0
- package/dist/components/dialogs/DynamicFieldRenderer.d.ts +11 -0
- package/dist/components/dialogs/SettingsModal.d.cts +1 -0
- package/dist/components/dialogs/SettingsModal.d.ts +1 -0
- package/dist/components/lazyParts.d.cts +12 -0
- package/dist/components/lazyParts.d.ts +12 -0
- package/dist/components/sidebar/FeatureEditModal.d.cts +6 -0
- package/dist/components/sidebar/FeatureEditModal.d.ts +6 -0
- package/dist/components/sidebar/FeatureList.d.cts +4 -0
- package/dist/components/sidebar/FeatureList.d.ts +4 -0
- package/dist/components/sidebar/FeatureRow.d.cts +38 -0
- package/dist/components/sidebar/FeatureRow.d.ts +38 -0
- package/dist/components/sidebar/FeatureRowContextMenu.d.cts +12 -0
- package/dist/components/sidebar/FeatureRowContextMenu.d.ts +12 -0
- package/dist/components/sidebar/FeatureSidePanel.d.cts +8 -0
- package/dist/components/sidebar/FeatureSidePanel.d.ts +8 -0
- package/dist/components/sidebar/GeoJSONModal.d.cts +5 -0
- package/dist/components/sidebar/GeoJSONModal.d.ts +5 -0
- package/dist/components/sidebar/GroupRow.d.cts +21 -0
- package/dist/components/sidebar/GroupRow.d.ts +21 -0
- package/dist/components/sidebar/HideLayersToggle.d.cts +2 -0
- package/dist/components/sidebar/HideLayersToggle.d.ts +2 -0
- package/dist/components/sidebar/LayersPanel.d.cts +5 -0
- package/dist/components/sidebar/LayersPanel.d.ts +5 -0
- package/dist/components/sidebar/PartSubRow.d.cts +9 -0
- package/dist/components/sidebar/PartSubRow.d.ts +9 -0
- package/dist/components/sidebar/SchemaEditor.d.cts +4 -0
- package/dist/components/sidebar/SchemaEditor.d.ts +4 -0
- package/dist/components/sidebar/SchemaModal.d.cts +5 -0
- package/dist/components/sidebar/SchemaModal.d.ts +5 -0
- package/dist/components/sidebar/codeDock.d.cts +21 -0
- package/dist/components/sidebar/codeDock.d.ts +21 -0
- package/dist/components/ui/Button.d.cts +9 -0
- package/dist/components/ui/Button.d.ts +9 -0
- package/dist/components/ui/CloseButton.d.cts +6 -0
- package/dist/components/ui/CloseButton.d.ts +6 -0
- package/dist/components/ui/ContextMenu.d.cts +28 -0
- package/dist/components/ui/ContextMenu.d.ts +28 -0
- package/dist/components/ui/EditToolbarBtn.d.cts +13 -0
- package/dist/components/ui/EditToolbarBtn.d.ts +13 -0
- package/dist/components/ui/ElementToaster.d.cts +3 -0
- package/dist/components/ui/ElementToaster.d.ts +3 -0
- package/dist/components/ui/GeometryTypeIcon.d.cts +7 -0
- package/dist/components/ui/GeometryTypeIcon.d.ts +7 -0
- package/dist/components/ui/IconButton.d.cts +28 -0
- package/dist/components/ui/IconButton.d.ts +28 -0
- package/dist/components/ui/Input.d.cts +14 -0
- package/dist/components/ui/Input.d.ts +14 -0
- package/dist/components/ui/JsonCode.d.cts +4 -0
- package/dist/components/ui/JsonCode.d.ts +4 -0
- package/dist/components/ui/Kbd.d.cts +16 -0
- package/dist/components/ui/Kbd.d.ts +16 -0
- package/dist/components/ui/NoFeaturesEmptyState.d.cts +1 -0
- package/dist/components/ui/NoFeaturesEmptyState.d.ts +1 -0
- package/dist/components/ui/SearchDropdown.d.cts +28 -0
- package/dist/components/ui/SearchDropdown.d.ts +28 -0
- package/dist/components/ui/ToolButton.d.cts +19 -0
- package/dist/components/ui/ToolButton.d.ts +19 -0
- package/dist/components/ui/Tooltip.d.cts +12 -0
- package/dist/components/ui/Tooltip.d.ts +12 -0
- package/dist/components/ui/panelHeader.d.cts +2 -0
- package/dist/components/ui/panelHeader.d.ts +2 -0
- package/dist/components/ui/resizeEdge.d.cts +4 -0
- package/dist/components/ui/resizeEdge.d.ts +4 -0
- package/dist/contexts/ElementEditorConfigContext.d.cts +351 -0
- package/dist/contexts/ElementEditorConfigContext.d.ts +351 -0
- package/dist/contexts/EventContext.d.cts +69 -0
- package/dist/contexts/EventContext.d.ts +69 -0
- package/dist/contexts/MapControllerContext.d.cts +24 -0
- package/dist/contexts/MapControllerContext.d.ts +24 -0
- package/dist/contexts/ShortcutConfigContext.d.cts +16 -0
- package/dist/contexts/ShortcutConfigContext.d.ts +16 -0
- package/dist/contexts/ThemeContext.d.cts +12 -0
- package/dist/contexts/ThemeContext.d.ts +12 -0
- package/dist/element-editor-ui.cjs +1 -0
- package/dist/element-editor-ui.es.js +102 -0
- package/dist/geometryWorker-CCwg4tNC.cjs +1 -0
- package/dist/geometryWorker-DgQCFSmD.js +25 -0
- package/dist/hooks/dragShield.d.cts +7 -0
- package/dist/hooks/dragShield.d.ts +7 -0
- package/dist/hooks/themeInputs.d.cts +14 -0
- package/dist/hooks/themeInputs.d.ts +14 -0
- package/dist/hooks/useAccentPalette.d.cts +15 -0
- package/dist/hooks/useAccentPalette.d.ts +15 -0
- package/dist/hooks/useAccentStyle.d.cts +39 -0
- package/dist/hooks/useAccentStyle.d.ts +39 -0
- package/dist/hooks/useAdapterControls.d.cts +280 -0
- package/dist/hooks/useAdapterControls.d.ts +280 -0
- package/dist/hooks/useBalancedWrap.d.cts +8 -0
- package/dist/hooks/useBalancedWrap.d.ts +8 -0
- package/dist/hooks/useContextMenu.d.cts +11 -0
- package/dist/hooks/useContextMenu.d.ts +11 -0
- package/dist/hooks/useDataChangeSubscription.d.cts +9 -0
- package/dist/hooks/useDataChangeSubscription.d.ts +9 -0
- package/dist/hooks/useDragWindow.d.cts +9 -0
- package/dist/hooks/useDragWindow.d.ts +9 -0
- package/dist/hooks/useFocusTrap.d.cts +7 -0
- package/dist/hooks/useFocusTrap.d.ts +7 -0
- package/dist/hooks/useGeoJSONDrop.d.cts +40 -0
- package/dist/hooks/useGeoJSONDrop.d.ts +40 -0
- package/dist/hooks/useGeoJSONExport.d.cts +69 -0
- package/dist/hooks/useGeoJSONExport.d.ts +69 -0
- package/dist/hooks/useGeoJSONFileImport.d.cts +24 -0
- package/dist/hooks/useGeoJSONFileImport.d.ts +24 -0
- package/dist/hooks/useInlineRename.d.cts +26 -0
- package/dist/hooks/useInlineRename.d.ts +26 -0
- package/dist/hooks/useJumpToFeature.d.cts +3 -0
- package/dist/hooks/useJumpToFeature.d.ts +3 -0
- package/dist/hooks/useKeyboardShortcuts.d.cts +9 -0
- package/dist/hooks/useKeyboardShortcuts.d.ts +9 -0
- package/dist/hooks/useNominatim.d.cts +24 -0
- package/dist/hooks/useNominatim.d.ts +24 -0
- package/dist/hooks/usePanelOffset.d.cts +14 -0
- package/dist/hooks/usePanelOffset.d.ts +14 -0
- package/dist/hooks/useResizablePanel.d.cts +4 -0
- package/dist/hooks/useResizablePanel.d.ts +4 -0
- package/dist/hooks/useRootTokens.d.cts +27 -0
- package/dist/hooks/useRootTokens.d.ts +27 -0
- package/dist/hooks/useSearchState.d.cts +23 -0
- package/dist/hooks/useSearchState.d.ts +23 -0
- package/dist/hooks/useServiceAttribution.d.cts +13 -0
- package/dist/hooks/useServiceAttribution.d.ts +13 -0
- package/dist/hooks/useWindowEscape.d.cts +25 -0
- package/dist/hooks/useWindowEscape.d.ts +25 -0
- package/dist/hooks/useWindowFocus.d.cts +4 -0
- package/dist/hooks/useWindowFocus.d.ts +4 -0
- package/dist/hooks/useWorkerGeometryPreview.d.cts +22 -0
- package/dist/hooks/useWorkerGeometryPreview.d.ts +22 -0
- package/dist/index-BKdDZ4Y9.cjs +1 -0
- package/dist/index-CtZterPc.js +3165 -0
- package/dist/index.d.cts +89 -0
- package/dist/index.d.ts +89 -0
- package/dist/internal.cjs +1 -0
- package/dist/internal.d.cts +16 -0
- package/dist/internal.d.ts +16 -0
- package/dist/internal.es.js +42 -0
- package/dist/primitives.cjs +1 -0
- package/dist/primitives.d.cts +19 -0
- package/dist/primitives.d.ts +19 -0
- package/dist/primitives.es.js +17 -0
- package/dist/store/StoreContext.d.cts +17 -0
- package/dist/store/StoreContext.d.ts +17 -0
- package/dist/types/events.d.cts +95 -0
- package/dist/types/events.d.ts +95 -0
- package/dist/useAccentStyle-CPo2XqAn.js +412 -0
- package/dist/useAccentStyle-hsGvyHZc.cjs +1 -0
- package/dist/useAdapterControls-BBObhzVX.cjs +1 -0
- package/dist/useAdapterControls-DVjkwRZ_.js +691 -0
- package/dist/useContextMenu-DJ2Cti85.js +10 -0
- package/dist/useContextMenu-DbxMvb1s.cjs +1 -0
- package/dist/useFocusTrap-BBjPCfDR.cjs +1 -0
- package/dist/useFocusTrap-CKxKT8De.js +25 -0
- package/dist/useJumpToFeature-Bdz2hqOC.js +16 -0
- package/dist/useJumpToFeature-LwjxGzfy.cjs +1 -0
- package/dist/useWindowFocus-D-_yEm_V.cjs +1 -0
- package/dist/useWindowFocus-DGAWA1au.js +80 -0
- package/dist/utils/booleanValue.d.cts +4 -0
- package/dist/utils/booleanValue.d.ts +4 -0
- package/dist/utils/clipboardError.d.cts +3 -0
- package/dist/utils/clipboardError.d.ts +3 -0
- package/dist/utils/download.d.cts +42 -0
- package/dist/utils/download.d.ts +42 -0
- package/dist/utils/geojsonDocument.d.cts +168 -0
- package/dist/utils/geojsonDocument.d.ts +168 -0
- package/dist/utils/geometryWorkerClient.d.cts +6 -0
- package/dist/utils/geometryWorkerClient.d.ts +6 -0
- package/dist/utils/layerOrder.d.cts +9 -0
- package/dist/utils/layerOrder.d.ts +9 -0
- package/dist/utils/lazyWithPreload.d.cts +24 -0
- package/dist/utils/lazyWithPreload.d.ts +24 -0
- package/dist/utils/lineSmooth.d.cts +7 -0
- package/dist/utils/lineSmooth.d.ts +7 -0
- package/dist/utils/platform.d.cts +2 -0
- package/dist/utils/platform.d.ts +2 -0
- package/dist/workers/geometryWorker.d.cts +1 -0
- package/dist/workers/geometryWorker.d.ts +1 -0
- package/package.json +133 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useRef as x, useCallback as w, useEffect as y } from "react";
|
|
3
|
+
import { u as v, e as k } from "./useAccentStyle-CPo2XqAn.js";
|
|
4
|
+
import { readStorage as _, writeStorage as S } from "@element-editor/core";
|
|
5
|
+
import { createPortal as E } from "react-dom";
|
|
6
|
+
import { u as C, d as D } from "./useAdapterControls-DVjkwRZ_.js";
|
|
7
|
+
import { u as N, a as F, C as W } from "./useWindowFocus-DGAWA1au.js";
|
|
8
|
+
import { u as H } from "./useFocusTrap-CKxKT8De.js";
|
|
9
|
+
import { F as M } from "./index-CtZterPc.js";
|
|
10
|
+
const c = "elm_feature_win_size";
|
|
11
|
+
function B({ dialogState: u }) {
|
|
12
|
+
const { pos: a, onHandleMouseDown: m } = N("elm_feature_win", { x: 80, y: 120 }), s = v(), { zIndex: d, focus: f } = F(), b = C((e) => e.closeDialog), [r] = g(() => {
|
|
13
|
+
try {
|
|
14
|
+
const e = _(c, s);
|
|
15
|
+
return e ? JSON.parse(e) : null;
|
|
16
|
+
} catch {
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
}), o = x(null), n = w(() => {
|
|
20
|
+
const e = o.current;
|
|
21
|
+
e && S(c, JSON.stringify({ w: e.offsetWidth, h: e.offsetHeight }), s);
|
|
22
|
+
}, [s]);
|
|
23
|
+
y(() => {
|
|
24
|
+
const e = o.current;
|
|
25
|
+
if (!e) return;
|
|
26
|
+
const l = new ResizeObserver(n);
|
|
27
|
+
return l.observe(e), () => l.disconnect();
|
|
28
|
+
}, [n]), H(o);
|
|
29
|
+
const h = k(), p = D();
|
|
30
|
+
return E(
|
|
31
|
+
/* @__PURE__ */ i(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref: o,
|
|
35
|
+
"data-elm-portal": !0,
|
|
36
|
+
"data-elm-theme": p,
|
|
37
|
+
onMouseDownCapture: f,
|
|
38
|
+
role: "dialog",
|
|
39
|
+
"aria-label": "Edit feature",
|
|
40
|
+
className: "absolute flex flex-col bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm-raised rounded-elm-window overflow-hidden",
|
|
41
|
+
style: {
|
|
42
|
+
...h,
|
|
43
|
+
left: a.x,
|
|
44
|
+
top: a.y,
|
|
45
|
+
zIndex: d,
|
|
46
|
+
resize: "both",
|
|
47
|
+
overflow: "hidden",
|
|
48
|
+
minWidth: 280,
|
|
49
|
+
minHeight: 200,
|
|
50
|
+
width: (r == null ? void 0 : r.w) ?? 320,
|
|
51
|
+
height: (r == null ? void 0 : r.h) ?? 600,
|
|
52
|
+
maxWidth: "90%",
|
|
53
|
+
maxHeight: "85%"
|
|
54
|
+
},
|
|
55
|
+
children: [
|
|
56
|
+
/* @__PURE__ */ i(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
onMouseDown: m,
|
|
60
|
+
className: "flex items-center justify-between px-4 py-2 border-b border-elm-border flex-shrink-0 select-none bg-(--elm-surface-sunken,color-mix(in_oklab,var(--color-gray-50)_50%,transparent)) dark:bg-(--elm-surface-sunken,color-mix(in_oklab,var(--color-gray-800)_50%,transparent))",
|
|
61
|
+
style: { cursor: "grab" },
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ t("span", { className: "text-sm font-semibold text-(--elm-text,var(--color-gray-900)) dark:text-(--elm-text,var(--color-gray-100))", children: "Edit feature" }),
|
|
64
|
+
/* @__PURE__ */ t(W, { onClick: b, label: "Close editor" })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ t("div", { className: "flex-1 overflow-hidden min-h-0 relative bg-elm-surface", children: /* @__PURE__ */ t(M, { dialogState: u }) })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
document.body
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
export {
|
|
76
|
+
B as default
|
|
77
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("react"),u=require("./useAccentStyle-hsGvyHZc.cjs"),d=require("@element-editor/core"),v=require("react-dom"),m=require("./useAdapterControls-BBObhzVX.cjs"),l=require("./useWindowFocus-D-_yEm_V.cjs"),S=require("./useFocusTrap-BBjPCfDR.cjs"),k=require("./index-BKdDZ4Y9.cjs"),f="elm_feature_win_size";function _({dialogState:b}){const{pos:a,onHandleMouseDown:h}=l.useDragWindow("elm_feature_win",{x:80,y:120}),n=u.useElementEditorConfig(),{zIndex:x,focus:g}=l.useWindowFocus(),w=m.useUIStore(e=>e.closeDialog),[r]=s.useState(()=>{try{const e=d.readStorage(f,n);return e?JSON.parse(e):null}catch{return null}}),o=s.useRef(null),c=s.useCallback(()=>{const e=o.current;e&&d.writeStorage(f,JSON.stringify({w:e.offsetWidth,h:e.offsetHeight}),n)},[n]);s.useEffect(()=>{const e=o.current;if(!e)return;const i=new ResizeObserver(c);return i.observe(e),()=>i.disconnect()},[c]),S.useFocusTrap(o);const y=u.useAccentStyle(),p=m.useTheme();return v.createPortal(t.jsxs("div",{ref:o,"data-elm-portal":!0,"data-elm-theme":p,onMouseDownCapture:g,role:"dialog","aria-label":"Edit feature",className:"absolute flex flex-col bg-elm-surface/95 backdrop-blur-md border border-elm-border/80 shadow-elm-raised rounded-elm-window overflow-hidden",style:{...y,left:a.x,top:a.y,zIndex:x,resize:"both",overflow:"hidden",minWidth:280,minHeight:200,width:(r==null?void 0:r.w)??320,height:(r==null?void 0:r.h)??600,maxWidth:"90%",maxHeight:"85%"},children:[t.jsxs("div",{onMouseDown:h,className:"flex items-center justify-between px-4 py-2 border-b border-elm-border flex-shrink-0 select-none bg-(--elm-surface-sunken,color-mix(in_oklab,var(--color-gray-50)_50%,transparent)) dark:bg-(--elm-surface-sunken,color-mix(in_oklab,var(--color-gray-800)_50%,transparent))",style:{cursor:"grab"},children:[t.jsx("span",{className:"text-sm font-semibold text-(--elm-text,var(--color-gray-900)) dark:text-(--elm-text,var(--color-gray-100))",children:"Edit feature"}),t.jsx(l.CloseButton,{onClick:w,label:"Close editor"})]}),t.jsx("div",{className:"flex-1 overflow-hidden min-h-0 relative bg-elm-surface",children:t.jsx(k.FeatureSidePanel,{dialogState:b})})]}),document.body)}exports.default=_;
|
|
@@ -0,0 +1,520 @@
|
|
|
1
|
+
import { jsxs as B, Fragment as Me, jsx as S } from "react/jsx-runtime";
|
|
2
|
+
import { e as Le, u as $, f as y, d as $e, g as We } from "./useAdapterControls-DVjkwRZ_.js";
|
|
3
|
+
import { useMemo as ie, useState as U, useCallback as D, useRef as Ge, useEffect as ae, memo as Ye } from "react";
|
|
4
|
+
import { clsx as Ke } from "clsx";
|
|
5
|
+
import { createPortal as Xe } from "react-dom";
|
|
6
|
+
import { DragDropContext as qe, Droppable as Pe, Draggable as Oe } from "@hello-pangea/dnd";
|
|
7
|
+
import { useVirtualizer as Qe, elementScroll as Ze, observeElementOffset as et } from "@tanstack/react-virtual";
|
|
8
|
+
import { u as tt } from "./useJumpToFeature-Bdz2hqOC.js";
|
|
9
|
+
import { getGeometryBBox as nt } from "@element-editor/core";
|
|
10
|
+
import { isMultiGeometry as de, getPartBBox as rt, getPartCount as He } from "@element-editor/core/internal";
|
|
11
|
+
import { g as ot, d as st, N as it, G as lt, e as ke, P as at } from "./index-CtZterPc.js";
|
|
12
|
+
import { F as dt } from "./FeatureRowContextMenu-BLt7VlUU.js";
|
|
13
|
+
import { u as ct } from "./useContextMenu-DJ2Cti85.js";
|
|
14
|
+
import { e as ut } from "./useAccentStyle-CPo2XqAn.js";
|
|
15
|
+
const Z = 36, gt = 5, le = [];
|
|
16
|
+
function mt(R, i) {
|
|
17
|
+
const o = R.scrollElement;
|
|
18
|
+
if (!o) return;
|
|
19
|
+
const I = new ResizeObserver(([h]) => {
|
|
20
|
+
var b;
|
|
21
|
+
const p = (b = h.borderBoxSize) == null ? void 0 : b[0];
|
|
22
|
+
i(p ? { width: Math.round(p.inlineSize), height: Math.round(p.blockSize) } : { width: Math.round(h.contentRect.width), height: Math.round(h.contentRect.height) });
|
|
23
|
+
});
|
|
24
|
+
return I.observe(o, { box: "border-box" }), () => I.disconnect();
|
|
25
|
+
}
|
|
26
|
+
function pt(R, i) {
|
|
27
|
+
const o = R.scrollElement;
|
|
28
|
+
if (!o) return;
|
|
29
|
+
const I = et(R, i), h = new ResizeObserver(() => {
|
|
30
|
+
h.disconnect(), i(o.scrollTop, !1);
|
|
31
|
+
});
|
|
32
|
+
return h.observe(o), () => {
|
|
33
|
+
h.disconnect(), I == null || I();
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function ft(R, i, o) {
|
|
37
|
+
i.adjustments === void 0 && i.behavior === void 0 && R === o.scrollOffset || Ze(R, i, o);
|
|
38
|
+
}
|
|
39
|
+
function Ce({
|
|
40
|
+
droppableId: R,
|
|
41
|
+
features: i,
|
|
42
|
+
scrollElement: o,
|
|
43
|
+
listElement: I,
|
|
44
|
+
collapsed: h,
|
|
45
|
+
expandedIds: p,
|
|
46
|
+
renderItem: b,
|
|
47
|
+
renderClone: C,
|
|
48
|
+
scrollToId: E,
|
|
49
|
+
showEmptyAffordance: z = !0
|
|
50
|
+
}) {
|
|
51
|
+
const j = h ? 0 : i.length, [M, H] = U(null), x = Ge(null), F = D((l) => {
|
|
52
|
+
var c;
|
|
53
|
+
(c = x.current) == null || c.call(x, l), H(l);
|
|
54
|
+
}, []), [P, O] = U(0);
|
|
55
|
+
ae(() => {
|
|
56
|
+
if (!M || !o) return;
|
|
57
|
+
const l = new ResizeObserver(() => {
|
|
58
|
+
const c = M.getBoundingClientRect().top - o.getBoundingClientRect().top - o.clientTop + o.scrollTop;
|
|
59
|
+
O(Math.round(c));
|
|
60
|
+
});
|
|
61
|
+
return l.observe(M), I && l.observe(I), () => l.disconnect();
|
|
62
|
+
}, [M, I, o]);
|
|
63
|
+
const k = D(
|
|
64
|
+
(l) => {
|
|
65
|
+
var c;
|
|
66
|
+
return ((c = i[l]) == null ? void 0 : c.id) ?? l;
|
|
67
|
+
},
|
|
68
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
69
|
+
[i, p]
|
|
70
|
+
), G = Qe({
|
|
71
|
+
count: j,
|
|
72
|
+
getScrollElement: () => o,
|
|
73
|
+
estimateSize: (l) => {
|
|
74
|
+
const c = i[l];
|
|
75
|
+
return !c || !p.has(c.id) || !de(c.geometry) ? Z : Z * (1 + He(c.geometry)) + (l < i.length - 1 ? gt : 0);
|
|
76
|
+
},
|
|
77
|
+
overscan: 6,
|
|
78
|
+
getItemKey: k,
|
|
79
|
+
scrollMargin: P,
|
|
80
|
+
initialRect: { width: 0, height: typeof window > "u" ? 800 : window.innerHeight },
|
|
81
|
+
observeElementRect: mt,
|
|
82
|
+
observeElementOffset: pt,
|
|
83
|
+
scrollToFn: ft
|
|
84
|
+
}), A = E && !h ? i.findIndex((l) => l.id === E) : -1;
|
|
85
|
+
return ae(() => {
|
|
86
|
+
if (A < 0) return;
|
|
87
|
+
const l = G.getVirtualItems(), c = l.length > 0 && A > l[0].index - 50 && A < l[l.length - 1].index + 50;
|
|
88
|
+
G.scrollToIndex(A, { align: "auto", behavior: c ? "smooth" : "auto" });
|
|
89
|
+
}, [A, G]), /* @__PURE__ */ S(Pe, { droppableId: R, type: "feature", mode: "virtual", renderClone: C, children: (l, c) => {
|
|
90
|
+
x.current = l.innerRef;
|
|
91
|
+
const _ = !h && i.length === 0, ee = _ && z, W = h ? c.isDraggingOver ? 32 : 4 : _ ? z ? 48 : Z : G.getTotalSize() + (c.isDraggingOver ? Z : 0);
|
|
92
|
+
return /* @__PURE__ */ B(
|
|
93
|
+
"ul",
|
|
94
|
+
{
|
|
95
|
+
ref: F,
|
|
96
|
+
...l.droppableProps,
|
|
97
|
+
className: "rounded-elm-control",
|
|
98
|
+
style: {
|
|
99
|
+
height: W,
|
|
100
|
+
position: "relative",
|
|
101
|
+
// The empty-state drop zone has its own dashed border, so skip the
|
|
102
|
+
// outer outline in that case to avoid a double border.
|
|
103
|
+
background: c.isDraggingOver && !_ ? "color-mix(in srgb, var(--color-primary-500) 8%, transparent)" : void 0,
|
|
104
|
+
outline: c.isDraggingOver && !_ ? "1px dashed color-mix(in srgb, var(--color-primary-500) 40%, transparent)" : void 0,
|
|
105
|
+
borderRadius: "6px",
|
|
106
|
+
overflow: "hidden"
|
|
107
|
+
},
|
|
108
|
+
children: [
|
|
109
|
+
h && c.isDraggingOver && /* @__PURE__ */ S("li", { style: { listStyle: "none" }, className: "px-2 py-1.5 text-xs text-primary-400 italic", children: "Drop here" }),
|
|
110
|
+
ee && /* @__PURE__ */ S(
|
|
111
|
+
"li",
|
|
112
|
+
{
|
|
113
|
+
style: { listStyle: "none" },
|
|
114
|
+
className: Ke(
|
|
115
|
+
"mx-1 my-1 h-9 flex items-center justify-center rounded-elm-control border border-dashed text-xs transition-colors",
|
|
116
|
+
c.isDraggingOver ? "border-primary-400 text-primary-500 bg-primary-50/40 dark:bg-white/5" : "border-(--elm-border-strong,var(--color-gray-300)) dark:border-(--elm-border-strong,var(--color-gray-700)) text-elm-text-subtle"
|
|
117
|
+
),
|
|
118
|
+
children: c.isDraggingOver ? "Drop here" : "Drag here"
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
!h && G.getVirtualItems().map((w) => {
|
|
122
|
+
const V = i[w.index];
|
|
123
|
+
return V ? /* @__PURE__ */ S(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
"data-index": w.index,
|
|
127
|
+
style: {
|
|
128
|
+
position: "absolute",
|
|
129
|
+
top: 0,
|
|
130
|
+
left: 0,
|
|
131
|
+
width: "100%",
|
|
132
|
+
transform: `translateY(${w.start - P}px)`
|
|
133
|
+
},
|
|
134
|
+
children: b(V, w.index, w.index === i.length - 1, i[w.index - 1], i[w.index + 1])
|
|
135
|
+
},
|
|
136
|
+
V.id
|
|
137
|
+
) : null;
|
|
138
|
+
})
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
} });
|
|
143
|
+
}
|
|
144
|
+
function ht(R) {
|
|
145
|
+
if (R.length === 0) return null;
|
|
146
|
+
let i = 1 / 0, o = 1 / 0, I = -1 / 0, h = -1 / 0;
|
|
147
|
+
for (const p of R) {
|
|
148
|
+
const b = p.bbox || nt(p.geometry);
|
|
149
|
+
b[0] < i && (i = b[0]), b[1] < o && (o = b[1]), b[2] > I && (I = b[2]), b[3] > h && (h = b[3]);
|
|
150
|
+
}
|
|
151
|
+
return [i, o, I, h];
|
|
152
|
+
}
|
|
153
|
+
const bt = Ye(function({
|
|
154
|
+
feature: i,
|
|
155
|
+
index: o,
|
|
156
|
+
isLast: I,
|
|
157
|
+
isSelected: h,
|
|
158
|
+
isMultiSelected: p,
|
|
159
|
+
isContextMenuActive: b,
|
|
160
|
+
isGhosted: C,
|
|
161
|
+
renameActive: E,
|
|
162
|
+
isExpanded: z,
|
|
163
|
+
selectedPartIndex: j,
|
|
164
|
+
joinTop: M,
|
|
165
|
+
joinBottom: H,
|
|
166
|
+
h: x
|
|
167
|
+
}) {
|
|
168
|
+
const F = i.id, P = D(() => x.onRenameEnd(F), [x, F]), O = D((T) => x.onRenameTab(F, T), [x, F]), k = $((T) => T.readonly);
|
|
169
|
+
return /* @__PURE__ */ S(Oe, { draggableId: F, index: o, isDragDisabled: k, children: (T, G) => /* @__PURE__ */ B(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
ref: T.innerRef,
|
|
173
|
+
...T.draggableProps,
|
|
174
|
+
...T.dragHandleProps,
|
|
175
|
+
style: { outline: "none", ...T.draggableProps.style },
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ S(
|
|
178
|
+
ke,
|
|
179
|
+
{
|
|
180
|
+
feature: i,
|
|
181
|
+
isDragging: G.isDragging,
|
|
182
|
+
isSelected: h,
|
|
183
|
+
onRowClick: x.onRowClick,
|
|
184
|
+
onRowSelectOnly: x.onRowSelectOnly,
|
|
185
|
+
onRowJump: x.onRowJump,
|
|
186
|
+
onEdit: x.onEdit,
|
|
187
|
+
onToggleHidden: x.onToggleHidden,
|
|
188
|
+
onRename: x.onRename,
|
|
189
|
+
isMultiSelected: p,
|
|
190
|
+
onMultiSelectToggle: x.onMultiSelectToggle,
|
|
191
|
+
onRangeSelect: x.onRangeSelect,
|
|
192
|
+
isContextMenuActive: b,
|
|
193
|
+
isGhosted: C,
|
|
194
|
+
renameActive: E,
|
|
195
|
+
onRenameEnd: P,
|
|
196
|
+
onRenameTab: O,
|
|
197
|
+
joinTop: M,
|
|
198
|
+
joinBottom: H
|
|
199
|
+
}
|
|
200
|
+
),
|
|
201
|
+
z && !G.isDragging && /* @__PURE__ */ B(Me, { children: [
|
|
202
|
+
Array.from({ length: He(i.geometry) }, (A, l) => /* @__PURE__ */ S(
|
|
203
|
+
at,
|
|
204
|
+
{
|
|
205
|
+
geometry: i.geometry,
|
|
206
|
+
partIndex: l,
|
|
207
|
+
isSelected: j === l,
|
|
208
|
+
onClick: () => x.onPartClick(F, l)
|
|
209
|
+
},
|
|
210
|
+
`${F}:${l}`
|
|
211
|
+
)),
|
|
212
|
+
!I && /* @__PURE__ */ S("div", { className: "border-b border-elm-border mx-2 mt-1" })
|
|
213
|
+
] })
|
|
214
|
+
]
|
|
215
|
+
}
|
|
216
|
+
) });
|
|
217
|
+
});
|
|
218
|
+
function Pt({
|
|
219
|
+
autoFocusGroupId: R,
|
|
220
|
+
scrollElement: i
|
|
221
|
+
}) {
|
|
222
|
+
var Te;
|
|
223
|
+
const { dataStore: o, uiStore: I } = Le(), h = $((e) => e.readonly), p = y((e) => e.features), b = y((e) => e.groups), C = y((e) => e.selectedIds), E = ie(() => new Set(C), [C]), z = ut(), j = $e(), M = ie(() => {
|
|
224
|
+
const e = /* @__PURE__ */ new Map();
|
|
225
|
+
for (const t of p) {
|
|
226
|
+
const n = t.groupId || null, r = e.get(n);
|
|
227
|
+
r ? r.push(t) : e.set(n, [t]);
|
|
228
|
+
}
|
|
229
|
+
return e;
|
|
230
|
+
}, [p]), H = C.length === 1 ? C[0] : null, x = y((e) => e.selectedGroupId), F = y((e) => e.selectGroup), P = y((e) => e.selectFeature), O = y((e) => e.toggleSelection), k = y((e) => e.setSelection), T = y((e) => e.updateGroup), G = y((e) => e.deleteGroup), A = y((e) => e.toggleGroupCollapsed), l = y((e) => e.moveFeatureToGroup), c = y((e) => e.reorderFeatures), _ = y((e) => e.reorderGroups), ee = y((e) => e.toggleGroupHidden), W = $((e) => e.openEditDialog), { fitBounds: w } = We(), V = y((e) => e.updateFeature), ce = y((e) => e.toggleFeatureHidden), Ae = $((e) => e.selectedPartIndex), ue = $((e) => e.setSelectedPartIndex), [te, ze] = U(() => /* @__PURE__ */ new Set()), ge = D((e) => {
|
|
231
|
+
ze((t) => {
|
|
232
|
+
const n = new Set(t);
|
|
233
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
234
|
+
});
|
|
235
|
+
}, []), [J, me] = U(null), [ne, Y] = U(null), K = Ge(null), pe = D((e, t) => {
|
|
236
|
+
const n = o.getState(), r = ot(n.features, n.groups), u = r.indexOf(e);
|
|
237
|
+
if (u < 0) {
|
|
238
|
+
Y(null);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const s = t === "next" ? u + 1 : u - 1;
|
|
242
|
+
if (s < 0 || s >= r.length) {
|
|
243
|
+
Y(null);
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
Y(r[s]);
|
|
247
|
+
}, [o]), fe = D((e) => {
|
|
248
|
+
Y((t) => t === e ? null : t);
|
|
249
|
+
}, []), N = ct(), [X, Ne] = U(null), he = i ?? null;
|
|
250
|
+
ae(() => {
|
|
251
|
+
const e = X;
|
|
252
|
+
if (!e) return;
|
|
253
|
+
const t = (n) => {
|
|
254
|
+
let r = n.target;
|
|
255
|
+
for (; r && r !== e; ) {
|
|
256
|
+
const u = r.dataset.featureId;
|
|
257
|
+
if (u) {
|
|
258
|
+
n.preventDefault();
|
|
259
|
+
const s = o.getState().features.find((a) => a.id === u);
|
|
260
|
+
s && N.open(n.clientX, n.clientY, s);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
r = r.parentElement;
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
return e.addEventListener("contextmenu", t, { capture: !0 }), () => e.removeEventListener("contextmenu", t, { capture: !0 });
|
|
267
|
+
}, [N.open, o, X]);
|
|
268
|
+
const be = D((e) => {
|
|
269
|
+
const t = o.getState(), n = t.selectedIds.length === 1 ? t.selectedIds[0] : K.current;
|
|
270
|
+
if (K.current = e, !n) {
|
|
271
|
+
O(e);
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
const r = st(t.features, t.groups), u = r.indexOf(n), s = r.indexOf(e);
|
|
275
|
+
if (u === -1 || s === -1) {
|
|
276
|
+
O(e);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
const a = Math.min(u, s), f = Math.max(u, s);
|
|
280
|
+
k(r.slice(a, f + 1));
|
|
281
|
+
}, [o, O, k]), xe = D((e, t) => {
|
|
282
|
+
const n = o.getState().features.find((r) => r.id === e);
|
|
283
|
+
n && V(e, { properties: { ...n.properties, name: t } });
|
|
284
|
+
}, [o, V]), Se = tt(), q = D((e) => {
|
|
285
|
+
const t = o.getState().features.find((n) => n.id === e);
|
|
286
|
+
t && Se(t);
|
|
287
|
+
}, [o, Se]), Q = D((e) => {
|
|
288
|
+
const t = o.getState().features.find((n) => n.id === e);
|
|
289
|
+
t && (K.current = e, P(e), de(t.geometry) && ge(e));
|
|
290
|
+
}, [o, P, ge]), Ie = D((e) => {
|
|
291
|
+
Q(e), q(e);
|
|
292
|
+
}, [Q, q]), ye = D((e) => {
|
|
293
|
+
O(e), K.current = e;
|
|
294
|
+
}, [O]);
|
|
295
|
+
function Be(e) {
|
|
296
|
+
me(e.draggableId);
|
|
297
|
+
}
|
|
298
|
+
function je(e) {
|
|
299
|
+
const { source: t, destination: n, draggableId: r, type: u } = e;
|
|
300
|
+
if (me(null), !n || t.droppableId === n.droppableId && t.index === n.index || I.getState().readonly) return;
|
|
301
|
+
if (o.getState().takeSnapshot(), u === "group") {
|
|
302
|
+
const f = [...b], [g] = f.splice(t.index, 1);
|
|
303
|
+
f.splice(n.index, 0, g), _(f.map((v) => v.id));
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const s = t.droppableId, a = n.droppableId;
|
|
307
|
+
if (s === a) {
|
|
308
|
+
const g = [...re(s)], [v] = g.splice(t.index, 1);
|
|
309
|
+
g.splice(n.index, 0, v), Re(s, g.map((d) => d.id));
|
|
310
|
+
} else {
|
|
311
|
+
const f = a === "ungrouped" ? null : a, v = E.has(r) && C.length > 1 ? re(s).filter((d) => E.has(d.id)).map((d) => d.id) : [r];
|
|
312
|
+
if (v.length === 1) {
|
|
313
|
+
l(r, f);
|
|
314
|
+
const d = re(a).filter((m) => m.id !== r);
|
|
315
|
+
d.splice(n.index, 0, p.find((m) => m.id === r)), Re(a, d.map((m) => m.id), r);
|
|
316
|
+
} else {
|
|
317
|
+
for (const d of v) l(d, f);
|
|
318
|
+
_e(a, v, n.index);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
function _e(e, t, n) {
|
|
323
|
+
const r = new Set(t), u = t.map((d) => p.find((m) => m.id === d)), s = p.filter((d) => !r.has(d.id)), a = e === "ungrouped", f = s.filter((d) => a ? !d.groupId : d.groupId === e);
|
|
324
|
+
let g;
|
|
325
|
+
if (n < f.length)
|
|
326
|
+
g = s.findIndex((d) => d.id === f[n].id);
|
|
327
|
+
else {
|
|
328
|
+
const d = f[f.length - 1];
|
|
329
|
+
g = d ? s.findIndex((m) => m.id === d.id) + 1 : s.length;
|
|
330
|
+
}
|
|
331
|
+
const v = [
|
|
332
|
+
...s.slice(0, g),
|
|
333
|
+
...u,
|
|
334
|
+
...s.slice(g)
|
|
335
|
+
];
|
|
336
|
+
c(v.map((d) => d.id));
|
|
337
|
+
}
|
|
338
|
+
function re(e) {
|
|
339
|
+
return M.get(e === "ungrouped" ? null : e) ?? le;
|
|
340
|
+
}
|
|
341
|
+
function Re(e, t, n) {
|
|
342
|
+
const r = new Set(t), u = n ? p.find((m) => m.id === n) : null, s = p.filter((m) => m.id !== n), a = s.filter((m) => !r.has(m.id)), f = s.find((m) => r.has(m.id)), g = f ? a.findIndex((m) => m.id === f.id) : a.length, v = t.map(
|
|
343
|
+
(m) => m === n ? u : p.find((Ue) => Ue.id === m)
|
|
344
|
+
), d = [
|
|
345
|
+
...a.slice(0, g),
|
|
346
|
+
...v,
|
|
347
|
+
...a.slice(g)
|
|
348
|
+
];
|
|
349
|
+
c(d.map((m) => m.id));
|
|
350
|
+
}
|
|
351
|
+
const oe = M.get(null) ?? le, Ve = (() => {
|
|
352
|
+
if (!J || !E.has(J) || C.length <= 1) return 1;
|
|
353
|
+
const e = p.find((n) => n.id === J), t = (e == null ? void 0 : e.groupId) ?? null;
|
|
354
|
+
return p.filter((n) => E.has(n.id) && (n.groupId ?? null) === t).length;
|
|
355
|
+
})(), L = ((Te = N.state) == null ? void 0 : Te.data) ?? null, we = D((e, t) => {
|
|
356
|
+
const n = o.getState().features.find((r) => r.id === e);
|
|
357
|
+
n && (P(e), ue(t), w == null || w(rt(n.geometry, t)));
|
|
358
|
+
}, [o, P, ue, w]), Je = ie(() => ({
|
|
359
|
+
onRowClick: Ie,
|
|
360
|
+
onRowSelectOnly: Q,
|
|
361
|
+
onRowJump: q,
|
|
362
|
+
onEdit: W,
|
|
363
|
+
onToggleHidden: ce,
|
|
364
|
+
onRename: xe,
|
|
365
|
+
onMultiSelectToggle: ye,
|
|
366
|
+
onRangeSelect: be,
|
|
367
|
+
onRenameEnd: fe,
|
|
368
|
+
onRenameTab: pe,
|
|
369
|
+
onPartClick: we
|
|
370
|
+
}), [
|
|
371
|
+
Ie,
|
|
372
|
+
Q,
|
|
373
|
+
q,
|
|
374
|
+
W,
|
|
375
|
+
ce,
|
|
376
|
+
xe,
|
|
377
|
+
ye,
|
|
378
|
+
be,
|
|
379
|
+
fe,
|
|
380
|
+
pe,
|
|
381
|
+
we
|
|
382
|
+
]);
|
|
383
|
+
function Ee(e) {
|
|
384
|
+
return (t, n, r) => {
|
|
385
|
+
const u = e[r.source.index];
|
|
386
|
+
return u ? /* @__PURE__ */ S(
|
|
387
|
+
ke,
|
|
388
|
+
{
|
|
389
|
+
feature: u,
|
|
390
|
+
innerRef: t.innerRef,
|
|
391
|
+
containerProps: { ...t.draggableProps, "data-elm-portal": "", "data-elm-theme": j, style: { ...z, ...t.draggableProps.style } },
|
|
392
|
+
dragHandleProps: t.dragHandleProps,
|
|
393
|
+
isDragging: !0,
|
|
394
|
+
isSelected: E.has(u.id),
|
|
395
|
+
dragCountBadge: Ve,
|
|
396
|
+
onRowClick: () => {
|
|
397
|
+
},
|
|
398
|
+
onEdit: () => {
|
|
399
|
+
},
|
|
400
|
+
onToggleHidden: () => {
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
) : /* @__PURE__ */ S("div", { ref: t.innerRef, ...t.draggableProps });
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
const se = (e) => !!e && !(e.groupId && x === e.groupId) && (e.id === H || E.has(e.id)), De = (e) => te.has(e.id) && de(e.geometry);
|
|
407
|
+
function ve(e, t, n = !1, r, u) {
|
|
408
|
+
const s = De(e), a = se(e), f = !!e.groupId && x === e.groupId, g = e.id === H;
|
|
409
|
+
return /* @__PURE__ */ S(
|
|
410
|
+
bt,
|
|
411
|
+
{
|
|
412
|
+
feature: e,
|
|
413
|
+
index: t,
|
|
414
|
+
isLast: n,
|
|
415
|
+
isSelected: !f && g,
|
|
416
|
+
isMultiSelected: !f && E.has(e.id),
|
|
417
|
+
isContextMenuActive: (L == null ? void 0 : L.id) === e.id,
|
|
418
|
+
isGhosted: J !== null && J !== e.id && E.has(e.id) && E.has(J),
|
|
419
|
+
renameActive: ne === e.id,
|
|
420
|
+
isExpanded: s,
|
|
421
|
+
selectedPartIndex: g && s ? Ae : null,
|
|
422
|
+
joinTop: a && se(r) && !De(r),
|
|
423
|
+
joinBottom: a && se(u) && !s,
|
|
424
|
+
h: Je
|
|
425
|
+
},
|
|
426
|
+
e.id
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
const Fe = p.length === 0 && b.length === 0;
|
|
430
|
+
return /* @__PURE__ */ B(Me, { children: [
|
|
431
|
+
N.state && L && /* @__PURE__ */ S(
|
|
432
|
+
dt,
|
|
433
|
+
{
|
|
434
|
+
x: N.state.x,
|
|
435
|
+
y: N.state.y,
|
|
436
|
+
feature: L,
|
|
437
|
+
onClose: N.close
|
|
438
|
+
}
|
|
439
|
+
),
|
|
440
|
+
/* @__PURE__ */ S(qe, { onDragStart: Be, onDragEnd: je, children: /* @__PURE__ */ B("div", { ref: Ne, className: Fe ? "h-full" : "space-y-0.5", children: [
|
|
441
|
+
Fe && /* @__PURE__ */ S(it, {}),
|
|
442
|
+
/* @__PURE__ */ S(Pe, { droppableId: "groups-container", type: "group", children: (e) => /* @__PURE__ */ B("div", { ref: e.innerRef, ...e.droppableProps, children: [
|
|
443
|
+
b.map((t, n) => {
|
|
444
|
+
const r = M.get(t.id) ?? le, u = x === t.id;
|
|
445
|
+
return /* @__PURE__ */ S(Oe, { draggableId: `group:${t.id}`, index: n, isDragDisabled: h, children: (s, a) => {
|
|
446
|
+
const f = /* @__PURE__ */ B(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
ref: s.innerRef,
|
|
450
|
+
...s.draggableProps,
|
|
451
|
+
...a.isDragging && { "data-elm-portal": "", "data-elm-theme": j },
|
|
452
|
+
style: { outline: "none", ...a.isDragging && z, ...s.draggableProps.style },
|
|
453
|
+
children: [
|
|
454
|
+
/* @__PURE__ */ S(
|
|
455
|
+
lt,
|
|
456
|
+
{
|
|
457
|
+
group: t,
|
|
458
|
+
featureCount: r.length,
|
|
459
|
+
autoFocus: t.id === R,
|
|
460
|
+
isSelected: u,
|
|
461
|
+
onToggleCollapse: () => A(t.id),
|
|
462
|
+
onToggleHidden: () => ee(t.id),
|
|
463
|
+
onRename: (g) => T(t.id, { name: g }),
|
|
464
|
+
onDelete: (g) => G(t.id, g),
|
|
465
|
+
onSelect: () => {
|
|
466
|
+
if (r.length === 0) {
|
|
467
|
+
k([]), F(t.id);
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
k(r.map((v) => v.id)), F(t.id);
|
|
471
|
+
const g = ht(r);
|
|
472
|
+
g && (w == null || w(g));
|
|
473
|
+
},
|
|
474
|
+
dragHandleProps: s.dragHandleProps,
|
|
475
|
+
isDragging: a.isDragging
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
!a.isDragging && /* @__PURE__ */ S(
|
|
479
|
+
Ce,
|
|
480
|
+
{
|
|
481
|
+
droppableId: t.id,
|
|
482
|
+
features: r,
|
|
483
|
+
scrollElement: he,
|
|
484
|
+
listElement: X,
|
|
485
|
+
expandedIds: te,
|
|
486
|
+
collapsed: t.collapsed,
|
|
487
|
+
renderItem: ve,
|
|
488
|
+
renderClone: Ee(r),
|
|
489
|
+
scrollToId: ne ?? H
|
|
490
|
+
}
|
|
491
|
+
),
|
|
492
|
+
!t.collapsed && (n < b.length - 1 || b.length > 0) && /* @__PURE__ */ S("div", { className: "border-b border-elm-border mx-2 mt-1" })
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
);
|
|
496
|
+
return a.isDragging ? Xe(f, document.body) : f;
|
|
497
|
+
} }, t.id);
|
|
498
|
+
}),
|
|
499
|
+
e.placeholder
|
|
500
|
+
] }) }),
|
|
501
|
+
(oe.length > 0 || b.length > 0) && /* @__PURE__ */ S(
|
|
502
|
+
Ce,
|
|
503
|
+
{
|
|
504
|
+
droppableId: "ungrouped",
|
|
505
|
+
features: oe,
|
|
506
|
+
scrollElement: he,
|
|
507
|
+
listElement: X,
|
|
508
|
+
expandedIds: te,
|
|
509
|
+
renderItem: ve,
|
|
510
|
+
renderClone: Ee(oe),
|
|
511
|
+
scrollToId: ne ?? H,
|
|
512
|
+
showEmptyAffordance: !1
|
|
513
|
+
}
|
|
514
|
+
)
|
|
515
|
+
] }) })
|
|
516
|
+
] });
|
|
517
|
+
}
|
|
518
|
+
export {
|
|
519
|
+
Pt as default
|
|
520
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),p=require("./useAdapterControls-BBObhzVX.cjs"),i=require("react"),qe=require("clsx"),Ae=require("react-dom"),L=require("@hello-pangea/dnd"),ae=require("@tanstack/react-virtual"),ze=require("./useJumpToFeature-LwjxGzfy.cjs"),Ne=require("@element-editor/core"),_=require("@element-editor/core/internal"),z=require("./index-BKdDZ4Y9.cjs"),Ue=require("./FeatureRowContextMenu-Gwq3OMEA.cjs"),Be=require("./useContextMenu-DbxMvb1s.cjs"),Ve=require("./useAccentStyle-hsGvyHZc.cjs"),Z=36,_e=5,le=[];function Je(D,l){const o=D.scrollElement;if(!o)return;const R=new ResizeObserver(([h])=>{var I;const b=(I=h.borderBoxSize)==null?void 0:I[0];l(b?{width:Math.round(b.inlineSize),height:Math.round(b.blockSize)}:{width:Math.round(h.contentRect.width),height:Math.round(h.contentRect.height)})});return R.observe(o,{box:"border-box"}),()=>R.disconnect()}function Le(D,l){const o=D.scrollElement;if(!o)return;const R=ae.observeElementOffset(D,l),h=new ResizeObserver(()=>{h.disconnect(),l(o.scrollTop,!1)});return h.observe(o),()=>{h.disconnect(),R==null||R()}}function $e(D,l,o){l.adjustments===void 0&&l.behavior===void 0&&D===o.scrollOffset||ae.elementScroll(D,l,o)}function Me({droppableId:D,features:l,scrollElement:o,listElement:R,collapsed:h,expandedIds:b,renderItem:I,renderClone:F,scrollToId:w,showEmptyAffordance:q=!0}){const N=h?0:l.length,[v,P]=i.useState(null),y=i.useRef(null),M=i.useCallback(a=>{var g;(g=y.current)==null||g.call(y,a),P(a)},[]),[k,G]=i.useState(0);i.useEffect(()=>{if(!v||!o)return;const a=new ResizeObserver(()=>{const g=v.getBoundingClientRect().top-o.getBoundingClientRect().top-o.clientTop+o.scrollTop;G(Math.round(g))});return a.observe(v),R&&a.observe(R),()=>a.disconnect()},[v,R,o]);const O=i.useCallback(a=>{var g;return((g=l[a])==null?void 0:g.id)??a},[l,b]),j=a=>{const g=l[a];return!g||!b.has(g.id)||!_.isMultiGeometry(g.geometry)?Z:Z*(1+_.getPartCount(g.geometry))+(a<l.length-1?_e:0)},T=ae.useVirtualizer({count:N,getScrollElement:()=>o,estimateSize:j,overscan:6,getItemKey:O,scrollMargin:k,initialRect:{width:0,height:typeof window>"u"?800:window.innerHeight},observeElementRect:Je,observeElementOffset:Le,scrollToFn:$e}),H=w&&!h?l.findIndex(a=>a.id===w):-1;return i.useEffect(()=>{if(H<0)return;const a=T.getVirtualItems(),g=a.length>0&&H>a[0].index-50&&H<a[a.length-1].index+50;T.scrollToIndex(H,{align:"auto",behavior:g?"smooth":"auto"})},[H,T]),c.jsx(L.Droppable,{droppableId:D,type:"feature",mode:"virtual",renderClone:F,children:(a,g)=>{y.current=a.innerRef;const U=!h&&l.length===0,ee=U&&q,$=h?g.isDraggingOver?32:4:U?q?48:Z:T.getTotalSize()+(g.isDraggingOver?Z:0);return c.jsxs("ul",{ref:M,...a.droppableProps,className:"rounded-elm-control",style:{height:$,position:"relative",background:g.isDraggingOver&&!U?"color-mix(in srgb, var(--color-primary-500) 8%, transparent)":void 0,outline:g.isDraggingOver&&!U?"1px dashed color-mix(in srgb, var(--color-primary-500) 40%, transparent)":void 0,borderRadius:"6px",overflow:"hidden"},children:[h&&g.isDraggingOver&&c.jsx("li",{style:{listStyle:"none"},className:"px-2 py-1.5 text-xs text-primary-400 italic",children:"Drop here"}),ee&&c.jsx("li",{style:{listStyle:"none"},className:qe.clsx("mx-1 my-1 h-9 flex items-center justify-center rounded-elm-control border border-dashed text-xs transition-colors",g.isDraggingOver?"border-primary-400 text-primary-500 bg-primary-50/40 dark:bg-white/5":"border-(--elm-border-strong,var(--color-gray-300)) dark:border-(--elm-border-strong,var(--color-gray-700)) text-elm-text-subtle"),children:g.isDraggingOver?"Drop here":"Drag here"}),!h&&T.getVirtualItems().map(C=>{const B=l[C.index];return B?c.jsx("div",{"data-index":C.index,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${C.start-k}px)`},children:I(B,C.index,C.index===l.length-1,l[C.index-1],l[C.index+1])},B.id):null})]})}})}function We(D){if(D.length===0)return null;let l=1/0,o=1/0,R=-1/0,h=-1/0;for(const b of D){const I=b.bbox||Ne.getGeometryBBox(b.geometry);I[0]<l&&(l=I[0]),I[1]<o&&(o=I[1]),I[2]>R&&(R=I[2]),I[3]>h&&(h=I[3])}return[l,o,R,h]}const Ye=i.memo(function({feature:l,index:o,isLast:R,isSelected:h,isMultiSelected:b,isContextMenuActive:I,isGhosted:F,renameActive:w,isExpanded:q,selectedPartIndex:N,joinTop:v,joinBottom:P,h:y}){const M=l.id,k=i.useCallback(()=>y.onRenameEnd(M),[y,M]),G=i.useCallback(j=>y.onRenameTab(M,j),[y,M]),O=p.useUIStore(j=>j.readonly);return c.jsx(L.Draggable,{draggableId:M,index:o,isDragDisabled:O,children:(j,T)=>c.jsxs("div",{ref:j.innerRef,...j.draggableProps,...j.dragHandleProps,style:{outline:"none",...j.draggableProps.style},children:[c.jsx(z.FeatureRow,{feature:l,isDragging:T.isDragging,isSelected:h,onRowClick:y.onRowClick,onRowSelectOnly:y.onRowSelectOnly,onRowJump:y.onRowJump,onEdit:y.onEdit,onToggleHidden:y.onToggleHidden,onRename:y.onRename,isMultiSelected:b,onMultiSelectToggle:y.onMultiSelectToggle,onRangeSelect:y.onRangeSelect,isContextMenuActive:I,isGhosted:F,renameActive:w,onRenameEnd:k,onRenameTab:G,joinTop:v,joinBottom:P}),q&&!T.isDragging&&c.jsxs(c.Fragment,{children:[Array.from({length:_.getPartCount(l.geometry)},(H,a)=>c.jsx(z.PartSubRow,{geometry:l.geometry,partIndex:a,isSelected:N===a,onClick:()=>y.onPartClick(M,a)},`${M}:${a}`)),!R&&c.jsx("div",{className:"border-b border-elm-border mx-2 mt-1"})]})]})})});function Ke({autoFocusGroupId:D,scrollElement:l}){var Ee;const{dataStore:o,uiStore:R}=p.useGeoStore(),h=p.useUIStore(e=>e.readonly),b=p.useDataStore(e=>e.features),I=p.useDataStore(e=>e.groups),F=p.useDataStore(e=>e.selectedIds),w=i.useMemo(()=>new Set(F),[F]),q=Ve.useAccentStyle(),N=p.useTheme(),v=i.useMemo(()=>{const e=new Map;for(const t of b){const n=t.groupId||null,r=e.get(n);r?r.push(t):e.set(n,[t])}return e},[b]),P=F.length===1?F[0]:null,y=p.useDataStore(e=>e.selectedGroupId),M=p.useDataStore(e=>e.selectGroup),k=p.useDataStore(e=>e.selectFeature),G=p.useDataStore(e=>e.toggleSelection),O=p.useDataStore(e=>e.setSelection),j=p.useDataStore(e=>e.updateGroup),T=p.useDataStore(e=>e.deleteGroup),H=p.useDataStore(e=>e.toggleGroupCollapsed),a=p.useDataStore(e=>e.moveFeatureToGroup),g=p.useDataStore(e=>e.reorderFeatures),U=p.useDataStore(e=>e.reorderGroups),ee=p.useDataStore(e=>e.toggleGroupHidden),$=p.useUIStore(e=>e.openEditDialog),{fitBounds:C}=p.useMapController(),B=p.useDataStore(e=>e.updateFeature),ie=p.useDataStore(e=>e.toggleFeatureHidden),je=p.useUIStore(e=>e.selectedPartIndex),ce=p.useUIStore(e=>e.setSelectedPartIndex),[te,Fe]=i.useState(()=>new Set),de=i.useCallback(e=>{Fe(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),[V,ue]=i.useState(null),[ne,W]=i.useState(null),Y=i.useRef(null),ge=i.useCallback((e,t)=>{const n=o.getState(),r=z.getTabbableFeatureIds(n.features,n.groups),f=r.indexOf(e);if(f<0){W(null);return}const s=t==="next"?f+1:f-1;if(s<0||s>=r.length){W(null);return}W(r[s])},[o]),pe=i.useCallback(e=>{W(t=>t===e?null:t)},[]),A=Be.useContextMenu(),[K,ve]=i.useState(null),fe=l??null;i.useEffect(()=>{const e=K;if(!e)return;const t=n=>{let r=n.target;for(;r&&r!==e;){const f=r.dataset.featureId;if(f){n.preventDefault();const s=o.getState().features.find(d=>d.id===f);s&&A.open(n.clientX,n.clientY,s);return}r=r.parentElement}};return e.addEventListener("contextmenu",t,{capture:!0}),()=>e.removeEventListener("contextmenu",t,{capture:!0})},[A.open,o,K]);const me=i.useCallback(e=>{const t=o.getState(),n=t.selectedIds.length===1?t.selectedIds[0]:Y.current;if(Y.current=e,!n){G(e);return}const r=z.getVisualFeatureOrder(t.features,t.groups),f=r.indexOf(n),s=r.indexOf(e);if(f===-1||s===-1){G(e);return}const d=Math.min(f,s),S=Math.max(f,s);O(r.slice(d,S+1))},[o,G,O]),xe=i.useCallback((e,t)=>{const n=o.getState().features.find(r=>r.id===e);n&&B(e,{properties:{...n.properties,name:t}})},[o,B]),be=ze.useJumpToFeature(),X=i.useCallback(e=>{const t=o.getState().features.find(n=>n.id===e);t&&be(t)},[o,be]),Q=i.useCallback(e=>{const t=o.getState().features.find(n=>n.id===e);t&&(Y.current=e,k(e),_.isMultiGeometry(t.geometry)&&de(e))},[o,k,de]),Se=i.useCallback(e=>{Q(e),X(e)},[Q,X]),he=i.useCallback(e=>{G(e),Y.current=e},[G]);function Te(e){ue(e.draggableId)}function ke(e){const{source:t,destination:n,draggableId:r,type:f}=e;if(ue(null),!n||t.droppableId===n.droppableId&&t.index===n.index||R.getState().readonly)return;if(o.getState().takeSnapshot(),f==="group"){const S=[...I],[m]=S.splice(t.index,1);S.splice(n.index,0,m),U(S.map(E=>E.id));return}const s=t.droppableId,d=n.droppableId;if(s===d){const m=[...re(s)],[E]=m.splice(t.index,1);m.splice(n.index,0,E),Ie(s,m.map(u=>u.id))}else{const S=d==="ungrouped"?null:d,E=w.has(r)&&F.length>1?re(s).filter(u=>w.has(u.id)).map(u=>u.id):[r];if(E.length===1){a(r,S);const u=re(d).filter(x=>x.id!==r);u.splice(n.index,0,b.find(x=>x.id===r)),Ie(d,u.map(x=>x.id),r)}else{for(const u of E)a(u,S);Ge(d,E,n.index)}}}function Ge(e,t,n){const r=new Set(t),f=t.map(u=>b.find(x=>x.id===u)),s=b.filter(u=>!r.has(u.id)),d=e==="ungrouped",S=s.filter(u=>d?!u.groupId:u.groupId===e);let m;if(n<S.length)m=s.findIndex(u=>u.id===S[n].id);else{const u=S[S.length-1];m=u?s.findIndex(x=>x.id===u.id)+1:s.length}const E=[...s.slice(0,m),...f,...s.slice(m)];g(E.map(u=>u.id))}function re(e){return v.get(e==="ungrouped"?null:e)??le}function Ie(e,t,n){const r=new Set(t),f=n?b.find(x=>x.id===n):null,s=b.filter(x=>x.id!==n),d=s.filter(x=>!r.has(x.id)),S=s.find(x=>r.has(x.id)),m=S?d.findIndex(x=>x.id===S.id):d.length,E=t.map(x=>x===n?f:b.find(He=>He.id===x)),u=[...d.slice(0,m),...E,...d.slice(m)];g(u.map(x=>x.id))}const oe=v.get(null)??le,Pe=(()=>{if(!V||!w.has(V)||F.length<=1)return 1;const e=b.find(n=>n.id===V),t=(e==null?void 0:e.groupId)??null;return b.filter(n=>w.has(n.id)&&(n.groupId??null)===t).length})(),J=((Ee=A.state)==null?void 0:Ee.data)??null,ye=i.useCallback((e,t)=>{const n=o.getState().features.find(r=>r.id===e);n&&(k(e),ce(t),C==null||C(_.getPartBBox(n.geometry,t)))},[o,k,ce,C]),Oe=i.useMemo(()=>({onRowClick:Se,onRowSelectOnly:Q,onRowJump:X,onEdit:$,onToggleHidden:ie,onRename:xe,onMultiSelectToggle:he,onRangeSelect:me,onRenameEnd:pe,onRenameTab:ge,onPartClick:ye}),[Se,Q,X,$,ie,xe,he,me,pe,ge,ye]);function Re(e){return(t,n,r)=>{const f=e[r.source.index];return f?c.jsx(z.FeatureRow,{feature:f,innerRef:t.innerRef,containerProps:{...t.draggableProps,"data-elm-portal":"","data-elm-theme":N,style:{...q,...t.draggableProps.style}},dragHandleProps:t.dragHandleProps,isDragging:!0,isSelected:w.has(f.id),dragCountBadge:Pe,onRowClick:()=>{},onEdit:()=>{},onToggleHidden:()=>{}}):c.jsx("div",{ref:t.innerRef,...t.draggableProps})}}const se=e=>!!e&&!(e.groupId&&y===e.groupId)&&(e.id===P||w.has(e.id)),De=e=>te.has(e.id)&&_.isMultiGeometry(e.geometry);function Ce(e,t,n=!1,r,f){const s=De(e),d=se(e),S=!!e.groupId&&y===e.groupId,m=e.id===P;return c.jsx(Ye,{feature:e,index:t,isLast:n,isSelected:!S&&m,isMultiSelected:!S&&w.has(e.id),isContextMenuActive:(J==null?void 0:J.id)===e.id,isGhosted:V!==null&&V!==e.id&&w.has(e.id)&&w.has(V),renameActive:ne===e.id,isExpanded:s,selectedPartIndex:m&&s?je:null,joinTop:d&&se(r)&&!De(r),joinBottom:d&&se(f)&&!s,h:Oe},e.id)}const we=b.length===0&&I.length===0;return c.jsxs(c.Fragment,{children:[A.state&&J&&c.jsx(Ue.FeatureRowContextMenu,{x:A.state.x,y:A.state.y,feature:J,onClose:A.close}),c.jsx(L.DragDropContext,{onDragStart:Te,onDragEnd:ke,children:c.jsxs("div",{ref:ve,className:we?"h-full":"space-y-0.5",children:[we&&c.jsx(z.NoFeaturesEmptyState,{}),c.jsx(L.Droppable,{droppableId:"groups-container",type:"group",children:e=>c.jsxs("div",{ref:e.innerRef,...e.droppableProps,children:[I.map((t,n)=>{const r=v.get(t.id)??le,f=y===t.id;return c.jsx(L.Draggable,{draggableId:`group:${t.id}`,index:n,isDragDisabled:h,children:(s,d)=>{const S=c.jsxs("div",{ref:s.innerRef,...s.draggableProps,...d.isDragging&&{"data-elm-portal":"","data-elm-theme":N},style:{outline:"none",...d.isDragging&&q,...s.draggableProps.style},children:[c.jsx(z.GroupRow,{group:t,featureCount:r.length,autoFocus:t.id===D,isSelected:f,onToggleCollapse:()=>H(t.id),onToggleHidden:()=>ee(t.id),onRename:m=>j(t.id,{name:m}),onDelete:m=>T(t.id,m),onSelect:()=>{if(r.length===0){O([]),M(t.id);return}O(r.map(E=>E.id)),M(t.id);const m=We(r);m&&(C==null||C(m))},dragHandleProps:s.dragHandleProps,isDragging:d.isDragging}),!d.isDragging&&c.jsx(Me,{droppableId:t.id,features:r,scrollElement:fe,listElement:K,expandedIds:te,collapsed:t.collapsed,renderItem:Ce,renderClone:Re(r),scrollToId:ne??P}),!t.collapsed&&(n<I.length-1||I.length>0)&&c.jsx("div",{className:"border-b border-elm-border mx-2 mt-1"})]});return d.isDragging?Ae.createPortal(S,document.body):S}},t.id)}),e.placeholder]})}),(oe.length>0||I.length>0)&&c.jsx(Me,{droppableId:"ungrouped",features:oe,scrollElement:fe,listElement:K,expandedIds:te,renderItem:Ce,renderClone:Re(oe),scrollToId:ne??P,showEmptyAffordance:!1})]})})]})}exports.default=Ke;
|