@ckeditor/ckeditor5-image 48.2.0-alpha.7 → 48.3.0-alpha.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 (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,130 +1,130 @@
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/imageupload/imageuploadediting
7
- */
8
- import { Plugin, type Editor } from '@ckeditor/ckeditor5-core';
9
- import { type ModelElement, type ModelWriter, type ViewDataTransfer } from '@ckeditor/ckeditor5-engine';
10
- import { Notification } from '@ckeditor/ckeditor5-ui';
11
- import { ClipboardPipeline } from '@ckeditor/ckeditor5-clipboard';
12
- import { FileRepository, type UploadResponse, type FileLoader } from '@ckeditor/ckeditor5-upload';
13
- import { ImageUtils } from '../imageutils.js';
6
+ * @module image/imageupload/imageuploadediting
7
+ */
8
+ import { Plugin, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { type ModelElement, type ModelWriter, type ViewDataTransfer } from "@ckeditor/ckeditor5-engine";
10
+ import { Notification } from "@ckeditor/ckeditor5-ui";
11
+ import { ClipboardPipeline } from "@ckeditor/ckeditor5-clipboard";
12
+ import { FileRepository, type UploadResponse, type FileLoader } from "@ckeditor/ckeditor5-upload";
13
+ import { ImageUtils } from "../imageutils.js";
14
14
  /**
15
- * The editing part of the image upload feature. It registers the `'uploadImage'` command
16
- * and the `imageUpload` command as an aliased name.
17
- *
18
- * When an image is uploaded, it fires the {@link ~ImageUploadEditing#event:uploadComplete `uploadComplete`} event
19
- * that allows adding custom attributes to the {@link module:engine/model/element~ModelElement image element}.
20
- */
15
+ * The editing part of the image upload feature. It registers the `'uploadImage'` command
16
+ * and the `imageUpload` command as an aliased name.
17
+ *
18
+ * When an image is uploaded, it fires the {@link ~ImageUploadEditing#event:uploadComplete `uploadComplete`} event
19
+ * that allows adding custom attributes to the {@link module:engine/model/element~ModelElement image element}.
20
+ */
21
21
  export declare class ImageUploadEditing extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof FileRepository, typeof Notification, typeof ClipboardPipeline, typeof ImageUtils];
26
- static get pluginName(): "ImageUploadEditing";
27
- /**
28
- * @inheritDoc
29
- */
30
- static get isOfficialPlugin(): true;
31
- /**
32
- * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and
33
- * model elements during the upload.
34
- *
35
- * Model element of the uploaded image can change, for instance, when {@link module:image/image/imagetypecommand~ImageTypeCommand}
36
- * is executed as a result of adding caption or changing image style. As a result, the upload logic must keep track of the model
37
- * element (reference) and resolve the upload for the correct model element (instead of the one that landed in the `$graveyard`
38
- * after image type changed).
39
- */
40
- private readonly _uploadImageElements;
41
- /**
42
- * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and
43
- * upload responses for handling images dragged during their upload process. When such images are later
44
- * dropped, their original upload IDs no longer exist in the registry (as the original upload completed).
45
- * This map preserves the upload responses to properly handle such cases.
46
- */
47
- private readonly _uploadedImages;
48
- /**
49
- * @inheritDoc
50
- */
51
- constructor(editor: Editor);
52
- /**
53
- * @inheritDoc
54
- */
55
- init(): void;
56
- /**
57
- * @inheritDoc
58
- */
59
- afterInit(): void;
60
- /**
61
- * Reads and uploads an image.
62
- *
63
- * The image is read from the disk and as a Base64-encoded string it is set temporarily to
64
- * `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target
65
- * image's URL (the URL to the uploaded image on the server).
66
- */
67
- protected _readAndUpload(loader: FileLoader): Promise<void>;
68
- /**
69
- * Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.
70
- *
71
- * @param data Data object from which `srcset` will be created.
72
- * @param image The image element on which the `srcset` attribute will be set.
73
- */
74
- protected _parseAndSetSrcsetAttributeOnImage(data: Record<string, unknown>, image: ModelElement, writer: ModelWriter): void;
75
- /**
76
- * Registers image upload converters.
77
- *
78
- * @param imageType The type of the image.
79
- */
80
- private _registerConverters;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): PluginDependenciesOf<[FileRepository, Notification, ClipboardPipeline, ImageUtils]>;
26
+ static get pluginName(): "ImageUploadEditing";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static override get isOfficialPlugin(): true;
31
+ /**
32
+ * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and
33
+ * model elements during the upload.
34
+ *
35
+ * Model element of the uploaded image can change, for instance, when {@link module:image/image/imagetypecommand~ImageTypeCommand}
36
+ * is executed as a result of adding caption or changing image style. As a result, the upload logic must keep track of the model
37
+ * element (reference) and resolve the upload for the correct model element (instead of the one that landed in the `$graveyard`
38
+ * after image type changed).
39
+ */
40
+ private readonly _uploadImageElements;
41
+ /**
42
+ * An internal mapping of {@link module:upload/filerepository~FileLoader#id file loader UIDs} and
43
+ * upload responses for handling images dragged during their upload process. When such images are later
44
+ * dropped, their original upload IDs no longer exist in the registry (as the original upload completed).
45
+ * This map preserves the upload responses to properly handle such cases.
46
+ */
47
+ private readonly _uploadedImages;
48
+ /**
49
+ * @inheritDoc
50
+ */
51
+ constructor(editor: Editor);
52
+ /**
53
+ * @inheritDoc
54
+ */
55
+ init(): void;
56
+ /**
57
+ * @inheritDoc
58
+ */
59
+ afterInit(): void;
60
+ /**
61
+ * Reads and uploads an image.
62
+ *
63
+ * The image is read from the disk and as a Base64-encoded string it is set temporarily to
64
+ * `image[src]`. When the image is successfully uploaded, the temporary data is replaced with the target
65
+ * image's URL (the URL to the uploaded image on the server).
66
+ */
67
+ protected _readAndUpload(loader: FileLoader): Promise<void>;
68
+ /**
69
+ * Creates the `srcset` attribute based on a given file upload response and sets it as an attribute to a specific image element.
70
+ *
71
+ * @param data Data object from which `srcset` will be created.
72
+ * @param image The image element on which the `srcset` attribute will be set.
73
+ */
74
+ protected _parseAndSetSrcsetAttributeOnImage(data: Record<string, unknown>, image: ModelElement, writer: ModelWriter): void;
75
+ /**
76
+ * Registers image upload converters.
77
+ *
78
+ * @param imageType The type of the image.
79
+ */
80
+ private _registerConverters;
81
81
  }
