@ckeditor/ckeditor5-list 48.8.1-alpha.4 → 49.0.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.
Files changed (214) hide show
  1. package/LICENSE.md +1 -1
  2. package/ckeditor5-metadata.json +6 -0
  3. package/dist/augmentation.d.ts +54 -54
  4. package/dist/index-content.css +140 -149
  5. package/dist/index-content.css.map +1 -0
  6. package/dist/index-editor.css +138 -133
  7. package/dist/index-editor.css.map +1 -0
  8. package/dist/index.css +257 -179
  9. package/dist/index.css.map +1 -1
  10. package/dist/index.d.ts +69 -67
  11. package/dist/index.js +7193 -8615
  12. package/dist/index.js.map +1 -1
  13. package/dist/legacyerrors.d.ts +0 -4
  14. package/dist/legacylist/legacyconverters.d.ts +184 -184
  15. package/dist/legacylist/legacyindentcommand.d.ts +33 -33
  16. package/dist/legacylist/legacylistcommand.d.ts +52 -52
  17. package/dist/legacylist/legacylistediting.d.ts +31 -32
  18. package/dist/legacylist/legacylistutils.d.ts +40 -40
  19. package/dist/legacylist/legacyutils.d.ts +91 -91
  20. package/dist/legacylist.d.ts +25 -25
  21. package/dist/legacylistproperties/legacylistpropertiesediting.d.ts +71 -71
  22. package/dist/legacylistproperties/legacylistreversedcommand.d.ts +33 -33
  23. package/dist/legacylistproperties/legacyliststartcommand.d.ts +33 -33
  24. package/dist/legacylistproperties/legacyliststylecommand.d.ts +63 -63
  25. package/dist/legacylistproperties.d.ts +26 -26
  26. package/dist/legacytodolist/legacychecktodolistcommand.d.ts +47 -47
  27. package/dist/legacytodolist/legacytodolistconverters.d.ts +76 -76
  28. package/dist/legacytodolist/legacytodolistediting.d.ts +46 -46
  29. package/dist/legacytodolist.d.ts +25 -26
  30. package/dist/list/adjacentlistssupport.d.ts +16 -16
  31. package/dist/list/converters.d.ts +71 -53
  32. package/dist/list/listcommand.d.ts +84 -84
  33. package/dist/list/listediting.d.ts +211 -219
  34. package/dist/list/listindentcommand.d.ts +54 -54
  35. package/dist/list/listmergecommand.d.ts +68 -68
  36. package/dist/list/listsplitcommand.d.ts +59 -59
  37. package/dist/list/listui.d.ts +19 -19
  38. package/dist/list/listutils.d.ts +55 -55
  39. package/dist/list/utils/listwalker.d.ts +139 -139
  40. package/dist/list/utils/model.d.ts +204 -174
  41. package/dist/list/utils/postfixers.d.ts +30 -30
  42. package/dist/list/utils/view.d.ts +65 -65
  43. package/dist/list/utils.d.ts +15 -15
  44. package/dist/list.d.ts +25 -25
  45. package/dist/listconfig.d.ts +234 -216
  46. package/dist/listformatting/listitemboldintegration.d.ts +29 -29
  47. package/dist/listformatting/listitemfontcolorintegration.d.ts +29 -29
  48. package/dist/listformatting/listitemfontfamilyintegration.d.ts +29 -29
  49. package/dist/listformatting/listitemfontsizeintegration.d.ts +29 -29
  50. package/dist/listformatting/listitemitalicintegration.d.ts +29 -29
  51. package/dist/listformatting.d.ts +65 -66
  52. package/dist/listproperties/converters.d.ts +15 -15
  53. package/dist/listproperties/listpropertiesediting.d.ts +91 -91
  54. package/dist/listproperties/listpropertiesui.d.ts +21 -22
  55. package/dist/listproperties/listpropertiesutils.d.ts +32 -32
  56. package/dist/listproperties/listreversedcommand.d.ts +31 -31
  57. package/dist/listproperties/liststartcommand.d.ts +34 -34
  58. package/dist/listproperties/liststylecommand.d.ts +67 -67
  59. package/dist/listproperties/ui/listpropertiesview.d.ts +146 -147
  60. package/dist/listproperties/utils/config.d.ts +32 -32
  61. package/dist/listproperties/utils/style.d.ts +31 -31
  62. package/dist/listproperties.d.ts +26 -26
  63. package/dist/todolist/checktodolistcommand.d.ts +44 -44
  64. package/dist/todolist/todocheckboxchangeobserver.d.ts +36 -36
  65. package/dist/todolist/todolistediting.d.ts +45 -45
  66. package/dist/todolist/todolistui.d.ts +19 -19
  67. package/dist/todolist.d.ts +25 -26
  68. package/dist/translations/af.js +1 -1
  69. package/dist/translations/af.umd.js +5 -3
  70. package/dist/translations/ar.js +1 -1
  71. package/dist/translations/ar.umd.js +5 -3
  72. package/dist/translations/ast.js +1 -1
  73. package/dist/translations/ast.umd.js +5 -3
  74. package/dist/translations/az.js +1 -1
  75. package/dist/translations/az.umd.js +5 -3
  76. package/dist/translations/be.js +1 -1
  77. package/dist/translations/be.umd.js +5 -3
  78. package/dist/translations/bg.js +1 -1
  79. package/dist/translations/bg.umd.js +5 -3
  80. package/dist/translations/bn.js +1 -1
  81. package/dist/translations/bn.umd.js +5 -3
  82. package/dist/translations/bs.js +1 -1
  83. package/dist/translations/bs.umd.js +5 -3
  84. package/dist/translations/ca.js +1 -1
  85. package/dist/translations/ca.umd.js +5 -3
  86. package/dist/translations/cs.js +1 -1
  87. package/dist/translations/cs.umd.js +5 -3
  88. package/dist/translations/da.js +1 -1
  89. package/dist/translations/da.umd.js +5 -3
  90. package/dist/translations/de-ch.js +1 -1
  91. package/dist/translations/de-ch.umd.js +5 -3
  92. package/dist/translations/de.js +1 -1
  93. package/dist/translations/de.umd.js +5 -3
  94. package/dist/translations/el.js +1 -1
  95. package/dist/translations/el.umd.js +5 -3
  96. package/dist/translations/en-au.js +1 -1
  97. package/dist/translations/en-au.umd.js +5 -3
  98. package/dist/translations/en-gb.js +1 -1
  99. package/dist/translations/en-gb.umd.js +5 -3
  100. package/dist/translations/en.js +1 -1
  101. package/dist/translations/en.umd.js +5 -3
  102. package/dist/translations/eo.js +1 -1
  103. package/dist/translations/eo.umd.js +5 -3
  104. package/dist/translations/es-co.js +1 -1
  105. package/dist/translations/es-co.umd.js +5 -3
  106. package/dist/translations/es.js +1 -1
  107. package/dist/translations/es.umd.js +5 -3
  108. package/dist/translations/et.js +1 -1
  109. package/dist/translations/et.umd.js +5 -3
  110. package/dist/translations/eu.js +1 -1
  111. package/dist/translations/eu.umd.js +5 -3
  112. package/dist/translations/fa.js +1 -1
  113. package/dist/translations/fa.umd.js +5 -3
  114. package/dist/translations/fi.js +1 -1
  115. package/dist/translations/fi.umd.js +5 -3
  116. package/dist/translations/fr.js +1 -1
  117. package/dist/translations/fr.umd.js +5 -3
  118. package/dist/translations/gl.js +1 -1
  119. package/dist/translations/gl.umd.js +5 -3
  120. package/dist/translations/gu.js +1 -1
  121. package/dist/translations/gu.umd.js +5 -3
  122. package/dist/translations/he.js +1 -1
  123. package/dist/translations/he.umd.js +5 -3
  124. package/dist/translations/hi.js +1 -1
  125. package/dist/translations/hi.umd.js +5 -3
  126. package/dist/translations/hr.js +1 -1
  127. package/dist/translations/hr.umd.js +5 -3
  128. package/dist/translations/hu.js +1 -1
  129. package/dist/translations/hu.umd.js +5 -3
  130. package/dist/translations/hy.js +1 -1
  131. package/dist/translations/hy.umd.js +5 -3
  132. package/dist/translations/id.js +1 -1
  133. package/dist/translations/id.umd.js +5 -3
  134. package/dist/translations/it.js +1 -1
  135. package/dist/translations/it.umd.js +5 -3
  136. package/dist/translations/ja.js +1 -1
  137. package/dist/translations/ja.umd.js +5 -3
  138. package/dist/translations/jv.js +1 -1
  139. package/dist/translations/jv.umd.js +5 -3
  140. package/dist/translations/kk.js +1 -1
  141. package/dist/translations/kk.umd.js +5 -3
  142. package/dist/translations/km.js +1 -1
  143. package/dist/translations/km.umd.js +5 -3
  144. package/dist/translations/kn.js +1 -1
  145. package/dist/translations/kn.umd.js +5 -3
  146. package/dist/translations/ko.js +1 -1
  147. package/dist/translations/ko.umd.js +5 -3
  148. package/dist/translations/ku.js +1 -1
  149. package/dist/translations/ku.umd.js +5 -3
  150. package/dist/translations/lt.js +1 -1
  151. package/dist/translations/lt.umd.js +5 -3
  152. package/dist/translations/lv.js +1 -1
  153. package/dist/translations/lv.umd.js +5 -3
  154. package/dist/translations/ms.js +1 -1
  155. package/dist/translations/ms.umd.js +5 -3
  156. package/dist/translations/nb.js +1 -1
  157. package/dist/translations/nb.umd.js +5 -3
  158. package/dist/translations/ne.js +1 -1
  159. package/dist/translations/ne.umd.js +5 -3
  160. package/dist/translations/nl.js +1 -1
  161. package/dist/translations/nl.umd.js +5 -3
  162. package/dist/translations/no.js +1 -1
  163. package/dist/translations/no.umd.js +5 -3
  164. package/dist/translations/oc.js +1 -1
  165. package/dist/translations/oc.umd.js +5 -3
  166. package/dist/translations/pl.js +1 -1
  167. package/dist/translations/pl.umd.js +5 -3
  168. package/dist/translations/pt-br.js +1 -1
  169. package/dist/translations/pt-br.umd.js +5 -3
  170. package/dist/translations/pt.js +1 -1
  171. package/dist/translations/pt.umd.js +5 -3
  172. package/dist/translations/ro.js +1 -1
  173. package/dist/translations/ro.umd.js +5 -3
  174. package/dist/translations/ru.js +1 -1
  175. package/dist/translations/ru.umd.js +5 -3
  176. package/dist/translations/si.js +1 -1
  177. package/dist/translations/si.umd.js +5 -3
  178. package/dist/translations/sk.js +1 -1
  179. package/dist/translations/sk.umd.js +5 -3
  180. package/dist/translations/sl.js +1 -1
  181. package/dist/translations/sl.umd.js +5 -3
  182. package/dist/translations/sq.js +1 -1
  183. package/dist/translations/sq.umd.js +5 -3
  184. package/dist/translations/sr-latn.js +1 -1
  185. package/dist/translations/sr-latn.umd.js +5 -3
  186. package/dist/translations/sr.js +1 -1
  187. package/dist/translations/sr.umd.js +5 -3
  188. package/dist/translations/sv.js +1 -1
  189. package/dist/translations/sv.umd.js +5 -3
  190. package/dist/translations/th.js +1 -1
  191. package/dist/translations/th.umd.js +5 -3
  192. package/dist/translations/ti.js +1 -1
  193. package/dist/translations/ti.umd.js +5 -3
  194. package/dist/translations/tk.js +1 -1
  195. package/dist/translations/tk.umd.js +5 -3
  196. package/dist/translations/tr.js +1 -1
  197. package/dist/translations/tr.umd.js +5 -3
  198. package/dist/translations/tt.js +1 -1
  199. package/dist/translations/tt.umd.js +5 -3
  200. package/dist/translations/ug.js +1 -1
  201. package/dist/translations/ug.umd.js +5 -3
  202. package/dist/translations/uk.js +1 -1
  203. package/dist/translations/uk.umd.js +5 -3
  204. package/dist/translations/ur.js +1 -1
  205. package/dist/translations/ur.umd.js +5 -3
  206. package/dist/translations/uz.js +1 -1
  207. package/dist/translations/uz.umd.js +5 -3
  208. package/dist/translations/vi.js +1 -1
  209. package/dist/translations/vi.umd.js +5 -3
  210. package/dist/translations/zh-cn.js +1 -1
  211. package/dist/translations/zh-cn.umd.js +5 -3
  212. package/dist/translations/zh.js +1 -1
  213. package/dist/translations/zh.umd.js +5 -3
  214. package/package.json +11 -11
