react-ui-animate 2.0.0-rc.2 → 2.0.0-rc.5

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.
Files changed (74) hide show
  1. package/.vscode/settings.json +3 -3
  2. package/LICENSE +21 -21
  3. package/README.md +115 -115
  4. package/dist/animation/index.d.ts +1 -0
  5. package/dist/animation/interpolation.d.ts +11 -2
  6. package/dist/animation/modules/AnimatedBlock.d.ts +8 -0
  7. package/dist/animation/modules/AnimatedImage.d.ts +8 -0
  8. package/dist/animation/modules/AnimatedInline.d.ts +8 -0
  9. package/dist/animation/modules/MountedBlock.d.ts +18 -0
  10. package/dist/animation/modules/ScrollableBlock.d.ts +21 -0
  11. package/dist/animation/modules/TransitionBlock.d.ts +17 -0
  12. package/dist/animation/modules/index.d.ts +6 -0
  13. package/dist/animation/useAnimatedValue.d.ts +8 -4
  14. package/dist/animation/useMountedValue.d.ts +5 -4
  15. package/dist/gestures/controllers/MouseMoveGesture.d.ts +2 -2
  16. package/dist/gestures/controllers/ScrollGesture.d.ts +2 -2
  17. package/dist/gestures/controllers/WheelGesture.d.ts +2 -2
  18. package/dist/gestures/controllers/index.d.ts +4 -4
  19. package/dist/gestures/eventAttacher.d.ts +1 -1
  20. package/dist/gestures/hooks/index.d.ts +5 -5
  21. package/dist/gestures/hooks/useDrag.d.ts +1 -1
  22. package/dist/gestures/hooks/useGesture.d.ts +1 -1
  23. package/dist/gestures/hooks/useMouseMove.d.ts +1 -1
  24. package/dist/gestures/hooks/useRecognizer.d.ts +1 -1
  25. package/dist/gestures/hooks/useScroll.d.ts +1 -1
  26. package/dist/gestures/hooks/useWheel.d.ts +1 -1
  27. package/dist/gestures/index.d.ts +2 -2
  28. package/dist/index.d.ts +1 -1
  29. package/dist/index.js +189 -152
  30. package/dist/index.js.map +1 -1
  31. package/package.json +48 -49
  32. package/rollup.config.js +18 -18
  33. package/src/animation/animationType.ts +17 -17
  34. package/src/animation/getInitialConfig.ts +61 -61
  35. package/src/animation/index.ts +10 -9
  36. package/src/animation/interpolation.ts +48 -24
  37. package/src/animation/modules/AnimatedBlock.ts +8 -0
  38. package/src/animation/modules/AnimatedImage.ts +8 -0
  39. package/src/animation/modules/AnimatedInline.ts +8 -0
  40. package/src/animation/modules/MountedBlock.tsx +25 -0
  41. package/src/animation/modules/ScrollableBlock.tsx +69 -0
  42. package/src/animation/modules/TransitionBlock.tsx +29 -0
  43. package/src/animation/modules/index.ts +6 -0
  44. package/src/animation/useAnimatedValue.ts +71 -62
  45. package/src/animation/useMountedValue.ts +67 -66
  46. package/src/gestures/controllers/DragGesture.ts +177 -177
  47. package/src/gestures/controllers/Gesture.ts +54 -54
  48. package/src/gestures/controllers/MouseMoveGesture.ts +111 -111
  49. package/src/gestures/controllers/ScrollGesture.ts +107 -107
  50. package/src/gestures/controllers/WheelGesture.ts +123 -123
  51. package/src/gestures/controllers/index.ts +4 -4
  52. package/src/gestures/eventAttacher.ts +67 -67
  53. package/src/gestures/hooks/index.ts +5 -5
  54. package/src/gestures/hooks/useDrag.ts +14 -14
  55. package/src/gestures/hooks/useGesture.ts +38 -38
  56. package/src/gestures/hooks/useMouseMove.ts +11 -11
  57. package/src/gestures/hooks/useRecognizer.ts +59 -59
  58. package/src/gestures/hooks/useScroll.ts +11 -11
  59. package/src/gestures/hooks/useWheel.ts +11 -11
  60. package/src/gestures/index.ts +2 -2
  61. package/src/gestures/math.ts +120 -120
  62. package/src/gestures/types.ts +49 -49
  63. package/src/gestures/withDefault.ts +3 -3
  64. package/src/hooks/index.ts +3 -3
  65. package/src/hooks/useMeasure.ts +133 -133
  66. package/src/hooks/useOutsideClick.ts +36 -36
  67. package/src/hooks/useWindowDimension.ts +59 -59
  68. package/src/index.ts +5 -5
  69. package/src/utils/delay.ts +9 -9
  70. package/src/utils/index.ts +2 -2
  71. package/src/utils/isDefined.ts +4 -4
  72. package/tsconfig.json +25 -25
  73. package/dist/animation/modules.d.ts +0 -55
  74. package/src/animation/modules.tsx +0 -105
