@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,257 +1,257 @@
|
|
|
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 { ModelDocumentFragment, ModelElement, Model, ModelNode, ModelWriter, ModelItem, ModelSchema } from
|
|
9
|
-
import { type ArrayOrItem } from
|
|
10
|
-
import { type ListWalkerOptions } from
|
|
11
|
-
import { type ListType } from
|
|
6
|
+
* @module list/list/utils/model
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelDocumentFragment, ModelElement, Model, ModelNode, ModelWriter, ModelItem, ModelSchema } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { type ArrayOrItem } from "@ckeditor/ckeditor5-utils";
|
|
10
|
+
import { type ListWalkerOptions } from "./listwalker.js";
|
|
11
|
+
import { type ListType } from "../listediting.js";
|
|
12
12
|
/**
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
* The list item ID generator.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
17
|
export declare class ListItemUid {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Returns the next ID.
|
|
20
|
+
*
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
static next(): string;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
* An {@link module:engine/model/element~ModelElement} that is known to be a list element.
|
|
27
|
+
*
|
|
28
|
+
* @internal
|
|
29
|
+
*/
|
|
30
30
|
export interface ListElement extends ModelElement {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
getAttribute(key: "listItemId"): string;
|
|
32
|
+
getAttribute(key: "listIndent"): number;
|
|
33
|
+
getAttribute(key: "listType"): ListType;
|
|
34
|
+
getAttribute(key: string): unknown;
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
* Returns true if the given model node is a list item block.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
41
|
export declare function isListItemBlock(node: ModelItem | ModelDocumentFragment | null): node is ListElement;
|
|
42
42
|
/**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
* Returns an array with all elements that represents the same list item.
|
|
44
|
+
*
|
|
45
|
+
* It means that values for `listIndent`, and `listItemId` for all items are equal.
|
|
46
|
+
*
|
|
47
|
+
* @internal
|
|
48
|
+
* @param listItem Starting list item element.
|
|
49
|
+
* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included
|
|
50
|
+
* in the result.
|
|
51
|
+
*/
|
|
52
52
|
export declare function getAllListItemBlocks(listItem: ModelNode, options?: {
|
|
53
|
-
|
|
53
|
+
higherIndent?: boolean;
|
|
54
54
|
}): Array<ListElement>;
|
|
55
55
|
/**
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
56
|
+
* Returns an array with elements that represents the same list item in the specified direction.
|
|
57
|
+
*
|
|
58
|
+
* It means that values for `listIndent` and `listItemId` for all items are equal.
|
|
59
|
+
*
|
|
60
|
+
* **Note**: For backward search the provided item is not included, but for forward search it is included in the result.
|
|
61
|
+
*
|
|
62
|
+
* @internal
|
|
63
|
+
* @param listItem Starting list item element.
|
|
64
|
+
* @param options.direction Walking direction.
|
|
65
|
+
* @param options.higherIndent Whether blocks with a higher indent level than the start block should be included in the result.
|
|
66
|
+
*/
|
|
67
67
|
export declare function getListItemBlocks(listItem: ModelNode, options?: {
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
direction?: "forward" | "backward";
|
|
69
|
+
higherIndent?: boolean;
|
|
70
70
|
}): Array<ListElement>;
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
* Returns a list items nested inside the given list item.
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
76
|
export declare function getNestedListBlocks(listItem: ModelElement): Array<ListElement>;
|
|
77
77
|
/**
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
78
|
+
* Returns array of all blocks/items of the same list as given block (same indent, same type and properties).
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
* @param listItem Starting list item element.
|
|
82
|
+
* @param options Additional list walker options to modify the range of returned list items.
|
|
83
|
+
*/
|
|
84
84
|
export declare function getListItems(listItem: ModelElement, options?: ListWalkerOptions): Array<ListElement>;
|
|
85
85
|
/**
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
* Check if the given block is the first in the list item.
|
|
87
|
+
*
|
|
88
|
+
* @internal
|
|
89
|
+
* @param listBlock The list block element.
|
|
90
|
+
*/
|
|
91
91
|
export declare function isFirstBlockOfListItem(listBlock: ModelNode): boolean;
|
|
92
92
|
/**
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
* Check if the given block is the last in the list item.
|
|
94
|
+
*
|
|
95
|
+
* @internal
|
|
96
|
+
*/
|
|
97
97
|
export declare function isLastBlockOfListItem(listBlock: ModelElement): boolean;
|
|
98
98
|
/**
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
* Expands the given list of selected blocks to include the leading and tailing blocks of partially selected list items.
|
|
100
|
+
*
|
|
101
|
+
* @internal
|
|
102
|
+
* @param blocks The list of selected blocks.
|
|
103
|
+
* @param options.withNested Whether should include nested list items.
|
|
104
|
+
*/
|
|
105
105
|
export declare function expandListBlocksToCompleteItems(blocks: ArrayOrItem<ModelElement>, options?: {
|
|
106
|
-
|
|
106
|
+
withNested?: boolean;
|
|
107
107
|
}): Array<ListElement>;
|
|
108
108
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
109
|
+
* Expands the given list of selected blocks to include all the items of the lists they're in.
|
|
110
|
+
*
|
|
111
|
+
* @internal
|
|
112
|
+
* @param blocks The list of selected blocks.
|
|
113
|
+
*/
|
|
114
114
|
export declare function expandListBlocksToCompleteList(blocks: ArrayOrItem<ModelElement>): Array<ListElement>;
|
|
115
115
|
/**
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
* Splits the list item just before the provided list block.
|
|
117
|
+
*
|
|
118
|
+
* @internal
|
|
119
|
+
* @param listBlock The list block element.
|
|
120
|
+
* @param writer The model writer.
|
|
121
|
+
* @returns The array of updated blocks.
|
|
122
|
+
*/
|
|
123
123
|
export declare function splitListItemBefore(listBlock: ModelElement, writer: ModelWriter): Array<ListElement>;
|
|
124
124
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
125
|
+
* Merges the list item with the parent list item.
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
* @param listBlock The list block element.
|
|
129
|
+
* @param parentBlock The list block element to merge with.
|
|
130
|
+
* @param writer The model writer.
|
|
131
|
+
* @returns The array of updated blocks.
|
|
132
|
+
*/
|
|
133
133
|
export declare function mergeListItemBefore(listBlock: ModelNode, parentBlock: ModelElement, writer: ModelWriter): Array<ListElement>;
|
|
134
134
|
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
135
|
+
* Increases indentation of given list blocks.
|
|
136
|
+
*
|
|
137
|
+
* @internal
|
|
138
|
+
* @param blocks The block or iterable of blocks.
|
|
139
|
+
* @param writer The model writer.
|
|
140
|
+
* @param options Additional options.
|
|
141
|
+
* @param options.expand Whether should expand the list of blocks to include complete list items.
|
|
142
|
+
* @param options.indentBy The number of levels the indentation should change (could be negative).
|
|
143
|
+
* @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).
|
|
144
|
+
*/
|
|
145
145
|
export declare function indentBlocks(blocks: ArrayOrItem<ListElement>, writer: ModelWriter, { expand, indentBy, attributeNames }: {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
expand?: boolean;
|
|
147
|
+
indentBy?: number;
|
|
148
|
+
attributeNames: Array<string>;
|
|
149
149
|
}): Array<ListElement>;
|
|
150
150
|
/**
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
151
|
+
* Decreases indentation of given list of blocks. If the indentation of some blocks matches the indentation
|
|
152
|
+
* of surrounding blocks, they get merged together.
|
|
153
|
+
*
|
|
154
|
+
* @internal
|
|
155
|
+
* @param blocks The block or iterable of blocks.
|
|
156
|
+
* @param writer The model writer.
|
|
157
|
+
* @param options Additional options.
|
|
158
|
+
* @param options.attributeNames List of attribute names to remove when a block leaves the list (when blockIndent < 0).
|
|
159
|
+
*/
|
|
160
160
|
export declare function outdentBlocksWithMerge(blocks: ArrayOrItem<ListElement>, writer: ModelWriter, { attributeNames }: {
|
|
161
|
-
|
|
161
|
+
attributeNames: Array<string>;
|
|
162
162
|
}): Array<ListElement>;
|
|
163
163
|
/**
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
* Removes all list attributes from the given blocks.
|
|
165
|
+
*
|
|
166
|
+
* @internal
|
|
167
|
+
* @param blocks The block or iterable of blocks.
|
|
168
|
+
* @param writer The model writer.
|
|
169
|
+
* @param attributeNames List of attribute names to remove.
|
|
170
|
+
* @returns Array of altered blocks.
|
|
171
|
+
*/
|
|
172
172
|
export declare function removeListAttributes(blocks: ArrayOrItem<ModelElement>, writer: ModelWriter, attributeNames: Array<string>): Array<ModelElement>;
|
|
173
173
|
/**
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
* Checks whether the given blocks are related to a single list item.
|
|
175
|
+
*
|
|
176
|
+
* @internal
|
|
177
|
+
* @param blocks The list block elements.
|
|
178
|
+
*/
|
|
179
179
|
export declare function isSingleListItem(blocks: Array<ModelNode>): boolean;
|
|
180
180
|
/**
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
* Modifies the indents of list blocks following the given list block so the indentation is valid after
|
|
182
|
+
* the given block is no longer a list item.
|
|
183
|
+
*
|
|
184
|
+
* @internal
|
|
185
|
+
* @param lastBlock The last list block that has become a non-list element.
|
|
186
|
+
* @param writer The model writer.
|
|
187
|
+
* @returns Array of altered blocks.
|
|
188
|
+
*/
|
|
189
189
|
export declare function outdentFollowingItems(lastBlock: ModelElement, writer: ModelWriter): Array<ListElement>;
|
|
190
190
|
/**
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
* Returns the array of given blocks sorted by model indexes (document order).
|
|
192
|
+
*
|
|
193
|
+
* @internal
|
|
194
|
+
*/
|
|
195
195
|
export declare function sortBlocks<T extends ModelElement>(blocks: Iterable<T>): Array<T>;
|
|
196
196
|
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
* Returns a selected block object. If a selected object is inline or when there is no selected
|
|
198
|
+
* object, `null` is returned.
|
|
199
|
+
*
|
|
200
|
+
* @internal
|
|
201
|
+
* @param model The instance of editor model.
|
|
202
|
+
* @returns Selected block object or `null`.
|
|
203
|
+
*/
|
|
204
204
|
export declare function getSelectedBlockObject(model: Model): ModelElement | null;
|
|
205
205
|
/**
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
206
|
+
* Checks whether the given block can be replaced by a listItem.
|
|
207
|
+
*
|
|
208
|
+
* Note that this is possible only when multiBlock = false option is set in feature config.
|
|
209
|
+
*
|
|
210
|
+
* @param block A block to be tested.
|
|
211
|
+
* @param schema The schema of the document.
|
|
212
|
+
* @internal
|
|
213
|
+
*/
|
|
214
214
|
export declare function canBecomeSimpleListItem(block: ModelElement, schema: ModelSchema): boolean;
|
|
215
215
|
/**
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
216
|
+
* Returns true if listType is of type `numbered` or `customNumbered`.
|
|
217
|
+
*
|
|
218
|
+
* @internal
|
|
219
|
+
*/
|
|
220
220
|
export declare function isNumberedListType(listType: ListType): boolean;
|
|
221
221
|
/**
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
222
|
+
* Checks if the given list item block is the first block of the first item in its list at the given indent.
|
|
223
|
+
*
|
|
224
|
+
* Walks back over previous siblings and returns:
|
|
225
|
+
* - `true` if it reaches a non-list block or a list block at a lower indent (a new list begins here),
|
|
226
|
+
* - `false` if it finds a same-indent block of the same `listItemId` (a continuation of the current item) or of the same
|
|
227
|
+
* `listType` (the visible list already has earlier items),
|
|
228
|
+
* - `true` if it finds a same-indent block of a different `listType` and a different `listItemId` (a different list ends; ours
|
|
229
|
+
* starts here),
|
|
230
|
+
* - `false` if the loop ends (it reaches the first non-list-item block, or no more previous siblings) while passing only
|
|
231
|
+
* higher-indent blocks (those blocks live inside an intermediate skip-level `<li style="list-style-type:none">` wrapper
|
|
232
|
+
* at our indent).
|
|
233
|
+
*
|
|
234
|
+
* For example, in the model:
|
|
235
|
+
*
|
|
236
|
+
* ```
|
|
237
|
+
* ' # aaa'
|
|
238
|
+
* '# bbb'
|
|
239
|
+
* ```
|
|
240
|
+
*
|
|
241
|
+
* `bbb` is preceded by a higher-indent block `aaa`, which in the view is rendered inside an intermediate
|
|
242
|
+
* skip-level wrapper at indent 0:
|
|
243
|
+
*
|
|
244
|
+
* ```html
|
|
245
|
+
* <ol>
|
|
246
|
+
* <li style="list-style-type:none">
|
|
247
|
+
* <ol>
|
|
248
|
+
* <li>aaa</li>
|
|
249
|
+
* </ol>
|
|
250
|
+
* </li>
|
|
251
|
+
* <li>bbb</li>
|
|
252
|
+
* </ol>
|
|
253
|
+
* ```
|
|
254
|
+
*
|
|
255
|
+
* So `bbb` is the second visible item in the outer list and the function returns `false`.
|
|
256
|
+
*/
|
|
257
257
|
export declare function isFirstListItemInList(listItem: ModelElement): boolean;
|
|
@@ -1,38 +1,38 @@
|
|
|
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, ModelPosition, ModelWriter } from
|
|
9
|
-
import { type ListIteratorValue } from
|
|
10
|
-
import { type ListElement } from
|
|
6
|
+
* @module list/list/utils/postfixers
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement, ModelPosition, ModelWriter } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { type ListIteratorValue } from "./listwalker.js";
|
|
10
|
+
import { type ListElement } from "./model.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
12
|
+
* Based on the provided positions looks for the list head and stores it in the provided map.
|
|
13
|
+
*
|
|
14
|
+
* @internal
|
|
15
|
+
* @param position The search starting position.
|
|
16
|
+
* @param itemToListHead The map from list item element to the list head element.
|
|
17
|
+
* @param visited A set of elements that were already visited.
|
|
18
|
+
*/
|
|
19
19
|
export declare function findAndAddListHeadToMap(position: ModelPosition, itemToListHead: Set<ListElement>, visited: Set<ModelElement>): void;
|
|
20
20
|
/**
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
* Scans the list starting from the given list head element and fixes items' indentation.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
* @param listNodes The iterable of list nodes.
|
|
25
|
+
* @param writer The model writer.
|
|
26
|
+
* @returns Whether the model was modified.
|
|
27
|
+
*/
|
|
28
28
|
export declare function fixListIndents(listNodes: Iterable<ListIteratorValue>, writer: ModelWriter): boolean;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
* Scans the list starting from the given list head element and fixes items' types.
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
* @param listNodes The iterable of list nodes.
|
|
34
|
+
* @param seenIds The set of already known IDs.
|
|
35
|
+
* @param writer The model writer.
|
|
36
|
+
* @returns Whether the model was modified.
|
|
37
|
+
*/
|
|
38
38
|
export declare function fixListItemIds(listNodes: Iterable<ListIteratorValue>, seenIds: Set<string>, writer: ModelWriter): boolean;
|