export type VNodeChild = VNode | string | null | undefined | false; export type VNode = { type: string; props: Record; children: VNodeChild[]; }; export declare const h: (type: string, props: Record, ...children: VNodeChild[]) => VNode; /** * Called for every rendered element with its VNode. Known element types * arrive NORMALIZED (defaults filled) with any unrecognized ad-hoc keys * preserved; elements of unknown type (the editor's `registerShapeModel` * extensions) arrive verbatim and render as an empty placeholder unless the * hook returns a replacement. Return a replacement VNode — or a raw markup * string, which the serializers emit as-is (master hooks were untyped and * both are supported at runtime) — sync or async; any falsy return keeps * the original. Typed loosely because extension elements flow through — * known types match the schema `Element` union at runtime. */ export type ElementHook = (params: { dom: VNode; element: Record; }) => VNode | string | null | undefined | Promise; export declare const applyElementHook: (elementHook: ElementHook | undefined, dom: VNode, element: Record) => Promise;