@reactuses/core 5.0.5 → 5.0.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/README.md +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Refer to [documentations](https://reactuse.com/) for more details.
|
|
|
58
58
|
|
|
59
59
|
## Feedback
|
|
60
60
|
|
|
61
|
-
You can submit an [issue](https://github.com/childrentime/reactuse/issues) or provide feedback on [Discord](https://discord.gg/
|
|
61
|
+
You can submit an [issue](https://github.com/childrentime/reactuse/issues) or provide feedback on [Discord](https://discord.gg/HMsq6cFkKp).
|
|
62
62
|
|
|
63
63
|
<hr/>
|
|
64
64
|
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback,
|
|
2
|
+
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback, Dispatch, SetStateAction, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import Cookies from 'js-cookie';
|
|
4
4
|
import { DebounceSettings, ThrottleSettings, DebouncedFunc as DebouncedFunc$1 } from 'lodash-es';
|
|
5
5
|
import * as lodash from 'lodash';
|
|
@@ -448,10 +448,12 @@ interface Position {
|
|
|
448
448
|
* - x
|
|
449
449
|
* - y
|
|
450
450
|
* - 元素是否在拖动中
|
|
451
|
+
* - 设置元素的位置
|
|
451
452
|
* @returns_en A tuple with the following elements:
|
|
452
453
|
* - x
|
|
453
454
|
* - y
|
|
454
455
|
* - Whether the element is being dragged
|
|
456
|
+
* set the element position
|
|
455
457
|
*/
|
|
456
458
|
type UseDraggable = (
|
|
457
459
|
/**
|
|
@@ -463,7 +465,7 @@ target: RefObject<HTMLElement | SVGElement>,
|
|
|
463
465
|
* @zh 可选参数
|
|
464
466
|
* @en optional params
|
|
465
467
|
*/
|
|
466
|
-
options?: UseDraggableOptions) => readonly [number, number, boolean];
|
|
468
|
+
options?: UseDraggableOptions) => readonly [number, number, boolean, Dispatch<SetStateAction<Position>>];
|
|
467
469
|
/**
|
|
468
470
|
* @title UseDraggableOptions
|
|
469
471
|
*/
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback,
|
|
2
|
+
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback, Dispatch, SetStateAction, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import Cookies from 'js-cookie';
|
|
4
4
|
import { DebounceSettings, ThrottleSettings, DebouncedFunc as DebouncedFunc$1 } from 'lodash-es';
|
|
5
5
|
import * as lodash from 'lodash';
|
|
@@ -448,10 +448,12 @@ interface Position {
|
|
|
448
448
|
* - x
|
|
449
449
|
* - y
|
|
450
450
|
* - 元素是否在拖动中
|
|
451
|
+
* - 设置元素的位置
|
|
451
452
|
* @returns_en A tuple with the following elements:
|
|
452
453
|
* - x
|
|
453
454
|
* - y
|
|
454
455
|
* - Whether the element is being dragged
|
|
456
|
+
* set the element position
|
|
455
457
|
*/
|
|
456
458
|
type UseDraggable = (
|
|
457
459
|
/**
|
|
@@ -463,7 +465,7 @@ target: RefObject<HTMLElement | SVGElement>,
|
|
|
463
465
|
* @zh 可选参数
|
|
464
466
|
* @en optional params
|
|
465
467
|
*/
|
|
466
|
-
options?: UseDraggableOptions) => readonly [number, number, boolean];
|
|
468
|
+
options?: UseDraggableOptions) => readonly [number, number, boolean, Dispatch<SetStateAction<Position>>];
|
|
467
469
|
/**
|
|
468
470
|
* @title UseDraggableOptions
|
|
469
471
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback,
|
|
2
|
+
import react__default, { DependencyList, RefObject, MutableRefObject, EffectCallback, Dispatch, SetStateAction, useEffect, useLayoutEffect } from 'react';
|
|
3
3
|
import Cookies from 'js-cookie';
|
|
4
4
|
import { DebounceSettings, ThrottleSettings, DebouncedFunc as DebouncedFunc$1 } from 'lodash-es';
|
|
5
5
|
import * as lodash from 'lodash';
|
|
@@ -448,10 +448,12 @@ interface Position {
|
|
|
448
448
|
* - x
|
|
449
449
|
* - y
|
|
450
450
|
* - 元素是否在拖动中
|
|
451
|
+
* - 设置元素的位置
|
|
451
452
|
* @returns_en A tuple with the following elements:
|
|
452
453
|
* - x
|
|
453
454
|
* - y
|
|
454
455
|
* - Whether the element is being dragged
|
|
456
|
+
* set the element position
|
|
455
457
|
*/
|
|
456
458
|
type UseDraggable = (
|
|
457
459
|
/**
|
|
@@ -463,7 +465,7 @@ target: RefObject<HTMLElement | SVGElement>,
|
|
|
463
465
|
* @zh 可选参数
|
|
464
466
|
* @en optional params
|
|
465
467
|
*/
|
|
466
|
-
options?: UseDraggableOptions) => readonly [number, number, boolean];
|
|
468
|
+
options?: UseDraggableOptions) => readonly [number, number, boolean, Dispatch<SetStateAction<Position>>];
|
|
467
469
|
/**
|
|
468
470
|
* @title UseDraggableOptions
|
|
469
471
|
*/
|
package/dist/index.mjs
CHANGED