@ckeditor/ckeditor5-widget 0.0.0-nightly-next-20250224.0 → 0.0.0-nightly-20250225.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-widget might be problematic. Click here for more details.

package/LICENSE.md CHANGED
@@ -18,7 +18,7 @@ Where not otherwise indicated, all CKEditor content is authored by CKSource engi
18
18
 
19
19
  The following libraries are included in CKEditor under the [MIT license](https://opensource.org/licenses/MIT):
20
20
 
21
- * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
21
+ * Lodash - Copyright (c) JS Foundation and other contributors https://js.foundation/. Based on Underscore.js, copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors http://underscorejs.org/.
22
22
 
23
23
  Trademarks
24
24
  ----------
package/dist/index.js CHANGED
@@ -6,10 +6,9 @@ import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
6
6
  import { MouseObserver, TreeWalker } from '@ckeditor/ckeditor5-engine/dist/index.js';
7
7
  import { Delete } from '@ckeditor/ckeditor5-typing/dist/index.js';
8
8
  import { EmitterMixin, Rect, CKEditorError, toArray, isForwardArrowKeyCode, env, keyCodes, getLocalizedArrowKeyCodeDirection, getRangeFromMouseEvent, logWarning, ObservableMixin, compareArrays, global, DomEmitterMixin } from '@ckeditor/ckeditor5-utils/dist/index.js';
9
- import { IconDragHandle, IconReturnArrow } from '@ckeditor/ckeditor5-icons/dist/index.js';
10
9
  import { IconView, Template, ContextualBalloon, ToolbarView, BalloonPanelView, View } from '@ckeditor/ckeditor5-ui/dist/index.js';
11
10
  import { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';
12
- import { throttle } from 'es-toolkit/compat';
11
+ import { throttle } from 'lodash-es';
13
12
 
14
13
  /**
15
14
  * Class used to handle the correct order of highlights on elements.
@@ -121,6 +120,8 @@ import { throttle } from 'es-toolkit/compat';
121
120
  return Array.isArray(classes) ? classes.sort().join(',') : classes;
122
121
  }
123
122
 
123
+ var dragHandleIcon = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M4 0v1H1v3H0V.5A.5.5 0 0 1 .5 0H4zm8 0h3.5a.5.5 0 0 1 .5.5V4h-1V1h-3V0zM4 16H.5a.5.5 0 0 1-.5-.5V12h1v3h3v1zm8 0v-1h3v-3h1v3.5a.5.5 0 0 1-.5.5H12z\"/><path fill-opacity=\".256\" d=\"M1 1h14v14H1z\"/><g class=\"ck-icon__selected-indicator\"><path d=\"M7 0h2v1H7V0zM0 7h1v2H0V7zm15 0h1v2h-1V7zm-8 8h2v1H7v-1z\"/><path fill-opacity=\".254\" d=\"M1 1h14v14H1z\"/></g></svg>";
124
+
124
125
  /**
125
126
  * CSS class added to each widget element.
126
127
  */ const WIDGET_CLASS_NAME = 'ck-widget';
@@ -437,7 +438,7 @@ import { throttle } from 'es-toolkit/compat';
437
438
  const domElement = this.toDomElement(domDocument);
438
439
  // Use the IconView from the ui library.
439
440
  const icon = new IconView();
440
- icon.set('content', IconDragHandle);
441
+ icon.set('content', dragHandleIcon);
441
442
  // Render the icon view right away to append its #element to the selectionHandle DOM element.
442
443
  icon.render();
443
444
  domElement.appendChild(icon.element);
@@ -535,12 +536,14 @@ import { throttle } from 'es-toolkit/compat';
535
536
  return selection.getAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);
536
537
  }
537
538
 
539
+ var returnIcon = "<svg viewBox=\"0 0 10 8\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.055.263v3.972h-6.77M1 4.216l2-2.038m-2 2 2 2.038\"/></svg>";
540
+
538
541
  const POSSIBLE_INSERTION_POSITIONS = [
539
542
  'before',
540
543
  'after'
541
544
  ];
542
545
  // Do the SVG parsing once and then clone the result <svg> DOM element for each new button.
543
- const RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(IconReturnArrow, 'image/svg+xml').firstChild;
546
+ const RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(returnIcon, 'image/svg+xml').firstChild;
544
547
  const PLUGIN_DISABLED_EDITING_ROOT_CLASS = 'ck-widget__type-around_disabled';
545
548
  /**
546
549
  * A plugin that allows users to type around widgets where normally it is impossible to place the caret due