@react-types/shared 3.0.0-nightly.1867 → 3.0.0-nightly.1869
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 +2 -2
- package/src/dnd.d.ts +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/shared",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.1869+a9dea8a36",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "a9dea8a3672179e6c38aafd1429daf44c7ea2ff6"
|
|
18
18
|
}
|
package/src/dnd.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface DropExitEvent extends DragDropEvent {
|
|
|
62
62
|
type: 'dropexit'
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
export interface
|
|
65
|
+
export interface TextDropItem {
|
|
66
66
|
/** The item kind. */
|
|
67
67
|
kind: 'text',
|
|
68
68
|
/**
|
|
@@ -74,7 +74,7 @@ export interface TextItem {
|
|
|
74
74
|
getText(type: string): Promise<string>
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
export interface
|
|
77
|
+
export interface FileDropItem {
|
|
78
78
|
/** The item kind. */
|
|
79
79
|
kind: 'file',
|
|
80
80
|
/** The file type (usually a mime type). */
|
|
@@ -87,16 +87,16 @@ export interface FileItem {
|
|
|
87
87
|
getText(): Promise<string>
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export interface
|
|
90
|
+
export interface DirectoryDropItem {
|
|
91
91
|
/** The item kind. */
|
|
92
92
|
kind: 'directory',
|
|
93
93
|
/** The directory name. */
|
|
94
94
|
name: string,
|
|
95
95
|
/** Returns the entries contained within the directory. */
|
|
96
|
-
getEntries(): AsyncIterable<
|
|
96
|
+
getEntries(): AsyncIterable<FileDropItem | DirectoryDropItem>
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export type DropItem =
|
|
99
|
+
export type DropItem = TextDropItem | FileDropItem | DirectoryDropItem;
|
|
100
100
|
|
|
101
101
|
export interface DropEvent extends DragDropEvent {
|
|
102
102
|
/** The event type. */
|
|
@@ -149,7 +149,7 @@ export interface DroppableCollectionDropEvent extends DropEvent {
|
|
|
149
149
|
target: DropTarget
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
interface DroppableCollectionInsertDropEvent {
|
|
152
|
+
export interface DroppableCollectionInsertDropEvent {
|
|
153
153
|
/** The dropped items. */
|
|
154
154
|
items: DropItem[],
|
|
155
155
|
/** The drop operation that should occur. */
|
|
@@ -158,14 +158,14 @@ interface DroppableCollectionInsertDropEvent {
|
|
|
158
158
|
target: ItemDropTarget
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
interface DroppableCollectionRootDropEvent {
|
|
161
|
+
export interface DroppableCollectionRootDropEvent {
|
|
162
162
|
/** The dropped items. */
|
|
163
163
|
items: DropItem[],
|
|
164
164
|
/** The drop operation that should occur. */
|
|
165
165
|
dropOperation: DropOperation
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
interface DroppableCollectionOnItemDropEvent {
|
|
168
|
+
export interface DroppableCollectionOnItemDropEvent {
|
|
169
169
|
/** The dropped items. */
|
|
170
170
|
items: DropItem[],
|
|
171
171
|
/** The drop operation that should occur. */
|
|
@@ -176,7 +176,7 @@ interface DroppableCollectionOnItemDropEvent {
|
|
|
176
176
|
target: ItemDropTarget
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
interface DroppableCollectionReorderEvent {
|
|
179
|
+
export interface DroppableCollectionReorderEvent {
|
|
180
180
|
/** The keys of the items that were reordered. */
|
|
181
181
|
keys: Set<Key>,
|
|
182
182
|
/** The drop operation that should occur. */
|
|
@@ -251,17 +251,17 @@ export interface DroppableCollectionBaseProps {
|
|
|
251
251
|
|
|
252
252
|
export interface DroppableCollectionProps extends DroppableCollectionUtilityOptions, DroppableCollectionBaseProps {}
|
|
253
253
|
|
|
254
|
-
interface DraggableCollectionStartEvent extends DragStartEvent {
|
|
254
|
+
export interface DraggableCollectionStartEvent extends DragStartEvent {
|
|
255
255
|
/** The keys of the items that were dragged. */
|
|
256
256
|
keys: Set<Key>
|
|
257
257
|
}
|
|
258
258
|
|
|
259
|
-
interface DraggableCollectionMoveEvent extends DragMoveEvent {
|
|
259
|
+
export interface DraggableCollectionMoveEvent extends DragMoveEvent {
|
|
260
260
|
/** The keys of the items that were dragged. */
|
|
261
261
|
keys: Set<Key>
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
interface DraggableCollectionEndEvent extends DragEndEvent {
|
|
264
|
+
export interface DraggableCollectionEndEvent extends DragEndEvent {
|
|
265
265
|
/** The keys of the items that were dragged. */
|
|
266
266
|
keys: Set<Key>,
|
|
267
267
|
/** Whether the drop ended within the same collection as it originated. */
|