import type { Registry } from './schema'; /** The four headings, in the order a page carries them. */ export declare const PAGE_SECTIONS: readonly ["When", "When not", "How", "What it owns"]; /** The classes that owe a page and a picture. */ export declare const CONTRACT_KINDS: readonly ["reusable", "promote-candidate"]; /** * Why a page breaks the contract, or null when it keeps it. * * Read on normalised text: the apps are checked out with CRLF on Windows. */ export declare function pageProblem(source: string): string | null; /** Whether a page records where the part is drawn, in place of a story of its own. */ export declare function hasSeenIn(source: string): boolean; /** * Every catalogue link that names a story or a docs page its Storybook does not * have (UIG-19: a dead link is a build failure, not a dead end found six weeks * later). `ids` is every entry id in the Storybook's own index — what * `storybook index` writes — so this is Storybook's answer, not a guess at how * it builds an id. */ export declare function linkProblems(registry: Registry, ids: ReadonlySet): string[]; /** * The parts an app's page may name under When and When not: the package's and * the app's own (B8). The one copy: `estiva-ui check` and `gates:status` both * read it, so they cannot disagree. Status once knew the app's parts only, and * read six of Peek's pages as broken that CI passed (UIG-26). */ export declare function nameableParts(app: Registry, pkg: Registry): Set; /** * Every way an app's catalogue breaks the contract, one line each, naming the * part, its file and what to do. Empty when it keeps it. * * `root` is the app's own folder: the one its catalogue's paths are relative to. */ export declare function contractProblems(registry: Registry, root: string, known?: ReadonlySet): string[]; /** The names a page's section writes as a part: bold or in backticks, starting with a capital. */ export declare function namedParts(section: string): string[]; /** The line a "When not" starts where no part stands in (Katerina's ruling B8). */ export declare const NO_ALTERNATIVE: RegExp; /** * Why a page's `When not` breaks the ruling B8 (25 September), or null. The plan * asked for "When not — naming the alternative"; CI checked only that the * heading was there, and 29 pages across the three repos named nothing. Now the * section names a real part other than the page's own (`own`), from `known`, or * a line of it starts "No alternative:" and says why there is none. */ export declare function whenNotProblem(source: string, own: readonly string[], known: ReadonlySet): string | null; /** * What an app's usage pages name that is not there (the re-review after the audit * before UIG-26, R14): a part named under When or When not that no catalogue has — * Peek's StartTopicDialog sent readers to CreateTopicDialog, deleted by FOL-23 — * and a story a **Seen in** line names that no Storybook has. `known` is every part * of the package and the app; `titles` is the app's Storybook titles, when there * is an index to read them from; `packageIds` the package's story and docs ids, so * a page may send readers to the package's Storybook too. */ export declare function nameProblems(registry: Registry, root: string, { known, titles, packageIds }: { known: Set; titles?: Set; packageIds?: string[]; }): string[]; //# sourceMappingURL=contract.d.ts.map