@ones-editor/editor 4.0.4-beta.ONES22302091.1 → 4.0.4-beta.ONES22302151.1
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +11 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -68745,13 +68745,16 @@ ${codeText}
|
|
|
68745
68745
|
};
|
|
68746
68746
|
});
|
|
68747
68747
|
__publicField(this, "handleDrop", (event) => {
|
|
68748
|
-
var _a, _b, _c;
|
|
68749
|
-
event.
|
|
68748
|
+
var _a, _b, _c, _d, _e;
|
|
68749
|
+
const dragObject = getDragObject(this.editor, event.dataTransfer);
|
|
68750
|
+
const isExternalFileDrop = !dragObject && Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.types) != null ? _b : []).includes("Files");
|
|
68751
|
+
if (!isExternalFileDrop) {
|
|
68752
|
+
event.stopPropagation();
|
|
68753
|
+
}
|
|
68750
68754
|
setTimeout(() => {
|
|
68751
68755
|
this.indicator.hide();
|
|
68752
68756
|
});
|
|
68753
|
-
const
|
|
68754
|
-
const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);
|
|
68757
|
+
const files = Array.from((_d = (_c = event.dataTransfer) == null ? void 0 : _c.files) != null ? _d : []);
|
|
68755
68758
|
if (!dragObject && files.length === 0) {
|
|
68756
68759
|
if (event.dataTransfer) {
|
|
68757
68760
|
event.dataTransfer.dropEffect = "none";
|
|
@@ -68762,7 +68765,7 @@ ${codeText}
|
|
|
68762
68765
|
const target = this.indicator.target;
|
|
68763
68766
|
if (target) {
|
|
68764
68767
|
const { block, insertPos } = target;
|
|
68765
|
-
const targetBlock = (
|
|
68768
|
+
const targetBlock = (_e = typeof insertPos === "object" && insertPos.type === "custom" ? insertPos.targetBlock : void 0) != null ? _e : block;
|
|
68766
68769
|
const sourceBlock = getDraggedBlock(this.editor, event.dataTransfer);
|
|
68767
68770
|
this.editor.undoManager.runInGroup(() => {
|
|
68768
68771
|
if (typeof insertPos === "object" && insertPos.type === "combine" && sourceBlock) {
|
|
@@ -97253,7 +97256,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97253
97256
|
}
|
|
97254
97257
|
}
|
|
97255
97258
|
});
|
|
97256
|
-
editor.version = "4.0.4-beta.
|
|
97259
|
+
editor.version = "4.0.4-beta.ONES22302151.1";
|
|
97257
97260
|
return editor;
|
|
97258
97261
|
}
|
|
97259
97262
|
function isDoc(doc2) {
|
|
@@ -97389,7 +97392,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97389
97392
|
OnesEditorDropTarget.register(editor);
|
|
97390
97393
|
OnesEditorTocProvider.register(editor);
|
|
97391
97394
|
OnesEditorExclusiveBlock.register(editor);
|
|
97392
|
-
editor.version = "4.0.4-beta.
|
|
97395
|
+
editor.version = "4.0.4-beta.ONES22302151.1";
|
|
97393
97396
|
return editor;
|
|
97394
97397
|
} catch (error2) {
|
|
97395
97398
|
try {
|
|
@@ -97532,7 +97535,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97532
97535
|
}
|
|
97533
97536
|
}
|
|
97534
97537
|
});
|
|
97535
|
-
editor.version = "4.0.4-beta.
|
|
97538
|
+
editor.version = "4.0.4-beta.ONES22302151.1";
|
|
97536
97539
|
return editor;
|
|
97537
97540
|
}
|
|
97538
97541
|
const emojis$1 = {
|