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.
Files changed (73) 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/modules/AnimatedBlock.d.ts +8 -0
  6. package/dist/animation/modules/AnimatedImage.d.ts +8 -0
  7. package/dist/animation/modules/AnimatedInline.d.ts +8 -0
  8. package/dist/animation/modules/MountedBlock.d.ts +18 -0
  9. package/dist/animation/modules/ScrollableBlock.d.ts +22 -0
  10. package/dist/animation/modules/TransitionBlock.d.ts +18 -0
  11. package/dist/animation/modules/index.d.ts +6 -0
  12. package/dist/animation/useAnimatedValue.d.ts +7 -3
  13. package/dist/animation/useMountedValue.d.ts +5 -4
  14. package/dist/gestures/controllers/MouseMoveGesture.d.ts +2 -2
  15. package/dist/gestures/controllers/ScrollGesture.d.ts +2 -2
  16. package/dist/gestures/controllers/WheelGesture.d.ts +2 -2
  17. package/dist/gestures/controllers/index.d.ts +4 -4
  18. package/dist/gestures/eventAttacher.d.ts +1 -1
  19. package/dist/gestures/hooks/index.d.ts +5 -5
  20. package/dist/gestures/hooks/useDrag.d.ts +1 -1
  21. package/dist/gestures/hooks/useGesture.d.ts +1 -1
  22. package/dist/gestures/hooks/useMouseMove.d.ts +1 -1
  23. package/dist/gestures/hooks/useRecognizer.d.ts +1 -1
  24. package/dist/gestures/hooks/useScroll.d.ts +1 -1
  25. package/dist/gestures/hooks/useWheel.d.ts +1 -1
  26. package/dist/gestures/index.d.ts +2 -2
  27. package/dist/index.d.ts +1 -1
  28. package/dist/index.js +181 -150
  29. package/dist/index.js.map +1 -1
  30. package/package.json +49 -49
  31. package/rollup.config.js +18 -18
  32. package/src/animation/animationType.ts +17 -17
  33. package/src/animation/getInitialConfig.ts +61 -61
  34. package/src/animation/index.ts +10 -9
  35. package/src/animation/interpolation.ts +24 -24
  36. package/src/animation/modules/AnimatedBlock.ts +8 -0
  37. package/src/animation/modules/AnimatedImage.ts +8 -0
  38. package/src/animation/modules/AnimatedInline.ts +8 -0
  39. package/src/animation/modules/MountedBlock.tsx +25 -0
  40. package/src/animation/modules/ScrollableBlock.tsx +62 -0
  41. package/src/animation/modules/TransitionBlock.tsx +26 -0
  42. package/src/animation/modules/index.ts +6 -0
  43. package/src/animation/useAnimatedValue.ts +71 -62
  44. package/src/animation/useMountedValue.ts +67 -66
  45. package/src/gestures/controllers/DragGesture.ts +177 -177
  46. package/src/gestures/controllers/Gesture.ts +54 -54
  47. package/src/gestures/controllers/MouseMoveGesture.ts +111 -111
  48. package/src/gestures/controllers/ScrollGesture.ts +107 -107
  49. package/src/gestures/controllers/WheelGesture.ts +123 -123
  50. package/src/gestures/controllers/index.ts +4 -4
  51. package/src/gestures/eventAttacher.ts +67 -67
  52. package/src/gestures/hooks/index.ts +5 -5
  53. package/src/gestures/hooks/useDrag.ts +14 -14
  54. package/src/gestures/hooks/useGesture.ts +38 -38
  55. package/src/gestures/hooks/useMouseMove.ts +11 -11
  56. package/src/gestures/hooks/useRecognizer.ts +59 -59
  57. package/src/gestures/hooks/useScroll.ts +11 -11
  58. package/src/gestures/hooks/useWheel.ts +11 -11
  59. package/src/gestures/index.ts +2 -2
  60. package/src/gestures/math.ts +120 -120
  61. package/src/gestures/types.ts +49 -49
  62. package/src/gestures/withDefault.ts +3 -3
  63. package/src/hooks/index.ts +3 -3
  64. package/src/hooks/useMeasure.ts +133 -133
  65. package/src/hooks/useOutsideClick.ts +36 -36
  66. package/src/hooks/useWindowDimension.ts +59 -59
  67. package/src/index.ts +5 -5
  68. package/src/utils/delay.ts +9 -9
  69. package/src/utils/index.ts +2 -2
  70. package/src/utils/isDefined.ts +4 -4
  71. package/tsconfig.json +25 -25
  72. package/dist/animation/modules.d.ts +0 -55
  73. package/src/animation/modules.tsx +0 -105
