@ckeditor/ckeditor5-media-embed 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 (183) hide show
  1. package/ckeditor5-metadata.json +1 -1
  2. package/dist/augmentation.d.ts +33 -31
  3. package/dist/automediaembed.d.ts +50 -50
  4. package/dist/converters.d.ts +37 -37
  5. package/dist/index-editor.css +26 -0
  6. package/dist/index.css +26 -0
  7. package/dist/index.css.map +1 -1
  8. package/dist/index.d.ts +29 -26
  9. package/dist/index.js +2601 -1956
  10. package/dist/index.js.map +1 -1
  11. package/dist/mediaembed.d.ts +33 -33
  12. package/dist/mediaembedcommand.d.ts +32 -32
  13. package/dist/mediaembedconfig.d.ts +564 -483
  14. package/dist/mediaembedediting.d.ts +30 -30
  15. package/dist/mediaembedresize/constants.d.ts +13 -13
  16. package/dist/mediaembedresize/mediaembedcustomresizeui.d.ts +64 -0
  17. package/dist/mediaembedresize/mediaembedresizebuttons.d.ts +54 -0
  18. package/dist/mediaembedresize/mediaembedresizeediting.d.ts +47 -43
  19. package/dist/mediaembedresize/mediaembedresizehandles.d.ts +38 -38
  20. package/dist/mediaembedresize/resizemediaembedcommand.d.ts +35 -35
  21. package/dist/mediaembedresize/ui/mediaembedcustomresizeformview.d.ts +118 -0
  22. package/dist/mediaembedresize/utils/getselectedmediaembededitornodes.d.ts +23 -0
  23. package/dist/mediaembedresize/utils/getselectedmediaembedpossibleresizerange.d.ts +25 -0
  24. package/dist/mediaembedresize/utils/getselectedmediaembedwidthinunits.d.ts +21 -0
  25. package/dist/mediaembedresize.d.ts +28 -25
  26. package/dist/mediaembedstyle/constants.d.ts +22 -22
  27. package/dist/mediaembedstyle/mediaembedstylecommand.d.ts +67 -67
  28. package/dist/mediaembedstyle/mediaembedstyleediting.d.ts +39 -39
  29. package/dist/mediaembedstyle/mediaembedstyleui.d.ts +76 -76
  30. package/dist/mediaembedstyle/utils.d.ts +18 -18
  31. package/dist/mediaembedstyle.d.ts +29 -29
  32. package/dist/mediaembedtoolbar.d.ts +28 -28
  33. package/dist/mediaembedui.d.ts +33 -33
  34. package/dist/mediaregistry.d.ts +59 -59
  35. package/dist/translations/af.js +1 -1
  36. package/dist/translations/af.umd.js +1 -1
  37. package/dist/translations/ar.js +1 -1
  38. package/dist/translations/ar.umd.js +1 -1
  39. package/dist/translations/ast.js +1 -1
  40. package/dist/translations/ast.umd.js +1 -1
  41. package/dist/translations/az.js +1 -1
  42. package/dist/translations/az.umd.js +1 -1
  43. package/dist/translations/be.js +1 -1
  44. package/dist/translations/be.umd.js +1 -1
  45. package/dist/translations/bg.js +1 -1
  46. package/dist/translations/bg.umd.js +1 -1
  47. package/dist/translations/bn.js +1 -1
  48. package/dist/translations/bn.umd.js +1 -1
  49. package/dist/translations/bs.js +1 -1
  50. package/dist/translations/bs.umd.js +1 -1
  51. package/dist/translations/ca.js +1 -1
  52. package/dist/translations/ca.umd.js +1 -1
  53. package/dist/translations/cs.js +1 -1
  54. package/dist/translations/cs.umd.js +1 -1
  55. package/dist/translations/da.js +1 -1
  56. package/dist/translations/da.umd.js +1 -1
  57. package/dist/translations/de-ch.js +1 -1
  58. package/dist/translations/de-ch.umd.js +1 -1
  59. package/dist/translations/de.js +1 -1
  60. package/dist/translations/de.umd.js +1 -1
  61. package/dist/translations/el.js +1 -1
  62. package/dist/translations/el.umd.js +1 -1
  63. package/dist/translations/en-au.js +1 -1
  64. package/dist/translations/en-au.umd.js +1 -1
  65. package/dist/translations/en-gb.js +1 -1
  66. package/dist/translations/en-gb.umd.js +1 -1
  67. package/dist/translations/en.js +1 -1
  68. package/dist/translations/en.umd.js +1 -1
  69. package/dist/translations/eo.js +1 -1
  70. package/dist/translations/eo.umd.js +1 -1
  71. package/dist/translations/es-co.js +1 -1
  72. package/dist/translations/es-co.umd.js +1 -1
  73. package/dist/translations/es.js +1 -1
  74. package/dist/translations/es.umd.js +1 -1
  75. package/dist/translations/et.js +1 -1
  76. package/dist/translations/et.umd.js +1 -1
  77. package/dist/translations/eu.js +1 -1
  78. package/dist/translations/eu.umd.js +1 -1
  79. package/dist/translations/fa.js +1 -1
  80. package/dist/translations/fa.umd.js +1 -1
  81. package/dist/translations/fi.js +1 -1
  82. package/dist/translations/fi.umd.js +1 -1
  83. package/dist/translations/fr.js +1 -1
  84. package/dist/translations/fr.umd.js +1 -1
  85. package/dist/translations/gl.js +1 -1
  86. package/dist/translations/gl.umd.js +1 -1
  87. package/dist/translations/gu.js +1 -1
  88. package/dist/translations/gu.umd.js +1 -1
  89. package/dist/translations/he.js +1 -1
  90. package/dist/translations/he.umd.js +1 -1
  91. package/dist/translations/hi.js +1 -1
  92. package/dist/translations/hi.umd.js +1 -1
  93. package/dist/translations/hr.js +1 -1
  94. package/dist/translations/hr.umd.js +1 -1
  95. package/dist/translations/hu.js +1 -1
  96. package/dist/translations/hu.umd.js +1 -1
  97. package/dist/translations/hy.js +1 -1
  98. package/dist/translations/hy.umd.js +1 -1
  99. package/dist/translations/id.js +1 -1
  100. package/dist/translations/id.umd.js +1 -1
  101. package/dist/translations/it.js +1 -1
  102. package/dist/translations/it.umd.js +1 -1
  103. package/dist/translations/ja.js +1 -1
  104. package/dist/translations/ja.umd.js +1 -1
  105. package/dist/translations/jv.js +1 -1
  106. package/dist/translations/jv.umd.js +1 -1
  107. package/dist/translations/kk.js +1 -1
  108. package/dist/translations/kk.umd.js +1 -1
  109. package/dist/translations/km.js +1 -1
  110. package/dist/translations/km.umd.js +1 -1
  111. package/dist/translations/kn.js +1 -1
  112. package/dist/translations/kn.umd.js +1 -1
  113. package/dist/translations/ko.js +1 -1
  114. package/dist/translations/ko.umd.js +1 -1
  115. package/dist/translations/ku.js +1 -1
  116. package/dist/translations/ku.umd.js +1 -1
  117. package/dist/translations/lt.js +1 -1
  118. package/dist/translations/lt.umd.js +1 -1
  119. package/dist/translations/lv.js +1 -1
  120. package/dist/translations/lv.umd.js +1 -1
  121. package/dist/translations/ms.js +1 -1
  122. package/dist/translations/ms.umd.js +1 -1
  123. package/dist/translations/nb.js +1 -1
  124. package/dist/translations/nb.umd.js +1 -1
  125. package/dist/translations/ne.js +1 -1
  126. package/dist/translations/ne.umd.js +1 -1
  127. package/dist/translations/nl.js +1 -1
  128. package/dist/translations/nl.umd.js +1 -1
  129. package/dist/translations/no.js +1 -1
  130. package/dist/translations/no.umd.js +1 -1
  131. package/dist/translations/oc.js +1 -1
  132. package/dist/translations/oc.umd.js +1 -1
  133. package/dist/translations/pl.js +1 -1
  134. package/dist/translations/pl.umd.js +1 -1
  135. package/dist/translations/pt-br.js +1 -1
  136. package/dist/translations/pt-br.umd.js +1 -1
  137. package/dist/translations/pt.js +1 -1
  138. package/dist/translations/pt.umd.js +1 -1
  139. package/dist/translations/ro.js +1 -1
  140. package/dist/translations/ro.umd.js +1 -1
  141. package/dist/translations/ru.js +1 -1
  142. package/dist/translations/ru.umd.js +1 -1
  143. package/dist/translations/si.js +1 -1
  144. package/dist/translations/si.umd.js +1 -1
  145. package/dist/translations/sk.js +1 -1
  146. package/dist/translations/sk.umd.js +1 -1
  147. package/dist/translations/sl.js +1 -1
  148. package/dist/translations/sl.umd.js +1 -1
  149. package/dist/translations/sq.js +1 -1
  150. package/dist/translations/sq.umd.js +1 -1
  151. package/dist/translations/sr-latn.js +1 -1
  152. package/dist/translations/sr-latn.umd.js +1 -1
  153. package/dist/translations/sr.js +1 -1
  154. package/dist/translations/sr.umd.js +1 -1
  155. package/dist/translations/sv.js +1 -1
  156. package/dist/translations/sv.umd.js +1 -1
  157. package/dist/translations/th.js +1 -1
  158. package/dist/translations/th.umd.js +1 -1
  159. package/dist/translations/ti.js +1 -1
  160. package/dist/translations/ti.umd.js +1 -1
  161. package/dist/translations/tk.js +1 -1
  162. package/dist/translations/tk.umd.js +1 -1
  163. package/dist/translations/tr.js +1 -1
  164. package/dist/translations/tr.umd.js +1 -1
  165. package/dist/translations/tt.js +1 -1
  166. package/dist/translations/tt.umd.js +1 -1
  167. package/dist/translations/ug.js +1 -1
  168. package/dist/translations/ug.umd.js +1 -1
  169. package/dist/translations/uk.js +1 -1
  170. package/dist/translations/uk.umd.js +1 -1
  171. package/dist/translations/ur.js +1 -1
  172. package/dist/translations/ur.umd.js +1 -1
  173. package/dist/translations/uz.js +1 -1
  174. package/dist/translations/uz.umd.js +1 -1
  175. package/dist/translations/vi.js +1 -1
  176. package/dist/translations/vi.umd.js +1 -1
  177. package/dist/translations/zh-cn.js +1 -1
  178. package/dist/translations/zh-cn.umd.js +1 -1
  179. package/dist/translations/zh.js +1 -1
  180. package/dist/translations/zh.umd.js +1 -1
  181. package/dist/ui/mediaformview.d.ts +83 -83
  182. package/dist/utils.d.ts +61 -61
  183. package/package.json +10 -10
