@harbour-enterprises/superdoc 1.0.0-next.10 → 1.0.0-next.2
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/dist/chunks/{PdfViewer-B9LcTIm2.cjs → PdfViewer-B-xTd4XY.cjs} +1 -1
- package/dist/chunks/{PdfViewer-CZG4udaT.es.js → PdfViewer-eykNsWyi.es.js} +2 -2
- package/dist/chunks/{eventemitter3-44XulWQe.es.js → eventemitter3-CcXAdeql.es.js} +1 -1
- package/dist/chunks/{index-DdTDm9oI-BXzE00pk.es.js → index-BDVXUeCy-7mwhYeJ7.es.js} +1 -1
- package/dist/chunks/{index-DdTDm9oI-Duiy8M_G.cjs → index-BDVXUeCy-Di6ozaOM.cjs} +1 -1
- package/dist/chunks/{index-1n6qegaQ.es.js → index-DpQ8ZYM0.es.js} +325 -564
- package/dist/chunks/{index-4FiyZ-0E.cjs → index-rF5HExWB.cjs} +322 -561
- package/dist/chunks/{jszip-VP334ufO.es.js → jszip-5vvIqAEE.es.js} +1 -1
- package/dist/chunks/{super-editor.es-BQQuazyp.cjs → super-editor.es-CcKbh84I.cjs} +25739 -28432
- package/dist/chunks/{super-editor.es-DKr759cY.es.js → super-editor.es-CxajnL9u.es.js} +25740 -28433
- package/dist/chunks/{vue-BuPTonTJ.es.js → vue-Dysv_7z5.es.js} +27 -27
- package/dist/chunks/xml-js-ClO_jHnq.es.js +2 -0
- package/dist/images/altText_add.svg +3 -0
- package/dist/images/altText_disclaimer.svg +3 -0
- package/dist/images/altText_done.svg +3 -0
- package/dist/images/altText_spinner.svg +30 -0
- package/dist/images/altText_warning.svg +3 -0
- package/dist/images/annotation-check.svg +11 -0
- package/dist/images/annotation-comment.svg +16 -0
- package/dist/images/annotation-help.svg +26 -0
- package/dist/images/annotation-insert.svg +10 -0
- package/dist/images/annotation-key.svg +11 -0
- package/dist/images/annotation-newparagraph.svg +11 -0
- package/dist/images/annotation-noicon.svg +7 -0
- package/dist/images/annotation-note.svg +42 -0
- package/dist/images/annotation-paperclip.svg +6 -0
- package/dist/images/annotation-paragraph.svg +16 -0
- package/dist/images/annotation-pushpin.svg +7 -0
- package/dist/images/cursor-editorFreeHighlight.svg +6 -0
- package/dist/images/cursor-editorFreeText.svg +3 -0
- package/dist/images/cursor-editorInk.svg +4 -0
- package/dist/images/cursor-editorTextHighlight.svg +8 -0
- package/dist/images/editor-toolbar-delete.svg +5 -0
- package/dist/images/loading-icon.gif +0 -0
- package/dist/images/messageBar_closingButton.svg +3 -0
- package/dist/images/messageBar_warning.svg +3 -0
- package/dist/images/toolbarButton-editorHighlight.svg +6 -0
- package/dist/images/toolbarButton-menuArrow.svg +3 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts +3 -3
- package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/collaboration/helpers.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +167 -4
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +92 -94
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-BavE2jnW.js → converter-DN_dhslo.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-CY4M19qa.js → docx-zipper-Bhl_yBjL.js} +1 -1
- package/dist/super-editor/chunks/{editor-Cslr04KI.js → editor-3klx7hyV.js} +25818 -27908
- package/dist/super-editor/chunks/{index-DdTDm9oI.js → index-BDVXUeCy.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-Zdgn--Js.js → toolbar-8YA9ltNC.js} +598 -834
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +21 -22
- package/dist/super-editor/super-editor.es.js +19 -44
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +26134 -29066
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-LkEmUa9-.es.js +0 -2
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +0 -42
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-
|
|
1
|
+
import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CxajnL9u.es.js";
|
|
2
2
|
import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
|
|
3
|
-
import { E as EventEmitter } from "./eventemitter3-
|
|
3
|
+
import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
|
|
4
4
|
import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
|
|
5
|
-
import { a1 as effectScope, r as ref,
|
|
5
|
+
import { a1 as effectScope, r as ref, X as markRaw, a0 as process$1, a2 as toRaw, a as computed, a3 as isRef, a4 as isReactive, E as toRef, i as inject, m as getCurrentInstance, l as watch, v as unref, a5 as hasInjectionContext, M as reactive, q as nextTick, a6 as getCurrentScope, a7 as onScopeDispose, a8 as toRefs, g as global$1, B as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, p as onDeactivated, D as createTextVNode, F as Fragment, Q as Comment, y as defineComponent, G as provide, I as withDirectives, z as h, U as Teleport, R as renderSlot, V as isVNode, J as watchEffect, O as Transition, a9 as TransitionGroup, A as mergeProps, P as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, u as createVNode, C as withCtx, f as createBaseVNode, x as normalizeStyle, e as createCommentVNode, s as createBlock, w as withModifiers, n as normalizeClass, aa as resolveDirective, d as renderList, c as createApp, Y as resolveDynamicComponent, ab as defineAsyncComponent } from "./vue-Dysv_7z5.es.js";
|
|
6
6
|
import * as Y from "yjs";
|
|
7
7
|
import { Doc, Map as Map$2 } from "yjs";
|
|
8
|
-
import { B as Buffer$2 } from "./jszip-
|
|
8
|
+
import { B as Buffer$2 } from "./jszip-5vvIqAEE.es.js";
|
|
9
9
|
import { v as v4 } from "./uuid-CjlX8hrF.es.js";
|
|
10
10
|
const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
11
11
|
const PDF = "application/pdf";
|
|
@@ -3310,17 +3310,17 @@ function setupAwarenessHandler(provider, superdocInstance, user) {
|
|
|
3310
3310
|
});
|
|
3311
3311
|
});
|
|
3312
3312
|
}
|
|
3313
|
-
const addYComment = (yArray, ydoc, event
|
|
3313
|
+
const addYComment = (yArray, ydoc, event) => {
|
|
3314
3314
|
const { comment } = event;
|
|
3315
3315
|
const yComment = new Map$2(Object.entries(comment));
|
|
3316
3316
|
ydoc.transact(
|
|
3317
3317
|
() => {
|
|
3318
3318
|
yArray.push([yComment]);
|
|
3319
3319
|
},
|
|
3320
|
-
{ user }
|
|
3320
|
+
{ user: superdoc.user }
|
|
3321
3321
|
);
|
|
3322
3322
|
};
|
|
3323
|
-
const updateYComment = (yArray, ydoc, event
|
|
3323
|
+
const updateYComment = (yArray, ydoc, event) => {
|
|
3324
3324
|
const { comment } = event;
|
|
3325
3325
|
const yComment = new Map$2(Object.entries(comment));
|
|
3326
3326
|
const commentIndex = getCommentIndex(yArray, comment);
|
|
@@ -3330,10 +3330,10 @@ const updateYComment = (yArray, ydoc, event, user) => {
|
|
|
3330
3330
|
yArray.delete(commentIndex, 1);
|
|
3331
3331
|
yArray.insert(commentIndex, [yComment]);
|
|
3332
3332
|
},
|
|
3333
|
-
{ user }
|
|
3333
|
+
{ user: superdoc.user }
|
|
3334
3334
|
);
|
|
3335
3335
|
};
|
|
3336
|
-
const deleteYComment = (yArray, ydoc, event
|
|
3336
|
+
const deleteYComment = (yArray, ydoc, event) => {
|
|
3337
3337
|
const { comment } = event;
|
|
3338
3338
|
const commentIndex = getCommentIndex(yArray, comment);
|
|
3339
3339
|
if (commentIndex === -1) return;
|
|
@@ -3341,26 +3341,26 @@ const deleteYComment = (yArray, ydoc, event, user) => {
|
|
|
3341
3341
|
() => {
|
|
3342
3342
|
yArray.delete(commentIndex, 1);
|
|
3343
3343
|
},
|
|
3344
|
-
{ user }
|
|
3344
|
+
{ user: superdoc.user }
|
|
3345
3345
|
);
|
|
3346
3346
|
};
|
|
3347
3347
|
const getCommentIndex = (yArray, comment) => {
|
|
3348
3348
|
const baseArray = yArray.toJSON();
|
|
3349
3349
|
return baseArray.findIndex((c2) => c2.commentId === comment.commentId);
|
|
3350
3350
|
};
|
|
3351
|
-
const initCollaborationComments = (
|
|
3352
|
-
if (!
|
|
3351
|
+
const initCollaborationComments = (superdoc2) => {
|
|
3352
|
+
if (!superdoc2.config.modules.comments || !superdoc2.provider) return;
|
|
3353
3353
|
const onSuperDocYdocSynced = () => {
|
|
3354
|
-
const parent =
|
|
3355
|
-
const ids =
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3354
|
+
const parent = superdoc2.commentsStore.commentsParentElement;
|
|
3355
|
+
const ids = superdoc2.commentsStore.editorCommentIds;
|
|
3356
|
+
superdoc2.commentsStore.handleEditorLocationsUpdate(parent, ids);
|
|
3357
|
+
superdoc2.commentsStore.hasSyncedCollaborationComments = true;
|
|
3358
|
+
superdoc2.provider.off("synced", onSuperDocYdocSynced);
|
|
3359
3359
|
};
|
|
3360
|
-
|
|
3361
|
-
const commentsArray =
|
|
3360
|
+
superdoc2.provider.on("synced", onSuperDocYdocSynced);
|
|
3361
|
+
const commentsArray = superdoc2.ydoc.getArray("comments");
|
|
3362
3362
|
commentsArray.observe((event) => {
|
|
3363
|
-
const currentUser =
|
|
3363
|
+
const currentUser = superdoc2.config.user;
|
|
3364
3364
|
const { user = {} } = event.transaction.origin;
|
|
3365
3365
|
if (currentUser.name === user.name && currentUser.email === user.email) return;
|
|
3366
3366
|
const comments = commentsArray.toJSON();
|
|
@@ -3372,60 +3372,59 @@ const initCollaborationComments = (superdoc) => {
|
|
|
3372
3372
|
filtered.push(c2);
|
|
3373
3373
|
}
|
|
3374
3374
|
});
|
|
3375
|
-
|
|
3375
|
+
superdoc2.commentsStore.commentsList = filtered.map((c2) => useComment(c2));
|
|
3376
3376
|
});
|
|
3377
3377
|
};
|
|
3378
|
-
const initSuperdocYdoc = (
|
|
3379
|
-
const { isInternal } =
|
|
3380
|
-
const baseName = `${
|
|
3381
|
-
if (!
|
|
3378
|
+
const initSuperdocYdoc = (superdoc2) => {
|
|
3379
|
+
const { isInternal } = superdoc2.config;
|
|
3380
|
+
const baseName = `${superdoc2.config.superdocId}-superdoc`;
|
|
3381
|
+
if (!superdoc2.config.superdocId) return;
|
|
3382
3382
|
const documentId = isInternal ? baseName : `${baseName}-external`;
|
|
3383
3383
|
const superdocCollaborationOptions = {
|
|
3384
|
-
config:
|
|
3385
|
-
user:
|
|
3384
|
+
config: superdoc2.config.modules.collaboration,
|
|
3385
|
+
user: superdoc2.config.user,
|
|
3386
3386
|
documentId,
|
|
3387
|
-
socket:
|
|
3388
|
-
superdocInstance:
|
|
3387
|
+
socket: superdoc2.config.socket,
|
|
3388
|
+
superdocInstance: superdoc2
|
|
3389
3389
|
};
|
|
3390
3390
|
const { provider: superdocProvider, ydoc: superdocYdoc } = createProvider(superdocCollaborationOptions);
|
|
3391
3391
|
return { ydoc: superdocYdoc, provider: superdocProvider };
|
|
3392
3392
|
};
|
|
3393
|
-
const makeDocumentsCollaborative = (
|
|
3393
|
+
const makeDocumentsCollaborative = (superdoc2) => {
|
|
3394
3394
|
const processedDocuments = [];
|
|
3395
|
-
|
|
3396
|
-
|
|
3395
|
+
superdoc2.config.documents.forEach((doc) => {
|
|
3396
|
+
superdoc2.config.user.color = superdoc2.colors[0];
|
|
3397
3397
|
const options = {
|
|
3398
|
-
config:
|
|
3399
|
-
user:
|
|
3398
|
+
config: superdoc2.config.modules.collaboration,
|
|
3399
|
+
user: superdoc2.config.user,
|
|
3400
3400
|
documentId: doc.id,
|
|
3401
|
-
socket:
|
|
3402
|
-
superdocInstance:
|
|
3401
|
+
socket: superdoc2.config.socket,
|
|
3402
|
+
superdocInstance: superdoc2
|
|
3403
3403
|
};
|
|
3404
3404
|
const { provider, ydoc } = createProvider(options);
|
|
3405
3405
|
doc.provider = provider;
|
|
3406
|
-
doc.socket =
|
|
3406
|
+
doc.socket = superdoc2.config.socket;
|
|
3407
3407
|
doc.ydoc = ydoc;
|
|
3408
|
-
doc.role =
|
|
3408
|
+
doc.role = superdoc2.config.role;
|
|
3409
3409
|
processedDocuments.push(doc);
|
|
3410
3410
|
});
|
|
3411
3411
|
return processedDocuments;
|
|
3412
3412
|
};
|
|
3413
|
-
const syncCommentsToClients = (
|
|
3414
|
-
if (!
|
|
3415
|
-
const yArray =
|
|
3416
|
-
const user = superdoc.config.user;
|
|
3413
|
+
const syncCommentsToClients = (superdoc2, event) => {
|
|
3414
|
+
if (!superdoc2.isCollaborative || !superdoc2.config.modules.comments) return;
|
|
3415
|
+
const yArray = superdoc2.ydoc.getArray("comments");
|
|
3417
3416
|
switch (event.type) {
|
|
3418
3417
|
case "add":
|
|
3419
|
-
addYComment(yArray,
|
|
3418
|
+
addYComment(yArray, superdoc2.ydoc, event);
|
|
3420
3419
|
break;
|
|
3421
3420
|
case "update":
|
|
3422
|
-
updateYComment(yArray,
|
|
3421
|
+
updateYComment(yArray, superdoc2.ydoc, event);
|
|
3423
3422
|
break;
|
|
3424
3423
|
case "resolved":
|
|
3425
|
-
updateYComment(yArray,
|
|
3424
|
+
updateYComment(yArray, superdoc2.ydoc, event);
|
|
3426
3425
|
break;
|
|
3427
3426
|
case "deleted":
|
|
3428
|
-
deleteYComment(yArray,
|
|
3427
|
+
deleteYComment(yArray, superdoc2.ydoc, event);
|
|
3429
3428
|
break;
|
|
3430
3429
|
}
|
|
3431
3430
|
};
|
|
@@ -3500,22 +3499,22 @@ function useComment(params2) {
|
|
|
3500
3499
|
const resolvedTime = ref(params2.resolvedTime || null);
|
|
3501
3500
|
const resolvedByEmail = ref(params2.resolvedByEmail || null);
|
|
3502
3501
|
const resolvedByName = ref(params2.resolvedByName || null);
|
|
3503
|
-
const resolveComment = ({ email, name, superdoc }) => {
|
|
3502
|
+
const resolveComment = ({ email, name, superdoc: superdoc2 }) => {
|
|
3504
3503
|
if (resolvedTime.value) return;
|
|
3505
3504
|
resolvedTime.value = Date.now();
|
|
3506
3505
|
resolvedByEmail.value = email;
|
|
3507
3506
|
resolvedByName.value = name;
|
|
3508
3507
|
if (trackedChange.value) {
|
|
3509
3508
|
const emitData2 = { type: comments_module_events.RESOLVED, comment: getValues() };
|
|
3510
|
-
propagateUpdate(
|
|
3511
|
-
|
|
3509
|
+
propagateUpdate(superdoc2, emitData2);
|
|
3510
|
+
superdoc2.activeEditor?.commands?.resolveComment({ commentId, importedId });
|
|
3512
3511
|
return;
|
|
3513
3512
|
}
|
|
3514
3513
|
const emitData = { type: comments_module_events.RESOLVED, comment: getValues() };
|
|
3515
|
-
propagateUpdate(
|
|
3516
|
-
|
|
3514
|
+
propagateUpdate(superdoc2, emitData);
|
|
3515
|
+
superdoc2.activeEditor?.commands?.resolveComment({ commentId, importedId });
|
|
3517
3516
|
};
|
|
3518
|
-
const setIsInternal = ({ isInternal: newIsInternal, superdoc }) => {
|
|
3517
|
+
const setIsInternal = ({ isInternal: newIsInternal, superdoc: superdoc2 }) => {
|
|
3519
3518
|
const previousValue = isInternal.value;
|
|
3520
3519
|
if (previousValue === newIsInternal) return;
|
|
3521
3520
|
isInternal.value = newIsInternal;
|
|
@@ -3524,16 +3523,16 @@ function useComment(params2) {
|
|
|
3524
3523
|
changes: [{ key: "isInternal", value: newIsInternal, previousValue }],
|
|
3525
3524
|
comment: getValues()
|
|
3526
3525
|
};
|
|
3527
|
-
propagateUpdate(
|
|
3528
|
-
const activeEditor =
|
|
3526
|
+
propagateUpdate(superdoc2, emitData);
|
|
3527
|
+
const activeEditor = superdoc2.activeEditor;
|
|
3529
3528
|
if (!activeEditor) return;
|
|
3530
3529
|
activeEditor.commands.setCommentInternal({ commentId, importedId, isInternal: newIsInternal });
|
|
3531
3530
|
};
|
|
3532
|
-
const setActive = (
|
|
3533
|
-
const { activeEditor } =
|
|
3531
|
+
const setActive = (superdoc2) => {
|
|
3532
|
+
const { activeEditor } = superdoc2;
|
|
3534
3533
|
activeEditor?.commands.setActiveComment({ commentId, importedId });
|
|
3535
3534
|
};
|
|
3536
|
-
const setText = ({ text, superdoc, suppressUpdate }) => {
|
|
3535
|
+
const setText = ({ text, superdoc: superdoc2, suppressUpdate }) => {
|
|
3537
3536
|
commentText.value = text;
|
|
3538
3537
|
mentions.value = extractMentions(text);
|
|
3539
3538
|
if (suppressUpdate) return;
|
|
@@ -3542,7 +3541,7 @@ function useComment(params2) {
|
|
|
3542
3541
|
changes: [{ key: "text", value: text }],
|
|
3543
3542
|
comment: getValues()
|
|
3544
3543
|
};
|
|
3545
|
-
propagateUpdate(
|
|
3544
|
+
propagateUpdate(superdoc2, emitData);
|
|
3546
3545
|
};
|
|
3547
3546
|
const extractMentions = (htmlString) => {
|
|
3548
3547
|
const parser = new DOMParser();
|
|
@@ -3579,9 +3578,9 @@ function useComment(params2) {
|
|
|
3579
3578
|
const user = importedAuthor.value ? { name: importedAuthor.value.name || "(Imported)", email: importedAuthor.value.email } : { name: creatorName, email: creatorEmail, image: creatorImage };
|
|
3580
3579
|
return user;
|
|
3581
3580
|
};
|
|
3582
|
-
const propagateUpdate = (
|
|
3583
|
-
|
|
3584
|
-
syncCommentsToClients(
|
|
3581
|
+
const propagateUpdate = (superdoc2, event) => {
|
|
3582
|
+
superdoc2.emit("comments-update", event);
|
|
3583
|
+
syncCommentsToClients(superdoc2, event);
|
|
3585
3584
|
};
|
|
3586
3585
|
const getValues = () => {
|
|
3587
3586
|
return {
|
|
@@ -4006,21 +4005,21 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4006
4005
|
if (id === void 0 || id === null) return null;
|
|
4007
4006
|
return commentsList.value.find((c2) => c2.commentId == id || c2.importedId == id);
|
|
4008
4007
|
};
|
|
4009
|
-
const setActiveComment = (
|
|
4008
|
+
const setActiveComment = (superdoc2, id) => {
|
|
4010
4009
|
if (id === void 0 || id === null) {
|
|
4011
4010
|
activeComment.value = null;
|
|
4012
|
-
if (
|
|
4013
|
-
|
|
4011
|
+
if (superdoc2.activeEditor) {
|
|
4012
|
+
superdoc2.activeEditor.commands?.setActiveComment({ commentId: null });
|
|
4014
4013
|
}
|
|
4015
4014
|
return;
|
|
4016
4015
|
}
|
|
4017
4016
|
const comment = getComment(id);
|
|
4018
4017
|
if (comment) activeComment.value = comment.commentId;
|
|
4019
|
-
if (
|
|
4020
|
-
|
|
4018
|
+
if (superdoc2.activeEditor) {
|
|
4019
|
+
superdoc2.activeEditor.commands?.setActiveComment({ commentId: activeComment.value });
|
|
4021
4020
|
}
|
|
4022
4021
|
};
|
|
4023
|
-
const handleTrackedChangeUpdate = ({ superdoc, params: params2 }) => {
|
|
4022
|
+
const handleTrackedChangeUpdate = ({ superdoc: superdoc2, params: params2 }) => {
|
|
4024
4023
|
const {
|
|
4025
4024
|
event,
|
|
4026
4025
|
changeId,
|
|
@@ -4053,7 +4052,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4053
4052
|
}
|
|
4054
4053
|
});
|
|
4055
4054
|
if (event === "add") {
|
|
4056
|
-
addComment({ superdoc, comment });
|
|
4055
|
+
addComment({ superdoc: superdoc2, comment });
|
|
4057
4056
|
} else if (event === "update") {
|
|
4058
4057
|
const existingTrackedChange = commentsList.value.find((comment2) => comment2.commentId === changeId);
|
|
4059
4058
|
if (!existingTrackedChange) return;
|
|
@@ -4065,33 +4064,33 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4065
4064
|
type: COMMENT_EVENTS.UPDATE,
|
|
4066
4065
|
comment: existingTrackedChange.getValues()
|
|
4067
4066
|
};
|
|
4068
|
-
syncCommentsToClients(
|
|
4069
|
-
debounceEmit(changeId, emitData,
|
|
4067
|
+
syncCommentsToClients(superdoc2, emitData);
|
|
4068
|
+
debounceEmit(changeId, emitData, superdoc2);
|
|
4070
4069
|
}
|
|
4071
4070
|
};
|
|
4072
|
-
const debounceEmit = (commentId, event,
|
|
4071
|
+
const debounceEmit = (commentId, event, superdoc2, delay = 1e3) => {
|
|
4073
4072
|
if (debounceTimers[commentId]) {
|
|
4074
4073
|
clearTimeout(debounceTimers[commentId]);
|
|
4075
4074
|
}
|
|
4076
4075
|
debounceTimers[commentId] = setTimeout(() => {
|
|
4077
|
-
if (
|
|
4078
|
-
|
|
4076
|
+
if (superdoc2) {
|
|
4077
|
+
superdoc2.emit("comments-update", event);
|
|
4079
4078
|
}
|
|
4080
4079
|
delete debounceTimers[commentId];
|
|
4081
4080
|
}, delay);
|
|
4082
4081
|
};
|
|
4083
|
-
const showAddComment = (
|
|
4082
|
+
const showAddComment = (superdoc2) => {
|
|
4084
4083
|
const event = { type: COMMENT_EVENTS.PENDING };
|
|
4085
|
-
|
|
4084
|
+
superdoc2.emit("comments-update", event);
|
|
4086
4085
|
const selection = { ...superdocStore.activeSelection };
|
|
4087
4086
|
selection.selectionBounds = { ...selection.selectionBounds };
|
|
4088
4087
|
if (superdocStore.selectionPosition?.source) {
|
|
4089
4088
|
superdocStore.selectionPosition.source = null;
|
|
4090
4089
|
}
|
|
4091
4090
|
pendingComment.value = getPendingComment({ selection, documentId: selection.documentId, parentCommentId: null });
|
|
4092
|
-
if (!
|
|
4093
|
-
if (
|
|
4094
|
-
|
|
4091
|
+
if (!superdoc2.config.isInternal) pendingComment.value.isInternal = false;
|
|
4092
|
+
if (superdoc2.activeEditor?.commands) {
|
|
4093
|
+
superdoc2.activeEditor.commands.insertComment({
|
|
4095
4094
|
...pendingComment.value.getValues(),
|
|
4096
4095
|
commentId: "pending",
|
|
4097
4096
|
skipEmit: true
|
|
@@ -4161,14 +4160,14 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4161
4160
|
...options
|
|
4162
4161
|
});
|
|
4163
4162
|
};
|
|
4164
|
-
const removePendingComment = (
|
|
4163
|
+
const removePendingComment = (superdoc2) => {
|
|
4165
4164
|
currentCommentText.value = "";
|
|
4166
4165
|
pendingComment.value = null;
|
|
4167
4166
|
activeComment.value = null;
|
|
4168
4167
|
superdocStore.selectionPosition = null;
|
|
4169
|
-
|
|
4168
|
+
superdoc2.activeEditor?.commands.removeComment({ commentId: "pending" });
|
|
4170
4169
|
};
|
|
4171
|
-
const addComment = ({ superdoc, comment, skipEditorUpdate = false }) => {
|
|
4170
|
+
const addComment = ({ superdoc: superdoc2, comment, skipEditorUpdate = false }) => {
|
|
4172
4171
|
let parentComment = commentsList.value.find((c2) => c2.commentId === activeComment.value);
|
|
4173
4172
|
if (!parentComment) parentComment = comment;
|
|
4174
4173
|
const newComment = useComment(comment.getValues());
|
|
@@ -4179,22 +4178,22 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4179
4178
|
const isParentInternal = parentComment.isInternal;
|
|
4180
4179
|
newComment.isInternal = isParentInternal;
|
|
4181
4180
|
}
|
|
4182
|
-
if (!
|
|
4181
|
+
if (!superdoc2.config.isInternal) newComment.isInternal = false;
|
|
4183
4182
|
commentsList.value.push(newComment);
|
|
4184
|
-
removePendingComment(
|
|
4185
|
-
if (!skipEditorUpdate && !comment.trackedChange &&
|
|
4186
|
-
|
|
4183
|
+
removePendingComment(superdoc2);
|
|
4184
|
+
if (!skipEditorUpdate && !comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
|
|
4185
|
+
superdoc2.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
|
|
4187
4186
|
}
|
|
4188
4187
|
const event = { type: COMMENT_EVENTS.ADD, comment: newComment.getValues() };
|
|
4189
|
-
syncCommentsToClients(
|
|
4190
|
-
|
|
4188
|
+
syncCommentsToClients(superdoc2, event);
|
|
4189
|
+
superdoc2.emit("comments-update", event);
|
|
4191
4190
|
};
|
|
4192
|
-
const deleteComment = ({ commentId: commentIdToDelete, superdoc }) => {
|
|
4191
|
+
const deleteComment = ({ commentId: commentIdToDelete, superdoc: superdoc2 }) => {
|
|
4193
4192
|
const commentIndex = commentsList.value.findIndex((c2) => c2.commentId === commentIdToDelete);
|
|
4194
4193
|
const comment = commentsList.value[commentIndex];
|
|
4195
4194
|
const { commentId, importedId } = comment;
|
|
4196
4195
|
const { fileId } = comment;
|
|
4197
|
-
|
|
4196
|
+
superdoc2.activeEditor?.commands?.removeComment({ commentId, importedId });
|
|
4198
4197
|
commentsList.value.splice(commentIndex, 1);
|
|
4199
4198
|
const childCommentIds = commentsList.value.filter((c2) => c2.parentCommentId === commentId).map((c2) => c2.commentId || c2.importedId);
|
|
4200
4199
|
commentsList.value = commentsList.value.filter((c2) => !childCommentIds.includes(c2.commentId));
|
|
@@ -4203,13 +4202,13 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4203
4202
|
comment: comment.getValues(),
|
|
4204
4203
|
changes: [{ key: "deleted", commentId, fileId }]
|
|
4205
4204
|
};
|
|
4206
|
-
|
|
4207
|
-
syncCommentsToClients(
|
|
4205
|
+
superdoc2.emit("comments-update", event);
|
|
4206
|
+
syncCommentsToClients(superdoc2, event);
|
|
4208
4207
|
};
|
|
4209
|
-
const cancelComment = (
|
|
4210
|
-
removePendingComment(
|
|
4208
|
+
const cancelComment = (superdoc2) => {
|
|
4209
|
+
removePendingComment(superdoc2);
|
|
4211
4210
|
};
|
|
4212
|
-
const processLoadedDocxComments = async ({ superdoc, editor, comments, documentId }) => {
|
|
4211
|
+
const processLoadedDocxComments = async ({ superdoc: superdoc2, editor, comments, documentId }) => {
|
|
4213
4212
|
const document2 = superdocStore.getDocument(documentId);
|
|
4214
4213
|
comments.forEach((comment) => {
|
|
4215
4214
|
const htmlContent = getHtmlFromComment(comment.textJson);
|
|
@@ -4241,7 +4240,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4241
4240
|
trackedChangeType: comment.trackedChangeType,
|
|
4242
4241
|
deletedText: comment.trackedDeletedText
|
|
4243
4242
|
});
|
|
4244
|
-
addComment({ superdoc, comment: newComment });
|
|
4243
|
+
addComment({ superdoc: superdoc2, comment: newComment });
|
|
4245
4244
|
});
|
|
4246
4245
|
setTimeout(() => {
|
|
4247
4246
|
createCommentForTrackChanges(editor);
|
|
@@ -4409,62 +4408,6 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4409
4408
|
handleTrackedChangeUpdate
|
|
4410
4409
|
};
|
|
4411
4410
|
});
|
|
4412
|
-
const commentIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>';
|
|
4413
|
-
const caretDownIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>';
|
|
4414
|
-
const userCheckIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM625 177L497 305c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L591 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>';
|
|
4415
|
-
const usersIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z"/></svg>';
|
|
4416
|
-
const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>';
|
|
4417
|
-
const xmarkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';
|
|
4418
|
-
const ellipsisVerticalSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>';
|
|
4419
|
-
const superdocIcons = {
|
|
4420
|
-
comment: commentIconSvg,
|
|
4421
|
-
caretDown: caretDownIconSvg,
|
|
4422
|
-
internal: userCheckIconSvg,
|
|
4423
|
-
external: usersIconSvg,
|
|
4424
|
-
markDone: checkIconSvg,
|
|
4425
|
-
acceptChange: checkIconSvg,
|
|
4426
|
-
rejectChange: xmarkIconSvg,
|
|
4427
|
-
overflow: ellipsisVerticalSvg
|
|
4428
|
-
};
|
|
4429
|
-
const _export_sfc = (sfc, props) => {
|
|
4430
|
-
const target = sfc.__vccOpts || sfc;
|
|
4431
|
-
for (const [key, val] of props) {
|
|
4432
|
-
target[key] = val;
|
|
4433
|
-
}
|
|
4434
|
-
return target;
|
|
4435
|
-
};
|
|
4436
|
-
const _hoisted_1$f = { class: "user-container" };
|
|
4437
|
-
const _hoisted_2$9 = ["src"];
|
|
4438
|
-
const _hoisted_3$7 = {
|
|
4439
|
-
key: 1,
|
|
4440
|
-
class: "user-bg"
|
|
4441
|
-
};
|
|
4442
|
-
const _sfc_main$g = {
|
|
4443
|
-
__name: "Avatar",
|
|
4444
|
-
props: {
|
|
4445
|
-
user: {
|
|
4446
|
-
type: Object,
|
|
4447
|
-
required: true
|
|
4448
|
-
}
|
|
4449
|
-
},
|
|
4450
|
-
setup(__props) {
|
|
4451
|
-
const getInitials = (name, email) => {
|
|
4452
|
-
if (!name && !email) return;
|
|
4453
|
-
const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
|
|
4454
|
-
return firstLetter;
|
|
4455
|
-
};
|
|
4456
|
-
return (_ctx, _cache) => {
|
|
4457
|
-
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
4458
|
-
__props.user.image ? (openBlock(), createElementBlock("img", {
|
|
4459
|
-
key: 0,
|
|
4460
|
-
class: "user-bg",
|
|
4461
|
-
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
4462
|
-
}, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
|
|
4463
|
-
]);
|
|
4464
|
-
};
|
|
4465
|
-
}
|
|
4466
|
-
};
|
|
4467
|
-
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
|
|
4468
4411
|
function plugin$1(options) {
|
|
4469
4412
|
let _bPrefix = ".";
|
|
4470
4413
|
let _ePrefix = "__";
|
|
@@ -8065,30 +8008,30 @@ const defaultClsPrefix = "n";
|
|
|
8065
8008
|
function useConfig(props = {}, options = {
|
|
8066
8009
|
defaultBordered: true
|
|
8067
8010
|
}) {
|
|
8068
|
-
const
|
|
8011
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
8069
8012
|
return {
|
|
8070
8013
|
// NConfigProvider,
|
|
8071
|
-
inlineThemeDisabled:
|
|
8072
|
-
mergedRtlRef:
|
|
8073
|
-
mergedComponentPropsRef:
|
|
8074
|
-
mergedBreakpointsRef:
|
|
8014
|
+
inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
|
|
8015
|
+
mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
|
|
8016
|
+
mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
|
|
8017
|
+
mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
|
|
8075
8018
|
mergedBorderedRef: computed(() => {
|
|
8076
8019
|
var _a, _b;
|
|
8077
8020
|
const {
|
|
8078
8021
|
bordered
|
|
8079
8022
|
} = props;
|
|
8080
8023
|
if (bordered !== void 0) return bordered;
|
|
8081
|
-
return (_b = (_a =
|
|
8024
|
+
return (_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
|
|
8082
8025
|
}),
|
|
8083
|
-
mergedClsPrefixRef:
|
|
8084
|
-
namespaceRef: computed(() =>
|
|
8026
|
+
mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
|
|
8027
|
+
namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
|
|
8085
8028
|
};
|
|
8086
8029
|
}
|
|
8087
8030
|
function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
8088
8031
|
if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
|
|
8089
|
-
const
|
|
8090
|
-
const mergedThemeHashRef =
|
|
8091
|
-
const styleMountTarget =
|
|
8032
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
8033
|
+
const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
|
|
8034
|
+
const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
|
|
8092
8035
|
const themeClassRef = ref("");
|
|
8093
8036
|
const ssrAdapter2 = useSsrAdapter();
|
|
8094
8037
|
let renderCallback;
|
|
@@ -9557,7 +9500,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
9557
9500
|
}
|
|
9558
9501
|
return componentRtlState;
|
|
9559
9502
|
});
|
|
9560
|
-
const
|
|
9503
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
9561
9504
|
const mountStyle = () => {
|
|
9562
9505
|
watchEffect(() => {
|
|
9563
9506
|
const {
|
|
@@ -9577,7 +9520,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
9577
9520
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
9578
9521
|
},
|
|
9579
9522
|
ssr: ssrAdapter2,
|
|
9580
|
-
parent:
|
|
9523
|
+
parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
|
|
9581
9524
|
});
|
|
9582
9525
|
});
|
|
9583
9526
|
};
|
|
@@ -9636,7 +9579,7 @@ function useStyle(mountId, style2, clsPrefixRef) {
|
|
|
9636
9579
|
return;
|
|
9637
9580
|
}
|
|
9638
9581
|
const ssrAdapter2 = useSsrAdapter();
|
|
9639
|
-
const
|
|
9582
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
9640
9583
|
const mountStyle = () => {
|
|
9641
9584
|
const clsPrefix = clsPrefixRef.value;
|
|
9642
9585
|
style2.mount({
|
|
@@ -9647,15 +9590,15 @@ function useStyle(mountId, style2, clsPrefixRef) {
|
|
|
9647
9590
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
9648
9591
|
},
|
|
9649
9592
|
ssr: ssrAdapter2,
|
|
9650
|
-
parent:
|
|
9593
|
+
parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
|
|
9651
9594
|
});
|
|
9652
|
-
if (!(
|
|
9595
|
+
if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
|
|
9653
9596
|
globalStyle.mount({
|
|
9654
9597
|
id: "n-global",
|
|
9655
9598
|
head: true,
|
|
9656
9599
|
anchorMetaName: cssrAnchorMetaName,
|
|
9657
9600
|
ssr: ssrAdapter2,
|
|
9658
|
-
parent:
|
|
9601
|
+
parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
|
|
9659
9602
|
});
|
|
9660
9603
|
}
|
|
9661
9604
|
};
|
|
@@ -9670,7 +9613,7 @@ function createTheme(theme) {
|
|
|
9670
9613
|
}
|
|
9671
9614
|
function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
|
|
9672
9615
|
const ssrAdapter2 = useSsrAdapter();
|
|
9673
|
-
const
|
|
9616
|
+
const NConfigProvider = inject(configProviderInjectionKey, null);
|
|
9674
9617
|
if (style2) {
|
|
9675
9618
|
const mountStyle = () => {
|
|
9676
9619
|
const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
|
|
@@ -9682,15 +9625,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
9682
9625
|
},
|
|
9683
9626
|
anchorMetaName: cssrAnchorMetaName,
|
|
9684
9627
|
ssr: ssrAdapter2,
|
|
9685
|
-
parent:
|
|
9628
|
+
parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
|
|
9686
9629
|
});
|
|
9687
|
-
if (!(
|
|
9630
|
+
if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
|
|
9688
9631
|
globalStyle.mount({
|
|
9689
9632
|
id: "n-global",
|
|
9690
9633
|
head: true,
|
|
9691
9634
|
anchorMetaName: cssrAnchorMetaName,
|
|
9692
9635
|
ssr: ssrAdapter2,
|
|
9693
|
-
parent:
|
|
9636
|
+
parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
|
|
9694
9637
|
});
|
|
9695
9638
|
}
|
|
9696
9639
|
};
|
|
@@ -9722,11 +9665,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
9722
9665
|
self: globalSelf = void 0,
|
|
9723
9666
|
peers: globalPeers = {}
|
|
9724
9667
|
} = {}
|
|
9725
|
-
} = (
|
|
9668
|
+
} = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
|
|
9726
9669
|
const {
|
|
9727
9670
|
common: globalCommonOverrides = void 0,
|
|
9728
9671
|
[resolveId]: globalSelfOverrides = {}
|
|
9729
|
-
} = (
|
|
9672
|
+
} = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
|
|
9730
9673
|
const {
|
|
9731
9674
|
common: globalSelfCommonOverrides,
|
|
9732
9675
|
peers: globalPeersOverrides = {}
|
|
@@ -13569,209 +13512,6 @@ const NCheckbox = defineComponent({
|
|
|
13569
13512
|
}))), labelNode);
|
|
13570
13513
|
}
|
|
13571
13514
|
});
|
|
13572
|
-
const configProviderProps = {
|
|
13573
|
-
abstract: Boolean,
|
|
13574
|
-
bordered: {
|
|
13575
|
-
type: Boolean,
|
|
13576
|
-
default: void 0
|
|
13577
|
-
},
|
|
13578
|
-
clsPrefix: String,
|
|
13579
|
-
locale: Object,
|
|
13580
|
-
dateLocale: Object,
|
|
13581
|
-
namespace: String,
|
|
13582
|
-
rtl: Array,
|
|
13583
|
-
tag: {
|
|
13584
|
-
type: String,
|
|
13585
|
-
default: "div"
|
|
13586
|
-
},
|
|
13587
|
-
hljs: Object,
|
|
13588
|
-
katex: Object,
|
|
13589
|
-
theme: Object,
|
|
13590
|
-
themeOverrides: Object,
|
|
13591
|
-
componentOptions: Object,
|
|
13592
|
-
icons: Object,
|
|
13593
|
-
breakpoints: Object,
|
|
13594
|
-
preflightStyleDisabled: Boolean,
|
|
13595
|
-
styleMountTarget: Object,
|
|
13596
|
-
inlineThemeDisabled: {
|
|
13597
|
-
type: Boolean,
|
|
13598
|
-
default: void 0
|
|
13599
|
-
},
|
|
13600
|
-
// deprecated
|
|
13601
|
-
as: {
|
|
13602
|
-
type: String,
|
|
13603
|
-
validator: () => {
|
|
13604
|
-
warn("config-provider", "`as` is deprecated, please use `tag` instead.");
|
|
13605
|
-
return true;
|
|
13606
|
-
},
|
|
13607
|
-
default: void 0
|
|
13608
|
-
}
|
|
13609
|
-
};
|
|
13610
|
-
const NConfigProvider = defineComponent({
|
|
13611
|
-
name: "ConfigProvider",
|
|
13612
|
-
alias: ["App"],
|
|
13613
|
-
props: configProviderProps,
|
|
13614
|
-
setup(props) {
|
|
13615
|
-
const NConfigProvider2 = inject(configProviderInjectionKey, null);
|
|
13616
|
-
const mergedThemeRef = computed(() => {
|
|
13617
|
-
const {
|
|
13618
|
-
theme
|
|
13619
|
-
} = props;
|
|
13620
|
-
if (theme === null) return void 0;
|
|
13621
|
-
const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
|
|
13622
|
-
return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
|
|
13623
|
-
});
|
|
13624
|
-
const mergedThemeOverridesRef = computed(() => {
|
|
13625
|
-
const {
|
|
13626
|
-
themeOverrides
|
|
13627
|
-
} = props;
|
|
13628
|
-
if (themeOverrides === null) return void 0;
|
|
13629
|
-
if (themeOverrides === void 0) {
|
|
13630
|
-
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
13631
|
-
} else {
|
|
13632
|
-
const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
13633
|
-
if (inheritedThemeOverrides === void 0) {
|
|
13634
|
-
return themeOverrides;
|
|
13635
|
-
} else {
|
|
13636
|
-
return merge$1({}, inheritedThemeOverrides, themeOverrides);
|
|
13637
|
-
}
|
|
13638
|
-
}
|
|
13639
|
-
});
|
|
13640
|
-
const mergedNamespaceRef = useMemo(() => {
|
|
13641
|
-
const {
|
|
13642
|
-
namespace: namespace2
|
|
13643
|
-
} = props;
|
|
13644
|
-
return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
|
|
13645
|
-
});
|
|
13646
|
-
const mergedBorderedRef = useMemo(() => {
|
|
13647
|
-
const {
|
|
13648
|
-
bordered
|
|
13649
|
-
} = props;
|
|
13650
|
-
return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
|
|
13651
|
-
});
|
|
13652
|
-
const mergedIconsRef = computed(() => {
|
|
13653
|
-
const {
|
|
13654
|
-
icons
|
|
13655
|
-
} = props;
|
|
13656
|
-
return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
|
|
13657
|
-
});
|
|
13658
|
-
const mergedComponentPropsRef = computed(() => {
|
|
13659
|
-
const {
|
|
13660
|
-
componentOptions
|
|
13661
|
-
} = props;
|
|
13662
|
-
if (componentOptions !== void 0) return componentOptions;
|
|
13663
|
-
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
|
|
13664
|
-
});
|
|
13665
|
-
const mergedClsPrefixRef = computed(() => {
|
|
13666
|
-
const {
|
|
13667
|
-
clsPrefix
|
|
13668
|
-
} = props;
|
|
13669
|
-
if (clsPrefix !== void 0) return clsPrefix;
|
|
13670
|
-
if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
|
|
13671
|
-
return defaultClsPrefix;
|
|
13672
|
-
});
|
|
13673
|
-
const mergedRtlRef = computed(() => {
|
|
13674
|
-
var _a;
|
|
13675
|
-
const {
|
|
13676
|
-
rtl
|
|
13677
|
-
} = props;
|
|
13678
|
-
if (rtl === void 0) {
|
|
13679
|
-
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
|
|
13680
|
-
}
|
|
13681
|
-
const rtlEnabledState = {};
|
|
13682
|
-
for (const rtlInfo of rtl) {
|
|
13683
|
-
rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
|
|
13684
|
-
(_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
|
|
13685
|
-
if (!(peerRtlInfo.name in rtlEnabledState)) {
|
|
13686
|
-
rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
|
|
13687
|
-
}
|
|
13688
|
-
});
|
|
13689
|
-
}
|
|
13690
|
-
return rtlEnabledState;
|
|
13691
|
-
});
|
|
13692
|
-
const mergedBreakpointsRef = computed(() => {
|
|
13693
|
-
return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
|
|
13694
|
-
});
|
|
13695
|
-
const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
|
|
13696
|
-
const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
|
|
13697
|
-
const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
|
|
13698
|
-
const mergedThemeHashRef = computed(() => {
|
|
13699
|
-
const {
|
|
13700
|
-
value: theme
|
|
13701
|
-
} = mergedThemeRef;
|
|
13702
|
-
const {
|
|
13703
|
-
value: mergedThemeOverrides
|
|
13704
|
-
} = mergedThemeOverridesRef;
|
|
13705
|
-
const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
|
|
13706
|
-
const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
|
|
13707
|
-
if (themeName) {
|
|
13708
|
-
if (hasThemeOverrides) {
|
|
13709
|
-
return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
|
|
13710
|
-
}
|
|
13711
|
-
return themeName;
|
|
13712
|
-
} else {
|
|
13713
|
-
if (hasThemeOverrides) {
|
|
13714
|
-
return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
|
|
13715
|
-
}
|
|
13716
|
-
return "";
|
|
13717
|
-
}
|
|
13718
|
-
});
|
|
13719
|
-
provide(configProviderInjectionKey, {
|
|
13720
|
-
mergedThemeHashRef,
|
|
13721
|
-
mergedBreakpointsRef,
|
|
13722
|
-
mergedRtlRef,
|
|
13723
|
-
mergedIconsRef,
|
|
13724
|
-
mergedComponentPropsRef,
|
|
13725
|
-
mergedBorderedRef,
|
|
13726
|
-
mergedNamespaceRef,
|
|
13727
|
-
mergedClsPrefixRef,
|
|
13728
|
-
mergedLocaleRef: computed(() => {
|
|
13729
|
-
const {
|
|
13730
|
-
locale
|
|
13731
|
-
} = props;
|
|
13732
|
-
if (locale === null) return void 0;
|
|
13733
|
-
return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
|
|
13734
|
-
}),
|
|
13735
|
-
mergedDateLocaleRef: computed(() => {
|
|
13736
|
-
const {
|
|
13737
|
-
dateLocale
|
|
13738
|
-
} = props;
|
|
13739
|
-
if (dateLocale === null) return void 0;
|
|
13740
|
-
return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
|
|
13741
|
-
}),
|
|
13742
|
-
mergedHljsRef: computed(() => {
|
|
13743
|
-
const {
|
|
13744
|
-
hljs
|
|
13745
|
-
} = props;
|
|
13746
|
-
return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
|
|
13747
|
-
}),
|
|
13748
|
-
mergedKatexRef: computed(() => {
|
|
13749
|
-
const {
|
|
13750
|
-
katex
|
|
13751
|
-
} = props;
|
|
13752
|
-
return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
|
|
13753
|
-
}),
|
|
13754
|
-
mergedThemeRef,
|
|
13755
|
-
mergedThemeOverridesRef,
|
|
13756
|
-
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
13757
|
-
preflightStyleDisabled: preflightStyleDisabled || false,
|
|
13758
|
-
styleMountTarget
|
|
13759
|
-
});
|
|
13760
|
-
return {
|
|
13761
|
-
mergedClsPrefix: mergedClsPrefixRef,
|
|
13762
|
-
mergedBordered: mergedBorderedRef,
|
|
13763
|
-
mergedNamespace: mergedNamespaceRef,
|
|
13764
|
-
mergedTheme: mergedThemeRef,
|
|
13765
|
-
mergedThemeOverrides: mergedThemeOverridesRef
|
|
13766
|
-
};
|
|
13767
|
-
},
|
|
13768
|
-
render() {
|
|
13769
|
-
var _a, _b, _c, _d;
|
|
13770
|
-
return !this.abstract ? h(this.as || this.tag, {
|
|
13771
|
-
class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
|
|
13772
|
-
}, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
13773
|
-
}
|
|
13774
|
-
});
|
|
13775
13515
|
const commonVariables$1 = {
|
|
13776
13516
|
padding: "4px 0",
|
|
13777
13517
|
optionIconSizeSmall: "14px",
|
|
@@ -15648,20 +15388,62 @@ const NMessageProvider = defineComponent({
|
|
|
15648
15388
|
}))) : null);
|
|
15649
15389
|
}
|
|
15650
15390
|
});
|
|
15651
|
-
const
|
|
15652
|
-
|
|
15653
|
-
|
|
15654
|
-
|
|
15655
|
-
|
|
15656
|
-
|
|
15657
|
-
|
|
15658
|
-
|
|
15659
|
-
|
|
15660
|
-
|
|
15661
|
-
|
|
15662
|
-
|
|
15663
|
-
|
|
15664
|
-
|
|
15391
|
+
const commentIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>';
|
|
15392
|
+
const caretDownIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>';
|
|
15393
|
+
const userCheckIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM625 177L497 305c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L591 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>';
|
|
15394
|
+
const usersIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z"/></svg>';
|
|
15395
|
+
const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>';
|
|
15396
|
+
const xmarkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';
|
|
15397
|
+
const ellipsisVerticalSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>';
|
|
15398
|
+
const superdocIcons = {
|
|
15399
|
+
comment: commentIconSvg,
|
|
15400
|
+
caretDown: caretDownIconSvg,
|
|
15401
|
+
internal: userCheckIconSvg,
|
|
15402
|
+
external: usersIconSvg,
|
|
15403
|
+
markDone: checkIconSvg,
|
|
15404
|
+
acceptChange: checkIconSvg,
|
|
15405
|
+
rejectChange: xmarkIconSvg,
|
|
15406
|
+
overflow: ellipsisVerticalSvg
|
|
15407
|
+
};
|
|
15408
|
+
const _export_sfc = (sfc, props) => {
|
|
15409
|
+
const target = sfc.__vccOpts || sfc;
|
|
15410
|
+
for (const [key, val] of props) {
|
|
15411
|
+
target[key] = val;
|
|
15412
|
+
}
|
|
15413
|
+
return target;
|
|
15414
|
+
};
|
|
15415
|
+
const _hoisted_1$f = { class: "user-container" };
|
|
15416
|
+
const _hoisted_2$9 = ["src"];
|
|
15417
|
+
const _hoisted_3$7 = {
|
|
15418
|
+
key: 1,
|
|
15419
|
+
class: "user-bg"
|
|
15420
|
+
};
|
|
15421
|
+
const _sfc_main$g = {
|
|
15422
|
+
__name: "Avatar",
|
|
15423
|
+
props: {
|
|
15424
|
+
user: {
|
|
15425
|
+
type: Object,
|
|
15426
|
+
required: true
|
|
15427
|
+
}
|
|
15428
|
+
},
|
|
15429
|
+
setup(__props) {
|
|
15430
|
+
const getInitials = (name, email) => {
|
|
15431
|
+
if (!name && !email) return;
|
|
15432
|
+
const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
|
|
15433
|
+
return firstLetter;
|
|
15434
|
+
};
|
|
15435
|
+
return (_ctx, _cache) => {
|
|
15436
|
+
return openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
15437
|
+
__props.user.image ? (openBlock(), createElementBlock("img", {
|
|
15438
|
+
key: 0,
|
|
15439
|
+
class: "user-bg",
|
|
15440
|
+
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
15441
|
+
}, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
|
|
15442
|
+
]);
|
|
15443
|
+
};
|
|
15444
|
+
}
|
|
15445
|
+
};
|
|
15446
|
+
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
|
|
15665
15447
|
const _hoisted_1$e = { class: "comment-option" };
|
|
15666
15448
|
const _hoisted_2$8 = ["innerHTML"];
|
|
15667
15449
|
const _hoisted_3$6 = { class: "option-state" };
|
|
@@ -15682,7 +15464,6 @@ const _sfc_main$f = {
|
|
|
15682
15464
|
setup(__props, { emit: __emit }) {
|
|
15683
15465
|
const emit = __emit;
|
|
15684
15466
|
const props = __props;
|
|
15685
|
-
const { uiFontFamily } = useUiFontFamily();
|
|
15686
15467
|
const renderIcon = (icon) => {
|
|
15687
15468
|
return () => {
|
|
15688
15469
|
return h("div", { innerHTML: icon, class: "internal-dropdown__item-icon" });
|
|
@@ -15744,8 +15525,7 @@ const _sfc_main$f = {
|
|
|
15744
15525
|
trigger: "click",
|
|
15745
15526
|
options,
|
|
15746
15527
|
onSelect: _cache[0] || (_cache[0] = ($event) => handleSelect($event)),
|
|
15747
|
-
disabled: __props.isDisabled
|
|
15748
|
-
"content-style": { fontFamily: unref(uiFontFamily) }
|
|
15528
|
+
disabled: __props.isDisabled
|
|
15749
15529
|
}, {
|
|
15750
15530
|
default: withCtx(() => [
|
|
15751
15531
|
createBaseVNode("div", _hoisted_1$e, [
|
|
@@ -15761,12 +15541,12 @@ const _sfc_main$f = {
|
|
|
15761
15541
|
])
|
|
15762
15542
|
]),
|
|
15763
15543
|
_: 1
|
|
15764
|
-
}, 8, ["disabled"
|
|
15544
|
+
}, 8, ["disabled"])
|
|
15765
15545
|
], 4);
|
|
15766
15546
|
};
|
|
15767
15547
|
}
|
|
15768
15548
|
};
|
|
15769
|
-
const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
15549
|
+
const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a88dddd9"]]);
|
|
15770
15550
|
function formatDate(timestamp) {
|
|
15771
15551
|
const date = new Date(timestamp);
|
|
15772
15552
|
const hours = date.getHours();
|
|
@@ -15912,7 +15692,6 @@ const _sfc_main$e = {
|
|
|
15912
15692
|
const role = proxy.$superdoc.config.role;
|
|
15913
15693
|
const isInternal = proxy.$superdoc.config.isInternal;
|
|
15914
15694
|
const isOwnComment = props.comment.creatorEmail === proxy.$superdoc.config.user.email;
|
|
15915
|
-
const { uiFontFamily } = useUiFontFamily();
|
|
15916
15695
|
const OVERFLOW_OPTIONS = Object.freeze({
|
|
15917
15696
|
edit: { label: "Edit", key: "edit" },
|
|
15918
15697
|
delete: { label: "Delete", key: "delete" }
|
|
@@ -16016,8 +15795,7 @@ const _sfc_main$e = {
|
|
|
16016
15795
|
key: 2,
|
|
16017
15796
|
trigger: "click",
|
|
16018
15797
|
options: getOverflowOptions.value,
|
|
16019
|
-
onSelect: handleSelect
|
|
16020
|
-
"content-style": { fontFamily: unref(uiFontFamily) }
|
|
15798
|
+
onSelect: handleSelect
|
|
16021
15799
|
}, {
|
|
16022
15800
|
default: withCtx(() => [
|
|
16023
15801
|
createBaseVNode("div", {
|
|
@@ -16032,13 +15810,13 @@ const _sfc_main$e = {
|
|
|
16032
15810
|
])
|
|
16033
15811
|
]),
|
|
16034
15812
|
_: 1
|
|
16035
|
-
}, 8, ["options"
|
|
15813
|
+
}, 8, ["options"])) : createCommentVNode("", true)
|
|
16036
15814
|
])
|
|
16037
15815
|
]);
|
|
16038
15816
|
};
|
|
16039
15817
|
}
|
|
16040
15818
|
};
|
|
16041
|
-
const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
15819
|
+
const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-0f4f53ef"]]);
|
|
16042
15820
|
const _hoisted_1$c = { class: "input-section" };
|
|
16043
15821
|
const _sfc_main$d = {
|
|
16044
15822
|
__name: "CommentInput",
|
|
@@ -16458,7 +16236,7 @@ const _sfc_main$c = {
|
|
|
16458
16236
|
};
|
|
16459
16237
|
}
|
|
16460
16238
|
};
|
|
16461
|
-
const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
16239
|
+
const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-36e5f63e"]]);
|
|
16462
16240
|
const _hoisted_1$a = { class: "comments-list" };
|
|
16463
16241
|
const _hoisted_2$5 = { key: 0 };
|
|
16464
16242
|
const _hoisted_3$3 = { class: "comment-item" };
|
|
@@ -16521,12 +16299,12 @@ class SuperComments extends EventEmitter {
|
|
|
16521
16299
|
element: null,
|
|
16522
16300
|
commentsStore: null
|
|
16523
16301
|
};
|
|
16524
|
-
constructor(options,
|
|
16302
|
+
constructor(options, superdoc2) {
|
|
16525
16303
|
super();
|
|
16526
16304
|
this.config = { ...this.config, ...options };
|
|
16527
16305
|
this.element = this.config.element;
|
|
16528
16306
|
this.app = null;
|
|
16529
|
-
this.superdoc =
|
|
16307
|
+
this.superdoc = superdoc2;
|
|
16530
16308
|
this.open();
|
|
16531
16309
|
}
|
|
16532
16310
|
createVueApp() {
|
|
@@ -16755,8 +16533,7 @@ const _sfc_main$9 = {
|
|
|
16755
16533
|
measurementTimeoutId.value = null;
|
|
16756
16534
|
}
|
|
16757
16535
|
const totalComments = getFloatingComments.value.length;
|
|
16758
|
-
|
|
16759
|
-
if (totalComments === 0 || measuredComments === 0) {
|
|
16536
|
+
if (totalComments === 0) {
|
|
16760
16537
|
return;
|
|
16761
16538
|
}
|
|
16762
16539
|
nextTick(processLocations);
|
|
@@ -16837,7 +16614,7 @@ const _sfc_main$9 = {
|
|
|
16837
16614
|
};
|
|
16838
16615
|
}
|
|
16839
16616
|
};
|
|
16840
|
-
const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-
|
|
16617
|
+
const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6905dd07"]]);
|
|
16841
16618
|
const _sfc_main$8 = {
|
|
16842
16619
|
__name: "TextField",
|
|
16843
16620
|
props: {
|
|
@@ -17060,7 +16837,7 @@ const _sfc_main$4 = {
|
|
|
17060
16837
|
};
|
|
17061
16838
|
}
|
|
17062
16839
|
};
|
|
17063
|
-
const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
16840
|
+
const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b8cacb22"]]);
|
|
17064
16841
|
const floor = (val, precision) => {
|
|
17065
16842
|
const multiplier = 10 ** precision;
|
|
17066
16843
|
return Math.floor(val * multiplier) / multiplier;
|
|
@@ -17465,7 +17242,7 @@ const _sfc_main = {
|
|
|
17465
17242
|
__name: "SuperDoc",
|
|
17466
17243
|
emits: ["selection-update"],
|
|
17467
17244
|
setup(__props, { emit: __emit }) {
|
|
17468
|
-
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-
|
|
17245
|
+
const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-eykNsWyi.es.js"));
|
|
17469
17246
|
const superdocStore = useSuperdocStore();
|
|
17470
17247
|
const commentsStore = useCommentsStore();
|
|
17471
17248
|
const {
|
|
@@ -17505,15 +17282,11 @@ const _sfc_main = {
|
|
|
17505
17282
|
const { proxy } = getCurrentInstance();
|
|
17506
17283
|
commentsStore.proxy = proxy;
|
|
17507
17284
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
17508
|
-
const { uiFontFamily } = useUiFontFamily();
|
|
17509
17285
|
const commentsModuleConfig = computed(() => {
|
|
17510
17286
|
const config = modules.comments;
|
|
17511
17287
|
if (config === false || config == null) return null;
|
|
17512
17288
|
return config;
|
|
17513
17289
|
});
|
|
17514
|
-
const superdocStyleVars = computed(() => ({
|
|
17515
|
-
"--sd-ui-font-family": uiFontFamily.value
|
|
17516
|
-
}));
|
|
17517
17290
|
const layers = ref(null);
|
|
17518
17291
|
const commentsLayer = ref(null);
|
|
17519
17292
|
const toolsMenuPosition = reactive({ top: null, right: "-25px", zIndex: 101 });
|
|
@@ -18030,164 +17803,155 @@ const _sfc_main = {
|
|
|
18030
17803
|
});
|
|
18031
17804
|
return (_ctx, _cache) => {
|
|
18032
17805
|
const _directive_click_outside = resolveDirective("click-outside");
|
|
18033
|
-
return openBlock(),
|
|
18034
|
-
|
|
18035
|
-
|
|
18036
|
-
|
|
18037
|
-
|
|
18038
|
-
|
|
18039
|
-
|
|
18040
|
-
|
|
17806
|
+
return openBlock(), createElementBlock("div", {
|
|
17807
|
+
class: normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": unref(isHighContrastMode2) }])
|
|
17808
|
+
}, [
|
|
17809
|
+
createBaseVNode("div", {
|
|
17810
|
+
class: "superdoc__layers layers",
|
|
17811
|
+
ref_key: "layers",
|
|
17812
|
+
ref: layers,
|
|
17813
|
+
role: "group"
|
|
17814
|
+
}, [
|
|
17815
|
+
showToolsFloatingMenu.value ? (openBlock(), createElementBlock("div", {
|
|
17816
|
+
key: 0,
|
|
17817
|
+
class: "superdoc__tools tools",
|
|
17818
|
+
style: normalizeStyle(toolsMenuPosition)
|
|
18041
17819
|
}, [
|
|
18042
17820
|
createBaseVNode("div", {
|
|
18043
|
-
class: "
|
|
18044
|
-
|
|
18045
|
-
|
|
18046
|
-
|
|
17821
|
+
class: "tools-item",
|
|
17822
|
+
"data-id": "is-tool",
|
|
17823
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
|
|
17824
|
+
}, [
|
|
17825
|
+
createBaseVNode("div", {
|
|
17826
|
+
class: "superdoc__tools-icon",
|
|
17827
|
+
innerHTML: unref(superdocIcons).comment
|
|
17828
|
+
}, null, 8, _hoisted_1)
|
|
17829
|
+
], 32),
|
|
17830
|
+
unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
|
|
17831
|
+
key: 0,
|
|
17832
|
+
class: "tools-item",
|
|
17833
|
+
"data-id": "is-tool",
|
|
17834
|
+
onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
|
|
17835
|
+
}, [..._cache[3] || (_cache[3] = [
|
|
17836
|
+
createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
|
|
17837
|
+
])], 32)) : createCommentVNode("", true)
|
|
17838
|
+
], 4)) : createCommentVNode("", true),
|
|
17839
|
+
createBaseVNode("div", _hoisted_2, [
|
|
17840
|
+
isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
|
|
17841
|
+
key: 0,
|
|
17842
|
+
class: "superdoc__selection-layer selection-layer",
|
|
17843
|
+
onMousedown: handleSelectionStart,
|
|
17844
|
+
onMouseup: handleDragEnd,
|
|
17845
|
+
ref_key: "selectionLayer",
|
|
17846
|
+
ref: selectionLayer
|
|
18047
17847
|
}, [
|
|
18048
|
-
|
|
17848
|
+
unref(selectionPosition) && shouldShowSelection.value ? (openBlock(), createElementBlock("div", {
|
|
18049
17849
|
key: 0,
|
|
18050
|
-
|
|
18051
|
-
|
|
17850
|
+
style: normalizeStyle(getSelectionPosition.value),
|
|
17851
|
+
class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
|
|
17852
|
+
}, null, 4)) : createCommentVNode("", true)
|
|
17853
|
+
], 544)) : createCommentVNode("", true),
|
|
17854
|
+
"hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
|
|
17855
|
+
key: 1,
|
|
17856
|
+
fields: unref(modules)["hrbr-fields"],
|
|
17857
|
+
class: "superdoc__comments-layer comments-layer",
|
|
17858
|
+
style: { "z-index": "2" },
|
|
17859
|
+
ref_key: "hrbrFieldsLayer",
|
|
17860
|
+
ref: hrbrFieldsLayer
|
|
17861
|
+
}, null, 8, ["fields"])) : createCommentVNode("", true),
|
|
17862
|
+
layers.value ? (openBlock(), createBlock(CommentsLayer, {
|
|
17863
|
+
key: 2,
|
|
17864
|
+
class: "superdoc__comments-layer comments-layer",
|
|
17865
|
+
style: { "z-index": "3" },
|
|
17866
|
+
ref_key: "commentsLayer",
|
|
17867
|
+
ref: commentsLayer,
|
|
17868
|
+
parent: layers.value,
|
|
17869
|
+
user: unref(user),
|
|
17870
|
+
onHighlightClick: handleHighlightClick
|
|
17871
|
+
}, null, 8, ["parent", "user"])) : createCommentVNode("", true),
|
|
17872
|
+
unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
|
|
17873
|
+
key: 3,
|
|
17874
|
+
class: "ai-layer",
|
|
17875
|
+
style: { "z-index": "4" },
|
|
17876
|
+
ref_key: "aiLayer",
|
|
17877
|
+
ref: aiLayer,
|
|
17878
|
+
editor: unref(proxy).$superdoc.activeEditor
|
|
17879
|
+
}, null, 8, ["editor"])) : createCommentVNode("", true),
|
|
17880
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc) => {
|
|
17881
|
+
return openBlock(), createElementBlock("div", {
|
|
17882
|
+
class: "superdoc__sub-document sub-document",
|
|
17883
|
+
key: doc.id
|
|
18052
17884
|
}, [
|
|
18053
|
-
|
|
18054
|
-
class: "tools-item",
|
|
18055
|
-
"data-id": "is-tool",
|
|
18056
|
-
onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
|
|
18057
|
-
}, [
|
|
18058
|
-
createBaseVNode("div", {
|
|
18059
|
-
class: "superdoc__tools-icon",
|
|
18060
|
-
innerHTML: unref(superdocIcons).comment
|
|
18061
|
-
}, null, 8, _hoisted_1)
|
|
18062
|
-
], 32),
|
|
18063
|
-
unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
|
|
18064
|
-
key: 0,
|
|
18065
|
-
class: "tools-item",
|
|
18066
|
-
"data-id": "is-tool",
|
|
18067
|
-
onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
|
|
18068
|
-
}, [..._cache[3] || (_cache[3] = [
|
|
18069
|
-
createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
|
|
18070
|
-
])], 32)) : createCommentVNode("", true)
|
|
18071
|
-
], 4)) : createCommentVNode("", true),
|
|
18072
|
-
createBaseVNode("div", _hoisted_2, [
|
|
18073
|
-
isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
|
|
17885
|
+
doc.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer), {
|
|
18074
17886
|
key: 0,
|
|
18075
|
-
|
|
18076
|
-
|
|
18077
|
-
|
|
18078
|
-
|
|
18079
|
-
|
|
18080
|
-
|
|
18081
|
-
|
|
18082
|
-
|
|
18083
|
-
|
|
18084
|
-
|
|
18085
|
-
}, null, 4)) : createCommentVNode("", true)
|
|
18086
|
-
], 544)) : createCommentVNode("", true),
|
|
18087
|
-
"hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
|
|
18088
|
-
key: 1,
|
|
18089
|
-
fields: unref(modules)["hrbr-fields"],
|
|
18090
|
-
class: "superdoc__comments-layer comments-layer",
|
|
18091
|
-
style: { "z-index": "2" },
|
|
18092
|
-
ref_key: "hrbrFieldsLayer",
|
|
18093
|
-
ref: hrbrFieldsLayer
|
|
18094
|
-
}, null, 8, ["fields"])) : createCommentVNode("", true),
|
|
18095
|
-
layers.value ? (openBlock(), createBlock(CommentsLayer, {
|
|
18096
|
-
key: 2,
|
|
18097
|
-
class: "superdoc__comments-layer comments-layer",
|
|
18098
|
-
style: { "z-index": "3" },
|
|
18099
|
-
ref_key: "commentsLayer",
|
|
18100
|
-
ref: commentsLayer,
|
|
18101
|
-
parent: layers.value,
|
|
18102
|
-
user: unref(user),
|
|
18103
|
-
onHighlightClick: handleHighlightClick
|
|
18104
|
-
}, null, 8, ["parent", "user"])) : createCommentVNode("", true),
|
|
18105
|
-
unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
|
|
18106
|
-
key: 3,
|
|
18107
|
-
class: "ai-layer",
|
|
18108
|
-
style: { "z-index": "4" },
|
|
18109
|
-
ref_key: "aiLayer",
|
|
18110
|
-
ref: aiLayer,
|
|
18111
|
-
editor: unref(proxy).$superdoc.activeEditor
|
|
18112
|
-
}, null, 8, ["editor"])) : createCommentVNode("", true),
|
|
18113
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc) => {
|
|
18114
|
-
return openBlock(), createElementBlock("div", {
|
|
18115
|
-
class: "superdoc__sub-document sub-document",
|
|
18116
|
-
key: doc.id
|
|
18117
|
-
}, [
|
|
18118
|
-
doc.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer), {
|
|
17887
|
+
"document-data": doc,
|
|
17888
|
+
config: unref(pdfConfig),
|
|
17889
|
+
onSelectionChange: handleSelectionChange,
|
|
17890
|
+
onReady: handleDocumentReady,
|
|
17891
|
+
onPageLoaded: unref(handlePageReady),
|
|
17892
|
+
onBypassSelection: handlePdfClick
|
|
17893
|
+
}, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
|
|
17894
|
+
createVNode(unref(NMessageProvider), null, {
|
|
17895
|
+
default: withCtx(() => [
|
|
17896
|
+
doc.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
|
|
18119
17897
|
key: 0,
|
|
18120
|
-
"document-data": doc,
|
|
18121
|
-
config: unref(pdfConfig),
|
|
18122
|
-
onSelectionChange: handleSelectionChange,
|
|
18123
|
-
onReady: handleDocumentReady,
|
|
18124
|
-
onPageLoaded: unref(handlePageReady),
|
|
18125
|
-
onBypassSelection: handlePdfClick
|
|
18126
|
-
}, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
|
|
18127
|
-
createVNode(unref(NMessageProvider), null, {
|
|
18128
|
-
default: withCtx(() => [
|
|
18129
|
-
doc.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
|
|
18130
|
-
key: 0,
|
|
18131
|
-
"file-source": doc.data,
|
|
18132
|
-
state: doc.state,
|
|
18133
|
-
"document-id": doc.id,
|
|
18134
|
-
options: { ...editorOptions(doc), rulers: doc.rulers },
|
|
18135
|
-
onEditorReady,
|
|
18136
|
-
onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
|
|
18137
|
-
}, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
|
|
18138
|
-
]),
|
|
18139
|
-
_: 2
|
|
18140
|
-
}, 1024),
|
|
18141
|
-
doc.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
|
|
18142
|
-
key: 1,
|
|
18143
|
-
onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
|
|
18144
|
-
onSelectionChange: handleSelectionChange,
|
|
18145
17898
|
"file-source": doc.data,
|
|
18146
|
-
|
|
18147
|
-
|
|
18148
|
-
|
|
18149
|
-
|
|
18150
|
-
|
|
18151
|
-
|
|
18152
|
-
|
|
18153
|
-
|
|
18154
|
-
|
|
18155
|
-
|
|
18156
|
-
|
|
18157
|
-
|
|
18158
|
-
|
|
18159
|
-
|
|
18160
|
-
|
|
18161
|
-
|
|
18162
|
-
|
|
18163
|
-
|
|
18164
|
-
|
|
18165
|
-
|
|
18166
|
-
|
|
18167
|
-
|
|
18168
|
-
|
|
18169
|
-
|
|
18170
|
-
|
|
18171
|
-
|
|
18172
|
-
|
|
18173
|
-
|
|
18174
|
-
|
|
18175
|
-
|
|
18176
|
-
|
|
18177
|
-
|
|
18178
|
-
|
|
18179
|
-
"
|
|
18180
|
-
|
|
18181
|
-
|
|
18182
|
-
|
|
18183
|
-
|
|
18184
|
-
|
|
18185
|
-
|
|
18186
|
-
|
|
17899
|
+
state: doc.state,
|
|
17900
|
+
"document-id": doc.id,
|
|
17901
|
+
options: { ...editorOptions(doc), rulers: doc.rulers },
|
|
17902
|
+
onEditorReady,
|
|
17903
|
+
onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
|
|
17904
|
+
}, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
|
|
17905
|
+
]),
|
|
17906
|
+
_: 2
|
|
17907
|
+
}, 1024),
|
|
17908
|
+
doc.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
|
|
17909
|
+
key: 1,
|
|
17910
|
+
onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
|
|
17911
|
+
onSelectionChange: handleSelectionChange,
|
|
17912
|
+
"file-source": doc.data,
|
|
17913
|
+
"document-id": doc.id
|
|
17914
|
+
}, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
|
|
17915
|
+
]);
|
|
17916
|
+
}), 128))
|
|
17917
|
+
])
|
|
17918
|
+
], 512),
|
|
17919
|
+
showCommentsSidebar.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
17920
|
+
unref(pendingComment) ? withDirectives((openBlock(), createBlock(CommentDialog, {
|
|
17921
|
+
key: 0,
|
|
17922
|
+
comment: unref(pendingComment),
|
|
17923
|
+
"auto-focus": true,
|
|
17924
|
+
"is-floating": true
|
|
17925
|
+
}, null, 8, ["comment"])), [
|
|
17926
|
+
[_directive_click_outside, cancelPendingComment]
|
|
17927
|
+
]) : createCommentVNode("", true),
|
|
17928
|
+
createBaseVNode("div", _hoisted_4, [
|
|
17929
|
+
unref(hasInitializedLocations) && unref(getFloatingComments).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc) => {
|
|
17930
|
+
return openBlock(), createBlock(FloatingComments, {
|
|
17931
|
+
parent: layers.value,
|
|
17932
|
+
"current-document": doc
|
|
17933
|
+
}, null, 8, ["parent", "current-document"]);
|
|
17934
|
+
}), 256)) : createCommentVNode("", true)
|
|
17935
|
+
])
|
|
17936
|
+
])) : createCommentVNode("", true),
|
|
17937
|
+
unref(showAiWriter) ? (openBlock(), createElementBlock("div", {
|
|
17938
|
+
key: 1,
|
|
17939
|
+
class: "ai-writer-container",
|
|
17940
|
+
style: normalizeStyle(unref(aiWriterPosition))
|
|
17941
|
+
}, [
|
|
17942
|
+
createVNode(unref(AIWriter), {
|
|
17943
|
+
"selected-text": unref(selectedText),
|
|
17944
|
+
"handle-close": unref(handleAiWriterClose),
|
|
17945
|
+
editor: unref(proxy).$superdoc.activeEditor,
|
|
17946
|
+
"api-key": unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
|
|
17947
|
+
endpoint: unref(proxy).$superdoc.config?.modules?.ai?.endpoint
|
|
17948
|
+
}, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
|
|
17949
|
+
], 4)) : createCommentVNode("", true)
|
|
17950
|
+
], 2);
|
|
18187
17951
|
};
|
|
18188
17952
|
}
|
|
18189
17953
|
};
|
|
18190
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
17954
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e229774d"]]);
|
|
18191
17955
|
const createSuperdocVueApp = () => {
|
|
18192
17956
|
const app = createApp(App);
|
|
18193
17957
|
const pinia = createPinia();
|
|
@@ -18297,8 +18061,6 @@ class SuperDoc extends EventEmitter {
|
|
|
18297
18061
|
toolbarGroups: ["left", "center", "right"],
|
|
18298
18062
|
toolbarIcons: {},
|
|
18299
18063
|
toolbarTexts: {},
|
|
18300
|
-
// UI font for SuperDoc surfaces (toolbar, comments UI, etc.)
|
|
18301
|
-
uiDisplayFallbackFont: "Arial, Helvetica, sans-serif",
|
|
18302
18064
|
isDev: false,
|
|
18303
18065
|
// telemetry config
|
|
18304
18066
|
telemetry: null,
|
|
@@ -18369,7 +18131,7 @@ class SuperDoc extends EventEmitter {
|
|
|
18369
18131
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18370
18132
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18371
18133
|
this.colorIndex = 0;
|
|
18372
|
-
this.version = "1.0.0-next.
|
|
18134
|
+
this.version = "1.0.0-next.2";
|
|
18373
18135
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18374
18136
|
this.superdocId = config.superdocId || v4();
|
|
18375
18137
|
this.colors = this.config.colors;
|
|
@@ -18728,7 +18490,6 @@ class SuperDoc extends EventEmitter {
|
|
|
18728
18490
|
superdoc: this,
|
|
18729
18491
|
aiApiKey: this.config.modules?.ai?.apiKey,
|
|
18730
18492
|
aiEndpoint: this.config.modules?.ai?.endpoint,
|
|
18731
|
-
uiDisplayFallbackFont: this.config.uiDisplayFallbackFont,
|
|
18732
18493
|
...moduleConfig,
|
|
18733
18494
|
excludeItems
|
|
18734
18495
|
// Override moduleConfig.excludeItems with our computed list
|