82
82
  /**
83
- * TODO move this to the clipboard package.
84
- *
85
- * Returns `true` if non-empty `text/html` is included in the data transfer.
86
- */
83
+ * TODO move this to the clipboard package.
84
+ *
85
+ * Returns `true` if non-empty `text/html` is included in the data transfer.
86
+ */
87
87
  export declare function isHtmlInDataTransfer(dataTransfer: ViewDataTransfer): boolean;
88
88
  /**
89
- * An event fired when an image is uploaded. You can hook into this event to provide
90
- * custom attributes to the {@link module:engine/model/element~ModelElement image element} based on the data from
91
- * the server.
92
- *
93
- * ```ts
94
- * const imageUploadEditing = editor.plugins.get( 'ImageUploadEditing' );
95
- *
96
- * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {
97
- * editor.model.change( writer => {
98
- * writer.setAttribute( 'someAttribute', 'foo', imageElement );
99
- * } );
100
- * } );
101
- * ```
102
- *
103
- * You can also stop the default handler that sets the `src` and `srcset` attributes
104
- * if you want to provide custom values for these attributes.
105
- *
106
- * ```ts
107
- * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {
108
- * evt.stop();
109
- * } );
110
- * ```
111
- *
112
- * **Note**: This event is fired by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin.
113
- *
114
- * @eventName ~ImageUploadEditing#uploadComplete
115
- * @param data The `uploadComplete` event data.
116
- */
89
+ * An event fired when an image is uploaded. You can hook into this event to provide
90
+ * custom attributes to the {@link module:engine/model/element~ModelElement image element} based on the data from
91
+ * the server.
92
+ *
93
+ * ```ts
94
+ * const imageUploadEditing = editor.plugins.get( 'ImageUploadEditing' );
95
+ *
96
+ * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {
97
+ * editor.model.change( writer => {
98
+ * writer.setAttribute( 'someAttribute', 'foo', imageElement );
99
+ * } );
100
+ * } );
101
+ * ```
102
+ *
103
+ * You can also stop the default handler that sets the `src` and `srcset` attributes
104
+ * if you want to provide custom values for these attributes.
105
+ *
106
+ * ```ts
107
+ * imageUploadEditing.on( 'uploadComplete', ( evt, { data, imageElement } ) => {
108
+ * evt.stop();
109
+ * } );
110
+ * ```
111
+ *
112
+ * **Note**: This event is fired by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin.
113
+ *
114
+ * @eventName ~ImageUploadEditing#uploadComplete
115
+ * @param data The `uploadComplete` event data.
116
+ */
117
117
  export type ImageUploadCompleteEvent = {
118
- name: 'uploadComplete';
119
- args: [data: ImageUploadCompleteData];
118
+ name: "uploadComplete";
119
+ args: [data: ImageUploadCompleteData];
120
120
  };
