@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
|
-
|
|
26429
|
-
|
|
26430
|
-
|
|
26431
|
-
|
|
26432
|
-
|
|
26433
|
-
|
|
26434
|
-
|
|
26435
|
-
|
|
26436
|
-
|
|
26437
|
-
|
|
26438
|
-
const
|
|
26439
|
-
if (
|
|
26440
|
-
|
|
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
|
-
|
|
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: (
|
|
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: (
|
|
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.
|
|
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.
|
|
75445
|
+
editor.version = "1.1.16-beta.17";
|
|
75449
75446
|
return editor;
|
|
75450
75447
|
}
|
|
75451
75448
|
async function showDocVersions(editor, options, serverUrl) {
|