import type { ParsedNote } from "./parser.js"; /** One line of a note, fence-classified, with its heading + breadcrumb context. */ export interface StructLine { /** The line text, terminator-stripped (identical to `splitLines(text)[index]`). */ text: string; /** The exact terminator that followed this line (`""` for the last line) — for byte-faithful write-back. */ end: string; /** 0-based index into the walked string. */ index: number; /** 1-based FILE-absolute line number (= base + index). */ line: number; /** True iff this line is a block-fence DELIMITER or is INSIDE a block fence (i.e. not eligible to be a heading). */ inFence: boolean; /** True iff this line opened/closed a matching block fence. */ isFenceDelimiter: boolean; /** * The ATX heading on this line, iff it is OUTSIDE a fence and matches {@link HEADING_RE}. `text` * is the stripped heading text and MAY be `""` for a degenerate all-hashes heading (`# ###`) — * callers decide: read/meta treat empty text as "not a real heading" (`if (l.heading?.text)`), * fts5 pushes it to the breadcrumb stack regardless (its long-standing behavior, preserved here). */ heading?: { level: number; text: string; }; /** * The full H1 > H2 > H3 heading stack in scope AT this line (a heading line includes itself), * computed with fts5's exact semantics (pushes even a degenerate empty heading). `breadcrumb.at(-1)` * is the nearest-heading text; `breadcrumb.join(" > ")` is fts5's per-line breadcrumb. */ breadcrumb: string[]; } /** Fence-aware line iterator over a note BODY (line numbers file-absolute via `parsed.bodyStartLine`). */ export declare function iterateBodyLines(parsed: ParsedNote): Generator; /** Fence-aware line iterator over full note CONTENT (frontmatter included; line 1 = content line 1). */ export declare function iterateContentLines(content: string): Generator; /** * The ATX headings of a note body, file-absolute line numbers, in document order. A degenerate * all-hashes heading (`# ###` → empty text) is skipped (byte-identical to read.ts extractHeadings / * meta.ts's real-heading check). Headings inside code fences are excluded. */ export declare function noteHeadings(parsed: ParsedNote): Array<{ level: number; text: string; line: number; }>; //# sourceMappingURL=structure.d.ts.map