react-native-spotlight-tour
Version:
React Native library to implement a highly customizable app tour feature with an awesome spotlight effect
35 lines (34 loc) • 1.05 kB
TypeScript
import { Animated, type LayoutRectangle, type MeasureInWindowOnSuccessCallback } from "react-native";
import type { Motion } from "../lib/SpotlightTour.context";
interface RefNode {
measure: (callback: MeasureInWindowOnSuccessCallback) => void;
}
export interface ShapeProps {
motion: Motion;
padding: number;
setReference: (node?: RefNode) => void;
spot: LayoutRectangle;
useNativeDriver: boolean;
}
interface Point {
x: number;
y: number;
}
interface BaseTransitionOptions {
motion: Motion;
nextOrigin: Point;
opacity: Animated.Value;
origin: Animated.ValueXY;
useNativeDriver: boolean;
}
interface ValueTransitionOptions extends BaseTransitionOptions {
nextSize: number;
size: Animated.Value;
}
interface PointTransitionOptions extends BaseTransitionOptions {
nextSize: Point;
size: Animated.ValueXY;
}
type TransitionOptions = PointTransitionOptions | ValueTransitionOptions;
export declare function transitionOf(options: TransitionOptions): Animated.CompositeAnimation;
export {};