@ones-editor/editor 2.1.1-beta.41 → 2.1.1-beta.42

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
@@ -58275,7 +58275,7 @@ $$${mathData.mathjaxText}$$
58275
58275
  this.editor = editor;
58276
58276
  }
58277
58277
  getAvailableCommands(editor, block, range, params) {
58278
- const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor);
58278
+ const disable = !isTextKindBlock(editor, block) || isSelectBoxOnly(editor) || isTitleBlock$2(block);
58279
58279
  if (disable && (params == null ? void 0 : params.isFilter)) {
58280
58280
  return [];
58281
58281
  }
@@ -58524,7 +58524,6 @@ $$${mathData.mathjaxText}$$
58524
58524
  let commands = [{
58525
58525
  id: "style-code",
58526
58526
  name: i18n$1.t("commands.code"),
58527
- states: disable && !(params == null ? void 0 : params.isFilter) ? ["disabled"] : [],
58528
58527
  icon: InlineCodeIcon
58529
58528
  }];
58530
58529
  if (getBlockTextLength$6(editor, block) === 0 || !isTextKindBlock(editor, block)) {
@@ -58533,6 +58532,13 @@ $$${mathData.mathjaxText}$$
58533
58532
  const subText2 = getSubText(editor, block, range);
58534
58533
  commands = getStandardTextStyles(commands, subText2);
58535
58534
  }
58535
+ if (!(params == null ? void 0 : params.isFilter)) {
58536
+ commands.forEach((item) => {
58537
+ if (disable) {
58538
+ item.states = ["disabled"];
58539
+ }
58540
+ });
58541
+ }
58536
58542
  return commands;
58537
58543
  }
58538
58544
  getInsertCommands() {
@@ -85039,7 +85045,7 @@ ${data2.flowchartText}
85039
85045
  }
85040
85046
  }
85041
85047
  });
85042
- editor.version = "2.1.1-beta.41";
85048
+ editor.version = "2.1.1-beta.42";
85043
85049
  if (Logger$2.level === LogLevel.DEBUG) {
85044
85050
  window.setReauthFail = (fail) => {
85045
85051
  window.isReauthError = fail;
@@ -85138,7 +85144,7 @@ ${data2.flowchartText}
85138
85144
  });
85139
85145
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
85140
85146
  OnesEditorToolbar.register(editor);
85141
- editor.version = "2.1.1-beta.41";
85147
+ editor.version = "2.1.1-beta.42";
85142
85148
  return editor;
85143
85149
  }
85144
85150
  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.41",
3
+ "version": "2.1.1-beta.42",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",