@ckeditor/ckeditor5-image 31.0.0 → 33.0.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 (133) hide show
  1. package/LICENSE.md +2 -2
  2. package/build/image.js +3 -3
  3. package/build/image.js.map +1 -0
  4. package/build/translations/bs.js +1 -0
  5. package/build/translations/cs.js +1 -1
  6. package/build/translations/el.js +1 -1
  7. package/build/translations/es.js +1 -1
  8. package/build/translations/id.js +1 -1
  9. package/build/translations/pt-br.js +1 -1
  10. package/build/translations/uz.js +1 -0
  11. package/build/translations/zh-cn.js +1 -1
  12. package/build/translations/zh.js +1 -1
  13. package/ckeditor5-metadata.json +1 -0
  14. package/lang/translations/ar.po +1 -1
  15. package/lang/translations/ast.po +1 -1
  16. package/lang/translations/az.po +1 -1
  17. package/lang/translations/bg.po +1 -1
  18. package/lang/translations/bs.po +113 -0
  19. package/lang/translations/cs.po +4 -4
  20. package/lang/translations/da.po +1 -1
  21. package/lang/translations/de-ch.po +1 -1
  22. package/lang/translations/de.po +1 -1
  23. package/lang/translations/el.po +23 -23
  24. package/lang/translations/en-au.po +1 -1
  25. package/lang/translations/en-gb.po +1 -1
  26. package/lang/translations/en.po +1 -1
  27. package/lang/translations/eo.po +1 -1
  28. package/lang/translations/es.po +13 -13
  29. package/lang/translations/et.po +1 -1
  30. package/lang/translations/eu.po +1 -1
  31. package/lang/translations/fa.po +1 -1
  32. package/lang/translations/fi.po +1 -1
  33. package/lang/translations/fr.po +1 -1
  34. package/lang/translations/gl.po +1 -1
  35. package/lang/translations/he.po +1 -1
  36. package/lang/translations/hi.po +1 -1
  37. package/lang/translations/hr.po +1 -1
  38. package/lang/translations/hu.po +1 -1
  39. package/lang/translations/id.po +4 -4
  40. package/lang/translations/it.po +1 -1
  41. package/lang/translations/ja.po +1 -1
  42. package/lang/translations/km.po +1 -1
  43. package/lang/translations/kn.po +1 -1
  44. package/lang/translations/ko.po +1 -1
  45. package/lang/translations/ku.po +1 -1
  46. package/lang/translations/lt.po +1 -1
  47. package/lang/translations/lv.po +1 -1
  48. package/lang/translations/nb.po +1 -1
  49. package/lang/translations/ne.po +1 -1
  50. package/lang/translations/nl.po +1 -1
  51. package/lang/translations/no.po +1 -1
  52. package/lang/translations/pl.po +1 -1
  53. package/lang/translations/pt-br.po +6 -6
  54. package/lang/translations/pt.po +1 -1
  55. package/lang/translations/ro.po +1 -1
  56. package/lang/translations/ru.po +1 -1
  57. package/lang/translations/si.po +1 -1
  58. package/lang/translations/sk.po +1 -1
  59. package/lang/translations/sq.po +1 -1
  60. package/lang/translations/sr-latn.po +1 -1
  61. package/lang/translations/sr.po +1 -1
  62. package/lang/translations/sv.po +1 -1
  63. package/lang/translations/th.po +1 -1
  64. package/lang/translations/tk.po +1 -1
  65. package/lang/translations/tr.po +1 -1
  66. package/lang/translations/ug.po +1 -1
  67. package/lang/translations/uk.po +1 -1
  68. package/lang/translations/uz.po +113 -0
  69. package/lang/translations/vi.po +1 -1
  70. package/lang/translations/zh-cn.po +2 -2
  71. package/lang/translations/zh.po +5 -5
  72. package/package.json +35 -34
  73. package/src/autoimage.js +1 -1
  74. package/src/image/converters.js +13 -11
  75. package/src/image/imageblockediting.js +6 -6
  76. package/src/image/imageediting.js +1 -1
  77. package/src/image/imageinlineediting.js +5 -4
  78. package/src/image/imageloadobserver.js +1 -1
  79. package/src/image/imagetypecommand.js +1 -1
  80. package/src/image/insertimagecommand.js +1 -1
  81. package/src/image/ui/utils.js +1 -1
  82. package/src/image/utils.js +23 -17
  83. package/src/image.js +1 -1
  84. package/src/imageblock.js +1 -1
  85. package/src/imagecaption/imagecaptionediting.js +7 -33
  86. package/src/imagecaption/imagecaptionui.js +5 -7
  87. package/src/imagecaption/imagecaptionutils.js +89 -0
  88. package/src/imagecaption/toggleimagecaptioncommand.js +7 -8
  89. package/src/imagecaption.js +1 -1
  90. package/src/imageinline.js +1 -1
  91. package/src/imageinsert/imageinsertui.js +1 -1
  92. package/src/imageinsert/ui/imageinsertformrowview.js +1 -1
  93. package/src/imageinsert/ui/imageinsertpanelview.js +11 -1
  94. package/src/imageinsert/utils.js +1 -1
  95. package/src/imageinsert.js +1 -1
  96. package/src/imageresize/imageresizebuttons.js +1 -1
  97. package/src/imageresize/imageresizeediting.js +1 -1
  98. package/src/imageresize/imageresizehandles.js +1 -1
  99. package/src/imageresize/resizeimagecommand.js +1 -1
  100. package/src/imageresize.js +1 -1
  101. package/src/imagestyle/converters.js +1 -1
  102. package/src/imagestyle/imagestylecommand.js +1 -1
  103. package/src/imagestyle/imagestyleediting.js +1 -1
  104. package/src/imagestyle/imagestyleui.js +1 -1
  105. package/src/imagestyle/utils.js +65 -49
  106. package/src/imagestyle.js +1 -1
  107. package/src/imagetextalternative/imagetextalternativecommand.js +1 -1
  108. package/src/imagetextalternative/imagetextalternativeediting.js +1 -1
  109. package/src/imagetextalternative/imagetextalternativeui.js +1 -1
  110. package/src/imagetextalternative/ui/textalternativeformview.js +11 -1
  111. package/src/imagetextalternative.js +1 -1
  112. package/src/imagetoolbar.js +1 -1
  113. package/src/imageupload/imageuploadediting.js +7 -7
  114. package/src/imageupload/imageuploadprogress.js +4 -4
  115. package/src/imageupload/imageuploadui.js +1 -1
  116. package/src/imageupload/uploadimagecommand.js +1 -1
  117. package/src/imageupload/utils.js +1 -1
  118. package/src/imageupload.js +1 -1
  119. package/src/imageutils.js +1 -1
  120. package/src/index.js +2 -1
  121. package/src/pictureediting.js +1 -1
  122. package/theme/image.css +1 -1
  123. package/theme/imagecaption.css +1 -1
  124. package/theme/imageinsert.css +1 -1
  125. package/theme/imageinsertformrowview.css +1 -1
  126. package/theme/imageresize.css +1 -1
  127. package/theme/imagestyle.css +1 -1
  128. package/theme/imageuploadicon.css +1 -1
  129. package/theme/imageuploadloader.css +1 -1
  130. package/theme/imageuploadprogress.css +1 -1
  131. package/theme/textalternativeform.css +1 -1
  132. package/src/imagecaption/utils.js +0 -63
  133. package/theme/icons/image_placeholder.svg +0 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -40,75 +40,91 @@ const {
40
40
  */
41
41
  const DEFAULT_OPTIONS = {
42
42
  // This style represents an image placed in the line of text.
43
- inline: {
44
- name: 'inline',
45
- title: 'In line',
46
- icon: objectInline,
47
- modelElements: [ 'imageInline' ],
48
- isDefault: true
43
+ get inline() {
44
+ return {
45
+ name: 'inline',
46
+ title: 'In line',
47
+ icon: objectInline,
48
+ modelElements: [ 'imageInline' ],
49
+ isDefault: true
50
+ };
49
51
  },
50
52
 
51
53
  // This style represents an image aligned to the left and wrapped with text.
52
- alignLeft: {
53
- name: 'alignLeft',
54
- title: 'Left aligned image',
55
- icon: objectLeft,
56
- modelElements: [ 'imageBlock', 'imageInline' ],
57
- className: 'image-style-align-left'
54
+ get alignLeft() {
55
+ return {
56
+ name: 'alignLeft',
57
+ title: 'Left aligned image',
58
+ icon: objectLeft,
59
+ modelElements: [ 'imageBlock', 'imageInline' ],
60
+ className: 'image-style-align-left'
61
+ };
58
62
  },
59
63
 
60
64
  // This style represents an image aligned to the left.
61
- alignBlockLeft: {
62
- name: 'alignBlockLeft',
63
- title: 'Left aligned image',
64
- icon: objectBlockLeft,
65
- modelElements: [ 'imageBlock' ],
66
- className: 'image-style-block-align-left'
65
+ get alignBlockLeft() {
66
+ return {
67
+ name: 'alignBlockLeft',
68
+ title: 'Left aligned image',
69
+ icon: objectBlockLeft,
70
+ modelElements: [ 'imageBlock' ],
71
+ className: 'image-style-block-align-left'
72
+ };
67
73
  },
68
74
 
69
75
  // This style represents a centered image.
70
- alignCenter: {
71
- name: 'alignCenter',
72
- title: 'Centered image',
73
- icon: objectCenter,
74
- modelElements: [ 'imageBlock' ],
75
- className: 'image-style-align-center'
76
+ get alignCenter() {
77
+ return {
78
+ name: 'alignCenter',
79
+ title: 'Centered image',
80
+ icon: objectCenter,
81
+ modelElements: [ 'imageBlock' ],
82
+ className: 'image-style-align-center'
83
+ };
76
84
  },
77
85
 
78
86
  // This style represents an image aligned to the right and wrapped with text.
79
- alignRight: {
80
- name: 'alignRight',
81
- title: 'Right aligned image',
82
- icon: objectRight,
83
- modelElements: [ 'imageBlock', 'imageInline' ],
84
- className: 'image-style-align-right'
87
+ get alignRight() {
88
+ return {
89
+ name: 'alignRight',
90
+ title: 'Right aligned image',
91
+ icon: objectRight,
92
+ modelElements: [ 'imageBlock', 'imageInline' ],
93
+ className: 'image-style-align-right'
94
+ };
85
95
  },
86
96
 
87
97
  // This style represents an image aligned to the right.
88
- alignBlockRight: {
89
- name: 'alignBlockRight',
90
- title: 'Right aligned image',
91
- icon: objectBlockRight,
92
- modelElements: [ 'imageBlock' ],
93
- className: 'image-style-block-align-right'
98
+ get alignBlockRight() {
99
+ return {
100
+ name: 'alignBlockRight',
101
+ title: 'Right aligned image',
102
+ icon: objectBlockRight,
103
+ modelElements: [ 'imageBlock' ],
104
+ className: 'image-style-block-align-right'
105
+ };
94
106
  },
95
107
 
96
108
  // This option is equal to the situation when no style is applied.
97
- block: {
98
- name: 'block',
99
- title: 'Centered image',
100
- icon: objectCenter,
101
- modelElements: [ 'imageBlock' ],
102
- isDefault: true
109
+ get block() {
110
+ return {
111
+ name: 'block',
112
+ title: 'Centered image',
113
+ icon: objectCenter,
114
+ modelElements: [ 'imageBlock' ],
115
+ isDefault: true
116
+ };
103
117
  },
104
118
 
105
119
  // This represents a side image.
106
- side: {
107
- name: 'side',
108
- title: 'Side image',
109
- icon: objectRight,
110
- modelElements: [ 'imageBlock' ],
111
- className: 'image-style-side'
120
+ get side() {
121
+ return {
122
+ name: 'side',
123
+ title: 'Side image',
124
+ icon: objectRight,
125
+ modelElements: [ 'imageBlock' ],
126
+ className: 'image-style-side'
127
+ };
112
128
  }
113
129
  };
114
130
 
package/src/imagestyle.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -151,6 +151,16 @@ export default class TextAlternativeFormView extends View {
151
151
  } );
152
152
  }
153
153
 
154
+ /**
155
+ * @inheritDoc
156
+ */
157
+ destroy() {
158
+ super.destroy();
159
+
160
+ this.focusTracker.destroy();
161
+ this.keystrokes.destroy();
162
+ }
163
+
154
164
  /**
155
165
  * Creates the button view.
156
166
  *
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -129,7 +129,7 @@ export default class ImageUploadEditing extends Plugin {
129
129
  }
130
130
 
131
131
  // Upload images after the selection has changed in order to ensure the command's state is refreshed.
132
- editor.model.enqueueChange( 'default', () => {
132
+ editor.model.enqueueChange( () => {
133
133
  editor.execute( 'uploadImage', { file: images } );
134
134
  } );
135
135
  } );
@@ -277,7 +277,7 @@ export default class ImageUploadEditing extends Plugin {
277
277
  const imageUtils = editor.plugins.get( 'ImageUtils' );
278
278
  const imageUploadElements = this._uploadImageElements;
279
279
 
280
- model.enqueueChange( 'transparent', writer => {
280
+ model.enqueueChange( { isUndoable: false }, writer => {
281
281
  writer.setAttribute( 'uploadStatus', 'reading', imageUploadElements.get( loader.id ) );
282
282
  } );
283
283
 
@@ -317,14 +317,14 @@ export default class ImageUploadEditing extends Plugin {
317
317
  } );
318
318
  }
319
319
 
320
- model.enqueueChange( 'transparent', writer => {
320
+ model.enqueueChange( { isUndoable: false }, writer => {
321
321
  writer.setAttribute( 'uploadStatus', 'uploading', imageElement );
322
322
  } );
323
323
 
324
324
  return promise;
325
325
  } )
326
326
  .then( data => {
327
- model.enqueueChange( 'transparent', writer => {
327
+ model.enqueueChange( { isUndoable: false }, writer => {
328
328
  const imageElement = imageUploadElements.get( loader.id );
329
329
 
330
330
  writer.setAttribute( 'uploadStatus', 'complete', imageElement );
@@ -378,7 +378,7 @@ export default class ImageUploadEditing extends Plugin {
378
378
  }
379
379
 
380
380
  // Permanently remove image from insertion batch.
381
- model.enqueueChange( 'transparent', writer => {
381
+ model.enqueueChange( { isUndoable: false }, writer => {
382
382
  writer.remove( imageUploadElements.get( loader.id ) );
383
383
  } );
384
384
 
@@ -386,7 +386,7 @@ export default class ImageUploadEditing extends Plugin {
386
386
  } );
387
387
 
388
388
  function clean() {
389
- model.enqueueChange( 'transparent', writer => {
389
+ model.enqueueChange( { isUndoable: false }, writer => {
390
390
  const imageElement = imageUploadElements.get( loader.id );
391
391
 
392
392
  writer.removeAttribute( 'uploadId', imageElement );
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -12,8 +12,6 @@
12
12
  import { Plugin } from 'ckeditor5/src/core';
13
13
  import { FileRepository } from 'ckeditor5/src/upload';
14
14
 
15
- import uploadingPlaceholder from '../../theme/icons/image_placeholder.svg';
16
-
17
15
  import '../../theme/imageuploadprogress.css';
18
16
  import '../../theme/imageuploadicon.css';
19
17
  import '../../theme/imageuploadloader.css';
@@ -41,10 +39,12 @@ export default class ImageUploadProgress extends Plugin {
41
39
  /**
42
40
  * The image placeholder that is displayed before real image data can be accessed.
43
41
  *
42
+ * For the record, this image is a 1x1 px GIF with an aspect ratio set by CSS.
43
+ *
44
44
  * @protected
45
45
  * @member {String} #placeholder
46
46
  */
47
- this.placeholder = 'data:image/svg+xml;utf8,' + encodeURIComponent( uploadingPlaceholder );
47
+ this.placeholder = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
48
48
  }
49
49
 
50
50
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
package/src/imageutils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -10,6 +10,7 @@
10
10
  export { default as AutoImage } from './autoimage';
11
11
  export { default as Image } from './image';
12
12
  export { default as ImageEditing } from './image/imageediting';
13
+ export { default as ImageCaptionUtils } from './imagecaption/imagecaptionutils';
13
14
  export { default as ImageCaption } from './imagecaption';
14
15
  export { default as ImageCaptionEditing } from './imagecaption/imagecaptionediting';
15
16
  export { default as ImageInsert } from './imageinsert';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
package/theme/image.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
2
+ * Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
5
 
@@ -1,63 +0,0 @@
1
- /**
2
- * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
- */
5
-
6
- /**
7
- * @module image/imagecaption/utils
8
- */
9
-
10
- /**
11
- * Returns the caption model element from a given image element. Returns `null` if no caption is found.
12
- *
13
- * @param {module:engine/model/element~Element} imageModelElement
14
- * @returns {module:engine/model/element~Element|null}
15
- */
16
- export function getCaptionFromImageModelElement( imageModelElement ) {
17
- for ( const node of imageModelElement.getChildren() ) {
18
- if ( !!node && node.is( 'element', 'caption' ) ) {
19
- return node;
20
- }
21
- }
22
-
23
- return null;
24
- }
25
-
26
- /**
27
- * Returns the caption model element for a model selection. Returns `null` if the selection has no caption element ancestor.
28
- *
29
- * @param {module:image/imageutils~ImageUtils} imageUtils
30
- * @param {module:engine/model/selection~Selection} selection
31
- * @returns {module:engine/model/element~Element|null}
32
- */
33
- export function getCaptionFromModelSelection( imageUtils, selection ) {
34
- const captionElement = selection.getFirstPosition().findAncestor( 'caption' );
35
-
36
- if ( !captionElement ) {
37
- return null;
38
- }
39
-
40
- if ( imageUtils.isBlockImage( captionElement.parent ) ) {
41
- return captionElement;
42
- }
43
-
44
- return null;
45
- }
46
-
47
- /**
48
- * {@link module:engine/view/matcher~Matcher} pattern. Checks if a given element is a `<figcaption>` element that is placed
49
- * inside the image `<figure>` element.
50
- *
51
- * @param {module:image/imageutils~ImageUtils} imageUtils
52
- * @param {module:engine/view/element~Element} element
53
- * @returns {Object|null} Returns the object accepted by {@link module:engine/view/matcher~Matcher} or `null` if the element
54
- * cannot be matched.
55
- */
56
- export function matchImageCaptionViewElement( imageUtils, element ) {
57
- // Convert only captions for images.
58
- if ( element.name == 'figcaption' && imageUtils.isBlockImageView( element.parent ) ) {
59
- return { name: true };
60
- }
61
-
62
- return null;
63
- }
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 250"><rect rx="4"/></svg>