import React from 'react'; import type { TextStyle } from 'react-native'; /** * Props for the typewriter animation component. */ type TypeAnimationProps = { /** * An array of objects defining the text to be typed and animation options. */ sequence: Array<{ /** * A function to execute as part of the sequence. Can be used as a callback to perform actions. */ action?: () => void; /** * The text to display or type in the sequence. */ text?: string; /** * The delay between the current sequence (in milliseconds) and the next. Default: 100 */ delayBetweenSequence?: number; /** * The number of characters to delete before typing (backspacing). */ deleteCount?: number; /** * The speed at which characters are deleted from this sequence (backspace speed, in milliseconds). Default: 100 */ deletionSpeed?: number; /** * The speed at which characters are typed in this sequence (typing speed, in milliseconds). Default: 100 */ typeSpeed?: number; } & ({ text: string; action?: never; } | { action: () => void; text?: never; } | { text: string; action: () => void; })>; /** * The delay between sequences (in milliseconds) when not specified in the sequence. Default: 100 */ delayBetweenSequence?: number; /** * A function to split text into individual characters or chunks for typing. */ splitter?: (str: string) => string[]; /** * The number of times to repeat the sequence. Default: 1 */ repeat?: number; /** * Whether to loop the typing animation indefinitely. Default: false */ loop?: boolean; /** * The speed at which the cursor blinks (in milliseconds). Default: 500 */ blinkSpeed?: number; /** * Additional styles for the typewriter animation container. */ style?: TextStyle; /** * Additional styles for the cursor. */ cursorStyle?: TextStyle; /** * Whether to display the cursor. Default: true */ cursor?: boolean; /** * Specifies the direction in which to perform the typing/deleting animation. It accepts two possible values: 'front' and 'back'. Default: front */ direction?: 'front' | 'back'; /** * Specifies the initial text to display. */ preRenderText?: string; /** * The delay before the animation begins (in milliseconds). Default: 0 */ initialDelay?: number; /** * Callback function triggered when a character is typed. */ onCharTyped?: (data: { character: string; currentText: string; }) => void; /** * Callback function triggered when a character is deleted. */ onCharDeleted?: (data: { character: string; currentText: string; }) => void; /** * The speed at which characters are deleted (backspace speed, in milliseconds). Default: 100 */ deletionSpeed?: number; /** * The speed at which characters are typed (typing speed, in milliseconds). Default: 100 */ typeSpeed?: number; }; /** * Typewriter animation component that displays text with typing animations. */ declare const TypeAnimation: React.FC; export default TypeAnimation; //# sourceMappingURL=TypeAnimation.d.ts.map