/** * Update configuration with validation * @param {Record} options - New configuration options */ export function updateConfig(options?: Record): void; /** * Reset configuration and state to defaults */ export function resetConfig(): void; /** * Get current configuration (immutable copy) * @returns {object} Current configuration */ export function getConfig(): object; /** * Add cleanup function to be called on destroy * @param {Function} fn - Cleanup function */ export function addCleanupFunction(fn: Function): void; /** * Run all registered cleanup functions */ export function runCleanupFunctions(): void; /** * Add cleanup function to be called when modal closes * @param {Function} fn - Cleanup function */ export function addModalCleanupFunction(fn: Function): void; /** * Run all modal-scoped cleanup functions */ export function runModalCleanupFunctions(): void; /** * Global State Singleton (Internal Mutable) * @type {DiagViewState} */ export const state: DiagViewState; export namespace publicState { let config: Record; let events: ReturnType; let activePanzoom: object | null; let observer: MutationObserver | null; let lazyObserver: IntersectionObserver | null; let isInitialized: boolean; let isModalOpen: boolean; let isModalOpening: boolean; let cleanupFunctions: Set; let modalCleanupFunctions: Set; let hasCheckedShareLink: boolean; let isInitialProcessDone: boolean; let touchState: { isPinching: boolean; lastTouchCount: number; initialDistance: number; }; let lastActiveElement: Element | null; let meetingMode: boolean; let laserPointer: Function | null; let minimapSvg: SVGElement | null; let searchMatches: Element[]; let searchRafId: number | null; let focusManagementSetup: boolean; let activeMeetingHandlers: object | null; let themeCache: object | null; let themeCacheTimestamp: number; let themeObserver: MutationObserver | null; let themeChangeHandler: Function | null; let mediaQueryList: MediaQueryList | null; let colorParserEl: HTMLElement | null; let activeSourceElement: HTMLElement | null; let rotationAngle: number; let savedScrollY: number; let currentDiagramIndex: number; let asyncTasks: { timeouts: Set; rafs: Set; }; let nodesToProcess: Set; let debouncedProcess: Function | null; let searchCache: WeakMap>; let isStorageAvailable: boolean; let meetingCleanupRegistered: boolean; let focusableElements: HTMLElement[] | null; } export type DiagViewState = { /** * - Current effective configuration */ config: Record; /** * - Instance-based event bus */ events: ReturnType; /** * - Active Panzoom instance */ activePanzoom: object | null; /** * - Diagram mutation observer */ observer: MutationObserver | null; /** * - Lazy initialization observer */ lazyObserver: IntersectionObserver | null; /** * - Whether DiagView has been initialised */ isInitialized: boolean; /** * - Whether fullscreen modal is open */ isModalOpen: boolean; /** * - Whether modal is currently initializing */ isModalOpening: boolean; /** * - Global cleanup functions */ cleanupFunctions: Set; /** * - Modal-scoped cleanup functions */ modalCleanupFunctions: Set; /** * - Share link check flag */ hasCheckedShareLink: boolean; /** * - Initial scan completed flag */ isInitialProcessDone: boolean; /** * - Touch gesture state */ touchState: { isPinching: boolean; lastTouchCount: number; initialDistance: number; }; /** * - Element focused before modal opened */ lastActiveElement: Element | null; /** * - Whether laser pointer is active */ meetingMode: boolean; /** * - Active mousemove handler for laser (internal) */ laserPointer: Function | null; /** * - Minimap SVG clone element */ minimapSvg: SVGElement | null; /** * - Current search match elements */ searchMatches: Element[]; /** * - RAF id for search batching */ searchRafId: number | null; /** * - Focus trap initialised flag */ focusManagementSetup: boolean; /** * - Active meeting mode handlers */ activeMeetingHandlers: object | null; /** * - Cached theme detection result */ themeCache: object | null; /** * - Timestamp of last theme detection */ themeCacheTimestamp: number; /** * - Observer for theme changes */ themeObserver: MutationObserver | null; /** * - Handler for media query changes */ themeChangeHandler: Function | null; /** * - Media query list for theme detection */ mediaQueryList: MediaQueryList | null; /** * - Temporary element for color parsing */ colorParserEl: HTMLElement | null; /** * - Original diagram element before cloning */ activeSourceElement: HTMLElement | null; /** * - Current diagram rotation (0/90/180/270) */ rotationAngle: number; /** * - Saved window scroll position for iOS lock */ savedScrollY: number; /** * - Index of currently open diagram */ currentDiagramIndex: number; /** * - Registry for pending async tasks */ asyncTasks: { timeouts: Set; rafs: Set; }; /** * - Observer pending nodes queue */ nodesToProcess: Set; /** * - Observer debounced function */ debouncedProcess: Function | null; /** * - Search candidates cache */ searchCache: WeakMap>; /** * - Whether sessionStorage is available */ isStorageAvailable: boolean; /** * - Meeting mode cleanup flag */ meetingCleanupRegistered: boolean; /** * - Cached focusable elements for modal */ focusableElements: HTMLElement[] | null; }; import { EventEmitter } from "./events.js"; import { DEFAULT_CONFIG } from "./config-defaults.js"; import { INITIAL_CONFIG } from "./config-defaults.js"; export { DEFAULT_CONFIG, INITIAL_CONFIG }; //# sourceMappingURL=config.d.ts.map