/** * RealTyper for Angular * * An Angular component that gives the effect of typing for texts * * [Doc](https://github.com/cyrus2281/Real-Typer/tree/main/src/Angular/projects/real-typer#readme) * * author: Cyrus Mobini * * Licensed under the MIT license. * http://www.opensource.org/licenses/mit-license.php * * Copyright 2023 Cyrus Mobini (https://github.com/cyrus2281) * * */ export interface StringTypeOptions { /** The speed of typing in milliseconds */ typeSpeed: number; /** The speed of deleting in milliseconds */ deleteSpeed: number; /** The delay between typing and deleting in milliseconds */ holdDelay: number; } export interface RealTypeOptions { /** The delay before typing starts in milliseconds */ startDelay: number; /** The text that will be typed, can be an array of strings */ strings: string | string[]; /** If true, the typing will loop */ loop: boolean; /** The index of the string that the loop will start from */ loopStartIndex: number; /** The delay between loops in milliseconds */ loopHold: number; /** If true, the strings will be delete after typing */ delete: boolean; /** If true, the last string will be deleted */ deleteLastString: boolean; /** The delay between each string element in milliseconds */ pauseDelay: number; /** A function that will be called after each cycle */ callback: (args: unknown) => void; /** The arguments that will be passed to the callback function */ callbackArgs: unknown; /** If true, there would be log errors if there is an issue with the prop validation*/ developerMode: boolean; } export interface CurserOptions { /** The character that will be used as a cursor, "" for no cursor */ cursorCharacter: string; /** whether to blink the cursor or not */ cursorBlink: boolean; } export declare type EmitterInput = { /** * string to be added to the queue */ input: string; /** * index of the string in the queue, if true, it will be the last string in the queue, if undefined, it will add it a new string to the queue */ index?: undefined | number | true; }; /** * Emit a string to be added to the list of strings to be typed * @param {string} input string to be added to the queue * @param {undefined|number|true} index index of the string in the queue, if true, it will be the last string in the queue, if undefined, it will add it a new string to the queue */ export declare type Emit = (input: string, index: undefined | number | true) => void; export declare const realType: (typeOptions: RealTypeOptions & StringTypeOptions, setOutput: (string: string) => void) => Emit; export declare const realTyperDefaultProps: RealTypeOptions & StringTypeOptions & CurserOptions; export default realType;