@dnd-kit/collision 0.0.3-beta-20240620135131 → 0.0.4-beta-20240621030124
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/dist/index.d.cts +41 -0
- package/package.json +5 -5
package/dist/index.d.cts
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
import { CollisionDetector } from '@dnd-kit/abstract';
|
2
|
+
export { CollisionDetector } from '@dnd-kit/abstract';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Returns the droppable that has the greatest intersection area with the
|
6
|
+
* pointer coordinates. If there are no pointer coordinates, or the pointer
|
7
|
+
* is not intersecting with any droppable, return the greatest intersection area
|
8
|
+
* between the collision shape and other intersecting droppable shapes.
|
9
|
+
*/
|
10
|
+
declare const defaultCollisionDetection: CollisionDetector;
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Returns the distance between the droppable shape and the drag operation shape.
|
14
|
+
*/
|
15
|
+
declare const closestCenter: CollisionDetector;
|
16
|
+
|
17
|
+
/**
|
18
|
+
* A high precision collision detection algorithm that detects
|
19
|
+
* whether the pointer intersects with a given droppable element.
|
20
|
+
*
|
21
|
+
* Returns the distance between the pointer coordinates and the center of the
|
22
|
+
* droppable element if the pointer is within the droppable element.
|
23
|
+
*
|
24
|
+
* Returns null if the pointer is outside of the droppable element.
|
25
|
+
*/
|
26
|
+
declare const pointerIntersection: CollisionDetector;
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Returns the droppable with the greatest intersection area with
|
30
|
+
* the collision shape.
|
31
|
+
*/
|
32
|
+
declare const shapeIntersection: CollisionDetector;
|
33
|
+
|
34
|
+
declare const directionBiased: CollisionDetector;
|
35
|
+
|
36
|
+
/**
|
37
|
+
* Returns the distance between the droppable shape and the drag operation coordinates.
|
38
|
+
*/
|
39
|
+
declare const pointerDistance: CollisionDetector;
|
40
|
+
|
41
|
+
export { closestCenter, defaultCollisionDetection, directionBiased, pointerDistance, pointerIntersection, shapeIntersection };
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dnd-kit/collision",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.4-beta-20240621030124",
|
5
5
|
"main": "./dist/index.cjs",
|
6
6
|
"module": "./dist/index.js",
|
7
7
|
"types": "./dist/index.d.ts",
|
@@ -24,8 +24,8 @@
|
|
24
24
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@dnd-kit/abstract": "0.0.
|
28
|
-
"@dnd-kit/geometry": "0.0.
|
27
|
+
"@dnd-kit/abstract": "0.0.4-beta-20240621030124",
|
28
|
+
"@dnd-kit/geometry": "0.0.4-beta-20240621030124",
|
29
29
|
"tslib": "^2.6.2"
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
@@ -34,8 +34,8 @@
|
|
34
34
|
"eslint": "^8.38.0",
|
35
35
|
"@dnd-kit/eslint-config": "*",
|
36
36
|
"react": "^18.1.0",
|
37
|
-
"tsup": "^
|
38
|
-
"typescript": "^5.
|
37
|
+
"tsup": "^8.1.0",
|
38
|
+
"typescript": "^5.5.2"
|
39
39
|
},
|
40
40
|
"publishConfig": {
|
41
41
|
"access": "public"
|