@ones-editor/editor 2.1.2-beta.25 → 2.1.2-beta.28

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
@@ -61027,6 +61027,11 @@ $$${mathData.mathjaxText}$$
61027
61027
  __publicField(this, "startPos", null);
61028
61028
  __publicField(this, "resizeType", null);
61029
61029
  __publicField(this, "enabled", false);
61030
+ __publicField(this, "handleEditorResize", () => {
61031
+ if (this.block) {
61032
+ this.updateResizer();
61033
+ }
61034
+ });
61030
61035
  __publicField(this, "handleMouseDown", (event) => {
61031
61036
  event.preventDefault();
61032
61037
  event.stopPropagation();
@@ -61105,6 +61110,7 @@ $$${mathData.mathjaxText}$$
61105
61110
  });
61106
61111
  this.editor = editor;
61107
61112
  this.options = options;
61113
+ this.editor.addListener("resize", this.handleEditorResize);
61108
61114
  }
61109
61115
  enableResize(block, resizableElement) {
61110
61116
  this.block = block;
@@ -61137,6 +61143,7 @@ $$${mathData.mathjaxText}$$
61137
61143
  return this.block;
61138
61144
  }
61139
61145
  destroy() {
61146
+ this.editor.removeListener("resize", this.handleEditorResize);
61140
61147
  }
61141
61148
  getResizableElement() {
61142
61149
  if (this.resizableElement) {
@@ -68422,9 +68429,20 @@ ${codeText}
68422
68429
  }
68423
68430
  getAvailableCommands(editor, block, range, params) {
68424
68431
  var _a;
68432
+ const blockTypes = ["table", "layout"];
68433
+ if (blockTypes.includes(getBlockType(block)) && !range.isSimple()) {
68434
+ if (isFullSelectedOneComplexBlock(editor, range)) {
68435
+ return [{
68436
+ id: "add-comment",
68437
+ name: i18n$1.t("comment.command"),
68438
+ icon: CommentIcon$1,
68439
+ states: []
68440
+ }];
68441
+ }
68442
+ }
68443
+ const isFilter = (_a = params == null ? void 0 : params.isFilter) != null ? _a : true;
68425
68444
  const originRange = editor.selection.range;
68426
68445
  const enabled = isTextKindBlock(editor, block) && !range.isCollapsed() && originRange.isSimple();
68427
- const isFilter = (_a = params == null ? void 0 : params.isFilter) != null ? _a : true;
68428
68446
  if (!enabled && isFilter) {
68429
68447
  return [];
68430
68448
  }
@@ -82323,7 +82341,6 @@ ${content}
82323
82341
  findPreviewElement,
82324
82342
  innerToc: true,
82325
82343
  blockMenu: {
82326
- showComment: false,
82327
82344
  showLocker: false
82328
82345
  },
82329
82346
  overrideInertEmptyBlockInsideOptions: {
@@ -88135,7 +88152,7 @@ ${data2.flowchartText}
88135
88152
  }
88136
88153
  }
88137
88154
  });
88138
- editor.version = "2.1.2-beta.25";
88155
+ editor.version = "2.1.2-beta.28";
88139
88156
  if (Logger$2.level === LogLevel.DEBUG) {
88140
88157
  window.setReauthFail = (fail) => {
88141
88158
  window.isReauthError = fail;
@@ -88236,7 +88253,7 @@ ${data2.flowchartText}
88236
88253
  });
88237
88254
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
88238
88255
  OnesEditorToolbar.register(editor);
88239
- editor.version = "2.1.2-beta.25";
88256
+ editor.version = "2.1.2-beta.28";
88240
88257
  return editor;
88241
88258
  }
88242
88259
  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.2-beta.25",
3
+ "version": "2.1.2-beta.28",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",