import { o as SemanticDOMConfig, l as SemanticDocument, m as SemanticQuery, d as SemanticNode, c as SemanticId, n as NavigationOptions, A as AgentCertification, b as StateType, g as StateTransition } from './types-BNownkHv.cjs'; export { i as SSGNode } from './types-BNownkHv.cjs'; import { S as SemanticDOM } from './semantic-dom-BCFwuKOl.cjs'; export { c as createSemanticDOM } from './semantic-dom-BCFwuKOl.cjs'; /** * SemanticDOM Vanilla JavaScript Implementation * Framework-agnostic API for browser and Node.js environments * * @packageDocumentation */ /** * Initialize SemanticDOM with configuration */ declare function init(config?: SemanticDOMConfig): SemanticDOM; /** * Parse the current document or a specific element */ declare function parse(element?: Element): SemanticDocument; /** * Parse HTML string into SemanticDocument */ declare function parseHTML(html: string, config?: SemanticDOMConfig): SemanticDocument; /** * Query semantic nodes */ declare function query(document: SemanticDocument, q: SemanticQuery): SemanticNode[]; /** * Get node by ID (O(1) lookup) */ declare function getById(document: SemanticDocument, id: SemanticId): SemanticNode | undefined; /** * Navigate to next node */ declare function navigate(document: SemanticDocument, currentId: SemanticId, options: NavigationOptions): SemanticNode | null; /** * Get all landmarks */ declare function getLandmarks(document: SemanticDocument): SemanticNode[]; /** * Get all interactive elements */ declare function getInteractables(document: SemanticDocument): SemanticNode[]; /** * Get certification info */ declare function getCertification(document: SemanticDocument): AgentCertification; /** * Check if document is agent-ready */ declare function isAgentReady(document: SemanticDocument): boolean; /** * SSG State Manager for vanilla JS */ declare class SSGStateManager { private state; private history; private listeners; private globalListeners; private document; /** * Initialize with a semantic document */ init(document: SemanticDocument): void; /** * Get current state of a node */ getState(id: SemanticId): StateType; /** * Get state history for a node */ getHistory(id: SemanticId): Array<{ from: StateType; to: StateType; timestamp: number; }>; /** * Set state directly */ setState(id: SemanticId, newState: StateType): void; /** * Trigger a state transition */ transition(id: SemanticId, trigger: string): boolean; /** * Check if a transition is possible */ canTransition(id: SemanticId, trigger: string): boolean; /** * Get available transitions for a node */ getAvailableTransitions(id: SemanticId): StateTransition[]; /** * Subscribe to state changes for a specific node */ subscribe(id: SemanticId, listener: (state: StateType) => void): () => void; /** * Subscribe to all state changes */ subscribeAll(listener: (id: SemanticId, state: StateType) => void): () => void; /** * Notify listeners of state change */ private notifyListeners; /** * Get all states as a snapshot */ snapshot(): Map; /** * Reset all state */ reset(): void; } /** * Create SSG state manager */ declare function createSSGManager(): SSGStateManager; /** * MutationObserver wrapper for automatic re-parsing */ declare class SemanticObserver { private observer; private sdom; private callback; private element; private debounceTimer; private debounceMs; constructor(callback: (document: SemanticDocument) => void, config?: SemanticDOMConfig, debounceMs?: number); /** * Start observing an element */ observe(element: Element): void; /** * Stop observing */ disconnect(): void; /** * Force re-parse */ refresh(): void; private debouncedParse; private parseAndNotify; } /** * Create a semantic observer */ declare function createObserver(callback: (document: SemanticDocument) => void, config?: SemanticDOMConfig, debounceMs?: number): SemanticObserver; /** * Serialize semantic document to JSON */ declare function toJSON(document: SemanticDocument): string; /** * Export semantic document as a plain object */ declare function toPlainObject(document: SemanticDocument): Record; /** * Find element by semantic ID */ declare function findElement(document: SemanticDocument, id: SemanticId): Element | null; /** * Click on a semantic node (browser only) */ declare function click(document: SemanticDocument, id: SemanticId): boolean; /** * Focus on a semantic node (browser only) */ declare function focus(document: SemanticDocument, id: SemanticId): boolean; /** * Set value on a semantic node (browser only) */ declare function setValue(document: SemanticDocument, id: SemanticId, value: string): boolean; export { AgentCertification, NavigationOptions, SSGStateManager, SemanticDOM, SemanticDOMConfig, SemanticDocument, SemanticId, SemanticNode, SemanticObserver, SemanticQuery, StateTransition, StateType, click, createObserver, createSSGManager, findElement, focus, getById, getCertification, getInteractables, getLandmarks, init, isAgentReady, navigate, parse, parseHTML, query, setValue, toJSON, toPlainObject };