@octanejs/dnd-kit 0.1.7 → 0.1.8
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/dnd-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -46,18 +46,18 @@
|
|
|
46
46
|
"@dnd-kit/state": "0.5.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"octane": "0.1.
|
|
49
|
+
"octane": "0.1.13"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@dnd-kit/helpers": "0.5.0",
|
|
53
53
|
"@dnd-kit/react": "0.5.0",
|
|
54
|
-
"@tsrx/react": "^0.2.
|
|
55
|
-
"@vitest/coverage-v8": "4.1.
|
|
54
|
+
"@tsrx/react": "^0.2.46",
|
|
55
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
56
56
|
"esbuild": "^0.28.1",
|
|
57
|
-
"react": "^19.2.
|
|
58
|
-
"react-dom": "^19.2.
|
|
59
|
-
"vitest": "^4.1.
|
|
60
|
-
"octane": "0.1.
|
|
57
|
+
"react": "^19.2.7",
|
|
58
|
+
"react-dom": "^19.2.7",
|
|
59
|
+
"vitest": "^4.1.10",
|
|
60
|
+
"octane": "0.1.13"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"test": "vitest run --root ../.. --project dnd-kit",
|
|
@@ -9,10 +9,20 @@ import { DragDropContext } from './context';
|
|
|
9
9
|
import { Renderer } from './renderer.tsrx';
|
|
10
10
|
import type { OctaneRenderer } from './renderer.tsrx';
|
|
11
11
|
|
|
12
|
-
export type Events<
|
|
12
|
+
export type Events<
|
|
13
|
+
T extends Data = Data,
|
|
14
|
+
U extends Draggable<T> = Draggable<T>,
|
|
15
|
+
V extends Droppable<T> = Droppable<T>,
|
|
16
|
+
W extends DragDropManager<T, U, V> = DragDropManager<T, U, V>,
|
|
17
|
+
> =
|
|
13
18
|
DragDropEventHandlers<U, V, W>;
|
|
14
19
|
|
|
15
|
-
export interface DragDropProviderProps<
|
|
20
|
+
export interface DragDropProviderProps<
|
|
21
|
+
T extends Data = Data,
|
|
22
|
+
U extends Draggable<T> = Draggable<T>,
|
|
23
|
+
V extends Droppable<T> = Droppable<T>,
|
|
24
|
+
W extends DragDropManager<T, U, V> = DragDropManager<T, U, V>,
|
|
25
|
+
> extends DragDropManagerInput {
|
|
16
26
|
children?: unknown;
|
|
17
27
|
manager?: W;
|
|
18
28
|
onBeforeDragStart?: Events<T, U, V, W>['beforedragstart'];
|
|
@@ -25,7 +35,12 @@ export interface DragDropProviderProps<T extends Data = Data, U extends Draggabl
|
|
|
25
35
|
|
|
26
36
|
const changeOptions = [undefined, deepEqual] as const;
|
|
27
37
|
|
|
28
|
-
export function DragDropProvider<
|
|
38
|
+
export function DragDropProvider<
|
|
39
|
+
T extends Data = Data,
|
|
40
|
+
U extends Draggable<T> = Draggable<T>,
|
|
41
|
+
V extends Droppable<T> = Droppable<T>,
|
|
42
|
+
W extends DragDropManager<T, U, V> = DragDropManager<T, U, V>,
|
|
43
|
+
>(props: DragDropProviderProps<T, U, V, W>) {
|
|
29
44
|
const {
|
|
30
45
|
children,
|
|
31
46
|
onCollision,
|