@ckeditor/ckeditor5-list 40.0.0 → 40.1.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 (104) hide show
  1. package/LICENSE.md +2 -2
  2. package/build/list.js +1 -1
  3. package/package.json +3 -3
  4. package/src/augmentation.d.ts +52 -52
  5. package/src/augmentation.js +5 -5
  6. package/src/documentlist/adjacentlistssupport.d.ts +15 -15
  7. package/src/documentlist/adjacentlistssupport.js +81 -81
  8. package/src/documentlist/converters.d.ts +65 -65
  9. package/src/documentlist/converters.js +441 -441
  10. package/src/documentlist/documentlistcommand.d.ts +80 -80
  11. package/src/documentlist/documentlistcommand.js +150 -150
  12. package/src/documentlist/documentlistediting.d.ts +212 -212
  13. package/src/documentlist/documentlistediting.js +646 -645
  14. package/src/documentlist/documentlistindentcommand.d.ts +62 -62
  15. package/src/documentlist/documentlistindentcommand.js +129 -129
  16. package/src/documentlist/documentlistmergecommand.d.ts +76 -76
  17. package/src/documentlist/documentlistmergecommand.js +174 -174
  18. package/src/documentlist/documentlistsplitcommand.d.ts +67 -67
  19. package/src/documentlist/documentlistsplitcommand.js +70 -70
  20. package/src/documentlist/documentlistutils.d.ts +46 -46
  21. package/src/documentlist/documentlistutils.js +50 -50
  22. package/src/documentlist/utils/listwalker.d.ts +145 -145
  23. package/src/documentlist/utils/listwalker.js +182 -182
  24. package/src/documentlist/utils/model.d.ts +202 -202
  25. package/src/documentlist/utils/model.js +455 -455
  26. package/src/documentlist/utils/postfixers.d.ts +37 -37
  27. package/src/documentlist/utils/postfixers.js +126 -126
  28. package/src/documentlist/utils/view.d.ts +81 -81
  29. package/src/documentlist/utils/view.js +117 -117
  30. package/src/documentlist.d.ts +26 -26
  31. package/src/documentlist.js +30 -30
  32. package/src/documentlistproperties/converters.d.ts +19 -19
  33. package/src/documentlistproperties/converters.js +43 -43
  34. package/src/documentlistproperties/documentlistpropertiesediting.d.ts +88 -88
  35. package/src/documentlistproperties/documentlistpropertiesediting.js +266 -266
  36. package/src/documentlistproperties/documentlistpropertiesutils.d.ts +33 -33
  37. package/src/documentlistproperties/documentlistpropertiesutils.js +44 -44
  38. package/src/documentlistproperties/documentlistreversedcommand.d.ts +36 -36
  39. package/src/documentlistproperties/documentlistreversedcommand.js +55 -55
  40. package/src/documentlistproperties/documentliststartcommand.d.ts +38 -38
  41. package/src/documentlistproperties/documentliststartcommand.js +57 -57
  42. package/src/documentlistproperties/documentliststylecommand.d.ts +72 -72
  43. package/src/documentlistproperties/documentliststylecommand.js +113 -113
  44. package/src/documentlistproperties/utils/style.d.ts +20 -20
  45. package/src/documentlistproperties/utils/style.js +54 -54
  46. package/src/documentlistproperties.d.ts +27 -27
  47. package/src/documentlistproperties.js +31 -31
  48. package/src/index.d.ts +43 -43
  49. package/src/index.js +29 -29
  50. package/src/list/converters.d.ts +196 -196
  51. package/src/list/converters.js +905 -905
  52. package/src/list/indentcommand.d.ts +37 -37
  53. package/src/list/indentcommand.js +107 -107
  54. package/src/list/listcommand.d.ts +55 -55
  55. package/src/list/listcommand.js +274 -274
  56. package/src/list/listediting.d.ts +32 -32
  57. package/src/list/listediting.js +161 -161
  58. package/src/list/listui.d.ts +19 -19
  59. package/src/list/listui.js +32 -32
  60. package/src/list/listutils.d.ts +41 -41
  61. package/src/list/listutils.js +46 -46
  62. package/src/list/utils.d.ts +112 -112
  63. package/src/list/utils.js +374 -374
  64. package/src/list.d.ts +26 -26
  65. package/src/list.js +30 -30
  66. package/src/listconfig.d.ts +132 -132
  67. package/src/listconfig.js +5 -5
  68. package/src/listproperties/listpropertiesediting.d.ts +72 -72
  69. package/src/listproperties/listpropertiesediting.js +696 -696
  70. package/src/listproperties/listpropertiesui.d.ts +23 -23
  71. package/src/listproperties/listpropertiesui.js +277 -277
  72. package/src/listproperties/listreversedcommand.d.ts +38 -38
  73. package/src/listproperties/listreversedcommand.js +52 -52
  74. package/src/listproperties/liststartcommand.d.ts +37 -37
  75. package/src/listproperties/liststartcommand.js +51 -51
  76. package/src/listproperties/liststylecommand.d.ts +67 -67
  77. package/src/listproperties/liststylecommand.js +99 -99
  78. package/src/listproperties/ui/collapsibleview.d.ts +63 -63
  79. package/src/listproperties/ui/collapsibleview.js +89 -89
  80. package/src/listproperties/ui/listpropertiesview.d.ts +157 -157
  81. package/src/listproperties/ui/listpropertiesview.js +299 -299
  82. package/src/listproperties.d.ts +26 -26
  83. package/src/listproperties.js +30 -30
  84. package/src/liststyle.d.ts +28 -28
  85. package/src/liststyle.js +36 -36
  86. package/src/tododocumentlist/checktododocumentlistcommand.d.ts +49 -49
  87. package/src/tododocumentlist/checktododocumentlistcommand.js +82 -82
  88. package/src/tododocumentlist/todocheckboxchangeobserver.d.ts +41 -41
  89. package/src/tododocumentlist/todocheckboxchangeobserver.js +37 -37
  90. package/src/tododocumentlist/tododocumentlistediting.d.ts +38 -38
  91. package/src/tododocumentlist/tododocumentlistediting.js +399 -399
  92. package/src/tododocumentlist.d.ts +27 -27
  93. package/src/tododocumentlist.js +31 -31
  94. package/src/todolist/checktodolistcommand.d.ts +52 -52
  95. package/src/todolist/checktodolistcommand.js +76 -76
  96. package/src/todolist/todolistconverters.d.ts +82 -82
  97. package/src/todolist/todolistconverters.js +260 -260
  98. package/src/todolist/todolistediting.d.ts +39 -39
  99. package/src/todolist/todolistediting.js +161 -161
  100. package/src/todolist/todolistui.d.ts +19 -19
  101. package/src/todolist/todolistui.js +29 -29
  102. package/src/todolist.d.ts +27 -27
  103. package/src/todolist.js +31 -31
  104. package/build/list.js.map +0 -1
