@ckeditor/ckeditor5-widget 0.0.0-nightly-20250225.0 → 0.0.0-nightly-next-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
- * 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/.
21
+ * es-toolkit - Copyright (c) 2024 Viva Republica, Inc.
22
22
 
23
23
  Trademarks
24
24
  ----------
package/dist/index.js CHANGED
@@ -6,9 +6,10 @@ 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';
9
10
  import { IconView, Template, ContextualBalloon, ToolbarView, BalloonPanelView, View } from '@ckeditor/ckeditor5-ui/dist/index.js';
10
11
  import { Enter } from '@ckeditor/ckeditor5-enter/dist/index.js';
11
- import { throttle } from 'lodash-es';
12
+ import { throttle } from 'es-toolkit/compat';
12
13
 
13
14
  /**
14
15
  * Class used to handle the correct order of highlights on elements.
@@ -120,8 +121,6 @@ import { throttle } from 'lodash-es';
120
121
  return Array.isArray(classes) ? classes.sort().join(',') : classes;
121
122
  }
122
123
 
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
-
125
124
  /**
126
125
  * CSS class added to each widget element.
127
126
  */ const WIDGET_CLASS_NAME = 'ck-widget';
@@ -438,7 +437,7 @@ var dragHandleIcon = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/
438
437
  const domElement = this.toDomElement(domDocument);
439
438
  // Use the IconView from the ui library.
440
439
  const icon = new IconView();
441
- icon.set('content', dragHandleIcon);
440
+ icon.set('content', IconDragHandle);
442
441
  // Render the icon view right away to append its #element to the selectionHandle DOM element.
443
442
  icon.render();
444
443
  domElement.appendChild(icon.element);
@@ -536,14 +535,12 @@ var dragHandleIcon = "<svg viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/
536
535
  return selection.getAttribute(TYPE_AROUND_SELECTION_ATTRIBUTE);
537
536
  }
538
537
 
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
-
541
538
  const POSSIBLE_INSERTION_POSITIONS = [
542
539
  'before',
543
540
  'after'
544
541
  ];
545
542
  // Do the SVG parsing once and then clone the result <svg> DOM element for each new button.
546
- const RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(returnIcon, 'image/svg+xml').firstChild;
543
+ const RETURN_ARROW_ICON_ELEMENT = new DOMParser().parseFromString(IconReturnArrow, 'image/svg+xml').firstChild;
547
544
  const PLUGIN_DISABLED_EDITING_ROOT_CLASS = 'ck-widget__type-around_disabled';
548
545
  /**
549
546
  * A plugin that allows users to type around widgets where normally it is impossible to place the caret due