UNPKG

@mvp-factory/holy-editor

Version:

Rich text editor with Bible verse slash commands and PWA keyboard tracking, extracted from Holy Habit project

85 lines 2.24 kB
/** * Bible Verse Engine * * Core engine for Bible verse slash commands and API integration * Extracted from Holy Habit holy-editor-pro.js */ import { BibleVerseData, SlashCommandMatch } from '../types/Editor'; export declare class BibleVerseEngine { private static instance; private cache; private lastInsertedRef; private lastInsertedTime; private debounceMs; private apiEndpoint; private static readonly OLD_TESTAMENT_BOOKS; private static readonly NEW_TESTAMENT_BOOKS; private static readonly ALL_BOOKS; private static readonly CMD_RE; private static readonly BIBLE_REF_RE; private constructor(); /** * Get singleton instance */ static getInstance(apiEndpoint?: string, debounceMs?: number): BibleVerseEngine; /** * Parse slash commands from text */ parseSlashCommands(text: string): SlashCommandMatch[]; /** * Validate Bible reference format (supports range verses) */ isValidBibleRef(ref: string): boolean; /** * Load verse from API with caching and error handling */ loadVerse(ref: string): Promise<BibleVerseData | null>; /** * Get book name from abbreviation */ getBookName(abbr: string): string | undefined; /** * Get all supported book abbreviations */ getSupportedBooks(): string[]; /** * Update duplicate prevention state */ updateInsertionState(ref: string): void; /** * Clear cache */ clearCache(): void; /** * Get cache stats */ getCacheStats(): { size: number; keys: string[]; }; /** * Set API endpoint */ setApiEndpoint(endpoint: string): void; /** * Set debounce time */ setDebounceMs(ms: number): void; /** * Extract book abbreviation from reference */ extractBookAbbr(ref: string): string; /** * Check if reference is a range verse */ isRangeVerse(ref: string): boolean; /** * Parse verse numbers from reference */ parseVerseNumbers(ref: string): { chapter: number; startVerse: number; endVerse?: number; } | null; } //# sourceMappingURL=BibleVerseEngine.d.ts.map