react-magic-card 0.2.0 → 0.2.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 +3 -5
- package/dist/MagicCircle/index.js +2 -0
- package/dist/MagicStraight/index.js +2 -0
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://bundlephobia.com/package/react-magic-card)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
|
|
7
|
-
This is the framer motion components, that support
|
|
7
|
+
This is the framer motion components, that support images gallery.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -73,7 +73,6 @@ function MyComponent() {
|
|
|
73
73
|
| delay | delay of the animation firing interval |
|
|
74
74
|
| offsetIndex | add an offset to the index of the components and images |
|
|
75
75
|
| reverseIndex | reverse index order the default true |
|
|
76
|
-
| loading | loading option of the eager or lazy the default auto |
|
|
77
76
|
| className | className of the component |
|
|
78
77
|
| classImages | className of the images |
|
|
79
78
|
| classImageSelect | className of the select image |
|
|
@@ -81,8 +80,7 @@ function MyComponent() {
|
|
|
81
80
|
| animate | object in the animation property |
|
|
82
81
|
| initial | object in the animation property |
|
|
83
82
|
| transition | object in the transition property |
|
|
84
|
-
|
|
|
85
|
-
| pickTransition | object in the tansition property |
|
|
83
|
+
| pickTransition | object in the transition property |
|
|
86
84
|
| pickProperty | object in the pick property |
|
|
87
85
|
|
|
88
86
|
## MagicCircle Properties
|
|
@@ -134,4 +132,4 @@ It is Inherits framer motion transition object other than intera.
|
|
|
134
132
|
|
|
135
133
|
## License
|
|
136
134
|
|
|
137
|
-
MIT License
|
|
135
|
+
The MIT License.
|
|
@@ -92,6 +92,8 @@ const MagicCircle = ({ images, height, width, dynamic = true, clockwise = true,
|
|
|
92
92
|
setHasDelayed(true);
|
|
93
93
|
}, delay);
|
|
94
94
|
// Add handle event when component mount and deps update.
|
|
95
|
+
if (!hasDelayed)
|
|
96
|
+
return;
|
|
95
97
|
outer.addEventListener('wheel', handleWheel, { passive: true });
|
|
96
98
|
outer.addEventListener('touchstart', handleTouchStart, { passive: true });
|
|
97
99
|
outer.addEventListener('touchmove', handleTouchMove, { passive: true });
|
|
@@ -101,6 +101,8 @@ const MagicStraight = ({ images, height, width, vertical = true, margin = 0, sel
|
|
|
101
101
|
setHasDelayed(true);
|
|
102
102
|
}, delay);
|
|
103
103
|
// Add handle event when component mount and deps update.
|
|
104
|
+
if (!hasDelayed)
|
|
105
|
+
return;
|
|
104
106
|
outer.addEventListener('wheel', handleWheel, { passive: true });
|
|
105
107
|
outer.addEventListener('touchstart', handleTouchStart, { passive: true });
|
|
106
108
|
outer.addEventListener('touchmove', handleTouchMove, { passive: true });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-magic-card",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.2",
|
|
4
|
+
"description": "React Component library for images gallery using the framer motion animation.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"typings": "dist/index.d.ts",
|
|
7
7
|
"repository": {
|
|
@@ -20,11 +20,10 @@
|
|
|
20
20
|
},
|
|
21
21
|
"keywords": [
|
|
22
22
|
"react",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"gallery"
|
|
27
|
-
"animation"
|
|
23
|
+
"component",
|
|
24
|
+
"animation",
|
|
25
|
+
"images",
|
|
26
|
+
"gallery"
|
|
28
27
|
],
|
|
29
28
|
"license": "MIT",
|
|
30
29
|
"dependencies": {
|