UNPKG

@mitre/nuxt-smartscript

Version:

Smart typography transformations for Nuxt - automatic superscript, subscript, and symbol formatting

37 lines (36 loc) 1.28 kB
/** * DOM manipulation utilities for SmartScript */ import type { TextPart } from './types.js'; /** * Create a superscript element with appropriate attributes */ export declare function createSuperscriptElement(content: string, type: 'trademark' | 'registered' | 'ordinal' | 'math' | 'generic'): HTMLElement; /** * Create a subscript element with appropriate attributes */ export declare function createSubscriptElement(content: string, type: 'chemical' | 'math' | 'generic'): HTMLElement; /** * Create document fragment from text parts */ export declare function createFragmentFromParts(parts: TextPart[]): DocumentFragment; /** * Check if element should be excluded from processing */ export declare function shouldExcludeElement(element: Element, excludeSelectors: string[]): boolean; /** * Check if element should be included for processing */ export declare function shouldIncludeElement(element: Element, includeSelectors: string[]): boolean; /** * Mark element as processed */ export declare function markAsProcessed(element: Element): void; /** * Check if element is already processed */ export declare function isProcessed(element: Element): boolean; /** * Reset processing flags for navigation */ export declare function resetProcessingFlags(): void;