package/src/list.d.ts CHANGED
@@ -1,26 +1,26 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module list/list
7
- */
8
- import ListEditing from './list/listediting';
9
- import ListUI from './list/listui';
10
- import { Plugin } from 'ckeditor5/src/core';
11
- /**
12
- * The list feature.
13
- *
14
- * This is a "glue" plugin that loads the {@link module:list/list/listediting~ListEditing list editing feature}
15
- * and {@link module:list/list/listui~ListUI list UI feature}.
16
- */
17
- export default class List extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires(): readonly [typeof ListEditing, typeof ListUI];
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "List";
26
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module list/list
7
+ */
8
+ import ListEditing from './list/listediting';
9
+ import ListUI from './list/listui';
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+ /**
12
+ * The list feature.
13
+ *
14
+ * This is a "glue" plugin that loads the {@link module:list/list/listediting~ListEditing list editing feature}
15
+ * and {@link module:list/list/listui~ListUI list UI feature}.
16
+ */
17
+ export default class List extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires(): readonly [typeof ListEditing, typeof ListUI];
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get pluginName(): "List";
26
+ }
package/src/list.js CHANGED
@@ -1,30 +1,30 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module list/list
7
- */
8
- import ListEditing from './list/listediting';
9
- import ListUI from './list/listui';
10
- import { Plugin } from 'ckeditor5/src/core';
11
- /**
12
- * The list feature.
13
- *
14
- * This is a "glue" plugin that loads the {@link module:list/list/listediting~ListEditing list editing feature}
15
- * and {@link module:list/list/listui~ListUI list UI feature}.
16
- */
17
- export default class List extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires() {
22
- return [ListEditing, ListUI];
23
- }
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName() {
28
- return 'List';
29
- }
30
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module list/list
7
+ */
8
+ import ListEditing from './list/listediting';
9
+ import ListUI from './list/listui';
10
+ import { Plugin } from 'ckeditor5/src/core';
11
+ /**
12
+ * The list feature.
13
+ *
14
+ * This is a "glue" plugin that loads the {@link module:list/list/listediting~ListEditing list editing feature}
15
+ * and {@link module:list/list/listui~ListUI list UI feature}.
16
+ */
17
+ export default class List extends Plugin {
18
+ /**
19
+ * @inheritDoc
20
+ */
21
+ static get requires() {
22
+ return [ListEditing, ListUI];
23
+ }
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName() {
28
+ return 'List';
29
+ }
30
+ }
@@ -1,132 +1,132 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module list/listconfig
7
- */
8
- /**
9
- * The configuration of the {@link module:list/list~List list} feature
10
- * and the {@link module:list/documentlist~DocumentList document list} feature.
11
- *
12
- * ```ts
13
- * ClassicEditor
14
- * .create( editorElement, {
15
- * list: ... // The list feature configuration.
16
- * } )
17
- * .then( ... )
18
- * .catch( ... );
19
- * ```
20
- *
21
- * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
22
- *
23
- * @interface ListConfig
24
- */
25
- export interface ListConfig {
26
- /**
27
- * The configuration of the {@link module:list/listproperties~ListProperties} feature and the
28
- * {@link module:list/documentlistproperties~DocumentListProperties document list properties} feature.
29
- *
30
- * Read more in {@link module:list/listconfig~ListPropertiesConfig}.
31
- */
32
- properties?: ListPropertiesConfig;
33
- /**
34
- * Allows multiple blocks in single list item.
35
- *
36
- * With this option enabled you can have block widgets, for example images or even tables, within a list item.
37
- *
38
- * **Note:** This is enabled by default.
39
- *
40
- * @default true
41
- */
42
- multiBlock?: boolean;
43
- }
44
- /**
45
- * The configuration of the {@link module:list/listproperties~ListProperties list properties} feature and the
46
- * {@link module:list/documentlistproperties~DocumentListProperties document list properties} feature.
47
- *
48
- * This configuration controls the individual list properties. For instance, it enables or disables specific editor commands
49
- * operating on lists ({@link module:list/listproperties/liststylecommand~ListStyleCommand `'listStyle'`},
50
- * {@link module:list/listproperties/liststartcommand~ListStartCommand `'listStart'`},
51
- * {@link module:list/listproperties/listreversedcommand~ListReversedCommand `'listReversed'`}, or on the document lists
52
- * {@link module:list/documentlistproperties/documentliststylecommand~DocumentListStyleCommand `'listStyle'`},
53
- * {@link module:list/documentlistproperties/documentliststartcommand~DocumentListStartCommand `'listStart'`},
54
- * {@link module:list/documentlistproperties/documentlistreversedcommand~DocumentListReversedCommand `'listReversed'`}), the look of the UI
55
- * (`'numberedList'` and `'bulletedList'` dropdowns), and the editor data pipeline (allowed HTML attributes).
56
- *
57
- * ```ts
58
- * ClassicEditor
59
- * .create( editorElement, {
60
- * list: {
61
- * properties: {
62
- * styles: true,
63
- * startIndex: true,
64
- * reversed: true
65
- * }
66
- * }
67
- * } )
68
- * .then( ... )
69
- * .catch( ... );
70
- * ```
71
- */
72
- export interface ListPropertiesConfig {
73
- /**
74
- * When set, the list style feature will be enabled.
75
- * It allows changing the `list-style-type` style or the `type` HTML attribute of a list.
76
- *
77
- * **Note**: Styling using the `type` HTML attribute is only available in
78
- * {@link module:list/documentlistproperties~DocumentListProperties document list properties}
79
- * ({@link module:list/listconfig~ListPropertiesStyleConfig learn more}).
80
- *
81
- * @default true
82
- */
83
- styles?: boolean | ListPropertiesStyleConfig;
84
- /**
85
- * When set, the list start index feature will be enabled. It allows changing the `start` HTML attribute of the numbered lists. As a
86
- * result, it will be possible to specify the start value of the first item in an ordered list.
87
- *
88
- * **Note**: This configuration does not affect bulleted and to-do lists.
89
- *
90
- * @default false
91
- */
92
- startIndex?: boolean;
93
- /**
94
- * When set, the reversed list feature will be enabled. It allows changing the `reversed` HTML attribute of the numbered lists. As a
95
- * result, it will be possible to make the list order descending instead of ascending.
96
- *
97
- * **Note**: This configuration does not affect bulleted and to-do lists.
98
- *
99
- * @default false
100
- */
101
- reversed?: boolean;
102
- }
103
- export interface ListPropertiesStyleConfig {
104
- /**
105
- * When set `true`, the list style feature will use the `type` attribute of `<ul>` and `<ol>` elements instead of the `list-style-type`
106
- * style.
107
- *
108
- * ```ts
109
- * {
110
- * list: {
111
- * properties: {
112
- * styles: {
113
- * useAttribute: true
114
- * },
115
- *
116
- * // ...
117
- * }
118
- * },
119
- *
120
- * // ...
121
- * }
122
- * ```
123
- *
124
- * **Note**: Due to limitations of HTML, the "Decimal with leading zero" style is impossible to set using the `type` attribute.
125
- *
126
- * **Note**: This configuration works only with
127
- * {@link module:list/documentlistproperties~DocumentListProperties document list properties}.
128
- *
129
- * @default false
130
- */
131
- useAttribute?: boolean;
132
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module list/listconfig
7
+ */
8
+ /**
9
+ * The configuration of the {@link module:list/list~List list} feature
10
+ * and the {@link module:list/documentlist~DocumentList document list} feature.
11
+ *
12
+ * ```ts
13
+ * ClassicEditor
14
+ * .create( editorElement, {
15
+ * list: ... // The list feature configuration.
16
+ * } )
17
+ * .then( ... )
18
+ * .catch( ... );
19
+ * ```
20
+ *
21
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
22
+ *
23
+ * @interface ListConfig
24
+ */
25
+ export interface ListConfig {
26
+ /**
27
+ * The configuration of the {@link module:list/listproperties~ListProperties} feature and the
28
+ * {@link module:list/documentlistproperties~DocumentListProperties document list properties} feature.
29
+ *
30
+ * Read more in {@link module:list/listconfig~ListPropertiesConfig}.
31
+ */
32
+ properties?: ListPropertiesConfig;
33
+ /**
34
+ * Allows multiple blocks in single list item.
35
+ *
36
+ * With this option enabled you can have block widgets, for example images or even tables, within a list item.
37
+ *
38
+ * **Note:** This is enabled by default.
39
+ *
40
+ * @default true
41
+ */
42
+ multiBlock?: boolean;
43
+ }
44
+ /**
45
+ * The configuration of the {@link module:list/listproperties~ListProperties list properties} feature and the
46
+ * {@link module:list/documentlistproperties~DocumentListProperties document list properties} feature.
47
+ *
48
+ * This configuration controls the individual list properties. For instance, it enables or disables specific editor commands
49
+ * operating on lists ({@link module:list/listproperties/liststylecommand~ListStyleCommand `'listStyle'`},
50
+ * {@link module:list/listproperties/liststartcommand~ListStartCommand `'listStart'`},
51
+ * {@link module:list/listproperties/listreversedcommand~ListReversedCommand `'listReversed'`}, or on the document lists
52
+ * {@link module:list/documentlistproperties/documentliststylecommand~DocumentListStyleCommand `'listStyle'`},
53
+ * {@link module:list/documentlistproperties/documentliststartcommand~DocumentListStartCommand `'listStart'`},
54
+ * {@link module:list/documentlistproperties/documentlistreversedcommand~DocumentListReversedCommand `'listReversed'`}), the look of the UI
55
+ * (`'numberedList'` and `'bulletedList'` dropdowns), and the editor data pipeline (allowed HTML attributes).
56
+ *
57
+ * ```ts
58
+ * ClassicEditor
59
+ * .create( editorElement, {
60
+ * list: {
61
+ * properties: {
62
+ * styles: true,
63
+ * startIndex: true,
64
+ * reversed: true
65
+ * }
66
+ * }
67
+ * } )
68
+ * .then( ... )
69
+ * .catch( ... );
70
+ * ```
71
+ */
72
+ export interface ListPropertiesConfig {
73
+ /**
74
+ * When set, the list style feature will be enabled.
75
+ * It allows changing the `list-style-type` style or the `type` HTML attribute of a list.
76
+ *
77
+ * **Note**: Styling using the `type` HTML attribute is only available in
78
+ * {@link module:list/documentlistproperties~DocumentListProperties document list properties}
79
+ * ({@link module:list/listconfig~ListPropertiesStyleConfig learn more}).
80
+ *
81
+ * @default true
82
+ */
83
+ styles?: boolean | ListPropertiesStyleConfig;
84
+ /**
85
+ * When set, the list start index feature will be enabled. It allows changing the `start` HTML attribute of the numbered lists. As a
86
+ * result, it will be possible to specify the start value of the first item in an ordered list.
87
+ *
88
+ * **Note**: This configuration does not affect bulleted and to-do lists.
89
+ *
90
+ * @default false
91
+ */
92
+ startIndex?: boolean;
93
+ /**
94
+ * When set, the reversed list feature will be enabled. It allows changing the `reversed` HTML attribute of the numbered lists. As a
95
+ * result, it will be possible to make the list order descending instead of ascending.
96
+ *
97
+ * **Note**: This configuration does not affect bulleted and to-do lists.
98
+ *
99
+ * @default false
100
+ */
101
+ reversed?: boolean;
102
+ }
103
+ export interface ListPropertiesStyleConfig {
104
+ /**
105
+ * When set `true`, the list style feature will use the `type` attribute of `<ul>` and `<ol>` elements instead of the `list-style-type`
106
+ * style.
107
+ *
108
+ * ```ts
109
+ * {
110
+ * list: {
111
+ * properties: {
112
+ * styles: {
113
+ * useAttribute: true
114
+ * },
115
+ *
116
+ * // ...
117
+ * }
118
+ * },
119
+ *
120
+ * // ...
121
+ * }
122
+ * ```
123
+ *
124
+ * **Note**: Due to limitations of HTML, the "Decimal with leading zero" style is impossible to set using the `type` attribute.
125
+ *
126
+ * **Note**: This configuration works only with
127
+ * {@link module:list/documentlistproperties~DocumentListProperties document list properties}.
128
+ *
129
+ * @default false
130
+ */
131
+ useAttribute?: boolean;
132
+ }
package/src/listconfig.js CHANGED
@@ -1,5 +1,5 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- export {};
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ export {};
@@ -1,72 +1,72 @@
1
- /**
2
- * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
- /**
6
- * @module list/listproperties/listpropertiesediting
7
- */
8
- import { Plugin, type Editor } from 'ckeditor5/src/core';
9
- import ListEditing from '../list/listediting';
10
- /**
11
- * The engine of the list properties feature.
12
- *
13
- * It sets the value for the `listItem` attribute of the {@link module:list/list~List `<listItem>`} element that
14
- * allows modifying the list style type.
15
- *
16
- * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.
17
- * Read more in {@link module:list/listconfig~ListPropertiesConfig}.
18
- */
19
- export default class ListPropertiesEditing extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get requires(): readonly [typeof ListEditing];
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName(): "ListPropertiesEditing";
28
- /**
29
- * @inheritDoc
30
- */
31
- constructor(editor: Editor);
32
- /**
33
- * @inheritDoc
34
- */
35
- init(): void;
36
- /**
37
- * @inheritDoc
38
- */
39
- afterInit(): void;
40
- /**
41
- * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single
42
- * one after deleting the content.
43
- *
44
- * The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values
45
- * for the list that was merged.
46
- *
47
- * Consider the following model's content:
48
- *
49
- * ```xml
50
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
51
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
52
- * <paragraph>[A paragraph.]</paragraph>
53
- * <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 1</listItem>
54
- * <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 2</listItem>
55
- * ```
56
- *
57
- * After removing the paragraph element, the second list will be merged into the first one.
58
- * We want to inherit the `listStyle` attribute for the second list from the first one.
59
- *
60
- * ```xml
61
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
62
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
63
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
64
- * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
65
- * ```
66
- *
67
- * See https://github.com/ckeditor/ckeditor5/issues/7879.
68
- *
69
- * @param attributeStrategies Strategies for the enabled attributes.
70
- */
71
- private _mergeListAttributesWhileMergingLists;
72
- }
1
+ /**
2
+ * @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module list/listproperties/listpropertiesediting
7
+ */
8
+ import { Plugin, type Editor } from 'ckeditor5/src/core';
9
+ import ListEditing from '../list/listediting';
10
+ /**
11
+ * The engine of the list properties feature.
12
+ *
13
+ * It sets the value for the `listItem` attribute of the {@link module:list/list~List `<listItem>`} element that
14
+ * allows modifying the list style type.
15
+ *
16
+ * It registers the `'listStyle'`, `'listReversed'` and `'listStart'` commands if they are enabled in the configuration.
17
+ * Read more in {@link module:list/listconfig~ListPropertiesConfig}.
18
+ */
19
+ export default class ListPropertiesEditing extends Plugin {
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): readonly [typeof ListEditing];
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "ListPropertiesEditing";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ constructor(editor: Editor);
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ /**
37
+ * @inheritDoc
38
+ */
39
+ afterInit(): void;
40
+ /**
41
+ * Starts listening to {@link module:engine/model/model~Model#deleteContent} and checks whether two lists will be merged into a single
42
+ * one after deleting the content.
43
+ *
44
+ * The purpose of this action is to adjust the `listStyle`, `listReversed` and `listStart` values
45
+ * for the list that was merged.
46
+ *
47
+ * Consider the following model's content:
48
+ *
49
+ * ```xml
50
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
51
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
52
+ * <paragraph>[A paragraph.]</paragraph>
53
+ * <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 1</listItem>
54
+ * <listItem listIndent="0" listType="bulleted" listStyle="circle">UL List item 2</listItem>
55
+ * ```
56
+ *
57
+ * After removing the paragraph element, the second list will be merged into the first one.
58
+ * We want to inherit the `listStyle` attribute for the second list from the first one.
59
+ *
60
+ * ```xml
61
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
62
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
63
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 1</listItem>
64
+ * <listItem listIndent="0" listType="bulleted" listStyle="square">UL List item 2</listItem>
65
+ * ```
66
+ *
67
+ * See https://github.com/ckeditor/ckeditor5/issues/7879.
68
+ *
69
+ * @param attributeStrategies Strategies for the enabled attributes.
70
+ */
71
+ private _mergeListAttributesWhileMergingLists;
72
+ }