@ckeditor/ckeditor5-clipboard 44.3.0-alpha.7 → 45.0.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.
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
@@ -5,7 +5,7 @@
5
5
  import { Plugin } from '@ckeditor/ckeditor5-core/dist/index.js';
6
6
  import { EventInfo, getRangeFromMouseEvent, uid, toUnit, delay, DomEmitterMixin, global, Rect, ResizeObserver, env, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
7
7
  import { DomEventObserver, DataTransfer, Range, MouseObserver, LiveRange } from '@ckeditor/ckeditor5-engine/dist/index.js';
8
- import { mapValues, throttle } from 'lodash-es';
8
+ import { mapValues, throttle } from 'es-toolkit/compat';
9
9
  import { Widget, isWidget } from '@ckeditor/ckeditor5-widget/dist/index.js';
10
10
  import { View } from '@ckeditor/ckeditor5-ui/dist/index.js';
11
11
 
@@ -598,7 +598,7 @@ const listElements = [
598
598
  // The easiest way to bypass this issue is to rename already existing in map nodes and
599
599
  // set them new unique name.
600
600
  let skipAssign = false;
601
- if (prevFakeMarker && prevFakeMarker.start && prevFakeMarker.end) {
601
+ if (prevFakeMarker?.start && prevFakeMarker?.end) {
602
602
  const config = this._getMarkerClipboardConfig(fakeMarker.name);
603
603
  if (config.duplicateOnPaste) {
604
604
  acc[this._getUniqueMarkerName(fakeMarker.name)] = acc[fakeMarker.name];
@@ -1663,7 +1663,7 @@ const toPx = /* #__PURE__ */ toUnit('px');
1663
1663
  // The handler for the drag start; it is responsible for setting data transfer object.
1664
1664
  this.listenTo(viewDocument, 'dragstart', (evt, data)=>{
1665
1665
  // Don't drag the editable element itself.
1666
- if (data.target && data.target.is('editableElement')) {
1666
+ if (data.target?.is('editableElement')) {
1667
1667
  data.preventDefault();
1668
1668
  return;
1669
1669
  }