@mitre/nuxt-smartscript
Version:
Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting
32 lines (31 loc) • 1.09 kB
TypeScript
/**
* Core processing engine for SmartScript
*/
import type { PatternSet, SuperscriptConfig } from './types.js';
/**
* Process a single text node
*/
export declare function processTextNode(textNode: Text, _config: SuperscriptConfig, pattern: RegExp): boolean;
/**
* Process an element and its text nodes
*/
export declare function processElement(element: Element, config: SuperscriptConfig, _patterns: PatternSet, combinedPattern: RegExp): void;
/**
* Process all matching elements in the document
*/
export declare function processContent(config: SuperscriptConfig, patterns: PatternSet, combinedPattern: RegExp): void;
/**
* Initialize processing for navigation
*/
export declare function initializeForNavigation(): void;
/**
* Create a debounced processor
*/
export declare function createDebouncedProcessor(processFunc: () => void, delay: number): {
process: () => void;
cancel: () => void;
};
/**
* Create a mutation observer for dynamic content
*/
export declare function createContentObserver(processFunc: () => void, config: SuperscriptConfig): MutationObserver;