/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import type { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedElementNode, Spread } from 'lexical'; import { ElementNode } from 'lexical'; export declare function setDefaultHeader(val: string): void; export declare function setDefaultFooter(val: string): void; export declare function getHeight(node: LayoutItemNode): number | null; export declare function getSelectedPage(): LayoutItemNode | null; export declare function getLastPage(): LayoutItemNode | null; export declare function getAllLayoutItemNodes(): LayoutItemNode[]; export type SerializedLayoutItemNode = Spread<{ id: string; className: string; headerText: string; footerText: string; }, SerializedElementNode>; export declare class LayoutItemNode extends ElementNode { __className: string; __id: string; __headerText: string; __footerText: string; static getType(): string; setClassName(className: string): this; getClassName(): string | undefined; removeClassName(className: string): this; setHeaderText(text: string): this; getHeaderText(): string; getFooterText(): string; setFooterText(text: string): this; static clone(node: LayoutItemNode): LayoutItemNode; constructor(className: string, id?: string, headerText?: string, footerText?: string, key?: NodeKey); getId(): string; prepend(node: LexicalNode): this; createDOM(config: EditorConfig): HTMLElement; updateDOM(prevNode: LayoutItemNode, dom: HTMLElement): boolean; static importDOM(): DOMConversionMap | null; static importJSON(SerializedLayoutItemNode: SerializedLayoutItemNode): LayoutItemNode; isShadowRoot(): boolean; exportJSON(): SerializedLayoutItemNode; exportDOM(): DOMExportOutput; } export declare function $createLayoutItemNode(className: string): LayoutItemNode; export declare function $isLayoutItemNode(node: LexicalNode | null | undefined): node is LayoutItemNode;