@@ -1,36 +1,36 @@
1
- import * as React from "react";
2
-
3
- import { attachEvents } from "../gestures/eventAttacher";
4
-
5
- export function useOutsideClick(
6
- elementRef: React.RefObject<HTMLElement>,
7
- callback: (event: MouseEvent) => void,
8
- deps?: React.DependencyList
9
- ) {
10
- const callbackRef = React.useRef<(event: MouseEvent) => void>();
11
-
12
- if (!callbackRef.current) {
13
- callbackRef.current = callback;
14
- }
15
-
16
- // Reinitiate callback when dependency change
17
- React.useEffect(() => {
18
- callbackRef.current = callback;
19
-
20
- return () => {
21
- callbackRef.current = () => false;
22
- };
23
- }, deps);
24
-
25
- React.useEffect(() => {
26
- const handleOutsideClick = (e: MouseEvent) => {
27
- if (!elementRef?.current?.contains(e.target as Element)) {
28
- callbackRef.current && callbackRef.current(e);
29
- }
30
- };
31
-
32
- const subscribe = attachEvents([document], [["click", handleOutsideClick]]);
33
-
34
- return () => subscribe && subscribe();
35
- }, []);
36
- }
1
+ import * as React from "react";
2
+
3
+ import { attachEvents } from "../gestures/eventAttacher";
4
+
5
+ export function useOutsideClick(
6
+ elementRef: React.RefObject<HTMLElement>,
7
+ callback: (event: MouseEvent) => void,
8
+ deps?: React.DependencyList
9
+ ) {
10
+ const callbackRef = React.useRef<(event: MouseEvent) => void>();
11
+
12
+ if (!callbackRef.current) {
13
+ callbackRef.current = callback;
14
+ }
15
+
16
+ // Reinitiate callback when dependency change
17
+ React.useEffect(() => {
18
+ callbackRef.current = callback;
19
+
20
+ return () => {
21
+ callbackRef.current = () => false;
22
+ };
23
+ }, deps);
24
+
25
+ React.useEffect(() => {
26
+ const handleOutsideClick = (e: MouseEvent) => {
27
+ if (!elementRef?.current?.contains(e.target as Element)) {
28
+ callbackRef.current && callbackRef.current(e);
29
+ }
30
+ };
31
+
32
+ const subscribe = attachEvents([document], [["click", handleOutsideClick]]);
33
+
34
+ return () => subscribe && subscribe();
35
+ }, []);
36
+ }
@@ -1,59 +1,59 @@
1
- import * as React from "react";
2
-
3
- type WindowDimensionType = {
4
- width: number;
5
- height: number;
6
- innerWidth: number;
7
- innerHeight: number;
8
- };
9
-
10
- export function useWindowDimension(
11
- callback: (event: WindowDimensionType) => void,
12
- deps?: React.DependencyList
13
- ) {
14
- const windowDimensionsRef = React.useRef<WindowDimensionType>({
15
- width: 0,
16
- height: 0,
17
- innerWidth: 0,
18
- innerHeight: 0,
19
- });
20
- const callbackRef =
21
- React.useRef<(event: WindowDimensionType) => void>(callback);
22
-
23
- const handleCallback: () => void = () => {
24
- if (callbackRef) {
25
- callbackRef.current({
26
- ...windowDimensionsRef.current,
27
- });
28
- }
29
- };
30
-
31
- // Reinitiate callback when dependency change
32
- React.useEffect(() => {
33
- callbackRef.current = callback;
34
-
35
- return () => {
36
- callbackRef.current = () => false;
37
- };
38
- }, deps);
39
-
40
- React.useEffect(() => {
41
- const resizeObserver = new ResizeObserver(([entry]) => {
42
- const { clientWidth, clientHeight } = entry.target;
43
- const { innerWidth, innerHeight } = window;
44
-
45
- windowDimensionsRef.current = {
46
- width: clientWidth,
47
- height: clientHeight,
48
- innerWidth,
49
- innerHeight,
50
- };
51
-
52
- handleCallback();
53
- });
54
-
55
- resizeObserver.observe(document.documentElement);
56
-
57
- return () => resizeObserver.unobserve(document.documentElement);
58
- }, []);
59
- }
1
+ import * as React from "react";
2
+
3
+ type WindowDimensionType = {
4
+ width: number;
5
+ height: number;
6
+ innerWidth: number;
7
+ innerHeight: number;
8
+ };
9
+
10
+ export function useWindowDimension(
11
+ callback: (event: WindowDimensionType) => void,
12
+ deps?: React.DependencyList
13
+ ) {
14
+ const windowDimensionsRef = React.useRef<WindowDimensionType>({
15
+ width: 0,
16
+ height: 0,
17
+ innerWidth: 0,
18
+ innerHeight: 0,
19
+ });
20
+ const callbackRef =
21
+ React.useRef<(event: WindowDimensionType) => void>(callback);
22
+
23
+ const handleCallback: () => void = () => {
24
+ if (callbackRef) {
25
+ callbackRef.current({
26
+ ...windowDimensionsRef.current,
27
+ });
28
+ }
29
+ };
30
+
31
+ // Reinitiate callback when dependency change
32
+ React.useEffect(() => {
33
+ callbackRef.current = callback;
34
+
35
+ return () => {
36
+ callbackRef.current = () => false;
37
+ };
38
+ }, deps);
39
+
40
+ React.useEffect(() => {
41
+ const resizeObserver = new ResizeObserver(([entry]) => {
42
+ const { clientWidth, clientHeight } = entry.target;
43
+ const { innerWidth, innerHeight } = window;
44
+
45
+ windowDimensionsRef.current = {
46
+ width: clientWidth,
47
+ height: clientHeight,
48
+ innerWidth,
49
+ innerHeight,
50
+ };
51
+
52
+ handleCallback();
53
+ });
54
+
55
+ resizeObserver.observe(document.documentElement);
56
+
57
+ return () => resizeObserver.unobserve(document.documentElement);
58
+ }, []);
59
+ }
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
- export { Easing } from '@raidipesh78/re-motion';
2
- export { delay } from './utils';
3
- export * from './animation';
4
- export * from './gestures';
5
- export * from './hooks';
1
+ export { Easing, makeAnimatedComponent } from '@raidipesh78/re-motion';
2
+ export { delay } from './utils';
3
+ export * from './animation';
4
+ export * from './gestures';
5
+ export * from './hooks';
@@ -1,9 +1,9 @@
1
- /**
2
- * @param { number } ms - number of milliseconds to delay code execution
3
- * @returns Promise
4
- */
5
- export function delay(ms: number) {
6
- return new Promise((resolve) => {
7
- setTimeout(() => resolve(null), ms);
8
- });
9
- }
1
+ /**
2
+ * @param { number } ms - number of milliseconds to delay code execution
3
+ * @returns Promise
4
+ */
5
+ export function delay(ms: number) {
6
+ return new Promise((resolve) => {
7
+ setTimeout(() => resolve(null), ms);
8
+ });
9
+ }
@@ -1,2 +1,2 @@
1
- export * from './isDefined';
2
- export * from './delay';
1
+ export * from './isDefined';
2
+ export * from './delay';
@@ -1,4 +1,4 @@
1
- // check undefined or null
2
- export const isDefined = <T>(value: T): boolean => {
3
- return value !== undefined && value !== null;
4
- };
1
+ // check undefined or null
2
+ export const isDefined = <T>(value: T): boolean => {
3
+ return value !== undefined && value !== null;
4
+ };
package/tsconfig.json CHANGED
@@ -1,25 +1,25 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "dist",
4
- "module": "esnext",
5
- "target": "es5",
6
- "lib": ["es6", "dom", "es2016", "es2017", "es2019"],
7
- "downlevelIteration": true,
8
- "sourceMap": true,
9
- "allowJs": false,
10
- "jsx": "react",
11
- "declaration": true,
12
- "moduleResolution": "node",
13
- "forceConsistentCasingInFileNames": true,
14
- "noImplicitReturns": true,
15
- "noImplicitThis": true,
16
- "noImplicitAny": true,
17
- "strictNullChecks": true,
18
- "suppressImplicitAnyIndexErrors": true,
19
- "noUnusedLocals": true,
20
- "noUnusedParameters": true,
21
- "types": ["resize-observer-browser", "node"]
22
- },
23
- "include": ["src"],
24
- "exclude": ["node_modules", "dist", "example", "rollup.config.js"]
25
- }
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "dist",
4
+ "module": "esnext",
5
+ "target": "es5",
6
+ "lib": ["es6", "dom", "es2016", "es2017", "es2019"],
7
+ "downlevelIteration": true,
8
+ "sourceMap": true,
9
+ "allowJs": false,
10
+ "jsx": "react",
11
+ "declaration": true,
12
+ "moduleResolution": "node",
13
+ "forceConsistentCasingInFileNames": true,
14
+ "noImplicitReturns": true,
15
+ "noImplicitThis": true,
16
+ "noImplicitAny": true,
17
+ "strictNullChecks": true,
18
+ "suppressImplicitAnyIndexErrors": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "types": ["resize-observer-browser", "node"]
22
+ },
23
+ "include": ["src"],
24
+ "exclude": ["node_modules", "dist", "example", "rollup.config.js"]
25
+ }
@@ -1,55 +0,0 @@
1
- import * as React from 'react';
2
- import { TransitionValue } from '@raidipesh78/re-motion';
3
- import { UseAnimatedValueConfig } from './useAnimatedValue';
4
- import { UseMountedValueConfig } from './useMountedValue';
5
- /**
6
- * Make any component animatable
7
- */
8
- export declare function makeAnimatedComponent(WrappedComponent: React.ElementType<any>): React.ForwardRefExoticComponent<Pick<import("@raidipesh78/re-motion").AnimatedHTMLAttributes<React.ElementType<any>> & import("@raidipesh78/re-motion").AnimatedSVGAttributes<React.ElementType<any>>, "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"> & {
9
- style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
10
- } & React.RefAttributes<unknown>>;
11
- /**
12
- * AnimatedBlock : Animated Div
13
- */
14
- export declare const AnimatedBlock: 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"> & {
15
- style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
16
- } & React.RefAttributes<unknown>>;
17
- /**
18
- * AnimatedInline : Animated Span
19
- */
20
- export declare const AnimatedInline: 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"> & {
21
- style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
22
- } & React.RefAttributes<unknown>>;
23
- /**
24
- * AnimatedImage : Animated Image
25
- */
26
- export declare const AnimatedImage: 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"> & {
27
- style?: import("@raidipesh78/re-motion").AnimatedCSSProperties | undefined;
28
- } & React.RefAttributes<unknown>>;
29
- interface ScrollableBlockProps {
30
- children?: (animation: any) => React.ReactNode;
31
- direction?: 'single' | 'both';
32
- threshold?: number;
33
- animationConfig?: UseAnimatedValueConfig;
34
- }
35
- /**
36
- * ScrollableBlock
37
- * Used to animate element when enter into viewport
38
- * Render props pattern with children accepts animation node
39
- * animated value goes from 0 to 1 when appear on viewport & vice versa.
40
- */
41
- export declare const ScrollableBlock: React.FC<ScrollableBlockProps>;
42
- interface MountedBlockProps {
43
- state: boolean;
44
- children: (animation: {
45
- value: TransitionValue;
46
- }) => React.ReactNode;
47
- config: UseMountedValueConfig;
48
- }
49
- /**
50
- * MountedBlock handles mounting and unmounting of a component
51
- * @props - state: boolean, config: InnerUseMountedValueConfig
52
- * @children - (animation: { value: TransitionValue }) => React.ReactNode
53
- */
54
- export declare const MountedBlock: ({ state, children, config, }: MountedBlockProps) => JSX.Element;
55
- export {};
@@ -1,105 +0,0 @@
1
- import * as React from 'react';
2
- import {
3
- makeAnimatedComponent as animated,
4
- TransitionValue,
5
- } from '@raidipesh78/re-motion';
6
- import { useAnimatedValue, UseAnimatedValueConfig } from './useAnimatedValue';
7
- import { useMountedValue, UseMountedValueConfig } from './useMountedValue';
8
-
9
- /**
10
- * Make any component animatable
11
- */
12
- export function makeAnimatedComponent(
13
- WrappedComponent: React.ElementType<any>
14
- ) {
15
- return animated(WrappedComponent);
16
- }
17
-
18
- /**
19
- * AnimatedBlock : Animated Div
20
- */
21
- export const AnimatedBlock = animated('div');
22
- /**
23
- * AnimatedInline : Animated Span
24
- */
25
- export const AnimatedInline = animated('span');
26
- /**
27
- * AnimatedImage : Animated Image
28
- */
29
- export const AnimatedImage = animated('img');
30
- interface ScrollableBlockProps {
31
- children?: (animation: any) => React.ReactNode;
32
- direction?: 'single' | 'both';
33
- threshold?: number;
34
- animationConfig?: UseAnimatedValueConfig;
35
- }
36
-
37
- /**
38
- * ScrollableBlock
39
- * Used to animate element when enter into viewport
40
- * Render props pattern with children accepts animation node
41
- * animated value goes from 0 to 1 when appear on viewport & vice versa.
42
- */
43
- export const ScrollableBlock: React.FC<ScrollableBlockProps> = (props) => {
44
- const {
45
- children,
46
- direction = 'single',
47
- animationConfig,
48
- threshold = 0.2,
49
- } = props;
50
- const scrollableBlockRef = React.useRef<HTMLDivElement>(null);
51
- const animation = useAnimatedValue(0, animationConfig); // 0: not intersecting | 1: intersecting
52
-
53
- React.useEffect(() => {
54
- const _scrollableBlock = scrollableBlockRef.current;
55
-
56
- const observer = new IntersectionObserver(
57
- function ([entry]) {
58
- const { isIntersecting } = entry;
59
-
60
- if (isIntersecting) {
61
- animation.value = 1;
62
- } else {
63
- if (direction === 'both') animation.value = 0;
64
- }
65
- },
66
- {
67
- root: null, // FOR VIEWPORT ONLY
68
- threshold,
69
- }
70
- );
71
-
72
- if (_scrollableBlock) {
73
- observer.observe(_scrollableBlock);
74
- }
75
-
76
- return () => {
77
- if (_scrollableBlock) {
78
- observer.unobserve(_scrollableBlock);
79
- }
80
- };
81
- }, []);
82
-
83
- return <div ref={scrollableBlockRef}>{children && children(animation)}</div>;
84
- };
85
-
86
- interface MountedBlockProps {
87
- state: boolean;
88
- children: (animation: { value: TransitionValue }) => React.ReactNode;
89
- config: UseMountedValueConfig;
90
- }
91
-
92
- /**
93
- * MountedBlock handles mounting and unmounting of a component
94
- * @props - state: boolean, config: InnerUseMountedValueConfig
95
- * @children - (animation: { value: TransitionValue }) => React.ReactNode
96
- */
97
- export const MountedBlock = ({
98
- state,
99
- children,
100
- config,
101
- }: MountedBlockProps) => {
102
- const open = useMountedValue(state, config);
103
-
104
- return <>{open((animation, mounted) => mounted && children(animation))}</>;
105
- };