/**
 * HTML Content Extractor
 *
 * Extracts JavaScript content from HTML files for analysis:
 * - Inline <script> blocks with line offset tracking
 * - Inline event handler attributes (onclick, onerror, etc.)
 * - External script src references (informational)
 */
import type { Node as SyntaxNode } from 'web-tree-sitter';
/**
 * Represents an extracted <script> block from HTML.
 */
export interface HtmlScriptBlock {
    /** The raw JS source code inside the <script> tags */
    code: string;
    /** 1-based line offset of the first line of JS within the HTML file */
    lineOffset: number;
    /** Whether this is an inline <script> or an external src= reference */
    kind: 'inline' | 'external-src';
    /** The src URL if kind === 'external-src' (informational only) */
    src?: string;
    /** The script type/lang attribute value, if present */
    scriptType?: string;
}
/**
 * Represents an inline event handler attribute extracted from HTML.
 */
export interface HtmlEventHandler {
    /** The JS expression from the event handler attribute value */
    code: string;
    /** Attribute name, e.g. "onclick", "onerror" */
    eventName: string;
    /** 1-based line of the attribute in the HTML file */
    line: number;
    /** The element tag name, e.g. "img", "div" */
    element: string;
}
/**
 * Result of extracting JS content from an HTML file.
 */
export interface HtmlExtractionResult {
    scriptBlocks: HtmlScriptBlock[];
    eventHandlers: HtmlEventHandler[];
}
/**
 * Extract JavaScript content from an HTML AST.
 *
 * Walks the tree-sitter-html AST to find:
 * 1. <script> elements — extracts inline code or notes external src
 * 2. Elements with on* event handler attributes
 */
export declare function extractHtmlContent(rootNode: SyntaxNode): HtmlExtractionResult;
/**
 * Get the tag name from an element or self-closing tag node.
 */
declare function getTagName(node: SyntaxNode): string;
/**
 * Get the value of a named attribute from a start_tag or self_closing_tag.
 */
declare function getAttributeValue(tag: SyntaxNode | null, name: string): string | undefined;
/**
 * Find the first child node of a given type.
 */
declare function findChildByType(node: SyntaxNode, type: string): SyntaxNode | null;
/**
 * Strip surrounding quotes from an attribute value.
 */
declare function stripQuotes(text: string): string;
export { getAttributeValue, getTagName, findChildByType, stripQuotes };
//# sourceMappingURL=html-extractor.d.ts.map