import type { Json } from "../../../core/index.js"; import type { SeedPort } from "../../../core/apps/index.js"; import { type WiringSlot } from "./wiring.js"; /** * THE SPLITTER. One `` component becomes a ported half, a home half, * and a verdict. * * The verdict is `checkComponentScreen` and nothing else — the same gauntlet the * runtime runs when a remix persists, so there is no cheaper pre-filter here on * purpose, and in the same DIALECT ({@link PORTED_SCREEN_DIALECT}), which the * floor derives off the row rather than assembling a second copy of. */ export interface SplitInput { slot: string; /** The component module's source, as captured. */ source: string; /** Its real path, for resolving the imports it writes. */ file: string; root: string; /** Where the wiring file will sit, REALPATHED — the paths it imports are * relative to it, and every module they point at is realpathed too, so a * root behind a symlink must not measure the two ends in different spaces. */ generatedDir: string; /** The host's own declared sample props for this component, when a * registration carries them — what the gauntlet paints a props-dependent * port with. Never invented: absent, the port is graded with none, and one * that paints nothing without props is refused. */ sampleProps?: Record; } export type SplitOutcome = { ok: true; port: SeedPort; wiring: WiringSlot; /** The carver's home module — the slot's unportable half, written beside * the wiring file, which imports this slot's carved holes from it. */ home?: string; } | { ok: false; issues: string[]; }; export declare function splitSlot(input: SplitInput): Promise;