/** * The override layer: values the panel set on a component's reactive * properties, kept apart from the element's intrinsic value (what the element * and the app last set: field defaults, attribute conversion, parent * bindings), like a declaration toggled in the browser's Styles pane. * * An overridden property gets an own accessor on the instance. App writes * land in the intrinsic value and leave an enabled override in place; the * effective value (the override when it applies, else the intrinsic one) is * forwarded to the property's own storage, so rendering, `hasChanged` and * reflection carry on as before. Removing the last override on a property * takes the accessor away and hands the intrinsic value back. * * A `#private` field is overridden the same way, named by its key (the * description of the symbol the dev server's rewrite keys it by, see * `private-fields.ts`): the class reads and writes it as `this[symbol]`, so * the accessor sits in its path just as it does in a property's. * * Mechanics only: what may be overridden, and with what, is for the caller * (`setProp` in `collect.ts`) to decide. */ /** One override in the page, for the panel's list. */ export interface OverrideRecord { el: Element; name: string; value: unknown; enabled: boolean; persist: boolean; } /** An override as the details of its element describe it. */ export interface OverrideState { value: unknown; enabled: boolean; persist: boolean; intrinsic: unknown; } /** * Hear of each app write to an overridden property. Such a write changes no * rendered value while the override is in effect, so nothing else says so. * One listener: a later call replaces it. */ export declare const onIntrinsicWrite: (listener: (el: Element) => void) => void; /** * Override `name` on `el` with `value` and turn the override on, taking the * property over on its first one. False when the property cannot be taken * over (see {@link backingOf}), or the takeover threw. */ export declare const setOverride: (el: Element, name: string, value: unknown) => boolean; /** Turn an existing override on or off, leaving it in the layer. */ export declare const toggleOverride: (el: Element, name: string, enabled: boolean) => boolean; /** Mark an existing override to be kept across reloads, or not. */ export declare const persistOverride: (el: Element, name: string, persist: boolean) => boolean; /** * Drop the override on `name`, hand the element its intrinsic value, and give * the property back once nothing overrides it. */ export declare const removeOverride: (el: Element, name: string) => boolean; /** The override on `name`, if there is one. */ export declare const overrideOf: (el: Element, name: string) => OverrideState | undefined; /** Every override in the page, element by element, oldest first. */ export declare const listOverrides: () => OverrideRecord[]; /** Whether overrides apply at all: the panel's global switch. */ export declare const overridesApplied: () => boolean; /** * Apply or suspend every override at once. Each keeps its own on/off, so * turning the switch back on restores exactly the ones that were on. */ export declare const applyOverrides: (on: boolean) => void; /** Remove every override in the page. */ export declare const clearOverrides: () => void; //# sourceMappingURL=prop-overrides.d.ts.map