@@ -1,30 +1,33 @@
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 media-embed/mediaembedresize
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { MediaEmbedResizeEditing } from './mediaembedresize/mediaembedresizeediting.js';
10
- import { MediaEmbedResizeHandles } from './mediaembedresize/mediaembedresizehandles.js';
11
- import '../theme/mediaembedresize.css';
6
+ * @module media-embed/mediaembedresize
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { MediaEmbedResizeEditing } from "./mediaembedresize/mediaembedresizeediting.js";
10
+ import { MediaEmbedResizeHandles } from "./mediaembedresize/mediaembedresizehandles.js";
11
+ import { MediaEmbedResizeButtons } from "./mediaembedresize/mediaembedresizebuttons.js";
12
+ import { MediaEmbedCustomResizeUI } from "./mediaembedresize/mediaembedcustomresizeui.js";
13
+ import "../theme/mediaembedresize.css";
12
14
  /**
13
- * The media embed resize plugin.
14
- *
15
- * It adds a possibility to resize each media embed using handles.
16
- */
15
+ * The media embed resize plugin.
16
+ *
17
+ * It adds a possibility to resize each media embed using handles, toolbar buttons,
18
+ * or a balloon-hosted custom-width input.
19
+ */
17
20
  export declare class MediaEmbedResize extends Plugin {
18
- /**
19
- * @inheritDoc
20
- */
21
- static get requires(): readonly [typeof MediaEmbedResizeEditing, typeof MediaEmbedResizeHandles];
22
- /**
23
- * @inheritDoc
24
- */
25
- static get pluginName(): "MediaEmbedResize";
26
- /**
27
- * @inheritDoc
28
- */
29
- static get isOfficialPlugin(): true;
21
+ /**
22
+ * @inheritDoc
23
+ */
24
+ static get requires(): PluginDependenciesOf<[MediaEmbedResizeEditing, MediaEmbedResizeHandles, MediaEmbedCustomResizeUI, MediaEmbedResizeButtons]>;
25
+ /**
26
+ * @inheritDoc
27
+ */
28
+ static get pluginName(): "MediaEmbedResize";
29
+ /**
30
+ * @inheritDoc
31
+ */
32
+ static override get isOfficialPlugin(): true;
30
33
  }