121
121
  export type ImageUploadCompleteData = {
122
- /**
123
- * The data coming from the upload adapter.
124
- */
125
- data: UploadResponse;
126
- /**
127
- * The model {@link module:engine/model/element~ModelElement image element} that can be customized.
128
- */
129
- imageElement: ModelElement;
122
+ /**
123
+ * The data coming from the upload adapter.
124
+ */
125
+ data: UploadResponse;
126
+ /**
127
+ * The model {@link module:engine/model/element~ModelElement image element} that can be customized.
128
+ */
129
+ imageElement: ModelElement;
130
130
  };
@@ -1,46 +1,46 @@
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/imageupload/imageuploadprogress
7
- */
8
- import { type Editor, Plugin } from '@ckeditor/ckeditor5-core';
9
- import '../../theme/imageuploadprogress.css';
10
- import '../../theme/imageuploadicon.css';
11
- import '../../theme/imageuploadloader.css';
6
+ * @module image/imageupload/imageuploadprogress
7
+ */
8
+ import { type Editor, Plugin } from "@ckeditor/ckeditor5-core";
9
+ import "../../theme/imageuploadprogress.css";
10
+ import "../../theme/imageuploadicon.css";
11
+ import "../../theme/imageuploadloader.css";
12
12
  /**
13
- * The image upload progress plugin.
14
- * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.
15
- */
13
+ * The image upload progress plugin.
14
+ * It shows a placeholder when the image is read from the disk and a progress bar while the image is uploading.
15
+ */
16
16
  export declare class ImageUploadProgress extends Plugin {
17
- /**
18
- * @inheritDoc
19
- */
20
- static get pluginName(): "ImageUploadProgress";
21
- /**
22
- * @inheritDoc
23
- */
24
- static get isOfficialPlugin(): true;
25
- /**
26
- * The image placeholder that is displayed before real image data can be accessed.
27
- *
28
- * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.
29
- */
30
- private placeholder;
31
- /**
32
- * @inheritDoc
33
- */
34
- constructor(editor: Editor);
35
- /**
36
- * @inheritDoc
37
- */
38
- init(): void;
39
- /**
40
- * This method is called each time the image `uploadStatus` attribute is changed.
41
- *
42
- * @param evt An object containing information about the fired event.
43
- * @param data Additional information about the change.
44
- */
45
- private uploadStatusChange;
17
+ /**
18
+ * @inheritDoc
19
+ */
20
+ static get pluginName(): "ImageUploadProgress";
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static override get isOfficialPlugin(): true;
25
+ /**
26
+ * The image placeholder that is displayed before real image data can be accessed.
27
+ *
28
+ * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.
29
+ */
30
+ private placeholder;
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ constructor(editor: Editor);
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ init(): void;
39
+ /**
40
+ * This method is called each time the image `uploadStatus` attribute is changed.
41
+ *
42
+ * @param evt An object containing information about the fired event.
43
+ * @param data Additional information about the change.
44
+ */
45
+ private uploadStatusChange;
46
46
  }
