export class Table extends AbstractBlock { constructor(parent: any, attributes: any); rows: { head: any[]; foot: any[]; body: any[]; /** * Retrieve the rows grouped by section as a nested Array. * @returns {Array<[string, Array]>} */ bySection(): Array<[string, any[]]>; toObject(): { head: any[]; body: any[]; foot: any[]; }; }; columns: any[]; hasHeaderOption: boolean; } export namespace Table { export { Rows }; export { Column }; export { Cell }; export { ParserContext }; } import { AbstractBlock } from './abstract_block.js'; import { AbstractNode } from './abstract_node.js'; declare class Rows { constructor(head?: any[], foot?: any[], body?: any[]); head: any[]; foot: any[]; body: any[]; /** * Retrieve the rows grouped by section as a nested Array. * @returns {Array<[string, Array]>} */ bySection(): Array<[string, any[]]>; toObject(): { head: any[]; body: any[]; foot: any[]; }; } declare class Column extends AbstractNode { constructor(table: any, index: any, attributes?: {}); style: any; /** Alias for parent (always a Table). */ get table(): AbstractNode; /** * Get the parent table of this column. * @returns {Table} */ getTable(): Table; } /** @extends {AbstractBlock} */ declare class Cell extends AbstractBlock { static get DOUBLE_LF(): string; /** * Factory — create and fully initialize a Cell asynchronously. * For AsciiDoc cells, parses the nested document. * * NOTE: _innerContent is NOT pre-computed here. Document.convert() will call * _convertAsciiDocCells() after parse completes (so callouts are rewound and * all cross-references from the parent document are already registered). * @param {Table.Column} column * @param {string} cellText * @param {Object} [attributes={}] * @param {Object} [opts={}] * @returns {Promise} */ static create(column: { style: any; /** Alias for parent (always a Table). */ get table(): AbstractNode; isBlock(): boolean; isInline(): boolean; /** * Get the parent table of this column. * @returns {Table} */ getTable(): Table; document: Document; context: string; nodeName: string; id: string; attributes: any; passthroughs: any[]; get parent(): AbstractNode; set parent(parent: AbstractNode); get role(): string | string[]; set role(names: string | string[]); get roles(): any; get converter(): object; getAttribute(name: string, defaultValue?: any, fallbackName?: string | boolean | null): any; hasAttribute(name: string, expectedValue?: any, fallbackName?: string | boolean | null): boolean; setAttribute(name: string, value?: any, overwrite?: boolean): string | boolean | null; isAttribute(name: any, expectedValue?: any): boolean; removeAttribute(name: string): any; hasOption(name: string): boolean; setOption(name: string): void; enabledOptions(): Set; updateAttributes(newAttributes: any): any; hasRoleAttribute(expectedValue?: string | null): boolean; hasRole(name: string): boolean; addRole(name: string): boolean; removeRole(name: string): boolean; get reftext(): string | null; precomputeReftext(): Promise; hasReftext(): boolean; isReftext(): boolean; iconUri(name: string): Promise; imageUri(targetImage: string, assetDirKey?: string): Promise; mediaUri(target: string, assetDirKey?: string): string; generateDataUri(targetImage: string, assetDirKey?: string | null): Promise; generateDataUriFromUri(imageUri: string): Promise; normalizeAssetPath(assetRef: string, assetName?: string, autocorrect?: boolean): string; normalizeSystemPath(target: string, start?: string | null, jail?: string | null, opts?: any): string; normalizeWebPath(target: string, start?: string | null, preserveUriTarget?: boolean): string; readAsset(path: string, opts?: any): Promise; readContents(target: string, opts?: any): Promise; isUri(str: string): boolean; readonly logger: import("./logging.js").LoggerLike; getLogger(): import("./logging.js").LoggerLike; getRole(): string | undefined; setRole(...names: (string | string[])[]): string; getRoles(): string[]; getAttributes(): any; getDocument(): Document; getParent(): AbstractNode | undefined; setParent(parent: any): void; getNodeName(): string; getId(): string | undefined; setId(id: string): void; getContext(): string; getConverter(): object; getIconUri(name: string): Promise; getMediaUri(target: string, assetDirKey?: string): string; getImageUri(targetImage: string, assetDirKey?: string | null): Promise; getReftext(): string | undefined; }, cellText: string, attributes?: any, opts?: any): Promise; constructor(column: any, cellText: any, attributes?: {}, opts?: {}); _cursor: any; sourceLocation: any; colspan: number; rowspan: number; style: any; /** Alias for parent (always a Column). */ get column(): AbstractNode; /** @returns {Promise} */ reinitialize(hasHeader: any): Promise; _catalogInlineAnchor(cellText?: any, cursor?: any): void; set text(val: string | null); /** * Get the text with substitutions applied. * The result is pre-computed during Document.parse() via precomputeText(). * Falls back to the raw text if precomputeText() has not been called yet. * @returns {string|null} */ get text(): string | null; /** * Pre-compute the converted text asynchronously. * Called during Document.parse() so the synchronous getter works during conversion. * @returns {Promise} */ precomputeText(): Promise; lines(): any; source(): any; get innerDocument(): any; get file(): any; get lineno(): any; /** * Get the text with substitutions applied. * @returns {string|null} */ getText(): string | null; /** * Set the raw text of this cell. * @param {string|null} val */ setText(val: string | null): void; /** * Get the inner document for AsciiDoc-style cells. * @returns {Document|null} */ getInnerDocument(): Document | null; } declare class ParserContext { static get FORMATS(): Set; static get DELIMITERS(): { psv: (string | RegExp)[]; csv: (string | RegExp)[]; dsv: (string | RegExp)[]; tsv: (string | RegExp)[]; '!sv': (string | RegExp)[]; }; constructor(reader: any, table: any, attributes?: {}); _reader: any; _startCursor: any; table: any; buffer: string; format: unknown; delimiter: any; delimiterRe: any; colcount: any; _cellspecs: any[]; _cellOpen: boolean; _activeRowspans: number[]; _columnVisits: number; _currentRow: any[]; _linenum: number; startsWith(line: any): any; matchDelimiter(line: any): any; skipPastDelimiter(pre: any): void; skipPastEscapedDelimiter(pre: any): void; bufferHasUnclosedQuotesInText(text: any, q?: string): boolean; bufferHasUnclosedQuotes(append?: any, q?: string): boolean; takeCellspec(): any; pushCellspec(cellspec?: {}): void; keepCellOpen(): void; markCellClosed(): void; isCellOpen(): boolean; isCellClosed(): boolean; closeOpenCell(nextCellspec?: {}): Promise; closeCell(eol?: boolean): Promise; closeTable(): void; _activateRowspan(rowspan: any, colspan: any): void; _endOfRow(): 0 | 1 | -1; _advance(): void; /** * The logger for this parser context. * The Logging mixin (logging.js) overrides this getter on the prototype. * @returns {import('./logging.js').LoggerLike} */ get logger(): import("./logging.js").LoggerLike; /** @returns {import('./logging.js').LoggerLike} */ getLogger(): import("./logging.js").LoggerLike; /** * Build an auto-formatting log message that carries structured source_location * (rather than baking it into the text), for use with `this.logger.warn(...)`. * @param {string} text * @param {{source_location?: any, include_location?: any}} [context={}] * @returns {{text: string, source_location?: any, include_location?: any, inspect(): string, toString(): string}} */ messageWithContext(text: string, context?: { source_location?: any; include_location?: any; }): { text: string; source_location?: any; include_location?: any; inspect(): string; toString(): string; }; /** Alias for {@link messageWithContext} (used in extensions). */ createLogMessage(text: any, context?: {}): { text: string; source_location?: any; include_location?: any; inspect(): string; toString(): string; }; } export {};