@ckeditor/ckeditor5-alignment 0.0.0-internal-20241017.0 → 0.0.0-internal-20241206.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 (187) hide show
  1. package/LICENSE.md +7 -2
  2. package/README.md +18 -7
  3. package/build/translations/ast.js +1 -0
  4. package/build/translations/eo.js +1 -0
  5. package/build/translations/eu.js +1 -0
  6. package/build/translations/gu.js +1 -0
  7. package/build/translations/hy.js +1 -0
  8. package/build/translations/kn.js +1 -0
  9. package/build/translations/oc.js +1 -0
  10. package/build/translations/si.js +1 -0
  11. package/dist/index.js +89 -89
  12. package/dist/index.js.map +1 -1
  13. package/dist/translations/ar.js +1 -1
  14. package/dist/translations/ar.umd.js +1 -1
  15. package/dist/translations/ast.d.ts +8 -0
  16. package/dist/translations/ast.js +5 -0
  17. package/dist/translations/ast.umd.js +11 -0
  18. package/dist/translations/bs.js +1 -1
  19. package/dist/translations/bs.umd.js +1 -1
  20. package/dist/translations/cs.js +1 -1
  21. package/dist/translations/cs.umd.js +1 -1
  22. package/dist/translations/en.js +1 -1
  23. package/dist/translations/en.umd.js +1 -1
  24. package/dist/translations/eo.d.ts +8 -0
  25. package/dist/translations/eo.js +5 -0
  26. package/dist/translations/eo.umd.js +11 -0
  27. package/dist/translations/es-co.js +1 -1
  28. package/dist/translations/es-co.umd.js +1 -1
  29. package/dist/translations/es.js +1 -1
  30. package/dist/translations/es.umd.js +1 -1
  31. package/dist/translations/eu.d.ts +8 -0
  32. package/dist/translations/eu.js +5 -0
  33. package/dist/translations/eu.umd.js +11 -0
  34. package/dist/translations/fa.js +1 -1
  35. package/dist/translations/fa.umd.js +1 -1
  36. package/dist/translations/fr.js +1 -1
  37. package/dist/translations/fr.umd.js +1 -1
  38. package/dist/translations/gu.d.ts +8 -0
  39. package/dist/translations/gu.js +5 -0
  40. package/dist/translations/gu.umd.js +11 -0
  41. package/dist/translations/he.js +1 -1
  42. package/dist/translations/he.umd.js +1 -1
  43. package/dist/translations/hr.js +1 -1
  44. package/dist/translations/hr.umd.js +1 -1
  45. package/dist/translations/hy.d.ts +8 -0
  46. package/dist/translations/hy.js +5 -0
  47. package/dist/translations/hy.umd.js +11 -0
  48. package/dist/translations/it.js +1 -1
  49. package/dist/translations/it.umd.js +1 -1
  50. package/dist/translations/jv.js +1 -1
  51. package/dist/translations/jv.umd.js +1 -1
  52. package/dist/translations/kk.js +1 -1
  53. package/dist/translations/kk.umd.js +1 -1
  54. package/dist/translations/kn.d.ts +8 -0
  55. package/dist/translations/kn.js +5 -0
  56. package/dist/translations/kn.umd.js +11 -0
  57. package/dist/translations/lt.js +1 -1
  58. package/dist/translations/lt.umd.js +1 -1
  59. package/dist/translations/lv.js +1 -1
  60. package/dist/translations/lv.umd.js +1 -1
  61. package/dist/translations/oc.d.ts +8 -0
  62. package/dist/translations/oc.js +5 -0
  63. package/dist/translations/oc.umd.js +11 -0
  64. package/dist/translations/pl.js +1 -1
  65. package/dist/translations/pl.umd.js +1 -1
  66. package/dist/translations/pt-br.js +1 -1
  67. package/dist/translations/pt-br.umd.js +1 -1
  68. package/dist/translations/pt.js +1 -1
  69. package/dist/translations/pt.umd.js +1 -1
  70. package/dist/translations/ro.js +1 -1
  71. package/dist/translations/ro.umd.js +1 -1
  72. package/dist/translations/ru.js +1 -1
  73. package/dist/translations/ru.umd.js +1 -1
  74. package/dist/translations/si.d.ts +8 -0
  75. package/dist/translations/si.js +5 -0
  76. package/dist/translations/si.umd.js +11 -0
  77. package/dist/translations/sk.js +1 -1
  78. package/dist/translations/sk.umd.js +1 -1
  79. package/dist/translations/sl.js +1 -1
  80. package/dist/translations/sl.umd.js +1 -1
  81. package/dist/translations/sr-latn.js +1 -1
  82. package/dist/translations/sr-latn.umd.js +1 -1
  83. package/dist/translations/sr.js +1 -1
  84. package/dist/translations/sr.umd.js +1 -1
  85. package/dist/translations/ug.js +1 -1
  86. package/dist/translations/ug.umd.js +1 -1
  87. package/dist/translations/uk.js +1 -1
  88. package/dist/translations/uk.umd.js +1 -1
  89. package/dist/translations/uz.js +1 -1
  90. package/dist/translations/uz.umd.js +1 -1
  91. package/lang/translations/af.po +3 -9
  92. package/lang/translations/ar.po +4 -10
  93. package/lang/translations/ast.po +36 -0
  94. package/lang/translations/az.po +3 -9
  95. package/lang/translations/bg.po +3 -9
  96. package/lang/translations/bn.po +3 -9
  97. package/lang/translations/bs.po +4 -10
  98. package/lang/translations/ca.po +3 -9
  99. package/lang/translations/cs.po +4 -10
  100. package/lang/translations/da.po +3 -9
  101. package/lang/translations/de-ch.po +3 -9
  102. package/lang/translations/de.po +3 -9
  103. package/lang/translations/el.po +3 -9
  104. package/lang/translations/en-au.po +3 -9
  105. package/lang/translations/en-gb.po +3 -9
  106. package/lang/translations/en.po +5 -11
  107. package/lang/translations/eo.po +36 -0
  108. package/lang/translations/es-co.po +4 -10
  109. package/lang/translations/es.po +4 -10
  110. package/lang/translations/et.po +3 -9
  111. package/lang/translations/eu.po +36 -0
  112. package/lang/translations/fa.po +4 -10
  113. package/lang/translations/fi.po +3 -9
  114. package/lang/translations/fr.po +4 -10
  115. package/lang/translations/gl.po +3 -9
  116. package/lang/translations/gu.po +36 -0
  117. package/lang/translations/he.po +4 -10
  118. package/lang/translations/hi.po +3 -9
  119. package/lang/translations/hr.po +4 -10
  120. package/lang/translations/hu.po +3 -9
  121. package/lang/translations/hy.po +36 -0
  122. package/lang/translations/id.po +3 -9
  123. package/lang/translations/it.po +4 -10
  124. package/lang/translations/ja.po +3 -9
  125. package/lang/translations/jv.po +4 -10
  126. package/lang/translations/kk.po +4 -10
  127. package/lang/translations/km.po +3 -9
  128. package/lang/translations/kn.po +36 -0
  129. package/lang/translations/ko.po +3 -9
  130. package/lang/translations/ku.po +3 -9
  131. package/lang/translations/lt.po +4 -10
  132. package/lang/translations/lv.po +4 -10
  133. package/lang/translations/ms.po +3 -9
  134. package/lang/translations/nb.po +3 -9
  135. package/lang/translations/ne.po +3 -9
  136. package/lang/translations/nl.po +3 -9
  137. package/lang/translations/no.po +3 -9
  138. package/lang/translations/oc.po +36 -0
  139. package/lang/translations/pl.po +4 -10
  140. package/lang/translations/pt-br.po +4 -10
  141. package/lang/translations/pt.po +4 -10
  142. package/lang/translations/ro.po +4 -10
  143. package/lang/translations/ru.po +4 -10
  144. package/lang/translations/si.po +36 -0
  145. package/lang/translations/sk.po +4 -10
  146. package/lang/translations/sl.po +4 -10
  147. package/lang/translations/sq.po +3 -9
  148. package/lang/translations/sr-latn.po +4 -10
  149. package/lang/translations/sr.po +4 -10
  150. package/lang/translations/sv.po +3 -9
  151. package/lang/translations/th.po +3 -9
  152. package/lang/translations/ti.po +3 -9
  153. package/lang/translations/tk.po +3 -9
  154. package/lang/translations/tr.po +3 -9
  155. package/lang/translations/tt.po +3 -9
  156. package/lang/translations/ug.po +4 -10
  157. package/lang/translations/uk.po +4 -10
  158. package/lang/translations/ur.po +3 -9
  159. package/lang/translations/uz.po +4 -10
  160. package/lang/translations/vi.po +3 -9
  161. package/lang/translations/zh-cn.po +3 -9
  162. package/lang/translations/zh.po +3 -9
  163. package/package.json +25 -7
  164. package/src/alignment.d.ts +1 -1
  165. package/src/alignment.js +1 -1
  166. package/src/alignmentcommand.d.ts +1 -1
  167. package/src/alignmentcommand.js +1 -1
  168. package/src/alignmentconfig.d.ts +1 -1
  169. package/src/alignmentconfig.js +1 -1
  170. package/src/alignmentediting.d.ts +1 -1
  171. package/src/alignmentediting.js +1 -1
  172. package/src/alignmentui.d.ts +1 -1
  173. package/src/alignmentui.js +1 -1
  174. package/src/augmentation.d.ts +1 -1
  175. package/src/augmentation.js +1 -1
  176. package/src/index.d.ts +1 -1
  177. package/src/index.js +1 -1
  178. package/src/utils.d.ts +1 -1
  179. package/src/utils.js +1 -1
  180. package/dist/alignment.d.ts +0 -37
  181. package/dist/alignmentcommand.d.ts +0 -47
  182. package/dist/alignmentconfig.d.ts +0 -76
  183. package/dist/alignmentediting.d.ts +0 -34
  184. package/dist/alignmentui.d.ts +0 -73
  185. package/dist/augmentation.d.ts +0 -27
  186. package/dist/index.d.ts +0 -17
  187. package/dist/utils.d.ts +0 -43
package/LICENSE.md CHANGED
@@ -1,10 +1,15 @@
1
1
  Software License Agreement
2
2
  ==========================
3
3
 
4
- **CKEditor&nbsp;5 text alignment feature** – https://github.com/ckeditor/ckeditor5-alignment <br>
4
+ **CKEditor&nbsp;5 Text alignment feature** (https://github.com/ckeditor/ckeditor5)<br>
5
5
  Copyright (c) 2003–2024, [CKSource Holding sp. z o.o.](https://cksource.com) All rights reserved.
6
6
 
7
- Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html).
7
+ Licensed under a dual-license model, this software is available under:
8
+
9
+ * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
10
+ * or commercial license terms from CKSource Holding sp. z o.o.
11
+
12
+ For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
8
13
 
9
14
  Sources of Intellectual Property Included in CKEditor
10
15
  -----------------------------------------------------
package/README.md CHANGED
@@ -3,10 +3,22 @@ CKEditor&nbsp;5 text alignment feature
3
3
 
4
4
  [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-alignment.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-alignment)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/ckeditor/ckeditor5/badge.svg?branch=master)](https://coveralls.io/github/ckeditor/ckeditor5?branch=master)
6
- [![Build Status](https://travis-ci.com/ckeditor/ckeditor5.svg?branch=master)](https://app.travis-ci.com/github/ckeditor/ckeditor5)
6
+ [![CircleCI](https://circleci.com/gh/ckeditor/ckeditor5.svg?style=shield)](https://app.circleci.com/pipelines/github/ckeditor/ckeditor5?branch=master)
7
7
 
8
8
  This package implements text alignment support for CKEditor&nbsp;5.
9
9
 
10
+ ## Installation
11
+
12
+ This plugin is part of the `ckeditor5` package. Install the whole package to use it.
13
+
14
+ ```bash
15
+ npm install ckeditor5
16
+ ```
17
+
18
+ ## Create free account
19
+
20
+ If you want to check full CKEditor&nbsp;5 capabilities, sign up for a [free non-commitment 14-day trial](https://portal.ckeditor.com/checkout?plan=free).
21
+
10
22
  ## Demo
11
23
 
12
24
  Check out the [demo in the text alignment feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/text-alignment.html#demo).
@@ -15,12 +27,11 @@ Check out the [demo in the text alignment feature guide](https://ckeditor.com/do
15
27
 
16
28
  See the [`@ckeditor/ckeditor5-alignment` package](https://ckeditor.com/docs/ckeditor5/latest/api/alignment.html) page in [CKEditor&nbsp;5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
17
29
 
18
- ## Installation
30
+ ## License
19
31
 
20
- ```bash
21
- npm install ckeditor5
22
- ```
32
+ Licensed under a dual-license model, this software is available under:
23
33
 
24
- ## License
34
+ * the [GNU General Public License Version 2 or later](https://www.gnu.org/licenses/gpl.html),
35
+ * or commercial license terms from CKSource Holding sp. z o.o.
25
36
 
26
- Licensed under the terms of [GNU General Public License Version 2 or later](http://www.gnu.org/licenses/gpl.html). For full details about the license, please check the `LICENSE.md` file or [https://ckeditor.com/legal/ckeditor-oss-license](https://ckeditor.com/legal/ckeditor-oss-license).
37
+ For more information, see: [https://ckeditor.com/legal/ckeditor-licensing-options](https://ckeditor.com/legal/ckeditor-licensing-options).
@@ -0,0 +1 @@
1
+ !function(n){const t=n.ast=n.ast||{};t.dictionary=Object.assign(t.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.eo=n.eo||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.eu=n.eu||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.gu=n.gu||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.hy=n.hy||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.kn=n.kn||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(n){const i=n.oc=n.oc||{};i.dictionary=Object.assign(i.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
@@ -0,0 +1 @@
1
+ !function(i){const n=i.si=i.si||{};n.dictionary=Object.assign(n.dictionary||{},{"Align center":"","Align left":"","Align right":"",Justify:"","Text alignment":"","Text alignment toolbar":""})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));
package/dist/index.js CHANGED
@@ -63,12 +63,12 @@ import { ButtonView, createDropdown, addToolbarToDropdown, MenuBarMenuView, Menu
63
63
  const isNameValid = supportedOptions.includes(option.name);
64
64
  if (!isNameValid) {
65
65
  /**
66
- * The `name` in one of the `alignment.options` is not recognized.
67
- * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.
68
- *
69
- * @error alignment-config-name-not-recognized
70
- * @param option Options with unknown value of the `name` property.
71
- */ logWarning('alignment-config-name-not-recognized', {
66
+ * The `name` in one of the `alignment.options` is not recognized.
67
+ * The available options are: `'left'`, `'right'`, `'center'` and `'justify'`.
68
+ *
69
+ * @error alignment-config-name-not-recognized
70
+ * @param option Options with unknown value of the `name` property.
71
+ */ logWarning('alignment-config-name-not-recognized', {
72
72
  option
73
73
  });
74
74
  }
@@ -78,11 +78,11 @@ import { ButtonView, createDropdown, addToolbarToDropdown, MenuBarMenuView, Menu
78
78
  // We either use classes for all styling options or for none.
79
79
  if (classNameCount && classNameCount < normalizedOptions.length) {
80
80
  /**
81
- * The `className` property has to be defined for all options once at least one option declares `className`.
82
- *
83
- * @error alignment-config-classnames-are-missing
84
- * @param configuredOptions Contents of `alignment.options`.
85
- */ throw new CKEditorError('alignment-config-classnames-are-missing', {
81
+ * The `className` property has to be defined for all options once at least one option declares `className`.
82
+ *
83
+ * @error alignment-config-classnames-are-missing
84
+ * @param configuredOptions Contents of `alignment.options`.
85
+ */ throw new CKEditorError('alignment-config-classnames-are-missing', {
86
86
  configuredOptions
87
87
  });
88
88
  }
@@ -92,13 +92,13 @@ import { ButtonView, createDropdown, addToolbarToDropdown, MenuBarMenuView, Menu
92
92
  const nameAlreadyExists = succeedingOptions.some((item)=>item.name == option.name);
93
93
  if (nameAlreadyExists) {
94
94
  /**
95
- * The same `name` in one of the `alignment.options` was already declared.
96
- * Each `name` representing one alignment option can be set exactly once.
97
- *
98
- * @error alignment-config-name-already-defined
99
- * @param option First option that declares given `name`.
100
- * @param configuredOptions Contents of `alignment.options`.
101
- */ throw new CKEditorError('alignment-config-name-already-defined', {
95
+ * The same `name` in one of the `alignment.options` was already declared.
96
+ * Each `name` representing one alignment option can be set exactly once.
97
+ *
98
+ * @error alignment-config-name-already-defined
99
+ * @param option First option that declares given `name`.
100
+ * @param configuredOptions Contents of `alignment.options`.
101
+ */ throw new CKEditorError('alignment-config-name-already-defined', {
102
102
  option,
103
103
  configuredOptions
104
104
  });
@@ -108,13 +108,13 @@ import { ButtonView, createDropdown, addToolbarToDropdown, MenuBarMenuView, Menu
108
108
  const classNameAlreadyExists = succeedingOptions.some((item)=>item.className == option.className);
109
109
  if (classNameAlreadyExists) {
110
110
  /**
111
- * The same `className` in one of the `alignment.options` was already declared.
112
- *
113
- * @error alignment-config-classname-already-defined
114
- * @param option First option that declares given `className`.
115
- * @param configuredOptions
116
- * Contents of `alignment.options`.
117
- */ throw new CKEditorError('alignment-config-classname-already-defined', {
111
+ * The same `className` in one of the `alignment.options` was already declared.
112
+ *
113
+ * @error alignment-config-classname-already-defined
114
+ * @param option First option that declares given `className`.
115
+ * @param configuredOptions
116
+ * Contents of `alignment.options`.
117
+ */ throw new CKEditorError('alignment-config-classname-already-defined', {
118
118
  option,
119
119
  configuredOptions
120
120
  });
@@ -129,8 +129,8 @@ const ALIGNMENT = 'alignment';
129
129
  * The alignment command plugin.
130
130
  */ class AlignmentCommand extends Command {
131
131
  /**
132
- * @inheritDoc
133
- */ refresh() {
132
+ * @inheritDoc
133
+ */ refresh() {
134
134
  const editor = this.editor;
135
135
  const locale = editor.locale;
136
136
  const firstBlock = first(this.editor.model.document.selection.getSelectedBlocks());
@@ -143,14 +143,14 @@ const ALIGNMENT = 'alignment';
143
143
  }
144
144
  }
145
145
  /**
146
- * Executes the command. Applies the alignment `value` to the selected blocks.
147
- * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,
148
- * the command will remove the attribute from the selected blocks.
149
- *
150
- * @param options Options for the executed command.
151
- * @param options.value The value to apply.
152
- * @fires execute
153
- */ execute(options = {}) {
146
+ * Executes the command. Applies the alignment `value` to the selected blocks.
147
+ * If no `value` is passed, the `value` is the default one or it is equal to the currently selected block's alignment attribute,
148
+ * the command will remove the attribute from the selected blocks.
149
+ *
150
+ * @param options Options for the executed command.
151
+ * @param options.value The value to apply.
152
+ * @fires execute
153
+ */ execute(options = {}) {
154
154
  const editor = this.editor;
155
155
  const locale = editor.locale;
156
156
  const model = editor.model;
@@ -173,10 +173,10 @@ const ALIGNMENT = 'alignment';
173
173
  });
174
174
  }
175
175
  /**
176
- * Checks whether a block can have alignment set.
177
- *
178
- * @param block The block to be checked.
179
- */ _canBeAligned(block) {
176
+ * Checks whether a block can have alignment set.
177
+ *
178
+ * @param block The block to be checked.
179
+ */ _canBeAligned(block) {
180
180
  return this.editor.model.schema.checkAttribute(block, ALIGNMENT);
181
181
  }
182
182
  }
@@ -200,18 +200,18 @@ const ALIGNMENT = 'alignment';
200
200
  * the `alignment` attribute for block elements in the {@link module:engine/model/model~Model model}.
201
201
  */ class AlignmentEditing extends Plugin {
202
202
  /**
203
- * @inheritDoc
204
- */ static get pluginName() {
203
+ * @inheritDoc
204
+ */ static get pluginName() {
205
205
  return 'AlignmentEditing';
206
206
  }
207
207
  /**
208
- * @inheritDoc
209
- */ static get isOfficialPlugin() {
208
+ * @inheritDoc
209
+ */ static get isOfficialPlugin() {
210
210
  return true;
211
211
  }
212
212
  /**
213
- * @inheritDoc
214
- */ constructor(editor){
213
+ * @inheritDoc
214
+ */ constructor(editor){
215
215
  super(editor);
216
216
  editor.config.define('alignment', {
217
217
  options: supportedOptions.map((option)=>({
@@ -220,8 +220,8 @@ const ALIGNMENT = 'alignment';
220
220
  });
221
221
  }
222
222
  /**
223
- * @inheritDoc
224
- */ init() {
223
+ * @inheritDoc
224
+ */ init() {
225
225
  const editor = this.editor;
226
226
  const locale = editor.locale;
227
227
  const schema = editor.model.schema;
@@ -360,18 +360,18 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
360
360
  * and the `'alignment'` dropdown.
361
361
  */ class AlignmentUI extends Plugin {
362
362
  /**
363
- * Returns the localized option titles provided by the plugin.
364
- *
365
- * The following localized titles corresponding with
366
- * {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:
367
- *
368
- * * `'left'`,
369
- * * `'right'`,
370
- * * `'center'`,
371
- * * `'justify'`.
372
- *
373
- * @readonly
374
- */ get localizedOptionTitles() {
363
+ * Returns the localized option titles provided by the plugin.
364
+ *
365
+ * The following localized titles corresponding with
366
+ * {@link module:alignment/alignmentconfig~AlignmentConfig#options} are available:
367
+ *
368
+ * * `'left'`,
369
+ * * `'right'`,
370
+ * * `'center'`,
371
+ * * `'justify'`.
372
+ *
373
+ * @readonly
374
+ */ get localizedOptionTitles() {
375
375
  const t = this.editor.t;
376
376
  return {
377
377
  'left': t('Align left'),
@@ -381,18 +381,18 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
381
381
  };
382
382
  }
383
383
  /**
384
- * @inheritDoc
385
- */ static get pluginName() {
384
+ * @inheritDoc
385
+ */ static get pluginName() {
386
386
  return 'AlignmentUI';
387
387
  }
388
388
  /**
389
- * @inheritDoc
390
- */ static get isOfficialPlugin() {
389
+ * @inheritDoc
390
+ */ static get isOfficialPlugin() {
391
391
  return true;
392
392
  }
393
393
  /**
394
- * @inheritDoc
395
- */ init() {
394
+ * @inheritDoc
395
+ */ init() {
396
396
  const editor = this.editor;
397
397
  const options = normalizeAlignmentOptions(editor.config.get('alignment.options'));
398
398
  options.map((option)=>option.name).filter(isSupported).forEach((option)=>this._addButton(option));
@@ -400,20 +400,20 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
400
400
  this._addMenuBarMenu(options);
401
401
  }
402
402
  /**
403
- * Helper method for initializing the button and linking it with an appropriate command.
404
- *
405
- * @param option The name of the alignment option for which the button is added.
406
- */ _addButton(option) {
403
+ * Helper method for initializing the button and linking it with an appropriate command.
404
+ *
405
+ * @param option The name of the alignment option for which the button is added.
406
+ */ _addButton(option) {
407
407
  const editor = this.editor;
408
408
  editor.ui.componentFactory.add(`alignment:${option}`, (locale)=>this._createButton(locale, option));
409
409
  }
410
410
  /**
411
- * Helper method for creating the button view element.
412
- *
413
- * @param locale Editor locale.
414
- * @param option The name of the alignment option for which the button is added.
415
- * @param buttonAttrs Optional parameters passed to button view instance.
416
- */ _createButton(locale, option, buttonAttrs = {}) {
411
+ * Helper method for creating the button view element.
412
+ *
413
+ * @param locale Editor locale.
414
+ * @param option The name of the alignment option for which the button is added.
415
+ * @param buttonAttrs Optional parameters passed to button view instance.
416
+ */ _createButton(locale, option, buttonAttrs = {}) {
417
417
  const editor = this.editor;
418
418
  const command = editor.commands.get('alignment');
419
419
  const buttonView = new ButtonView(locale);
@@ -437,10 +437,10 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
437
437
  return buttonView;
438
438
  }
439
439
  /**
440
- * Helper method for initializing the toolnar dropdown and linking it with an appropriate command.
441
- *
442
- * @param option The name of the alignment option for which the button is added.
443
- */ _addToolbarDropdown(options) {
440
+ * Helper method for initializing the toolnar dropdown and linking it with an appropriate command.
441
+ *
442
+ * @param option The name of the alignment option for which the button is added.
443
+ */ _addToolbarDropdown(options) {
444
444
  const editor = this.editor;
445
445
  const factory = editor.ui.componentFactory;
446
446
  factory.add('alignment', (locale)=>{
@@ -481,10 +481,10 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
481
481
  });
482
482
  }
483
483
  /**
484
- * Creates a menu for all alignment options to use either in menu bar.
485
- *
486
- * @param options Normalized alignment options from config.
487
- */ _addMenuBarMenu(options) {
484
+ * Creates a menu for all alignment options to use either in menu bar.
485
+ *
486
+ * @param options Normalized alignment options from config.
487
+ */ _addMenuBarMenu(options) {
488
488
  const editor = this.editor;
489
489
  editor.ui.componentFactory.add('menuBar:alignment', (locale)=>{
490
490
  const command = editor.commands.get('alignment');
@@ -536,21 +536,21 @@ const iconsMap = /* #__PURE__ */ (()=>new Map([
536
536
  * {@link module:alignment/alignmentui~AlignmentUI} plugins.
537
537
  */ class Alignment extends Plugin {
538
538
  /**
539
- * @inheritDoc
540
- */ static get requires() {
539
+ * @inheritDoc
540
+ */ static get requires() {
541
541
  return [
542
542
  AlignmentEditing,
543
543
  AlignmentUI
544
544
  ];
545
545
  }
546
546
  /**
547
- * @inheritDoc
548
- */ static get pluginName() {
547
+ * @inheritDoc
548
+ */ static get pluginName() {
549
549
  return 'Alignment';
550
550
  }
551
551
  /**
552
- * @inheritDoc
553
- */ static get isOfficialPlugin() {
552
+ * @inheritDoc
553
+ */ static get isOfficialPlugin() {
554
554
  return true;
555
555
  }
556
556
  }