From df2448690482349e0afdd26f5595f6cb9193b424 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 25 Nov 2024 13:43:32 +0100 Subject: [PATCH] Update Lexical.js.flow Missing variables and functions in Flow file. --- packages/lexical/flow/Lexical.js.flow | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/lexical/flow/Lexical.js.flow b/packages/lexical/flow/Lexical.js.flow index dccc5987079..ab92b27deed 100644 --- a/packages/lexical/flow/Lexical.js.flow +++ b/packages/lexical/flow/Lexical.js.flow @@ -256,6 +256,7 @@ export type EditorThemeClasses = { ulDepth?: Array, ol?: EditorThemeClassName, olDepth?: Array, + checklist?: EditorThemeClassName, listitem?: EditorThemeClassName, listitemChecked?: EditorThemeClassName, listitemUnchecked?: EditorThemeClassName, @@ -446,13 +447,17 @@ declare export function $isBlockElementNode( ): node is ElementNode; export interface BaseSelection { - clone(): BaseSelection; + _cachedNodes: Array | null; dirty: boolean; + clone(): BaseSelection; extract(): Array; getNodes(): Array; + getStartEndPoints(): null | [PointType, PointType]; getTextContent(): string; insertRawText(text: string): void; is(selection: null | BaseSelection): boolean; + isBackward(): boolean; + isCollapsed(): boolean; insertText(text: string): void; insertNodes(nodes: Array): void; getCachedNodes(): null | Array; @@ -528,6 +533,7 @@ declare export class RangeSelection implements BaseSelection { } export type TextPoint = TextPointType; type TextPointType = { + _selection: BaseSelection, key: NodeKey, offset: number, type: 'text', @@ -539,6 +545,7 @@ type TextPointType = { }; export type ElementPoint = ElementPointType; type ElementPointType = { + _selection: BaseSelection, key: NodeKey, offset: number, type: 'element',