@ones-editor/editor 2.0.7-beta.23 → 2.0.7-beta.24
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 +13 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -82206,6 +82206,7 @@ ${data2.flowchartText}
|
|
|
82206
82206
|
onMaxUsersError: options.onMaxUsersError
|
|
82207
82207
|
};
|
|
82208
82208
|
const doc2 = await ShareDBDoc.load(docOptions);
|
|
82209
|
+
const enableComments = options == null ? void 0 : options.enableComments;
|
|
82209
82210
|
const editor = createEditor(root2, doc2, {
|
|
82210
82211
|
id: options.id,
|
|
82211
82212
|
scrollContainer: options == null ? void 0 : options.scrollContainer,
|
|
@@ -82219,7 +82220,11 @@ ${data2.flowchartText}
|
|
|
82219
82220
|
decorators: [new CodeTextDecorator(), new RemoteCaretsDecorator()],
|
|
82220
82221
|
insertions: [RemoteCaretsInsertion],
|
|
82221
82222
|
blockHooks: [new BlockLockerHook(), new BlockExclusiveHook(), ...((_f = options.components) == null ? void 0 : _f.blockHooks) || []],
|
|
82222
|
-
textRenders: [
|
|
82223
|
+
textRenders: [
|
|
82224
|
+
enableComments && new OnesEditorCommentsRender(),
|
|
82225
|
+
new BlockPaddingRender(),
|
|
82226
|
+
...((_g = options.components) == null ? void 0 : _g.textRenders) || []
|
|
82227
|
+
].filter(Boolean),
|
|
82223
82228
|
options: { ...options.componentsOptions }
|
|
82224
82229
|
},
|
|
82225
82230
|
shortcuts: [
|
|
@@ -82278,7 +82283,7 @@ ${data2.flowchartText}
|
|
|
82278
82283
|
if (!clientType.isMobile) {
|
|
82279
82284
|
editor.addCustom("editor-tooltip", () => new OnesEditorTooltip(editor));
|
|
82280
82285
|
}
|
|
82281
|
-
if (
|
|
82286
|
+
if (enableComments) {
|
|
82282
82287
|
editor.addCustom(
|
|
82283
82288
|
"editor-comments",
|
|
82284
82289
|
(editor2) => new OnesEditorComments(editor2, new ShareDBDocCommentsProvider(editor2))
|
|
@@ -82346,7 +82351,7 @@ ${data2.flowchartText}
|
|
|
82346
82351
|
}
|
|
82347
82352
|
}
|
|
82348
82353
|
});
|
|
82349
|
-
editor.version = "2.0.7-beta.
|
|
82354
|
+
editor.version = "2.0.7-beta.24";
|
|
82350
82355
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
82351
82356
|
window.setReauthFail = (fail) => {
|
|
82352
82357
|
window.isReauthError = fail;
|
|
@@ -82368,6 +82373,7 @@ ${data2.flowchartText}
|
|
|
82368
82373
|
i18n$1.setLang(options.lang);
|
|
82369
82374
|
}
|
|
82370
82375
|
Logger$2.level = (_a = options.logLevel) != null ? _a : LogLevel.DEBUG;
|
|
82376
|
+
const enableComments = options == null ? void 0 : options.enableComments;
|
|
82371
82377
|
const editor = createEditor(root2, doc2, {
|
|
82372
82378
|
id: options.id,
|
|
82373
82379
|
scrollContainer: options == null ? void 0 : options.scrollContainer,
|
|
@@ -82380,10 +82386,10 @@ ${data2.flowchartText}
|
|
|
82380
82386
|
insertions: [RemoteCaretsInsertion],
|
|
82381
82387
|
blockHooks: [new BlockLockerHook(), ...((_f = options.components) == null ? void 0 : _f.blockHooks) || []],
|
|
82382
82388
|
textRenders: [
|
|
82383
|
-
new OnesEditorCommentsRender(),
|
|
82389
|
+
enableComments && new OnesEditorCommentsRender(),
|
|
82384
82390
|
new BlockPaddingRender(),
|
|
82385
82391
|
...((_g = options.components) == null ? void 0 : _g.textRenders) || []
|
|
82386
|
-
],
|
|
82392
|
+
].filter(Boolean),
|
|
82387
82393
|
options: { ...options.componentsOptions }
|
|
82388
82394
|
},
|
|
82389
82395
|
shortcuts: [TableShortcuts, FindReplaceShortcuts, TextStyleShortcuts, DefaultShortcuts]
|
|
@@ -82413,7 +82419,7 @@ ${data2.flowchartText}
|
|
|
82413
82419
|
return new OnesEditorQuickMenu(editor, (_a2 = options.componentsOptions) == null ? void 0 : _a2.quickMenu);
|
|
82414
82420
|
});
|
|
82415
82421
|
editor.addCustom("image-paste-handler", () => new ImagePasteHandler(editor));
|
|
82416
|
-
if (
|
|
82422
|
+
if (enableComments) {
|
|
82417
82423
|
editor.addCustom(
|
|
82418
82424
|
"editor-comments",
|
|
82419
82425
|
(editor2) => new OnesEditorComments(editor2, new LocalDocCommentsProvider(editor2, doc2))
|
|
@@ -82440,7 +82446,7 @@ ${data2.flowchartText}
|
|
|
82440
82446
|
if (!clientType.isMobile) {
|
|
82441
82447
|
OnesEditorToolbar.register(editor);
|
|
82442
82448
|
}
|
|
82443
|
-
editor.version = "2.0.7-beta.
|
|
82449
|
+
editor.version = "2.0.7-beta.24";
|
|
82444
82450
|
return editor;
|
|
82445
82451
|
}
|
|
82446
82452
|
async function showDocVersions(editor, options, serverUrl) {
|