UNPKG

@mitre/nuxt-smartscript

Version:

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

103 lines (100 loc) 2.87 kB
import * as _nuxt_schema from '@nuxt/schema'; interface ModuleOptions { /** * Enable or disable the smartscript plugin * @default true */ enabled?: boolean; /** * CSS positioning configuration for different elements */ positioning?: { trademark?: { body?: string; headers?: string; fontSize?: string; }; registered?: { body?: string; headers?: string; fontSize?: string; }; ordinals?: { fontSize?: string; }; chemicals?: { fontSize?: string; }; }; /** * Selectors configuration */ selectors?: { include?: string[]; exclude?: string[]; }; /** * Performance configuration */ performance?: { debounce?: number; batchSize?: number; delay?: number; }; /** * Enable/disable specific transformations * Set to false to disable specific transformation types */ transformations?: { trademark?: boolean; registered?: boolean; copyright?: boolean; ordinals?: boolean; chemicals?: boolean; mathSuper?: boolean; mathSub?: boolean; }; /** * Custom pattern overrides for advanced users * WARNING: Use with caution - invalid regex can break the plugin * Patterns should be provided as strings (will be compiled with 'g' flag) */ customPatterns?: { trademark?: string; registered?: string; copyright?: string; ordinals?: string; chemicals?: string; mathSuper?: string; mathSub?: string; }; /** * CSS Variables configuration * Allows runtime customization of CSS values via custom properties * These values override the default CSS variables defined in the stylesheet * Example: { 'sup-font-size': '0.8em', 'sup-top': '0.2em' } */ cssVariables?: Record<string, string>; /** * Enable server-side rendering (SSR) and static generation (SSG) processing * When true, processes content during SSR/SSG for better SEO and performance * In development, SSR is disabled by default to avoid hydration warnings * Use 'force' to enable SSR even in development mode * @default true (false in dev unless 'force') */ ssr?: boolean | 'force'; /** * Enable client-side processing for dynamic content * When true, processes content in the browser using MutationObserver * @default true */ client?: boolean; /** * Enable debug logging * @default false */ debug?: boolean; } declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>; export { _default as default }; export type { ModuleOptions };