@@ -1,29 +1,29 @@
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 { MediaStyleDropdownDefinition, NormalizedMediaStyleOption } from '../mediaembedconfig.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 { MediaStyleDropdownDefinition, NormalizedMediaStyleOption } from "../mediaembedconfig.js";
6
6
  /**
7
- * Built-in style options provided by the plugin. Integrators can refer to these by
8
- * name in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
9
- * to opt out, override individual fields, or coexist with custom styles.
10
- *
11
- * @internal
12
- */
7
+ * Built-in style options provided by the plugin. Integrators can refer to these by
8
+ * name in {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
9
+ * to opt out, override individual fields, or coexist with custom styles.
10
+ *
11
+ * @internal
12
+ */
13
13
  export declare const DEFAULT_OPTIONS: Record<string, NormalizedMediaStyleOption>;
14
14
  /**
15
- * Short icon-name aliases that can be used as the `icon` value in a media style
16
- * option definition. Matches the alias set exposed by the image styles feature so
17
- * the two APIs feel symmetrical.
18
- *
19
- * @internal
20
- */
15
+ * Short icon-name aliases that can be used as the `icon` value in a media style
16
+ * option definition. Matches the alias set exposed by the image styles feature so
17
+ * the two APIs feel symmetrical.
18
+ *
19
+ * @internal
20
+ */
21
21
  export declare const DEFAULT_ICONS: Record<string, string>;
22
22
  /**
23
- * Built-in dropdown groupings. Each entry references built-in style component names. If any
24
- * items are filtered out by configuration, the dropdown is rebuilt from the remaining names
25
- * (or skipped entirely if fewer than two remain).
26
- *
27
- * @internal
28
- */
23
+ * Built-in dropdown groupings. Each entry references built-in style component names. If any
24
+ * items are filtered out by configuration, the dropdown is rebuilt from the remaining names
25
+ * (or skipped entirely if fewer than two remain).
26
+ *
27
+ * @internal
28
+ */
29
29
  export declare const DEFAULT_DROPDOWN_DEFINITIONS: Array<MediaStyleDropdownDefinition>;
@@ -1,72 +1,72 @@
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 media-embed/mediaembedstyle/mediaembedstylecommand
7
- */
8
- import { Command, type Editor } from '@ckeditor/ckeditor5-core';
9
- import type { NormalizedMediaStyleOption } from '../mediaembedconfig.js';
6
+ * @module media-embed/mediaembedstyle/mediaembedstylecommand
7
+ */
8
+ import { Command, type Editor } from "@ckeditor/ckeditor5-core";
9
+ import type { NormalizedMediaStyleOption } from "../mediaembedconfig.js";
10
10
  /**
11
- * The media embed style command. It is used to apply a style option (e.g. an alignment) to a
12
- * selected media embed.
13
- *
14
- * The set of accepted style values comes from the resolved
15
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
16
- * options. Values not in that set are silently rejected by {@link #execute}.
17
- */
11
+ * The media embed style command. It is used to apply a style option (e.g. an alignment) to a
12
+ * selected media embed.
13
+ *
14
+ * The set of accepted style values comes from the resolved
15
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
16
+ * options. Values not in that set are silently rejected by {@link #execute}.
17
+ */
18
18
  export declare class MediaEmbedStyleCommand extends Command {
19
- /**
20
- * The currently-applied style name. `false` when no style applies — either no media is
21
- * selected, or the selected media has no `mediaStyle` attribute and no style in
22
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
23
- * is marked `isDefault: true`.
24
- */
25
- value: string | false;
26
- /**
27
- * Resolved styles indexed by `name`. Used to look up the `isDefault` flag at execute time
28
- * (any default-marked style clears the attribute) and to validate that a requested style
29
- * is part of the resolved options list.
30
- */
31
- private readonly _styles;
32
- /**
33
- * The `name` of the first style with `isDefault: true` in the resolved options, or `null`
34
- * when the integrator did not designate a default. Exposed via {@link #value} when the
35
- * selected media has no `mediaStyle` attribute, so the default-state UI button can light up.
36
- * Does not gate the "clear attribute" branch in {@link #execute} — that uses the per-style
37
- * `isDefault` flag so multi-default configs behave consistently with the downcast.
38
- */
39
- private readonly _defaultStyleName;
40
- /**
41
- * Creates an instance of the media embed style command.
42
- *
43
- * @param editor The editor instance.
44
- * @param styles The resolved list of style options that this command will accept.
45
- */
46
- constructor(editor: Editor, styles: Array<NormalizedMediaStyleOption>);
47
- /**
48
- * @inheritDoc
49
- */
50
- refresh(): void;
51
- /**
52
- * Executes the command and applies the chosen style to the currently selected media embed.
53
- *
54
- * ```ts
55
- * editor.execute( 'mediaStyle', { value: 'alignLeft' } );
56
- * editor.execute( 'mediaStyle', { value: 'alignCenter' } ); // removes the attribute — alignCenter is the built-in default
57
- * editor.execute( 'mediaStyle', { value: null } ); // removes the attribute
58
- * ```
59
- *
60
- * The default style is encoded on the model as the absence of the `mediaStyle` attribute.
61
- * Passing any `isDefault: true` style name (or `null`) therefore clears the attribute. Values
62
- * that are neither falsy, an `isDefault` style, nor present in the resolved options list are
63
- * silently rejected.
64
- *
65
- * @param options
66
- * @param options.value The name of the style to apply, or `null` to clear the alignment.
67
- * @fires execute
68
- */
69
- execute(options: {
70
- value: string | null;
71
- }): void;
19
+ /**
20
+ * The currently-applied style name. `false` when no style applies — either no media is
21
+ * selected, or the selected media has no `mediaStyle` attribute and no style in
22
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
23
+ * is marked `isDefault: true`.
24
+ */
25
+ value: string | false;
26
+ /**
27
+ * Resolved styles indexed by `name`. Used to look up the `isDefault` flag at execute time
28
+ * (any default-marked style clears the attribute) and to validate that a requested style
29
+ * is part of the resolved options list.
30
+ */
31
+ private readonly _styles;
32
+ /**
33
+ * The `name` of the first style with `isDefault: true` in the resolved options, or `null`
34
+ * when the integrator did not designate a default. Exposed via {@link #value} when the
35
+ * selected media has no `mediaStyle` attribute, so the default-state UI button can light up.
36
+ * Does not gate the "clear attribute" branch in {@link #execute} — that uses the per-style
37
+ * `isDefault` flag so multi-default configs behave consistently with the downcast.
38
+ */
39
+ private readonly _defaultStyleName;
40
+ /**
41
+ * Creates an instance of the media embed style command.
42
+ *
43
+ * @param editor The editor instance.
44
+ * @param styles The resolved list of style options that this command will accept.
45
+ */
46
+ constructor(editor: Editor, styles: Array<NormalizedMediaStyleOption>);
47
+ /**
48
+ * @inheritDoc
49
+ */
50
+ override refresh(): void;
51
+ /**
52
+ * Executes the command and applies the chosen style to the currently selected media embed.
53
+ *
54
+ * ```ts
55
+ * editor.execute( 'mediaStyle', { value: 'alignLeft' } );
56
+ * editor.execute( 'mediaStyle', { value: 'alignCenter' } ); // removes the attribute — alignCenter is the built-in default
57
+ * editor.execute( 'mediaStyle', { value: null } ); // removes the attribute
58
+ * ```
59
+ *
60
+ * The default style is encoded on the model as the absence of the `mediaStyle` attribute.
61
+ * Passing any `isDefault: true` style name (or `null`) therefore clears the attribute. Values
62
+ * that are neither falsy, an `isDefault` style, nor present in the resolved options list are
63
+ * silently rejected.
64
+ *
65
+ * @param options
66
+ * @param options.value The name of the style to apply, or `null` to clear the alignment.
67
+ * @fires execute
68
+ */
69
+ override execute(options: {
70
+ value: string | null;
71
+ }): void;
72
72
  }
@@ -1,43 +1,43 @@
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 { Plugin } from '@ckeditor/ckeditor5-core';
6
- import { MediaEmbedEditing } from '../mediaembedediting.js';
7
- import type { NormalizedMediaStyleOption } from '../mediaembedconfig.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 { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
6
+ import { MediaEmbedEditing } from "../mediaembedediting.js";
7
+ import type { NormalizedMediaStyleOption } from "../mediaembedconfig.js";
8
8
  /**
9
- * The media embed style engine plugin. It extends the schema with the `mediaStyle` attribute,
10
- * registers the {@link module:media-embed/mediaembedstyle/mediaembedstylecommand~MediaEmbedStyleCommand} command,
11
- * and adds the converters that apply alignment CSS classes to the figure.
12
- */
9
+ * The media embed style engine plugin. It extends the schema with the `mediaStyle` attribute,
10
+ * registers the {@link module:media-embed/mediaembedstyle/mediaembedstylecommand~MediaEmbedStyleCommand} command,
11
+ * and adds the converters that apply alignment CSS classes to the figure.
12
+ */
13
13
  export declare class MediaEmbedStyleEditing extends Plugin {
14
- /**
15
- * The resolved list of media style options. Built once from
16
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
17
- * during {@link #init} and consumed by both the command and the UI plugin (single source of truth).
18
- *
19
- * @internal
20
- * @readonly
21
- */
22
- normalizedStyles: Array<NormalizedMediaStyleOption>;
23
- /**
24
- * @inheritDoc
25
- */
26
- static get requires(): readonly [typeof MediaEmbedEditing];
27
- /**
28
- * @inheritDoc
29
- */
30
- static get pluginName(): "MediaEmbedStyleEditing";
31
- /**
32
- * @inheritDoc
33
- */
34
- static get isOfficialPlugin(): true;
35
- /**
36
- * @inheritDoc
37
- */
38
- init(): void;
39
- /**
40
- * Registers the downcast and upcast converters for the `mediaStyle` attribute.
41
- */
42
- private _registerConverters;
14
+ /**
15
+ * The resolved list of media style options. Built once from
16
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
17
+ * during {@link #init} and consumed by both the command and the UI plugin (single source of truth).
18
+ *
19
+ * @internal
20
+ * @readonly
21
+ */
22
+ normalizedStyles: Array<NormalizedMediaStyleOption>;
23
+ /**
24
+ * @inheritDoc
25
+ */
26
+ static get requires(): PluginDependenciesOf<[MediaEmbedEditing]>;
27
+ /**
28
+ * @inheritDoc
29
+ */
30
+ static get pluginName(): "MediaEmbedStyleEditing";
31
+ /**
32
+ * @inheritDoc
33
+ */
34
+ static override get isOfficialPlugin(): true;
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ init(): void;
39
+ /**
40
+ * Registers the downcast and upcast converters for the `mediaStyle` attribute.
41
+ */
42
+ private _registerConverters;
43
43
  }
@@ -1,81 +1,81 @@
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 media-embed/mediaembedstyle/mediaembedstyleui
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { MediaEmbedStyleEditing } from './mediaembedstyleediting.js';
6
+ * @module media-embed/mediaembedstyle/mediaembedstyleui
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { MediaEmbedStyleEditing } from "./mediaembedstyleediting.js";
10
10
  /**
11
- * The media embed style UI plugin.
12
- *
13
- * It registers a button for every style in the resolved
14
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
15
- * list, and the default split-button dropdowns (`mediaEmbed:wrapText`, `mediaEmbed:breakText`)
16
- * — filtered to the styles that survived configuration. The resulting components can be placed
17
- * in the {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar media embed toolbar}.
18
- */
11
+ * The media embed style UI plugin.
12
+ *
13
+ * It registers a button for every style in the resolved
14
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#styles `config.mediaEmbed.styles`}
15
+ * list, and the default split-button dropdowns (`mediaEmbed:wrapText`, `mediaEmbed:breakText`)
16
+ * — filtered to the styles that survived configuration. The resulting components can be placed
17
+ * in the {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar media embed toolbar}.
18
+ */
19
19
  export declare class MediaEmbedStyleUI extends Plugin {
20
- /**
21
- * @inheritDoc
22
- */
23
- static get requires(): readonly [typeof MediaEmbedStyleEditing];
24
- /**
25
- * @inheritDoc
26
- */
27
- static get pluginName(): "MediaEmbedStyleUI";
28
- /**
29
- * @inheritDoc
30
- */
31
- static get isOfficialPlugin(): true;
32
- /**
33
- * @inheritDoc
34
- */
35
- init(): void;
36
- /**
37
- * Returns the alignment button definitions sourced from the resolved options list.
38
- */
39
- private _getButtonDefinitions;
40
- /**
41
- * Returns the localized titles of the built-in styles and dropdowns.
42
- */
43
- private _getLocalizedTitles;
44
- /**
45
- * Returns the split-button dropdown definitions, filtered to the styles present in the
46
- * resolved options list. Combines the {@link module:media-embed/mediaembedstyle/constants~DEFAULT_DROPDOWN_DEFINITIONS
47
- * built-in dropdowns} with custom dropdowns declared inline in
48
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}.
49
- *
50
- * A dropdown with fewer than two items is skipped — a single-item dropdown carries no value
51
- * over the flat button. If the configured `defaultItem` was filtered out, the first surviving
52
- * item becomes the default.
53
- *
54
- * When a *custom* dropdown's items reference styles that are not in the resolved options list,
55
- * a console warning is emitted (the integrator's config was not fully honored). Built-in
56
- * dropdowns auto-skip silently — they are added by the plugin, not the integrator.
57
- */
58
- private _getDropdownDefinitions;
59
- /**
60
- * Scans `config.mediaEmbed.toolbar` for entries shaped like a dropdown definition
61
- * (objects with both `items` and `defaultItem`) and returns the valid ones. `defaultItem`
62
- * is the discriminator between our split-button dropdowns and generic toolbar groupings
63
- * (which use `items` + `label` and have no `defaultItem`).
64
- *
65
- * Invalid entries (wrong name prefix, `defaultItem` missing from `items`) are warned and
66
- * dropped here. Items that reference filtered-out styles are filtered later by
67
- * {@link #_getDropdownDefinitions}, alongside the same logic that applies to built-in
68
- * dropdowns.
69
- */
70
- private _collectCustomDropdowns;
71
- /**
72
- * Registers a single alignment toggle button in the component factory.
73
- */
74
- private _createButton;
75
- /**
76
- * Registers a split-button dropdown grouping a set of alignment buttons. The action button
77
- * reflects whichever child option is currently `isOn`, falling back to the dropdown's
78
- * `defaultItem` when nothing is active.
79
- */
80
- private _createDropdown;
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static get requires(): PluginDependenciesOf<[MediaEmbedStyleEditing]>;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ static get pluginName(): "MediaEmbedStyleUI";
28
+ /**
29
+ * @inheritDoc
30
+ */
31
+ static override get isOfficialPlugin(): true;
32
+ /**
33
+ * @inheritDoc
34
+ */
35
+ init(): void;
36
+ /**
37
+ * Returns the alignment button definitions sourced from the resolved options list.
38
+ */
39
+ private _getButtonDefinitions;
40
+ /**
41
+ * Returns the localized titles of the built-in styles and dropdowns.
42
+ */
43
+ private _getLocalizedTitles;
44
+ /**
45
+ * Returns the split-button dropdown definitions, filtered to the styles present in the
46
+ * resolved options list. Combines the {@link module:media-embed/mediaembedstyle/constants~DEFAULT_DROPDOWN_DEFINITIONS
47
+ * built-in dropdowns} with custom dropdowns declared inline in
48
+ * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig#toolbar `config.mediaEmbed.toolbar`}.
49
+ *
50
+ * A dropdown with fewer than two items is skipped — a single-item dropdown carries no value
51
+ * over the flat button. If the configured `defaultItem` was filtered out, the first surviving
52
+ * item becomes the default.
53
+ *
54
+ * When a *custom* dropdown's items reference styles that are not in the resolved options list,
55
+ * a console warning is emitted (the integrator's config was not fully honored). Built-in
56
+ * dropdowns auto-skip silently — they are added by the plugin, not the integrator.
57
+ */
58
+ private _getDropdownDefinitions;
59
+ /**
60
+ * Scans `config.mediaEmbed.toolbar` for entries shaped like a dropdown definition
61
+ * (objects with both `items` and `defaultItem`) and returns the valid ones. `defaultItem`
62
+ * is the discriminator between our split-button dropdowns and generic toolbar groupings
63
+ * (which use `items` + `label` and have no `defaultItem`).
64
+ *
65
+ * Invalid entries (wrong name prefix, `defaultItem` missing from `items`) are warned and
66
+ * dropped here. Items that reference filtered-out styles are filtered later by
67
+ * {@link #_getDropdownDefinitions}, alongside the same logic that applies to built-in
68
+ * dropdowns.
69
+ */
70
+ private _collectCustomDropdowns;
71
+ /**
72
+ * Registers a single alignment toggle button in the component factory.
73
+ */
74
+ private _createButton;
75
+ /**
76
+ * Registers a split-button dropdown grouping a set of alignment buttons. The action button
77
+ * reflects whichever child option is currently `isOn`, falling back to the dropdown's
78
+ * `defaultItem` when nothing is active.
79
+ */
80
+ private _createDropdown;
81
81
  }
@@ -1,23 +1,23 @@
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 { ToolbarConfigItem } from '@ckeditor/ckeditor5-core';
6
- import type { MediaStyleConfig, MediaStyleDropdownDefinition, NormalizedMediaStyleOption } from '../mediaembedconfig.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 { ToolbarConfigItem } from "@ckeditor/ckeditor5-core";
6
+ import type { MediaStyleConfig, MediaStyleDropdownDefinition, NormalizedMediaStyleOption } from "../mediaembedconfig.js";
7
7
  /**
8
- * Normalizes the {@link module:media-embed/mediaembedconfig~MediaStyleConfig#options style options}
9
- * provided by the integrator. Each entry is resolved into a full
10
- * {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} and invalid entries
11
- * are filtered out with a console warning.
12
- *
13
- * @internal
14
- */
8
+ * Normalizes the {@link module:media-embed/mediaembedconfig~MediaStyleConfig#options style options}
9
+ * provided by the integrator. Each entry is resolved into a full
10
+ * {@link module:media-embed/mediaembedconfig~MediaStyleOptionDefinition} and invalid entries
11
+ * are filtered out with a console warning.
12
+ *
13
+ * @internal
14
+ */
15
15
  export declare function normalizeStyles(configuredStyles: MediaStyleConfig): Array<NormalizedMediaStyleOption>;
16
16
  /**
17
- * Type guard for toolbar config entries shaped like a media style dropdown definition. The
18
- * discriminator is `defaultItem` — generic toolbar groupings use `items` + `label` and never
19
- * carry a `defaultItem` field.
20
- *
21
- * @internal
22
- */
17
+ * Type guard for toolbar config entries shaped like a media style dropdown definition. The
18
+ * discriminator is `defaultItem` — generic toolbar groupings use `items` + `label` and never
19
+ * carry a `defaultItem` field.
20
+ *
21
+ * @internal
22
+ */
23
23
  export declare function isMediaStyleDropdown(item: ToolbarConfigItem | MediaStyleDropdownDefinition): item is MediaStyleDropdownDefinition;
@@ -1,34 +1,34 @@
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 media-embed/mediaembedstyle
7
- */
8
- import { Plugin } from '@ckeditor/ckeditor5-core';
9
- import { MediaEmbedStyleEditing } from './mediaembedstyle/mediaembedstyleediting.js';
10
- import { MediaEmbedStyleUI } from './mediaembedstyle/mediaembedstyleui.js';
11
- import '../theme/mediaembedstyle.css';
6
+ * @module media-embed/mediaembedstyle
7
+ */
8
+ import { Plugin, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
9
+ import { MediaEmbedStyleEditing } from "./mediaembedstyle/mediaembedstyleediting.js";
10
+ import { MediaEmbedStyleUI } from "./mediaembedstyle/mediaembedstyleui.js";
11
+ import "../theme/mediaembedstyle.css";
12
12
  /**
13
- * The media embed style plugin.
14
- *
15
- * This is a "glue" plugin which loads the following plugins:
16
- * * {@link module:media-embed/mediaembedstyle/mediaembedstyleediting~MediaEmbedStyleEditing},
17
- * * {@link module:media-embed/mediaembedstyle/mediaembedstyleui~MediaEmbedStyleUI}
18
- *
19
- * For a detailed overview, check the {@glink features/media-embed/media-embed-styles Media embed styles feature documentation}.
20
- */
13
+ * The media embed style plugin.
14
+ *
15
+ * This is a "glue" plugin which loads the following plugins:
16
+ * * {@link module:media-embed/mediaembedstyle/mediaembedstyleediting~MediaEmbedStyleEditing},
17
+ * * {@link module:media-embed/mediaembedstyle/mediaembedstyleui~MediaEmbedStyleUI}
18
+ *
19
+ * For a detailed overview, check the {@glink features/media-embed/media-embed-styles Media embed styles feature documentation}.
20
+ */
21
21
  export declare class MediaEmbedStyle extends Plugin {
22
- /**
23
- * @inheritDoc
24
- */
25
- static get requires(): readonly [typeof MediaEmbedStyleEditing, typeof MediaEmbedStyleUI];
26
- /**
27
- * @inheritDoc
28
- */
29
- static get pluginName(): "MediaEmbedStyle";
30
- /**
31
- * @inheritDoc
32
- */
33
- static get isOfficialPlugin(): true;
22
+ /**
23
+ * @inheritDoc
24
+ */
25
+ static get requires(): PluginDependenciesOf<[MediaEmbedStyleEditing, MediaEmbedStyleUI]>;
26
+ /**
27
+ * @inheritDoc
28
+ */
29
+ static get pluginName(): "MediaEmbedStyle";
30
+ /**
31
+ * @inheritDoc
32
+ */
33
+ static override get isOfficialPlugin(): true;
34
34
  }