/** * 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 { EditorThemeClasses, Klass, LexicalCommand, LexicalEditor, LexicalNode } from 'lexical'; import * as React from 'react'; export declare type InsertTableCommandPayload = Readonly<{ columns: string; rows: string; includeHeaders?: boolean; }>; export declare type CellContextShape = { cellEditorConfig: null | CellEditorConfig; cellEditorPlugins: null | JSX.Element | Array; set: (cellEditorConfig: null | CellEditorConfig, cellEditorPlugins: null | JSX.Element | Array) => void; }; export declare type CellEditorConfig = Readonly<{ namespace: string; nodes?: ReadonlyArray>; onError: (error: Error, editor: LexicalEditor) => void; readOnly?: boolean; theme?: EditorThemeClasses; }>; export declare const INSERT_NEW_TABLE_COMMAND: LexicalCommand; export declare const CellContext: React.Context; export declare function TableContext({ children }: { children: JSX.Element; }): JSX.Element; export declare function InsertTableDialog({ activeEditor, onClose, }: { activeEditor: LexicalEditor; onClose: () => void; }): JSX.Element; export declare function InsertNewTableDialog({ activeEditor, onClose, }: { activeEditor: LexicalEditor; onClose: () => void; }): JSX.Element; export declare function TablePlugin({ cellEditorConfig, children, }: { cellEditorConfig: CellEditorConfig; children: JSX.Element | Array; }): JSX.Element | null;