@ckeditor/ckeditor5-media-embed 0.0.0-nightly-next-20250223.0 → 0.0.0-nightly-20250224.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.

Potentially problematic release.


This version of @ckeditor/ckeditor5-media-embed might be problematic. Click here for more details.

package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-media-embed",
3
- "version": "0.0.0-nightly-next-20250223.0",
3
+ "version": "0.0.0-nightly-20250224.0",
4
4
  "description": "Media embed feature for CKEditor 5.",
5
5
  "keywords": [
6
6
  "ckeditor",
@@ -13,16 +13,15 @@
13
13
  "type": "module",
14
14
  "main": "src/index.js",
15
15
  "dependencies": {
16
- "@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-next-20250223.0",
17
- "@ckeditor/ckeditor5-core": "0.0.0-nightly-next-20250223.0",
18
- "@ckeditor/ckeditor5-engine": "0.0.0-nightly-next-20250223.0",
19
- "@ckeditor/ckeditor5-icons": "0.0.0-nightly-next-20250223.0",
20
- "@ckeditor/ckeditor5-typing": "0.0.0-nightly-next-20250223.0",
21
- "@ckeditor/ckeditor5-ui": "0.0.0-nightly-next-20250223.0",
22
- "@ckeditor/ckeditor5-undo": "0.0.0-nightly-next-20250223.0",
23
- "@ckeditor/ckeditor5-utils": "0.0.0-nightly-next-20250223.0",
24
- "@ckeditor/ckeditor5-widget": "0.0.0-nightly-next-20250223.0",
25
- "ckeditor5": "0.0.0-nightly-next-20250223.0"
16
+ "@ckeditor/ckeditor5-clipboard": "0.0.0-nightly-20250224.0",
17
+ "@ckeditor/ckeditor5-core": "0.0.0-nightly-20250224.0",
18
+ "@ckeditor/ckeditor5-engine": "0.0.0-nightly-20250224.0",
19
+ "@ckeditor/ckeditor5-typing": "0.0.0-nightly-20250224.0",
20
+ "@ckeditor/ckeditor5-ui": "0.0.0-nightly-20250224.0",
21
+ "@ckeditor/ckeditor5-undo": "0.0.0-nightly-20250224.0",
22
+ "@ckeditor/ckeditor5-utils": "0.0.0-nightly-20250224.0",
23
+ "@ckeditor/ckeditor5-widget": "0.0.0-nightly-20250224.0",
24
+ "ckeditor5": "0.0.0-nightly-20250224.0"
26
25
  },
27
26
  "author": "CKSource (http://cksource.com/)",
28
27
  "license": "SEE LICENSE IN LICENSE.md",
@@ -37,16 +37,6 @@ export default class AutoMediaEmbed extends Plugin {
37
37
  static get isOfficialPlugin() {
38
38
  return true;
39
39
  }
40
- /**
41
- * The paste–to–embed `setTimeout` ID. Stored as a property to allow
42
- * cleaning of the timeout.
43
- */
44
- _timeoutId;
45
- /**
46
- * The position where the `<media>` element will be inserted after the timeout,
47
- * determined each time the new content is pasted into the document.
48
- */
49
- _positionToInsert;
50
40
  /**
51
41
  * @inheritDoc
52
42
  */
@@ -28,10 +28,6 @@ export default class MediaEmbedEditing extends Plugin {
28
28
  static get isOfficialPlugin() {
29
29
  return true;
30
30
  }
31
- /**
32
- * The media registry managing the media providers in the editor.
33
- */
34
- registry;
35
31
  /**
36
32
  * @inheritDoc
37
33
  */
@@ -6,10 +6,10 @@
6
6
  * @module media-embed/mediaembedui
7
7
  */
8
8
  import { Plugin } from 'ckeditor5/src/core.js';
9
- import { IconMedia } from 'ckeditor5/src/icons.js';
10
9
  import { ButtonView, CssTransitionDisablerMixin, MenuBarMenuListItemButtonView, Dialog } from 'ckeditor5/src/ui.js';
11
10
  import MediaFormView from './ui/mediaformview.js';
12
11
  import MediaEmbedEditing from './mediaembedediting.js';
12
+ import mediaIcon from '../theme/icons/media.svg';
13
13
  /**
14
14
  * The media embed UI plugin.
15
15
  */
@@ -32,7 +32,6 @@ export default class MediaEmbedUI extends Plugin {
32
32
  static get isOfficialPlugin() {
33
33
  return true;
34
34
  }
35
- _formView;
36
35
  /**
37
36
  * @inheritDoc
38
37
  */
@@ -60,7 +59,7 @@ export default class MediaEmbedUI extends Plugin {
60
59
  const buttonView = new ButtonClass(editor.locale);
61
60
  const command = editor.commands.get('mediaEmbed');
62
61
  const dialogPlugin = this.editor.plugins.get('Dialog');
63
- buttonView.icon = IconMedia;
62
+ buttonView.icon = mediaIcon;
64
63
  buttonView.bind('isEnabled').to(command, 'isEnabled');
65
64
  buttonView.on('execute', () => {
66
65
  if (dialogPlugin.id === 'mediaEmbed') {
@@ -2,8 +2,11 @@
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- import { type Locale } from 'ckeditor5/src/utils.js';
5
+ /**
6
+ * @module media-embed/mediaregistry
7
+ */
6
8
  import type { DowncastWriter, ViewElement } from 'ckeditor5/src/engine.js';
9
+ import { type Locale } from 'ckeditor5/src/utils.js';
7
10
  import type { MediaEmbedConfig, MediaEmbedProvider } from './mediaembedconfig.js';
8
11
  import type { MediaOptions } from './utils.js';
9
12
  /**
@@ -2,12 +2,9 @@
2
2
  * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
4
  */
5
- /**
6
- * @module media-embed/mediaregistry
7
- */
8
5
  import { IconView, Template } from 'ckeditor5/src/ui.js';
9
- import { IconMediaPlaceholder } from 'ckeditor5/src/icons.js';
10
6
  import { logWarning, toArray } from 'ckeditor5/src/utils.js';
7
+ import mediaPlaceholderIcon from '../theme/icons/media-placeholder.svg';
11
8
  const mediaPlaceholderIconViewBox = '0 0 64 42';
12
9
  /**
13
10
  * A bridge between the raw media content provider definitions and the editor view content.
@@ -17,15 +14,6 @@ const mediaPlaceholderIconViewBox = '0 0 64 42';
17
14
  * Mostly used by the {@link module:media-embed/mediaembedediting~MediaEmbedEditing} plugin.
18
15
  */
19
16
  export default class MediaRegistry {
20
- /**
21
- * The {@link module:utils/locale~Locale} instance.
22
- */
23
- locale;
24
- /**
25
- * The media provider definitions available for the registry. Usually corresponding with the
26
- * {@link module:media-embed/mediaembedconfig~MediaEmbedConfig media configuration}.
27
- */
28
- providerDefinitions;
29
17
  /**
30
18
  * Creates an instance of the {@link module:media-embed/mediaregistry~MediaRegistry} class.
31
19
  *
@@ -132,24 +120,6 @@ export default class MediaRegistry {
132
120
  * It can be rendered to the {@link module:engine/view/element~Element view element} and used in the editing or data pipeline.
133
121
  */
134
122
  class Media {
135
- /**
136
- * The URL this Media instance represents.
137
- */
138
- url;
139
- /**
140
- * Shorthand for {@link module:utils/locale~Locale#t}.
141
- *
142
- * @see module:utils/locale~Locale#t
143
- */
144
- _locale;
145
- /**
146
- * The output of the `RegExp.match` which validated the {@link #url} of this media.
147
- */
148
- _match;
149
- /**
150
- * The function returning the HTML string preview of this media.
151
- */
152
- _previewRenderer;
153
123
  constructor(locale, url, match, previewRenderer) {
154
124
  this.url = this._getValidUrl(url);
155
125
  this._locale = locale;
@@ -207,7 +177,7 @@ class Media {
207
177
  _getPlaceholderHtml() {
208
178
  const icon = new IconView();
209
179
  const t = this._locale.t;
210
- icon.content = IconMediaPlaceholder;
180
+ icon.content = mediaPlaceholderIcon;
211
181
  icon.viewBox = mediaPlaceholderIconViewBox;
212
182
  const placeholder = new Template({
213
183
  tag: 'div',
@@ -17,31 +17,6 @@ import '../../theme/mediaform.css';
17
17
  * See {@link module:media-embed/ui/mediaformview~MediaFormView}.
18
18
  */
19
19
  export default class MediaFormView extends View {
20
- /**
21
- * Tracks information about the DOM focus in the form.
22
- */
23
- focusTracker;
24
- /**
25
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
26
- */
27
- keystrokes;
28
- /**
29
- * The URL input view.
30
- */
31
- urlInputView;
32
- /**
33
- * An array of form validators used by {@link #isValid}.
34
- */
35
- _validators;
36
- /**
37
- * The default info text for the {@link #urlInputView}.
38
- */
39
- _urlInputViewInfoDefault;
40
- /**
41
- * The info text with an additional tip for the {@link #urlInputView},
42
- * displayed when the input has some value.
43
- */
44
- _urlInputViewInfoTip;
45
20
  /**
46
21
  * @param validators Form validators used by {@link #isValid}.
47
22
  * @param locale The localization services instance.
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 20.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 400 400" style="enable-background:new 0 0 400 400;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#1DA1F2;}
7
+ .st1{fill:#FFFFFF;}
8
+ </style>
9
+ <g id="Dark_Blue">
10
+ <circle class="st0" cx="200" cy="200" r="200"/>
11
+ </g>
12
+ <g id="Logo__x2014__FIXED">
13
+ <path class="st1" d="M163.4,305.5c88.7,0,137.2-73.5,137.2-137.2c0-2.1,0-4.2-0.1-6.2c9.4-6.8,17.6-15.3,24.1-25
14
+ c-8.6,3.8-17.9,6.4-27.7,7.6c10-6,17.6-15.4,21.2-26.7c-9.3,5.5-19.6,9.5-30.6,11.7c-8.8-9.4-21.3-15.2-35.2-15.2
15
+ c-26.6,0-48.2,21.6-48.2,48.2c0,3.8,0.4,7.5,1.3,11c-40.1-2-75.6-21.2-99.4-50.4c-4.1,7.1-6.5,15.4-6.5,24.2
16
+ c0,16.7,8.5,31.5,21.5,40.1c-7.9-0.2-15.3-2.4-21.8-6c0,0.2,0,0.4,0,0.6c0,23.4,16.6,42.8,38.7,47.3c-4,1.1-8.3,1.7-12.7,1.7
17
+ c-3.1,0-6.1-0.3-9.1-0.9c6.1,19.2,23.9,33.1,45,33.5c-16.5,12.9-37.3,20.6-59.9,20.6c-3.9,0-7.7-0.2-11.5-0.7
18
+ C110.8,297.5,136.2,305.5,163.4,305.5"/>
19
+ </g>
20
+ </svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 64 42" xmlns="http://www.w3.org/2000/svg"><path d="M47.426 17V3.713L63.102 0v19.389h-.001l.001.272c0 1.595-2.032 3.43-4.538 4.098-2.506.668-4.538-.083-4.538-1.678 0-1.594 2.032-3.43 4.538-4.098.914-.244 2.032-.565 2.888-.603V4.516L49.076 7.447v9.556A1.014 1.014 0 0 0 49 17h-1.574zM29.5 17h-8.343a7.073 7.073 0 1 0-4.657 4.06v3.781H3.3a2.803 2.803 0 0 1-2.8-2.804V8.63a2.803 2.803 0 0 1 2.8-2.805h4.082L8.58 2.768A1.994 1.994 0 0 1 10.435 1.5h8.985c.773 0 1.477.448 1.805 1.149l1.488 3.177H26.7c1.546 0 2.8 1.256 2.8 2.805V17zm-11.637 0H17.5a1 1 0 0 0-1 1v.05A4.244 4.244 0 1 1 17.863 17zm29.684 2c.97 0 .953-.048.953.889v20.743c0 .953.016.905-.953.905H19.453c-.97 0-.953.048-.953-.905V19.89c0-.937-.016-.889.97-.889h28.077zm-4.701 19.338V22.183H24.154v16.155h18.692zM20.6 21.375v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616v-1.616H20.6zm0 3.231v1.616h1.616V37.53H20.6zm24.233-16.155v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615v-1.616h-1.615zm0 3.231v1.616h1.615V37.53h-1.615zM29.485 25.283a.4.4 0 0 1 .593-.35l9.05 4.977a.4.4 0 0 1 0 .701l-9.05 4.978a.4.4 0 0 1-.593-.35v-9.956z"/></svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 22 20" xmlns="http://www.w3.org/2000/svg"><path d="M1.587 1.5c-.612 0-.601-.029-.601.551v14.84c0 .59-.01.559.591.559h18.846c.602 0 .591.03.591-.56V2.052c0-.58.01-.55-.591-.55H1.587Zm.701.971h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-14.24 1h13.008v12H4.467l.029-12Zm-2.208 1h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003v1H2.288v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h1.003l-.029 1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Zm-16.448 2h.974v1h-.974v-1Zm16.448 0h1.003v1h-1.003v-1Z"/><path d="M8.374 6.648a.399.399 0 0 1 .395-.4.402.402 0 0 1 .2.049l5.148 2.824a.4.4 0 0 1 0 .7l-5.148 2.824a.403.403 0 0 1-.595-.35V6.648Z"/></svg>