/** One level of body indentation, matching the layout the generator emits. */ export declare const INDENT = " "; /** A declaration with a body, located in one file's source text. */ export interface LocatedPackage { qualifiedName: string; name: string; /** * False for a usage that merely CAN hold a package. * * A grouping package is declared inside a usage body — `part scrHome : * UIElement { package grpHeader { … } }` — so creating one addresses the * part, which is a container without being a package. */ isPackage: boolean; /** Offset of the declaration's first character. */ start: number; /** Offset just past the declaration's closing brace. */ end: number; /** Offset just past the body's opening brace. */ bodyStart: number; /** Offset of the body's closing brace. */ bodyEnd: number; } /** Every package declared in one file's source, with its qualified name. */ export declare function locatePackages(source: string): Promise; /** * Every declaration in one file that can hold a package: the packages, and the * usages whose bodies may group with one. * * A usage is walked as well as recorded, because SysML puts a grouping package * inside a usage body and MEMO's own explorer offers to create one there. The * qualified name of such a package therefore runs through the usage that holds * it — `catalogPackage::scrHome::grpHeader` — which is what the SysML namespace * says it is, and what makes it addressable by name like any other package. */ export declare function locateContainers(source: string): Promise; /** Insert text as the last member of a package body, indented one level in. */ export declare function insertIntoBody(source: string, target: LocatedPackage, text: string): string; /** Replace a range, re-indenting the replacement to the line it starts on. */ export declare function spliceIndented(source: string, start: number, end: number, replacement: string): string; /** Remove a range together with the blank line it would otherwise leave behind. */ export declare function removeLine(source: string, start: number, end: number): string; /** Strip the common leading whitespace from every line of a block. */ export declare function dedent(text: string): string; //# sourceMappingURL=package-source.d.ts.map