motion-plus-vue
Version:
Motion Plus Vue
75 lines (74 loc) • 3.51 kB
TypeScript
import { AnimatePresence, LayoutGroup, MotionConfig, MotionProps, Point, SpringOptions, motion } from 'motion-v';
import { defaultTransition, skipTransition } from './config';
import { MagneticOptions } from './types';
type HTMMotionProps = MotionProps<'div'>;
export interface CursorProps extends HTMMotionProps {
follow?: boolean;
center?: Point;
offset?: Point;
spring?: false | SpringOptions;
matchTextSize?: boolean;
magnetic?: boolean | Partial<MagneticOptions>;
transition?: MotionProps['transition'];
variants?: MotionProps['variants'];
style?: MotionProps['style'];
show?: boolean;
}
declare const magnetic: import('vue').Ref<boolean | Partial<MagneticOptions>, boolean | Partial<MagneticOptions>>;
declare const shouldReduceMotion: import('vue').Ref<boolean, boolean>;
declare const state: import('vue').Ref<import('./hooks/use-cursor-state/types').CursorState, import('./hooks/use-cursor-state/types').CursorState>;
declare const isInView: import('vue').Ref<boolean, boolean>;
declare const pointer: import('vue').ComputedRef<import('./hooks/use-offset').MotionPoint>;
declare const size: import('vue').ComputedRef<{
width: number | string | import('motion-v/es').MotionValue<any>;
height: number | string | import('motion-v/es').MotionValue<any>;
}>;
declare const pointerHasMoved: import('vue').Ref<boolean, boolean>;
declare function positionTransform(origin: Point): (_: any, generated: string) => string;
declare function reset(): any;
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
declare var __VLS_22: {};
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
default?: (props: typeof __VLS_22) => any;
}>;
declare const __VLS_self: import('vue').DefineComponent<CursorProps, {
AnimatePresence: typeof AnimatePresence;
LayoutGroup: typeof LayoutGroup;
MotionConfig: typeof MotionConfig;
motion: typeof motion;
defaultTransition: typeof defaultTransition;
skipTransition: typeof skipTransition;
magnetic: typeof magnetic;
shouldReduceMotion: typeof shouldReduceMotion;
state: typeof state;
isInView: typeof isInView;
pointer: typeof pointer;
size: typeof size;
pointerHasMoved: typeof pointerHasMoved;
positionTransform: typeof positionTransform;
reset: typeof reset;
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CursorProps> & Readonly<{}>, {
offset: Point;
center: Point;
show: boolean;
spring: false | SpringOptions;
matchTextSize: boolean;
follow: boolean;
magnetic: boolean | Partial<MagneticOptions>;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
declare const __VLS_component: import('vue').DefineComponent<CursorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CursorProps> & Readonly<{}>, {
offset: Point;
center: Point;
show: boolean;
spring: false | SpringOptions;
matchTextSize: boolean;
follow: boolean;
magnetic: boolean | Partial<MagneticOptions>;
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
export default _default;
type __VLS_WithSlots<T, S> = T & {
new (): {
$slots: S;
};
};