@@ -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
- [![npm version](https://badge.fury.io/js/react-ui-animate.svg)](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
+ [![npm version](https://badge.fury.io/js/react-ui-animate.svg)](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
@@ -3,3 +3,4 @@ export * from './modules';
3
3
  export { useAnimatedValue, ValueType, UseAnimatedValueConfig, } from './useAnimatedValue';
4
4
  export { useMountedValue } from './useMountedValue';
5
5
  export * from './animationType';
6
+ export * from './modules';
@@ -1,5 +1,14 @@
1
1
  import { ExtrapolateConfig, TransitionValue } from '@raidipesh78/re-motion';
2
- export { interpolate } from '@raidipesh78/re-motion';
2
+ import { ValueType } from './useAnimatedValue';
3
+ /**
4
+ * interpolate functions maps input range to given output range
5
+ * @param value - number | TransitionValue
6
+ * @param inputRange - Array<number>
7
+ * @param outputRange - Array<number | string>
8
+ * @param extrapolateConfig - "clamp" | "identity" | "extend"
9
+ * @returns - number | TransitionValue
10
+ */
11
+ export declare function interpolate(value: number | TransitionValue | ValueType, inputRange: Array<number>, outputRange: Array<number | string>, extrapolateConfig?: ExtrapolateConfig): any;
3
12
  /**
4
13
  * bInterpolate functions maps input range [0, 1] to given [minOutput, maxOutput]
5
14
  * sorthand function to interpolate input range [0, 1]
@@ -9,4 +18,4 @@ export { interpolate } from '@raidipesh78/re-motion';
9
18
  * @param extrapolateConfig - "clamp" | "identity" | "extend"
10
19
  * @returns - number | TransitionValue
11
20
  */
12
- export declare function bInterpolate(value: number | TransitionValue, minOutput: number | string, maxOutput: number | string, extrapolateConfig?: ExtrapolateConfig): any;
21
+ export declare function bInterpolate(value: number | TransitionValue | ValueType, minOutput: number | string, maxOutput: number | string, extrapolateConfig?: ExtrapolateConfig): any;
@@ -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" | "fr" | "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" | "fr" | "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" | "fr" | "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,21 @@
1
+ import * as React from 'react';
2
+ import { UseAnimatedValueConfig, ValueType } from '../useAnimatedValue';
3
+ interface ScrollableBlockProps {
4
+ children?: (animation: {
5
+ value: ValueType;
6
+ }) => React.ReactNode;
7
+ direction?: 'single' | 'both';
8
+ threshold?: number;
9
+ animationConfig?: UseAnimatedValueConfig;
10
+ }
11
+ /**
12
+ * ScrollableBlock - Higher order component to handle the entrance or exit animation
13
+ * of a component when it enters or exit the viewport. Accepts child as a function with
14
+ * `AnimatedValue` as its first argument which can be interpolated on input range [0, 1]
15
+ * @prop { function } children - child as a function with `AnimatedValue` as its first argument.
16
+ * @prop { 'single' | 'both' } direction - single applies animation on enter once, both applies on enter and exit.
17
+ * @prop { number } threshold - should be in range 0 to 1 which equivalent to `IntersectionObserver` threshold.
18
+ * @prop { UseAnimatedValueConfig } animationConfig - Animation config
19
+ */
20
+ export declare const ScrollableBlock: (props: ScrollableBlockProps) => JSX.Element;
21
+ export {};
@@ -0,0 +1,17 @@
1
+ import * as React from 'react';
2
+ import { UseAnimatedValueConfig, ValueType } from '../useAnimatedValue';
3
+ interface TransitionBlockProps {
4
+ state: boolean;
5
+ children: (animation: {
6
+ value: ValueType;
7
+ }) => React.ReactNode;
8
+ config?: UseAnimatedValueConfig;
9
+ }
10
+ /**
11
+ * TransitionBlock - Higher order component which animates on state change.
12
+ * @prop { boolean } state - Boolean indicating the current state of animation, usually `false = 0 and true = 1`.
13
+ * @prop { function } children - Child as a function with `AnimatedValue` on `.value` property.
14
+ * @prop { UseAnimatedValueConfig } config - Animation configuration.
15
+ */
16
+ export declare const TransitionBlock: ({ state, children, config, }: TransitionBlockProps) => JSX.Element;
17
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './AnimatedBlock';
2
+ export * from './AnimatedInline';
3
+ export * from './AnimatedImage';
4
+ export * from './MountedBlock';
5
+ export * from './ScrollableBlock';
6
+ export * from './TransitionBlock';
@@ -1,18 +1,22 @@
1
1
  import { UseTransitionConfig } from '@raidipesh78/re-motion';
2
- declare type AnimatedValueType = number | string;
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 for animated transitions
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
- value: any;
19
+ value: ValueType;
16
20
  currentValue: number | string;
17
21
  };
18
22
  export {};
@@ -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
- * @param state - boolean
8
- * @param config - useTransitionConfig
9
- * @returns mountedValueFunction with a callback with argument ( { value: animationNode }, mounted )
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,5 +1,5 @@
1
- import { Vector2 } from "../types";
2
- import { Gesture } from "./Gesture";
1
+ import { Vector2 } from '../types';
2
+ import { Gesture } from './Gesture';
3
3
  export declare class MouseMoveGesture extends Gesture {
4
4
  event?: MouseEvent;
5
5
  isActiveID?: any;
@@ -1,5 +1,5 @@
1
- import { Vector2 } from "../types";
2
- import { Gesture } from "./Gesture";
1
+ import { Vector2 } from '../types';
2
+ import { Gesture } from './Gesture';
3
3
  export declare class ScrollGesture extends Gesture {
4
4
  isActiveID?: any;
5
5
  movement: Vector2;
@@ -1,5 +1,5 @@
1
- import { Vector2 } from "../types";
2
- import { Gesture } from "./Gesture";
1
+ import { Vector2 } from '../types';
2
+ import { Gesture } from './Gesture';
3
3
  export declare class WheelGesture extends Gesture {
4
4
  isActiveID?: any;
5
5
  movement: Vector2;
@@ -1,4 +1,4 @@
1
- export * from "./DragGesture";
2
- export * from "./MouseMoveGesture";
3
- export * from "./ScrollGesture";
4
- export * from "./WheelGesture";
1
+ export * from './DragGesture';
2
+ export * from './MouseMoveGesture';
3
+ export * from './ScrollGesture';
4
+ export * from './WheelGesture';
@@ -1,4 +1,4 @@
1
- declare type MouseEventType = "click" | "dblclick" | "mousedown" | "mousemove" | "mouseup" | "touchstart" | "touchmove" | "touchend" | "mouseenter" | "mouseleave" | "mouseout" | "mouseover" | "scroll" | "wheel" | "contextmenu";
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 "./useDrag";
2
- export * from "./useMouseMove";
3
- export * from "./useScroll";
4
- export * from "./useWheel";
5
- export * from "./useGesture";
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, UseDragConfig } from "../types";
1
+ import { DragEventType, UseDragConfig } from '../types';
2
2
  export declare function useDrag(callback: (event: DragEventType) => void, config?: UseDragConfig): (index?: number | undefined) => {
3
3
  ref: any;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { DragEventType, WheelEventType, ScrollEventType, MouseMoveEventType } from "../types";
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;
@@ -1,4 +1,4 @@
1
- import { MouseMoveEventType } from "../types";
1
+ import { MouseMoveEventType } from '../types';
2
2
  export declare function useMouseMove(callback: (event: MouseMoveEventType) => void): (index?: number | undefined) => {
3
3
  ref: any;
4
4
  };
@@ -1,5 +1,5 @@
1
1
  declare type UseRecognizerHandlerType = Array<[
2
- key: "drag" | "wheel" | "move" | "scroll",
2
+ key: 'drag' | 'wheel' | 'move' | 'scroll',
3
3
  gesture: any,
4
4
  callback: any,
5
5
  config?: any