@ones-editor/editor 2.9.8-beta.24 → 2.9.8-beta.26

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
@@ -29941,7 +29941,7 @@ ${codeText}
29941
29941
  const remoteResourcesMap = /* @__PURE__ */ new Map();
29942
29942
  Object.entries(resources).forEach(([resourceId, resourceUrl]) => {
29943
29943
  if (localResourcesMap.get(resourceId) === void 0) {
29944
- if (resourceId !== resourceUrl) {
29944
+ if (resourceId !== resourceUrl && resourceId.indexOf(":") === -1) {
29945
29945
  remoteResourcesMap.set(resourceId, resourceUrl);
29946
29946
  }
29947
29947
  }
@@ -90313,9 +90313,6 @@ ${data2.plantumlText}
90313
90313
  super.destroy();
90314
90314
  }
90315
90315
  }
90316
- const ErrCode = {
90317
- ANALYZER_UNKNOWN_URL: "analyzer cannot recognize this url"
90318
- };
90319
90316
  class FigmaAnalyzer {
90320
90317
  constructor() {
90321
90318
  __publicField(this, "regex", /https:\/\/([\w.-]+\.)?figma.com\/.*$/i);
@@ -90481,10 +90478,17 @@ ${data2.plantumlText}
90481
90478
  return ret;
90482
90479
  }
90483
90480
  }
90484
- throw new Error(ErrCode.ANALYZER_UNKNOWN_URL);
90481
+ return {
90482
+ providerName: "unknown",
90483
+ type: "iframe",
90484
+ url
90485
+ };
90485
90486
  }
90486
90487
  }
90487
90488
  const urlAnalyzer = new URLAnalyzer();
90489
+ const ErrCode = {
90490
+ ANALYZER_UNKNOWN_URL: "analyzer cannot recognize this url"
90491
+ };
90488
90492
  const getCommandItems = () => [
90489
90493
  {
90490
90494
  name: i18n$1.t("webpage.bilibili"),
@@ -94387,6 +94391,8 @@ ${JSON.stringify(error2, null, 2)}`);
94387
94391
  __publicField(this, "manualShowChildren", true);
94388
94392
  __publicField(this, "childrenPlacement", "bottom-start");
94389
94393
  __publicField(this, "children", []);
94394
+ __publicField(this, "allChildren", []);
94395
+ this.editor = editor;
94390
94396
  const provider = new InsertMenuProvider(editor);
94391
94397
  const startBlock = editor.getBlockById(editor.selection.range.start.blockId);
94392
94398
  const container = getParentContainer(startBlock);
@@ -94396,6 +94402,31 @@ ${JSON.stringify(error2, null, 2)}`);
94396
94402
  commands = commands.slice(index2);
94397
94403
  }
94398
94404
  this.children = commands;
94405
+ this.allChildren = commands;
94406
+ }
94407
+ beforePopup(subBar) {
94408
+ const focusBlock = this.editor.selection.focusedBlock;
94409
+ if (focusBlock.closest('[data-block-type="callout"]')) {
94410
+ const children = this.allChildren.filter((c) => {
94411
+ const textOnlyCommands = [
94412
+ "insert-emoji",
94413
+ "insert-link",
94414
+ "insert-date",
94415
+ "insert-status",
94416
+ "insert-math",
94417
+ "insert-task"
94418
+ ];
94419
+ if (textOnlyCommands.includes(c.id)) {
94420
+ return true;
94421
+ }
94422
+ return false;
94423
+ });
94424
+ this.children = children;
94425
+ subBar.updateItems(this.children);
94426
+ } else {
94427
+ this.children = this.allChildren;
94428
+ subBar.updateItems(this.children);
94429
+ }
94399
94430
  }
94400
94431
  onClick(editor, item, commandBar2) {
94401
94432
  const provider = new InsertMenuProvider(editor);
@@ -94807,6 +94838,9 @@ ${JSON.stringify(error2, null, 2)}`);
94807
94838
  }
94808
94839
  const parent = findParent(child, id);
94809
94840
  if (parent) {
94841
+ if (!parent.onClick) {
94842
+ return item2;
94843
+ }
94810
94844
  return parent;
94811
94845
  }
94812
94846
  }
@@ -95468,7 +95502,7 @@ ${JSON.stringify(error2, null, 2)}`);
95468
95502
  }
95469
95503
  }
95470
95504
  });
95471
- editor.version = "2.9.8-beta.24";
95505
+ editor.version = "2.9.8-beta.26";
95472
95506
  return editor;
95473
95507
  }
95474
95508
  function isDoc(doc2) {
@@ -95600,7 +95634,7 @@ ${JSON.stringify(error2, null, 2)}`);
95600
95634
  OnesEditorDropTarget.register(editor);
95601
95635
  OnesEditorTocProvider.register(editor);
95602
95636
  OnesEditorExclusiveBlock.register(editor);
95603
- editor.version = "2.9.8-beta.24";
95637
+ editor.version = "2.9.8-beta.26";
95604
95638
  return editor;
95605
95639
  }
95606
95640
  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.9.8-beta.24",
3
+ "version": "2.9.8-beta.26",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "dependencies": {