]> BookStack Code Mirror - bookstack/blob - resources/js/wysiwyg/lexical/list/index.ts
Updated translations with latest Crowdin changes (#5695)
[bookstack] / resources / js / wysiwyg / lexical / list / 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 import type {SerializedListItemNode} from './LexicalListItemNode';
10 import type {ListType, SerializedListNode} from './LexicalListNode';
11 import type {LexicalCommand} from 'lexical';
12
13 import {createCommand} from 'lexical';
14
15 import {$handleListInsertParagraph, insertList, removeList} from './formatList';
16 import {
17   $createListItemNode,
18   $isListItemNode,
19   ListItemNode,
20 } from './LexicalListItemNode';
21 import {$createListNode, $isListNode, ListNode} from './LexicalListNode';
22 import {$getListDepth} from './utils';
23
24 export {
25   $createListItemNode,
26   $createListNode,
27   $getListDepth,
28   $handleListInsertParagraph,
29   $isListItemNode,
30   $isListNode,
31   insertList,
32   ListItemNode,
33   ListNode,
34   ListType,
35   removeList,
36   SerializedListItemNode,
37   SerializedListNode,
38 };
39
40 export const INSERT_UNORDERED_LIST_COMMAND: LexicalCommand<void> =
41   createCommand('INSERT_UNORDERED_LIST_COMMAND');
42 export const INSERT_ORDERED_LIST_COMMAND: LexicalCommand<void> = createCommand(
43   'INSERT_ORDERED_LIST_COMMAND',
44 );
45 export const INSERT_CHECK_LIST_COMMAND: LexicalCommand<void> = createCommand(
46   'INSERT_CHECK_LIST_COMMAND',
47 );
48 export const REMOVE_LIST_COMMAND: LexicalCommand<void> = createCommand(
49   'REMOVE_LIST_COMMAND',
50 );