/** * Walks the page to build the component render tree and to snapshot a single * element's reactive state for the inspector panel. Runs entirely in the page; * the results are sent over the transport as plain JSON. */ import type { InspectorDetails, InspectorOverrides, InspectorTreeNode, ValueChild, ValuePath, ValueSegment } from '../../../types/inspector.js'; /** * The id of the nearest element the tree lists (see {@link isListed}) at or * above `node`: itself, its ancestors, and past each shadow root to its host. * `undefined` when none encloses it. */ export declare const listedIdOf: (node: unknown) => number | undefined; /** * Build the full component render tree rooted at the document body. * `onUndefined` hears the tag of each element that has no definition yet, so * the caller can rebuild once one is defined. */ export declare const buildTree: (onUndefined?: (tag: string) => void) => InspectorTreeNode[]; /** Snapshot one element's reactive properties, attributes, and flags. */ export declare const collectDetails: (el: Element) => InspectorDetails; /** * The value at `path` on `el`, or undefined when a step no longer resolves * (the value changed shape since the panel saw it). Only declared reactive * properties, listed extras and listed private fields are reachable, so a * path cannot read arbitrary fields. */ export declare const valueAt: (el: Element, path: ValuePath) => { value: unknown; } | undefined; /** * Answer an `expand` command: the children of the value at `path` on `el`, * or null when it no longer resolves (see {@link valueAt}). */ export declare const expandPath: (el: Element, path: ValuePath) => { children: ValueChild[]; more: number; } | null; /** * Answer a `set-prop` command: set `value` on the declared reactive * property `name` on `el`, as an override. Only a declared property whose current value is a * primitive of the same type is written, so a command cannot set arbitrary * fields or change a property's type. With `keys`, the leaf at that path * inside the property's live value is written instead. Returns whether it * was applied. A `name` that is a `#private` field's key writes that field * (see `setPrivateField`), never a leaf inside it. */ export declare const setProp: (el: Element, name: string, value: string | number | boolean, keys?: ValueSegment[]) => boolean; /** * Every override in the page, for an `overrides` message, with the leaf * overrides dropped since the last one. */ export declare const collectOverrides: () => InspectorOverrides; //# sourceMappingURL=collect.d.ts.map