@contember/react-board-dnd-kit 1.3.0-rc.3 → 2.0.0-alpha.10
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/api-extractor.json +3 -0
- package/dist/development/index.cjs +11 -11
- package/dist/development/index.js +11 -11
- package/dist/development/{components → src/components}/BoardSortable.cjs +8 -8
- package/dist/development/src/components/BoardSortable.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortable.js +3 -3
- package/dist/development/src/components/BoardSortable.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableActivator.cjs +1 -1
- package/dist/development/src/components/BoardSortableActivator.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableActivator.js +1 -1
- package/dist/development/src/components/BoardSortableActivator.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableColumnDragOverlay.cjs +5 -5
- package/dist/development/src/components/BoardSortableColumnDragOverlay.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableColumnDragOverlay.js +5 -5
- package/dist/development/src/components/BoardSortableColumnDragOverlay.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableColumnDropIndicator.cjs +1 -1
- package/dist/development/src/components/BoardSortableColumnDropIndicator.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableColumnDropIndicator.js +1 -1
- package/dist/development/src/components/BoardSortableColumnDropIndicator.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableEachColumn.cjs +5 -5
- package/dist/development/src/components/BoardSortableEachColumn.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableEachColumn.js +5 -5
- package/dist/development/src/components/BoardSortableEachColumn.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableEachItem.cjs +5 -5
- package/dist/development/src/components/BoardSortableEachItem.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableEachItem.js +5 -5
- package/dist/development/src/components/BoardSortableEachItem.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableItemDragOverlay.cjs +5 -5
- package/dist/development/src/components/BoardSortableItemDragOverlay.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableItemDragOverlay.js +5 -5
- package/dist/development/src/components/BoardSortableItemDragOverlay.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableItemDropIndicator.cjs +1 -1
- package/dist/development/src/components/BoardSortableItemDropIndicator.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableItemDropIndicator.js +1 -1
- package/dist/development/src/components/BoardSortableItemDropIndicator.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableNode.cjs +1 -1
- package/dist/development/src/components/BoardSortableNode.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableNode.js +1 -1
- package/dist/development/src/components/BoardSortableNode.js.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableNullColumn.cjs +3 -3
- package/dist/development/src/components/BoardSortableNullColumn.cjs.map +1 -0
- package/dist/development/{components → src/components}/BoardSortableNullColumn.js +3 -3
- package/dist/development/src/components/BoardSortableNullColumn.js.map +1 -0
- package/dist/development/src/contexts.cjs.map +1 -0
- package/dist/development/src/contexts.js.map +1 -0
- package/dist/development/src/internal/multipleContainersKeyboardCoordinates.cjs.map +1 -0
- package/dist/development/src/internal/multipleContainersKeyboardCoordinates.js.map +1 -0
- package/dist/production/index.cjs +11 -11
- package/dist/production/index.js +11 -11
- package/dist/production/{components → src/components}/BoardSortable.cjs +5 -5
- package/dist/production/src/components/BoardSortable.cjs.map +1 -0
- package/dist/production/src/components/BoardSortable.js.map +1 -0
- package/dist/production/src/components/BoardSortableActivator.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableActivator.js.map +1 -0
- package/dist/production/src/components/BoardSortableColumnDragOverlay.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableColumnDragOverlay.js.map +1 -0
- package/dist/production/src/components/BoardSortableColumnDropIndicator.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableColumnDropIndicator.js.map +1 -0
- package/dist/production/src/components/BoardSortableEachColumn.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableEachColumn.js.map +1 -0
- package/dist/production/src/components/BoardSortableEachItem.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableEachItem.js.map +1 -0
- package/dist/production/src/components/BoardSortableItemDragOverlay.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableItemDragOverlay.js.map +1 -0
- package/dist/production/src/components/BoardSortableItemDropIndicator.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableItemDropIndicator.js.map +1 -0
- package/dist/production/src/components/BoardSortableNode.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableNode.js.map +1 -0
- package/dist/production/src/components/BoardSortableNullColumn.cjs.map +1 -0
- package/dist/production/src/components/BoardSortableNullColumn.js.map +1 -0
- package/dist/production/src/contexts.cjs.map +1 -0
- package/dist/production/src/contexts.js.map +1 -0
- package/dist/production/src/internal/multipleContainersKeyboardCoordinates.cjs.map +1 -0
- package/dist/production/src/internal/multipleContainersKeyboardCoordinates.js.map +1 -0
- package/dist/types/components/BoardSortableColumnDropIndicator.d.ts +1 -1
- package/dist/types/components/BoardSortableItemDropIndicator.d.ts +1 -1
- package/dist/types/contexts.d.ts +0 -1
- package/dist/types/contexts.d.ts.map +1 -1
- package/dist/types/internal/multipleContainersKeyboardCoordinates.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -17
- package/src/internal/multipleContainersKeyboardCoordinates.ts +105 -105
- package/tsconfig.json +7 -0
- package/tsdoc.json +6 -0
- package/dist/development/components/BoardSortable.cjs.map +0 -1
- package/dist/development/components/BoardSortable.js.map +0 -1
- package/dist/development/components/BoardSortableActivator.cjs.map +0 -1
- package/dist/development/components/BoardSortableActivator.js.map +0 -1
- package/dist/development/components/BoardSortableColumnDragOverlay.cjs.map +0 -1
- package/dist/development/components/BoardSortableColumnDragOverlay.js.map +0 -1
- package/dist/development/components/BoardSortableColumnDropIndicator.cjs.map +0 -1
- package/dist/development/components/BoardSortableColumnDropIndicator.js.map +0 -1
- package/dist/development/components/BoardSortableEachColumn.cjs.map +0 -1
- package/dist/development/components/BoardSortableEachColumn.js.map +0 -1
- package/dist/development/components/BoardSortableEachItem.cjs.map +0 -1
- package/dist/development/components/BoardSortableEachItem.js.map +0 -1
- package/dist/development/components/BoardSortableItemDragOverlay.cjs.map +0 -1
- package/dist/development/components/BoardSortableItemDragOverlay.js.map +0 -1
- package/dist/development/components/BoardSortableItemDropIndicator.cjs.map +0 -1
- package/dist/development/components/BoardSortableItemDropIndicator.js.map +0 -1
- package/dist/development/components/BoardSortableNode.cjs.map +0 -1
- package/dist/development/components/BoardSortableNode.js.map +0 -1
- package/dist/development/components/BoardSortableNullColumn.cjs.map +0 -1
- package/dist/development/components/BoardSortableNullColumn.js.map +0 -1
- package/dist/development/contexts.cjs.map +0 -1
- package/dist/development/contexts.js.map +0 -1
- package/dist/development/internal/multipleContainersKeyboardCoordinates.cjs.map +0 -1
- package/dist/development/internal/multipleContainersKeyboardCoordinates.js.map +0 -1
- package/dist/production/components/BoardSortable.cjs.map +0 -1
- package/dist/production/components/BoardSortable.js.map +0 -1
- package/dist/production/components/BoardSortableActivator.cjs.map +0 -1
- package/dist/production/components/BoardSortableActivator.js.map +0 -1
- package/dist/production/components/BoardSortableColumnDragOverlay.cjs.map +0 -1
- package/dist/production/components/BoardSortableColumnDragOverlay.js.map +0 -1
- package/dist/production/components/BoardSortableColumnDropIndicator.cjs.map +0 -1
- package/dist/production/components/BoardSortableColumnDropIndicator.js.map +0 -1
- package/dist/production/components/BoardSortableEachColumn.cjs.map +0 -1
- package/dist/production/components/BoardSortableEachColumn.js.map +0 -1
- package/dist/production/components/BoardSortableEachItem.cjs.map +0 -1
- package/dist/production/components/BoardSortableEachItem.js.map +0 -1
- package/dist/production/components/BoardSortableItemDragOverlay.cjs.map +0 -1
- package/dist/production/components/BoardSortableItemDragOverlay.js.map +0 -1
- package/dist/production/components/BoardSortableItemDropIndicator.cjs.map +0 -1
- package/dist/production/components/BoardSortableItemDropIndicator.js.map +0 -1
- package/dist/production/components/BoardSortableNode.cjs.map +0 -1
- package/dist/production/components/BoardSortableNode.js.map +0 -1
- package/dist/production/components/BoardSortableNullColumn.cjs.map +0 -1
- package/dist/production/components/BoardSortableNullColumn.js.map +0 -1
- package/dist/production/contexts.cjs.map +0 -1
- package/dist/production/contexts.js.map +0 -1
- package/dist/production/internal/multipleContainersKeyboardCoordinates.cjs.map +0 -1
- package/dist/production/internal/multipleContainersKeyboardCoordinates.js.map +0 -1
- /package/dist/development/{contexts.cjs → src/contexts.cjs} +0 -0
- /package/dist/development/{contexts.js → src/contexts.js} +0 -0
- /package/dist/development/{internal → src/internal}/multipleContainersKeyboardCoordinates.cjs +0 -0
- /package/dist/development/{internal → src/internal}/multipleContainersKeyboardCoordinates.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortable.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableActivator.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableActivator.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableColumnDragOverlay.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableColumnDragOverlay.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableColumnDropIndicator.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableColumnDropIndicator.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableEachColumn.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableEachColumn.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableEachItem.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableEachItem.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableItemDragOverlay.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableItemDragOverlay.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableItemDropIndicator.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableItemDropIndicator.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableNode.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableNode.js +0 -0
- /package/dist/production/{components → src/components}/BoardSortableNullColumn.cjs +0 -0
- /package/dist/production/{components → src/components}/BoardSortableNullColumn.js +0 -0
- /package/dist/production/{contexts.cjs → src/contexts.cjs} +0 -0
- /package/dist/production/{contexts.js → src/contexts.js} +0 -0
- /package/dist/production/{internal → src/internal}/multipleContainersKeyboardCoordinates.cjs +0 -0
- /package/dist/production/{internal → src/internal}/multipleContainersKeyboardCoordinates.js +0 -0
|
@@ -10,23 +10,23 @@ const BoardSortableItemDragOverlay = ({ children }) => {
|
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
12
|
return /* @__PURE__ */ jsxDEV(Portal, { children: /* @__PURE__ */ jsxDEV(DragOverlay, { children: /* @__PURE__ */ jsxDEV(BoardActiveItemContext.Provider, { value: activeItem, children: /* @__PURE__ */ jsxDEV(AccessorTree, { state: accessorTreeState, children: /* @__PURE__ */ jsxDEV(Entity, { accessor: activeItem.value, children }, void 0, false, {
|
|
13
|
-
fileName: "/
|
|
13
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx",
|
|
14
14
|
lineNumber: 20,
|
|
15
15
|
columnNumber: 7
|
|
16
16
|
}, void 0) }, void 0, false, {
|
|
17
|
-
fileName: "/
|
|
17
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx",
|
|
18
18
|
lineNumber: 19,
|
|
19
19
|
columnNumber: 6
|
|
20
20
|
}, void 0) }, void 0, false, {
|
|
21
|
-
fileName: "/
|
|
21
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx",
|
|
22
22
|
lineNumber: 18,
|
|
23
23
|
columnNumber: 5
|
|
24
24
|
}, void 0) }, void 0, false, {
|
|
25
|
-
fileName: "/
|
|
25
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx",
|
|
26
26
|
lineNumber: 17,
|
|
27
27
|
columnNumber: 4
|
|
28
28
|
}, void 0) }, void 0, false, {
|
|
29
|
-
fileName: "/
|
|
29
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx",
|
|
30
30
|
lineNumber: 16,
|
|
31
31
|
columnNumber: 3
|
|
32
32
|
}, void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDragOverlay.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { Portal } from '@radix-ui/react-portal'\nimport { DragOverlay } from '@dnd-kit/core'\nimport { AccessorTree, Entity, useAccessorTreeState } from '@contember/react-binding'\nimport { BoardActiveItemContext, useBoardActiveItem } from '../contexts'\n\nexport const BoardSortableItemDragOverlay = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst activeItem = useBoardActiveItem()\n\tconst accessorTreeState = useAccessorTreeState()\n\tif (!activeItem) {\n\t\treturn null\n\t}\n\treturn (\n\t\t<Portal>\n\t\t\t<DragOverlay>\n\t\t\t\t<BoardActiveItemContext.Provider value={activeItem}>\n\t\t\t\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t\t\t\t<Entity accessor={activeItem.value}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t</AccessorTree>\n\t\t\t\t</BoardActiveItemContext.Provider>\n\t\t\t</DragOverlay>\n\t\t</Portal>\n\t)\n}\n"],"names":["this"],"mappings":";;;;;AAMO,MAAM,+BAA+B,CAAC,EAAE,eAEzC;AACL,QAAM,aAAa;AACnB,QAAM,oBAAoB;AAC1B,MAAI,CAAC,YAAY;AACT,WAAA;AAAA,EACR;AACA,gCACE,QACA,EAAA,UAAA,uBAAC,eACA,UAAC,uBAAA,uBAAuB,UAAvB,EAAgC,OAAO,YACvC,UAAC,uBAAA,cAAA,EAAa,OAAO,mBACpB,UAAA,uBAAC,UAAO,UAAU,WAAW,OAC3B,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAEA,EAHD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAIA,EALD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAMA,EAPD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAQA,EATD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAUA,GAAAA,MAAA;AAEF;"}
|
|
@@ -10,7 +10,7 @@ const BoardSortableItemDropIndicator = ({ children, position }) => {
|
|
|
10
10
|
const isAfter = data?.sortable.containerId === activeSortable?.containerId && (data?.sortable.index ?? 0) > activeSortable?.index;
|
|
11
11
|
const renderedPosition = isAfter ? "after" : "before";
|
|
12
12
|
return renderedPosition === position && showDropIndicator ? /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.Fragment, { children }, void 0, false, {
|
|
13
|
-
fileName: "/
|
|
13
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx",
|
|
14
14
|
lineNumber: 20,
|
|
15
15
|
columnNumber: 62
|
|
16
16
|
}, void 0) : null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDropIndicator.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableItemDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data } = sortable\n\tconst showDropIndicator = isOver\n\t\t&& active?.data.current?.type === 'item'\n\t\t&& active?.data.current?.item?.id !== data?.item?.id\n\tconst activeSortable = active?.data.current?.sortable\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId\n\t\t&& (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":["useBoardSortableNode","jsxDEV","Fragment","this"],"mappings":";;;;AAGO,MAAM,iCAAiC,CAAC,EAAE,UAAU,eAGrD;AACL,QAAM,WAAWA,SAAAA;AAEjB,QAAM,EAAE,QAAQ,QAAQ,KAAA,IAAS;AACjC,QAAM,oBAAoB,UACtB,QAAQ,KAAK,SAAS,SAAS,UAC/B,QAAQ,KAAK,SAAS,MAAM,OAAO,MAAM,MAAM;AAC7C,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AACvC,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAC1D,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAE5C,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoBC,8BAAA,OAAAC,wBAAA,EAAG,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAC,MAAY,IAAM;AAC/E;;"}
|
|
@@ -8,7 +8,7 @@ const BoardSortableItemDropIndicator = ({ children, position }) => {
|
|
|
8
8
|
const isAfter = data?.sortable.containerId === activeSortable?.containerId && (data?.sortable.index ?? 0) > activeSortable?.index;
|
|
9
9
|
const renderedPosition = isAfter ? "after" : "before";
|
|
10
10
|
return renderedPosition === position && showDropIndicator ? /* @__PURE__ */ jsxDEV(Fragment, { children }, void 0, false, {
|
|
11
|
-
fileName: "/
|
|
11
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx",
|
|
12
12
|
lineNumber: 20,
|
|
13
13
|
columnNumber: 62
|
|
14
14
|
}, void 0) : null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDropIndicator.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableItemDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data } = sortable\n\tconst showDropIndicator = isOver\n\t\t&& active?.data.current?.type === 'item'\n\t\t&& active?.data.current?.item?.id !== data?.item?.id\n\tconst activeSortable = active?.data.current?.sortable\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId\n\t\t&& (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":["this"],"mappings":";;AAGO,MAAM,iCAAiC,CAAC,EAAE,UAAU,eAGrD;AACL,QAAM,WAAW;AAEjB,QAAM,EAAE,QAAQ,QAAQ,KAAA,IAAS;AACjC,QAAM,oBAAoB,UACtB,QAAQ,KAAK,SAAS,SAAS,UAC/B,QAAQ,KAAK,SAAS,MAAM,OAAO,MAAM,MAAM;AAC7C,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AACvC,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAC1D,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAE5C,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoB,uBAAA,UAAA,EAAG,SAAH,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAAY,IAAM;AAC/E;"}
|
|
@@ -17,7 +17,7 @@ const BoardSortableNode = ({ children }) => {
|
|
|
17
17
|
void 0,
|
|
18
18
|
false,
|
|
19
19
|
{
|
|
20
|
-
fileName: "/
|
|
20
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx",
|
|
21
21
|
lineNumber: 11,
|
|
22
22
|
columnNumber: 3
|
|
23
23
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNode.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport const BoardSortableNode = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setNodeRef, isOver, isDragging, active } = useBoardSortableNode()\n\treturn (\n\t\t<Slot\n\t\t\tref={setNodeRef}\n\t\t\tdata-sortable-over={dataAttribute(isOver ? active?.data.current?.type : undefined)}\n\t\t\tdata-sortable-dragging={dataAttribute(isDragging)}\n\t\t>\n\t\t\t{children}\n\t\t</Slot>\n\t)\n}\n"],"names":["useBoardSortableNode","jsxDEV","Slot","dataAttribute","this"],"mappings":";;;;;;AAKO,MAAM,oBAAoB,CAAC,EAAE,eAE9B;AACL,QAAM,EAAE,YAAY,QAAQ,YAAY,OAAA,IAAWA,SAAAA;AAElD,SAAAC,8BAAA;AAAA,IAACC,UAAA;AAAA,IAAA;AAAA,MACA,KAAK;AAAA,MACL,sBAAoBC,UAAAA,cAAc,SAAS,QAAQ,KAAK,SAAS,OAAO,MAAS;AAAA,MACjF,0BAAwBA,wBAAc,UAAU;AAAA,MAE/C;AAAA,IAAA;AAAA,IALF;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAC;AAAAA,EAAA;AAQF;;"}
|
|
@@ -15,7 +15,7 @@ const BoardSortableNode = ({ children }) => {
|
|
|
15
15
|
void 0,
|
|
16
16
|
false,
|
|
17
17
|
{
|
|
18
|
-
fileName: "/
|
|
18
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx",
|
|
19
19
|
lineNumber: 11,
|
|
20
20
|
columnNumber: 3
|
|
21
21
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNode.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport const BoardSortableNode = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setNodeRef, isOver, isDragging, active } = useBoardSortableNode()\n\treturn (\n\t\t<Slot\n\t\t\tref={setNodeRef}\n\t\t\tdata-sortable-over={dataAttribute(isOver ? active?.data.current?.type : undefined)}\n\t\t\tdata-sortable-dragging={dataAttribute(isDragging)}\n\t\t>\n\t\t\t{children}\n\t\t</Slot>\n\t)\n}\n"],"names":["this"],"mappings":";;;;AAKO,MAAM,oBAAoB,CAAC,EAAE,eAE9B;AACL,QAAM,EAAE,YAAY,QAAQ,YAAY,OAAA,IAAW;AAElD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAK;AAAA,MACL,sBAAoB,cAAc,SAAS,QAAQ,KAAK,SAAS,OAAO,MAAS;AAAA,MACjF,0BAAwB,cAAc,UAAU;AAAA,MAE/C;AAAA,IAAA;AAAA,IALF;AAAA,IAAA;AAAA,IAAA;AAAA,MAAA,UAAA;AAAA,MAAA,YAAA;AAAA,MAAA,cAAA;AAAA,IAAA;AAAA,IAAAA;AAAAA,EAAA;AAQF;"}
|
|
@@ -6,11 +6,11 @@ const sortable = require("@dnd-kit/sortable");
|
|
|
6
6
|
const contexts = require("../contexts.cjs");
|
|
7
7
|
const BoardSortableNullColumn = ({ children }) => {
|
|
8
8
|
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(reactBoard.BoardNullColumn, { children: /* @__PURE__ */ jsxDevRuntime.jsxDEV(BoardSortableNullColumnInner, { children }, void 0, false, {
|
|
9
|
-
fileName: "/
|
|
9
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
10
10
|
lineNumber: 9,
|
|
11
11
|
columnNumber: 4
|
|
12
12
|
}, void 0) }, void 0, false, {
|
|
13
|
-
fileName: "/
|
|
13
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
14
14
|
lineNumber: 8,
|
|
15
15
|
columnNumber: 3
|
|
16
16
|
}, void 0);
|
|
@@ -25,7 +25,7 @@ const BoardSortableNullColumnInner = ({ children }) => {
|
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
return /* @__PURE__ */ jsxDevRuntime.jsxDEV(contexts.BoardSortableNodeContext.Provider, { value: sortableProps, children }, void 0, false, {
|
|
28
|
-
fileName: "/
|
|
28
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
29
29
|
lineNumber: 28,
|
|
30
30
|
columnNumber: 3
|
|
31
31
|
}, void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNullColumn.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardNullColumn, BoardNullColumnProps, useBoardCurrentColumn } from '@contember/react-board'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableNullColumn = ({ children }: BoardNullColumnProps) => {\n\treturn (\n\t\t<BoardNullColumn>\n\t\t\t<BoardSortableNullColumnInner>\n\t\t\t\t{children}\n\t\t\t</BoardSortableNullColumnInner>\n\t\t</BoardNullColumn>\n\t)\n}\nconst BoardSortableNullColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":["jsxDEV","BoardNullColumn","this","useBoardCurrentColumn","useSortable","BoardSortableNodeContext"],"mappings":";;;;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAAqC;AAC9E,SACEA,qCAAAC,WAAAA,iBAAA,EACA,UAACD,8BAAA,OAAA,8BAAA,EACC,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAE,MAEA,EAHD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAIA,GAAAA,MAAA;AAEF;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgBC,WAAAA;AACtB,QAAM,gBAAgBC,SAAAA,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,8CACEC,kCAAyB,UAAzB,EAAkC,OAAO,eACxC,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAAH,MAAA;AAEF;;"}
|
|
@@ -4,11 +4,11 @@ import { useSortable } from "@dnd-kit/sortable";
|
|
|
4
4
|
import { BoardSortableNodeContext } from "../contexts.js";
|
|
5
5
|
const BoardSortableNullColumn = ({ children }) => {
|
|
6
6
|
return /* @__PURE__ */ jsxDEV(BoardNullColumn, { children: /* @__PURE__ */ jsxDEV(BoardSortableNullColumnInner, { children }, void 0, false, {
|
|
7
|
-
fileName: "/
|
|
7
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
8
8
|
lineNumber: 9,
|
|
9
9
|
columnNumber: 4
|
|
10
10
|
}, void 0) }, void 0, false, {
|
|
11
|
-
fileName: "/
|
|
11
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
12
12
|
lineNumber: 8,
|
|
13
13
|
columnNumber: 3
|
|
14
14
|
}, void 0);
|
|
@@ -23,7 +23,7 @@ const BoardSortableNullColumnInner = ({ children }) => {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
return /* @__PURE__ */ jsxDEV(BoardSortableNodeContext.Provider, { value: sortableProps, children }, void 0, false, {
|
|
26
|
-
fileName: "/
|
|
26
|
+
fileName: "/home/runner/work/contember/contember/packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx",
|
|
27
27
|
lineNumber: 28,
|
|
28
28
|
columnNumber: 3
|
|
29
29
|
}, void 0);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNullColumn.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardNullColumn, BoardNullColumnProps, useBoardCurrentColumn } from '@contember/react-board'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableNullColumn = ({ children }: BoardNullColumnProps) => {\n\treturn (\n\t\t<BoardNullColumn>\n\t\t\t<BoardSortableNullColumnInner>\n\t\t\t\t{children}\n\t\t\t</BoardSortableNullColumnInner>\n\t\t</BoardNullColumn>\n\t)\n}\nconst BoardSortableNullColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":["this"],"mappings":";;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAAqC;AAC9E,SACE,uBAAA,iBAAA,EACA,UAAC,uBAAA,8BAAA,EACC,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAAA,GAAAA,MAEA,EAHD,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAIA,GAAAA,MAAA;AAEF;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgB;AACtB,QAAM,gBAAgB,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,gCACE,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SADF,GAAA,QAAA,OAAA;AAAA,IAAA,UAAA;AAAA,IAAA,YAAA;AAAA,IAAA,cAAA;AAAA,EAEA,GAAAA,MAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.cjs","sources":["../../../../packages/react-board-dnd-kit/src/contexts.ts"],"sourcesContent":["import { createContext, createRequiredContext } from '@contember/react-utils'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardColumnNode, BoardItemNode } from '@contember/react-board'\n\nconst BoardSortableNodeContext_ = createRequiredContext<ReturnType<typeof useSortable>>('BoardSortableNodeContext')\n/** @internal */\nexport const BoardSortableNodeContext = BoardSortableNodeContext_[0]\nexport const useBoardSortableNode = BoardSortableNodeContext_[1]\n\nconst BoardActiveItemContext_ = createContext<BoardItemNode & { column: BoardColumnNode } | undefined>('BoardActiveItemContext', undefined)\n/** @internal */\nexport const BoardActiveItemContext = BoardActiveItemContext_[0]\nexport const useBoardActiveItem = BoardActiveItemContext_[1]\n\nconst BoardActiveColumnContext_ = createContext<BoardColumnNode | undefined>('BoardActiveColumnContext', undefined)\n/** @internal */\nexport const BoardActiveColumnContext = BoardActiveColumnContext_[0]\nexport const useBoardActiveColumn = BoardActiveColumnContext_[1]\n"],"names":["createRequiredContext","createContext"],"mappings":";;;AAIA,MAAM,4BAA4BA,WAAAA,sBAAsD,0BAA0B;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;AAE/D,MAAM,0BAA0BC,WAAuE,cAAA,0BAA0B,MAAS;AAE7H,MAAA,yBAAyB,wBAAwB,CAAC;AAClD,MAAA,qBAAqB,wBAAwB,CAAC;AAE3D,MAAM,4BAA4BA,WAA2C,cAAA,4BAA4B,MAAS;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.js","sources":["../../../../packages/react-board-dnd-kit/src/contexts.ts"],"sourcesContent":["import { createContext, createRequiredContext } from '@contember/react-utils'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardColumnNode, BoardItemNode } from '@contember/react-board'\n\nconst BoardSortableNodeContext_ = createRequiredContext<ReturnType<typeof useSortable>>('BoardSortableNodeContext')\n/** @internal */\nexport const BoardSortableNodeContext = BoardSortableNodeContext_[0]\nexport const useBoardSortableNode = BoardSortableNodeContext_[1]\n\nconst BoardActiveItemContext_ = createContext<BoardItemNode & { column: BoardColumnNode } | undefined>('BoardActiveItemContext', undefined)\n/** @internal */\nexport const BoardActiveItemContext = BoardActiveItemContext_[0]\nexport const useBoardActiveItem = BoardActiveItemContext_[1]\n\nconst BoardActiveColumnContext_ = createContext<BoardColumnNode | undefined>('BoardActiveColumnContext', undefined)\n/** @internal */\nexport const BoardActiveColumnContext = BoardActiveColumnContext_[0]\nexport const useBoardActiveColumn = BoardActiveColumnContext_[1]\n"],"names":[],"mappings":";AAIA,MAAM,4BAA4B,sBAAsD,0BAA0B;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;AAE/D,MAAM,0BAA0B,cAAuE,0BAA0B,MAAS;AAE7H,MAAA,yBAAyB,wBAAwB,CAAC;AAClD,MAAA,qBAAqB,wBAAwB,CAAC;AAE3D,MAAM,4BAA4B,cAA2C,4BAA4B,MAAS;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipleContainersKeyboardCoordinates.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/internal/multipleContainersKeyboardCoordinates.ts"],"sourcesContent":["/**\n * Copied from https://github.com/clauderic/dnd-kit/blob/master/stories/2%20-%20Presets/Sortable/multipleContainersKeyboardCoordinates.ts\n *\n * MIT License\n *\n * @copyright (c) 2021, Claudéric Demers\n *\n * see https://github.com/clauderic/dnd-kit/blob/master/LICENSE\n */\n\nimport {\n\tclosestCorners,\n\tgetFirstCollision,\n\tKeyboardCode,\n\tDroppableContainer,\n\tKeyboardCoordinateGetter,\n} from '@dnd-kit/core'\n\nconst directions: string[] = [\n\tKeyboardCode.Down,\n\tKeyboardCode.Right,\n\tKeyboardCode.Up,\n\tKeyboardCode.Left,\n]\n\nexport const coordinateGetter: KeyboardCoordinateGetter = (\n\tevent,\n\t{ context: { active, droppableRects, droppableContainers, collisionRect } },\n) => {\n\tif (directions.includes(event.code)) {\n\t\tevent.preventDefault()\n\n\t\tif (!active || !collisionRect) {\n\t\t\treturn\n\t\t}\n\n\t\tconst filteredContainers: DroppableContainer[] = []\n\n\t\tdroppableContainers.getEnabled().forEach(entry => {\n\t\t\tif (!entry || entry?.disabled) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst rect = droppableRects.get(entry.id)\n\n\t\t\tif (!rect) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst data = entry.data.current\n\n\t\t\tif (data) {\n\t\t\t\tconst { type, children } = data\n\n\t\t\t\tif (type === 'container' && children?.length > 0) {\n\t\t\t\t\tif (active.data.current?.type !== 'container') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.code) {\n\t\t\t\tcase KeyboardCode.Down:\n\t\t\t\t\tif (collisionRect.top < rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Up:\n\t\t\t\t\tif (collisionRect.top > rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Left:\n\t\t\t\t\tif (collisionRect.left >= rect.left + rect.width) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Right:\n\t\t\t\t\tif (collisionRect.left + collisionRect.width <= rect.left) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t})\n\n\t\tconst collisions = closestCorners({\n\t\t\tactive,\n\t\t\tcollisionRect: collisionRect,\n\t\t\tdroppableRects,\n\t\t\tdroppableContainers: filteredContainers,\n\t\t\tpointerCoordinates: null,\n\t\t})\n\t\tconst closestId = getFirstCollision(collisions, 'id')\n\n\t\tif (closestId != null) {\n\t\t\tconst newDroppable = droppableContainers.get(closestId)\n\t\t\tconst newNode = newDroppable?.node.current\n\t\t\tconst newRect = newDroppable?.rect.current\n\n\t\t\tif (newNode && newRect) {\n\t\t\t\tif (newDroppable.id === 'placeholder') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + (newRect.width - collisionRect.width) / 2,\n\t\t\t\t\t\ty: newRect.top + (newRect.height - collisionRect.height) / 2,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (newDroppable.data.current?.type === 'container') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + 20,\n\t\t\t\t\t\ty: newRect.top + 74,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: newRect.left,\n\t\t\t\t\ty: newRect.top,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined\n}\n"],"names":["KeyboardCode","closestCorners","getFirstCollision"],"mappings":";;;AAkBA,MAAM,aAAuB;AAAA,EAC5BA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AACd;AAEa,MAAA,mBAA6C,CACzD,OACA,EAAE,SAAS,EAAE,QAAQ,gBAAgB,qBAAqB,cAAc,QACpE;AACJ,MAAI,WAAW,SAAS,MAAM,IAAI,GAAG;AACpC,UAAM,eAAe;AAEjB,QAAA,CAAC,UAAU,CAAC,eAAe;AAC9B;AAAA,IACD;AAEA,UAAM,qBAA2C,CAAA;AAE7B,wBAAA,WAAA,EAAa,QAAQ,CAAS,UAAA;AAC7C,UAAA,CAAC,SAAS,OAAO,UAAU;AAC9B;AAAA,MACD;AAEA,YAAM,OAAO,eAAe,IAAI,MAAM,EAAE;AAExC,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AAEM,YAAA,OAAO,MAAM,KAAK;AAExB,UAAI,MAAM;AACH,cAAA,EAAE,MAAM,SAAa,IAAA;AAE3B,YAAI,SAAS,eAAe,UAAU,SAAS,GAAG;AACjD,cAAI,OAAO,KAAK,SAAS,SAAS,aAAa;AAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAEA,cAAQ,MAAM,MAAM;AAAA,QACnB,KAAKA,KAAa,aAAA;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACjB,cAAI,cAAc,QAAQ,KAAK,OAAO,KAAK,OAAO;AACjD,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACjB,cAAI,cAAc,OAAO,cAAc,SAAS,KAAK,MAAM;AAC1D,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,MACF;AAAA,IAAA,CACA;AAED,UAAM,aAAaC,KAAAA,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,IAAA,CACpB;AACK,UAAA,YAAYC,KAAAA,kBAAkB,YAAY,IAAI;AAEpD,QAAI,aAAa,MAAM;AAChB,YAAA,eAAe,oBAAoB,IAAI,SAAS;AAChD,YAAA,UAAU,cAAc,KAAK;AAC7B,YAAA,UAAU,cAAc,KAAK;AAEnC,UAAI,WAAW,SAAS;AACnB,YAAA,aAAa,OAAO,eAAe;AAC/B,iBAAA;AAAA,YACN,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,cAAc,SAAS;AAAA,YAC1D,GAAG,QAAQ,OAAO,QAAQ,SAAS,cAAc,UAAU;AAAA,UAAA;AAAA,QAE7D;AAEA,YAAI,aAAa,KAAK,SAAS,SAAS,aAAa;AAC7C,iBAAA;AAAA,YACN,GAAG,QAAQ,OAAO;AAAA,YAClB,GAAG,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEnB;AAEO,eAAA;AAAA,UACN,GAAG,QAAQ;AAAA,UACX,GAAG,QAAQ;AAAA,QAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD;AAEO,SAAA;AACR;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipleContainersKeyboardCoordinates.js","sources":["../../../../../packages/react-board-dnd-kit/src/internal/multipleContainersKeyboardCoordinates.ts"],"sourcesContent":["/**\n * Copied from https://github.com/clauderic/dnd-kit/blob/master/stories/2%20-%20Presets/Sortable/multipleContainersKeyboardCoordinates.ts\n *\n * MIT License\n *\n * @copyright (c) 2021, Claudéric Demers\n *\n * see https://github.com/clauderic/dnd-kit/blob/master/LICENSE\n */\n\nimport {\n\tclosestCorners,\n\tgetFirstCollision,\n\tKeyboardCode,\n\tDroppableContainer,\n\tKeyboardCoordinateGetter,\n} from '@dnd-kit/core'\n\nconst directions: string[] = [\n\tKeyboardCode.Down,\n\tKeyboardCode.Right,\n\tKeyboardCode.Up,\n\tKeyboardCode.Left,\n]\n\nexport const coordinateGetter: KeyboardCoordinateGetter = (\n\tevent,\n\t{ context: { active, droppableRects, droppableContainers, collisionRect } },\n) => {\n\tif (directions.includes(event.code)) {\n\t\tevent.preventDefault()\n\n\t\tif (!active || !collisionRect) {\n\t\t\treturn\n\t\t}\n\n\t\tconst filteredContainers: DroppableContainer[] = []\n\n\t\tdroppableContainers.getEnabled().forEach(entry => {\n\t\t\tif (!entry || entry?.disabled) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst rect = droppableRects.get(entry.id)\n\n\t\t\tif (!rect) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst data = entry.data.current\n\n\t\t\tif (data) {\n\t\t\t\tconst { type, children } = data\n\n\t\t\t\tif (type === 'container' && children?.length > 0) {\n\t\t\t\t\tif (active.data.current?.type !== 'container') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.code) {\n\t\t\t\tcase KeyboardCode.Down:\n\t\t\t\t\tif (collisionRect.top < rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Up:\n\t\t\t\t\tif (collisionRect.top > rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Left:\n\t\t\t\t\tif (collisionRect.left >= rect.left + rect.width) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Right:\n\t\t\t\t\tif (collisionRect.left + collisionRect.width <= rect.left) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t})\n\n\t\tconst collisions = closestCorners({\n\t\t\tactive,\n\t\t\tcollisionRect: collisionRect,\n\t\t\tdroppableRects,\n\t\t\tdroppableContainers: filteredContainers,\n\t\t\tpointerCoordinates: null,\n\t\t})\n\t\tconst closestId = getFirstCollision(collisions, 'id')\n\n\t\tif (closestId != null) {\n\t\t\tconst newDroppable = droppableContainers.get(closestId)\n\t\t\tconst newNode = newDroppable?.node.current\n\t\t\tconst newRect = newDroppable?.rect.current\n\n\t\t\tif (newNode && newRect) {\n\t\t\t\tif (newDroppable.id === 'placeholder') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + (newRect.width - collisionRect.width) / 2,\n\t\t\t\t\t\ty: newRect.top + (newRect.height - collisionRect.height) / 2,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (newDroppable.data.current?.type === 'container') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + 20,\n\t\t\t\t\t\ty: newRect.top + 74,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: newRect.left,\n\t\t\t\t\ty: newRect.top,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined\n}\n"],"names":[],"mappings":";AAkBA,MAAM,aAAuB;AAAA,EAC5B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACd;AAEa,MAAA,mBAA6C,CACzD,OACA,EAAE,SAAS,EAAE,QAAQ,gBAAgB,qBAAqB,cAAc,QACpE;AACJ,MAAI,WAAW,SAAS,MAAM,IAAI,GAAG;AACpC,UAAM,eAAe;AAEjB,QAAA,CAAC,UAAU,CAAC,eAAe;AAC9B;AAAA,IACD;AAEA,UAAM,qBAA2C,CAAA;AAE7B,wBAAA,WAAA,EAAa,QAAQ,CAAS,UAAA;AAC7C,UAAA,CAAC,SAAS,OAAO,UAAU;AAC9B;AAAA,MACD;AAEA,YAAM,OAAO,eAAe,IAAI,MAAM,EAAE;AAExC,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AAEM,YAAA,OAAO,MAAM,KAAK;AAExB,UAAI,MAAM;AACH,cAAA,EAAE,MAAM,SAAa,IAAA;AAE3B,YAAI,SAAS,eAAe,UAAU,SAAS,GAAG;AACjD,cAAI,OAAO,KAAK,SAAS,SAAS,aAAa;AAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAEA,cAAQ,MAAM,MAAM;AAAA,QACnB,KAAK,aAAa;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACjB,cAAI,cAAc,QAAQ,KAAK,OAAO,KAAK,OAAO;AACjD,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACjB,cAAI,cAAc,OAAO,cAAc,SAAS,KAAK,MAAM;AAC1D,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,MACF;AAAA,IAAA,CACA;AAED,UAAM,aAAa,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,IAAA,CACpB;AACK,UAAA,YAAY,kBAAkB,YAAY,IAAI;AAEpD,QAAI,aAAa,MAAM;AAChB,YAAA,eAAe,oBAAoB,IAAI,SAAS;AAChD,YAAA,UAAU,cAAc,KAAK;AAC7B,YAAA,UAAU,cAAc,KAAK;AAEnC,UAAI,WAAW,SAAS;AACnB,YAAA,aAAa,OAAO,eAAe;AAC/B,iBAAA;AAAA,YACN,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,cAAc,SAAS;AAAA,YAC1D,GAAG,QAAQ,OAAO,QAAQ,SAAS,cAAc,UAAU;AAAA,UAAA;AAAA,QAE7D;AAEA,YAAI,aAAa,KAAK,SAAS,SAAS,aAAa;AAC7C,iBAAA;AAAA,YACN,GAAG,QAAQ,OAAO;AAAA,YAClB,GAAG,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEnB;AAEO,eAAA;AAAA,UACN,GAAG,QAAQ;AAAA,UACX,GAAG,QAAQ;AAAA,QAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD;AAEO,SAAA;AACR;"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const contexts = require("./contexts.cjs");
|
|
4
|
-
const BoardSortable = require("./components/BoardSortable.cjs");
|
|
5
|
-
const BoardSortableColumnDragOverlay = require("./components/BoardSortableColumnDragOverlay.cjs");
|
|
6
|
-
const BoardSortableColumnDropIndicator = require("./components/BoardSortableColumnDropIndicator.cjs");
|
|
7
|
-
const BoardSortableEachColumn = require("./components/BoardSortableEachColumn.cjs");
|
|
8
|
-
const BoardSortableEachItem = require("./components/BoardSortableEachItem.cjs");
|
|
9
|
-
const BoardSortableItemDragOverlay = require("./components/BoardSortableItemDragOverlay.cjs");
|
|
10
|
-
const BoardSortableItemDropIndicator = require("./components/BoardSortableItemDropIndicator.cjs");
|
|
11
|
-
const BoardSortableActivator = require("./components/BoardSortableActivator.cjs");
|
|
12
|
-
const BoardSortableNode = require("./components/BoardSortableNode.cjs");
|
|
13
|
-
const BoardSortableNullColumn = require("./components/BoardSortableNullColumn.cjs");
|
|
3
|
+
const contexts = require("./src/contexts.cjs");
|
|
4
|
+
const BoardSortable = require("./src/components/BoardSortable.cjs");
|
|
5
|
+
const BoardSortableColumnDragOverlay = require("./src/components/BoardSortableColumnDragOverlay.cjs");
|
|
6
|
+
const BoardSortableColumnDropIndicator = require("./src/components/BoardSortableColumnDropIndicator.cjs");
|
|
7
|
+
const BoardSortableEachColumn = require("./src/components/BoardSortableEachColumn.cjs");
|
|
8
|
+
const BoardSortableEachItem = require("./src/components/BoardSortableEachItem.cjs");
|
|
9
|
+
const BoardSortableItemDragOverlay = require("./src/components/BoardSortableItemDragOverlay.cjs");
|
|
10
|
+
const BoardSortableItemDropIndicator = require("./src/components/BoardSortableItemDropIndicator.cjs");
|
|
11
|
+
const BoardSortableActivator = require("./src/components/BoardSortableActivator.cjs");
|
|
12
|
+
const BoardSortableNode = require("./src/components/BoardSortableNode.cjs");
|
|
13
|
+
const BoardSortableNullColumn = require("./src/components/BoardSortableNullColumn.cjs");
|
|
14
14
|
exports.BoardActiveColumnContext = contexts.BoardActiveColumnContext;
|
|
15
15
|
exports.BoardActiveItemContext = contexts.BoardActiveItemContext;
|
|
16
16
|
exports.BoardSortableNodeContext = contexts.BoardSortableNodeContext;
|
package/dist/production/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { BoardActiveColumnContext, BoardActiveItemContext, BoardSortableNodeContext, useBoardActiveColumn, useBoardActiveItem, useBoardSortableNode } from "./contexts.js";
|
|
2
|
-
import { BoardSortable } from "./components/BoardSortable.js";
|
|
3
|
-
import { BoardSortableColumnDragOverlay } from "./components/BoardSortableColumnDragOverlay.js";
|
|
4
|
-
import { BoardSortableColumnDropIndicator } from "./components/BoardSortableColumnDropIndicator.js";
|
|
5
|
-
import { BoardSortableEachColumn } from "./components/BoardSortableEachColumn.js";
|
|
6
|
-
import { BoardSortableEachItem } from "./components/BoardSortableEachItem.js";
|
|
7
|
-
import { BoardSortableItemDragOverlay } from "./components/BoardSortableItemDragOverlay.js";
|
|
8
|
-
import { BoardSortableItemDropIndicator } from "./components/BoardSortableItemDropIndicator.js";
|
|
9
|
-
import { BoardSortableActivator } from "./components/BoardSortableActivator.js";
|
|
10
|
-
import { BoardSortableNode } from "./components/BoardSortableNode.js";
|
|
11
|
-
import { BoardSortableNullColumn } from "./components/BoardSortableNullColumn.js";
|
|
1
|
+
import { BoardActiveColumnContext, BoardActiveItemContext, BoardSortableNodeContext, useBoardActiveColumn, useBoardActiveItem, useBoardSortableNode } from "./src/contexts.js";
|
|
2
|
+
import { BoardSortable } from "./src/components/BoardSortable.js";
|
|
3
|
+
import { BoardSortableColumnDragOverlay } from "./src/components/BoardSortableColumnDragOverlay.js";
|
|
4
|
+
import { BoardSortableColumnDropIndicator } from "./src/components/BoardSortableColumnDropIndicator.js";
|
|
5
|
+
import { BoardSortableEachColumn } from "./src/components/BoardSortableEachColumn.js";
|
|
6
|
+
import { BoardSortableEachItem } from "./src/components/BoardSortableEachItem.js";
|
|
7
|
+
import { BoardSortableItemDragOverlay } from "./src/components/BoardSortableItemDragOverlay.js";
|
|
8
|
+
import { BoardSortableItemDropIndicator } from "./src/components/BoardSortableItemDropIndicator.js";
|
|
9
|
+
import { BoardSortableActivator } from "./src/components/BoardSortableActivator.js";
|
|
10
|
+
import { BoardSortableNode } from "./src/components/BoardSortableNode.js";
|
|
11
|
+
import { BoardSortableNullColumn } from "./src/components/BoardSortableNullColumn.js";
|
|
12
12
|
export {
|
|
13
13
|
BoardActiveColumnContext,
|
|
14
14
|
BoardActiveItemContext,
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const
|
|
4
|
+
const React = require("react");
|
|
5
5
|
const core = require("@dnd-kit/core");
|
|
6
6
|
const multipleContainersKeyboardCoordinates = require("../internal/multipleContainersKeyboardCoordinates.cjs");
|
|
7
7
|
const reactBoard = require("@contember/react-board");
|
|
8
8
|
const binding = require("@contember/binding");
|
|
9
9
|
const contexts = require("../contexts.cjs");
|
|
10
10
|
const useBoardIndex = (columns) => {
|
|
11
|
-
return
|
|
11
|
+
return React.useMemo(() => Object.fromEntries(columns.flatMap((column) => [
|
|
12
12
|
[column.id, { type: "column", column }],
|
|
13
13
|
...column.items.map((item) => [item.id, { type: "item", column, item }])
|
|
14
14
|
])), [columns]);
|
|
15
15
|
};
|
|
16
16
|
const BoardSortable = ({ children }) => {
|
|
17
|
-
const [activeId, setActiveId] =
|
|
17
|
+
const [activeId, setActiveId] = React.useState(null);
|
|
18
18
|
const columns = reactBoard.useBoardColumns();
|
|
19
19
|
const { moveItem, moveColumn } = reactBoard.useBoardMethods();
|
|
20
20
|
const boardIndex = useBoardIndex(columns);
|
|
21
21
|
const activeNode = activeId ? boardIndex[activeId] : void 0;
|
|
22
|
-
const activeItem =
|
|
22
|
+
const activeItem = React.useMemo(() => activeNode?.type === "item" ? { ...activeNode.item, column: activeNode.column } : void 0, [activeNode]);
|
|
23
23
|
const sensors = core.useSensors(
|
|
24
24
|
core.useSensor(core.MouseSensor),
|
|
25
25
|
core.useSensor(core.TouchSensor),
|
|
@@ -30,7 +30,7 @@ const BoardSortable = ({ children }) => {
|
|
|
30
30
|
const onDragCancel = () => {
|
|
31
31
|
setActiveId(null);
|
|
32
32
|
};
|
|
33
|
-
const onDragEnd =
|
|
33
|
+
const onDragEnd = React.useCallback(({ active, over }) => {
|
|
34
34
|
setActiveId(null);
|
|
35
35
|
const overItem = over ? boardIndex[over.id] : null;
|
|
36
36
|
const activeItem2 = boardIndex[active.id];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortable.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortable.tsx"],"sourcesContent":["import React, { ReactNode, useCallback, useMemo, useState } from 'react'\nimport {\n\tDndContext,\n\tDragEndEvent,\n\tKeyboardSensor,\n\tMeasuringStrategy,\n\tMouseSensor,\n\tTouchSensor,\n\tUniqueIdentifier,\n\tuseSensor,\n\tuseSensors,\n} from '@dnd-kit/core'\nimport { coordinateGetter as multipleContainersCoordinateGetter } from '../internal/multipleContainersKeyboardCoordinates'\nimport { BoardColumnNode, BoardItemNode, useBoardColumns, useBoardMethods } from '@contember/react-board'\nimport { EntityAccessor } from '@contember/binding'\nimport { BoardActiveColumnContext, BoardActiveItemContext } from '../contexts'\n\ntype BoardIndexItem =\n\t| {\n\t\ttype: 'column'\n\t\tcolumn: BoardColumnNode\n\t}\n\t| {\n\t\ttype: 'item'\n\t\tcolumn: BoardColumnNode\n\t\titem: BoardItemNode\n\t}\n\ntype BoardIndex = Record<UniqueIdentifier, BoardIndexItem>\n\n\nconst useBoardIndex = (columns: BoardColumnNode[]): BoardIndex => {\n\treturn useMemo(() => Object.fromEntries(columns.flatMap((column): [UniqueIdentifier, BoardIndexItem][] => [\n\t\t[column.id, { type: 'column', column }],\n\t\t...column.items.map((item): [UniqueIdentifier, BoardIndexItem] => [item.id, { type: 'item', column, item }]),\n\t])), [columns])\n}\n\nexport const BoardSortable = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst [activeId, setActiveId] = useState<UniqueIdentifier | null>(null)\n\n\tconst columns = useBoardColumns()\n\tconst { moveItem, moveColumn } = useBoardMethods()\n\n\tconst boardIndex = useBoardIndex(columns)\n\n\tconst activeNode = activeId ? boardIndex[activeId] : undefined\n\n\tconst activeItem = useMemo(() => activeNode?.type === 'item' ? ({ ...activeNode.item, column: activeNode.column }) : undefined, [activeNode])\n\n\tconst sensors = useSensors(\n\t\tuseSensor(MouseSensor),\n\t\tuseSensor(TouchSensor),\n\t\tuseSensor(KeyboardSensor, {\n\t\t\tcoordinateGetter: multipleContainersCoordinateGetter,\n\t\t}),\n\t)\n\n\tconst onDragCancel = () => {\n\t\tsetActiveId(null)\n\t}\n\n\n\tconst onDragEnd = useCallback(({ active, over }: DragEndEvent) => {\n\t\tsetActiveId(null)\n\n\t\tconst overItem = over ? boardIndex[over.id] : null\n\t\tconst activeItem = boardIndex[active.id]\n\t\tif (!activeItem) {\n\t\t\treturn\n\t\t}\n\n\t\tif (activeItem.type === 'column' && activeItem.column.value instanceof EntityAccessor) {\n\t\t\tmoveColumn?.(activeItem.column.value, overItem?.column.index ?? columns.length)\n\t\t\treturn\n\t\t}\n\n\t\tif (activeItem.type === 'item' && overItem) {\n\t\t\tmoveItem?.(activeItem.item.value, overItem.column.value, overItem.type === 'item' ? overItem.item.index : overItem.column.items.length)\n\t\t\treturn\n\t\t}\n\t}, [boardIndex, columns.length, moveColumn, moveItem])\n\n\n\treturn (\n\t\t<DndContext\n\t\t\tsensors={sensors}\n\t\t\tmeasuring={{\n\t\t\t\tdroppable: {\n\t\t\t\t\tstrategy: MeasuringStrategy.Always,\n\t\t\t\t},\n\t\t\t}}\n\t\t\tonDragStart={({ active }) => {\n\t\t\t\tsetActiveId(active.id)\n\t\t\t}}\n\t\t\tonDragEnd={onDragEnd}\n\t\t\tonDragCancel={onDragCancel}\n\t\t>\n\t\t\t<BoardActiveColumnContext.Provider value={activeNode?.type === 'column' ? activeNode.column : undefined}>\n\t\t\t\t<BoardActiveItemContext.Provider value={activeItem}>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardActiveItemContext.Provider>\n\t\t\t</BoardActiveColumnContext.Provider>\n\t\t</DndContext>\n\t)\n\n}\n"],"names":["useMemo","useState","useBoardColumns","useBoardMethods","useSensors","useSensor","MouseSensor","TouchSensor","KeyboardSensor","multipleContainersCoordinateGetter","useCallback","activeItem","EntityAccessor","jsx","DndContext","MeasuringStrategy","BoardActiveColumnContext","BoardActiveItemContext"],"mappings":";;;;;;;;;AA+BA,MAAM,gBAAgB,CAAC,YAA2C;AACjE,SAAOA,MAAAA,QAAQ,MAAM,OAAO,YAAY,QAAQ,QAAQ,CAAC,WAAiD;AAAA,IACzG,CAAC,OAAO,IAAI,EAAE,MAAM,UAAU,QAAQ;AAAA,IACtC,GAAG,OAAO,MAAM,IAAI,CAAC,SAA6C,CAAC,KAAK,IAAI,EAAE,MAAM,QAAQ,QAAQ,KAAM,CAAA,CAAC;AAAA,EAAA,CAC3G,CAAC,GAAG,CAAC,OAAO,CAAC;AACf;AAEO,MAAM,gBAAgB,CAAC,EAAE,eAE1B;AACL,QAAM,CAAC,UAAU,WAAW,IAAIC,eAAkC,IAAI;AAEtE,QAAM,UAAUC,WAAAA;AAChB,QAAM,EAAE,UAAU,WAAW,IAAIC,WAAgB,gBAAA;AAE3C,QAAA,aAAa,cAAc,OAAO;AAExC,QAAM,aAAa,WAAW,WAAW,QAAQ,IAAI;AAErD,QAAM,aAAaH,MAAAA,QAAQ,MAAM,YAAY,SAAS,SAAU,EAAE,GAAG,WAAW,MAAM,QAAQ,WAAW,WAAY,QAAW,CAAC,UAAU,CAAC;AAE5I,QAAM,UAAUI,KAAA;AAAA,IACfC,KAAAA,UAAUC,KAAAA,WAAW;AAAA,IACrBD,KAAAA,UAAUE,KAAAA,WAAW;AAAA,IACrBF,KAAAA,UAAUG,KAAAA,gBAAgB;AAAA,MACzB,kBAAkBC,sCAAA;AAAA,IAAA,CAClB;AAAA,EAAA;AAGF,QAAM,eAAe,MAAM;AAC1B,gBAAY,IAAI;AAAA,EAAA;AAIjB,QAAM,YAAYC,MAAY,YAAA,CAAC,EAAE,QAAQ,WAAyB;AACjE,gBAAY,IAAI;AAEhB,UAAM,WAAW,OAAO,WAAW,KAAK,EAAE,IAAI;AACxCC,UAAAA,cAAa,WAAW,OAAO,EAAE;AACvC,QAAI,CAACA,aAAY;AAChB;AAAA,IACD;AAEA,QAAIA,YAAW,SAAS,YAAYA,YAAW,OAAO,iBAAiBC,wBAAgB;AACtF,mBAAaD,YAAW,OAAO,OAAO,UAAU,OAAO,SAAS,QAAQ,MAAM;AAC9E;AAAA,IACD;AAEIA,QAAAA,YAAW,SAAS,UAAU,UAAU;AAC3C,iBAAWA,YAAW,KAAK,OAAO,SAAS,OAAO,OAAO,SAAS,SAAS,SAAS,SAAS,KAAK,QAAQ,SAAS,OAAO,MAAM,MAAM;AACtI;AAAA,IACD;AAAA,EAAA,GACE,CAAC,YAAY,QAAQ,QAAQ,YAAY,QAAQ,CAAC;AAIpD,SAAAE,2BAAA;AAAA,IAACC,KAAA;AAAA,IAAA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACV,WAAW;AAAA,UACV,UAAUC,KAAkB,kBAAA;AAAA,QAC7B;AAAA,MACD;AAAA,MACA,aAAa,CAAC,EAAE,aAAa;AAC5B,oBAAY,OAAO,EAAE;AAAA,MACtB;AAAA,MACA;AAAA,MACA;AAAA,MAEA,yCAACC,SAAyB,yBAAA,UAAzB,EAAkC,OAAO,YAAY,SAAS,WAAW,WAAW,SAAS,QAC7F,yCAACC,gCAAuB,UAAvB,EAAgC,OAAO,YACtC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortable.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortable.tsx"],"sourcesContent":["import React, { ReactNode, useCallback, useMemo, useState } from 'react'\nimport {\n\tDndContext,\n\tDragEndEvent,\n\tKeyboardSensor,\n\tMeasuringStrategy,\n\tMouseSensor,\n\tTouchSensor,\n\tUniqueIdentifier,\n\tuseSensor,\n\tuseSensors,\n} from '@dnd-kit/core'\nimport { coordinateGetter as multipleContainersCoordinateGetter } from '../internal/multipleContainersKeyboardCoordinates'\nimport { BoardColumnNode, BoardItemNode, useBoardColumns, useBoardMethods } from '@contember/react-board'\nimport { EntityAccessor } from '@contember/binding'\nimport { BoardActiveColumnContext, BoardActiveItemContext } from '../contexts'\n\ntype BoardIndexItem =\n\t| {\n\t\ttype: 'column'\n\t\tcolumn: BoardColumnNode\n\t}\n\t| {\n\t\ttype: 'item'\n\t\tcolumn: BoardColumnNode\n\t\titem: BoardItemNode\n\t}\n\ntype BoardIndex = Record<UniqueIdentifier, BoardIndexItem>\n\n\nconst useBoardIndex = (columns: BoardColumnNode[]): BoardIndex => {\n\treturn useMemo(() => Object.fromEntries(columns.flatMap((column): [UniqueIdentifier, BoardIndexItem][] => [\n\t\t[column.id, { type: 'column', column }],\n\t\t...column.items.map((item): [UniqueIdentifier, BoardIndexItem] => [item.id, { type: 'item', column, item }]),\n\t])), [columns])\n}\n\nexport const BoardSortable = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst [activeId, setActiveId] = useState<UniqueIdentifier | null>(null)\n\n\tconst columns = useBoardColumns()\n\tconst { moveItem, moveColumn } = useBoardMethods()\n\n\tconst boardIndex = useBoardIndex(columns)\n\n\tconst activeNode = activeId ? boardIndex[activeId] : undefined\n\n\tconst activeItem = useMemo(() => activeNode?.type === 'item' ? ({ ...activeNode.item, column: activeNode.column }) : undefined, [activeNode])\n\n\tconst sensors = useSensors(\n\t\tuseSensor(MouseSensor),\n\t\tuseSensor(TouchSensor),\n\t\tuseSensor(KeyboardSensor, {\n\t\t\tcoordinateGetter: multipleContainersCoordinateGetter,\n\t\t}),\n\t)\n\n\tconst onDragCancel = () => {\n\t\tsetActiveId(null)\n\t}\n\n\n\tconst onDragEnd = useCallback(({ active, over }: DragEndEvent) => {\n\t\tsetActiveId(null)\n\n\t\tconst overItem = over ? boardIndex[over.id] : null\n\t\tconst activeItem = boardIndex[active.id]\n\t\tif (!activeItem) {\n\t\t\treturn\n\t\t}\n\n\t\tif (activeItem.type === 'column' && activeItem.column.value instanceof EntityAccessor) {\n\t\t\tmoveColumn?.(activeItem.column.value, overItem?.column.index ?? columns.length)\n\t\t\treturn\n\t\t}\n\n\t\tif (activeItem.type === 'item' && overItem) {\n\t\t\tmoveItem?.(activeItem.item.value, overItem.column.value, overItem.type === 'item' ? overItem.item.index : overItem.column.items.length)\n\t\t\treturn\n\t\t}\n\t}, [boardIndex, columns.length, moveColumn, moveItem])\n\n\n\treturn (\n\t\t<DndContext\n\t\t\tsensors={sensors}\n\t\t\tmeasuring={{\n\t\t\t\tdroppable: {\n\t\t\t\t\tstrategy: MeasuringStrategy.Always,\n\t\t\t\t},\n\t\t\t}}\n\t\t\tonDragStart={({ active }) => {\n\t\t\t\tsetActiveId(active.id)\n\t\t\t}}\n\t\t\tonDragEnd={onDragEnd}\n\t\t\tonDragCancel={onDragCancel}\n\t\t>\n\t\t\t<BoardActiveColumnContext.Provider value={activeNode?.type === 'column' ? activeNode.column : undefined}>\n\t\t\t\t<BoardActiveItemContext.Provider value={activeItem}>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardActiveItemContext.Provider>\n\t\t\t</BoardActiveColumnContext.Provider>\n\t\t</DndContext>\n\t)\n\n}\n"],"names":["activeItem"],"mappings":";;;;;;;AA+BA,MAAM,gBAAgB,CAAC,YAA2C;AACjE,SAAO,QAAQ,MAAM,OAAO,YAAY,QAAQ,QAAQ,CAAC,WAAiD;AAAA,IACzG,CAAC,OAAO,IAAI,EAAE,MAAM,UAAU,QAAQ;AAAA,IACtC,GAAG,OAAO,MAAM,IAAI,CAAC,SAA6C,CAAC,KAAK,IAAI,EAAE,MAAM,QAAQ,QAAQ,KAAM,CAAA,CAAC;AAAA,EAAA,CAC3G,CAAC,GAAG,CAAC,OAAO,CAAC;AACf;AAEO,MAAM,gBAAgB,CAAC,EAAE,eAE1B;AACL,QAAM,CAAC,UAAU,WAAW,IAAI,SAAkC,IAAI;AAEtE,QAAM,UAAU;AAChB,QAAM,EAAE,UAAU,WAAW,IAAI,gBAAgB;AAE3C,QAAA,aAAa,cAAc,OAAO;AAExC,QAAM,aAAa,WAAW,WAAW,QAAQ,IAAI;AAErD,QAAM,aAAa,QAAQ,MAAM,YAAY,SAAS,SAAU,EAAE,GAAG,WAAW,MAAM,QAAQ,WAAW,WAAY,QAAW,CAAC,UAAU,CAAC;AAE5I,QAAM,UAAU;AAAA,IACf,UAAU,WAAW;AAAA,IACrB,UAAU,WAAW;AAAA,IACrB,UAAU,gBAAgB;AAAA,MACzB;AAAA,IAAkB,CAClB;AAAA,EAAA;AAGF,QAAM,eAAe,MAAM;AAC1B,gBAAY,IAAI;AAAA,EAAA;AAIjB,QAAM,YAAY,YAAY,CAAC,EAAE,QAAQ,WAAyB;AACjE,gBAAY,IAAI;AAEhB,UAAM,WAAW,OAAO,WAAW,KAAK,EAAE,IAAI;AACxCA,UAAAA,cAAa,WAAW,OAAO,EAAE;AACvC,QAAI,CAACA,aAAY;AAChB;AAAA,IACD;AAEA,QAAIA,YAAW,SAAS,YAAYA,YAAW,OAAO,iBAAiB,gBAAgB;AACtF,mBAAaA,YAAW,OAAO,OAAO,UAAU,OAAO,SAAS,QAAQ,MAAM;AAC9E;AAAA,IACD;AAEIA,QAAAA,YAAW,SAAS,UAAU,UAAU;AAC3C,iBAAWA,YAAW,KAAK,OAAO,SAAS,OAAO,OAAO,SAAS,SAAS,SAAS,SAAS,KAAK,QAAQ,SAAS,OAAO,MAAM,MAAM;AACtI;AAAA,IACD;AAAA,EAAA,GACE,CAAC,YAAY,QAAQ,QAAQ,YAAY,QAAQ,CAAC;AAIpD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACV,WAAW;AAAA,UACV,UAAU,kBAAkB;AAAA,QAC7B;AAAA,MACD;AAAA,MACA,aAAa,CAAC,EAAE,aAAa;AAC5B,oBAAY,OAAO,EAAE;AAAA,MACtB;AAAA,MACA;AAAA,MACA;AAAA,MAEA,8BAAC,yBAAyB,UAAzB,EAAkC,OAAO,YAAY,SAAS,WAAW,WAAW,SAAS,QAC7F,8BAAC,uBAAuB,UAAvB,EAAgC,OAAO,YACtC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableActivator.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableActivator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\n\nexport const BoardSortableActivator = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setActivatorNodeRef, listeners } = useBoardSortableNode()\n\treturn <Slot ref={setActivatorNodeRef} {...listeners}>{children}</Slot>\n}\n"],"names":["useBoardSortableNode","Slot"],"mappings":";;;;;AAIO,MAAM,yBAAyB,CAAC,EAAE,eAEnC;AACL,QAAM,EAAE,qBAAqB,UAAU,IAAIA,SAAqB,qBAAA;AAChE,wCAAQC,UAAK,MAAA,EAAA,KAAK,qBAAsB,GAAG,WAAY,SAAS,CAAA;AACjE;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableActivator.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableActivator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\n\nexport const BoardSortableActivator = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setActivatorNodeRef, listeners } = useBoardSortableNode()\n\treturn <Slot ref={setActivatorNodeRef} {...listeners}>{children}</Slot>\n}\n"],"names":[],"mappings":";;;AAIO,MAAM,yBAAyB,CAAC,EAAE,eAEnC;AACL,QAAM,EAAE,qBAAqB,UAAU,IAAI,qBAAqB;AAChE,6BAAQ,MAAK,EAAA,KAAK,qBAAsB,GAAG,WAAY,SAAS,CAAA;AACjE;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableColumnDragOverlay.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableColumnDragOverlay.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { Portal } from '@radix-ui/react-portal'\nimport { DragOverlay } from '@dnd-kit/core'\nimport { AccessorTree, Entity, EntityAccessor, useAccessorTreeState } from '@contember/react-binding'\nimport { useBoardActiveColumn } from '../contexts'\nimport { BoardCurrentColumnContext } from '@contember/react-board'\n\nexport const BoardSortableColumnDragOverlay = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst activeItem = useBoardActiveColumn()\n\tconst accessorTreeState = useAccessorTreeState()\n\tif (!activeItem) {\n\t\treturn null\n\t}\n\treturn (\n\t\t<Portal>\n\t\t\t<DragOverlay>\n\t\t\t\t<BoardCurrentColumnContext.Provider value={activeItem}>\n\t\t\t\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t\t\t\t{activeItem.value instanceof EntityAccessor ?\n\t\t\t\t\t\t\t<Entity accessor={activeItem.value}>\n\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t</Entity>\n\t\t\t\t\t\t\t: children\n\t\t\t\t\t\t}\n\t\t\t\t\t</AccessorTree>\n\t\t\t\t</BoardCurrentColumnContext.Provider>\n\t\t\t</DragOverlay>\n\t\t</Portal>\n\t)\n}\n"],"names":["useBoardActiveColumn","useAccessorTreeState","jsx","Portal","DragOverlay","BoardCurrentColumnContext","AccessorTree","EntityAccessor","Entity"],"mappings":";;;;;;;;AAOO,MAAM,iCAAiC,CAAC,EAAE,eAE3C;AACL,QAAM,aAAaA,SAAAA;AACnB,QAAM,oBAAoBC,aAAAA;AAC1B,MAAI,CAAC,YAAY;AACT,WAAA;AAAA,EACR;AAEC,SAAAC,2BAAAA,IAACC,YAAAA,QACA,EAAA,UAAAD,2BAAAA,IAACE,KAAAA,aACA,EAAA,UAAAF,2BAAAA,IAACG,WAAAA,0BAA0B,UAA1B,EAAmC,OAAO,YAC1C,UAAAH,2BAAAA,IAACI,aAAAA,cAAa,EAAA,OAAO,mBACnB,UAAA,WAAW,iBAAiBC,aAAA,iBAC3BL,2BAAA,IAAAM,aAAA,QAAA,EAAO,UAAU,WAAW,OAC3B,SAAA,CACF,IACE,SAEJ,CAAA,GACD,EAAA,CACD,EACD,CAAA;AAEF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableColumnDragOverlay.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableColumnDragOverlay.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { Portal } from '@radix-ui/react-portal'\nimport { DragOverlay } from '@dnd-kit/core'\nimport { AccessorTree, Entity, EntityAccessor, useAccessorTreeState } from '@contember/react-binding'\nimport { useBoardActiveColumn } from '../contexts'\nimport { BoardCurrentColumnContext } from '@contember/react-board'\n\nexport const BoardSortableColumnDragOverlay = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst activeItem = useBoardActiveColumn()\n\tconst accessorTreeState = useAccessorTreeState()\n\tif (!activeItem) {\n\t\treturn null\n\t}\n\treturn (\n\t\t<Portal>\n\t\t\t<DragOverlay>\n\t\t\t\t<BoardCurrentColumnContext.Provider value={activeItem}>\n\t\t\t\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t\t\t\t{activeItem.value instanceof EntityAccessor ?\n\t\t\t\t\t\t\t<Entity accessor={activeItem.value}>\n\t\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t\t</Entity>\n\t\t\t\t\t\t\t: children\n\t\t\t\t\t\t}\n\t\t\t\t\t</AccessorTree>\n\t\t\t\t</BoardCurrentColumnContext.Provider>\n\t\t\t</DragOverlay>\n\t\t</Portal>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAOO,MAAM,iCAAiC,CAAC,EAAE,eAE3C;AACL,QAAM,aAAa;AACnB,QAAM,oBAAoB;AAC1B,MAAI,CAAC,YAAY;AACT,WAAA;AAAA,EACR;AAEC,SAAA,oBAAC,QACA,EAAA,UAAA,oBAAC,aACA,EAAA,UAAA,oBAAC,0BAA0B,UAA1B,EAAmC,OAAO,YAC1C,UAAA,oBAAC,cAAa,EAAA,OAAO,mBACnB,UAAA,WAAW,iBAAiB,iBAC3B,oBAAA,QAAA,EAAO,UAAU,WAAW,OAC3B,SAAA,CACF,IACE,SAEJ,CAAA,GACD,EAAA,CACD,EACD,CAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableColumnDropIndicator.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableColumnDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableColumnDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data, over } = sortable\n\n\tconst activeSortable = active?.data.current?.sortable\n\n\tconst overColumnOrItsItem = isOver || (over?.data.current?.type === 'item' && over?.data.current?.column?.id === data?.column?.id)\n\tconst showDropIndicator = data?.column.value !== null\n\t\t&& overColumnOrItsItem\n\t\t&& active?.data.current?.type === 'column'\n\t\t&& active?.data.current?.column?.id !== data?.column?.id\n\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId && (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":["useBoardSortableNode","jsx","Fragment"],"mappings":";;;;AAGO,MAAM,mCAAmC,CAAC,EAAE,UAAU,eAGvD;AACL,QAAM,WAAWA,SAAAA;AAEjB,QAAM,EAAE,QAAQ,QAAQ,MAAM,SAAS;AAEjC,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AAE7C,QAAM,sBAAsB,UAAW,MAAM,KAAK,SAAS,SAAS,UAAU,MAAM,KAAK,SAAS,QAAQ,OAAO,MAAM,QAAQ;AAC/H,QAAM,oBAAoB,MAAM,OAAO,UAAU,QAC7C,uBACA,QAAQ,KAAK,SAAS,SAAS,YAC/B,QAAQ,KAAK,SAAS,QAAQ,OAAO,MAAM,QAAQ;AAEjD,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAAgB,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAEtH,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoBC,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,UAAS,IAAM;AAC/E;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableColumnDropIndicator.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableColumnDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableColumnDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data, over } = sortable\n\n\tconst activeSortable = active?.data.current?.sortable\n\n\tconst overColumnOrItsItem = isOver || (over?.data.current?.type === 'item' && over?.data.current?.column?.id === data?.column?.id)\n\tconst showDropIndicator = data?.column.value !== null\n\t\t&& overColumnOrItsItem\n\t\t&& active?.data.current?.type === 'column'\n\t\t&& active?.data.current?.column?.id !== data?.column?.id\n\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId && (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":[],"mappings":";;AAGO,MAAM,mCAAmC,CAAC,EAAE,UAAU,eAGvD;AACL,QAAM,WAAW;AAEjB,QAAM,EAAE,QAAQ,QAAQ,MAAM,SAAS;AAEjC,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AAE7C,QAAM,sBAAsB,UAAW,MAAM,KAAK,SAAS,SAAS,UAAU,MAAM,KAAK,SAAS,QAAQ,OAAO,MAAM,QAAQ;AAC/H,QAAM,oBAAoB,MAAM,OAAO,UAAU,QAC7C,uBACA,QAAQ,KAAK,SAAS,SAAS,YAC/B,QAAQ,KAAK,SAAS,QAAQ,OAAO,MAAM,QAAQ;AAEjD,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAAgB,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAEtH,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoB,oBAAA,UAAA,EAAG,UAAS,IAAM;AAC/E;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableEachColumn.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableEachColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardEachColumn, useBoardColumns, useBoardCurrentColumn } from '@contember/react-board'\nimport { horizontalListSortingStrategy, SortableContext, useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableEachColumn = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst columns = useBoardColumns()\n\n\treturn (\n\t\t<SortableContext\n\t\t\titems={columns}\n\t\t\tstrategy={horizontalListSortingStrategy}\n\t\t>\n\t\t\t<BoardEachColumn>\n\t\t\t\t<BoardSortableEachColumnInner>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardSortableEachColumnInner>\n\t\t\t</BoardEachColumn>\n\n\t\t</SortableContext>)\n\n}\nBoardSortableEachColumn.staticRender = ({ children }: { children: ReactNode }) => {\n\treturn <BoardEachColumn>{children}</BoardEachColumn>\n}\nconst BoardSortableEachColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":["useBoardColumns","jsx","SortableContext","horizontalListSortingStrategy","BoardEachColumn","useBoardCurrentColumn","useSortable","BoardSortableNodeContext"],"mappings":";;;;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAEpC;AACL,QAAM,UAAUA,WAAAA;AAGf,SAAAC,2BAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACA,OAAO;AAAA,MACP,UAAUC,SAAA;AAAA,MAEV,UAACF,2BAAAA,IAAAG,WAAA,iBAAA,EACA,UAACH,2BAAA,IAAA,8BAAA,EACC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;AACA,wBAAwB,eAAe,CAAC,EAAE,eAAwC;AAC1E,SAAAA,+BAACG,WAAAA,mBAAiB,SAAS,CAAA;AACnC;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgBC,WAAAA;AACtB,QAAM,gBAAgBC,SAAAA,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,wCACEC,SAAAA,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableEachColumn.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableEachColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardEachColumn, useBoardColumns, useBoardCurrentColumn } from '@contember/react-board'\nimport { horizontalListSortingStrategy, SortableContext, useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableEachColumn = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst columns = useBoardColumns()\n\n\treturn (\n\t\t<SortableContext\n\t\t\titems={columns}\n\t\t\tstrategy={horizontalListSortingStrategy}\n\t\t>\n\t\t\t<BoardEachColumn>\n\t\t\t\t<BoardSortableEachColumnInner>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardSortableEachColumnInner>\n\t\t\t</BoardEachColumn>\n\n\t\t</SortableContext>)\n\n}\nBoardSortableEachColumn.staticRender = ({ children }: { children: ReactNode }) => {\n\treturn <BoardEachColumn>{children}</BoardEachColumn>\n}\nconst BoardSortableEachColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAEpC;AACL,QAAM,UAAU;AAGf,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,OAAO;AAAA,MACP,UAAU;AAAA,MAEV,UAAC,oBAAA,iBAAA,EACA,UAAC,oBAAA,8BAAA,EACC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;AACA,wBAAwB,eAAe,CAAC,EAAE,eAAwC;AAC1E,SAAA,oBAAC,mBAAiB,SAAS,CAAA;AACnC;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgB;AACtB,QAAM,gBAAgB,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,6BACE,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableEachItem.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableEachItem.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardEachItem, useBoardCurrentColumn, useBoardCurrentItem } from '@contember/react-board'\nimport { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableEachItem = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\n\treturn (\n\t\t<SortableContext\n\t\t\titems={currentColumn.items}\n\t\t\tstrategy={verticalListSortingStrategy}\n\t\t>\n\t\t\t<BoardEachItem>\n\t\t\t\t<BoardSortableEachItemInner>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardSortableEachItemInner>\n\t\t\t</BoardEachItem>\n\n\t\t</SortableContext>)\n\n}\nBoardSortableEachItem.staticRender = ({ children }: { children: ReactNode }) => {\n\treturn <BoardEachItem>{children}</BoardEachItem>\n}\n\nconst BoardSortableEachItemInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentItem = useBoardCurrentItem()\n\tconst sortableProps = useSortable({\n\t\tid: currentItem.id,\n\t\tdata: {\n\t\t\ttype: 'item',\n\t\t\titem: currentItem,\n\t\t\tcolumn: currentItem.column,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":["useBoardCurrentColumn","jsx","SortableContext","verticalListSortingStrategy","BoardEachItem","useBoardCurrentItem","useSortable","BoardSortableNodeContext"],"mappings":";;;;;;AAKO,MAAM,wBAAwB,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgBA,WAAAA;AAGrB,SAAAC,2BAAA;AAAA,IAACC,SAAA;AAAA,IAAA;AAAA,MACA,OAAO,cAAc;AAAA,MACrB,UAAUC,SAAA;AAAA,MAEV,UAACF,2BAAAA,IAAAG,WAAA,eAAA,EACA,UAACH,2BAAA,IAAA,4BAAA,EACC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;AACA,sBAAsB,eAAe,CAAC,EAAE,eAAwC;AACxE,SAAAA,+BAACG,WAAAA,iBAAe,SAAS,CAAA;AACjC;AAEA,MAAM,6BAA6B,CAAC,EAAE,eAEhC;AACL,QAAM,cAAcC,WAAAA;AACpB,QAAM,gBAAgBC,SAAAA,YAAY;AAAA,IACjC,IAAI,YAAY;AAAA,IAChB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,MAAM;AAAA,MACN,QAAQ,YAAY;AAAA,IACrB;AAAA,EAAA,CACA;AAED,wCACEC,SAAAA,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableEachItem.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableEachItem.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardEachItem, useBoardCurrentColumn, useBoardCurrentItem } from '@contember/react-board'\nimport { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableEachItem = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\n\treturn (\n\t\t<SortableContext\n\t\t\titems={currentColumn.items}\n\t\t\tstrategy={verticalListSortingStrategy}\n\t\t>\n\t\t\t<BoardEachItem>\n\t\t\t\t<BoardSortableEachItemInner>\n\t\t\t\t\t{children}\n\t\t\t\t</BoardSortableEachItemInner>\n\t\t\t</BoardEachItem>\n\n\t\t</SortableContext>)\n\n}\nBoardSortableEachItem.staticRender = ({ children }: { children: ReactNode }) => {\n\treturn <BoardEachItem>{children}</BoardEachItem>\n}\n\nconst BoardSortableEachItemInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentItem = useBoardCurrentItem()\n\tconst sortableProps = useSortable({\n\t\tid: currentItem.id,\n\t\tdata: {\n\t\t\ttype: 'item',\n\t\t\titem: currentItem,\n\t\t\tcolumn: currentItem.column,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,wBAAwB,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgB;AAGrB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,OAAO,cAAc;AAAA,MACrB,UAAU;AAAA,MAEV,UAAC,oBAAA,eAAA,EACA,UAAC,oBAAA,4BAAA,EACC,SACF,CAAA,GACD;AAAA,IAAA;AAAA,EAAA;AAIH;AACA,sBAAsB,eAAe,CAAC,EAAE,eAAwC;AACxE,SAAA,oBAAC,iBAAe,SAAS,CAAA;AACjC;AAEA,MAAM,6BAA6B,CAAC,EAAE,eAEhC;AACL,QAAM,cAAc;AACpB,QAAM,gBAAgB,YAAY;AAAA,IACjC,IAAI,YAAY;AAAA,IAChB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,MAAM;AAAA,MACN,QAAQ,YAAY;AAAA,IACrB;AAAA,EAAA,CACA;AAED,6BACE,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDragOverlay.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { Portal } from '@radix-ui/react-portal'\nimport { DragOverlay } from '@dnd-kit/core'\nimport { AccessorTree, Entity, useAccessorTreeState } from '@contember/react-binding'\nimport { BoardActiveItemContext, useBoardActiveItem } from '../contexts'\n\nexport const BoardSortableItemDragOverlay = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst activeItem = useBoardActiveItem()\n\tconst accessorTreeState = useAccessorTreeState()\n\tif (!activeItem) {\n\t\treturn null\n\t}\n\treturn (\n\t\t<Portal>\n\t\t\t<DragOverlay>\n\t\t\t\t<BoardActiveItemContext.Provider value={activeItem}>\n\t\t\t\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t\t\t\t<Entity accessor={activeItem.value}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t</AccessorTree>\n\t\t\t\t</BoardActiveItemContext.Provider>\n\t\t\t</DragOverlay>\n\t\t</Portal>\n\t)\n}\n"],"names":["useBoardActiveItem","useAccessorTreeState","jsx","Portal","DragOverlay","BoardActiveItemContext","AccessorTree","Entity"],"mappings":";;;;;;;AAMO,MAAM,+BAA+B,CAAC,EAAE,eAEzC;AACL,QAAM,aAAaA,SAAAA;AACnB,QAAM,oBAAoBC,aAAAA;AAC1B,MAAI,CAAC,YAAY;AACT,WAAA;AAAA,EACR;AAEC,SAAAC,2BAAAA,IAACC,YAAAA,UACA,UAACD,2BAAA,IAAAE,KAAA,aAAA,EACA,yCAACC,SAAAA,uBAAuB,UAAvB,EAAgC,OAAO,YACvC,UAAAH,2BAAA,IAACI,6BAAa,OAAO,mBACpB,UAACJ,2BAAAA,IAAAK,aAAAA,QAAA,EAAO,UAAU,WAAW,OAC3B,SACF,CAAA,EAAA,CACD,EACD,CAAA,EAAA,CACD,EACD,CAAA;AAEF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDragOverlay.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDragOverlay.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { Portal } from '@radix-ui/react-portal'\nimport { DragOverlay } from '@dnd-kit/core'\nimport { AccessorTree, Entity, useAccessorTreeState } from '@contember/react-binding'\nimport { BoardActiveItemContext, useBoardActiveItem } from '../contexts'\n\nexport const BoardSortableItemDragOverlay = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst activeItem = useBoardActiveItem()\n\tconst accessorTreeState = useAccessorTreeState()\n\tif (!activeItem) {\n\t\treturn null\n\t}\n\treturn (\n\t\t<Portal>\n\t\t\t<DragOverlay>\n\t\t\t\t<BoardActiveItemContext.Provider value={activeItem}>\n\t\t\t\t\t<AccessorTree state={accessorTreeState}>\n\t\t\t\t\t\t<Entity accessor={activeItem.value}>\n\t\t\t\t\t\t\t{children}\n\t\t\t\t\t\t</Entity>\n\t\t\t\t\t</AccessorTree>\n\t\t\t\t</BoardActiveItemContext.Provider>\n\t\t\t</DragOverlay>\n\t\t</Portal>\n\t)\n}\n"],"names":[],"mappings":";;;;;AAMO,MAAM,+BAA+B,CAAC,EAAE,eAEzC;AACL,QAAM,aAAa;AACnB,QAAM,oBAAoB;AAC1B,MAAI,CAAC,YAAY;AACT,WAAA;AAAA,EACR;AAEC,SAAA,oBAAC,UACA,UAAC,oBAAA,aAAA,EACA,8BAAC,uBAAuB,UAAvB,EAAgC,OAAO,YACvC,UAAA,oBAAC,gBAAa,OAAO,mBACpB,UAAC,oBAAA,QAAA,EAAO,UAAU,WAAW,OAC3B,SACF,CAAA,EAAA,CACD,EACD,CAAA,EAAA,CACD,EACD,CAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDropIndicator.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableItemDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data } = sortable\n\tconst showDropIndicator = isOver\n\t\t&& active?.data.current?.type === 'item'\n\t\t&& active?.data.current?.item?.id !== data?.item?.id\n\tconst activeSortable = active?.data.current?.sortable\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId\n\t\t&& (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":["useBoardSortableNode","jsx","Fragment"],"mappings":";;;;AAGO,MAAM,iCAAiC,CAAC,EAAE,UAAU,eAGrD;AACL,QAAM,WAAWA,SAAAA;AAEjB,QAAM,EAAE,QAAQ,QAAQ,KAAA,IAAS;AACjC,QAAM,oBAAoB,UACtB,QAAQ,KAAK,SAAS,SAAS,UAC/B,QAAQ,KAAK,SAAS,MAAM,OAAO,MAAM,MAAM;AAC7C,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AACvC,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAC1D,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAE5C,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoBC,2BAAAA,IAAAC,WAAAA,UAAA,EAAG,UAAS,IAAM;AAC/E;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableItemDropIndicator.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableItemDropIndicator.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\n\nexport const BoardSortableItemDropIndicator = ({ children, position }: {\n\tchildren: ReactNode\n\tposition: 'before' | 'after'\n}) => {\n\tconst sortable = useBoardSortableNode()\n\n\tconst { isOver, active, data } = sortable\n\tconst showDropIndicator = isOver\n\t\t&& active?.data.current?.type === 'item'\n\t\t&& active?.data.current?.item?.id !== data?.item?.id\n\tconst activeSortable = active?.data.current?.sortable\n\tconst isAfter = data?.sortable.containerId === activeSortable?.containerId\n\t\t&& (data?.sortable.index ?? 0) > activeSortable?.index\n\n\tconst renderedPosition = isAfter ? 'after' : 'before'\n\n\treturn renderedPosition === position && showDropIndicator ? <>{children}</> : null\n}\n"],"names":[],"mappings":";;AAGO,MAAM,iCAAiC,CAAC,EAAE,UAAU,eAGrD;AACL,QAAM,WAAW;AAEjB,QAAM,EAAE,QAAQ,QAAQ,KAAA,IAAS;AACjC,QAAM,oBAAoB,UACtB,QAAQ,KAAK,SAAS,SAAS,UAC/B,QAAQ,KAAK,SAAS,MAAM,OAAO,MAAM,MAAM;AAC7C,QAAA,iBAAiB,QAAQ,KAAK,SAAS;AACvC,QAAA,UAAU,MAAM,SAAS,gBAAgB,gBAAgB,gBAC1D,MAAM,SAAS,SAAS,KAAK,gBAAgB;AAE5C,QAAA,mBAAmB,UAAU,UAAU;AAE7C,SAAO,qBAAqB,YAAY,oBAAoB,oBAAA,UAAA,EAAG,UAAS,IAAM;AAC/E;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNode.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport const BoardSortableNode = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setNodeRef, isOver, isDragging, active } = useBoardSortableNode()\n\treturn (\n\t\t<Slot\n\t\t\tref={setNodeRef}\n\t\t\tdata-sortable-over={dataAttribute(isOver ? active?.data.current?.type : undefined)}\n\t\t\tdata-sortable-dragging={dataAttribute(isDragging)}\n\t\t>\n\t\t\t{children}\n\t\t</Slot>\n\t)\n}\n"],"names":["useBoardSortableNode","jsx","Slot","dataAttribute"],"mappings":";;;;;;AAKO,MAAM,oBAAoB,CAAC,EAAE,eAE9B;AACL,QAAM,EAAE,YAAY,QAAQ,YAAY,OAAA,IAAWA,SAAAA;AAElD,SAAAC,2BAAA;AAAA,IAACC,UAAA;AAAA,IAAA;AAAA,MACA,KAAK;AAAA,MACL,sBAAoBC,UAAAA,cAAc,SAAS,QAAQ,KAAK,SAAS,OAAO,MAAS;AAAA,MACjF,0BAAwBA,wBAAc,UAAU;AAAA,MAE/C;AAAA,IAAA;AAAA,EAAA;AAGJ;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNode.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNode.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport { useBoardSortableNode } from '../contexts'\nimport { Slot } from '@radix-ui/react-slot'\nimport { dataAttribute } from '@contember/utilities'\n\nexport const BoardSortableNode = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst { setNodeRef, isOver, isDragging, active } = useBoardSortableNode()\n\treturn (\n\t\t<Slot\n\t\t\tref={setNodeRef}\n\t\t\tdata-sortable-over={dataAttribute(isOver ? active?.data.current?.type : undefined)}\n\t\t\tdata-sortable-dragging={dataAttribute(isDragging)}\n\t\t>\n\t\t\t{children}\n\t\t</Slot>\n\t)\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,oBAAoB,CAAC,EAAE,eAE9B;AACL,QAAM,EAAE,YAAY,QAAQ,YAAY,OAAA,IAAW;AAElD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,KAAK;AAAA,MACL,sBAAoB,cAAc,SAAS,QAAQ,KAAK,SAAS,OAAO,MAAS;AAAA,MACjF,0BAAwB,cAAc,UAAU;AAAA,MAE/C;AAAA,IAAA;AAAA,EAAA;AAGJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNullColumn.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardNullColumn, BoardNullColumnProps, useBoardCurrentColumn } from '@contember/react-board'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableNullColumn = ({ children }: BoardNullColumnProps) => {\n\treturn (\n\t\t<BoardNullColumn>\n\t\t\t<BoardSortableNullColumnInner>\n\t\t\t\t{children}\n\t\t\t</BoardSortableNullColumnInner>\n\t\t</BoardNullColumn>\n\t)\n}\nconst BoardSortableNullColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":["jsx","BoardNullColumn","useBoardCurrentColumn","useSortable","BoardSortableNodeContext"],"mappings":";;;;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAAqC;AAC9E,SACEA,2BAAA,IAAAC,4BAAA,EACA,UAACD,2BAAAA,IAAA,8BAAA,EACC,UACF,EACD,CAAA;AAEF;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgBE,WAAAA;AACtB,QAAM,gBAAgBC,SAAAA,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,wCACEC,SAAAA,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BoardSortableNullColumn.js","sources":["../../../../../packages/react-board-dnd-kit/src/components/BoardSortableNullColumn.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { BoardNullColumn, BoardNullColumnProps, useBoardCurrentColumn } from '@contember/react-board'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardSortableNodeContext } from '../contexts'\n\nexport const BoardSortableNullColumn = ({ children }: BoardNullColumnProps) => {\n\treturn (\n\t\t<BoardNullColumn>\n\t\t\t<BoardSortableNullColumnInner>\n\t\t\t\t{children}\n\t\t\t</BoardSortableNullColumnInner>\n\t\t</BoardNullColumn>\n\t)\n}\nconst BoardSortableNullColumnInner = ({ children }: {\n\tchildren: ReactNode\n}) => {\n\tconst currentColumn = useBoardCurrentColumn()\n\tconst sortableProps = useSortable({\n\t\tid: currentColumn.id,\n\t\tdata: {\n\t\t\ttype: 'column',\n\t\t\tcolumn: currentColumn,\n\t\t},\n\t})\n\n\treturn (\n\t\t<BoardSortableNodeContext.Provider value={sortableProps}>\n\t\t\t{children}\n\t\t</BoardSortableNodeContext.Provider>\n\t)\n}\n"],"names":[],"mappings":";;;;AAKO,MAAM,0BAA0B,CAAC,EAAE,eAAqC;AAC9E,SACE,oBAAA,iBAAA,EACA,UAAC,oBAAA,8BAAA,EACC,UACF,EACD,CAAA;AAEF;AACA,MAAM,+BAA+B,CAAC,EAAE,eAElC;AACL,QAAM,gBAAgB;AACtB,QAAM,gBAAgB,YAAY;AAAA,IACjC,IAAI,cAAc;AAAA,IAClB,MAAM;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,IACT;AAAA,EAAA,CACA;AAED,6BACE,yBAAyB,UAAzB,EAAkC,OAAO,eACxC,SACF,CAAA;AAEF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.cjs","sources":["../../../../packages/react-board-dnd-kit/src/contexts.ts"],"sourcesContent":["import { createContext, createRequiredContext } from '@contember/react-utils'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardColumnNode, BoardItemNode } from '@contember/react-board'\n\nconst BoardSortableNodeContext_ = createRequiredContext<ReturnType<typeof useSortable>>('BoardSortableNodeContext')\n/** @internal */\nexport const BoardSortableNodeContext = BoardSortableNodeContext_[0]\nexport const useBoardSortableNode = BoardSortableNodeContext_[1]\n\nconst BoardActiveItemContext_ = createContext<BoardItemNode & { column: BoardColumnNode } | undefined>('BoardActiveItemContext', undefined)\n/** @internal */\nexport const BoardActiveItemContext = BoardActiveItemContext_[0]\nexport const useBoardActiveItem = BoardActiveItemContext_[1]\n\nconst BoardActiveColumnContext_ = createContext<BoardColumnNode | undefined>('BoardActiveColumnContext', undefined)\n/** @internal */\nexport const BoardActiveColumnContext = BoardActiveColumnContext_[0]\nexport const useBoardActiveColumn = BoardActiveColumnContext_[1]\n"],"names":["createRequiredContext","createContext"],"mappings":";;;AAIA,MAAM,4BAA4BA,WAAAA,sBAAsD,0BAA0B;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;AAE/D,MAAM,0BAA0BC,WAAuE,cAAA,0BAA0B,MAAS;AAE7H,MAAA,yBAAyB,wBAAwB,CAAC;AAClD,MAAA,qBAAqB,wBAAwB,CAAC;AAE3D,MAAM,4BAA4BA,WAA2C,cAAA,4BAA4B,MAAS;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contexts.js","sources":["../../../../packages/react-board-dnd-kit/src/contexts.ts"],"sourcesContent":["import { createContext, createRequiredContext } from '@contember/react-utils'\nimport { useSortable } from '@dnd-kit/sortable'\nimport { BoardColumnNode, BoardItemNode } from '@contember/react-board'\n\nconst BoardSortableNodeContext_ = createRequiredContext<ReturnType<typeof useSortable>>('BoardSortableNodeContext')\n/** @internal */\nexport const BoardSortableNodeContext = BoardSortableNodeContext_[0]\nexport const useBoardSortableNode = BoardSortableNodeContext_[1]\n\nconst BoardActiveItemContext_ = createContext<BoardItemNode & { column: BoardColumnNode } | undefined>('BoardActiveItemContext', undefined)\n/** @internal */\nexport const BoardActiveItemContext = BoardActiveItemContext_[0]\nexport const useBoardActiveItem = BoardActiveItemContext_[1]\n\nconst BoardActiveColumnContext_ = createContext<BoardColumnNode | undefined>('BoardActiveColumnContext', undefined)\n/** @internal */\nexport const BoardActiveColumnContext = BoardActiveColumnContext_[0]\nexport const useBoardActiveColumn = BoardActiveColumnContext_[1]\n"],"names":[],"mappings":";AAIA,MAAM,4BAA4B,sBAAsD,0BAA0B;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;AAE/D,MAAM,0BAA0B,cAAuE,0BAA0B,MAAS;AAE7H,MAAA,yBAAyB,wBAAwB,CAAC;AAClD,MAAA,qBAAqB,wBAAwB,CAAC;AAE3D,MAAM,4BAA4B,cAA2C,4BAA4B,MAAS;AAErG,MAAA,2BAA2B,0BAA0B,CAAC;AACtD,MAAA,uBAAuB,0BAA0B,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipleContainersKeyboardCoordinates.cjs","sources":["../../../../../packages/react-board-dnd-kit/src/internal/multipleContainersKeyboardCoordinates.ts"],"sourcesContent":["/**\n * Copied from https://github.com/clauderic/dnd-kit/blob/master/stories/2%20-%20Presets/Sortable/multipleContainersKeyboardCoordinates.ts\n *\n * MIT License\n *\n * @copyright (c) 2021, Claudéric Demers\n *\n * see https://github.com/clauderic/dnd-kit/blob/master/LICENSE\n */\n\nimport {\n\tclosestCorners,\n\tgetFirstCollision,\n\tKeyboardCode,\n\tDroppableContainer,\n\tKeyboardCoordinateGetter,\n} from '@dnd-kit/core'\n\nconst directions: string[] = [\n\tKeyboardCode.Down,\n\tKeyboardCode.Right,\n\tKeyboardCode.Up,\n\tKeyboardCode.Left,\n]\n\nexport const coordinateGetter: KeyboardCoordinateGetter = (\n\tevent,\n\t{ context: { active, droppableRects, droppableContainers, collisionRect } },\n) => {\n\tif (directions.includes(event.code)) {\n\t\tevent.preventDefault()\n\n\t\tif (!active || !collisionRect) {\n\t\t\treturn\n\t\t}\n\n\t\tconst filteredContainers: DroppableContainer[] = []\n\n\t\tdroppableContainers.getEnabled().forEach(entry => {\n\t\t\tif (!entry || entry?.disabled) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst rect = droppableRects.get(entry.id)\n\n\t\t\tif (!rect) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst data = entry.data.current\n\n\t\t\tif (data) {\n\t\t\t\tconst { type, children } = data\n\n\t\t\t\tif (type === 'container' && children?.length > 0) {\n\t\t\t\t\tif (active.data.current?.type !== 'container') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.code) {\n\t\t\t\tcase KeyboardCode.Down:\n\t\t\t\t\tif (collisionRect.top < rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Up:\n\t\t\t\t\tif (collisionRect.top > rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Left:\n\t\t\t\t\tif (collisionRect.left >= rect.left + rect.width) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Right:\n\t\t\t\t\tif (collisionRect.left + collisionRect.width <= rect.left) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t})\n\n\t\tconst collisions = closestCorners({\n\t\t\tactive,\n\t\t\tcollisionRect: collisionRect,\n\t\t\tdroppableRects,\n\t\t\tdroppableContainers: filteredContainers,\n\t\t\tpointerCoordinates: null,\n\t\t})\n\t\tconst closestId = getFirstCollision(collisions, 'id')\n\n\t\tif (closestId != null) {\n\t\t\tconst newDroppable = droppableContainers.get(closestId)\n\t\t\tconst newNode = newDroppable?.node.current\n\t\t\tconst newRect = newDroppable?.rect.current\n\n\t\t\tif (newNode && newRect) {\n\t\t\t\tif (newDroppable.id === 'placeholder') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + (newRect.width - collisionRect.width) / 2,\n\t\t\t\t\t\ty: newRect.top + (newRect.height - collisionRect.height) / 2,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (newDroppable.data.current?.type === 'container') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + 20,\n\t\t\t\t\t\ty: newRect.top + 74,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: newRect.left,\n\t\t\t\t\ty: newRect.top,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined\n}\n"],"names":["KeyboardCode","closestCorners","getFirstCollision"],"mappings":";;;AAkBA,MAAM,aAAuB;AAAA,EAC5BA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AAAA,EACbA,KAAAA,aAAa;AACd;AAEa,MAAA,mBAA6C,CACzD,OACA,EAAE,SAAS,EAAE,QAAQ,gBAAgB,qBAAqB,cAAc,QACpE;AACJ,MAAI,WAAW,SAAS,MAAM,IAAI,GAAG;AACpC,UAAM,eAAe;AAEjB,QAAA,CAAC,UAAU,CAAC,eAAe;AAC9B;AAAA,IACD;AAEA,UAAM,qBAA2C,CAAA;AAE7B,wBAAA,WAAA,EAAa,QAAQ,CAAS,UAAA;AAC7C,UAAA,CAAC,SAAS,OAAO,UAAU;AAC9B;AAAA,MACD;AAEA,YAAM,OAAO,eAAe,IAAI,MAAM,EAAE;AAExC,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AAEM,YAAA,OAAO,MAAM,KAAK;AAExB,UAAI,MAAM;AACH,cAAA,EAAE,MAAM,SAAa,IAAA;AAE3B,YAAI,SAAS,eAAe,UAAU,SAAS,GAAG;AACjD,cAAI,OAAO,KAAK,SAAS,SAAS,aAAa;AAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAEA,cAAQ,MAAM,MAAM;AAAA,QACnB,KAAKA,KAAa,aAAA;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACjB,cAAI,cAAc,QAAQ,KAAK,OAAO,KAAK,OAAO;AACjD,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAKA,KAAa,aAAA;AACjB,cAAI,cAAc,OAAO,cAAc,SAAS,KAAK,MAAM;AAC1D,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,MACF;AAAA,IAAA,CACA;AAED,UAAM,aAAaC,KAAAA,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,IAAA,CACpB;AACK,UAAA,YAAYC,KAAAA,kBAAkB,YAAY,IAAI;AAEpD,QAAI,aAAa,MAAM;AAChB,YAAA,eAAe,oBAAoB,IAAI,SAAS;AAChD,YAAA,UAAU,cAAc,KAAK;AAC7B,YAAA,UAAU,cAAc,KAAK;AAEnC,UAAI,WAAW,SAAS;AACnB,YAAA,aAAa,OAAO,eAAe;AAC/B,iBAAA;AAAA,YACN,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,cAAc,SAAS;AAAA,YAC1D,GAAG,QAAQ,OAAO,QAAQ,SAAS,cAAc,UAAU;AAAA,UAAA;AAAA,QAE7D;AAEA,YAAI,aAAa,KAAK,SAAS,SAAS,aAAa;AAC7C,iBAAA;AAAA,YACN,GAAG,QAAQ,OAAO;AAAA,YAClB,GAAG,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEnB;AAEO,eAAA;AAAA,UACN,GAAG,QAAQ;AAAA,UACX,GAAG,QAAQ;AAAA,QAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD;AAEO,SAAA;AACR;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multipleContainersKeyboardCoordinates.js","sources":["../../../../../packages/react-board-dnd-kit/src/internal/multipleContainersKeyboardCoordinates.ts"],"sourcesContent":["/**\n * Copied from https://github.com/clauderic/dnd-kit/blob/master/stories/2%20-%20Presets/Sortable/multipleContainersKeyboardCoordinates.ts\n *\n * MIT License\n *\n * @copyright (c) 2021, Claudéric Demers\n *\n * see https://github.com/clauderic/dnd-kit/blob/master/LICENSE\n */\n\nimport {\n\tclosestCorners,\n\tgetFirstCollision,\n\tKeyboardCode,\n\tDroppableContainer,\n\tKeyboardCoordinateGetter,\n} from '@dnd-kit/core'\n\nconst directions: string[] = [\n\tKeyboardCode.Down,\n\tKeyboardCode.Right,\n\tKeyboardCode.Up,\n\tKeyboardCode.Left,\n]\n\nexport const coordinateGetter: KeyboardCoordinateGetter = (\n\tevent,\n\t{ context: { active, droppableRects, droppableContainers, collisionRect } },\n) => {\n\tif (directions.includes(event.code)) {\n\t\tevent.preventDefault()\n\n\t\tif (!active || !collisionRect) {\n\t\t\treturn\n\t\t}\n\n\t\tconst filteredContainers: DroppableContainer[] = []\n\n\t\tdroppableContainers.getEnabled().forEach(entry => {\n\t\t\tif (!entry || entry?.disabled) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst rect = droppableRects.get(entry.id)\n\n\t\t\tif (!rect) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst data = entry.data.current\n\n\t\t\tif (data) {\n\t\t\t\tconst { type, children } = data\n\n\t\t\t\tif (type === 'container' && children?.length > 0) {\n\t\t\t\t\tif (active.data.current?.type !== 'container') {\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tswitch (event.code) {\n\t\t\t\tcase KeyboardCode.Down:\n\t\t\t\t\tif (collisionRect.top < rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Up:\n\t\t\t\t\tif (collisionRect.top > rect.top) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Left:\n\t\t\t\t\tif (collisionRect.left >= rect.left + rect.width) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t\tcase KeyboardCode.Right:\n\t\t\t\t\tif (collisionRect.left + collisionRect.width <= rect.left) {\n\t\t\t\t\t\tfilteredContainers.push(entry)\n\t\t\t\t\t}\n\t\t\t\t\tbreak\n\t\t\t}\n\t\t})\n\n\t\tconst collisions = closestCorners({\n\t\t\tactive,\n\t\t\tcollisionRect: collisionRect,\n\t\t\tdroppableRects,\n\t\t\tdroppableContainers: filteredContainers,\n\t\t\tpointerCoordinates: null,\n\t\t})\n\t\tconst closestId = getFirstCollision(collisions, 'id')\n\n\t\tif (closestId != null) {\n\t\t\tconst newDroppable = droppableContainers.get(closestId)\n\t\t\tconst newNode = newDroppable?.node.current\n\t\t\tconst newRect = newDroppable?.rect.current\n\n\t\t\tif (newNode && newRect) {\n\t\t\t\tif (newDroppable.id === 'placeholder') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + (newRect.width - collisionRect.width) / 2,\n\t\t\t\t\t\ty: newRect.top + (newRect.height - collisionRect.height) / 2,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (newDroppable.data.current?.type === 'container') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tx: newRect.left + 20,\n\t\t\t\t\t\ty: newRect.top + 74,\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn {\n\t\t\t\t\tx: newRect.left,\n\t\t\t\t\ty: newRect.top,\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined\n}\n"],"names":[],"mappings":";AAkBA,MAAM,aAAuB;AAAA,EAC5B,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AACd;AAEa,MAAA,mBAA6C,CACzD,OACA,EAAE,SAAS,EAAE,QAAQ,gBAAgB,qBAAqB,cAAc,QACpE;AACJ,MAAI,WAAW,SAAS,MAAM,IAAI,GAAG;AACpC,UAAM,eAAe;AAEjB,QAAA,CAAC,UAAU,CAAC,eAAe;AAC9B;AAAA,IACD;AAEA,UAAM,qBAA2C,CAAA;AAE7B,wBAAA,WAAA,EAAa,QAAQ,CAAS,UAAA;AAC7C,UAAA,CAAC,SAAS,OAAO,UAAU;AAC9B;AAAA,MACD;AAEA,YAAM,OAAO,eAAe,IAAI,MAAM,EAAE;AAExC,UAAI,CAAC,MAAM;AACV;AAAA,MACD;AAEM,YAAA,OAAO,MAAM,KAAK;AAExB,UAAI,MAAM;AACH,cAAA,EAAE,MAAM,SAAa,IAAA;AAE3B,YAAI,SAAS,eAAe,UAAU,SAAS,GAAG;AACjD,cAAI,OAAO,KAAK,SAAS,SAAS,aAAa;AAC9C;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAEA,cAAQ,MAAM,MAAM;AAAA,QACnB,KAAK,aAAa;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACb,cAAA,cAAc,MAAM,KAAK,KAAK;AACjC,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACjB,cAAI,cAAc,QAAQ,KAAK,OAAO,KAAK,OAAO;AACjD,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,QACD,KAAK,aAAa;AACjB,cAAI,cAAc,OAAO,cAAc,SAAS,KAAK,MAAM;AAC1D,+BAAmB,KAAK,KAAK;AAAA,UAC9B;AACA;AAAA,MACF;AAAA,IAAA,CACA;AAED,UAAM,aAAa,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA;AAAA,MACA,qBAAqB;AAAA,MACrB,oBAAoB;AAAA,IAAA,CACpB;AACK,UAAA,YAAY,kBAAkB,YAAY,IAAI;AAEpD,QAAI,aAAa,MAAM;AAChB,YAAA,eAAe,oBAAoB,IAAI,SAAS;AAChD,YAAA,UAAU,cAAc,KAAK;AAC7B,YAAA,UAAU,cAAc,KAAK;AAEnC,UAAI,WAAW,SAAS;AACnB,YAAA,aAAa,OAAO,eAAe;AAC/B,iBAAA;AAAA,YACN,GAAG,QAAQ,QAAQ,QAAQ,QAAQ,cAAc,SAAS;AAAA,YAC1D,GAAG,QAAQ,OAAO,QAAQ,SAAS,cAAc,UAAU;AAAA,UAAA;AAAA,QAE7D;AAEA,YAAI,aAAa,KAAK,SAAS,SAAS,aAAa;AAC7C,iBAAA;AAAA,YACN,GAAG,QAAQ,OAAO;AAAA,YAClB,GAAG,QAAQ,MAAM;AAAA,UAAA;AAAA,QAEnB;AAEO,eAAA;AAAA,UACN,GAAG,QAAQ;AAAA,UACX,GAAG,QAAQ;AAAA,QAAA;AAAA,MAEb;AAAA,IACD;AAAA,EACD;AAEO,SAAA;AACR;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare const BoardSortableColumnDropIndicator: ({ children, position }: {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
position:
|
|
4
|
+
position: "before" | "after";
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=BoardSortableColumnDropIndicator.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
export declare const BoardSortableItemDropIndicator: ({ children, position }: {
|
|
3
3
|
children: ReactNode;
|
|
4
|
-
position:
|
|
4
|
+
position: "before" | "after";
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
6
6
|
//# sourceMappingURL=BoardSortableItemDropIndicator.d.ts.map
|
package/dist/types/contexts.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/contexts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"contexts.d.ts","sourceRoot":"","sources":["../../src/contexts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAGvE,gBAAgB;AAChB,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;EAA+B,CAAA;AACpE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;CAA+B,CAAA;AAGhE,gBAAgB;AAChB,eAAO,MAAM,sBAAsB;YAFqC,eAAe;eAEvB,CAAA;AAChE,eAAO,MAAM,kBAAkB;YAHyC,eAAe;cAG3B,CAAA;AAG5D,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,sDAA+B,CAAA;AACpE,eAAO,MAAM,oBAAoB,mCAA+B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multipleContainersKeyboardCoordinates.d.ts","sourceRoot":"","sources":["../../../src/internal/multipleContainersKeyboardCoordinates.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"multipleContainersKeyboardCoordinates.d.ts","sourceRoot":"","sources":["../../../src/internal/multipleContainersKeyboardCoordinates.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAKN,wBAAwB,EACxB,MAAM,eAAe,CAAA;AAStB,eAAO,MAAM,gBAAgB,EAAE,wBAkG9B,CAAA"}
|