@@ -1,51 +1,51 @@
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/imageupload/imageuploadui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
+ * @module image/imageupload/imageuploadui
7
+ */
8
+ import { Plugin } from "@ckeditor/ckeditor5-core";
9
9
  /**
10
- * The image upload button plugin.
11
- *
12
- * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.
13
- *
14
- * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}
15
- * and also the `imageUpload` button as an alias for backward compatibility.
16
- *
17
- * Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.
18
- *
19
- * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components
20
- * through which image upload is available.
21
- */
10
+ * The image upload button plugin.
11
+ *
12
+ * For a detailed overview, check the {@glink features/images/image-upload/image-upload Image upload feature} documentation.
13
+ *
14
+ * Adds the `'uploadImage'` button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}
15
+ * and also the `imageUpload` button as an alias for backward compatibility.
16
+ *
17
+ * Adds the `'menuBar:uploadImage'` menu button to the {@link module:ui/componentfactory~ComponentFactory UI component factory}.
18
+ *
19
+ * It also integrates with the `insertImage` toolbar component and `menuBar:insertImage` menu component, which are the default components
20
+ * through which image upload is available.
21
+ */
22
22
  export declare class ImageUploadUI extends Plugin {
23
- /**
24
- * @inheritDoc
25
- */
26
- static get pluginName(): "ImageUploadUI";
27
- /**
28
- * @inheritDoc
29
- */
30
- static get isOfficialPlugin(): true;
31
- /**
32
- * @inheritDoc
33
- */
34
- init(): void;
35
- /**
36
- * Creates the base for various kinds of the button component provided by this feature.
37
- */
38
- private _createButton;
39
- /**
40
- * Creates a simple toolbar button, with an icon and a tooltip.
41
- */
42
- private _createToolbarButton;
43
- /**
44
- * Creates a button for the dropdown view, with an icon, text and no tooltip.
45
- */
46
- private _createDropdownButton;
47
- /**
48
- * Creates a button for the menu bar.
49
- */
50
- private _createMenuBarButton;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get pluginName(): "ImageUploadUI";
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static override get isOfficialPlugin(): true;
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ init(): void;
35
+ /**
36
+ * Creates the base for various kinds of the button component provided by this feature.
37
+ */
38
+ private _createButton;
39
+ /**
40
+ * Creates a simple toolbar button, with an icon and a tooltip.
41
+ */
42
+ private _createToolbarButton;
43
+ /**
44
+ * Creates a button for the dropdown view, with an icon, text and no tooltip.
45
+ */
46
+ private _createDropdownButton;
47
+ /**
48
+ * Creates a button for the menu bar.
49
+ */
50
+ private _createMenuBarButton;
51
51
  }
@@ -1,71 +1,71 @@
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 { Command, type Editor } from '@ckeditor/ckeditor5-core';
6
- import { type ArrayOrItem } from '@ckeditor/ckeditor5-utils';
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 { Command, type Editor } from "@ckeditor/ckeditor5-core";
6
+ import { type ArrayOrItem } from "@ckeditor/ckeditor5-utils";
7
7
  /**
8
- * The upload image command.
9
- *
10
- * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`
11
- * and it is also available via aliased `imageUpload` name.
12
- *
13
- * In order to upload an image at the current selection position
14
- * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),
15
- * execute the command and pass the native image file instance:
16
- *
17
- * ```ts
18
- * this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {
19
- * // Assuming that only images were pasted:
20
- * const images = Array.from( data.dataTransfer.files );
21
- *
22
- * // Upload the first image:
23
- * editor.execute( 'uploadImage', { file: images[ 0 ] } );
24
- * } );
25
- * ```
26
- *
27
- * It is also possible to insert multiple images at once:
28
- *
29
- * ```ts
30
- * editor.execute( 'uploadImage', {
31
- * file: [
32
- * file1,
33
- * file2
34
- * ]
35
- * } );
36
- * ```
37
- */
8
+ * The upload image command.
9
+ *
10
+ * The command is registered by the {@link module:image/imageupload/imageuploadediting~ImageUploadEditing} plugin as `uploadImage`
11
+ * and it is also available via aliased `imageUpload` name.
12
+ *
13
+ * In order to upload an image at the current selection position
14
+ * (according to the {@link module:widget/utils~findOptimalInsertionRange} algorithm),
15
+ * execute the command and pass the native image file instance:
16
+ *
17
+ * ```ts
18
+ * this.listenTo( editor.editing.view.document, 'clipboardInput', ( evt, data ) => {
19
+ * // Assuming that only images were pasted:
20
+ * const images = Array.from( data.dataTransfer.files );
21
+ *
22
+ * // Upload the first image:
23
+ * editor.execute( 'uploadImage', { file: images[ 0 ] } );
24
+ * } );
25
+ * ```
26
+ *
27
+ * It is also possible to insert multiple images at once:
28
+ *
29
+ * ```ts
30
+ * editor.execute( 'uploadImage', {
31
+ * file: [
32
+ * file1,
33
+ * file2
34
+ * ]
35
+ * } );
36
+ * ```
37
+ */
38
38
  export declare class UploadImageCommand extends Command {
39
- /**
40
- * The command property: `false` if there is no permission on image upload, otherwise `true`.
41
- *
42
- * @observable
43
- * @internal
44
- */
45
- isAccessAllowed: boolean;
46
- /**
47
- * Creates an instance of the `imageUlpoad` command. When executed, the command upload one of
48
- * the currently selected image from computer.
49
- *
50
- * @param editor The editor instance.
51
- */
52
- constructor(editor: Editor);
53
- /**
54
- * @inheritDoc
55
- */
56
- refresh(): void;
57
- /**
58
- * Executes the command.
59
- *
60
- * @fires execute
61
- * @param options Options for the executed command.
62
- * @param options.file The image file or an array of image files to upload.
63
- */
64
- execute(options: {
65
- file: ArrayOrItem<File>;
66
- }): void;
67
- /**
68
- * Handles uploading single file.
69
- */
70
- private _uploadImage;
39
+ /**
40
+ * The command property: `false` if there is no permission on image upload, otherwise `true`.
41
+ *
42
+ * @observable
43
+ * @internal
44
+ */
45
+ isAccessAllowed: boolean;
46
+ /**
47
+ * Creates an instance of the `imageUlpoad` command. When executed, the command upload one of
48
+ * the currently selected image from computer.
49
+ *
50
+ * @param editor The editor instance.
51
+ */
52
+ constructor(editor: Editor);
53
+ /**
54
+ * @inheritDoc
55
+ */
56
+ override refresh(): void;
57
+ /**
58
+ * Executes the command.
59
+ *
60
+ * @fires execute
61
+ * @param options Options for the executed command.
62
+ * @param options.file The image file or an array of image files to upload.
63
+ */
64
+ override execute(options: {
65
+ file: ArrayOrItem<File>;
66
+ }): void;
67
+ /**
68
+ * Handles uploading single file.
69
+ */
70
+ private _uploadImage;
71
71
  }
