@ckeditor/ckeditor5-list 48.2.0 → 48.3.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/augmentation.d.ts +54 -54
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +67 -67
- package/dist/index.js +7187 -8921
- package/dist/index.js.map +1 -1
- package/dist/legacyerrors.d.ts +0 -4
- package/dist/legacylist/legacyconverters.d.ts +184 -184
- package/dist/legacylist/legacyindentcommand.d.ts +33 -33
- package/dist/legacylist/legacylistcommand.d.ts +52 -52
- package/dist/legacylist/legacylistediting.d.ts +32 -32
- package/dist/legacylist/legacylistutils.d.ts +40 -40
- package/dist/legacylist/legacyutils.d.ts +91 -91
- package/dist/legacylist.d.ts +25 -25
- package/dist/legacylistproperties/legacylistpropertiesediting.d.ts +71 -71
- package/dist/legacylistproperties/legacylistreversedcommand.d.ts +33 -33
- package/dist/legacylistproperties/legacyliststartcommand.d.ts +33 -33
- package/dist/legacylistproperties/legacyliststylecommand.d.ts +63 -63
- package/dist/legacylistproperties.d.ts +26 -26
- package/dist/legacytodolist/legacychecktodolistcommand.d.ts +47 -47
- package/dist/legacytodolist/legacytodolistconverters.d.ts +76 -76
- package/dist/legacytodolist/legacytodolistediting.d.ts +46 -46
- package/dist/legacytodolist.d.ts +26 -26
- package/dist/list/adjacentlistssupport.d.ts +16 -16
- package/dist/list/converters.d.ts +68 -68
- package/dist/list/listcommand.d.ts +84 -84
- package/dist/list/listediting.d.ts +213 -219
- package/dist/list/listindentcommand.d.ts +54 -54
- package/dist/list/listmergecommand.d.ts +68 -68
- package/dist/list/listsplitcommand.d.ts +59 -59
- package/dist/list/listui.d.ts +19 -19
- package/dist/list/listutils.d.ts +55 -55
- package/dist/list/utils/listwalker.d.ts +139 -139
- package/dist/list/utils/model.d.ts +202 -202
- package/dist/list/utils/postfixers.d.ts +30 -30
- package/dist/list/utils/view.d.ts +65 -65
- package/dist/list/utils.d.ts +15 -15
- package/dist/list.d.ts +25 -25
- package/dist/listconfig.d.ts +234 -234
- package/dist/listformatting/listitemboldintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontcolorintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontfamilyintegration.d.ts +29 -29
- package/dist/listformatting/listitemfontsizeintegration.d.ts +29 -29
- package/dist/listformatting/listitemitalicintegration.d.ts +29 -29
- package/dist/listformatting.d.ts +66 -66
- package/dist/listproperties/converters.d.ts +15 -15
- package/dist/listproperties/listpropertiesediting.d.ts +91 -91
- package/dist/listproperties/listpropertiesui.d.ts +22 -22
- package/dist/listproperties/listpropertiesutils.d.ts +32 -32
- package/dist/listproperties/listreversedcommand.d.ts +31 -31
- package/dist/listproperties/liststartcommand.d.ts +34 -34
- package/dist/listproperties/liststylecommand.d.ts +67 -67
- package/dist/listproperties/ui/listpropertiesview.d.ts +147 -147
- package/dist/listproperties/utils/config.d.ts +32 -32
- package/dist/listproperties/utils/style.d.ts +31 -31
- package/dist/listproperties.d.ts +26 -26
- package/dist/todolist/checktodolistcommand.d.ts +44 -44
- package/dist/todolist/todocheckboxchangeobserver.d.ts +36 -36
- package/dist/todolist/todolistediting.d.ts +45 -45
- package/dist/todolist/todolistui.d.ts +19 -19
- package/dist/todolist.d.ts +26 -26
- package/package.json +10 -10
|
@@ -1,76 +1,76 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { Command, type Editor } from
|
|
9
|
-
import type { ModelElement } from
|
|
6
|
+
* @module list/list/listmergecommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
9
|
+
import type { ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
* The document list merge command. It is used by the {@link module:list/list~List list feature}.
|
|
12
|
+
*/
|
|
13
13
|
export declare class ListMergeCommand extends Command {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Whether list item should be merged before or after the selected block.
|
|
16
|
+
*/
|
|
17
|
+
private readonly _direction;
|
|
18
|
+
/**
|
|
19
|
+
* Creates an instance of the command.
|
|
20
|
+
*
|
|
21
|
+
* @param editor The editor instance.
|
|
22
|
+
* @param direction Whether list item should be merged before or after the selected block.
|
|
23
|
+
*/
|
|
24
|
+
constructor(editor: Editor, direction: "forward" | "backward");
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
override refresh(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Merges list blocks together (depending on the {@link #constructor}'s `direction` parameter).
|
|
31
|
+
*
|
|
32
|
+
* @fires execute
|
|
33
|
+
* @fires afterExecute
|
|
34
|
+
* @param options Command options.
|
|
35
|
+
* @param options.shouldMergeOnBlocksContentLevel When set `true`, merging will be performed together
|
|
36
|
+
* with {@link module:engine/model/model~Model#deleteContent} to get rid of the inline content in the selection or take advantage
|
|
37
|
+
* of the heuristics in `deleteContent()` that helps convert lists into paragraphs in certain cases.
|
|
38
|
+
*/
|
|
39
|
+
override execute({ shouldMergeOnBlocksContentLevel }?: {
|
|
40
|
+
shouldMergeOnBlocksContentLevel?: boolean;
|
|
41
|
+
}): void;
|
|
42
|
+
/**
|
|
43
|
+
* Fires the `afterExecute` event.
|
|
44
|
+
*
|
|
45
|
+
* @param changedBlocks The changed list elements.
|
|
46
|
+
*/
|
|
47
|
+
private _fireAfterExecute;
|
|
48
|
+
/**
|
|
49
|
+
* Checks whether the command can be enabled in the current context.
|
|
50
|
+
*
|
|
51
|
+
* @returns Whether the command should be enabled.
|
|
52
|
+
*/
|
|
53
|
+
private _checkEnabled;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the boundary elements the merge should be executed for. These are not necessarily selection's first
|
|
56
|
+
* and last position parents but sometimes sibling or even further blocks depending on the context.
|
|
57
|
+
*
|
|
58
|
+
* @param selection The selection the merge is executed for.
|
|
59
|
+
* @param shouldMergeOnBlocksContentLevel When `true`, merge is performed together with
|
|
60
|
+
* {@link module:engine/model/model~Model#deleteContent} to remove the inline content within the selection.
|
|
61
|
+
*/
|
|
62
|
+
private _getMergeSubjectElements;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
* Event fired by the {@link ~ListMergeCommand#execute} method.
|
|
66
|
+
*
|
|
67
|
+
* It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}
|
|
68
|
+
* method, for example adjusting attributes of changed list items.
|
|
69
|
+
*
|
|
70
|
+
* @internal
|
|
71
|
+
* @eventName ~ListMergeCommand#afterExecute
|
|
72
|
+
*/
|
|
73
73
|
export type ListMergeCommandAfterExecuteEvent = {
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
name: "afterExecute";
|
|
75
|
+
args: [changedBlocks: Array<ModelElement>];
|
|
76
76
|
};
|
|
@@ -1,67 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ModelElement } from
|
|
9
|
-
import { Command, type Editor } from
|
|
6
|
+
* @module list/list/listsplitcommand
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
* The document list split command that splits the list item at the selection.
|
|
12
|
+
*
|
|
13
|
+
* It is used by the {@link module:list/list~List list feature}.
|
|
14
|
+
*/
|
|
15
15
|
export declare class ListSplitCommand extends Command {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Whether list item should be split before or after the selected block.
|
|
18
|
+
*/
|
|
19
|
+
private readonly _direction;
|
|
20
|
+
/**
|
|
21
|
+
* Creates an instance of the command.
|
|
22
|
+
*
|
|
23
|
+
* @param editor The editor instance.
|
|
24
|
+
* @param direction Whether list item should be split before or after the selected block.
|
|
25
|
+
*/
|
|
26
|
+
constructor(editor: Editor, direction: "before" | "after");
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
override refresh(): void;
|
|
31
|
+
/**
|
|
32
|
+
* Splits the list item at the selection.
|
|
33
|
+
*
|
|
34
|
+
* @fires execute
|
|
35
|
+
* @fires afterExecute
|
|
36
|
+
*/
|
|
37
|
+
override execute(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Fires the `afterExecute` event.
|
|
40
|
+
*
|
|
41
|
+
* @param changedBlocks The changed list elements.
|
|
42
|
+
*/
|
|
43
|
+
private _fireAfterExecute;
|
|
44
|
+
/**
|
|
45
|
+
* Checks whether the command can be enabled in the current context.
|
|
46
|
+
*
|
|
47
|
+
* @returns Whether the command should be enabled.
|
|
48
|
+
*/
|
|
49
|
+
private _checkEnabled;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the model element that is the main focus of the command (according to the current selection and command direction).
|
|
52
|
+
*/
|
|
53
|
+
private _getStartBlock;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
56
|
+
* Event fired by the {@link ~ListSplitCommand#execute} method.
|
|
57
|
+
*
|
|
58
|
+
* It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}
|
|
59
|
+
* method, for example adjusting attributes of changed list items.
|
|
60
|
+
*
|
|
61
|
+
* @internal
|
|
62
|
+
* @eventName ~ListSplitCommand#afterExecute
|
|
63
|
+
*/
|
|
64
64
|
export type ListSplitCommandAfterExecuteEvent = {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
name: "afterExecute";
|
|
66
|
+
args: [changedBlocks: Array<ModelElement>];
|
|
67
67
|
};
|
package/dist/list/listui.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Plugin } from
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin } from "@ckeditor/ckeditor5-core";
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
* The list UI feature. It introduces the `'numberedList'` and `'bulletedList'` buttons that
|
|
8
|
+
* allow to convert paragraphs to and from list items and indent or outdent them.
|
|
9
|
+
*/
|
|
10
10
|
export declare class ListUI extends Plugin {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
static get pluginName(): "ListUI";
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
static override get isOfficialPlugin(): true;
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
init(): void;
|
|
23
23
|
}
|
package/dist/list/listutils.d.ts
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
|
+
*/
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ModelElement, ModelNode } from
|
|
9
|
-
import type { ArrayOrItem } from
|
|
10
|
-
import { Plugin } from
|
|
11
|
-
import { type ListElement } from
|
|
12
|
-
import type { ListType } from
|
|
6
|
+
* @module list/list/listutils
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement, ModelNode } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import type { ArrayOrItem } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import { Plugin } from "@ckeditor/ckeditor5-core";
|
|
11
|
+
import { type ListElement } from "./utils/model.js";
|
|
12
|
+
import type { ListType } from "./listediting.js";
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* A set of helpers related to document lists.
|
|
15
|
+
*/
|
|
16
16
|
export declare class ListUtils extends Plugin {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
17
|
+
/**
|
|
18
|
+
* @inheritDoc
|
|
19
|
+
*/
|
|
20
|
+
static get pluginName(): "ListUtils";
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static override get isOfficialPlugin(): true;
|
|
25
|
+
/**
|
|
26
|
+
* Expands the given list of selected blocks to include all the items of the lists they're in.
|
|
27
|
+
*
|
|
28
|
+
* @param blocks The list of selected blocks.
|
|
29
|
+
*/
|
|
30
|
+
expandListBlocksToCompleteList(blocks: ArrayOrItem<ModelElement>): Array<ModelElement>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if the given block is the first in the list item.
|
|
33
|
+
*
|
|
34
|
+
* @param listBlock The list block element.
|
|
35
|
+
*/
|
|
36
|
+
isFirstBlockOfListItem(listBlock: ModelElement): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Returns true if the given model node is a list item block.
|
|
39
|
+
*
|
|
40
|
+
* @param node A model node.
|
|
41
|
+
*/
|
|
42
|
+
isListItemBlock(node: ModelNode | null): node is ListElement;
|
|
43
|
+
/**
|
|
44
|
+
* Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.
|
|
45
|
+
*
|
|
46
|
+
* @param blocks The list of selected blocks.
|
|
47
|
+
* @param options.withNested Whether should include nested list items.
|
|
48
|
+
*/
|
|
49
|
+
expandListBlocksToCompleteItems(blocks: ArrayOrItem<ModelElement>, options?: {
|
|
50
|
+
withNested?: boolean;
|
|
51
|
+
}): Array<ModelElement>;
|
|
52
|
+
/**
|
|
53
|
+
* Returns true if listType is of type `numbered` or `customNumbered`.
|
|
54
|
+
*/
|
|
55
|
+
isNumberedListType(listType: ListType): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the given list item is the first item in the list.
|
|
58
|
+
*/
|
|
59
|
+
isFirstListItemInList(listItem: ModelElement): boolean;
|
|
60
60
|
}
|