12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- import { DOCUMENT_MODE, type NS } from '../common/html.js';
- import type { Attribute, Location, ElementLocation } from '../common/token.js';
- import type { TreeAdapter, TreeAdapterTypeMap } from './interface.js';
- export interface Document {
-
- nodeName: '#document';
-
- mode: DOCUMENT_MODE;
-
- childNodes: ChildNode[];
-
- sourceCodeLocation?: Location | null;
- }
- export interface DocumentFragment {
-
- nodeName: '#document-fragment';
-
- childNodes: ChildNode[];
-
- sourceCodeLocation?: Location | null;
- }
- export interface Element {
-
- nodeName: string;
-
- tagName: string;
-
- attrs: Attribute[];
-
- namespaceURI: NS;
-
- sourceCodeLocation?: ElementLocation | null;
-
- parentNode: ParentNode | null;
-
- childNodes: ChildNode[];
- }
- export interface CommentNode {
-
- nodeName: '#comment';
-
- parentNode: ParentNode | null;
-
- data: string;
-
- sourceCodeLocation?: Location | null;
- }
- export interface TextNode {
- nodeName: '#text';
-
- parentNode: ParentNode | null;
-
- value: string;
-
- sourceCodeLocation?: Location | null;
- }
- export interface Template extends Element {
- nodeName: 'template';
- tagName: 'template';
-
- content: DocumentFragment;
- }
- export interface DocumentType {
-
- nodeName: '#documentType';
-
- parentNode: ParentNode | null;
-
- name: string;
-
- publicId: string;
-
- systemId: string;
-
- sourceCodeLocation?: Location | null;
- }
- export type ParentNode = Document | DocumentFragment | Element | Template;
- export type ChildNode = Element | Template | CommentNode | TextNode | DocumentType;
- export type Node = ParentNode | ChildNode;
- export type DefaultTreeAdapterMap = TreeAdapterTypeMap<Node, ParentNode, ChildNode, Document, DocumentFragment, Element, CommentNode, TextNode, Template, DocumentType>;
- export declare const defaultTreeAdapter: TreeAdapter<DefaultTreeAdapterMap>;
|