@ones-editor/editor 2.9.8-beta.17 → 2.9.8-beta.18
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 +21 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -83100,12 +83100,7 @@ ${docStr}
|
|
|
83100
83100
|
}
|
|
83101
83101
|
}
|
|
83102
83102
|
function isTitleBlock$1(block) {
|
|
83103
|
-
|
|
83104
|
-
if (prevBlock) {
|
|
83105
|
-
return false;
|
|
83106
|
-
}
|
|
83107
|
-
const container = getParentContainer(block);
|
|
83108
|
-
return isRootContainer(container);
|
|
83103
|
+
return block.hasAttribute("data-document-title");
|
|
83109
83104
|
}
|
|
83110
83105
|
function canShowCollapseButtons(editor, hoverBlock) {
|
|
83111
83106
|
var _a, _b;
|
|
@@ -93875,8 +93870,23 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
93875
93870
|
this.id = id;
|
|
93876
93871
|
}
|
|
93877
93872
|
getCommand(editor) {
|
|
93873
|
+
var _a;
|
|
93878
93874
|
const commands = editor.editorCommandProviders.getCommands(editor.selection.range);
|
|
93879
|
-
|
|
93875
|
+
const command = commands.find((c) => c.id === this.id);
|
|
93876
|
+
if (command) {
|
|
93877
|
+
return command;
|
|
93878
|
+
}
|
|
93879
|
+
const moreCommand = commands.find((c) => c.id === "text/more");
|
|
93880
|
+
if (moreCommand) {
|
|
93881
|
+
const ret = (_a = moreCommand.children) == null ? void 0 : _a.find((c) => c.id === this.id);
|
|
93882
|
+
if (ret) {
|
|
93883
|
+
return {
|
|
93884
|
+
...moreCommand,
|
|
93885
|
+
...ret
|
|
93886
|
+
};
|
|
93887
|
+
}
|
|
93888
|
+
}
|
|
93889
|
+
return void 0;
|
|
93880
93890
|
}
|
|
93881
93891
|
onClick(editor) {
|
|
93882
93892
|
const command = this.getCommand(editor);
|
|
@@ -93925,13 +93935,13 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
93925
93935
|
}
|
|
93926
93936
|
class SuperscriptItem extends FontStyleBaseItem {
|
|
93927
93937
|
constructor() {
|
|
93928
|
-
super(i18n$1.t("commands.superscript"), "text/style-
|
|
93938
|
+
super(i18n$1.t("commands.superscript"), "text/style-super");
|
|
93929
93939
|
__publicField(this, "icon", SuperscriptIcon);
|
|
93930
93940
|
}
|
|
93931
93941
|
}
|
|
93932
93942
|
class SubscriptItem extends FontStyleBaseItem {
|
|
93933
93943
|
constructor() {
|
|
93934
|
-
super(i18n$1.t("commands.subscript"), "text/style-
|
|
93944
|
+
super(i18n$1.t("commands.subscript"), "text/style-sub");
|
|
93935
93945
|
__publicField(this, "icon", SubscriptIcon);
|
|
93936
93946
|
}
|
|
93937
93947
|
}
|
|
@@ -95329,7 +95339,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95329
95339
|
}
|
|
95330
95340
|
}
|
|
95331
95341
|
});
|
|
95332
|
-
editor.version = "2.9.8-beta.
|
|
95342
|
+
editor.version = "2.9.8-beta.18";
|
|
95333
95343
|
return editor;
|
|
95334
95344
|
}
|
|
95335
95345
|
function isDoc(doc2) {
|
|
@@ -95461,7 +95471,7 @@ ${JSON.stringify(error2, null, 2)}`);
|
|
|
95461
95471
|
OnesEditorDropTarget.register(editor);
|
|
95462
95472
|
OnesEditorTocProvider.register(editor);
|
|
95463
95473
|
OnesEditorExclusiveBlock.register(editor);
|
|
95464
|
-
editor.version = "2.9.8-beta.
|
|
95474
|
+
editor.version = "2.9.8-beta.18";
|
|
95465
95475
|
return editor;
|
|
95466
95476
|
}
|
|
95467
95477
|
async function showDocVersions(editor, options, serverUrl) {
|