UNPKG

@ertekinno/human-like

Version:

A sophisticated React typewriter effect library with realistic human typing behavior, mobile/desktop keyboards, and comprehensive theming support

50 lines (49 loc) 1.55 kB
import { KeyboardLayoutDefinition } from './types'; /** * Platform-specific timing profiles for more realistic keyboard simulation */ export interface TimingProfile { name: string; description: string; baseMultiplier: number; keyDurations: { letter: number; number: number; symbol: number; modifier: number; viewSwitch: number; space: number; enter: number; backspace: number; }; viewSwitchDelay: number; consecutiveKeyBonus: number; complexSymbolPenalty: number; capsLockTransitionDelay: number; } /** * Mobile device timing profiles */ export declare const MOBILE_TIMING_PROFILES: Record<string, TimingProfile>; /** * Desktop timing profiles */ export declare const DESKTOP_TIMING_PROFILES: Record<string, TimingProfile>; /** * Auto-detect appropriate timing profile based on config */ export declare function getDefaultTimingProfile(keyboardMode: 'mobile' | 'desktop', userHint?: string): TimingProfile; /** * Apply timing profile to keyboard layout */ export declare function applyTimingProfile(layout: KeyboardLayoutDefinition, profile: TimingProfile): KeyboardLayoutDefinition; /** * Calculate dynamic timing adjustments based on context */ export declare function calculateContextualTiming(baseDelay: number, profile: TimingProfile, context: { isConsecutiveSameHand?: boolean; isComplexSymbol?: boolean; isViewSwitch?: boolean; isCapsLockTransition?: boolean; }): number; //# sourceMappingURL=timing-profiles.d.ts.map