@contember/react-board-dnd-kit 2.0.0-alpha.16 → 2.0.0-alpha.17

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contember/react-board-dnd-kit",
3
3
  "license": "Apache-2.0",
4
- "version": "2.0.0-alpha.16",
4
+ "version": "2.0.0-alpha.17",
5
5
  "type": "module",
6
6
  "sideEffects": false,
7
7
  "main": "./dist/production/index.js",
@@ -26,11 +26,10 @@
26
26
  "directory": "packages/react-board-dnd-kit"
27
27
  },
28
28
  "dependencies": {
29
- "@contember/binding": "2.0.0-alpha.16",
30
- "@contember/react-binding": "2.0.0-alpha.16",
31
- "@contember/react-board": "2.0.0-alpha.16",
32
- "@contember/react-utils": "2.0.0-alpha.16",
33
- "@contember/utilities": "2.0.0-alpha.16",
29
+ "@contember/react-binding": "2.0.0-alpha.17",
30
+ "@contember/react-board": "2.0.0-alpha.17",
31
+ "@contember/react-utils": "2.0.0-alpha.17",
32
+ "@contember/utilities": "2.0.0-alpha.17",
34
33
  "@dnd-kit/core": "^6.1.0",
35
34
  "@dnd-kit/sortable": "^8.0.0",
36
35
  "@radix-ui/react-portal": "^1.1.1",
@@ -12,7 +12,7 @@ import {
12
12
  } from '@dnd-kit/core'
13
13
  import { coordinateGetter as multipleContainersCoordinateGetter } from '../internal/multipleContainersKeyboardCoordinates'
14
14
  import { BoardColumnNode, BoardItemNode, useBoardColumns, useBoardMethods } from '@contember/react-board'
15
- import { EntityAccessor } from '@contember/binding'
15
+ import { EntityAccessor, isEntityAccessor } from '@contember/react-binding'
16
16
  import { BoardActiveColumnContext, BoardActiveItemContext } from '../contexts'
17
17
 
18
18
  type BoardIndexItem =
@@ -72,7 +72,7 @@ export const BoardSortable = ({ children }: {
72
72
  return
73
73
  }
74
74
 
75
- if (activeItem.type === 'column' && activeItem.column.value instanceof EntityAccessor) {
75
+ if (activeItem.type === 'column' && isEntityAccessor(activeItem.column.value)) {
76
76
  moveColumn?.(activeItem.column.value, overItem?.column.index ?? columns.length)
77
77
  return
78
78
  }
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from 'react'
2
2
  import { Portal } from '@radix-ui/react-portal'
3
3
  import { DragOverlay } from '@dnd-kit/core'
4
- import { AccessorTree, Entity, EntityAccessor, useAccessorTreeState } from '@contember/react-binding'
4
+ import { AccessorTree, Entity, EntityAccessor, isEntityAccessor, useAccessorTreeState } from '@contember/react-binding'
5
5
  import { useBoardActiveColumn } from '../contexts'
6
6
  import { BoardCurrentColumnContext } from '@contember/react-board'
7
7
 
@@ -18,7 +18,7 @@ export const BoardSortableColumnDragOverlay = ({ children }: {
18
18
  <DragOverlay>
19
19
  <BoardCurrentColumnContext.Provider value={activeItem}>
20
20
  <AccessorTree state={accessorTreeState}>
21
- {activeItem.value instanceof EntityAccessor ?
21
+ {isEntityAccessor(activeItem.value) ?
22
22
  <Entity accessor={activeItem.value}>
23
23
  {children}
24
24
  </Entity>
package/src/tsconfig.json CHANGED
@@ -4,7 +4,6 @@
4
4
  "outDir": "../dist/types"
5
5
  },
6
6
  "references": [
7
- { "path": "../../binding/src" },
8
7
  { "path": "../../react-binding/src" },
9
8
  { "path": "../../react-board/src" },
10
9
  { "path": "../../react-utils/src" },