@react-spectrum/dnd 3.0.0-nightly.3262 → 3.0.0-nightly.3268
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/main.js +2 -1
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -2
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/useDragHooks.ts +6 -4
package/dist/main.js
CHANGED
|
@@ -35,7 +35,8 @@ function $bb595e9145c20bae$export$ca50582736fec395(options) {
|
|
|
35
35
|
...options
|
|
36
36
|
});
|
|
37
37
|
},
|
|
38
|
-
useDraggableItem: $9OUiQ$reactariadnd.useDraggableItem
|
|
38
|
+
useDraggableItem: $9OUiQ$reactariadnd.useDraggableItem,
|
|
39
|
+
DragPreview: $9OUiQ$reactariadnd.DragPreview
|
|
39
40
|
})
|
|
40
41
|
, [
|
|
41
42
|
options
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;SCWgB,yCAAY,CAAC,OAAiC,EAAa,CAAC;IAC1E,MAAM,CAAC,oBAAO,MAAQ,CAAC;YACrB,2BAA2B,EAAC,KAAiC,EAAE,CAAC;gBAC9D,MAAM,CAAC,kDAA2B,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC;YAC3D,CAAC;8BACD,oCAAgB;yBAChB,+BAAW;QACb,CAAC;MAAG,CAAC;QAAA,OAAO;IAAA,CAAC;AACf,CAAC;;;;;;;;;SCGe,yCAAY,CAAC,OAAiC,EAAa,CAAC;IAC1E,MAAM,CAAC,oBAAO,MAAQ,CAAC;YACrB,2BAA2B,EAAC,KAAK,EAAE,CAAC;gBAClC,MAAM,CAAC,kDAA2B,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC;YAC3D,CAAC;8BACD,oCAAgB;YAChB,sBAAsB,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;gBACzC,MAAM,CAAC,0CAAsB,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC,EAAE,KAAK,EAAE,GAAG;YAClE,CAAC;8BACD,oCAAgB;QAClB,CAAC;MAAG,CAAC;QAAA,OAAO;IAAA,CAAC;AACf,CAAC;;","sources":["packages/@react-spectrum/dnd/src/index.ts","packages/@react-spectrum/dnd/src/useDragHooks.ts","packages/@react-spectrum/dnd/src/useDropHooks.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './useDragHooks';\nexport * from './useDropHooks';\n","import {DraggableCollectionOptions, DraggableCollectionState, useDraggableCollectionState} from '@react-stately/dnd';\nimport {DraggableCollectionProps} from '@react-types/shared';\nimport {DraggableItemProps, DraggableItemResult, DragPreview, useDraggableItem} from '@react-aria/dnd';\nimport {useMemo} from 'react';\n\nexport interface DragHooks {\n useDraggableCollectionState(props: Omit<DraggableCollectionOptions, 'getItems'>): DraggableCollectionState,\n useDraggableItem(props: DraggableItemProps, state: DraggableCollectionState): DraggableItemResult,\n DragPreview: typeof DragPreview\n}\n\nexport function useDragHooks(options: DraggableCollectionProps): DragHooks {\n return useMemo(() => ({\n useDraggableCollectionState(props: DraggableCollectionOptions) {\n return useDraggableCollectionState({...props, ...options});\n },\n useDraggableItem,\n DragPreview\n }), [options]);\n}\n","import {\n DropIndicatorAria,\n DropIndicatorProps,\n DroppableCollectionOptions,\n DroppableCollectionResult,\n DroppableItemOptions,\n DroppableItemResult,\n useDropIndicator,\n useDroppableCollection,\n useDroppableItem\n} from '@react-aria/dnd';\nimport {DroppableCollectionProps} from '@react-types/shared';\nimport {DroppableCollectionState, DroppableCollectionStateOptions, useDroppableCollectionState} from '@react-stately/dnd';\nimport {RefObject, useMemo} from 'react';\n\nexport interface DropHooks {\n useDroppableCollectionState(props: DroppableCollectionStateOptions): DroppableCollectionState,\n useDroppableCollection(props: DroppableCollectionOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DroppableCollectionResult,\n useDroppableItem(options: DroppableItemOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DroppableItemResult,\n useDropIndicator(props: DropIndicatorProps, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DropIndicatorAria\n}\n\nexport function useDropHooks(options: DroppableCollectionProps): DropHooks {\n return useMemo(() => ({\n useDroppableCollectionState(props) {\n return useDroppableCollectionState({...props, ...options});\n },\n useDroppableItem,\n useDroppableCollection(props, state, ref) {\n return useDroppableCollection({...props, ...options}, state, ref);\n },\n useDropIndicator\n }), [options]);\n}\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {useDraggableCollectionState as $6PX7k$useDraggableCollectionState, useDroppableCollectionState as $6PX7k$useDroppableCollectionState} from "@react-stately/dnd";
|
|
2
|
-
import {useDraggableItem as $6PX7k$useDraggableItem, useDroppableItem as $6PX7k$useDroppableItem, useDroppableCollection as $6PX7k$useDroppableCollection, useDropIndicator as $6PX7k$useDropIndicator} from "@react-aria/dnd";
|
|
2
|
+
import {useDraggableItem as $6PX7k$useDraggableItem, DragPreview as $6PX7k$DragPreview, useDroppableItem as $6PX7k$useDroppableItem, useDroppableCollection as $6PX7k$useDroppableCollection, useDropIndicator as $6PX7k$useDropIndicator} from "@react-aria/dnd";
|
|
3
3
|
import {useMemo as $6PX7k$useMemo} from "react";
|
|
4
4
|
|
|
5
5
|
function $parcel$export(e, n, v, s) {
|
|
@@ -19,7 +19,8 @@ function $1d9ad6c92ef06635$export$ca50582736fec395(options) {
|
|
|
19
19
|
...options
|
|
20
20
|
});
|
|
21
21
|
},
|
|
22
|
-
useDraggableItem: $6PX7k$useDraggableItem
|
|
22
|
+
useDraggableItem: $6PX7k$useDraggableItem,
|
|
23
|
+
DragPreview: $6PX7k$DragPreview
|
|
23
24
|
})
|
|
24
25
|
, [
|
|
25
26
|
options
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;SCWgB,yCAAY,CAAC,OAAiC,EAAa,CAAC;IAC1E,MAAM,CAAC,cAAO,MAAQ,CAAC;YACrB,2BAA2B,EAAC,KAAiC,EAAE,CAAC;gBAC9D,MAAM,CAAC,kCAA2B,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC;YAC3D,CAAC;8BACD,uBAAgB;yBAChB,kBAAW;QACb,CAAC;MAAG,CAAC;QAAA,OAAO;IAAA,CAAC;AACf,CAAC;;;;;;;;;SCGe,yCAAY,CAAC,OAAiC,EAAa,CAAC;IAC1E,MAAM,CAAC,cAAO,MAAQ,CAAC;YACrB,2BAA2B,EAAC,KAAK,EAAE,CAAC;gBAClC,MAAM,CAAC,kCAA2B,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC;YAC3D,CAAC;8BACD,uBAAgB;YAChB,sBAAsB,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;gBACzC,MAAM,CAAC,6BAAsB,CAAC,CAAC;uBAAG,KAAK;uBAAK,OAAO;gBAAA,CAAC,EAAE,KAAK,EAAE,GAAG;YAClE,CAAC;8BACD,uBAAgB;QAClB,CAAC;MAAG,CAAC;QAAA,OAAO;IAAA,CAAC;AACf,CAAC;;","sources":["packages/@react-spectrum/dnd/src/index.ts","packages/@react-spectrum/dnd/src/useDragHooks.ts","packages/@react-spectrum/dnd/src/useDropHooks.ts"],"sourcesContent":["/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './useDragHooks';\nexport * from './useDropHooks';\n","import {DraggableCollectionOptions, DraggableCollectionState, useDraggableCollectionState} from '@react-stately/dnd';\nimport {DraggableCollectionProps} from '@react-types/shared';\nimport {DraggableItemProps, DraggableItemResult, DragPreview, useDraggableItem} from '@react-aria/dnd';\nimport {useMemo} from 'react';\n\nexport interface DragHooks {\n useDraggableCollectionState(props: Omit<DraggableCollectionOptions, 'getItems'>): DraggableCollectionState,\n useDraggableItem(props: DraggableItemProps, state: DraggableCollectionState): DraggableItemResult,\n DragPreview: typeof DragPreview\n}\n\nexport function useDragHooks(options: DraggableCollectionProps): DragHooks {\n return useMemo(() => ({\n useDraggableCollectionState(props: DraggableCollectionOptions) {\n return useDraggableCollectionState({...props, ...options});\n },\n useDraggableItem,\n DragPreview\n }), [options]);\n}\n","import {\n DropIndicatorAria,\n DropIndicatorProps,\n DroppableCollectionOptions,\n DroppableCollectionResult,\n DroppableItemOptions,\n DroppableItemResult,\n useDropIndicator,\n useDroppableCollection,\n useDroppableItem\n} from '@react-aria/dnd';\nimport {DroppableCollectionProps} from '@react-types/shared';\nimport {DroppableCollectionState, DroppableCollectionStateOptions, useDroppableCollectionState} from '@react-stately/dnd';\nimport {RefObject, useMemo} from 'react';\n\nexport interface DropHooks {\n useDroppableCollectionState(props: DroppableCollectionStateOptions): DroppableCollectionState,\n useDroppableCollection(props: DroppableCollectionOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DroppableCollectionResult,\n useDroppableItem(options: DroppableItemOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DroppableItemResult,\n useDropIndicator(props: DropIndicatorProps, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DropIndicatorAria\n}\n\nexport function useDropHooks(options: DroppableCollectionProps): DropHooks {\n return useMemo(() => ({\n useDroppableCollectionState(props) {\n return useDroppableCollectionState({...props, ...options});\n },\n useDroppableItem,\n useDroppableCollection(props, state, ref) {\n return useDroppableCollection({...props, ...options}, state, ref);\n },\n useDropIndicator\n }), [options]);\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DraggableCollectionOptions, DraggableCollectionState, DroppableCollectionState, DroppableCollectionStateOptions } from "@react-stately/dnd";
|
|
2
2
|
import { DraggableCollectionProps, DroppableCollectionProps } from "@react-types/shared";
|
|
3
|
-
import { DraggableItemProps, DraggableItemResult, DropIndicatorAria, DropIndicatorProps, DroppableCollectionOptions, DroppableCollectionResult, DroppableItemOptions, DroppableItemResult } from "@react-aria/dnd";
|
|
3
|
+
import { DraggableItemProps, DraggableItemResult, DragPreview, DropIndicatorAria, DropIndicatorProps, DroppableCollectionOptions, DroppableCollectionResult, DroppableItemOptions, DroppableItemResult } from "@react-aria/dnd";
|
|
4
4
|
import { RefObject } from "react";
|
|
5
5
|
export interface DragHooks {
|
|
6
6
|
useDraggableCollectionState(props: Omit<DraggableCollectionOptions, 'getItems'>): DraggableCollectionState;
|
|
7
7
|
useDraggableItem(props: DraggableItemProps, state: DraggableCollectionState): DraggableItemResult;
|
|
8
|
+
DragPreview: typeof DragPreview;
|
|
8
9
|
}
|
|
9
10
|
export function useDragHooks(options: DraggableCollectionProps): DragHooks;
|
|
10
11
|
export interface DropHooks {
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;AAKA;
|
|
1
|
+
{"mappings":";;;;AAKA;IACE,2BAA2B,CAAC,KAAK,EAAE,IAAI,CAAC,0BAA0B,EAAE,UAAU,CAAC,GAAG,wBAAwB,CAAC;IAC3G,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,CAAC;IAClG,aAAa,kBAAkB,CAAA;CAChC;AAED,6BAA6B,OAAO,EAAE,wBAAwB,GAAG,SAAS,CAQzE;ACJD;IACE,2BAA2B,CAAC,KAAK,EAAE,+BAA+B,GAAG,wBAAwB,CAAC;IAC9F,sBAAsB,CAAC,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,yBAAyB,CAAC;IACnJ,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,mBAAmB,CAAC;IACnI,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,wBAAwB,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,iBAAiB,CAAA;CAC7H;AAED,6BAA6B,OAAO,EAAE,wBAAwB,GAAG,SAAS,CAWzE","sources":["packages/@react-spectrum/dnd/src/packages/@react-spectrum/dnd/src/useDragHooks.ts","packages/@react-spectrum/dnd/src/packages/@react-spectrum/dnd/src/useDropHooks.ts","packages/@react-spectrum/dnd/src/packages/@react-spectrum/dnd/src/index.ts","packages/@react-spectrum/dnd/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './useDragHooks';\nexport * from './useDropHooks';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/dnd",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.3268+5d6e7ed6f",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/dnd": "3.0.0-nightly.
|
|
36
|
-
"@react-stately/dnd": "3.0.0-nightly.
|
|
37
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
35
|
+
"@react-aria/dnd": "3.0.0-nightly.3268+5d6e7ed6f",
|
|
36
|
+
"@react-stately/dnd": "3.0.0-nightly.3268+5d6e7ed6f",
|
|
37
|
+
"@react-types/shared": "3.0.0-nightly.1569+5d6e7ed6f"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
40
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1569+5d6e7ed6f"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
43
|
"@react-spectrum/provider": "^3.0.0",
|
|
44
|
-
"react": "^16.8.0 || ^17.0.0-rc.1"
|
|
44
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
45
45
|
},
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5d6e7ed6f3f6fc5ba381fc0e5a775b318e797140"
|
|
50
50
|
}
|
package/src/useDragHooks.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import {DraggableCollectionOptions, DraggableCollectionState, useDraggableCollectionState} from '@react-stately/dnd';
|
|
2
2
|
import {DraggableCollectionProps} from '@react-types/shared';
|
|
3
|
-
import {DraggableItemProps, DraggableItemResult, useDraggableItem} from '@react-aria/dnd';
|
|
3
|
+
import {DraggableItemProps, DraggableItemResult, DragPreview, useDraggableItem} from '@react-aria/dnd';
|
|
4
4
|
import {useMemo} from 'react';
|
|
5
5
|
|
|
6
6
|
export interface DragHooks {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
useDraggableCollectionState(props: Omit<DraggableCollectionOptions, 'getItems'>): DraggableCollectionState,
|
|
8
|
+
useDraggableItem(props: DraggableItemProps, state: DraggableCollectionState): DraggableItemResult,
|
|
9
|
+
DragPreview: typeof DragPreview
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
export function useDragHooks(options: DraggableCollectionProps): DragHooks {
|
|
@@ -13,6 +14,7 @@ export function useDragHooks(options: DraggableCollectionProps): DragHooks {
|
|
|
13
14
|
useDraggableCollectionState(props: DraggableCollectionOptions) {
|
|
14
15
|
return useDraggableCollectionState({...props, ...options});
|
|
15
16
|
},
|
|
16
|
-
useDraggableItem
|
|
17
|
+
useDraggableItem,
|
|
18
|
+
DragPreview
|
|
17
19
|
}), [options]);
|
|
18
20
|
}
|