/** * In-place image patching for the editor's incremental reconcile. * * When a block's fresh render differs from its live DOM node only in the attributes * of `` elements — a host replacing an image's media through the session, most * visibly the arcade's Doom cartridge writing a new framebuffer PNG every frame — * the reconciler must NOT swap the node. Firefox and WebKit paint a freshly inserted * `` as an empty box until its (data-URI) source is decoded, so a per-frame swap * strobes white between frames. Changing `src` on the element that is already on * screen keeps the previous bitmap visible until the new one is ready, in every * engine. * * Both functions are deliberately self-contained (no module-level state, no imports) * so a browser test can inject them into a page with `Function.prototype.toString`. */ /** Attributes the editor stamps on live blocks after rendering; a fresh render never * carries them, so they are not a difference. Mirrors `DocxEditor.wireBlock`. Each * function repeats the list inline rather than defaulting to this constant so that * its source, injected into a page on its own, has no free variable. */ export declare const EDITOR_OWNED_ATTRIBUTES: readonly string[]; /** * The `[live, fresh]` `` pairs when `live` and `fresh` are the same tree apart * from `` attributes; `null` when anything else differs (tag, text, any other * attribute, child count), in which case the caller must swap nodes as before. * * Editor-owned attributes on the live side are ignored, as is the list-marker * separator element the editor injects into list blocks. Everything else must match * exactly — the patch is only ever taken when it is provably equivalent to a swap. */ export declare function imageOnlyDelta(live: Element, fresh: Element, ignoredAttributes?: readonly string[]): Array<[HTMLImageElement, HTMLImageElement]> | null; /** * Make `live` carry exactly `fresh`'s attributes, touching only what changed and * keeping the editor-owned stamps. `src` is set last, after any new dimensions, so * the box is already the right size when the new source starts loading. An unchanged * `src` is left alone — re-setting it would restart the load for nothing. */ export declare function patchImageAttributes(live: HTMLImageElement, fresh: HTMLImageElement, ignoredAttributes?: readonly string[]): void; //# sourceMappingURL=editor-image-patch.d.ts.map