@reactuses/core 5.0.0 → 5.0.2
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 -9
- package/dist/index.cjs +1 -10
- package/dist/index.mjs +1 -10
- package/package.json +1 -8
package/README.md
CHANGED
|
@@ -64,18 +64,10 @@ You can submit an [issue](https://github.com/childrentime/reactuse/issues) or pr
|
|
|
64
64
|
|
|
65
65
|
## Contribute
|
|
66
66
|
|
|
67
|
-
See the [**Contributing Guide**](CONTRIBUTING.md)
|
|
67
|
+
See the [**Contributing Guide**](https://github.com/childrentime/reactuse/blob/main/CONTRIBUTING.md)
|
|
68
68
|
|
|
69
69
|
<hr/>
|
|
70
70
|
|
|
71
|
-
## Idea
|
|
72
|
-
|
|
73
|
-
We want to keep a single hook function as simple as possible.
|
|
74
|
-
|
|
75
|
-
* For data fetch, we recommend use [swr](https://www.npmjs.com/package/swr)
|
|
76
|
-
|
|
77
|
-
* For keyboard shortcuts, we recommend use [react-hotkeys-hook](https://www.npmjs.com/package/react-hotkeys-hook)
|
|
78
|
-
|
|
79
71
|
## Thanks
|
|
80
72
|
|
|
81
73
|
This project is heavily inspired by the following awesome projects.
|
package/dist/index.cjs
CHANGED
|
@@ -609,9 +609,9 @@ function useStorage(key, defaultValue, getStorage = ()=>isBrowser ? sessionStora
|
|
|
609
609
|
}
|
|
610
610
|
};
|
|
611
611
|
setState(getStoredValue());
|
|
612
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
612
613
|
}, [
|
|
613
614
|
key,
|
|
614
|
-
defaultValue,
|
|
615
615
|
serializer,
|
|
616
616
|
storage,
|
|
617
617
|
onError,
|
|
@@ -798,15 +798,6 @@ const useDraggable = (target, options = {})=>{
|
|
|
798
798
|
x: 0,
|
|
799
799
|
y: 0
|
|
800
800
|
});
|
|
801
|
-
React.useEffect(()=>{
|
|
802
|
-
var _options_initialValue;
|
|
803
|
-
setPositon((_options_initialValue = options.initialValue) != null ? _options_initialValue : {
|
|
804
|
-
x: 0,
|
|
805
|
-
y: 0
|
|
806
|
-
});
|
|
807
|
-
}, [
|
|
808
|
-
options.initialValue
|
|
809
|
-
]);
|
|
810
801
|
const [pressedDelta, setPressedDelta] = React.useState();
|
|
811
802
|
const filterEvent = (e)=>{
|
|
812
803
|
if (options.pointerTypes) {
|
package/dist/index.mjs
CHANGED
|
@@ -602,9 +602,9 @@ function useStorage(key, defaultValue, getStorage = ()=>isBrowser ? sessionStora
|
|
|
602
602
|
}
|
|
603
603
|
};
|
|
604
604
|
setState(getStoredValue());
|
|
605
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
605
606
|
}, [
|
|
606
607
|
key,
|
|
607
|
-
defaultValue,
|
|
608
608
|
serializer,
|
|
609
609
|
storage,
|
|
610
610
|
onError,
|
|
@@ -791,15 +791,6 @@ const useDraggable = (target, options = {})=>{
|
|
|
791
791
|
x: 0,
|
|
792
792
|
y: 0
|
|
793
793
|
});
|
|
794
|
-
useEffect(()=>{
|
|
795
|
-
var _options_initialValue;
|
|
796
|
-
setPositon((_options_initialValue = options.initialValue) != null ? _options_initialValue : {
|
|
797
|
-
x: 0,
|
|
798
|
-
y: 0
|
|
799
|
-
});
|
|
800
|
-
}, [
|
|
801
|
-
options.initialValue
|
|
802
|
-
]);
|
|
803
794
|
const [pressedDelta, setPressedDelta] = useState();
|
|
804
795
|
const filterEvent = (e)=>{
|
|
805
796
|
if (options.pointerTypes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reactuses/core",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"license": "Unlicense",
|
|
5
5
|
"homepage": "https://www.reactuse.com/",
|
|
6
6
|
"repository": {
|
|
@@ -66,10 +66,6 @@
|
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@jsdevtools/version-bump-prompt": "^6.1.0",
|
|
68
68
|
"@reactuses/ts-document": "workspace:*",
|
|
69
|
-
"@rollup/plugin-commonjs": "^25.0.7",
|
|
70
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
71
|
-
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
72
|
-
"@rollup/plugin-replace": "^5.0.5",
|
|
73
69
|
"@testing-library/react": "^13.4.0",
|
|
74
70
|
"@types/jest": "^27.5.2",
|
|
75
71
|
"@types/js-cookie": "^3.0.3",
|
|
@@ -85,9 +81,6 @@
|
|
|
85
81
|
"lodash": "^4.17.21",
|
|
86
82
|
"react": "^18.2.0",
|
|
87
83
|
"react-dom": "^18.2.0",
|
|
88
|
-
"rollup": "^4.9.4",
|
|
89
|
-
"rollup-plugin-dts": "^6.1.0",
|
|
90
|
-
"rollup-plugin-esbuild": "^6.1.0",
|
|
91
84
|
"typescript": "^5.3.3"
|
|
92
85
|
}
|
|
93
86
|
}
|