@ones-editor/editor 3.0.4-beta.107 → 3.0.4-beta.109

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/index.js CHANGED
@@ -13426,7 +13426,7 @@ var __publicField = (obj, key, value) => {
13426
13426
  }
13427
13427
  embed.handleDeleteBlock(editor, block, local, options);
13428
13428
  }
13429
- function handleUpdateBlock$6(editor, block, blockData) {
13429
+ function handleUpdateBlock$7(editor, block, blockData) {
13430
13430
  const embedType = getEmbedType(block);
13431
13431
  const embed = getEmbedClassByType(editor, embedType);
13432
13432
  if (embed.handleUpdateBlock) {
@@ -13483,7 +13483,7 @@ var __publicField = (obj, key, value) => {
13483
13483
  getBlockProperties: getBlockProperties$d,
13484
13484
  getOptions: getOptions$a,
13485
13485
  handleDeleteBlock: handleDeleteBlock$9,
13486
- handleUpdateBlock: handleUpdateBlock$6,
13486
+ handleUpdateBlock: handleUpdateBlock$7,
13487
13487
  handleDropOver: handleDropOver$2,
13488
13488
  handleDrop: handleDrop$2,
13489
13489
  toStandardDoc: toStandardDoc$2,
@@ -65540,6 +65540,13 @@ $$${mathData.mathjaxText}$$
65540
65540
  const embedData = toImageEmbedData(this.images, getWidthPercent(this.blockData));
65541
65541
  this.editor.updateEmbedData(block2, embedData);
65542
65542
  setTimeout(() => {
65543
+ const doc2 = this.editor.doc.externalDoc;
65544
+ if ("status" in doc2) {
65545
+ const status = doc2.status;
65546
+ if (status !== "clean") {
65547
+ console.error("doc is dirty");
65548
+ }
65549
+ }
65543
65550
  removeClass(block2, "media-block-uploading");
65544
65551
  }, 2e3);
65545
65552
  return true;
@@ -75375,7 +75382,7 @@ ${codeText}
75375
75382
  handleInsertEmptyBlock: handleInsertEmptyBlock$1
75376
75383
  };
75377
75384
  }
75378
- function handleUpdateBlock$5(editor, blockElement, blockData) {
75385
+ function handleUpdateBlock$6(editor, blockElement, blockData) {
75379
75386
  updateBlockContent(editor, blockElement, blockData);
75380
75387
  setTimeout(() => {
75381
75388
  const range = editor.selection.range;
@@ -75439,7 +75446,7 @@ ${codeText}
75439
75446
  selectionToDoc,
75440
75447
  getOptions: getOptions$6,
75441
75448
  getTextToolbarReferenceClient: getTextToolbarReferenceClient$1,
75442
- handleUpdateBlock: handleUpdateBlock$5,
75449
+ handleUpdateBlock: handleUpdateBlock$6,
75443
75450
  handleDeleteBlock: handleDeleteBlock$4,
75444
75451
  getBlockProperties: getBlockProperties$9,
75445
75452
  handleDropOver(editor, targetBlock, dragData, x, y) {
@@ -81423,6 +81430,13 @@ ${docStr}
81423
81430
  }
81424
81431
  } else {
81425
81432
  setTimeout(() => {
81433
+ const doc2 = editor.doc.externalDoc;
81434
+ if ("status" in doc2) {
81435
+ const status = doc2.status;
81436
+ if (status !== "clean") {
81437
+ console.error("doc is dirty");
81438
+ }
81439
+ }
81426
81440
  removeClass(block, "uploading");
81427
81441
  }, 2e3);
81428
81442
  }
@@ -81533,6 +81547,18 @@ ${docStr}
81533
81547
  requestDownload(url, fileData2.fileName);
81534
81548
  });
81535
81549
  }
81550
+ function handleUpdateBlock$5(editor, block, blockData) {
81551
+ if (blockData.embedData.src && blockData.embedData.src !== "empty") {
81552
+ setTimeout(() => {
81553
+ const cardRoot = block.querySelector(".card-root");
81554
+ if (cardRoot) {
81555
+ removeClass(cardRoot, "file-empty");
81556
+ }
81557
+ removeClass(block, "uploading");
81558
+ }, 2e3);
81559
+ }
81560
+ return true;
81561
+ }
81536
81562
  class FileEmbedCommands {
81537
81563
  constructor(editor) {
81538
81564
  __publicField(this, "group", "hovering-toolbar");
@@ -81669,6 +81695,7 @@ ${docStr}
81669
81695
  const FileEmbed = {
81670
81696
  embedType: "office",
81671
81697
  createEmbedContent: createEmbedContent$7,
81698
+ handleUpdateBlock: handleUpdateBlock$5,
81672
81699
  getBlockProperties: getBlockProperties$8,
81673
81700
  convertTo: convertTo$a,
81674
81701
  toStandardDoc: toStandardDoc$1,
@@ -92224,6 +92251,13 @@ ${data2.plantumlText}
92224
92251
  this.renderRetry(file2, e2);
92225
92252
  }
92226
92253
  setTimeout(() => {
92254
+ const doc2 = editor.doc.externalDoc;
92255
+ if ("status" in doc2) {
92256
+ const status = doc2.status;
92257
+ if (status !== "clean") {
92258
+ console.error("doc is dirty");
92259
+ }
92260
+ }
92227
92261
  removeClass(block, "media-block-uploading");
92228
92262
  }, 2e3);
92229
92263
  });
@@ -96705,7 +96739,7 @@ ${JSON.stringify(error2, null, 2)}`);
96705
96739
  }
96706
96740
  }
96707
96741
  });
96708
- editor.version = "3.0.4-beta.107";
96742
+ editor.version = "3.0.4-beta.109";
96709
96743
  return editor;
96710
96744
  }
96711
96745
  function isDoc(doc2) {
@@ -96839,7 +96873,7 @@ ${JSON.stringify(error2, null, 2)}`);
96839
96873
  OnesEditorDropTarget.register(editor);
96840
96874
  OnesEditorTocProvider.register(editor);
96841
96875
  OnesEditorExclusiveBlock.register(editor);
96842
- editor.version = "3.0.4-beta.107";
96876
+ editor.version = "3.0.4-beta.109";
96843
96877
  return editor;
96844
96878
  }
96845
96879
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "3.0.4-beta.107",
3
+ "version": "3.0.4-beta.109",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {