@react-spectrum/dnd 3.0.0-alpha.3 → 3.0.0-alpha.6

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 CHANGED
@@ -2,28 +2,12 @@ var $9OUiQ$reactstatelydnd = require("@react-stately/dnd");
2
2
  var $9OUiQ$reactariadnd = require("@react-aria/dnd");
3
3
  var $9OUiQ$react = require("react");
4
4
 
5
- function $parcel$exportWildcard(dest, source) {
6
- Object.keys(source).forEach(function(key) {
7
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
8
- return;
9
- }
10
-
11
- Object.defineProperty(dest, key, {
12
- enumerable: true,
13
- get: function get() {
14
- return source[key];
15
- }
16
- });
17
- });
18
-
19
- return dest;
20
- }
21
5
  function $parcel$export(e, n, v, s) {
22
6
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
23
7
  }
24
- var $bb595e9145c20bae$exports = {};
25
8
 
26
- $parcel$export($bb595e9145c20bae$exports, "useDragHooks", () => $bb595e9145c20bae$export$ca50582736fec395);
9
+ $parcel$export(module.exports, "useDragHooks", () => $bb595e9145c20bae$export$ca50582736fec395);
10
+ $parcel$export(module.exports, "useDropHooks", () => $eb31ce34e8964bed$export$c9cc1cdafc7aa18a);
27
11
 
28
12
 
29
13
 
@@ -44,9 +28,6 @@ function $bb595e9145c20bae$export$ca50582736fec395(options) {
44
28
  }
45
29
 
46
30
 
47
- var $eb31ce34e8964bed$exports = {};
48
-
49
- $parcel$export($eb31ce34e8964bed$exports, "useDropHooks", () => $eb31ce34e8964bed$export$c9cc1cdafc7aa18a);
50
31
 
51
32
 
52
33
 
@@ -73,8 +54,6 @@ function $eb31ce34e8964bed$export$c9cc1cdafc7aa18a(options) {
73
54
  }
74
55
 
75
56
 
76
- $parcel$exportWildcard(module.exports, $bb595e9145c20bae$exports);
77
- $parcel$exportWildcard(module.exports, $eb31ce34e8964bed$exports);
78
57
 
79
58
 
80
59
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
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"}
1
+ {"mappings":";;;;;;;;;;;;;SCagB,yCAAY,CAAC,OAAwB,EAAa,CAAC;IACjE,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;;;;;;SCCe,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 type {DragHooks, DragHookOptions} from './useDragHooks';\nexport type {DropHooks} from './useDropHooks';\nexport {useDragHooks} from './useDragHooks';\nexport {useDropHooks} 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 interface DragHookOptions extends Omit<DraggableCollectionProps, 'preview'> {}\n\nexport function useDragHooks(options: DragHookOptions): 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
@@ -2,12 +2,6 @@ import {useDraggableCollectionState as $6PX7k$useDraggableCollectionState, useDr
2
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
- function $parcel$export(e, n, v, s) {
6
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
7
- }
8
- var $1d9ad6c92ef06635$exports = {};
9
-
10
- $parcel$export($1d9ad6c92ef06635$exports, "useDragHooks", () => $1d9ad6c92ef06635$export$ca50582736fec395);
11
5
 
12
6
 
13
7
 
@@ -28,9 +22,6 @@ function $1d9ad6c92ef06635$export$ca50582736fec395(options) {
28
22
  }
29
23
 
30
24
 
31
- var $d9620cb8af727810$exports = {};
32
-
33
- $parcel$export($d9620cb8af727810$exports, "useDropHooks", () => $d9620cb8af727810$export$c9cc1cdafc7aa18a);
34
25
 
35
26
 
36
27
 
@@ -1 +1 @@
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"}
1
+ {"mappings":";;;;;;;SCagB,yCAAY,CAAC,OAAwB,EAAa,CAAC;IACjE,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;;;;;;SCCe,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 type {DragHooks, DragHookOptions} from './useDragHooks';\nexport type {DropHooks} from './useDropHooks';\nexport {useDragHooks} from './useDragHooks';\nexport {useDropHooks} 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 interface DragHookOptions extends Omit<DraggableCollectionProps, 'preview'> {}\n\nexport function useDragHooks(options: DragHookOptions): 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
@@ -7,7 +7,9 @@ export interface DragHooks {
7
7
  useDraggableItem(props: DraggableItemProps, state: DraggableCollectionState): DraggableItemResult;
8
8
  DragPreview: typeof DragPreview;
9
9
  }
10
- export function useDragHooks(options: DraggableCollectionProps): DragHooks;
10
+ export interface DragHookOptions extends Omit<DraggableCollectionProps, 'preview'> {
11
+ }
12
+ export function useDragHooks(options: DragHookOptions): DragHooks;
11
13
  export interface DropHooks {
12
14
  useDroppableCollectionState(props: DroppableCollectionStateOptions): DroppableCollectionState;
13
15
  useDroppableCollection(props: DroppableCollectionOptions, state: DroppableCollectionState, ref: RefObject<HTMLElement>): DroppableCollectionResult;
@@ -1 +1 @@
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"}
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,gCAAiC,SAAQ,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC;CAAG;AAErF,6BAA6B,OAAO,EAAE,eAAe,GAAG,SAAS,CAQhE;ACND;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 type {DragHooks, DragHookOptions} from './useDragHooks';\nexport type {DropHooks} from './useDropHooks';\nexport {useDragHooks} from './useDragHooks';\nexport {useDropHooks} 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-alpha.3",
3
+ "version": "3.0.0-alpha.6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/dnd": "3.0.0-alpha.9",
36
- "@react-stately/dnd": "3.0.0-alpha.7",
37
- "@react-types/shared": "^3.13.0"
35
+ "@react-aria/dnd": "3.0.0-alpha.12",
36
+ "@react-stately/dnd": "3.0.0-alpha.10",
37
+ "@react-types/shared": "^3.14.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -46,5 +46,5 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "gitHead": "8f921ec5094e7c2b3c301bcb6133372e35a2052b"
49
+ "gitHead": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
50
50
  }
package/src/index.ts CHANGED
@@ -12,5 +12,7 @@
12
12
 
13
13
  /// <reference types="css-module-types" />
14
14
 
15
- export * from './useDragHooks';
16
- export * from './useDropHooks';
15
+ export type {DragHooks, DragHookOptions} from './useDragHooks';
16
+ export type {DropHooks} from './useDropHooks';
17
+ export {useDragHooks} from './useDragHooks';
18
+ export {useDropHooks} from './useDropHooks';
@@ -9,7 +9,9 @@ export interface DragHooks {
9
9
  DragPreview: typeof DragPreview
10
10
  }
11
11
 
12
- export function useDragHooks(options: DraggableCollectionProps): DragHooks {
12
+ export interface DragHookOptions extends Omit<DraggableCollectionProps, 'preview'> {}
13
+
14
+ export function useDragHooks(options: DragHookOptions): DragHooks {
13
15
  return useMemo(() => ({
14
16
  useDraggableCollectionState(props: DraggableCollectionOptions) {
15
17
  return useDraggableCollectionState({...props, ...options});