@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
package/dist/legacytodolist.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
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 { LegacyTodoListEditing } from
|
|
9
|
-
import { TodoListUI } from
|
|
10
|
-
import { Plugin } from
|
|
11
|
-
import
|
|
6
|
+
* @module list/legacytodolist
|
|
7
|
+
*/
|
|
8
|
+
import { LegacyTodoListEditing } from "./legacytodolist/legacytodolistediting.js";
|
|
9
|
+
import { TodoListUI } from "./todolist/todolistui.js";
|
|
10
|
+
import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
11
|
+
import "../theme/todolist.css";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
* The legacy to-do list feature.
|
|
14
|
+
*
|
|
15
|
+
* This is a "glue" plugin that loads the {@link module:list/legacytodolist/legacytodolistediting~LegacyTodoListEditing legacy to-do list
|
|
16
|
+
* editing feature} and the {@link module:list/todolist/todolistui~TodoListUI to-do list UI feature}.
|
|
17
|
+
*/
|
|
18
18
|
export declare class LegacyTodoList extends Plugin {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
/**
|
|
20
|
+
* @inheritDoc
|
|
21
|
+
*/
|
|
22
|
+
static get requires(): PluginDependenciesOf<[LegacyTodoListEditing, TodoListUI]>;
|
|
23
|
+
/**
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
static get pluginName(): "LegacyTodoList";
|
|
27
|
+
/**
|
|
28
|
+
* @inheritDoc
|
|
29
|
+
*/
|
|
30
|
+
static override get isOfficialPlugin(): true;
|
|
31
31
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
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
|
export declare class AdjacentListsSupport extends Plugin {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
/**
|
|
8
|
+
* @inheritDoc
|
|
9
|
+
*/
|
|
10
|
+
static get pluginName(): "AdjacentListsSupport";
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
static override get isOfficialPlugin(): true;
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
init(): void;
|
|
19
19
|
}
|
|
@@ -1,88 +1,88 @@
|
|
|
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 DowncastAttributeEvent, type ViewDowncastWriter, type EditingController, type ModelElement, type DowncastElementCreatorFunction, type Mapper, type Model, type UpcastElementEvent, type ViewElement, type DowncastRemoveEvent, type EditingView, type MapperModelToViewPositionEvent, type ModelSchema } from
|
|
9
|
-
import type { GetCallback } from
|
|
10
|
-
import { type ListElement } from
|
|
11
|
-
import type { ListEditing, ListDowncastStrategy } from
|
|
6
|
+
* @module list/list/converters
|
|
7
|
+
*/
|
|
8
|
+
import { type DowncastAttributeEvent, type ViewDowncastWriter, type EditingController, type ModelElement, type DowncastElementCreatorFunction, type Mapper, type Model, type UpcastElementEvent, type ViewElement, type DowncastRemoveEvent, type EditingView, type MapperModelToViewPositionEvent, type ModelSchema } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import type { GetCallback } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import { type ListElement } from "./utils/model.js";
|
|
11
|
+
import type { ListEditing, ListDowncastStrategy } from "./listediting.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
13
|
+
* Returns a consuming upcast converter for skip-level list item wrappers. It detects intermediate `<li>` elements
|
|
14
|
+
* with `list-style-type:none` (generated by the skip-level downcast or by external sources) and consumes them
|
|
15
|
+
* without producing a model element, so they don't end up as empty list items in the model.
|
|
16
|
+
*
|
|
17
|
+
* The wrapper `<li>` is consumed, but its children (nested lists) are converted normally. Because `getIndent()`
|
|
18
|
+
* counts all ancestor `<li>` elements (including the consumed wrapper), nested items receive the correct indent
|
|
19
|
+
* values that reflect the skip-level gap.
|
|
20
|
+
*
|
|
21
|
+
* Only `<li>` elements whose sole meaningful content is a nested `<ul>`/`<ol>` are treated as intermediate wrappers.
|
|
22
|
+
* Anything else (text, paragraphs, custom elements, even an empty `<li>` with `list-style-type:none` carrying only
|
|
23
|
+
* attributes) falls through to the regular list item upcast, so its data and attributes can be preserved by GHS
|
|
24
|
+
* or other plugins.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
28
|
export declare function listItemSkipLevelConsumer(): GetCallback<UpcastElementEvent>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
* Returns the upcast converter for list items. It's supposed to work after the block converters (content inside list items) are converted.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
34
|
export declare function listItemUpcastConverter(): GetCallback<UpcastElementEvent>;
|
|
35
35
|
/**
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
* Returns a model document change:data event listener that triggers conversion of related items if needed.
|
|
37
|
+
*
|
|
38
|
+
* @internal
|
|
39
|
+
* @param model The editor model.
|
|
40
|
+
* @param editing The editing controller.
|
|
41
|
+
* @param attributeNames The list of all model list attributes (including registered strategies).
|
|
42
|
+
* @param listEditing The document list editing plugin.
|
|
43
|
+
*/
|
|
44
44
|
export declare function reconvertItemsOnDataChange(model: Model, editing: EditingController, attributeNames: Array<string>, listEditing: ListEditing): () => void;
|
|
45
45
|
/**
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
* Returns the list item downcast converter.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
* @param attributeNames A list of attribute names that should be converted if they are set.
|
|
50
|
+
* @param strategies The strategies.
|
|
51
|
+
* @param model The model.
|
|
52
|
+
*/
|
|
53
53
|
export declare function listItemDowncastConverter(attributeNames: Array<string>, strategies: Array<ListDowncastStrategy>, model: Model, { dataPipeline, enableSkipLevelLists }: {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
dataPipeline?: boolean;
|
|
55
|
+
enableSkipLevelLists?: boolean;
|
|
56
56
|
}): GetCallback<DowncastAttributeEvent<ListElement>>;
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
* The 'remove' downcast converter for custom markers.
|
|
59
|
+
*
|
|
60
|
+
* @internal
|
|
61
|
+
*/
|
|
62
62
|
export declare function listItemDowncastRemoveConverter(schema: ModelSchema): GetCallback<DowncastRemoveEvent>;
|
|
63
63
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
* Returns the bogus paragraph view element creator. A bogus paragraph is used if a list item contains only a single block or nested list.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
* @param attributeNames The list of all model list attributes (including registered strategies).
|
|
68
|
+
*/
|
|
69
69
|
export declare function bogusParagraphCreator(attributeNames: Array<string>, { dataPipeline }?: {
|
|
70
|
-
|
|
70
|
+
dataPipeline?: boolean;
|
|
71
71
|
}): DowncastElementCreatorFunction;
|
|
72
72
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
* Helper for mapping mode to view elements. It's using positions mapping instead of mapper.toViewElement( element )
|
|
74
|
+
* to find outermost view element. This is for cases when mapping is using inner view element like in the code blocks (pre > code).
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
* @param element The model element.
|
|
78
|
+
* @param mapper The mapper instance.
|
|
79
|
+
* @param model The model.
|
|
80
|
+
* @param writer The view downcast writer.
|
|
81
|
+
*/
|
|
82
82
|
export declare function findMappedViewElement(element: ModelElement, mapper: Mapper, model: Model, writer: ViewDowncastWriter): ViewElement | undefined;
|
|
83
83
|
/**
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
* The model to view custom position mapping for cases when marker is injected at the beginning of a block.
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
88
|
export declare function createModelToViewPositionMapper(strategies: Array<ListDowncastStrategy>, view: EditingView): GetCallback<MapperModelToViewPositionEvent>;
|
|
@@ -1,92 +1,92 @@
|
|
|
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
|
|
10
|
-
import type { ListType } from
|
|
6
|
+
* @module list/list/listcommand
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { Command, type Editor } from "@ckeditor/ckeditor5-core";
|
|
10
|
+
import type { ListType } from "./listediting.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
* The list command. It is used by the {@link module:list/list~List list feature}.
|
|
13
|
+
*/
|
|
14
14
|
export declare class ListCommand extends Command {
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The type of the list created by the command.
|
|
17
|
+
*/
|
|
18
|
+
readonly type: ListType;
|
|
19
|
+
/**
|
|
20
|
+
* A flag indicating whether the command is active, which means that the selection starts in a list of the same type.
|
|
21
|
+
*
|
|
22
|
+
* @observable
|
|
23
|
+
* @readonly
|
|
24
|
+
*/
|
|
25
|
+
value: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* List Walker options that change the range of the list items to be changed when the selection is collapsed within a list item.
|
|
28
|
+
*
|
|
29
|
+
* In a multi-level list, when the selection is collapsed within a list item, instead of changing only the list items of the same list
|
|
30
|
+
* type and current indent level, the entire list structure is changed (all list items at all indent levels of any list type).
|
|
31
|
+
*/
|
|
32
|
+
private readonly _listWalkerOptions?;
|
|
33
|
+
/**
|
|
34
|
+
* Creates an instance of the command.
|
|
35
|
+
*
|
|
36
|
+
* @param editor The editor instance.
|
|
37
|
+
* @param type List type that will be handled by this command.
|
|
38
|
+
*/
|
|
39
|
+
constructor(editor: Editor, type: ListType, options?: {
|
|
40
|
+
multiLevel?: boolean;
|
|
41
|
+
});
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
override refresh(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Executes the list command.
|
|
48
|
+
*
|
|
49
|
+
* @fires execute
|
|
50
|
+
* @fires afterExecute
|
|
51
|
+
* @param options Command options.
|
|
52
|
+
* @param options.forceValue If set, it will force the command behavior. If `true`, the command will try to convert the
|
|
53
|
+
* selected items and potentially the neighbor elements to the proper list items. If set to `false` it will convert selected elements
|
|
54
|
+
* to paragraphs. If not set, the command will toggle selected elements to list items or paragraphs, depending on the selection.
|
|
55
|
+
* @param options.additionalAttributes Additional attributes that are set for list items when the command is executed.
|
|
56
|
+
*/
|
|
57
|
+
override execute(options?: {
|
|
58
|
+
forceValue?: boolean;
|
|
59
|
+
additionalAttributes?: Record<string, unknown>;
|
|
60
|
+
}): void;
|
|
61
|
+
/**
|
|
62
|
+
* Fires the `afterExecute` event.
|
|
63
|
+
*
|
|
64
|
+
* @param changedBlocks The changed list elements.
|
|
65
|
+
*/
|
|
66
|
+
private _fireAfterExecute;
|
|
67
|
+
/**
|
|
68
|
+
* Checks the command's {@link #value}.
|
|
69
|
+
*
|
|
70
|
+
* @returns The current value.
|
|
71
|
+
*/
|
|
72
|
+
private _getValue;
|
|
73
|
+
/**
|
|
74
|
+
* Checks whether the command can be enabled in the current context.
|
|
75
|
+
*
|
|
76
|
+
* @returns Whether the command should be enabled.
|
|
77
|
+
*/
|
|
78
|
+
private _checkEnabled;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
* Event fired by the {@link ~ListCommand#execute} method.
|
|
82
|
+
*
|
|
83
|
+
* It allows to execute an action after executing the {@link ~ListCommand#execute} method,
|
|
84
|
+
* for example adjusting attributes of changed list items.
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
* @eventName ~ListCommand#afterExecute
|
|
88
|
+
*/
|
|
89
89
|
export type ListCommandAfterExecuteEvent = {
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
name: "afterExecute";
|
|
91
|
+
args: [changedBlocks: Array<ModelElement>];
|
|
92
92
|
};
|