@ckeditor/ckeditor5-image 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.
Files changed (211) hide show
  1. package/dist/augmentation.d.ts +55 -55
  2. package/dist/autoimage.d.ts +51 -51
  3. package/dist/image/converters.d.ts +78 -56
  4. package/dist/image/imageblockediting.d.ts +58 -58
  5. package/dist/image/imageediting.d.ts +29 -29
  6. package/dist/image/imageinlineediting.d.ts +59 -59
  7. package/dist/image/imageloadobserver.d.ts +40 -40
  8. package/dist/image/imageplaceholder.d.ts +38 -38
  9. package/dist/image/imagetypecommand.d.ts +39 -39
  10. package/dist/image/insertimagecommand.d.ts +65 -65
  11. package/dist/image/replaceimagesourcecommand.d.ts +46 -46
  12. package/dist/image/ui/utils.d.ts +21 -21
  13. package/dist/image/utils.d.ts +89 -56
  14. package/dist/image.d.ts +33 -33
  15. package/dist/imageblock.d.ts +33 -33
  16. package/dist/imagecaption/imagecaptionediting.d.ts +88 -88
  17. package/dist/imagecaption/imagecaptionui.d.ts +25 -25
  18. package/dist/imagecaption/imagecaptionutils.d.ts +37 -37
  19. package/dist/imagecaption/toggleimagecaptioncommand.d.ts +62 -62
  20. package/dist/imagecaption.d.ts +25 -25
  21. package/dist/imageconfig.d.ts +698 -698
  22. package/dist/imageinline.d.ts +33 -33
  23. package/dist/imageinsert/imageinsertui.d.ts +82 -82
  24. package/dist/imageinsert/imageinsertviaurlui.d.ts +65 -65
  25. package/dist/imageinsert/ui/imageinsertformview.d.ts +53 -53
  26. package/dist/imageinsert/ui/imageinserturlview.d.ts +61 -61
  27. package/dist/imageinsert.d.ts +32 -32
  28. package/dist/imageinsertviaurl.d.ts +30 -30
  29. package/dist/imageresize/imagecustomresizeui.d.ts +60 -60
  30. package/dist/imageresize/imageresizebuttons.d.ts +66 -66
  31. package/dist/imageresize/imageresizeediting.d.ts +50 -50
  32. package/dist/imageresize/imageresizehandles.d.ts +31 -31
  33. package/dist/imageresize/resizeimagecommand.d.ts +37 -37
  34. package/dist/imageresize/ui/imagecustomresizeformview.d.ts +125 -125
  35. package/dist/imageresize/utils/getselectedimageeditornodes.d.ts +17 -17
  36. package/dist/imageresize/utils/getselectedimagepossibleresizerange.d.ts +18 -18
  37. package/dist/imageresize/utils/getselectedimagewidthinunits.d.ts +20 -17
  38. package/dist/imageresize.d.ts +27 -27
  39. package/dist/imagesizeattributes.d.ts +33 -33
  40. package/dist/imagestyle/converters.d.ts +18 -18
  41. package/dist/imagestyle/imagestylecommand.d.ts +73 -63
  42. package/dist/imagestyle/imagestyleediting.d.ts +49 -49
  43. package/dist/imagestyle/imagestyleui.d.ts +55 -55
  44. package/dist/imagestyle/utils.d.ts +88 -88
  45. package/dist/imagestyle.d.ts +31 -31
  46. package/dist/imagetextalternative/imagetextalternativecommand.d.ts +29 -29
  47. package/dist/imagetextalternative/imagetextalternativeediting.d.ts +27 -27
  48. package/dist/imagetextalternative/imagetextalternativeui.d.ts +67 -67
  49. package/dist/imagetextalternative/ui/textalternativeformview.d.ts +88 -88
  50. package/dist/imagetextalternative.d.ts +28 -28
  51. package/dist/imagetoolbar.d.ts +34 -34
  52. package/dist/imageupload/imageuploadediting.d.ts +118 -118
  53. package/dist/imageupload/imageuploadprogress.d.ts +41 -41
  54. package/dist/imageupload/imageuploadui.d.ts +46 -46
  55. package/dist/imageupload/uploadimagecommand.d.ts +67 -67
  56. package/dist/imageupload/utils.d.ts +27 -27
  57. package/dist/imageupload.d.ts +31 -31
  58. package/dist/imageutils.d.ts +124 -124
  59. package/dist/index.css.map +1 -1
  60. package/dist/index.d.ts +68 -70
  61. package/dist/index.js +6032 -6533
  62. package/dist/index.js.map +1 -1
  63. package/dist/pictureediting.d.ts +87 -87
  64. package/dist/translations/af.js +1 -1
  65. package/dist/translations/af.umd.js +1 -1
  66. package/dist/translations/ar.js +1 -1
  67. package/dist/translations/ar.umd.js +1 -1
  68. package/dist/translations/ast.js +1 -1
  69. package/dist/translations/ast.umd.js +1 -1
  70. package/dist/translations/az.js +1 -1
  71. package/dist/translations/az.umd.js +1 -1
  72. package/dist/translations/be.js +1 -1
  73. package/dist/translations/be.umd.js +1 -1
  74. package/dist/translations/bg.js +1 -1
  75. package/dist/translations/bg.umd.js +1 -1
  76. package/dist/translations/bn.js +1 -1
  77. package/dist/translations/bn.umd.js +1 -1
  78. package/dist/translations/bs.js +1 -1
  79. package/dist/translations/bs.umd.js +1 -1
  80. package/dist/translations/ca.js +1 -1
  81. package/dist/translations/ca.umd.js +1 -1
  82. package/dist/translations/cs.js +1 -1
  83. package/dist/translations/cs.umd.js +1 -1
  84. package/dist/translations/da.js +1 -1
  85. package/dist/translations/da.umd.js +1 -1
  86. package/dist/translations/de-ch.js +1 -1
  87. package/dist/translations/de-ch.umd.js +1 -1
  88. package/dist/translations/de.js +1 -1
  89. package/dist/translations/de.umd.js +1 -1
  90. package/dist/translations/el.js +1 -1
  91. package/dist/translations/el.umd.js +1 -1
  92. package/dist/translations/en-au.js +1 -1
  93. package/dist/translations/en-au.umd.js +1 -1
  94. package/dist/translations/en-gb.js +1 -1
  95. package/dist/translations/en-gb.umd.js +1 -1
  96. package/dist/translations/en.js +1 -1
  97. package/dist/translations/en.umd.js +1 -1
  98. package/dist/translations/eo.js +1 -1
  99. package/dist/translations/eo.umd.js +1 -1
  100. package/dist/translations/es-co.js +1 -1
  101. package/dist/translations/es-co.umd.js +1 -1
  102. package/dist/translations/es.js +1 -1
  103. package/dist/translations/es.umd.js +1 -1
  104. package/dist/translations/et.js +1 -1
  105. package/dist/translations/et.umd.js +1 -1
  106. package/dist/translations/eu.js +1 -1
  107. package/dist/translations/eu.umd.js +1 -1
  108. package/dist/translations/fa.js +1 -1
  109. package/dist/translations/fa.umd.js +1 -1
  110. package/dist/translations/fi.js +1 -1
  111. package/dist/translations/fi.umd.js +1 -1
  112. package/dist/translations/fr.js +1 -1
  113. package/dist/translations/fr.umd.js +1 -1
  114. package/dist/translations/gl.js +1 -1
  115. package/dist/translations/gl.umd.js +1 -1
  116. package/dist/translations/gu.js +1 -1
  117. package/dist/translations/gu.umd.js +1 -1
  118. package/dist/translations/he.js +1 -1
  119. package/dist/translations/he.umd.js +1 -1
  120. package/dist/translations/hi.js +1 -1
  121. package/dist/translations/hi.umd.js +1 -1
  122. package/dist/translations/hr.js +1 -1
  123. package/dist/translations/hr.umd.js +1 -1
  124. package/dist/translations/hu.js +1 -1
  125. package/dist/translations/hu.umd.js +1 -1
  126. package/dist/translations/hy.js +1 -1
  127. package/dist/translations/hy.umd.js +1 -1
  128. package/dist/translations/id.js +1 -1
  129. package/dist/translations/id.umd.js +1 -1
  130. package/dist/translations/it.js +1 -1
  131. package/dist/translations/it.umd.js +1 -1
  132. package/dist/translations/ja.js +1 -1
  133. package/dist/translations/ja.umd.js +1 -1
  134. package/dist/translations/jv.js +1 -1
  135. package/dist/translations/jv.umd.js +1 -1
  136. package/dist/translations/kk.js +1 -1
  137. package/dist/translations/kk.umd.js +1 -1
  138. package/dist/translations/km.js +1 -1
  139. package/dist/translations/km.umd.js +1 -1
  140. package/dist/translations/kn.js +1 -1
  141. package/dist/translations/kn.umd.js +1 -1
  142. package/dist/translations/ko.js +1 -1
  143. package/dist/translations/ko.umd.js +1 -1
  144. package/dist/translations/ku.js +1 -1
  145. package/dist/translations/ku.umd.js +1 -1
  146. package/dist/translations/lt.js +1 -1
  147. package/dist/translations/lt.umd.js +1 -1
  148. package/dist/translations/lv.js +1 -1
  149. package/dist/translations/lv.umd.js +1 -1
  150. package/dist/translations/ms.js +1 -1
  151. package/dist/translations/ms.umd.js +1 -1
  152. package/dist/translations/nb.js +1 -1
  153. package/dist/translations/nb.umd.js +1 -1
  154. package/dist/translations/ne.js +1 -1
  155. package/dist/translations/ne.umd.js +1 -1
  156. package/dist/translations/nl.js +1 -1
  157. package/dist/translations/nl.umd.js +1 -1
  158. package/dist/translations/no.js +1 -1
  159. package/dist/translations/no.umd.js +1 -1
  160. package/dist/translations/oc.js +1 -1
  161. package/dist/translations/oc.umd.js +1 -1
  162. package/dist/translations/pl.js +1 -1
  163. package/dist/translations/pl.umd.js +1 -1
  164. package/dist/translations/pt-br.js +1 -1
  165. package/dist/translations/pt-br.umd.js +1 -1
  166. package/dist/translations/pt.js +1 -1
  167. package/dist/translations/pt.umd.js +1 -1
  168. package/dist/translations/ro.js +1 -1
  169. package/dist/translations/ro.umd.js +1 -1
  170. package/dist/translations/ru.js +1 -1
  171. package/dist/translations/ru.umd.js +1 -1
  172. package/dist/translations/si.js +1 -1
  173. package/dist/translations/si.umd.js +1 -1
  174. package/dist/translations/sk.js +1 -1
  175. package/dist/translations/sk.umd.js +1 -1
  176. package/dist/translations/sl.js +1 -1
  177. package/dist/translations/sl.umd.js +1 -1
  178. package/dist/translations/sq.js +1 -1
  179. package/dist/translations/sq.umd.js +1 -1
  180. package/dist/translations/sr-latn.js +1 -1
  181. package/dist/translations/sr-latn.umd.js +1 -1
  182. package/dist/translations/sr.js +1 -1
  183. package/dist/translations/sr.umd.js +1 -1
  184. package/dist/translations/sv.js +1 -1
  185. package/dist/translations/sv.umd.js +1 -1
  186. package/dist/translations/th.js +1 -1
  187. package/dist/translations/th.umd.js +1 -1
  188. package/dist/translations/ti.js +1 -1
  189. package/dist/translations/ti.umd.js +1 -1
  190. package/dist/translations/tk.js +1 -1
  191. package/dist/translations/tk.umd.js +1 -1
  192. package/dist/translations/tr.js +1 -1
  193. package/dist/translations/tr.umd.js +1 -1
  194. package/dist/translations/tt.js +1 -1
  195. package/dist/translations/tt.umd.js +1 -1
  196. package/dist/translations/ug.js +1 -1
  197. package/dist/translations/ug.umd.js +1 -1
  198. package/dist/translations/uk.js +1 -1
  199. package/dist/translations/uk.umd.js +1 -1
  200. package/dist/translations/ur.js +1 -1
  201. package/dist/translations/ur.umd.js +1 -1
  202. package/dist/translations/uz.js +1 -1
  203. package/dist/translations/uz.umd.js +1 -1
  204. package/dist/translations/vi.js +1 -1
  205. package/dist/translations/vi.umd.js +1 -1
  206. package/dist/translations/zh-cn.js +1 -1
  207. package/dist/translations/zh-cn.umd.js +1 -1
  208. package/dist/translations/zh.js +1 -1
  209. package/dist/translations/zh.umd.js +1 -1
  210. package/package.json +11 -11
  211. package/dist/imageresize/utils/tryparsedimensionwithunit.d.ts +0 -39
