@ones-editor/editor 2.1.1-beta.60 → 2.1.1-beta.62

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
@@ -6549,6 +6549,9 @@ html, body {
6549
6549
  .editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] div.select-handle.start {
6550
6550
  flex-direction: column-reverse;
6551
6551
  }
6552
+ div.editor-root div.editor-content div[data-block-type=embed] > .embed-mask {
6553
+ pointer-events: none;
6554
+ }
6552
6555
  div.editor-root div.editor-content div[data-block-type=embed] > .embed-mask::after {
6553
6556
  content: " ";
6554
6557
  position: absolute;
@@ -75066,10 +75069,6 @@ ${content}
75066
75069
  name: i18n$1.t("file.commands.download"),
75067
75070
  icon: DownloadIcon
75068
75071
  },
75069
- {
75070
- id: "preview",
75071
- name: i18n$1.t("file.commands.preview")
75072
- },
75073
75072
  {
75074
75073
  id: "add-comment",
75075
75074
  name: i18n$1.t("file.commands.comment"),
@@ -75106,9 +75105,6 @@ ${content}
75106
75105
  get commands() {
75107
75106
  let items = this._commands.slice();
75108
75107
  const needRemoveCommandIds = /* @__PURE__ */ new Set();
75109
- if (!clientType.isMobile || this.editor.readonly) {
75110
- needRemoveCommandIds.add("preview");
75111
- }
75112
75108
  if (this.editor.readonly || clientType.isMobile) {
75113
75109
  needRemoveCommandIds.add("to-link");
75114
75110
  needRemoveCommandIds.add("to-card");
@@ -75135,18 +75131,6 @@ ${content}
75135
75131
  return items;
75136
75132
  }
75137
75133
  executeCommand(editor, block, box, item) {
75138
- if (item.id === "preview") {
75139
- const options = editor.options.componentsOptions.file;
75140
- if (options == null ? void 0 : options.onClick) {
75141
- const mouseEvent = new MouseEvent("mousedown", {
75142
- bubbles: true,
75143
- cancelable: true,
75144
- button: 0
75145
- });
75146
- options.onClick(editor, box, mouseEvent);
75147
- }
75148
- return;
75149
- }
75150
75134
  if (item.id === "to-card") {
75151
75135
  const container = getParentContainer(block);
75152
75136
  const containerId = getContainerId(container);
@@ -80102,8 +80086,8 @@ ${content}
80102
80086
  return virtualViewportOffsetTop;
80103
80087
  }
80104
80088
  get window() {
80105
- if (window.parent) {
80106
- return window.parent;
80089
+ if (window.top) {
80090
+ return window.top;
80107
80091
  }
80108
80092
  return window;
80109
80093
  }
@@ -86656,7 +86640,7 @@ ${data2.flowchartText}
86656
86640
  }
86657
86641
  }
86658
86642
  });
86659
- editor.version = "2.1.1-beta.60";
86643
+ editor.version = "2.1.1-beta.62";
86660
86644
  if (Logger$2.level === LogLevel.DEBUG) {
86661
86645
  window.setReauthFail = (fail) => {
86662
86646
  window.isReauthError = fail;
@@ -86754,7 +86738,7 @@ ${data2.flowchartText}
86754
86738
  });
86755
86739
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
86756
86740
  OnesEditorToolbar.register(editor);
86757
- editor.version = "2.1.1-beta.60";
86741
+ editor.version = "2.1.1-beta.62";
86758
86742
  return editor;
86759
86743
  }
86760
86744
  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.1.1-beta.60",
3
+ "version": "2.1.1-beta.62",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",