react-ui-animate 2.0.0 → 3.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +115 -115
- package/dist/animation/core/controllers/Animation.d.ts +16 -0
- package/dist/animation/core/controllers/FluidValue.d.ts +32 -0
- package/dist/animation/core/controllers/RequestAnimationFrame.d.ts +8 -0
- package/dist/animation/core/controllers/SpringAnimation.d.ts +41 -0
- package/dist/animation/core/controllers/TimingAnimation.d.ts +35 -0
- package/dist/animation/core/easing/Bezier.d.ts +8 -0
- package/dist/animation/core/easing/Easing.d.ts +40 -0
- package/dist/animation/core/helpers/camelCaseToKebabCase.d.ts +8 -0
- package/dist/animation/core/helpers/getCleanProps.d.ts +10 -0
- package/dist/animation/core/helpers/getCssValue.d.ts +8 -0
- package/dist/animation/core/helpers/index.d.ts +5 -0
- package/dist/animation/core/helpers/isDefined.d.ts +12 -0
- package/dist/animation/core/helpers/isFluidValue.d.ts +6 -0
- package/dist/animation/core/index.d.ts +11 -0
- package/dist/animation/core/interpolation/Colors.d.ts +25 -0
- package/dist/animation/core/interpolation/Interpolation.d.ts +80 -0
- package/dist/animation/core/interpolation/__tests__/Colors.test.d.ts +1 -0
- package/dist/animation/core/react/fluid.d.ts +6 -0
- package/dist/animation/core/react/makeFluid.d.ts +30 -0
- package/dist/animation/core/react/transforms.d.ts +6 -0
- package/dist/animation/core/react/useFluidValue.d.ts +9 -0
- package/dist/animation/core/react/useMount.d.ts +20 -0
- package/dist/animation/lib/animationType.d.ts +15 -0
- package/dist/animation/lib/getInitialConfig.d.ts +3 -0
- package/dist/animation/lib/index.d.ts +5 -0
- package/dist/animation/{interpolation.d.ts → lib/interpolation.d.ts} +20 -21
- package/dist/animation/lib/modules/AnimatedBlock.d.ts +8 -0
- package/dist/animation/lib/modules/AnimatedImage.d.ts +8 -0
- package/dist/animation/lib/modules/AnimatedInline.d.ts +8 -0
- package/dist/animation/lib/modules/MountedBlock.d.ts +29 -0
- package/dist/animation/{modules → lib/modules}/ScrollableBlock.d.ts +22 -21
- package/dist/animation/{modules → lib/modules}/TransitionBlock.d.ts +18 -17
- package/dist/animation/{modules → lib/modules}/index.d.ts +6 -6
- package/dist/animation/{useAnimatedValue.d.ts → lib/useAnimatedValue.d.ts} +17 -22
- package/dist/animation/{useMountedValue.d.ts → lib/useMountedValue.d.ts} +14 -15
- package/dist/gestures/controllers/DragGesture.d.ts +17 -17
- package/dist/gestures/controllers/Gesture.d.ts +20 -20
- package/dist/gestures/controllers/MouseMoveGesture.d.ts +13 -13
- package/dist/gestures/controllers/ScrollGesture.d.ts +14 -14
- package/dist/gestures/controllers/WheelGesture.d.ts +15 -15
- package/dist/gestures/controllers/index.d.ts +4 -4
- package/dist/gestures/helpers/eventAttacher.d.ts +11 -0
- package/dist/gestures/helpers/index.d.ts +1 -0
- package/dist/gestures/{math.d.ts → helpers/math.d.ts} +34 -34
- package/dist/gestures/{withDefault.d.ts → helpers/withDefault.d.ts} +4 -4
- package/dist/gestures/hooks/index.d.ts +5 -5
- package/dist/gestures/hooks/useDrag.d.ts +4 -4
- package/dist/gestures/hooks/useGesture.d.ts +9 -9
- package/dist/gestures/hooks/useMouseMove.d.ts +4 -4
- package/dist/gestures/hooks/useRecognizer.d.ts +10 -10
- package/dist/gestures/hooks/useScroll.d.ts +4 -4
- package/dist/gestures/hooks/useWheel.d.ts +4 -4
- package/dist/hooks/index.d.ts +3 -3
- package/dist/hooks/useMeasure.d.ts +14 -14
- package/dist/hooks/useOutsideClick.d.ts +2 -2
- package/dist/hooks/useWindowDimension.d.ts +9 -9
- package/dist/index.d.ts +9 -5
- package/dist/index.js +1 -1191
- package/dist/index.js.map +1 -1
- package/dist/utils/delay.d.ts +5 -5
- package/dist/utils/index.d.ts +1 -2
- package/package.json +49 -48
- package/.vscode/settings.json +0 -3
- package/dist/animation/animationType.d.ts +0 -15
- package/dist/animation/getInitialConfig.d.ts +0 -3
- package/dist/animation/index.d.ts +0 -6
- package/dist/animation/modules/AnimatedBlock.d.ts +0 -8
- package/dist/animation/modules/AnimatedImage.d.ts +0 -8
- package/dist/animation/modules/AnimatedInline.d.ts +0 -8
- package/dist/animation/modules/MountedBlock.d.ts +0 -18
- package/dist/gestures/eventAttacher.d.ts +0 -11
- package/dist/gestures/index.d.ts +0 -2
- package/dist/gestures/types.d.ts +0 -51
- package/dist/utils/isDefined.d.ts +0 -1
- package/rollup.config.js +0 -18
- package/src/animation/animationType.ts +0 -17
- package/src/animation/getInitialConfig.ts +0 -61
- package/src/animation/index.ts +0 -10
- package/src/animation/interpolation.ts +0 -48
- package/src/animation/modules/AnimatedBlock.ts +0 -8
- package/src/animation/modules/AnimatedImage.ts +0 -8
- package/src/animation/modules/AnimatedInline.ts +0 -8
- package/src/animation/modules/MountedBlock.tsx +0 -25
- package/src/animation/modules/ScrollableBlock.tsx +0 -69
- package/src/animation/modules/TransitionBlock.tsx +0 -29
- package/src/animation/modules/index.ts +0 -6
- package/src/animation/useAnimatedValue.ts +0 -71
- package/src/animation/useMountedValue.ts +0 -19
- package/src/gestures/controllers/DragGesture.ts +0 -177
- package/src/gestures/controllers/Gesture.ts +0 -54
- package/src/gestures/controllers/MouseMoveGesture.ts +0 -111
- package/src/gestures/controllers/ScrollGesture.ts +0 -107
- package/src/gestures/controllers/WheelGesture.ts +0 -123
- package/src/gestures/controllers/index.ts +0 -4
- package/src/gestures/eventAttacher.ts +0 -67
- package/src/gestures/hooks/index.ts +0 -5
- package/src/gestures/hooks/useDrag.ts +0 -14
- package/src/gestures/hooks/useGesture.ts +0 -38
- package/src/gestures/hooks/useMouseMove.ts +0 -11
- package/src/gestures/hooks/useRecognizer.ts +0 -59
- package/src/gestures/hooks/useScroll.ts +0 -11
- package/src/gestures/hooks/useWheel.ts +0 -11
- package/src/gestures/index.ts +0 -2
- package/src/gestures/math.ts +0 -120
- package/src/gestures/types.ts +0 -49
- package/src/gestures/withDefault.ts +0 -3
- package/src/hooks/index.ts +0 -3
- package/src/hooks/useMeasure.ts +0 -133
- package/src/hooks/useOutsideClick.ts +0 -36
- package/src/hooks/useWindowDimension.ts +0 -59
- package/src/index.ts +0 -5
- package/src/utils/delay.ts +0 -9
- package/src/utils/index.ts +0 -2
- package/src/utils/isDefined.ts +0 -4
- package/tsconfig.json +0 -25
package/dist/utils/delay.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @param { number } ms - number of milliseconds to delay code execution
|
|
3
|
-
* @returns Promise
|
|
4
|
-
*/
|
|
5
|
-
export declare function delay(ms: number): Promise<unknown>;
|
|
1
|
+
/**
|
|
2
|
+
* @param { number } ms - number of milliseconds to delay code execution
|
|
3
|
+
* @returns Promise
|
|
4
|
+
*/
|
|
5
|
+
export declare function delay(ms: number): Promise<unknown>;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './delay';
|
|
1
|
+
export * from './delay';
|
package/package.json
CHANGED
|
@@ -1,48 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-ui-animate",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "React library for gestures and animation",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
},
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"@types/
|
|
14
|
-
"@types/react": "^18.0
|
|
15
|
-
"@types/
|
|
16
|
-
"
|
|
17
|
-
"babel-
|
|
18
|
-
"
|
|
19
|
-
"react": "^18.1
|
|
20
|
-
"
|
|
21
|
-
"rollup": "^
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"version:
|
|
31
|
-
"version:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "react-ui-animate",
|
|
3
|
+
"version": "3.0.0-rc.1",
|
|
4
|
+
"description": "React library for gestures and animation",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"peerDependencies": {
|
|
7
|
+
"react": ">=16.8.0 || >=17.0.0 || >=18.0.0"
|
|
8
|
+
},
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
11
|
+
"@types/jest": "^29.5.12",
|
|
12
|
+
"@types/node": "^20.14.9",
|
|
13
|
+
"@types/react": "^18.3.3",
|
|
14
|
+
"@types/react-dom": "^18.3.0",
|
|
15
|
+
"@types/resize-observer-browser": "^0.1.11",
|
|
16
|
+
"babel-core": "^5.8.38",
|
|
17
|
+
"babel-runtime": "^6.26.0",
|
|
18
|
+
"react": "^18.3.1",
|
|
19
|
+
"react-dom": "^18.3.1",
|
|
20
|
+
"rollup": "^4.18.0",
|
|
21
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
22
|
+
"typescript": "^5.5.2"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"dev:start": "pm2 start ecosystem.config.js",
|
|
26
|
+
"dev:end": "pm2 stop ecosystem.config.js",
|
|
27
|
+
"build": "rollup -c",
|
|
28
|
+
"start": "rollup -c -w",
|
|
29
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
30
|
+
"version:minor": "npm version --no-git-tag-version minor",
|
|
31
|
+
"version:major": "npm version --no-git-tag-version major",
|
|
32
|
+
"version:patch": "npm version --no-git-tag-version patch"
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "git+https://github.com/dipeshrai123/react-ui-animate.git"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"gesture",
|
|
40
|
+
"animation",
|
|
41
|
+
"react-ui-animate"
|
|
42
|
+
],
|
|
43
|
+
"author": "Dipesh Rai",
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/dipeshrai123/react-ui-animate/issues"
|
|
47
|
+
},
|
|
48
|
+
"homepage": "https://github.com/dipeshrai123/react-ui-animate#readme"
|
|
49
|
+
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const AnimationConfigUtils: {
|
|
2
|
-
ELASTIC: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
3
|
-
BOUNCE: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
4
|
-
EASE: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
5
|
-
STIFF: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
6
|
-
WOOBLE: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
7
|
-
EASE_IN: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
8
|
-
EASE_OUT: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
9
|
-
EASE_IN_OUT: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
10
|
-
POWER1: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
11
|
-
POWER2: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
12
|
-
POWER3: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
13
|
-
POWER4: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
14
|
-
LINEAR: import("@raidipesh78/re-motion").TransitionValueConfig;
|
|
15
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TransitionValueConfig } from '@raidipesh78/re-motion';
|
|
2
|
-
export declare type InitialConfigType = 'linear' | 'easein' | 'easeout' | 'easeinout' | 'ease' | 'power1' | 'power2' | 'power3' | 'power4' | 'elastic' | 'stiff' | 'wooble' | 'bounce';
|
|
3
|
-
export declare const getInitialConfig: (animationType?: "linear" | "easein" | "easeout" | "easeinout" | "ease" | "power1" | "power2" | "power3" | "power4" | "elastic" | "stiff" | "wooble" | "bounce" | undefined) => TransitionValueConfig;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export * from './interpolation';
|
|
2
|
-
export * from './modules';
|
|
3
|
-
export { useAnimatedValue, ValueType, UseAnimatedValueConfig, } from './useAnimatedValue';
|
|
4
|
-
export { useMountedValue } from './useMountedValue';
|
|
5
|
-
export * from './animationType';
|
|
6
|
-
export * from './modules';
|
|
@@ -1,8 +0,0 @@
|
|
|
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>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
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>>;
|
|
@@ -1,8 +0,0 @@
|
|
|
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>>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FluidValue } from '@raidipesh78/re-motion';
|
|
3
|
-
import { UseMountedValueConfig } from '../useMountedValue';
|
|
4
|
-
interface MountedBlockProps {
|
|
5
|
-
state: boolean;
|
|
6
|
-
children: (animation: {
|
|
7
|
-
value: FluidValue;
|
|
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 {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare type MouseEventType = 'click' | 'dblclick' | 'mousedown' | 'mousemove' | 'mouseup' | 'touchstart' | 'touchmove' | 'touchend' | 'mouseenter' | 'mouseleave' | 'mouseout' | 'mouseover' | 'scroll' | 'wheel' | 'contextmenu';
|
|
2
|
-
declare type DomTargetTypes = Array<Window | Document | HTMLElement>;
|
|
3
|
-
/**
|
|
4
|
-
* Attach multiple document / window event / HTMLElement
|
|
5
|
-
*/
|
|
6
|
-
export declare function attachEvents(domTargets: DomTargetTypes, events: Array<[
|
|
7
|
-
event: MouseEventType,
|
|
8
|
-
callback: (e: any) => void,
|
|
9
|
-
capture?: any
|
|
10
|
-
]>): (eventKeys?: string[] | undefined) => void;
|
|
11
|
-
export {};
|
package/dist/gestures/index.d.ts
DELETED
package/dist/gestures/types.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
declare type GenericEventType = {
|
|
2
|
-
velocityX: number;
|
|
3
|
-
velocityY: number;
|
|
4
|
-
directionX: number;
|
|
5
|
-
directionY: number;
|
|
6
|
-
};
|
|
7
|
-
export declare type DragEventType = {
|
|
8
|
-
args: Array<number | undefined>;
|
|
9
|
-
down: boolean;
|
|
10
|
-
movementX: number;
|
|
11
|
-
movementY: number;
|
|
12
|
-
offsetX: number;
|
|
13
|
-
offsetY: number;
|
|
14
|
-
distanceX: number;
|
|
15
|
-
distanceY: number;
|
|
16
|
-
cancel: () => void;
|
|
17
|
-
} & GenericEventType;
|
|
18
|
-
export declare type MouseMoveEventType = {
|
|
19
|
-
args: Array<number | undefined>;
|
|
20
|
-
event: MouseEvent;
|
|
21
|
-
target: EventTarget | undefined | null;
|
|
22
|
-
isMoving: boolean;
|
|
23
|
-
mouseX: number;
|
|
24
|
-
mouseY: number;
|
|
25
|
-
} & GenericEventType;
|
|
26
|
-
export declare type ScrollEventType = {
|
|
27
|
-
isScrolling: boolean;
|
|
28
|
-
scrollX: number;
|
|
29
|
-
scrollY: number;
|
|
30
|
-
} & GenericEventType;
|
|
31
|
-
export declare type WheelEventType = {
|
|
32
|
-
target: HTMLElement | undefined | null;
|
|
33
|
-
isWheeling: boolean;
|
|
34
|
-
movementX: number;
|
|
35
|
-
movementY: number;
|
|
36
|
-
offsetX: number;
|
|
37
|
-
offsetY: number;
|
|
38
|
-
deltaX: number;
|
|
39
|
-
deltaY: number;
|
|
40
|
-
} & GenericEventType;
|
|
41
|
-
export declare type UseDragConfig = {
|
|
42
|
-
initial?: () => {
|
|
43
|
-
movementX: number;
|
|
44
|
-
movementY: number;
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
export declare type Vector2 = {
|
|
48
|
-
x: number;
|
|
49
|
-
y: number;
|
|
50
|
-
};
|
|
51
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isDefined: <T>(value: T) => boolean;
|
package/rollup.config.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import typescript from "rollup-plugin-typescript2";
|
|
2
|
-
|
|
3
|
-
import pkg from "./package.json";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
input: "src/index.ts",
|
|
7
|
-
output: [
|
|
8
|
-
{
|
|
9
|
-
file: pkg.main,
|
|
10
|
-
format: "cjs",
|
|
11
|
-
exports: "named",
|
|
12
|
-
sourcemap: true,
|
|
13
|
-
strict: false,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
plugins: [typescript({ objectHashIgnoreUnknownHack: true })],
|
|
17
|
-
external: ["react", "react-dom"],
|
|
18
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { getInitialConfig } from './getInitialConfig';
|
|
2
|
-
|
|
3
|
-
export const AnimationConfigUtils = {
|
|
4
|
-
ELASTIC: getInitialConfig('elastic'),
|
|
5
|
-
BOUNCE: getInitialConfig('bounce'),
|
|
6
|
-
EASE: getInitialConfig('ease'),
|
|
7
|
-
STIFF: getInitialConfig('stiff'),
|
|
8
|
-
WOOBLE: getInitialConfig('wooble'),
|
|
9
|
-
EASE_IN: getInitialConfig('easein'),
|
|
10
|
-
EASE_OUT: getInitialConfig('easeout'),
|
|
11
|
-
EASE_IN_OUT: getInitialConfig('easeinout'),
|
|
12
|
-
POWER1: getInitialConfig('power1'),
|
|
13
|
-
POWER2: getInitialConfig('power2'),
|
|
14
|
-
POWER3: getInitialConfig('power3'),
|
|
15
|
-
POWER4: getInitialConfig('power4'),
|
|
16
|
-
LINEAR: getInitialConfig('linear'),
|
|
17
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Easing, TransitionValueConfig } from '@raidipesh78/re-motion';
|
|
2
|
-
export type InitialConfigType =
|
|
3
|
-
| 'linear'
|
|
4
|
-
| 'easein'
|
|
5
|
-
| 'easeout'
|
|
6
|
-
| 'easeinout'
|
|
7
|
-
| 'ease'
|
|
8
|
-
| 'power1'
|
|
9
|
-
| 'power2'
|
|
10
|
-
| 'power3'
|
|
11
|
-
| 'power4'
|
|
12
|
-
| 'elastic'
|
|
13
|
-
| 'stiff'
|
|
14
|
-
| 'wooble'
|
|
15
|
-
| 'bounce';
|
|
16
|
-
|
|
17
|
-
export const getInitialConfig = (
|
|
18
|
-
animationType?: InitialConfigType
|
|
19
|
-
): TransitionValueConfig => {
|
|
20
|
-
switch (animationType) {
|
|
21
|
-
case 'elastic':
|
|
22
|
-
return { mass: 1, friction: 18, tension: 250 };
|
|
23
|
-
|
|
24
|
-
case 'stiff':
|
|
25
|
-
return { mass: 1, friction: 18, tension: 350 };
|
|
26
|
-
|
|
27
|
-
case 'wooble':
|
|
28
|
-
return { mass: 1, friction: 8, tension: 250 };
|
|
29
|
-
|
|
30
|
-
case 'bounce':
|
|
31
|
-
return { duration: 500, easing: Easing.bounce };
|
|
32
|
-
|
|
33
|
-
case 'power1':
|
|
34
|
-
return { duration: 500, easing: Easing.bezier(0.17, 0.42, 0.51, 0.97) };
|
|
35
|
-
|
|
36
|
-
case 'power2':
|
|
37
|
-
return { duration: 500, easing: Easing.bezier(0.07, 0.11, 0.13, 1) };
|
|
38
|
-
|
|
39
|
-
case 'power3':
|
|
40
|
-
return { duration: 500, easing: Easing.bezier(0.09, 0.7, 0.16, 1.04) };
|
|
41
|
-
|
|
42
|
-
case 'power4':
|
|
43
|
-
return { duration: 500, easing: Easing.bezier(0.05, 0.54, 0, 1.03) };
|
|
44
|
-
|
|
45
|
-
case 'linear':
|
|
46
|
-
return { duration: 500, easing: Easing.linear };
|
|
47
|
-
|
|
48
|
-
case 'easein':
|
|
49
|
-
return { duration: 500, easing: Easing.in(Easing.ease) };
|
|
50
|
-
|
|
51
|
-
case 'easeout':
|
|
52
|
-
return { duration: 500, easing: Easing.out(Easing.ease) };
|
|
53
|
-
|
|
54
|
-
case 'easeinout':
|
|
55
|
-
return { duration: 500, easing: Easing.inOut(Easing.ease) };
|
|
56
|
-
|
|
57
|
-
case 'ease':
|
|
58
|
-
default:
|
|
59
|
-
return { mass: 1, friction: 34, tension: 290 };
|
|
60
|
-
}
|
|
61
|
-
};
|
package/src/animation/index.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './interpolation';
|
|
2
|
-
export * from './modules';
|
|
3
|
-
export {
|
|
4
|
-
useAnimatedValue,
|
|
5
|
-
ValueType,
|
|
6
|
-
UseAnimatedValueConfig,
|
|
7
|
-
} from './useAnimatedValue';
|
|
8
|
-
export { useMountedValue } from './useMountedValue';
|
|
9
|
-
export * from './animationType';
|
|
10
|
-
export * from './modules';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { ExtrapolateConfig, FluidValue } from '@raidipesh78/re-motion';
|
|
2
|
-
import { ValueType } from './useAnimatedValue';
|
|
3
|
-
import { interpolate as internalInterpolate } from '@raidipesh78/re-motion';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* interpolate functions maps input range to given output range
|
|
7
|
-
* @param value - number | TransitionValue
|
|
8
|
-
* @param inputRange - Array<number>
|
|
9
|
-
* @param outputRange - Array<number | string>
|
|
10
|
-
* @param extrapolateConfig - "clamp" | "identity" | "extend"
|
|
11
|
-
* @returns - number | TransitionValue
|
|
12
|
-
*/
|
|
13
|
-
export function interpolate(
|
|
14
|
-
value: number | FluidValue | ValueType,
|
|
15
|
-
inputRange: Array<number>,
|
|
16
|
-
outputRange: Array<number | string>,
|
|
17
|
-
extrapolateConfig?: ExtrapolateConfig
|
|
18
|
-
) {
|
|
19
|
-
return internalInterpolate(
|
|
20
|
-
value as any,
|
|
21
|
-
inputRange,
|
|
22
|
-
outputRange,
|
|
23
|
-
extrapolateConfig
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* bInterpolate functions maps input range [0, 1] to given [minOutput, maxOutput]
|
|
29
|
-
* sorthand function to interpolate input range [0, 1]
|
|
30
|
-
* @param value - number | TransitionValue
|
|
31
|
-
* @param minOutput - number | string
|
|
32
|
-
* @param maxOutput - number | string
|
|
33
|
-
* @param extrapolateConfig - "clamp" | "identity" | "extend"
|
|
34
|
-
* @returns - number | TransitionValue
|
|
35
|
-
*/
|
|
36
|
-
export function bInterpolate(
|
|
37
|
-
value: number | FluidValue | ValueType,
|
|
38
|
-
minOutput: number | string,
|
|
39
|
-
maxOutput: number | string,
|
|
40
|
-
extrapolateConfig?: ExtrapolateConfig
|
|
41
|
-
) {
|
|
42
|
-
return internalInterpolate(
|
|
43
|
-
value as any,
|
|
44
|
-
[0, 1],
|
|
45
|
-
[minOutput, maxOutput],
|
|
46
|
-
extrapolateConfig
|
|
47
|
-
);
|
|
48
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { makeAnimatedComponent } from '@raidipesh78/re-motion';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AnimatedBlock - A higher order component built upon `div` element
|
|
5
|
-
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
6
|
-
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
7
|
-
*/
|
|
8
|
-
export const AnimatedBlock = makeAnimatedComponent('div');
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { makeAnimatedComponent } from '@raidipesh78/re-motion';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AnimatedImage - A higher order component built upon `img` element
|
|
5
|
-
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
6
|
-
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
7
|
-
*/
|
|
8
|
-
export const AnimatedImage = makeAnimatedComponent('img');
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { makeAnimatedComponent } from '@raidipesh78/re-motion';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* AnimatedInline - A higher order component built upon `span` element
|
|
5
|
-
* which can accept `AnimatedValue`. It also exposes some extra style properties like
|
|
6
|
-
* translateX, translateY, rotateX, rotateY, scaleX, etc.
|
|
7
|
-
*/
|
|
8
|
-
export const AnimatedInline = makeAnimatedComponent('span');
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FluidValue } from '@raidipesh78/re-motion';
|
|
3
|
-
import { useMountedValue, UseMountedValueConfig } from '../useMountedValue';
|
|
4
|
-
|
|
5
|
-
interface MountedBlockProps {
|
|
6
|
-
state: boolean;
|
|
7
|
-
children: (animation: { value: FluidValue }) => React.ReactNode;
|
|
8
|
-
config: UseMountedValueConfig;
|
|
9
|
-
}
|
|
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 const MountedBlock = ({
|
|
18
|
-
state,
|
|
19
|
-
children,
|
|
20
|
-
config,
|
|
21
|
-
}: MountedBlockProps) => {
|
|
22
|
-
const open = useMountedValue(state, config);
|
|
23
|
-
|
|
24
|
-
return <>{open((animation, mounted) => mounted && children(animation))}</>;
|
|
25
|
-
};
|