@easy-editor/core 0.0.9 → 0.0.11

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/dist/cjs/index.js CHANGED
@@ -6909,9 +6909,6 @@ class NodeChildren {
6909
6909
  if (i === index) {
6910
6910
  return;
6911
6911
  }
6912
- if (index === i) {
6913
- return;
6914
- }
6915
6912
  children.splice(index, 1);
6916
6913
  children.splice(i, 0, node);
6917
6914
  }
@@ -7330,6 +7327,9 @@ let Node$1 = class Node {
7330
7327
  setExtraPropValue(key, value) {
7331
7328
  this.setPropValue(getConvertedExtraKey(key), value);
7332
7329
  }
7330
+ clearExtraPropValue(key) {
7331
+ this.getProp(getConvertedExtraKey(key), false)?.unset();
7332
+ }
7333
7333
  clearPropValue(path) {
7334
7334
  this.getProp(path, false)?.unset();
7335
7335
  }
@@ -7384,7 +7384,7 @@ let Node$1 = class Node {
7384
7384
  return false;
7385
7385
  }
7386
7386
  insert(node, ref, useMutator = true) {
7387
- if (ref && typeof ref === 'number') {
7387
+ if (ref !== undefined && typeof ref === 'number') {
7388
7388
  const nodeInstance = ensureNode(node, this.document);
7389
7389
  this.children?.internalInsert(nodeInstance, ref, useMutator);
7390
7390
  } else {
@@ -9025,7 +9025,7 @@ class Dragon {
9025
9025
  if (!dragObject) {
9026
9026
  return;
9027
9027
  }
9028
- this.boost(dragObject, e);
9028
+ this.boost(dragObject, e, shell);
9029
9029
  };
9030
9030
  if (eventType === 'drag') {
9031
9031
  shell.draggable = true;
@@ -9041,7 +9041,7 @@ class Dragon {
9041
9041
  };
9042
9042
  }
9043
9043
  }
9044
- boost(dragObject, boostEvent) {
9044
+ boost(dragObject, boostEvent, shell) {
9045
9045
  const {
9046
9046
  designer
9047
9047
  } = this;
@@ -9089,7 +9089,10 @@ class Dragon {
9089
9089
  doc.addEventListener('keydown', checkEsc, false);
9090
9090
  });
9091
9091
  }
9092
- this.emitter.emit(DRAGON_EVENT.DRAGSTART, locateEvent);
9092
+ this.emitter.emit(DRAGON_EVENT.DRAGSTART, {
9093
+ ...locateEvent,
9094
+ shell
9095
+ });
9093
9096
  };
9094
9097
  const move = e => {
9095
9098
  if (isBoostFromDragAPI) {