@ones-editor/editor 2.4.1 → 2.4.2

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
@@ -11140,11 +11140,10 @@ var __publicField = (obj, key, value) => {
11140
11140
  constructor(options) {
11141
11141
  __publicField(this, "cancelScroll", null);
11142
11142
  __publicField(this, "options");
11143
- __publicField(this, "scrollDomInfo");
11144
11143
  __publicField(this, "scrolling", false);
11145
11144
  __publicField(this, "getScrollingDirection", (e2) => {
11146
11145
  const { x, y } = e2;
11147
- const { top, bottom, left, right } = this.scrollDomInfo;
11146
+ const { top, bottom, left, right } = this.getScrollDomInfo();
11148
11147
  const { edge } = this.options;
11149
11148
  if (edge.top && y <= edge.top + top) {
11150
11149
  return "top";
@@ -11181,7 +11180,6 @@ var __publicField = (obj, key, value) => {
11181
11180
  }
11182
11181
  });
11183
11182
  this.options = options;
11184
- this.scrollDomInfo = this.getScrollDomInfo();
11185
11183
  }
11186
11184
  getScrollDomInfo() {
11187
11185
  const { scrollElement } = this.options;
@@ -84816,10 +84814,11 @@ ${data2.flowchartText}
84816
84814
  checker: () => !!(window.mxUtils && window.mxGraph && window.mxCodec),
84817
84815
  maxRetryTime: 5e3
84818
84816
  })).then(() => {
84819
- const { mxUtils, mxGraph: MxGraph, mxCodec: MxCodec } = window;
84817
+ const { mxUtils, mxGraph: MxGraph, mxCodec: MxCodec, Graph } = window;
84820
84818
  assert(logger$i, mxUtils, "External resource loading exception: mxUtils");
84821
84819
  assert(logger$i, MxGraph, "External resource loading exception: MxGraph");
84822
84820
  assert(logger$i, MxCodec, "External resource loading exception: MxCodec");
84821
+ assert(logger$i, Graph, "External resource loading exception: Graph");
84823
84822
  const file2 = mxUtils.parseXml(mxFile);
84824
84823
  embed.innerHTML = "";
84825
84824
  const node = file2.documentElement;
@@ -84841,7 +84840,7 @@ ${data2.flowchartText}
84841
84840
  const xml = new XMLSerializer().serializeToString(data2.firstElementChild);
84842
84841
  xmlDoc = mxUtils.parseXml(xml);
84843
84842
  }
84844
- const graph = new MxGraph(embed);
84843
+ const graph = new Graph(embed);
84845
84844
  graph.resetViewOnRootChange = false;
84846
84845
  graph.foldingEnabled = false;
84847
84846
  graph.setTooltips(false);
@@ -85094,7 +85093,7 @@ ${data2.flowchartText}
85094
85093
  const block = blocks[i];
85095
85094
  if (block.type === "embed" && block.embedType === "drawio") {
85096
85095
  const src = ((_a = block.embedData) == null ? void 0 : _a.src) || "";
85097
- if (!this.isSameOrigin(editor, doc2, src)) {
85096
+ if (src && !this.isSameOrigin(editor, doc2, src)) {
85098
85097
  blocks.splice(i, 1);
85099
85098
  }
85100
85099
  }
@@ -92115,7 +92114,7 @@ ${data2.plantumlText}
92115
92114
  }
92116
92115
  }
92117
92116
  });
92118
- editor.version = "2.4.1";
92117
+ editor.version = "2.4.2";
92119
92118
  return editor;
92120
92119
  }
92121
92120
  function isDoc(doc2) {
@@ -92228,7 +92227,7 @@ ${data2.plantumlText}
92228
92227
  }
92229
92228
  });
92230
92229
  OnesEditorToolbar.register(editor);
92231
- editor.version = "2.4.1";
92230
+ editor.version = "2.4.2";
92232
92231
  return editor;
92233
92232
  }
92234
92233
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {