react-dragdrop-kit 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +223 -82
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/jest.setup.d.ts +1 -0
- package/dist/kanban.esm.js +2 -0
- package/dist/kanban.esm.js.map +1 -0
- package/dist/kanban.js +2 -0
- package/dist/kanban.js.map +1 -0
- package/dist/{components → src/components}/DragDropList.d.ts +1 -2
- package/dist/{components → src/components}/DraggableItemWrapper.d.ts +1 -2
- package/dist/{hooks → src/hooks}/useDragDropMonitor.d.ts +0 -1
- package/dist/{index.d.ts → src/index.d.ts} +0 -1
- package/dist/src/kanban/a11y/Announcer.d.ts +37 -0
- package/dist/src/kanban/a11y/useLiveRegion.d.ts +17 -0
- package/dist/src/kanban/components/KanbanBoard.d.ts +8 -0
- package/dist/src/kanban/components/KanbanCardView.d.ts +8 -0
- package/dist/src/kanban/components/KanbanColumnView.d.ts +8 -0
- package/dist/src/kanban/context.d.ts +13 -0
- package/dist/src/kanban/hooks/useAutoscroll.d.ts +10 -0
- package/dist/src/kanban/hooks/useKanbanDnd.d.ts +16 -0
- package/dist/src/kanban/index.d.ts +15 -0
- package/dist/src/kanban/types.d.ts +185 -0
- package/dist/src/kanban/utils/dndMath.d.ts +61 -0
- package/dist/src/kanban/utils/dom.d.ts +62 -0
- package/dist/src/kanban/utils/reorder.d.ts +32 -0
- package/dist/{styles → src/styles}/defaultStyles.d.ts +0 -1
- package/dist/{types → src/types}/index.d.ts +2 -1
- package/dist/{utils → src/utils}/order.d.ts +0 -1
- package/package.json +15 -5
- package/dist/components/DragDropList.d.ts.map +0 -1
- package/dist/components/DraggableItemWrapper.d.ts.map +0 -1
- package/dist/hooks/useDragDropMonitor.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/styles/defaultStyles.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/utils/order.d.ts.map +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanban Board Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for the Kanban board feature.
|
|
5
|
+
* Follows a normalized state pattern for efficient cross-column operations.
|
|
6
|
+
*/
|
|
7
|
+
import type React from 'react';
|
|
8
|
+
export type Id = string;
|
|
9
|
+
/**
|
|
10
|
+
* Represents a single card in the Kanban board
|
|
11
|
+
*/
|
|
12
|
+
export interface KanbanCard {
|
|
13
|
+
/** Unique identifier for the card */
|
|
14
|
+
id: Id;
|
|
15
|
+
/** Card title */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Additional custom fields */
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents a column in the Kanban board
|
|
22
|
+
*/
|
|
23
|
+
export interface KanbanColumn {
|
|
24
|
+
/** Unique identifier for the column */
|
|
25
|
+
id: Id;
|
|
26
|
+
/** Column title */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Ordered list of card IDs in this column */
|
|
29
|
+
cardIds: Id[];
|
|
30
|
+
/** Additional custom fields */
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Normalized state structure for the Kanban board
|
|
35
|
+
* Separates column ordering from card data for efficient updates
|
|
36
|
+
*/
|
|
37
|
+
export interface KanbanBoardState {
|
|
38
|
+
/** Ordered list of columns */
|
|
39
|
+
columns: KanbanColumn[];
|
|
40
|
+
/** Flat lookup object for all cards (by ID) */
|
|
41
|
+
cards: Record<Id, KanbanCard>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Location within the Kanban board
|
|
45
|
+
*/
|
|
46
|
+
export interface DragLocation {
|
|
47
|
+
/** Column ID (undefined for column reorder operations) */
|
|
48
|
+
columnId?: Id;
|
|
49
|
+
/** Index within the column or board */
|
|
50
|
+
index: number;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Result of a drag-and-drop operation
|
|
54
|
+
* Similar to react-beautiful-dnd's DropResult for migration compatibility
|
|
55
|
+
*/
|
|
56
|
+
export interface DropResult {
|
|
57
|
+
/** Type of draggable that was moved */
|
|
58
|
+
type: 'CARD' | 'COLUMN';
|
|
59
|
+
/** Source location before drag */
|
|
60
|
+
source: DragLocation;
|
|
61
|
+
/** Destination location after drop (undefined if canceled) */
|
|
62
|
+
destination?: DragLocation;
|
|
63
|
+
/** ID of the dragged item */
|
|
64
|
+
draggableId: Id;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Props provided to render functions with drag-and-drop state and handlers
|
|
68
|
+
*/
|
|
69
|
+
export interface DragProvided {
|
|
70
|
+
/** Props to spread on the draggable element */
|
|
71
|
+
draggableProps: React.HTMLAttributes<HTMLElement> & {
|
|
72
|
+
'data-draggable-id': Id;
|
|
73
|
+
'data-draggable-type': 'CARD' | 'COLUMN';
|
|
74
|
+
};
|
|
75
|
+
/** Props to spread on the drag handle element (can be same as draggable) */
|
|
76
|
+
dragHandleProps: React.HTMLAttributes<HTMLElement> & {
|
|
77
|
+
tabIndex: number;
|
|
78
|
+
role: string;
|
|
79
|
+
'aria-roledescription': string;
|
|
80
|
+
};
|
|
81
|
+
/** Ref to attach to the draggable element */
|
|
82
|
+
innerRef: React.RefObject<HTMLElement>;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Snapshot of current drag state
|
|
86
|
+
*/
|
|
87
|
+
export interface DragSnapshot {
|
|
88
|
+
/** Whether this element is currently being dragged */
|
|
89
|
+
isDragging: boolean;
|
|
90
|
+
/** Whether a drag is happening over this drop zone */
|
|
91
|
+
isDraggingOver?: boolean;
|
|
92
|
+
/** ID of the item being dragged (if any) */
|
|
93
|
+
draggingId?: Id;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Props for KanbanBoard component
|
|
97
|
+
*/
|
|
98
|
+
export interface KanbanBoardProps {
|
|
99
|
+
/** Current board state (controlled) */
|
|
100
|
+
state: KanbanBoardState;
|
|
101
|
+
/** Callback fired when drag ends */
|
|
102
|
+
onDragEnd: (result: DropResult, stateBefore: KanbanBoardState) => void;
|
|
103
|
+
/** Callback fired when drag starts (optional) */
|
|
104
|
+
onDragStart?: (draggable: {
|
|
105
|
+
id: Id;
|
|
106
|
+
type: 'CARD' | 'COLUMN';
|
|
107
|
+
}) => void;
|
|
108
|
+
/** Render function for a column */
|
|
109
|
+
renderColumn: (column: KanbanColumn, provided: DragProvided, snapshot: DragSnapshot) => React.ReactNode;
|
|
110
|
+
/** Render function for a card */
|
|
111
|
+
renderCard: (card: KanbanCard, provided: DragProvided, snapshot: DragSnapshot) => React.ReactNode;
|
|
112
|
+
/** Custom key extractor for cards (default: card.id) */
|
|
113
|
+
getCardKey?: (card: KanbanCard) => string;
|
|
114
|
+
/** Custom key extractor for columns (default: column.id) */
|
|
115
|
+
getColumnKey?: (column: KanbanColumn) => string;
|
|
116
|
+
/** Callback to determine if a drag should be disabled */
|
|
117
|
+
isDragDisabled?: (id: Id, type: 'CARD' | 'COLUMN') => boolean;
|
|
118
|
+
/** Class name for the board container */
|
|
119
|
+
className?: string;
|
|
120
|
+
/** Inline styles for the board container */
|
|
121
|
+
style?: React.CSSProperties;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Props for KanbanColumnView (headless)
|
|
125
|
+
*/
|
|
126
|
+
export interface KanbanColumnViewProps {
|
|
127
|
+
/** Column data */
|
|
128
|
+
column: KanbanColumn;
|
|
129
|
+
/** Card IDs in this column */
|
|
130
|
+
cardIds: Id[];
|
|
131
|
+
/** Render prop with provided props and snapshot */
|
|
132
|
+
children: (provided: DragProvided, snapshot: DragSnapshot) => React.ReactNode;
|
|
133
|
+
/** Whether column dragging is disabled */
|
|
134
|
+
isDragDisabled?: boolean;
|
|
135
|
+
/** Column index in the board */
|
|
136
|
+
index: number;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Props for KanbanCardView (headless)
|
|
140
|
+
*/
|
|
141
|
+
export interface KanbanCardViewProps {
|
|
142
|
+
/** Card data */
|
|
143
|
+
card: KanbanCard;
|
|
144
|
+
/** Render prop with provided props and snapshot */
|
|
145
|
+
children: (provided: DragProvided, snapshot: DragSnapshot) => React.ReactNode;
|
|
146
|
+
/** Whether card dragging is disabled */
|
|
147
|
+
isDragDisabled?: boolean;
|
|
148
|
+
/** Card index within its column */
|
|
149
|
+
index: number;
|
|
150
|
+
/** Parent column ID */
|
|
151
|
+
columnId: Id;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Internal drag state managed by useKanbanDnd
|
|
155
|
+
*/
|
|
156
|
+
export interface KanbanDragState {
|
|
157
|
+
/** Currently dragging item ID */
|
|
158
|
+
draggingId: Id | null;
|
|
159
|
+
/** Type of item being dragged */
|
|
160
|
+
draggingType: 'CARD' | 'COLUMN' | null;
|
|
161
|
+
/** Source location */
|
|
162
|
+
source: DragLocation | null;
|
|
163
|
+
/** Current destination (updates during drag) */
|
|
164
|
+
destination: DragLocation | null;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Autoscroll configuration
|
|
168
|
+
*/
|
|
169
|
+
export interface AutoscrollConfig {
|
|
170
|
+
/** Distance from edge to trigger autoscroll (px) */
|
|
171
|
+
threshold: number;
|
|
172
|
+
/** Maximum scroll speed (px per frame) */
|
|
173
|
+
maxSpeed: number;
|
|
174
|
+
/** Whether autoscroll is enabled */
|
|
175
|
+
enabled: boolean;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Live region announcement
|
|
179
|
+
*/
|
|
180
|
+
export interface LiveAnnouncement {
|
|
181
|
+
/** Message to announce */
|
|
182
|
+
message: string;
|
|
183
|
+
/** Politeness level */
|
|
184
|
+
politeness: 'polite' | 'assertive';
|
|
185
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DnD Math Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for collision detection and positioning calculations.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Calculate the distance from a point to a rectangle's edges
|
|
8
|
+
*/
|
|
9
|
+
export declare function distanceToEdge(point: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
}, rect: DOMRect): {
|
|
13
|
+
top: number;
|
|
14
|
+
right: number;
|
|
15
|
+
bottom: number;
|
|
16
|
+
left: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Get the closest edge of a rectangle to a point
|
|
20
|
+
*/
|
|
21
|
+
export declare function getClosestEdge(point: {
|
|
22
|
+
x: number;
|
|
23
|
+
y: number;
|
|
24
|
+
}, rect: DOMRect): 'top' | 'right' | 'bottom' | 'left';
|
|
25
|
+
/**
|
|
26
|
+
* Check if a point is within a threshold distance from an edge
|
|
27
|
+
*/
|
|
28
|
+
export declare function isNearEdge(point: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
}, rect: DOMRect, threshold: number): {
|
|
32
|
+
edge: 'top' | 'right' | 'bottom' | 'left' | null;
|
|
33
|
+
distance: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Calculate scroll speed based on distance from edge
|
|
37
|
+
* Closer to edge = faster scroll
|
|
38
|
+
*/
|
|
39
|
+
export declare function calculateScrollSpeed(distance: number, threshold: number, maxSpeed: number): number;
|
|
40
|
+
/**
|
|
41
|
+
* Check if a point is inside a rectangle
|
|
42
|
+
*/
|
|
43
|
+
export declare function isPointInRect(point: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
}, rect: DOMRect): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Calculate the center point of a rectangle
|
|
49
|
+
*/
|
|
50
|
+
export declare function getRectCenter(rect: DOMRect): {
|
|
51
|
+
x: number;
|
|
52
|
+
y: number;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Calculate vertical drop position based on mouse Y relative to element center
|
|
56
|
+
*/
|
|
57
|
+
export declare function getVerticalDropPosition(mouseY: number, elementRect: DOMRect): 'top' | 'bottom';
|
|
58
|
+
/**
|
|
59
|
+
* Calculate horizontal drop position based on mouse X relative to element center
|
|
60
|
+
*/
|
|
61
|
+
export declare function getHorizontalDropPosition(mouseX: number, elementRect: DOMRect): 'left' | 'right';
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DOM Utilities
|
|
3
|
+
*
|
|
4
|
+
* Helper functions for DOM measurements and manipulation.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Safely get bounding client rect for an element
|
|
8
|
+
*/
|
|
9
|
+
export declare function getBoundingRect(element: HTMLElement | null): DOMRect | null;
|
|
10
|
+
/**
|
|
11
|
+
* Get scrollable parent of an element
|
|
12
|
+
*/
|
|
13
|
+
export declare function getScrollParent(element: HTMLElement | null): HTMLElement | null;
|
|
14
|
+
/**
|
|
15
|
+
* Scroll an element by a delta
|
|
16
|
+
*/
|
|
17
|
+
export declare function scrollBy(element: HTMLElement, delta: {
|
|
18
|
+
x?: number;
|
|
19
|
+
y?: number;
|
|
20
|
+
}): void;
|
|
21
|
+
/**
|
|
22
|
+
* Check if an element is scrollable
|
|
23
|
+
*/
|
|
24
|
+
export declare function isScrollable(element: HTMLElement): {
|
|
25
|
+
vertical: boolean;
|
|
26
|
+
horizontal: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Get element's scroll position
|
|
30
|
+
*/
|
|
31
|
+
export declare function getScrollPosition(element: HTMLElement): {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Get maximum scroll for an element
|
|
37
|
+
*/
|
|
38
|
+
export declare function getMaxScroll(element: HTMLElement): {
|
|
39
|
+
x: number;
|
|
40
|
+
y: number;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Clamp scroll position to valid range
|
|
44
|
+
*/
|
|
45
|
+
export declare function clampScroll(scroll: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
}, maxScroll: {
|
|
49
|
+
x: number;
|
|
50
|
+
y: number;
|
|
51
|
+
}): {
|
|
52
|
+
x: number;
|
|
53
|
+
y: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Get all data attributes from an element as an object
|
|
57
|
+
*/
|
|
58
|
+
export declare function getDataAttributes(element: HTMLElement): Record<string, string>;
|
|
59
|
+
/**
|
|
60
|
+
* Find closest ancestor with a data attribute
|
|
61
|
+
*/
|
|
62
|
+
export declare function findClosestWithData(element: HTMLElement | null, dataKey: string): HTMLElement | null;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kanban Reorder Utilities
|
|
3
|
+
*
|
|
4
|
+
* Functions for reordering cards and columns in a Kanban board.
|
|
5
|
+
*/
|
|
6
|
+
import type { KanbanBoardState, DragLocation } from '../types';
|
|
7
|
+
/**
|
|
8
|
+
* Reorder an array by moving an item from one index to another
|
|
9
|
+
*/
|
|
10
|
+
export declare function reorderArray<T>(list: T[], startIndex: number, endIndex: number): T[];
|
|
11
|
+
/**
|
|
12
|
+
* Move a card within the same column
|
|
13
|
+
*/
|
|
14
|
+
export declare function reorderCardInColumn(state: KanbanBoardState, columnId: string, startIndex: number, endIndex: number): KanbanBoardState;
|
|
15
|
+
/**
|
|
16
|
+
* Move a card from one column to another
|
|
17
|
+
*/
|
|
18
|
+
export declare function moveCardBetweenColumns(state: KanbanBoardState, source: DragLocation, destination: DragLocation, cardId: string): KanbanBoardState;
|
|
19
|
+
/**
|
|
20
|
+
* Reorder columns
|
|
21
|
+
*/
|
|
22
|
+
export declare function reorderColumns(state: KanbanBoardState, startIndex: number, endIndex: number): KanbanBoardState;
|
|
23
|
+
/**
|
|
24
|
+
* Apply a drag result to the board state
|
|
25
|
+
* This is a convenience function that handles all reorder cases
|
|
26
|
+
*/
|
|
27
|
+
export declare function applyDragResult(state: KanbanBoardState, result: {
|
|
28
|
+
type: 'CARD' | 'COLUMN';
|
|
29
|
+
source: DragLocation;
|
|
30
|
+
destination?: DragLocation;
|
|
31
|
+
draggableId: string;
|
|
32
|
+
}): KanbanBoardState;
|
|
@@ -26,6 +26,7 @@ export type DragDropListProps<T extends DraggableItem> = {
|
|
|
26
26
|
showDropIndicator?: boolean;
|
|
27
27
|
dropIndicatorClassName?: string;
|
|
28
28
|
dropIndicatorStyle?: React.CSSProperties;
|
|
29
|
+
dropIndicatorPosition?: "top" | "bottom";
|
|
29
30
|
};
|
|
30
31
|
export type DraggableItemWrapperProps<T extends DraggableItem> = {
|
|
31
32
|
item: T;
|
|
@@ -41,5 +42,5 @@ export type DraggableItemWrapperProps<T extends DraggableItem> = {
|
|
|
41
42
|
showDropIndicator?: boolean;
|
|
42
43
|
dropIndicatorClassName?: string;
|
|
43
44
|
dropIndicatorStyle?: React.CSSProperties;
|
|
45
|
+
dropIndicatorPosition?: "top" | "bottom";
|
|
44
46
|
};
|
|
45
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { DraggableItem, OrderUpdate } from '../types';
|
|
2
2
|
export declare function reorder<T>(list: T[], startIndex: number, endIndex: number): T[];
|
|
3
3
|
export declare function calculateOrderUpdates<T extends DraggableItem>(oldItems: T[], newItems: T[]): OrderUpdate[];
|
|
4
|
-
//# sourceMappingURL=order.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-dragdrop-kit",
|
|
3
3
|
"author": "Souvik Sen <https://github.com/Yourstruggle11>",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"description": "A flexible, lightweight React drag-and-drop kit for building sortable lists, grids, and boards with ease.",
|
|
4
|
+
"version": "1.2.0",
|
|
5
|
+
"description": "A flexible, lightweight React drag-and-drop kit for building sortable lists, grids, and kanban boards with ease.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"module": "dist/index.esm.js",
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
10
|
+
"types": "dist/src/index.d.ts",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
13
|
+
"types": "./dist/src/index.d.ts",
|
|
14
14
|
"import": "./dist/index.esm.js",
|
|
15
15
|
"require": "./dist/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./kanban": {
|
|
18
|
+
"types": "./dist/src/kanban/index.d.ts",
|
|
19
|
+
"import": "./dist/kanban.esm.js",
|
|
20
|
+
"require": "./dist/kanban.js"
|
|
16
21
|
}
|
|
17
22
|
},
|
|
18
23
|
"files": ["dist", "README.md", "LICENSE"],
|
|
@@ -21,8 +26,9 @@
|
|
|
21
26
|
"build": "rollup -c",
|
|
22
27
|
"dev": "rollup -c -w",
|
|
23
28
|
"test": "jest",
|
|
29
|
+
"typecheck": "tsc -p tsconfig.build.json --noEmit",
|
|
30
|
+
"build:types": "tsc -p tsconfig.build.json",
|
|
24
31
|
"lint": "eslint src/**/*.{ts,tsx}",
|
|
25
|
-
|
|
26
32
|
"sync-docs": "shx cp -f ../../README.md ./README.md && shx cp -f ../../LICENSE ./LICENSE",
|
|
27
33
|
"prepack": "npm run build && npm run sync-docs",
|
|
28
34
|
"postpack": "shx rm -f ./README.md ./LICENSE",
|
|
@@ -60,6 +66,9 @@
|
|
|
60
66
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
61
67
|
"@rollup/plugin-terser": "^0.4.4",
|
|
62
68
|
"@rollup/plugin-typescript": "^11.0.0",
|
|
69
|
+
"@testing-library/jest-dom": "^6.8.0",
|
|
70
|
+
"@testing-library/react": "^16.3.0",
|
|
71
|
+
"@types/jest": "^30.0.0",
|
|
63
72
|
"@types/react": "^18.0.0",
|
|
64
73
|
"@types/react-dom": "^18.0.0",
|
|
65
74
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
@@ -70,6 +79,7 @@
|
|
|
70
79
|
"rollup": "^3.0.0",
|
|
71
80
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
72
81
|
"shx": "^0.4.0",
|
|
82
|
+
"ts-jest": "^29.4.1",
|
|
73
83
|
"tslib": "^2.0.0",
|
|
74
84
|
"typescript": "^5.0.0"
|
|
75
85
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DragDropList.d.ts","sourceRoot":"","sources":["../../src/components/DragDropList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIjE,wBAAgB,YAAY,CAAC,CAAC,SAAS,aAAa,EAAE,EACpD,KAAK,EACL,SAAS,EACT,UAAU,EACV,kBAAuB,EACvB,cAAmB,EACnB,aAAkB,EAClB,SAAc,EACd,oBAAyB,EACzB,gBAAqB,EACrB,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,GAAG,EACH,SAAsB,EACtB,iBAAyB,EACzB,sBAA2B,EAC3B,kBAAuB,GACxB,EAAE,iBAAiB,CAAC,CAAC,CAAC,qBAwEtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableItemWrapper.d.ts","sourceRoot":"","sources":["../../src/components/DraggableItemWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,KAAK,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAKzE,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,aAAa,EAAE,EAC5D,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAc,EACd,KAAU,EACV,oBAAyB,EACzB,gBAAqB,EACrB,WAAW,EACX,SAAS,EACT,QAAgB,EAChB,iBAAyB,EACzB,sBAA2B,EAC3B,kBAAuB,GACxB,EAAE,yBAAyB,CAAC,CAAC,CAAC,qBAoK9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDragDropMonitor.d.ts","sourceRoot":"","sources":["../../src/hooks/useDragDropMonitor.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE3D,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,aAAa,EAAE,EAC1D,KAAK,EACL,SAAS,EACT,QAAgB,GACjB,EAAE;IACD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,mFA4DA"}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"defaultStyles.d.ts","sourceRoot":"","sources":["../../src/styles/defaultStyles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DzB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sour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