@@ -1,244 +1,236 @@
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/listediting
7
- */
8
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
9
- import type { ViewDowncastWriter, ModelElement, ViewElement, ViewAttributeElement, ModelWriter } from '@ckeditor/ckeditor5-engine';
10
- import { Delete } from '@ckeditor/ckeditor5-typing';
11
- import { Enter } from '@ckeditor/ckeditor5-enter';
12
- import { ListFormatting } from '../listformatting.js';
13
- import { ListUtils } from './listutils.js';
14
- import { type ListElement } from './utils/model.js';
15
- import { ListBlocksIterable } from './utils/listwalker.js';
16
- import { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';
17
- import '../../theme/documentlist.css';
18
- import '../../theme/list.css';
19
- export type ListType = 'numbered' | 'bulleted' | 'todo' | 'customNumbered' | 'customBulleted';
6
+ * @module list/list/listediting
7
+ */
8
+ import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import type { ViewDowncastWriter, ModelElement, ViewElement, ViewAttributeElement, ModelWriter } from "@ckeditor/ckeditor5-engine";
10
+ import { Delete } from "@ckeditor/ckeditor5-typing";
11
+ import { Enter } from "@ckeditor/ckeditor5-enter";
12
+ import { ListFormatting } from "../listformatting.js";
13
+ import { ListUtils } from "./listutils.js";
14
+ import { type ListElement } from "./utils/model.js";
15
+ import { ListBlocksIterable } from "./utils/listwalker.js";
16
+ import { ClipboardPipeline } from "@ckeditor/ckeditor5-clipboard";
17
+ export type ListType = "numbered" | "bulleted" | "todo" | "customNumbered" | "customBulleted";
20
18
  /**
21
- * Map of model attributes applicable to list blocks.
22
- */
19
+ * Map of model attributes applicable to list blocks.
20
+ */
23
21
  export interface ListItemAttributesMap {
24
- listType?: ListType;
25
- listIndent?: number;
26
- listItemId?: string;
22
+ listType?: ListType;
23
+ listIndent?: number;
24
+ listItemId?: string;
27
25
  }
28
26
  /**
29
- * The editing part of the document-list feature. It handles creating, editing and removing lists and list items.
30
- */
27
+ * The editing part of the document-list feature. It handles creating, editing and removing lists and list items.
28
+ */
31
29
  export declare class ListEditing extends Plugin {
32
- /**
33
- * The list of registered downcast strategies.
34
- */
35
- private readonly _downcastStrategies;
36
- /**
37
- * @inheritDoc
38
- */
39
- static get pluginName(): "ListEditing";
40
- /**
41
- * @inheritDoc
42
- */
43
- static get isOfficialPlugin(): true;
44
- /**
45
- * @inheritDoc
46
- */
47
- static get requires(): readonly [typeof Enter, typeof Delete, typeof ListUtils, typeof ClipboardPipeline, typeof ListFormatting];
48
- /**
49
- * @inheritDoc
50
- */
51
- constructor(editor: Editor);
52
- /**
53
- * @inheritDoc
54
- */
55
- init(): void;
56
- /**
57
- * @inheritDoc
58
- */
59
- afterInit(): void;
60
- /**
61
- * Registers a downcast strategy.
62
- *
63
- * **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied
64
- * in the `ListEditing#afterInit()`.
65
- *
66
- * @param strategy The downcast strategy to register.
67
- */
68
- registerDowncastStrategy(strategy: ListDowncastStrategy): void;
69
- /**
70
- * Returns list of model attribute names that should affect downcast conversion.
71
- */
72
- getListAttributeNames(): Array<string>;
73
- /**
74
- * Attaches the listener to the {@link module:engine/view/document~ViewDocument#event:delete} event and handles backspace/delete
75
- * keys in and around document lists.
76
- */
77
- private _setupDeleteIntegration;
78
- /**
79
- * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:enter} event and handles enter key press
80
- * in document lists.
81
- */
82
- private _setupEnterIntegration;
83
- /**
84
- * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:tab} event and handles tab key and tab+shift keys
85
- * presses in document lists.
86
- */
87
- private _setupTabIntegration;
88
- /**
89
- * Registers the conversion helpers for the document-list feature.
90
- */
91
- private _setupConversion;
92
- /**
93
- * Registers model post-fixers.
94
- */
95
- private _setupModelPostFixing;
96
- /**
97
- * Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and
98
- * {@link module:engine/model/model~Model#getSelectedContent}.
99
- */
100
- private _setupClipboardIntegration;
101
- /**
102
- * Informs editor accessibility features about keystrokes brought by the plugin.
103
- */
104
- private _setupAccessibilityIntegration;
105
- /**
106
- * Convert `listItemId` attribute to `data-list-item-id` attribute on the view element in both downcast pipelines.
107
- */
108
- private _setupListItemIdConversionStrategy;
30
+ /**
31
+ * The list of registered downcast strategies.
32
+ */
33
+ private readonly _downcastStrategies;
34
+ /**
35
+ * @inheritDoc
36
+ */
37
+ static get pluginName(): "ListEditing";
38
+ /**
39
+ * @inheritDoc
40
+ */
41
+ static override get isOfficialPlugin(): true;
42
+ /**
43
+ * @inheritDoc
44
+ */
45
+ static get requires(): PluginDependenciesOf<[Enter, Delete, ListUtils, ClipboardPipeline, ListFormatting]>;
46
+ /**
47
+ * @inheritDoc
48
+ */
49
+ constructor(editor: Editor);
50
+ /**
51
+ * @inheritDoc
52
+ */
53
+ init(): void;
54
+ /**
55
+ * @inheritDoc
56
+ */
57
+ afterInit(): void;
58
+ /**
59
+ * Registers a downcast strategy.
60
+ *
61
+ * **Note**: Strategies must be registered in the `Plugin#init()` phase so that it can be applied
62
+ * in the `ListEditing#afterInit()`.
63
+ *
64
+ * @param strategy The downcast strategy to register.
65
+ */
66
+ registerDowncastStrategy(strategy: ListDowncastStrategy): void;
67
+ /**
68
+ * Returns list of model attribute names that should affect downcast conversion.
69
+ */
70
+ getListAttributeNames(): Array<string>;
71
+ /**
72
+ * Attaches the listener to the {@link module:engine/view/document~ViewDocument#event:delete} event and handles backspace/delete
73
+ * keys in and around document lists.
74
+ */
75
+ private _setupDeleteIntegration;
76
+ /**
77
+ * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:enter} event and handles enter key press
78
+ * in document lists.
79
+ */
80
+ private _setupEnterIntegration;
81
+ /**
82
+ * Attaches a listener to the {@link module:engine/view/document~ViewDocument#event:tab} event and handles tab key and tab+shift keys
83
+ * presses in document lists.
84
+ */
85
+ private _setupTabIntegration;
86
+ /**
87
+ * Registers the conversion helpers for the document-list feature.
88
+ */
89
+ private _setupConversion;
90
+ /**
91
+ * Registers model post-fixers.
92
+ */
93
+ private _setupModelPostFixing;
94
+ /**
95
+ * Integrates the feature with the clipboard via {@link module:engine/model/model~Model#insertContent} and
96
+ * {@link module:engine/model/model~Model#getSelectedContent}.
97
+ */
98
+ private _setupClipboardIntegration;
99
+ /**
100
+ * Informs editor accessibility features about keystrokes brought by the plugin.
101
+ */
102
+ private _setupAccessibilityIntegration;
103
+ /**
104
+ * Convert `listItemId` attribute to `data-list-item-id` attribute on the view element in both downcast pipelines.
105
+ */
106
+ private _setupListItemIdConversionStrategy;
109
107
  }
110
108
  /**
111
- * The attribute to attribute downcast strategy for UL, OL, LI elements.
112
- */
109
+ * The attribute to attribute downcast strategy for UL, OL, LI elements.
110
+ */
113
111
  export interface ListAttributeDowncastStrategy {
114
- /**
115
- * The scope of the downcast (whether it applies to LI or OL/UL).
116
- */
117
- scope: 'list' | 'item';
118
- /**
119
- * The model attribute name.
120
- */
121
- attributeName: string;
122
- /**
123
- * Whether the attribute should be consumed or this strategy is a side effect.
124
- *
125
- * @default true
126
- */
127
- consume?: boolean;
128
- /**
129
- * Sets the property on the view element.
130
- */
131
- setAttributeOnDowncast(writer: ViewDowncastWriter, value: unknown, element: ViewElement, options: Record<string, unknown>, modelElement: ModelElement): void;
112
+ /**
113
+ * The scope of the downcast (whether it applies to LI or OL/UL).
114
+ */
115
+ scope: "list" | "item";
116
+ /**
117
+ * The model attribute name.
118
+ */
119
+ attributeName: string;
120
+ /**
121
+ * Whether the attribute should be consumed or this strategy is a side effect.
122
+ *
123
+ * @default true
124
+ */
125
+ consume?: boolean;
126
+ /**
127
+ * Sets the property on the view element.
128
+ */
129
+ setAttributeOnDowncast(writer: ViewDowncastWriter, value: unknown, element: ViewElement, options: Record<string, unknown>, modelElement: ModelElement): void;
132
130
  }
133
131
  /**
134
- * The custom marker downcast strategy.
135
- */
132
+ * The custom marker downcast strategy.
133
+ */
136
134
  export interface ListItemMarkerDowncastStrategy {
137
- /**
138
- * The scope of the downcast.
139
- */
140
- scope: 'itemMarker';
141
- /**
142
- * The model attribute name.
143
- */
144
- attributeName: string;
145
- /**
146
- * Whether the attribute should be consumed or this strategy is a side effect.
147
- *
148
- * @default true
149
- */
150
- consume?: boolean;
151
- /**
152
- * Creates a view element for a custom item marker.
153
- */
154
- createElement(writer: ViewDowncastWriter, modelElement: ModelElement, { dataPipeline }: {
155
- dataPipeline?: boolean;
156
- }): ViewElement | null;
157
- /**
158
- * Creates an ViewAttributeElement to be used for wrapping a first block of a list item.
159
- */
160
- createWrapperElement?(writer: ViewDowncastWriter, modelElement: ModelElement, { dataPipeline }: {
161
- dataPipeline?: boolean;
162
- }): ViewAttributeElement;
163
- /**
164
- * Should return true if the given list block can be wrapped with the wrapper created by `createWrapperElement()`
165
- * or only the marker element should be wrapped.
166
- */
167
- canWrapElement?(modelElement: ModelElement): boolean;
168
- /**
169
- * Should return true if the custom marker can be injected into a given list block.
170
- * Otherwise, custom marker view element is always injected before the block element.
171
- */
172
- canInjectMarkerIntoElement?(modelElement: ModelElement): boolean;
135
+ /**
136
+ * The scope of the downcast.
137
+ */
138
+ scope: "itemMarker";
139
+ /**
140
+ * The model attribute name.
141
+ */
142
+ attributeName: string;
143
+ /**
144
+ * Whether the attribute should be consumed or this strategy is a side effect.
145
+ *
146
+ * @default true
147
+ */
148
+ consume?: boolean;
149
+ /**
150
+ * Creates a view element for a custom item marker.
151
+ */
152
+ createElement(writer: ViewDowncastWriter, modelElement: ModelElement, { dataPipeline }: {
153
+ dataPipeline?: boolean;
154
+ }): ViewElement | null;
155
+ /**
156
+ * Creates an ViewAttributeElement to be used for wrapping a first block of a list item.
157
+ */
158
+ createWrapperElement?(writer: ViewDowncastWriter, modelElement: ModelElement, { dataPipeline }: {
159
+ dataPipeline?: boolean;
160
+ }): ViewAttributeElement;
161
+ /**
162
+ * Should return true if the given list block can be wrapped with the wrapper created by `createWrapperElement()`
163
+ * or only the marker element should be wrapped.
164
+ */
165
+ canWrapElement?(modelElement: ModelElement): boolean;
166
+ /**
167
+ * Should return true if the custom marker can be injected into a given list block.
168
+ * Otherwise, custom marker view element is always injected before the block element.
169
+ */
170
+ canInjectMarkerIntoElement?(modelElement: ModelElement): boolean;
173
171
  }
174
172
  /**
175
- * The downcast strategy.
176
- */
173
+ * The downcast strategy.
174
+ */
177
175
  export type ListDowncastStrategy = ListAttributeDowncastStrategy | ListItemMarkerDowncastStrategy;
178
176
  /**
179
- * Event fired on changes detected on the model list element to verify if the view representation of a list element
180
- * is representing those attributes.
181
- *
182
- * It allows triggering a re-wrapping of a list item.
183
- *
184
- * @eventName ~ListEditing#postFixer
185
- * @param listHead The head element of a list.
186
- * @param writer The writer to do changes with.
187
- * @param seenIds The set of already known IDs.
188
- * @returns If a post-fixer made a change of the model tree, it should return `true`.
189
- */
177
+ * Event fired on changes detected on the model list element to verify if the view representation of a list element
178
+ * is representing those attributes.
179
+ *
180
+ * It allows triggering a re-wrapping of a list item.
181
+ *
182
+ * @eventName ~ListEditing#postFixer
183
+ * @param listHead The head element of a list.
184
+ * @param writer The writer to do changes with.
185
+ * @param seenIds The set of already known IDs.
186
+ * @returns If a post-fixer made a change of the model tree, it should return `true`.
187
+ */
190
188
  export type ListEditingPostFixerEvent = {
191
- name: 'postFixer';
192
- args: [
193
- {
194
- listNodes: ListBlocksIterable;
195
- listHead: ModelElement;
196
- writer: ModelWriter;
197
- seenIds: Set<string>;
198
- }
199
- ];
200
- return: boolean;
189
+ name: "postFixer";
190
+ args: [{
191
+ listNodes: ListBlocksIterable;
192
+ listHead: ModelElement;
193
+ writer: ModelWriter;
194
+ seenIds: Set<string>;
195
+ }];
196
+ return: boolean;
201
197
  };
202
198
  /**
203
- * Event fired on changes detected on the model list element to verify if the view representation of a list element
204
- * is representing those attributes.
205
- *
206
- * It allows triggering a re-wrapping of a list item.
207
- *
208
- * **Note**: For convenience this event is namespaced and could be captured as `checkAttributes:list` or `checkAttributes:item`.
209
- *
210
- * @internal
211
- * @eventName ~ListEditing#checkAttributes
212
- */
199
+ * Event fired on changes detected on the model list element to verify if the view representation of a list element
200
+ * is representing those attributes.
201
+ *
202
+ * It allows triggering a re-wrapping of a list item.
203
+ *
204
+ * **Note**: For convenience this event is namespaced and could be captured as `checkAttributes:list` or `checkAttributes:item`.
205
+ *
206
+ * @internal
207
+ * @eventName ~ListEditing#checkAttributes
208
+ */
213
209
  export type ListEditingCheckAttributesEvent = {
214
- name: 'checkAttributes' | 'checkAttributes:list' | 'checkAttributes:item';
215
- args: [
216
- {
217
- viewElement: ViewElement & {
218
- id?: string;
219
- };
220
- modelAttributes: ListItemAttributesMap;
221
- modelReferenceElement: ListElement;
222
- }
223
- ];
224
- return: boolean;
210
+ name: "checkAttributes" | "checkAttributes:list" | "checkAttributes:item";
211
+ args: [{
212
+ viewElement: ViewElement & {
213
+ id?: string;
214
+ };
215
+ modelAttributes: ListItemAttributesMap;
216
+ modelReferenceElement: ListElement;
217
+ }];
218
+ return: boolean;
225
219
  };
226
220
  /**
227
- * Event fired on changes detected on the model list element to verify if the view representation of a list block element
228
- * is representing those attributes.
229
- *
230
- * It allows triggering a reconversion of a list item block.
231
- *
232
- * @internal
233
- * @eventName ~ListEditing#checkElement
234
- */
221
+ * Event fired on changes detected on the model list element to verify if the view representation of a list block element
222
+ * is representing those attributes.
223
+ *
224
+ * It allows triggering a reconversion of a list item block.
225
+ *
226
+ * @internal
227
+ * @eventName ~ListEditing#checkElement
228
+ */
235
229
  export type ListEditingCheckElementEvent = {
236
- name: 'checkElement';
237
- args: [
238
- {
239
- viewElement: ViewElement;
240
- modelElement: ModelElement;
241
- }
242
- ];
243
- return: boolean;
230
+ name: "checkElement";
231
+ args: [{
232
+ viewElement: ViewElement;
233
+ modelElement: ModelElement;
234
+ }];
235
+ return: boolean;
244
236
  };
@@ -1,62 +1,62 @@
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/listindentcommand
7
- */
8
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
- import type { ModelElement } from '@ckeditor/ckeditor5-engine';
6
+ * @module list/list/listindentcommand
7
+ */
8
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { ModelElement } from "@ckeditor/ckeditor5-engine";
10
10
  /**
11
- * The document list indent command. It is used by the {@link module:list/list~List list feature}.
12
- */
11
+ * The document list indent command. It is used by the {@link module:list/list~List list feature}.
12
+ */
13
13
  export declare class ListIndentCommand extends Command {
14
- /**
15
- * Determines by how much the command will change the list item's indent attribute.
16
- */
17
- private readonly _direction;
18
- /**
19
- * Creates an instance of the command.
20
- *
21
- * @param editor The editor instance.
22
- * @param indentDirection The direction of indent. If it is equal to `backward`, the command
23
- * will outdent a list item.
24
- */
25
- constructor(editor: Editor, indentDirection: 'forward' | 'backward');
26
- /**
27
- * @inheritDoc
28
- */
29
- refresh(): void;
30
- /**
31
- * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
32
- *
33
- * @fires execute
34
- * @fires afterExecute
35
- */
36
- execute(): void;
37
- /**
38
- * Fires the `afterExecute` event.
39
- *
40
- * @param changedBlocks The changed list elements.
41
- */
42
- private _fireAfterExecute;
43
- /**
44
- * Checks whether the command can be enabled in the current context.
45
- *
46
- * @returns Whether the command should be enabled.
47
- */
48
- private _checkEnabled;
14
+ /**
15
+ * Determines by how much the command will change the list item's indent attribute.
16
+ */
17
+ private readonly _direction;
18
+ /**
19
+ * Creates an instance of the command.
20
+ *
21
+ * @param editor The editor instance.
22
+ * @param indentDirection The direction of indent. If it is equal to `backward`, the command
23
+ * will outdent a list item.
24
+ */
25
+ constructor(editor: Editor, indentDirection: "forward" | "backward");
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ override refresh(): void;
30
+ /**
31
+ * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
32
+ *
33
+ * @fires execute
34
+ * @fires afterExecute
35
+ */
36
+ override execute(): void;
37
+ /**
38
+ * Fires the `afterExecute` event.
39
+ *
40
+ * @param changedBlocks The changed list elements.
41
+ */
42
+ private _fireAfterExecute;
43
+ /**
44
+ * Checks whether the command can be enabled in the current context.
45
+ *
46
+ * @returns Whether the command should be enabled.
47
+ */
48
+ private _checkEnabled;
49
49
  }
50
50
  /**
51
- * Event fired by the {@link ~ListIndentCommand#execute} method.
52
- *
53
- * It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}
54
- * method, for example adjusting attributes of changed list items.
55
- *
56
- * @internal
57
- * @eventName ~ListIndentCommand#afterExecute
58
- */
51
+ * Event fired by the {@link ~ListIndentCommand#execute} method.
52
+ *
53
+ * It allows to execute an action after executing the {@link module:list/list/listcommand~ListCommand#execute}
54
+ * method, for example adjusting attributes of changed list items.
55
+ *
56
+ * @internal
57
+ * @eventName ~ListIndentCommand#afterExecute
58
+ */
59
59
  export type ListIndentCommandAfterExecuteEvent = {
60
- name: 'afterExecute';
61
- args: [changedBlocks: Array<ModelElement>];
60
+ name: "afterExecute";
61
+ args: [changedBlocks: Array<ModelElement>];
62
62
  };