@@ -1,35 +1,35 @@
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/imageupload/utils
7
- */
8
- import type { ViewElement } from '@ckeditor/ckeditor5-engine';
9
- import { type ImageUtils } from '../imageutils.js';
6
+ * @module image/imageupload/utils
7
+ */
8
+ import type { ViewElement } from "@ckeditor/ckeditor5-engine";
9
+ import { type ImageUtils } from "../imageutils.js";
10
10
  /**
11
- * Creates a regular expression used to test for image files.
12
- *
13
- * ```ts
14
- * const imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );
15
- *
16
- * console.log( 'is supported image', imageType.test( file.type ) );
17
- * ```
18
- */
11
+ * Creates a regular expression used to test for image files.
12
+ *
13
+ * ```ts
14
+ * const imageType = createImageTypeRegExp( [ 'png', 'jpeg', 'svg+xml', 'vnd.microsoft.icon' ] );
15
+ *
16
+ * console.log( 'is supported image', imageType.test( file.type ) );
17
+ * ```
18
+ */
19
19
  export declare function createImageTypeRegExp(types: Array<string>): RegExp;
20
20
  /**
21
- * Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.
22
- *
23
- * @internal
24
- * @param image Image whose source to fetch.
25
- * @returns A promise which resolves when an image source is fetched and converted to a `File` instance.
26
- * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.
27
- */
21
+ * Creates a promise that fetches the image local source (Base64 or blob) and resolves with a `File` object.
22
+ *
23
+ * @internal
24
+ * @param image Image whose source to fetch.
25
+ * @returns A promise which resolves when an image source is fetched and converted to a `File` instance.
26
+ * It resolves with a `File` object. If there were any errors during file processing, the promise will be rejected.
27
+ */
28
28
  export declare function fetchLocalImage(image: ViewElement): Promise<File>;
29
29
  /**
30
- * Checks whether a given node is an image element with a local source (Base64 or blob).
31
- *
32
- * @param node The node to check.
33
- * @internal
34
- */
30
+ * Checks whether a given node is an image element with a local source (Base64 or blob).
31
+ *
32
+ * @param node The node to check.
33
+ * @internal
34
+ */
35
35
  export declare function isLocalImage(imageUtils: ImageUtils, node: ViewElement): boolean;