/** * Capsule declaration locking the {@link ARIACompiler.compile} contract as a * standing `pureTransform` over a SEEDED Boundary + per-state ARIA attribute * domain. * * WHY `pureTransform` / WHY SEED MATERIAL: `compile` is pure over (boundary, * states, currentState). The arbitrary-from-schema walker cannot mint a * per-state `Record` (index signatures throw) nor a content-addressed * `Boundary` id, so the input is a state-name list plus per-state attribute * ENTRY lists (key + value), which `run` normalizes into a real Boundary and the * per-state attribute maps the compiler consumes. The invariants assert over the * REAL compile output. * * DIAGNOSTIC HYGIENE: `ARIACompiler.compile` warns through `Diagnostics` on every * dropped (non-`aria-*`/non-`role`) key. The default diagnostics sink writes to * `console.warn`, which a 100-run property test would flood. `run` therefore * swaps in a throwaway buffer sink for the duration of the compile and restores * the default afterwards — anti-fragile (no console noise, no flaky timer), and * the drop COUNT is still observable for the survival law via the realized * authored-vs-output key sets. * * @module */ import { Schema } from 'effect'; import { Boundary } from '@czap/core'; import type { ARIACompileResult } from '../aria.js'; /** Seed material the schema-arbitrary CAN produce. `run` normalizes it. */ declare const ARIACompileSeed: Schema.Struct<{ /** Candidate state names → deduped, ascending-thresholded boundary states. */ readonly states: Schema.$Array; /** * Per-state authored attribute entries `entries[stateIdx]`. Keys are free * strings, so the domain spans both valid (`aria-*`/`role`) and invalid keys — * exercising both the survival and the drop branches of the validator. */ readonly entries: Schema.$Array>>; }>; type ARIACompileSeedValue = Schema.Schema.Type; /** Per-state attribute maps in the shape `ARIACompiler.compile` consumes. */ type StateAttrs = Record>; /** Build a valid Boundary from a recorded (deduped) state-name list. */ declare function makeBoundary(stateNames: readonly string[]): Boundary.Shape; /** Normalize a seed into a real Boundary + per-state attribute maps + currentState. */ declare function buildInputs(seed: ARIACompileSeedValue): { boundary: Boundary.Shape; authored: StateAttrs; stateNames: string[]; currentState: string; }; /** * Run `ARIACompiler.compile` with the diagnostics sink redirected to a throwaway * buffer (suppressing console noise from dropped-key warnings), then restore the * default sink. Pure from the caller's view. */ declare function compileQuietly(boundary: Boundary.Shape, authored: StateAttrs, currentState: string): ARIACompileResult; /** * Declared capsule for the ARIA compiler. The generated property test feeds * schema-seeds; `run` builds a real Boundary + attribute maps and calls * `ARIACompiler.compile`; the invariants assert the coverage / determinism / * allowed-keys-only LAWS over the REAL compile output. */ export declare const ariaCompileCapsule: import("@czap/core").CapsuleDef<"pureTransform", { readonly entries: readonly (readonly { readonly key: string; readonly value: string; }[])[]; readonly states: readonly string[]; }, unknown, unknown>; /** Internal helpers exported for direct unit assertions over the seed→inputs builder. */ export declare const _ariaCompileInternals: { readonly buildInputs: typeof buildInputs; readonly makeBoundary: typeof makeBoundary; readonly compileQuietly: typeof compileQuietly; }; export {}; //# sourceMappingURL=aria-compile.d.ts.map