@ones-editor/editor 3.1.3 → 3.1.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 +10 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -68638,13 +68638,16 @@ ${codeText}
|
|
|
68638
68638
|
};
|
|
68639
68639
|
});
|
|
68640
68640
|
__publicField(this, "handleDrop", (event) => {
|
|
68641
|
-
var _a, _b, _c;
|
|
68642
|
-
event.
|
|
68641
|
+
var _a, _b, _c, _d, _e;
|
|
68642
|
+
const dragObject = getDragObject(this.editor, event.dataTransfer);
|
|
68643
|
+
const isExternalFileDrop = !dragObject && Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.types) != null ? _b : []).includes("Files");
|
|
68644
|
+
if (!isExternalFileDrop) {
|
|
68645
|
+
event.stopPropagation();
|
|
68646
|
+
}
|
|
68643
68647
|
setTimeout(() => {
|
|
68644
68648
|
this.indicator.hide();
|
|
68645
68649
|
});
|
|
68646
|
-
const
|
|
68647
|
-
const files = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);
|
|
68650
|
+
const files = Array.from((_d = (_c = event.dataTransfer) == null ? void 0 : _c.files) != null ? _d : []);
|
|
68648
68651
|
if (!dragObject && files.length === 0) {
|
|
68649
68652
|
if (event.dataTransfer) {
|
|
68650
68653
|
event.dataTransfer.dropEffect = "none";
|
|
@@ -68655,7 +68658,7 @@ ${codeText}
|
|
|
68655
68658
|
const target = this.indicator.target;
|
|
68656
68659
|
if (target) {
|
|
68657
68660
|
const { block, insertPos } = target;
|
|
68658
|
-
const targetBlock = (
|
|
68661
|
+
const targetBlock = (_e = typeof insertPos === "object" && insertPos.type === "custom" ? insertPos.targetBlock : void 0) != null ? _e : block;
|
|
68659
68662
|
const sourceBlock = getDraggedBlock(this.editor, event.dataTransfer);
|
|
68660
68663
|
this.editor.undoManager.runInGroup(() => {
|
|
68661
68664
|
if (typeof insertPos === "object" && insertPos.type === "combine" && sourceBlock) {
|
|
@@ -97108,7 +97111,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97108
97111
|
}
|
|
97109
97112
|
}
|
|
97110
97113
|
});
|
|
97111
|
-
editor.version = "3.1.
|
|
97114
|
+
editor.version = "3.1.4-beta.ONES22302151.1";
|
|
97112
97115
|
return editor;
|
|
97113
97116
|
}
|
|
97114
97117
|
function isDoc(doc2) {
|
|
@@ -97249,7 +97252,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
97249
97252
|
OnesEditorDropTarget.register(editor);
|
|
97250
97253
|
OnesEditorTocProvider.register(editor);
|
|
97251
97254
|
OnesEditorExclusiveBlock.register(editor);
|
|
97252
|
-
editor.version = "3.1.
|
|
97255
|
+
editor.version = "3.1.4-beta.ONES22302151.1";
|
|
97253
97256
|
return editor;
|
|
97254
97257
|
} catch (error2) {
|
|
97255
97258
|
if (editorForCleanup) {
|