@ones-editor/editor 1.1.3-bate.2 → 1.1.3-bate.4

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
@@ -5411,9 +5411,17 @@ div.editor-root div.editor-content div[data-type=editor-container] div[data-embe
5411
5411
  }
5412
5412
  :root .iframe-embed-auth-error-tips {
5413
5413
  width: 100%;
5414
- height: 80px;
5415
- background-color: #7084a4;
5414
+ height: 34px;
5415
+ line-height: 34px;
5416
+ background-color: #f7f8fa;
5416
5417
  text-align: center;
5418
+ color: #bebfc2;
5419
+ box-shadow: 0px 2px 4px 0px rgba(45, 45, 46, 0.15), 0px 0px 1px 0px rgba(45, 45, 46, 0.1);
5420
+ }
5421
+ :root .iframe-embed-auth-error-tips span {
5422
+ cursor: pointer;
5423
+ color: #0064ff;
5424
+ user-select: none;
5417
5425
  }.editor-content .editing {
5418
5426
  background-color: rgba(205, 205, 205, 0.2509803922);
5419
5427
  }
@@ -26771,9 +26779,8 @@ ${codeText}
26771
26779
  if (!this.editor.isBlockWritable(block)) {
26772
26780
  const deletedKeys = Array.from(delta.delete).filter((key) => key !== "comments");
26773
26781
  const insertedKeys = Object.keys(delta.insert).filter((key) => key !== "comments");
26774
- if (deletedKeys.length > 0 || insertedKeys.length > 0) {
26775
- assert(logger$2G, false, `block is not writable, comment supported only, ${JSON.stringify(delta)}}`);
26776
- }
26782
+ if (deletedKeys.length > 0 || insertedKeys.length > 0)
26783
+ ;
26777
26784
  }
26778
26785
  const oldData = cloneDeep__default.default(this.getBlockData(containerId, blockIndex));
26779
26786
  const newData = cloneDeep__default.default(applyBlockDataDelta(oldData, delta));
@@ -34118,6 +34125,7 @@ ${codeText}
34118
34125
  Connection.apply(this.connection, [this.ws]);
34119
34126
  }
34120
34127
  async handleAuthError() {
34128
+ console.log("handleAuthError");
34121
34129
  if (this.reauthFunc) {
34122
34130
  if (this.retryCount === 5) {
34123
34131
  logger$2n.warn("retry auth times exceed 5, broadcast auth error");
@@ -64924,7 +64932,7 @@ ${codeText}
64924
64932
  __publicField(this, "currentBlockElement", null);
64925
64933
  __publicField(this, "resizing", false);
64926
64934
  __publicField(this, "handleHoveringBlockChange", (newBlock, oldBlock) => {
64927
- if (this.resizing || !this.editor.isWritable()) {
64935
+ if (this.resizing) {
64928
64936
  return;
64929
64937
  }
64930
64938
  if (oldBlock && isWebpageBlock(oldBlock)) {
@@ -65450,7 +65458,18 @@ ${codeText}
65450
65458
  const fixedToolbar = createElement("div", ["iframe-embed-auth-error-tips"], container);
65451
65459
  fixedToolbar.innerHTML = i18n$1.t("authError.tips");
65452
65460
  fixedToolbar.addEventListener("click", (event) => {
65453
- event.currentTarget;
65461
+ const target = event.target;
65462
+ if (target instanceof HTMLSpanElement) {
65463
+ const id = target.id;
65464
+ switch (id) {
65465
+ case "retry":
65466
+ this.reAuth();
65467
+ break;
65468
+ case "exit":
65469
+ this.exit();
65470
+ break;
65471
+ }
65472
+ }
65454
65473
  });
65455
65474
  }
65456
65475
  });
@@ -65463,6 +65482,9 @@ ${codeText}
65463
65482
  }
65464
65483
  exit() {
65465
65484
  var _a;
65485
+ if (this.currentBlock) {
65486
+ enablePageScroll(this.currentBlock.id);
65487
+ }
65466
65488
  this.unRegister();
65467
65489
  (_a = this.onIframeExitEdit) == null ? void 0 : _a.call(this);
65468
65490
  }
@@ -75059,6 +75081,7 @@ ${data.flowchartText}
75059
75081
  exports2.FileExtError = FileExtError;
75060
75082
  exports2.GroupOrder = GroupOrder;
75061
75083
  exports2.HeadingBlockScrollListener = HeadingBlockScrollListener;
75084
+ exports2.IframeKindEmbedDocCallbacks = IframeKindEmbedDocCallbacks;
75062
75085
  exports2.ImageBox = ImageBox;
75063
75086
  exports2.InlineBoxCommandProvider = InlineBoxCommandProvider;
75064
75087
  exports2.InputtingInsertion = InputtingInsertion;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "1.1.3-bate.2",
3
+ "version": "1.1.3-bate.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",