@@ -1,68 +1,78 @@
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 image/imagestyle/imagestylecommand
7
- */
8
- import type { ModelElement } from '@ckeditor/ckeditor5-engine';
9
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
10
- import type { ImageStyleOptionDefinition } from '../imageconfig.js';
6
+ * @module image/imagestyle/imagestylecommand
7
+ */
8
+ import type { ModelElement } from "@ckeditor/ckeditor5-engine";
9
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
10
+ import type { ImageStyleOptionDefinition } from "../imageconfig.js";
11
11
  /**
12
- * The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}
13
- * to a selected image.
14
- *
15
- * **Note**: Executing this command may change the image model element if the desired style requires an image of a different
16
- * type. See {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute} to learn more.
17
- */
12
+ * The image style command. It is used to apply {@link module:image/imageconfig~ImageStyleConfig#options image style option}
13
+ * to a selected image.
14
+ *
15
+ * **Note**: Executing this command may change the image model element if the desired style requires an image of a different
16
+ * type. See {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand#execute} to learn more.
17
+ */
18
18
  export declare class ImageStyleCommand extends Command {
19
- /**
20
- * An object containing names of default style options for the inline and block images.
21
- * If there is no default style option for the given image type in the configuration,
22
- * the name will be `false`.
23
- */
24
- private _defaultStyles;
25
- /**
26
- * The styles handled by this command.
27
- */
28
- private _styles;
29
- /**
30
- * Creates an instance of the image style command. When executed, the command applies one of
31
- * {@link module:image/imageconfig~ImageStyleConfig#options style options} to the currently selected image.
32
- *
33
- * @param editor The editor instance.
34
- * @param styles The style options that this command supports.
35
- */
36
- constructor(editor: Editor, styles: Array<ImageStyleOptionDefinition>);
37
- /**
38
- * @inheritDoc
39
- */
40
- refresh(): void;
41
- /**
42
- * Executes the command and applies the style to the currently selected image:
43
- *
44
- * ```ts
45
- * editor.execute( 'imageStyle', { value: 'side' } );
46
- * ```
47
- *
48
- * **Note**: Executing this command may change the image model element if the desired style requires an image
49
- * of a different type. Learn more about {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements model element}
50
- * configuration for the style option.
51
- *
52
- * @param options.value The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).
53
- * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.
54
- * The default is `true`.
55
- * @fires execute
56
- */
57
- execute(options?: {
58
- value?: string;
59
- setImageSizes?: boolean;
60
- }): void;
61
- /**
62
- * Returns `true` if requested style change would trigger the image type change.
63
- *
64
- * @param requestedStyle The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).
65
- * @param imageElement The image model element.
66
- */
67
- shouldConvertImageType(requestedStyle: string, imageElement: ModelElement): boolean;
19
+ /**
20
+ * An object containing names of default style options for the inline and block images.
21
+ * If there is no default style option for the given image type in the configuration,
22
+ * the name will be `false`.
23
+ */
24
+ private _defaultStyles;
25
+ /**
26
+ * The styles handled by this command.
27
+ */
28
+ private _styles;
29
+ /**
30
+ * Creates an instance of the image style command. When executed, the command applies one of
31
+ * {@link module:image/imageconfig~ImageStyleConfig#options style options} to the currently selected image.
32
+ *
33
+ * @param editor The editor instance.
34
+ * @param styles The style options that this command supports.
35
+ */
36
+ constructor(editor: Editor, styles: Array<ImageStyleOptionDefinition>);
37
+ /**
38
+ * @inheritDoc
39
+ */
40
+ override refresh(): void;
41
+ /**
42
+ * Returns whether the style with the given name can be applied to the currently selected image.
43
+ *
44
+ * Applying a style may internally trigger a type conversion (block ↔ inline) when the style
45
+ * supports only the opposite type. If that conversion would be rejected by the schema (for
46
+ * example, converting an inline image to a block image inside `$inlineRoot`), this style
47
+ * cannot be applied even though the command itself is enabled. UI components representing
48
+ * individual styles should reflect this per-style state in their `isEnabled`.
49
+ */
50
+ isStyleEnabled(styleName: string): boolean;
51
+ /**
52
+ * Executes the command and applies the style to the currently selected image:
53
+ *
54
+ * ```ts
55
+ * editor.execute( 'imageStyle', { value: 'side' } );
56
+ * ```
57
+ *
58
+ * **Note**: Executing this command may change the image model element if the desired style requires an image
59
+ * of a different type. Learn more about {@link module:image/imageconfig~ImageStyleOptionDefinition#modelElements model element}
60
+ * configuration for the style option.
61
+ *
62
+ * @param options.value The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).
63
+ * @param options.setImageSizes Specifies whether the image `width` and `height` attributes should be set automatically.
64
+ * The default is `true`.
65
+ * @fires execute
66
+ */
67
+ override execute(options?: {
68
+ value?: string;
69
+ setImageSizes?: boolean;
70
+ }): void;
71
+ /**
72
+ * Returns `true` if requested style change would trigger the image type change.
73
+ *
74
+ * @param requestedStyle The name of the style (as configured in {@link module:image/imageconfig~ImageStyleConfig#options}).
75
+ * @param imageElement The image model element.
76
+ */
77
+ shouldConvertImageType(requestedStyle: string, imageElement: ModelElement): boolean;
68
78
  }
@@ -1,54 +1,54 @@
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 image/imagestyle/imagestyleediting
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { ImageUtils } from '../imageutils.js';
10
- import type { ImageStyleOptionDefinition } from '../imageconfig.js';
6
+ * @module image/imagestyle/imagestyleediting
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { ImageUtils } from "../imageutils.js";
10
+ import type { ImageStyleOptionDefinition } from "../imageconfig.js";
11
11
  /**
12
- * The image style engine plugin. It sets the default configuration, creates converters and registers
13
- * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.
14
- */
12
+ * The image style engine plugin. It sets the default configuration, creates converters and registers
13
+ * {@link module:image/imagestyle/imagestylecommand~ImageStyleCommand ImageStyleCommand}.
14
+ */
15
15
  export declare class ImageStyleEditing extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "ImageStyleEditing";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- static get requires(): readonly [typeof ImageUtils];
28
- /**
29
- * It contains a list of the normalized and validated style options.
30
- *
31
- * * Each option contains a complete icon markup.
32
- * * The style options not supported by any of the loaded image editing plugins (
33
- * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} or
34
- * {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`}) are filtered out.
35
- *
36
- * @internal
37
- * @readonly
38
- */
39
- normalizedStyles?: Array<ImageStyleOptionDefinition>;
40
- /**
41
- * @inheritDoc
42
- */
43
- init(): void;
44
- /**
45
- * Sets the editor conversion taking the presence of
46
- * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`}
47
- * and {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugins into consideration.
48
- */
49
- private _setupConversion;
50
- /**
51
- * Registers a post-fixer that will make sure that the style attribute value is correct for a specific image type (block vs inline).
52
- */
53
- private _setupPostFixer;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "ImageStyleEditing";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get requires(): PluginDependenciesOf<[ImageUtils]>;
28
+ /**
29
+ * It contains a list of the normalized and validated style options.
30
+ *
31
+ * * Each option contains a complete icon markup.
32
+ * * The style options not supported by any of the loaded image editing plugins (
33
+ * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} or
34
+ * {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`}) are filtered out.
35
+ *
36
+ * @internal
37
+ * @readonly
38
+ */
39
+ normalizedStyles?: Array<ImageStyleOptionDefinition>;
40
+ /**
41
+ * @inheritDoc
42
+ */
43
+ init(): void;
44
+ /**
45
+ * Sets the editor conversion taking the presence of
46
+ * {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`}
47
+ * and {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugins into consideration.
48
+ */
49
+ private _setupConversion;
50
+ /**
51
+ * Registers a post-fixer that will make sure that the style attribute value is correct for a specific image type (block vs inline).
52
+ */
53
+ private _setupPostFixer;
54
54
  }
@@ -1,60 +1,60 @@
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 image/imagestyle/imagestyleui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { ImageStyleEditing } from './imagestyleediting.js';
10
- import '../../theme/imagestyle.css';
6
+ * @module image/imagestyle/imagestyleui
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { ImageStyleEditing } from "./imagestyleediting.js";
10
+ import "../../theme/imagestyle.css";
11
11
  /**
12
- * The image style UI plugin.
13
- *
14
- * It registers buttons corresponding to the {@link module:image/imageconfig~ImageConfig#styles} configuration.
15
- * It also registers the {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS default drop-downs} and the
16
- * custom drop-downs defined by the developer in the {@link module:image/imageconfig~ImageConfig#toolbar} configuration.
17
- */
12
+ * The image style UI plugin.
13
+ *
14
+ * It registers buttons corresponding to the {@link module:image/imageconfig~ImageConfig#styles} configuration.
15
+ * It also registers the {@link module:image/imagestyle/utils#DEFAULT_DROPDOWN_DEFINITIONS default drop-downs} and the
16
+ * custom drop-downs defined by the developer in the {@link module:image/imageconfig~ImageConfig#toolbar} configuration.
17
+ */
18
18
  export declare class ImageStyleUI extends Plugin {
19
- /**
20
- * @inheritDoc
21
- */
22
- static get requires(): readonly [typeof ImageStyleEditing];
23
- /**
24
- * @inheritDoc
25
- */
26
- static get pluginName(): "ImageStyleUI";
27
- /**
28
- * @inheritDoc
29
- */
30
- static get isOfficialPlugin(): true;
31
- /**
32
- * Returns the default localized style titles provided by the plugin.
33
- *
34
- * The following localized titles corresponding with
35
- * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS} are available:
36
- *
37
- * * `'Wrap text'`,
38
- * * `'Break text'`,
39
- * * `'In line'`,
40
- * * `'Full size image'`,
41
- * * `'Side image'`,
42
- * * `'Left aligned image'`,
43
- * * `'Centered image'`,
44
- * * `'Right aligned image'`
45
- */
46
- get localizedDefaultStylesTitles(): Record<string, string>;
47
- /**
48
- * @inheritDoc
49
- */
50
- init(): void;
51
- /**
52
- * Creates a dropdown and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.
53
- */
54
- private _createDropdown;
55
- /**
56
- * Creates a button and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.
57
- */
58
- private _createButton;
59
- private _executeCommand;
19
+ /**
20
+ * @inheritDoc
21
+ */
22
+ static get requires(): PluginDependenciesOf<[ImageStyleEditing]>;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get pluginName(): "ImageStyleUI";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static override get isOfficialPlugin(): true;
31
+ /**
32
+ * Returns the default localized style titles provided by the plugin.
33
+ *
34
+ * The following localized titles corresponding with
35
+ * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS} are available:
36
+ *
37
+ * * `'Wrap text'`,
38
+ * * `'Break text'`,
39
+ * * `'In line'`,
40
+ * * `'Full size image'`,
41
+ * * `'Side image'`,
42
+ * * `'Left aligned image'`,
43
+ * * `'Centered image'`,
44
+ * * `'Right aligned image'`
45
+ */
46
+ get localizedDefaultStylesTitles(): Record<string, string>;
47
+ /**
48
+ * @inheritDoc
49
+ */
50
+ init(): void;
51
+ /**
52
+ * Creates a dropdown and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.
53
+ */
54
+ private _createDropdown;
55
+ /**
56
+ * Creates a button and stores it in the editor {@link module:ui/componentfactory~ComponentFactory}.
57
+ */
58
+ private _createButton;
59
+ private _executeCommand;
60
60
  }
@@ -1,110 +1,110 @@
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
- */
5
- import type { Editor, PluginCollection } from '@ckeditor/ckeditor5-core';
6
- import type { ImageStyleConfig, ImageStyleDropdownDefinition, ImageStyleOptionDefinition } from '../imageconfig.js';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import type { Editor, PluginCollection } from "@ckeditor/ckeditor5-core";
6
+ import type { ImageStyleConfig, ImageStyleDropdownDefinition, ImageStyleOptionDefinition } from "../imageconfig.js";
7
7
  /**
8
- * Default image style options provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}
9
- * configuration.
10
- *
11
- * There are available 5 styles focused on formatting:
12
- *
13
- * * **`'alignLeft'`** aligns the inline or block image to the left and wraps it with the text using the `image-style-align-left` class,
14
- * * **`'alignRight'`** aligns the inline or block image to the right and wraps it with the text using the `image-style-align-right` class,
15
- * * **`'alignCenter'`** centers the block image using the `image-style-align-center` class,
16
- * * **`'alignBlockLeft'`** aligns the block image to the left using the `image-style-block-align-left` class,
17
- * * **`'alignBlockRight'`** aligns the block image to the right using the `image-style-block-align-right` class,
18
- *
19
- * and 3 semantic styles:
20
- *
21
- * * **`'inline'`** is an inline image without any CSS class,
22
- * * **`'block'`** is a block image without any CSS class,
23
- * * **`'side'`** is a block image styled with the `image-style-side` CSS class.
24
- *
25
- * @internal
26
- */
8
+ * Default image style options provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}
9
+ * configuration.
10
+ *
11
+ * There are available 5 styles focused on formatting:
12
+ *
13
+ * * **`'alignLeft'`** aligns the inline or block image to the left and wraps it with the text using the `image-style-align-left` class,
14
+ * * **`'alignRight'`** aligns the inline or block image to the right and wraps it with the text using the `image-style-align-right` class,
15
+ * * **`'alignCenter'`** centers the block image using the `image-style-align-center` class,
16
+ * * **`'alignBlockLeft'`** aligns the block image to the left using the `image-style-block-align-left` class,
17
+ * * **`'alignBlockRight'`** aligns the block image to the right using the `image-style-block-align-right` class,
18
+ *
19
+ * and 3 semantic styles:
20
+ *
21
+ * * **`'inline'`** is an inline image without any CSS class,
22
+ * * **`'block'`** is a block image without any CSS class,
23
+ * * **`'side'`** is a block image styled with the `image-style-side` CSS class.
24
+ *
25
+ * @internal
26
+ */
27
27
  export declare const DEFAULT_OPTIONS: Record<string, ImageStyleOptionDefinition>;
28
28
  /**
29
- * Default image style icons provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}
30
- * configuration.
31
- *
32
- * See {@link module:image/imageconfig~ImageStyleOptionDefinition#icon} to learn more.
33
- *
34
- * There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.
35
- *
36
- * @internal
37
- */
29
+ * Default image style icons provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#styles}
30
+ * configuration.
31
+ *
32
+ * See {@link module:image/imageconfig~ImageStyleOptionDefinition#icon} to learn more.
33
+ *
34
+ * There are 7 default icons available: `'full'`, `'left'`, `'inlineLeft'`, `'center'`, `'right'`, `'inlineRight'`, and `'inline'`.
35
+ *
36
+ * @internal
37
+ */
38
38
  export declare const DEFAULT_ICONS: Record<string, string>;
39
39
  /**
40
- * Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}
41
- * configuration. The drop-downs are containers for the {@link module:image/imageconfig~ImageStyleConfig#options image style options}.
42
- *
43
- * If both of the `ImageEditing` plugins are loaded, there are 2 predefined drop-downs available:
44
- *
45
- * * **`'imageStyle:wrapText'`**, which contains the `alignLeft` and `alignRight` options, that is,
46
- * those that wraps the text around the image,
47
- * * **`'imageStyle:breakText'`**, which contains the `alignBlockLeft`, `alignCenter` and `alignBlockRight` options, that is,
48
- * those that breaks the text around the image.
49
- *
50
- * @internal
51
- */
40
+ * Default drop-downs provided by the plugin that can be referred in the {@link module:image/imageconfig~ImageConfig#toolbar}
41
+ * configuration. The drop-downs are containers for the {@link module:image/imageconfig~ImageStyleConfig#options image style options}.
42
+ *
43
+ * If both of the `ImageEditing` plugins are loaded, there are 2 predefined drop-downs available:
44
+ *
45
+ * * **`'imageStyle:wrapText'`**, which contains the `alignLeft` and `alignRight` options, that is,
46
+ * those that wraps the text around the image,
47
+ * * **`'imageStyle:breakText'`**, which contains the `alignBlockLeft`, `alignCenter` and `alignBlockRight` options, that is,
48
+ * those that breaks the text around the image.
49
+ *
50
+ * @internal
51
+ */
52
52
  export declare const DEFAULT_DROPDOWN_DEFINITIONS: Array<ImageStyleDropdownDefinition>;
53
53
  /**
54
- * Returns the style with a given `name` from an array of styles.
55
- *
56
- * @internal
57
- */
54
+ * Returns the style with a given `name` from an array of styles.
55
+ *
56
+ * @internal
57
+ */
58
58
  export declare function getStyleDefinitionByName(name: string, styles: Array<ImageStyleOptionDefinition>): ImageStyleOptionDefinition | undefined;
59
59
  /**
60
- * Returns a list of the normalized and validated image style options.
61
- *
62
- * @param config
63
- * @param config.isInlinePluginLoaded
64
- * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.
65
- * @param config.isBlockPluginLoaded
66
- * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.
67
- * @param config.configuredStyles
68
- * The image styles configuration provided in the image styles {@link module:image/imageconfig~ImageConfig#styles configuration}
69
- * as a default or custom value.
70
- * @returns
71
- * * Each of options contains a complete icon markup.
72
- * * The image style options not supported by any of the loaded plugins are filtered out.
73
- */
60
+ * Returns a list of the normalized and validated image style options.
61
+ *
62
+ * @param config
63
+ * @param config.isInlinePluginLoaded
64
+ * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.
65
+ * @param config.isBlockPluginLoaded
66
+ * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.
67
+ * @param config.configuredStyles
68
+ * The image styles configuration provided in the image styles {@link module:image/imageconfig~ImageConfig#styles configuration}
69
+ * as a default or custom value.
70
+ * @returns
71
+ * * Each of options contains a complete icon markup.
72
+ * * The image style options not supported by any of the loaded plugins are filtered out.
73
+ */
74
74
  declare function normalizeStyles(config: {
75
- isInlinePluginLoaded: boolean;
76
- isBlockPluginLoaded: boolean;
77
- configuredStyles: ImageStyleConfig;
75
+ isInlinePluginLoaded: boolean;
76
+ isBlockPluginLoaded: boolean;
77
+ configuredStyles: ImageStyleConfig;
78
78
  }): Array<ImageStyleOptionDefinition>;
79
79
  /**
80
- * Returns the default image styles configuration depending on the loaded image editing plugins.
81
- *
82
- * @param isInlinePluginLoaded
83
- * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.
84
- *
85
- * @param isBlockPluginLoaded
86
- * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.
87
- *
88
- * @returns
89
- * It returns an object with the lists of the image style options and groups defined as strings related to the
90
- * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default options}
91
- */
80
+ * Returns the default image styles configuration depending on the loaded image editing plugins.
81
+ *
82
+ * @param isInlinePluginLoaded
83
+ * Determines whether the {@link module:image/image/imageblockediting~ImageBlockEditing `ImageBlockEditing`} plugin has been loaded.
84
+ *
85
+ * @param isBlockPluginLoaded
86
+ * Determines whether the {@link module:image/image/imageinlineediting~ImageInlineEditing `ImageInlineEditing`} plugin has been loaded.
87
+ *
88
+ * @returns
89
+ * It returns an object with the lists of the image style options and groups defined as strings related to the
90
+ * {@link module:image/imagestyle/utils#DEFAULT_OPTIONS default options}
91
+ */
92
92
  declare function getDefaultStylesConfiguration(isBlockPluginLoaded: boolean, isInlinePluginLoaded: boolean): ImageStyleConfig;
93
93
  /**
94
- * Returns a list of the available predefined drop-downs' definitions depending on the loaded image editing plugins.
95
- */
94
+ * Returns a list of the available predefined drop-downs' definitions depending on the loaded image editing plugins.
95
+ */
96
96
  declare function getDefaultDropdownDefinitions(pluginCollection: PluginCollection<Editor>): Array<ImageStyleDropdownDefinition>;
97
97
  /**
98
- * Displays a console warning with the 'image-style-configuration-definition-invalid' error.
99
- */
98
+ * Displays a console warning with the 'image-style-configuration-definition-invalid' error.
99
+ */
100
100
  declare function warnInvalidStyle(info: object): void;
101
101
  /**
102
- * @internal
103
- */
102
+ * @internal
103
+ */
104
104
  export declare const utils: {
105
- normalizeStyles: typeof normalizeStyles;
106
- getDefaultStylesConfiguration: typeof getDefaultStylesConfiguration;
107
- getDefaultDropdownDefinitions: typeof getDefaultDropdownDefinitions;
108
- warnInvalidStyle: typeof warnInvalidStyle;
105
+ normalizeStyles: typeof normalizeStyles;
106
+ getDefaultStylesConfiguration: typeof getDefaultStylesConfiguration;
107
+ getDefaultDropdownDefinitions: typeof getDefaultDropdownDefinitions;
108
+ warnInvalidStyle: typeof warnInvalidStyle;
109
109
  };
110
110
  export {};
@@ -1,36 +1,36 @@
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 image/imagestyle
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { ImageStyleEditing } from './imagestyle/imagestyleediting.js';
10
- import { ImageStyleUI } from './imagestyle/imagestyleui.js';
6
+ * @module image/imagestyle
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { ImageStyleEditing } from "./imagestyle/imagestyleediting.js";
10
+ import { ImageStyleUI } from "./imagestyle/imagestyleui.js";
11
11
  /**
12
- * The image style plugin.
13
- *
14
- * For a detailed overview of the image styles feature, check the {@glink features/images/images-styles documentation}.
15
- *
16
- * This is a "glue" plugin which loads the following plugins:
17
- * * {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing},
18
- * * {@link module:image/imagestyle/imagestyleui~ImageStyleUI}
19
- *
20
- * It provides a default configuration, which can be extended or overwritten.
21
- * Read more about the {@link module:image/imageconfig~ImageConfig#styles image styles configuration}.
22
- */
12
+ * The image style plugin.
13
+ *
14
+ * For a detailed overview of the image styles feature, check the {@glink features/images/images-styles documentation}.
15
+ *
16
+ * This is a "glue" plugin which loads the following plugins:
17
+ * * {@link module:image/imagestyle/imagestyleediting~ImageStyleEditing},
18
+ * * {@link module:image/imagestyle/imagestyleui~ImageStyleUI}
19
+ *
20
+ * It provides a default configuration, which can be extended or overwritten.
21
+ * Read more about the {@link module:image/imageconfig~ImageConfig#styles image styles configuration}.
22
+ */
23
23
  export declare class ImageStyle extends Plugin {
24
- /**
25
- * @inheritDoc
26
- */
27
- static get requires(): readonly [typeof ImageStyleEditing, typeof ImageStyleUI];
28
- /**
29
- * @inheritDoc
30
- */
31
- static get pluginName(): "ImageStyle";
32
- /**
33
- * @inheritDoc
34
- */
35
- static get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get requires(): PluginDependenciesOf<[ImageStyleEditing, ImageStyleUI]>;
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static get pluginName(): "ImageStyle";
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ static override get isOfficialPlugin(): true;
36
36
  }