]> BookStack Code Mirror - bookstack/blob - resources/js/wysiwyg/lexical/core/index.ts
Lexical: Imported core lexical libs
[bookstack] / resources / js / wysiwyg / lexical / core / index.ts
1 /**
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  *
7  */
8
9 export type {PasteCommandType} from './LexicalCommands';
10 export type {
11   CommandListener,
12   CommandListenerPriority,
13   CommandPayloadType,
14   CreateEditorArgs,
15   EditableListener,
16   EditorConfig,
17   EditorSetOptions,
18   EditorThemeClasses,
19   EditorThemeClassName,
20   EditorUpdateOptions,
21   HTMLConfig,
22   Klass,
23   KlassConstructor,
24   LexicalCommand,
25   LexicalEditor,
26   LexicalNodeReplacement,
27   MutationListener,
28   NodeMutation,
29   SerializedEditor,
30   Spread,
31   Transform,
32 } from './LexicalEditor';
33 export type {
34   EditorState,
35   EditorStateReadOptions,
36   SerializedEditorState,
37 } from './LexicalEditorState';
38 export type {
39   DOMChildConversion,
40   DOMConversion,
41   DOMConversionFn,
42   DOMConversionMap,
43   DOMConversionOutput,
44   DOMExportOutput,
45   LexicalNode,
46   NodeKey,
47   NodeMap,
48   SerializedLexicalNode,
49 } from './LexicalNode';
50 export type {
51   BaseSelection,
52   ElementPointType as ElementPoint,
53   NodeSelection,
54   Point,
55   PointType,
56   RangeSelection,
57   TextPointType as TextPoint,
58 } from './LexicalSelection';
59 export type {
60   ElementFormatType,
61   SerializedElementNode,
62 } from './nodes/LexicalElementNode';
63 export type {SerializedRootNode} from './nodes/LexicalRootNode';
64 export type {
65   SerializedTextNode,
66   TextFormatType,
67   TextModeType,
68 } from './nodes/LexicalTextNode';
69
70 // TODO Move this somewhere else and/or recheck if we still need this
71 export {
72   BLUR_COMMAND,
73   CAN_REDO_COMMAND,
74   CAN_UNDO_COMMAND,
75   CLEAR_EDITOR_COMMAND,
76   CLEAR_HISTORY_COMMAND,
77   CLICK_COMMAND,
78   CONTROLLED_TEXT_INSERTION_COMMAND,
79   COPY_COMMAND,
80   createCommand,
81   CUT_COMMAND,
82   DELETE_CHARACTER_COMMAND,
83   DELETE_LINE_COMMAND,
84   DELETE_WORD_COMMAND,
85   DRAGEND_COMMAND,
86   DRAGOVER_COMMAND,
87   DRAGSTART_COMMAND,
88   DROP_COMMAND,
89   FOCUS_COMMAND,
90   FORMAT_ELEMENT_COMMAND,
91   FORMAT_TEXT_COMMAND,
92   INDENT_CONTENT_COMMAND,
93   INSERT_LINE_BREAK_COMMAND,
94   INSERT_PARAGRAPH_COMMAND,
95   INSERT_TAB_COMMAND,
96   KEY_ARROW_DOWN_COMMAND,
97   KEY_ARROW_LEFT_COMMAND,
98   KEY_ARROW_RIGHT_COMMAND,
99   KEY_ARROW_UP_COMMAND,
100   KEY_BACKSPACE_COMMAND,
101   KEY_DELETE_COMMAND,
102   KEY_DOWN_COMMAND,
103   KEY_ENTER_COMMAND,
104   KEY_ESCAPE_COMMAND,
105   KEY_MODIFIER_COMMAND,
106   KEY_SPACE_COMMAND,
107   KEY_TAB_COMMAND,
108   MOVE_TO_END,
109   MOVE_TO_START,
110   OUTDENT_CONTENT_COMMAND,
111   PASTE_COMMAND,
112   REDO_COMMAND,
113   REMOVE_TEXT_COMMAND,
114   SELECT_ALL_COMMAND,
115   SELECTION_CHANGE_COMMAND,
116   SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,
117   UNDO_COMMAND,
118 } from './LexicalCommands';
119 export {
120   IS_ALL_FORMATTING,
121   IS_BOLD,
122   IS_CODE,
123   IS_HIGHLIGHT,
124   IS_ITALIC,
125   IS_STRIKETHROUGH,
126   IS_SUBSCRIPT,
127   IS_SUPERSCRIPT,
128   IS_UNDERLINE,
129   TEXT_TYPE_TO_FORMAT,
130 } from './LexicalConstants';
131 export {
132   COMMAND_PRIORITY_CRITICAL,
133   COMMAND_PRIORITY_EDITOR,
134   COMMAND_PRIORITY_HIGH,
135   COMMAND_PRIORITY_LOW,
136   COMMAND_PRIORITY_NORMAL,
137   createEditor,
138 } from './LexicalEditor';
139 export type {EventHandler} from './LexicalEvents';
140 export {$normalizeSelection as $normalizeSelection__EXPERIMENTAL} from './LexicalNormalization';
141 export {
142   $createNodeSelection,
143   $createPoint,
144   $createRangeSelection,
145   $createRangeSelectionFromDom,
146   $getCharacterOffsets,
147   $getPreviousSelection,
148   $getSelection,
149   $getTextContent,
150   $insertNodes,
151   $isBlockElementNode,
152   $isNodeSelection,
153   $isRangeSelection,
154 } from './LexicalSelection';
155 export {$parseSerializedNode, isCurrentlyReadOnlyMode} from './LexicalUpdates';
156 export {
157   $addUpdateTag,
158   $applyNodeReplacement,
159   $cloneWithProperties,
160   $copyNode,
161   $getAdjacentNode,
162   $getEditor,
163   $getNearestNodeFromDOMNode,
164   $getNearestRootOrShadowRoot,
165   $getNodeByKey,
166   $getNodeByKeyOrThrow,
167   $getRoot,
168   $hasAncestor,
169   $hasUpdateTag,
170   $isInlineElementOrDecoratorNode,
171   $isLeafNode,
172   $isRootOrShadowRoot,
173   $isTokenOrSegmented,
174   $nodesOfType,
175   $selectAll,
176   $setCompositionKey,
177   $setSelection,
178   $splitNode,
179   getEditorPropertyFromDOMNode,
180   getNearestEditorFromDOMNode,
181   isBlockDomNode,
182   isHTMLAnchorElement,
183   isHTMLElement,
184   isInlineDomNode,
185   isLexicalEditor,
186   isSelectionCapturedInDecoratorInput,
187   isSelectionWithinEditor,
188   resetRandomKey,
189 } from './LexicalUtils';
190 export {ArtificialNode__DO_NOT_USE} from './nodes/ArtificialNode';
191 export {$isDecoratorNode, DecoratorNode} from './nodes/LexicalDecoratorNode';
192 export {$isElementNode, ElementNode} from './nodes/LexicalElementNode';
193 export type {SerializedLineBreakNode} from './nodes/LexicalLineBreakNode';
194 export {
195   $createLineBreakNode,
196   $isLineBreakNode,
197   LineBreakNode,
198 } from './nodes/LexicalLineBreakNode';
199 export type {SerializedParagraphNode} from './nodes/LexicalParagraphNode';
200 export {
201   $createParagraphNode,
202   $isParagraphNode,
203   ParagraphNode,
204 } from './nodes/LexicalParagraphNode';
205 export {$isRootNode, RootNode} from './nodes/LexicalRootNode';
206 export type {SerializedTabNode} from './nodes/LexicalTabNode';
207 export {$createTabNode, $isTabNode, TabNode} from './nodes/LexicalTabNode';
208 export {$createTextNode, $isTextNode, TextNode} from './nodes/LexicalTextNode';