]> BookStack Code Mirror - bookstack/blob - resources/js/wysiwyg/lexical/core/index.ts
Lexical: Fixed code in lists, removed extra old alignment code
[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   NodeSelection,
53   Point,
54   PointType,
55   RangeSelection,
56 } from './LexicalSelection';
57 export type {
58   SerializedElementNode,
59 } from './nodes/LexicalElementNode';
60 export type {SerializedRootNode} from './nodes/LexicalRootNode';
61 export type {
62   SerializedTextNode,
63   TextFormatType,
64   TextModeType,
65 } from './nodes/LexicalTextNode';
66
67 // TODO Move this somewhere else and/or recheck if we still need this
68 export {
69   BLUR_COMMAND,
70   CAN_REDO_COMMAND,
71   CAN_UNDO_COMMAND,
72   CLEAR_EDITOR_COMMAND,
73   CLEAR_HISTORY_COMMAND,
74   CLICK_COMMAND,
75   CONTROLLED_TEXT_INSERTION_COMMAND,
76   COPY_COMMAND,
77   createCommand,
78   CUT_COMMAND,
79   DELETE_CHARACTER_COMMAND,
80   DELETE_LINE_COMMAND,
81   DELETE_WORD_COMMAND,
82   DRAGEND_COMMAND,
83   DRAGOVER_COMMAND,
84   DRAGSTART_COMMAND,
85   DROP_COMMAND,
86   FOCUS_COMMAND,
87   FORMAT_TEXT_COMMAND,
88   INDENT_CONTENT_COMMAND,
89   INSERT_LINE_BREAK_COMMAND,
90   INSERT_PARAGRAPH_COMMAND,
91   INSERT_TAB_COMMAND,
92   KEY_ARROW_DOWN_COMMAND,
93   KEY_ARROW_LEFT_COMMAND,
94   KEY_ARROW_RIGHT_COMMAND,
95   KEY_ARROW_UP_COMMAND,
96   KEY_BACKSPACE_COMMAND,
97   KEY_DELETE_COMMAND,
98   KEY_DOWN_COMMAND,
99   KEY_ENTER_COMMAND,
100   KEY_ESCAPE_COMMAND,
101   KEY_MODIFIER_COMMAND,
102   KEY_SPACE_COMMAND,
103   KEY_TAB_COMMAND,
104   MOVE_TO_END,
105   MOVE_TO_START,
106   OUTDENT_CONTENT_COMMAND,
107   PASTE_COMMAND,
108   REDO_COMMAND,
109   REMOVE_TEXT_COMMAND,
110   SELECT_ALL_COMMAND,
111   SELECTION_CHANGE_COMMAND,
112   SELECTION_INSERT_CLIPBOARD_NODES_COMMAND,
113   UNDO_COMMAND,
114 } from './LexicalCommands';
115 export {
116   IS_ALL_FORMATTING,
117   IS_BOLD,
118   IS_CODE,
119   IS_HIGHLIGHT,
120   IS_ITALIC,
121   IS_STRIKETHROUGH,
122   IS_SUBSCRIPT,
123   IS_SUPERSCRIPT,
124   IS_UNDERLINE,
125   TEXT_TYPE_TO_FORMAT,
126 } from './LexicalConstants';
127 export {
128   COMMAND_PRIORITY_CRITICAL,
129   COMMAND_PRIORITY_EDITOR,
130   COMMAND_PRIORITY_HIGH,
131   COMMAND_PRIORITY_LOW,
132   COMMAND_PRIORITY_NORMAL,
133   createEditor,
134 } from './LexicalEditor';
135 export type {EventHandler} from './LexicalEvents';
136 export {$normalizeSelection as $normalizeSelection__EXPERIMENTAL} from './LexicalNormalization';
137 export {
138   $createNodeSelection,
139   $createPoint,
140   $createRangeSelection,
141   $createRangeSelectionFromDom,
142   $getCharacterOffsets,
143   $getPreviousSelection,
144   $getSelection,
145   $getTextContent,
146   $insertNodes,
147   $isBlockElementNode,
148   $isNodeSelection,
149   $isRangeSelection,
150 } from './LexicalSelection';
151 export {$parseSerializedNode, isCurrentlyReadOnlyMode} from './LexicalUpdates';
152 export {
153   $addUpdateTag,
154   $applyNodeReplacement,
155   $cloneWithProperties,
156   $copyNode,
157   $getAdjacentNode,
158   $getEditor,
159   $getNearestNodeFromDOMNode,
160   $getNearestRootOrShadowRoot,
161   $getNodeByKey,
162   $getNodeByKeyOrThrow,
163   $getRoot,
164   $hasAncestor,
165   $hasUpdateTag,
166   $isInlineElementOrDecoratorNode,
167   $isLeafNode,
168   $isRootOrShadowRoot,
169   $isTokenOrSegmented,
170   $nodesOfType,
171   $selectAll,
172   $setCompositionKey,
173   $setSelection,
174   $splitNode,
175   getEditorPropertyFromDOMNode,
176   getNearestEditorFromDOMNode,
177   isBlockDomNode,
178   isHTMLAnchorElement,
179   isHTMLElement,
180   isInlineDomNode,
181   isLexicalEditor,
182   isSelectionCapturedInDecoratorInput,
183   isSelectionWithinEditor,
184   resetRandomKey,
185 } from './LexicalUtils';
186 export {ArtificialNode__DO_NOT_USE} from './nodes/ArtificialNode';
187 export {$isDecoratorNode, DecoratorNode} from './nodes/LexicalDecoratorNode';
188 export {$isElementNode, ElementNode} from './nodes/LexicalElementNode';
189 export type {SerializedLineBreakNode} from './nodes/LexicalLineBreakNode';
190 export {
191   $createLineBreakNode,
192   $isLineBreakNode,
193   LineBreakNode,
194 } from './nodes/LexicalLineBreakNode';
195 export type {SerializedParagraphNode} from './nodes/LexicalParagraphNode';
196 export {
197   $createParagraphNode,
198   $isParagraphNode,
199   ParagraphNode,
200 } from './nodes/LexicalParagraphNode';
201 export {$isRootNode, RootNode} from './nodes/LexicalRootNode';
202 export type {SerializedTabNode} from './nodes/LexicalTabNode';
203 export {$createTabNode, $isTabNode, TabNode} from './nodes/LexicalTabNode';
204 export {$createTextNode, $isTextNode, TextNode} from './nodes/LexicalTextNode';