@ones-editor/editor 1.1.16-beta.15 → 1.1.16-beta.17

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.
@@ -19,6 +19,7 @@ export interface ManualShowCommandBarOptions {
19
19
  getReferenceClientRect?: GetReferenceClientRect | null | undefined;
20
20
  offset?: [number, number];
21
21
  arrow?: boolean;
22
+ maxWidth?: number;
22
23
  }
23
24
  export interface AbstractCommandBar extends TypedEmitter<CommandBarEvents> {
24
25
  readonly isVisible: boolean;
package/dist/index.js CHANGED
@@ -26425,26 +26425,23 @@ ${codeText}
26425
26425
  const path = getBlockPath(block);
26426
26426
  const blockData = editor.doc.getBlockData(containerId, blockIndex);
26427
26427
  const blockClass = getBlockClass(editor, block);
26428
- const updated = (_a = blockClass == null ? void 0 : blockClass.handleUpdateBlock) == null ? void 0 : _a.call(blockClass, editor, block, blockData);
26429
- if (updated) {
26430
- editor.editorBlockRenders.updateBlock(editor, path, block, blockData);
26431
- } else {
26432
- const newBlock = editor.editorBlocks.createBlock(path, container, blockData);
26433
- const newChildren = pickChildrenWithoutTools(newBlock);
26434
- pickChildrenWithoutTools(block);
26435
- newChildren.forEach((node) => {
26436
- block.appendChild(node);
26437
- });
26438
- const newTools = getExistsBlockTools(newBlock);
26439
- if (newTools) {
26440
- const oldTools = getExistsBlockTools(block);
26441
- if (oldTools) {
26442
- oldTools.remove();
26443
- }
26444
- block.appendChild(newTools);
26428
+ (_a = blockClass == null ? void 0 : blockClass.handleUpdateBlock) == null ? void 0 : _a.call(blockClass, editor, block, blockData);
26429
+ editor.editorBlockRenders.updateBlock(editor, path, block, blockData);
26430
+ const newBlock = editor.editorBlocks.createBlock(path, container, blockData);
26431
+ const newChildren = pickChildrenWithoutTools(newBlock);
26432
+ pickChildrenWithoutTools(block);
26433
+ newChildren.forEach((node) => {
26434
+ block.appendChild(node);
26435
+ });
26436
+ const newTools = getExistsBlockTools(newBlock);
26437
+ if (newTools) {
26438
+ const oldTools = getExistsBlockTools(block);
26439
+ if (oldTools) {
26440
+ oldTools.remove();
26445
26441
  }
26446
- copyElementAttributes(newBlock, block);
26442
+ block.appendChild(newTools);
26447
26443
  }
26444
+ copyElementAttributes(newBlock, block);
26448
26445
  handleBlockElementUpdated$1(editor, block, blockData);
26449
26446
  editor.blockHooks.forEach((hook) => {
26450
26447
  var _a2;
@@ -36937,7 +36934,7 @@ ${codeText}
36937
36934
  __publicField(this, "tippyInstance", null);
36938
36935
  }
36939
36936
  manualShow(target, options) {
36940
- var _a, _b, _c;
36937
+ var _a, _b, _c, _d;
36941
36938
  if (this.isVisible) {
36942
36939
  return;
36943
36940
  }
@@ -36952,14 +36949,14 @@ ${codeText}
36952
36949
  triggerTarget: null,
36953
36950
  hideOnClick: false,
36954
36951
  placement: (_a = options == null ? void 0 : options.placement) != null ? _a : "bottom-start",
36955
- maxWidth: 650,
36956
- arrow: (_b = options == null ? void 0 : options.arrow) != null ? _b : this.options.tippyArrow,
36952
+ maxWidth: (_b = options == null ? void 0 : options.maxWidth) != null ? _b : 650,
36953
+ arrow: (_c = options == null ? void 0 : options.arrow) != null ? _c : this.options.tippyArrow,
36957
36954
  appendTo: document.body,
36958
36955
  onShow: this.handleShow,
36959
36956
  onHidden: this.handleHidden,
36960
36957
  theme: options == null ? void 0 : options.theme,
36961
36958
  getReferenceClientRect: options == null ? void 0 : options.getReferenceClientRect,
36962
- offset: (_c = options == null ? void 0 : options.offset) != null ? _c : [0, 0],
36959
+ offset: (_d = options == null ? void 0 : options.offset) != null ? _d : [0, 0],
36963
36960
  popperOptions: this.createPopperOptions()
36964
36961
  });
36965
36962
  if (options == null ? void 0 : options.point) {
@@ -75363,7 +75360,7 @@ ${data.flowchartText}
75363
75360
  }
75364
75361
  }
75365
75362
  });
75366
- editor.version = "1.1.16-beta.15";
75363
+ editor.version = "1.1.16-beta.17";
75367
75364
  return editor;
75368
75365
  }
75369
75366
  function isDoc(doc2) {
@@ -75445,7 +75442,7 @@ ${data.flowchartText}
75445
75442
  });
75446
75443
  editor.addCustom(DOC_RE_AUTH_KEYS, (editor2) => new DocReAuthCallbacks(editor2));
75447
75444
  OnesEditorToolbar.register(editor);
75448
- editor.version = "1.1.16-beta.15";
75445
+ editor.version = "1.1.16-beta.17";
75449
75446
  return editor;
75450
75447
  }
75451
75448
  async function showDocVersions(editor, options, serverUrl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "1.1.16-beta.15",
3
+ "version": "1.1.16-beta.17",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",