import { App } from "../app"; import { Component } from "../component"; import { Ref } from "../data"; import { Content, DOMElementComponent, DOMElementEventListenersInfoRaw } from "../dom"; import { PatchTarget, SelectorNode } from "../patch"; import { ContextFuncs, IntrinsicBaseContext } from "./base"; interface NextData { props: Record; attrs: Record; cls: string; css: string; eventListeners: DOMElementEventListenersInfoRaw[]; } export interface IntrinsicUpdateContext extends IntrinsicBaseContext { $lowlevel: IntrinsicUpdateContext; /** * The current parent DOM element. */ $$currentDOMParent: DOMElementComponent; /** * Components waiting for a `$primaryEl`. * * If the value is `true`, the component is waiting for the first DOM element to be its default `$primaryEl`. */ $$pendingPrimaryElOwner: (DOMElementComponent | Component)[]; /** * Fulfill the pending primary element owners with the given primary element, * and clear the pending primary element owners list. * * @param primaryEl The primary element to fulfill. */ $$fulfillPrimaryEl(primaryEl: DOMElementComponent): void; /** * The `Ref` object of the next component. */ $$nextRef: Ref | null; /** * Fulfill `nextRef` with the given value, * and clear `nextRef`. * * @param current The value to fulfill. */ $$fulfillRef(current: unknown): void; $$pendingPatches: SelectorNode[]; $$fulfillPatches(name: string): PatchTarget[]; /** * The data of the next element or component. */ $$nextData: NextData; /** * Get the data of the next element or component, * and clear the data. */ $$consumeNextData(patches: PatchTarget[]): NextData; /** * Process the content of a DOM element component in `UPDATE` state. * * @param el The DOM element component. * @param content The content of the DOM element component. */ $$updateDOMContent(el: DOMElementComponent, content?: Content): void; } /** * The full context type in `UPDATE` state, with context funcs. */ export type UpdateContext = Readonly> & ContextFuncs; /** * Intialize the context in `UPDATE` state. * * @param app The app instance. */ export declare function initializeUpdateContext(app: App): void; export {}; //# sourceMappingURL=update.d.ts.map