/** * Build a component's light-DOM children from a data property. * * Compound families in this system are composed by hand: a table is a table * wrapping a header wrapping a row wrapping cells, five levels deep, and * `docs/kb/01-components.md` warns that skipping a level renders but is subtly * wrong. That is a lot of ceremony for "here are my columns and rows", and it is * the single most error-prone thing an agent generates. * * So the flattened props build that composition for you. They build it in the * **light DOM**, not the shadow root, and that is the whole trick: the result is * byte-for-byte the DOM you would have written by hand, so every existing * `::slotted()` rule, every behaviour, and every consumer keeps working. The * flattened API is sugar, never a second rendering path. * * Elements this creates are marked, and only marked elements are ever touched — * hand-written children are left exactly where they are. */ /** Marks an element as owned by a data property rather than by the author. */ export declare const GENERATED_ATTR = "data-cre8-generated"; export interface ChildSpec { tag: string; /** Set as properties when the value is not a string, as attributes otherwise. */ props?: Record; /** Text content. Mutually exclusive with `children`. */ text?: string; /** `slot` attribute to place this child in a named slot of its parent. */ slot?: string; children?: ChildSpec[]; } /** * Make `host`'s generated light children match `specs`. * * Passing `null` removes them, which is how clearing a data property hands the * component back to hand-written children. */ export declare function syncLightChildren(host: HTMLElement, specs: ChildSpec[] | null | undefined): void; /** True when the author has put their own children in — data props defer to none. */ export declare function hasAuthoredChildren(host: HTMLElement): boolean; //# sourceMappingURL=light-children.d.ts.map