react-ui-animate 2.0.0-rc.2 → 2.0.0-rc.3
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/.vscode/settings.json +3 -3
- package/LICENSE +21 -21
- package/README.md +115 -115
- package/dist/animation/index.d.ts +1 -0
- package/dist/animation/modules/AnimatedBlock.d.ts +8 -0
- package/dist/animation/modules/AnimatedImage.d.ts +8 -0
- package/dist/animation/modules/AnimatedInline.d.ts +8 -0
- package/dist/animation/modules/MountedBlock.d.ts +18 -0
- package/dist/animation/modules/ScrollableBlock.d.ts +22 -0
- package/dist/animation/modules/TransitionBlock.d.ts +18 -0
- package/dist/animation/modules/index.d.ts +6 -0
- package/dist/animation/useAnimatedValue.d.ts +7 -3
- package/dist/animation/useMountedValue.d.ts +5 -4
- package/dist/gestures/controllers/MouseMoveGesture.d.ts +2 -2
- package/dist/gestures/controllers/ScrollGesture.d.ts +2 -2
- package/dist/gestures/controllers/WheelGesture.d.ts +2 -2
- package/dist/gestures/controllers/index.d.ts +4 -4
- package/dist/gestures/eventAttacher.d.ts +1 -1
- package/dist/gestures/hooks/index.d.ts +5 -5
- package/dist/gestures/hooks/useDrag.d.ts +1 -1
- package/dist/gestures/hooks/useGesture.d.ts +1 -1
- package/dist/gestures/hooks/useMouseMove.d.ts +1 -1
- package/dist/gestures/hooks/useRecognizer.d.ts +1 -1
- package/dist/gestures/hooks/useScroll.d.ts +1 -1
- package/dist/gestures/hooks/useWheel.d.ts +1 -1
- package/dist/gestures/index.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +181 -150
- package/dist/index.js.map +1 -1
- package/package.json +49 -49
- package/rollup.config.js +18 -18
- package/src/animation/animationType.ts +17 -17
- package/src/animation/getInitialConfig.ts +61 -61
- package/src/animation/index.ts +10 -9
- package/src/animation/interpolation.ts +24 -24
- package/src/animation/modules/AnimatedBlock.ts +8 -0
- package/src/animation/modules/AnimatedImage.ts +8 -0
- package/src/animation/modules/AnimatedInline.ts +8 -0
- package/src/animation/modules/MountedBlock.tsx +25 -0
- package/src/animation/modules/ScrollableBlock.tsx +62 -0
- package/src/animation/modules/TransitionBlock.tsx +26 -0
- package/src/animation/modules/index.ts +6 -0
- package/src/animation/useAnimatedValue.ts +71 -62
- package/src/animation/useMountedValue.ts +67 -66
- package/src/gestures/controllers/DragGesture.ts +177 -177
- package/src/gestures/controllers/Gesture.ts +54 -54
- package/src/gestures/controllers/MouseMoveGesture.ts +111 -111
- package/src/gestures/controllers/ScrollGesture.ts +107 -107
- package/src/gestures/controllers/WheelGesture.ts +123 -123
- package/src/gestures/controllers/index.ts +4 -4
- package/src/gestures/eventAttacher.ts +67 -67
- package/src/gestures/hooks/index.ts +5 -5
- package/src/gestures/hooks/useDrag.ts +14 -14
- package/src/gestures/hooks/useGesture.ts +38 -38
- package/src/gestures/hooks/useMouseMove.ts +11 -11
- package/src/gestures/hooks/useRecognizer.ts +59 -59
- package/src/gestures/hooks/useScroll.ts +11 -11
- package/src/gestures/hooks/useWheel.ts +11 -11
- package/src/gestures/index.ts +2 -2
- package/src/gestures/math.ts +120 -120
- package/src/gestures/types.ts +49 -49
- package/src/gestures/withDefault.ts +3 -3
- package/src/hooks/index.ts +3 -3
- package/src/hooks/useMeasure.ts +133 -133
- package/src/hooks/useOutsideClick.ts +36 -36
- package/src/hooks/useWindowDimension.ts +59 -59
- package/src/index.ts +5 -5
- package/src/utils/delay.ts +9 -9
- package/src/utils/index.ts +2 -2
- package/src/utils/isDefined.ts +4 -4
- package/tsconfig.json +25 -25
- package/dist/animation/modules.d.ts +0 -55
- package/src/animation/modules.tsx +0 -105
package/.vscode/settings.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compile-hero.disable-compile-files-on-did-save-code": false
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compile-hero.disable-compile-files-on-did-save-code": false
|
|
3
|
+
}
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Dipesh Rai
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Dipesh Rai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
# React UI Animate
|
|
2
|
-
|
|
3
|
-
[](https://badge.fury.io/js/react-ui-animate)
|
|
4
|
-
|
|
5
|
-
> React library for gestures and animation
|
|
6
|
-
|
|
7
|
-
### Install
|
|
8
|
-
|
|
9
|
-
Install with npm:
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npm i react-ui-animate
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
or
|
|
16
|
-
Install with yarn:
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
yarn add react-ui-animate
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
### Getting Started
|
|
23
|
-
|
|
24
|
-
`react-ui-animate` provides lots of easy to use APIs to create smooth animations and gestures.
|
|
25
|
-
|
|
26
|
-
```javascript
|
|
27
|
-
import { AnimatedBlock, useAnimatedValue } from "react-ui-animate";
|
|
28
|
-
|
|
29
|
-
export default function () {
|
|
30
|
-
const opacity = useAnimatedValue(0); // It initializes opacity object with value 0.
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<div>
|
|
34
|
-
{/* AnimatedBlock component can read useAnimatedValue() */}
|
|
35
|
-
<AnimatedBlock
|
|
36
|
-
style={{
|
|
37
|
-
opacity: opacity.value, // using opacity with value property
|
|
38
|
-
width: 100,
|
|
39
|
-
padding: 20,
|
|
40
|
-
background: "#39F",
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
ANIMATED
|
|
44
|
-
</AnimatedBlock>
|
|
45
|
-
|
|
46
|
-
{/* Assigning value to 1 auto animates from initialized value 0 to 1 smoothly */}
|
|
47
|
-
<button onClick={() => (opacity.value = 1)}>Animate Me</button>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
Animates opacity from 0 to 1.
|
|
54
|
-
|
|
55
|
-
#### `useAnimatedValue()`
|
|
56
|
-
|
|
57
|
-
`useAnimatedValue()` is very flexible and powerful hook that lets you define animated values. It accepts a value and returns a node with same value on `value` property. Whenever `value` property is assigned to another value, it auto animates from one value to another.
|
|
58
|
-
|
|
59
|
-
```javascript
|
|
60
|
-
const opacity = useAnimatedValue(0); // initialize with 0 opacity
|
|
61
|
-
|
|
62
|
-
...
|
|
63
|
-
style={{
|
|
64
|
-
opacity: opacity.value // access with `.value`
|
|
65
|
-
}}
|
|
66
|
-
...
|
|
67
|
-
|
|
68
|
-
...
|
|
69
|
-
onClick={() => opacity.value = 1} // Assignment
|
|
70
|
-
...
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
#### `AnimatedBlock`
|
|
74
|
-
|
|
75
|
-
`AnimatedBlock` is a `div` component which can accept the animation node from `useAnimatedValue()` hook.
|
|
76
|
-
|
|
77
|
-
```javascript
|
|
78
|
-
const width = useAnimatedValue(100);
|
|
79
|
-
|
|
80
|
-
<AnimatedBlock
|
|
81
|
-
style={{
|
|
82
|
-
width: width.value,
|
|
83
|
-
height: 100,
|
|
84
|
-
backgroundColor: "#39f",
|
|
85
|
-
}}
|
|
86
|
-
/>;
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
#### `interpolate`
|
|
90
|
-
|
|
91
|
-
The `interpolate()` function allows animated node value to map from input ranges to different output ranges. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value.
|
|
92
|
-
|
|
93
|
-
```javascript
|
|
94
|
-
import { useAnimatedValue, AnimatedBlock, interpolate } from "react-ui-animate";
|
|
95
|
-
|
|
96
|
-
const width = useAnimatedValue(100);
|
|
97
|
-
|
|
98
|
-
<AnimatedBlock
|
|
99
|
-
style={{
|
|
100
|
-
width: width.value,
|
|
101
|
-
height: 100,
|
|
102
|
-
backgroundColor: interpolate(width.value, [100, 200], ["red", "blue"]),
|
|
103
|
-
}}
|
|
104
|
-
/>;
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
`backgroundColor` is interpolated from input range `[100, 200]` to output range `["red", "blue"]`. So, when the width changes from 100 to 200, `backgroundColor` will change from `red` to `blue`.
|
|
108
|
-
|
|
109
|
-
## Documentation
|
|
110
|
-
|
|
111
|
-
The official documentation are now published at http://react-ui-animate.js.org/
|
|
112
|
-
|
|
113
|
-
## License
|
|
114
|
-
|
|
115
|
-
MIT
|
|
1
|
+
# React UI Animate
|
|
2
|
+
|
|
3
|
+
[](https://badge.fury.io/js/react-ui-animate)
|
|
4
|
+
|
|
5
|
+
> React library for gestures and animation
|
|
6
|
+
|
|
7
|
+
### Install
|
|
8
|
+
|
|
9
|
+
Install with npm:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm i react-ui-animate
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
or
|
|
16
|
+
Install with yarn:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
yarn add react-ui-animate
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Getting Started
|
|
23
|
+
|
|
24
|
+
`react-ui-animate` provides lots of easy to use APIs to create smooth animations and gestures.
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
import { AnimatedBlock, useAnimatedValue } from "react-ui-animate";
|
|
28
|
+
|
|
29
|
+
export default function () {
|
|
30
|
+
const opacity = useAnimatedValue(0); // It initializes opacity object with value 0.
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<div>
|
|
34
|
+
{/* AnimatedBlock component can read useAnimatedValue() */}
|
|
35
|
+
<AnimatedBlock
|
|
36
|
+
style={{
|
|
37
|
+
opacity: opacity.value, // using opacity with value property
|
|
38
|
+
width: 100,
|
|
39
|
+
padding: 20,
|
|
40
|
+
background: "#39F",
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
ANIMATED
|
|
44
|
+
</AnimatedBlock>
|
|
45
|
+
|
|
46
|
+
{/* Assigning value to 1 auto animates from initialized value 0 to 1 smoothly */}
|
|
47
|
+
<button onClick={() => (opacity.value = 1)}>Animate Me</button>
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Animates opacity from 0 to 1.
|
|
54
|
+
|
|
55
|
+
#### `useAnimatedValue()`
|
|
56
|
+
|
|
57
|
+
`useAnimatedValue()` is very flexible and powerful hook that lets you define animated values. It accepts a value and returns a node with same value on `value` property. Whenever `value` property is assigned to another value, it auto animates from one value to another.
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
const opacity = useAnimatedValue(0); // initialize with 0 opacity
|
|
61
|
+
|
|
62
|
+
...
|
|
63
|
+
style={{
|
|
64
|
+
opacity: opacity.value // access with `.value`
|
|
65
|
+
}}
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
...
|
|
69
|
+
onClick={() => opacity.value = 1} // Assignment
|
|
70
|
+
...
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
#### `AnimatedBlock`
|
|
74
|
+
|
|
75
|
+
`AnimatedBlock` is a `div` component which can accept the animation node from `useAnimatedValue()` hook.
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
const width = useAnimatedValue(100);
|
|
79
|
+
|
|
80
|
+
<AnimatedBlock
|
|
81
|
+
style={{
|
|
82
|
+
width: width.value,
|
|
83
|
+
height: 100,
|
|
84
|
+
backgroundColor: "#39f",
|
|
85
|
+
}}
|
|
86
|
+
/>;
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
#### `interpolate`
|
|
90
|
+
|
|
91
|
+
The `interpolate()` function allows animated node value to map from input ranges to different output ranges. By default, it will extrapolate the curve beyond the ranges given, but you can also have it clamp the output value.
|
|
92
|
+
|
|
93
|
+
```javascript
|
|
94
|
+
import { useAnimatedValue, AnimatedBlock, interpolate } from "react-ui-animate";
|
|
95
|
+
|
|
96
|
+
const width = useAnimatedValue(100);
|
|
97
|
+
|
|
98
|
+
<AnimatedBlock
|
|
99
|
+
style={{
|
|
100
|
+
width: width.value,
|
|
101
|
+
height: 100,
|
|
102
|
+
backgroundColor: interpolate(width.value, [100, 200], ["red", "blue"]),
|
|
103
|
+
}}
|
|
104
|
+
/>;
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
`backgroundColor` is interpolated from input range `[100, 200]` to output range `["red", "blue"]`. So, when the width changes from 100 to 200, `backgroundColor` will change from `red` to `blue`.
|
|
108
|
+
|
|
109
|
+
## Documentation
|
|
110
|
+
|
|
111
|
+
The official documentation are now published at http://react-ui-animate.js.org/
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
MIT
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimatedBlock - A higher order component built upon `div` element
|
|
3
|
+
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
4
|
+
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AnimatedBlock: import("react").ForwardRefExoticComponent<Pick<import("@raidipesh78/re-motion").AnimatedHTMLAttributes<"div"> & import("@raidipesh78/re-motion").AnimatedSVGAttributes<"div">, "string" | "slot" | "title" | "clipPath" | "filter" | "mask" | "path" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
7
|
+
style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
|
|
8
|
+
} & import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimatedImage - A higher order component built upon `img` element
|
|
3
|
+
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
4
|
+
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AnimatedImage: import("react").ForwardRefExoticComponent<Pick<import("@raidipesh78/re-motion").AnimatedHTMLAttributes<"img"> & import("@raidipesh78/re-motion").AnimatedSVGAttributes<"img">, "string" | "slot" | "title" | "clipPath" | "filter" | "mask" | "path" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
7
|
+
style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
|
|
8
|
+
} & import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AnimatedInline - A higher order component built upon `span` element
|
|
3
|
+
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
4
|
+
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AnimatedInline: import("react").ForwardRefExoticComponent<Pick<import("@raidipesh78/re-motion").AnimatedHTMLAttributes<"span"> & import("@raidipesh78/re-motion").AnimatedSVGAttributes<"span">, "string" | "slot" | "title" | "clipPath" | "filter" | "mask" | "path" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "height" | "max" | "media" | "method" | "min" | "name" | "target" | "type" | "width" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "alignmentBaseline" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "azimuth" | "baseFrequency" | "baselineShift" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clip" | "clipPathUnits" | "clipRule" | "colorInterpolation" | "colorInterpolationFilters" | "colorProfile" | "colorRendering" | "contentScriptType" | "contentStyleType" | "cursor" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "direction" | "display" | "divisor" | "dominantBaseline" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "end" | "exponent" | "externalResourcesRequired" | "fill" | "fillOpacity" | "fillRule" | "filterRes" | "filterUnits" | "floodColor" | "floodOpacity" | "focusable" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "format" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "href" | "ideographic" | "imageRendering" | "in2" | "in" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "letterSpacing" | "lightingColor" | "limitingConeAngle" | "local" | "markerEnd" | "markerHeight" | "markerMid" | "markerStart" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "mode" | "numOctaves" | "offset" | "opacity" | "operator" | "order" | "orient" | "orientation" | "origin" | "overflow" | "overlinePosition" | "overlineThickness" | "paintOrder" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "pointerEvents" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rotate" | "rx" | "ry" | "scale" | "seed" | "shapeRendering" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "stopColor" | "stopOpacity" | "strikethroughPosition" | "strikethroughThickness" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textAnchor" | "textDecoration" | "textLength" | "textRendering" | "to" | "transform" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeBidi" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "values" | "vectorEffect" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "visibility" | "vMathematical" | "widths" | "wordSpacing" | "writingMode" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
|
|
7
|
+
style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
|
|
8
|
+
} & import("react").RefAttributes<unknown>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TransitionValue } from '@raidipesh78/re-motion';
|
|
3
|
+
import { UseMountedValueConfig } from '../useMountedValue';
|
|
4
|
+
interface MountedBlockProps {
|
|
5
|
+
state: boolean;
|
|
6
|
+
children: (animation: {
|
|
7
|
+
value: TransitionValue;
|
|
8
|
+
}) => React.ReactNode;
|
|
9
|
+
config: UseMountedValueConfig;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* MountedBlock - Higher order component which handles mounting and unmounting of a component.
|
|
13
|
+
* @prop { boolean } state - Boolean indicating the component should mount or unmount.
|
|
14
|
+
* @prop { function } children - Child as a function with `AnimatedValue` on `.value` property.
|
|
15
|
+
* @prop { UseMountedValueConfig } config - Animation configuration.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MountedBlock: ({ state, children, config, }: MountedBlockProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TransitionValue } from '@raidipesh78/re-motion';
|
|
3
|
+
import { UseAnimatedValueConfig } from '../useAnimatedValue';
|
|
4
|
+
interface ScrollableBlockProps {
|
|
5
|
+
children?: (animation: {
|
|
6
|
+
value: TransitionValue;
|
|
7
|
+
}) => React.ReactNode;
|
|
8
|
+
direction?: 'single' | 'both';
|
|
9
|
+
threshold?: number;
|
|
10
|
+
animationConfig?: UseAnimatedValueConfig;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* ScrollableBlock - Higher order component to handle the entrance or exit animation
|
|
14
|
+
* of a component when it enters or exit the viewport. Accepts child as a function with
|
|
15
|
+
* `AnimatedValue` as its first argument which can be interpolated on input range [0, 1]
|
|
16
|
+
* @prop { function } children - child as a function with `AnimatedValue` as its first argument.
|
|
17
|
+
* @prop { 'single' | 'both' } direction - single applies animation on enter once, both applies on enter and exit.
|
|
18
|
+
* @prop { number } threshold - should be in range 0 to 1 which equivalent to `IntersectionObserver` threshold.
|
|
19
|
+
* @prop { UseAnimatedValueConfig } animationConfig - Animation config
|
|
20
|
+
*/
|
|
21
|
+
export declare const ScrollableBlock: (props: ScrollableBlockProps) => JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TransitionValue } from '@raidipesh78/re-motion';
|
|
3
|
+
import { UseAnimatedValueConfig } from '../useAnimatedValue';
|
|
4
|
+
interface TransitionBlockProps {
|
|
5
|
+
state: boolean;
|
|
6
|
+
children: (animation: {
|
|
7
|
+
value: TransitionValue;
|
|
8
|
+
}) => React.ReactNode;
|
|
9
|
+
config?: UseAnimatedValueConfig;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* TransitionBlock - Higher order component which animates on state change.
|
|
13
|
+
* @prop { boolean } state - Boolean indicating the current state of animation, usually `false = 0 and true = 1`.
|
|
14
|
+
* @prop { function } children - Child as a function with `AnimatedValue` on `.value` property.
|
|
15
|
+
* @prop { UseAnimatedValueConfig } config - Animation configuration.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TransitionBlock: ({ state, children, config, }: TransitionBlockProps) => JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { UseTransitionConfig } from '@raidipesh78/re-motion';
|
|
2
|
-
declare type
|
|
2
|
+
declare type Length = number | string;
|
|
3
|
+
declare type AnimatedValueType = Length;
|
|
3
4
|
export interface UseAnimatedValueConfig extends UseTransitionConfig {
|
|
4
5
|
}
|
|
5
|
-
declare type Length = number | string;
|
|
6
6
|
declare type AssignValue = {
|
|
7
7
|
toValue: Length;
|
|
8
8
|
config?: UseAnimatedValueConfig;
|
|
9
9
|
};
|
|
10
10
|
export declare type ValueType = Length | AssignValue | ((update: (next: AssignValue) => Promise<any>) => void);
|
|
11
11
|
/**
|
|
12
|
-
* useAnimatedValue
|
|
12
|
+
* `useAnimatedValue` returns an animation value with `.value` and `.currentValue` property which is
|
|
13
|
+
* initialized when passed to argument (`initialValue`). The retured value persist until the lifetime of
|
|
14
|
+
* a component. It doesnot cast any re-renders which can is very good for performance optimization.
|
|
15
|
+
* @param { string | number } initialValue - Initial value
|
|
16
|
+
* @param { UseAnimatedValueConfig } config - Animation configuration object.
|
|
13
17
|
*/
|
|
14
18
|
export declare function useAnimatedValue(initialValue: AnimatedValueType, config?: UseAnimatedValueConfig): {
|
|
15
19
|
value: any;
|
|
@@ -3,10 +3,11 @@ import { TransitionValue, UseMountConfig } from '@raidipesh78/re-motion';
|
|
|
3
3
|
export interface UseMountedValueConfig extends UseMountConfig {
|
|
4
4
|
}
|
|
5
5
|
/**
|
|
6
|
-
* useMountedValue handles mounting and unmounting of a component
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* @
|
|
6
|
+
* `useMountedValue` handles mounting and unmounting of a component which captures current state
|
|
7
|
+
* passed as an arugment (`state`) and exposes the shadow state which handles the mount and unmount
|
|
8
|
+
* of a component.
|
|
9
|
+
* @param { boolean } state - Boolean indicating the component should mount or unmount.
|
|
10
|
+
* @param { UseMountedValueConfig } config - Animation configuration.
|
|
10
11
|
*/
|
|
11
12
|
export declare function useMountedValue(state: boolean, config: UseMountedValueConfig): (callback: ({ value: animation }: {
|
|
12
13
|
value: TransitionValue;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from './DragGesture';
|
|
2
|
+
export * from './MouseMoveGesture';
|
|
3
|
+
export * from './ScrollGesture';
|
|
4
|
+
export * from './WheelGesture';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type MouseEventType =
|
|
1
|
+
declare type MouseEventType = 'click' | 'dblclick' | 'mousedown' | 'mousemove' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'mouseenter' | 'mouseleave' | 'mouseout' | 'mouseover' | 'scroll' | 'wheel' | 'contextmenu';
|
|
2
2
|
declare type DomTargetTypes = Array<Window | Document | HTMLElement>;
|
|
3
3
|
/**
|
|
4
4
|
* Attach multiple document / window event / HTMLElement
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from './useDrag';
|
|
2
|
+
export * from './useMouseMove';
|
|
3
|
+
export * from './useScroll';
|
|
4
|
+
export * from './useWheel';
|
|
5
|
+
export * from './useGesture';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DragEventType, WheelEventType, ScrollEventType, MouseMoveEventType } from
|
|
1
|
+
import { DragEventType, WheelEventType, ScrollEventType, MouseMoveEventType } from '../types';
|
|
2
2
|
export declare function useGesture({ onDrag, onWheel, onScroll, onMouseMove, }: {
|
|
3
3
|
onDrag?: (event: DragEventType) => void;
|
|
4
4
|
onWheel?: (event: WheelEventType) => void;
|
package/dist/gestures/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './hooks';
|
|
2
|
+
export * from './math';
|