@ckeditor/ckeditor5-list 48.2.0 → 48.3.0-alpha.0

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.
Files changed (61) hide show
  1. package/dist/augmentation.d.ts +54 -54
  2. package/dist/index.css.map +1 -1
  3. package/dist/index.d.ts +67 -67
  4. package/dist/index.js +7187 -8921
  5. package/dist/index.js.map +1 -1
  6. package/dist/legacyerrors.d.ts +0 -4
  7. package/dist/legacylist/legacyconverters.d.ts +184 -184
  8. package/dist/legacylist/legacyindentcommand.d.ts +33 -33
  9. package/dist/legacylist/legacylistcommand.d.ts +52 -52
  10. package/dist/legacylist/legacylistediting.d.ts +32 -32
  11. package/dist/legacylist/legacylistutils.d.ts +40 -40
  12. package/dist/legacylist/legacyutils.d.ts +91 -91
  13. package/dist/legacylist.d.ts +25 -25
  14. package/dist/legacylistproperties/legacylistpropertiesediting.d.ts +71 -71
  15. package/dist/legacylistproperties/legacylistreversedcommand.d.ts +33 -33
  16. package/dist/legacylistproperties/legacyliststartcommand.d.ts +33 -33
  17. package/dist/legacylistproperties/legacyliststylecommand.d.ts +63 -63
  18. package/dist/legacylistproperties.d.ts +26 -26
  19. package/dist/legacytodolist/legacychecktodolistcommand.d.ts +47 -47
  20. package/dist/legacytodolist/legacytodolistconverters.d.ts +76 -76
  21. package/dist/legacytodolist/legacytodolistediting.d.ts +46 -46
  22. package/dist/legacytodolist.d.ts +26 -26
  23. package/dist/list/adjacentlistssupport.d.ts +16 -16
  24. package/dist/list/converters.d.ts +68 -68
  25. package/dist/list/listcommand.d.ts +84 -84
  26. package/dist/list/listediting.d.ts +213 -219
  27. package/dist/list/listindentcommand.d.ts +54 -54
  28. package/dist/list/listmergecommand.d.ts +68 -68
  29. package/dist/list/listsplitcommand.d.ts +59 -59
  30. package/dist/list/listui.d.ts +19 -19
  31. package/dist/list/listutils.d.ts +55 -55
  32. package/dist/list/utils/listwalker.d.ts +139 -139
  33. package/dist/list/utils/model.d.ts +202 -202
  34. package/dist/list/utils/postfixers.d.ts +30 -30
  35. package/dist/list/utils/view.d.ts +65 -65
  36. package/dist/list/utils.d.ts +15 -15
  37. package/dist/list.d.ts +25 -25
  38. package/dist/listconfig.d.ts +234 -234
  39. package/dist/listformatting/listitemboldintegration.d.ts +29 -29
  40. package/dist/listformatting/listitemfontcolorintegration.d.ts +29 -29
  41. package/dist/listformatting/listitemfontfamilyintegration.d.ts +29 -29
  42. package/dist/listformatting/listitemfontsizeintegration.d.ts +29 -29
  43. package/dist/listformatting/listitemitalicintegration.d.ts +29 -29
  44. package/dist/listformatting.d.ts +66 -66
  45. package/dist/listproperties/converters.d.ts +15 -15
  46. package/dist/listproperties/listpropertiesediting.d.ts +91 -91
  47. package/dist/listproperties/listpropertiesui.d.ts +22 -22
  48. package/dist/listproperties/listpropertiesutils.d.ts +32 -32
  49. package/dist/listproperties/listreversedcommand.d.ts +31 -31
  50. package/dist/listproperties/liststartcommand.d.ts +34 -34
  51. package/dist/listproperties/liststylecommand.d.ts +67 -67
  52. package/dist/listproperties/ui/listpropertiesview.d.ts +147 -147
  53. package/dist/listproperties/utils/config.d.ts +32 -32
  54. package/dist/listproperties/utils/style.d.ts +31 -31
  55. package/dist/listproperties.d.ts +26 -26
  56. package/dist/todolist/checktodolistcommand.d.ts +44 -44
  57. package/dist/todolist/todocheckboxchangeobserver.d.ts +36 -36
  58. package/dist/todolist/todolistediting.d.ts +45 -45
  59. package/dist/todolist/todolistui.d.ts +19 -19
  60. package/dist/todolist.d.ts +26 -26
  61. package/package.json +10 -10
@@ -1,76 +1,76 @@
1
1
  /**
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
- */
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
- * @module list/list/listmergecommand
7
- */
8
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
- import type { ModelElement } from '@ckeditor/ckeditor5-engine';
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
- * The document list merge command. It is used by the {@link module:list/list~List list feature}.
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
- * 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
- 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
- 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;
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
- * 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
- */
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
- name: 'afterExecute';
75
- args: [changedBlocks: Array<ModelElement>];
74
+ name: "afterExecute";
75
+ args: [changedBlocks: Array<ModelElement>];
76
76
  };
@@ -1,67 +1,67 @@
1
1
  /**
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
- */
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
- * @module list/list/listsplitcommand
7
- */
8
- import type { ModelElement } from '@ckeditor/ckeditor5-engine';
9
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
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
- * 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
- */
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
- * 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
- refresh(): void;
31
- /**
32
- * Splits the list item at the selection.
33
- *
34
- * @fires execute
35
- * @fires afterExecute
36
- */
37
- 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;
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
- * 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
- */
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
- name: 'afterExecute';
66
- args: [changedBlocks: Array<ModelElement>];
65
+ name: "afterExecute";
66
+ args: [changedBlocks: Array<ModelElement>];
67
67
  };
@@ -1,23 +1,23 @@
1
1
  /**
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';
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
- * 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
- */
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
- * @inheritDoc
13
- */
14
- static get pluginName(): "ListUI";
15
- /**
16
- * @inheritDoc
17
- */
18
- static get isOfficialPlugin(): true;
19
- /**
20
- * @inheritDoc
21
- */
22
- init(): void;
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
  }
@@ -1,60 +1,60 @@
1
1
  /**
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
- */
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
- * @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';
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
- * A set of helpers related to document lists.
15
- */
14
+ * A set of helpers related to document lists.
15
+ */
16
16
  export declare class ListUtils extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "ListUtils";
21
- /**
22
- * @inheritDoc
23
- */
24
- static 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;
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
  }