@ones-editor/editor 2.2.14-beta.17 → 2.2.14-beta.18

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
@@ -7140,6 +7140,7 @@ div.editor-root.readonly div.editor-content div[data-type=editor-container] .emb
7140
7140
  .embed-block[data-embed-type=mermaid] div[data-type=block-content],
7141
7141
  .embed-block[data-embed-type=flowchart] div[data-type=block-content],
7142
7142
  .embed-block[data-embed-type=plantuml] div[data-type=block-content] {
7143
+ max-height: 1000px;
7143
7144
  --border-color: #e5e5e5;
7144
7145
  outline: 1px solid var(--border-color);
7145
7146
  border-radius: 3px;
@@ -81485,6 +81486,7 @@ ${content}
81485
81486
  this.bindImage();
81486
81487
  }
81487
81488
  setAttributes(this.parent, { "data-src": src });
81489
+ this.setStatus("success");
81488
81490
  this.image.src = src;
81489
81491
  }
81490
81492
  destroy() {
@@ -81757,10 +81759,7 @@ ${content}
81757
81759
  const newData = this.createGraphEmbedData(this.block, { view: (_a = this.viewSelect) == null ? void 0 : _a.selectedView });
81758
81760
  this.editor.updateEmbedData(this.block, newData);
81759
81761
  });
81760
- __publicField(this, "handleInputChange", async (codeValue) => {
81761
- if (!this.hasChanged(this.block, codeValue)) {
81762
- return;
81763
- }
81762
+ __publicField(this, "updateCodeValue", async (codeValue) => {
81764
81763
  try {
81765
81764
  const resourceId = await this.code2ResourceId(codeValue);
81766
81765
  const newData = this.createGraphEmbedData(this.block, { code: codeValue, src: resourceId });
@@ -81770,6 +81769,19 @@ ${content}
81770
81769
  this.editor.updateEmbedData(this.block, newData);
81771
81770
  }
81772
81771
  });
81772
+ __publicField(this, "delayUpdateInputTimer", null);
81773
+ __publicField(this, "handleInputChange", async (codeValue) => {
81774
+ if (!this.hasChanged(this.block, codeValue)) {
81775
+ return;
81776
+ }
81777
+ this.updateDraw("", codeValue);
81778
+ if (this.delayUpdateInputTimer) {
81779
+ clearTimeout(this.delayUpdateInputTimer);
81780
+ }
81781
+ this.delayUpdateInputTimer = setTimeout(async () => {
81782
+ this.updateCodeValue(codeValue);
81783
+ }, 5e3 * 3);
81784
+ });
81773
81785
  __publicField(this, "handleFlexChange", (flex) => {
81774
81786
  const newData = this.createGraphEmbedData(this.block, { flex });
81775
81787
  this.editor.updateEmbedData(this.block, newData);
@@ -81813,6 +81825,12 @@ ${content}
81813
81825
  exclusiveBlock(this.editor, block);
81814
81826
  } else {
81815
81827
  unexclusiveBlock(this.editor, block);
81828
+ if (this.delayUpdateInputTimer) {
81829
+ clearTimeout(this.delayUpdateInputTimer);
81830
+ }
81831
+ if (this.hasChanged(block, getCodeEditor(block).value)) {
81832
+ this.updateCodeValue(getCodeEditor(block).value);
81833
+ }
81816
81834
  }
81817
81835
  });
81818
81836
  __publicField(this, "updateHeight", (content, height) => {
@@ -89179,7 +89197,7 @@ ${data2.plantumlText}
89179
89197
  }
89180
89198
  }
89181
89199
  });
89182
- editor.version = "2.2.14-beta.17";
89200
+ editor.version = "2.2.14-beta.18";
89183
89201
  return editor;
89184
89202
  }
89185
89203
  function isDoc(doc2) {
@@ -89281,7 +89299,7 @@ ${data2.plantumlText}
89281
89299
  });
89282
89300
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
89283
89301
  OnesEditorToolbar.register(editor);
89284
- editor.version = "2.2.14-beta.17";
89302
+ editor.version = "2.2.14-beta.18";
89285
89303
  return editor;
89286
89304
  }
89287
89305
  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.2.14-beta.17",
3
+ "version": "2.2.14-beta.18",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {