/** * Reads how an element composes its content: its render root, the slots in * it, the light children no slot takes, and the elements it exposes to * `::part()`. Passive: it reads slot assignments and never moves a node. * * The overlay ({@link ./anatomy-overlay.ts}) draws the same slots and parts * on the page, so the node lists it measures come from here too. */ import type { InspectorAnatomy } from '../../../types/inspector.js'; /** The element's shadow root, closed or open; `null` for light DOM or none. */ export declare const shadowOf: (el: Element) => ShadowRoot | null; /** The element's own slots, in document order. Nested shadow roots excluded. */ export declare const slotsOf: (el: Element) => HTMLSlotElement[]; /** One name a `::part()` selector can reach on the element. */ export interface PartEntry { /** The names this element answers to; one name for a forwarded part. */ names: string[]; element: Element; /** Set when a nested component forwards the part with `exportparts`. */ forwarded?: { host: Element; inner?: string; }; } /** * The element's own `part` elements, then the parts its nested components * forward through `exportparts`. Nested shadow roots are otherwise excluded. */ export declare const partsOf: (el: Element) => PartEntry[]; /** * What a slot puts on the page: its assigned nodes flattened through * forwarded slots, or its fallback content when nothing is assigned. */ export declare const renderedNodesOf: (slot: HTMLSlotElement) => Node[]; /** Snapshot an element's anatomy, or `undefined` when it has no render root. */ export declare const collectAnatomy: (el: Element) => InspectorAnatomy | undefined; //# sourceMappingURL=anatomy.d.ts.map