/** * Range geometry over model nodes: turn a resolved node into the byte spans an * operation acts on. Both `content` and `markerAndContent` act on a section's * whole *subtree* — which is contiguous in document order because a section's * descendants immediately follow its content and gap — the difference being that * `content` excludes the heading line itself (the subtree *minus* its own * marker) while `markerAndContent` includes it. */ import { DocumentRange } from "./types.js"; import { BlockNode, SectionNode } from "./model.js"; /** The deepest, last node within a section's subtree (the section itself if a leaf). */ export declare const lastDescendant: (section: SectionNode) => SectionNode; /** * The subtree's visible extent: the heading line through the last descendant's * content, excluding the final separator gap. Used for whole-section replace * and sibling-insert anchoring. */ export declare const subtreeContentRange: (section: SectionNode) => DocumentRange; /** * The `content` scope of a heading: everything below the heading line through * the last descendant's content, excluding the heading line itself and the final * trailing gap. This is the whole subtree *minus* its own marker — the span 1.x * `content` addressed — so a single content read/replace round-trips a section's * full body, subsections included. For a leaf section it coincides with the * direct body (`section.body`). */ export declare const headingContentRange: (section: SectionNode) => DocumentRange; /** The subtree's end including its trailing separator gap; used for clean deletes. */ export declare const subtreeEnd: (section: SectionNode) => number; export declare class RootHasNoMarkerError extends Error { } /** The heading label line span; throws for the markerless document root. */ export declare const headingMarkerRange: (section: SectionNode) => DocumentRange; /** The block's addressable text (the preceding block, for an isolated `^id`). */ export declare const blockContentRange: (block: BlockNode) => DocumentRange; /** The `^id` token span. */ export declare const blockMarkerRange: (block: BlockNode) => DocumentRange; /** The whole block: content through marker (they are contiguous for inline ids). */ export declare const blockFullRange: (block: BlockNode) => DocumentRange; //# sourceMappingURL=ranges.d.ts.map