@ones-editor/editor 2.9.8-beta.17 → 2.9.8-beta.19
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/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +42 -27
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51507,23 +51507,28 @@ ${codeText}
|
|
|
51507
51507
|
}
|
|
51508
51508
|
function resetListStart(editor, brothers, start, options) {
|
|
51509
51509
|
var _a;
|
|
51510
|
-
|
|
51511
|
-
|
|
51512
|
-
const
|
|
51513
|
-
|
|
51514
|
-
const
|
|
51515
|
-
|
|
51516
|
-
|
|
51517
|
-
|
|
51518
|
-
|
|
51519
|
-
|
|
51510
|
+
editor.doc.beginBatchUpdate();
|
|
51511
|
+
try {
|
|
51512
|
+
const groupId = (_a = options == null ? void 0 : options.groupId) != null ? _a : genId();
|
|
51513
|
+
brothers.forEach((block) => {
|
|
51514
|
+
const oldData = editor.getBlockData(block);
|
|
51515
|
+
if (oldData.start !== start || (options == null ? void 0 : options.resetGroupId)) {
|
|
51516
|
+
const newData = {
|
|
51517
|
+
...oldData,
|
|
51518
|
+
start
|
|
51519
|
+
};
|
|
51520
|
+
if (options == null ? void 0 : options.resetGroupId) {
|
|
51521
|
+
newData.groupId = groupId;
|
|
51522
|
+
}
|
|
51523
|
+
editor.updateBlockData(block, newData);
|
|
51520
51524
|
}
|
|
51521
|
-
|
|
51522
|
-
|
|
51523
|
-
|
|
51524
|
-
|
|
51525
|
-
|
|
51526
|
-
|
|
51525
|
+
if (!oldData.textOnly) {
|
|
51526
|
+
start += 1;
|
|
51527
|
+
}
|
|
51528
|
+
});
|
|
51529
|
+
} finally {
|
|
51530
|
+
editor.doc.endBatchUpdate();
|
|
51531
|
+
}
|
|
51527
51532
|
}
|
|
51528
51533
|
function resetListStartByBrother(editor, listBrother, start, options) {
|
|
51529
51534
|
const allBrothers = getListAllBrothers(listBrother, { withSelf: true });
|
|
@@ -83100,12 +83105,7 @@ ${docStr}
|
|
|
83100
83105
|
}
|
|
83101
83106
|
}
|
|
83102
83107
|
function isTitleBlock$1(block) {
|
|
83103
|
-
|
|
83104
|
-
if (prevBlock) {
|
|
83105
|
-
return false;
|
|
83106
|
-
}
|
|
83107
|
-
const container = getParentContainer(block);
|
|
83108
|
-
return isRootContainer(container);
|
|
83108
|
+
return block.hasAttribute("data-document-title");
|
|
83109
83109
|
}
|
|
83110
83110
|
function canShowCollapseButtons(editor, hoverBlock) {
|
|
83111
83111
|
var _a, _b;
|
|
@@ -93875,8 +93875,23 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
93875
93875
|
this.id = id;
|
|
93876
93876
|
}
|
|
93877
93877
|
getCommand(editor) {
|
|
93878
|
+
var _a;
|
|
93878
93879
|
const commands = editor.editorCommandProviders.getCommands(editor.selection.range);
|
|
93879
|
-
|
|
93880
|
+
const command = commands.find((c) => c.id === this.id);
|
|
93881
|
+
if (command) {
|
|
93882
|
+
return command;
|
|
93883
|
+
}
|
|
93884
|
+
const moreCommand = commands.find((c) => c.id === "text/more");
|
|
93885
|
+
if (moreCommand) {
|
|
93886
|
+
const ret = (_a = moreCommand.children) == null ? void 0 : _a.find((c) => c.id === this.id);
|
|
93887
|
+
if (ret) {
|
|
93888
|
+
return {
|
|
93889
|
+
...moreCommand,
|
|
93890
|
+
...ret
|
|
93891
|
+
};
|
|
93892
|
+
}
|
|
93893
|
+
}
|
|
93894
|
+
return void 0;
|
|
93880
93895
|
}
|
|
93881
93896
|
onClick(editor) {
|
|
93882
93897
|
const command = this.getCommand(editor);
|
|
@@ -93925,13 +93940,13 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
93925
93940
|
}
|
|
93926
93941
|
class SuperscriptItem extends FontStyleBaseItem {
|
|
93927
93942
|
constructor() {
|
|
93928
|
-
super(i18n$1.t("commands.superscript"), "text/style-
|
|
93943
|
+
super(i18n$1.t("commands.superscript"), "text/style-super");
|
|
93929
93944
|
__publicField(this, "icon", SuperscriptIcon);
|
|
93930
93945
|
}
|
|
93931
93946
|
}
|
|
93932
93947
|
class SubscriptItem extends FontStyleBaseItem {
|
|
93933
93948
|
constructor() {
|
|
93934
|
-
super(i18n$1.t("commands.subscript"), "text/style-
|
|
93949
|
+
super(i18n$1.t("commands.subscript"), "text/style-sub");
|
|
93935
93950
|
__publicField(this, "icon", SubscriptIcon);
|
|
93936
93951
|
}
|
|
93937
93952
|
}
|
|
@@ -95329,7 +95344,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95329
95344
|
}
|
|
95330
95345
|
}
|
|
95331
95346
|
});
|
|
95332
|
-
editor.version = "2.9.8-beta.
|
|
95347
|
+
editor.version = "2.9.8-beta.19";
|
|
95333
95348
|
return editor;
|
|
95334
95349
|
}
|
|
95335
95350
|
function isDoc(doc2) {
|
|
@@ -95461,7 +95476,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95461
95476
|
OnesEditorDropTarget.register(editor);
|
|
95462
95477
|
OnesEditorTocProvider.register(editor);
|
|
95463
95478
|
OnesEditorExclusiveBlock.register(editor);
|
|
95464
|
-
editor.version = "2.9.8-beta.
|
|
95479
|
+
editor.version = "2.9.8-beta.19";
|
|
95465
95480
|
return editor;
|
|
95466
95481
|
}
|
|
95467
95482
|
async function showDocVersions(editor, options, serverUrl) {
|