/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Containment rule for the address tree. * * Each tag lists permitted parents in priority order (most-preferred first). The tree builder * resolves each span's parent by walking this list and picking the first tag that has at least * one labeled span; if multiple spans share that tag, the one nearest to this span in char * distance wins. Spans whose tag is absent from this map (or has no labeled parent) become * roots. * * Tags absent from a map are treated as root-only (no parent ever accepted). * * ## Per-system containment (anti-lock-in) * * Addressing _systems_ disagree on hierarchy: a US street address nests `house_number → street → * locality`, while a Japanese block address nests `building_number → sub_block → block → * district` — there is no `street` parent at all. Today a single global map suffices only because * the tag sets don't collide, but the moment the resolver or tree builder hardcodes the Western * shape, retrofitting a second system gets expensive (DeepSeek resolver consult, 2026-05-30). * * The cheap insurance is this indirection: callers ask `containmentFor(system)` rather than * importing one global constant. Today every system resolves to `WESTERN_PARENT_OF` (the * historical map, behavior-identical), and `PARENT_OF` is kept as an alias so existing imports * don't break. When a distinct system map lands (Phase 6 JP), it slots in here with zero * call-site churn. See `AddressSystem` in `./types.ts`. */ import type { ComponentTag } from "../types/component.ts"; import type { AddressSystem } from "./types.ts"; /** * Preferred-parent ordering for each tag. Empty / missing = always root. */ export declare const WESTERN_PARENT_OF: Partial>; /** * The containment map for a given addressing system. * * Currently every system maps to {@link WESTERN_PARENT_OF} — the indirection exists so a future system-specific map * (e.g. Japanese block addressing) can be introduced without touching the tree builder or validator. `undefined` (the * common case — system not yet detected) uses the default. */ export declare function containmentFor(_system?: AddressSystem): Partial>; /** * Backwards-compatible alias for the default (Western) containment map. Prefer `containmentFor()` in new code so the * system parameter threads through; this export remains for existing call sites. */ export declare const PARENT_OF: Partial>; //# sourceMappingURL=containment.d.ts.map