@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.
Files changed (69) hide show
  1. package/dist/chunks/{PdfViewer-B9LcTIm2.cjs → PdfViewer-B-xTd4XY.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-CZG4udaT.es.js → PdfViewer-eykNsWyi.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-44XulWQe.es.js → eventemitter3-CcXAdeql.es.js} +1 -1
  4. package/dist/chunks/{index-DdTDm9oI-BXzE00pk.es.js → index-BDVXUeCy-7mwhYeJ7.es.js} +1 -1
  5. package/dist/chunks/{index-DdTDm9oI-Duiy8M_G.cjs → index-BDVXUeCy-Di6ozaOM.cjs} +1 -1
  6. package/dist/chunks/{index-1n6qegaQ.es.js → index-DpQ8ZYM0.es.js} +325 -564
  7. package/dist/chunks/{index-4FiyZ-0E.cjs → index-rF5HExWB.cjs} +322 -561
  8. package/dist/chunks/{jszip-VP334ufO.es.js → jszip-5vvIqAEE.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-BQQuazyp.cjs → super-editor.es-CcKbh84I.cjs} +25739 -28432
  10. package/dist/chunks/{super-editor.es-DKr759cY.es.js → super-editor.es-CxajnL9u.es.js} +25740 -28433
  11. package/dist/chunks/{vue-BuPTonTJ.es.js → vue-Dysv_7z5.es.js} +27 -27
  12. package/dist/chunks/xml-js-ClO_jHnq.es.js +2 -0
  13. package/dist/images/altText_add.svg +3 -0
  14. package/dist/images/altText_disclaimer.svg +3 -0
  15. package/dist/images/altText_done.svg +3 -0
  16. package/dist/images/altText_spinner.svg +30 -0
  17. package/dist/images/altText_warning.svg +3 -0
  18. package/dist/images/annotation-check.svg +11 -0
  19. package/dist/images/annotation-comment.svg +16 -0
  20. package/dist/images/annotation-help.svg +26 -0
  21. package/dist/images/annotation-insert.svg +10 -0
  22. package/dist/images/annotation-key.svg +11 -0
  23. package/dist/images/annotation-newparagraph.svg +11 -0
  24. package/dist/images/annotation-noicon.svg +7 -0
  25. package/dist/images/annotation-note.svg +42 -0
  26. package/dist/images/annotation-paperclip.svg +6 -0
  27. package/dist/images/annotation-paragraph.svg +16 -0
  28. package/dist/images/annotation-pushpin.svg +7 -0
  29. package/dist/images/cursor-editorFreeHighlight.svg +6 -0
  30. package/dist/images/cursor-editorFreeText.svg +3 -0
  31. package/dist/images/cursor-editorInk.svg +4 -0
  32. package/dist/images/cursor-editorTextHighlight.svg +8 -0
  33. package/dist/images/editor-toolbar-delete.svg +5 -0
  34. package/dist/images/loading-icon.gif +0 -0
  35. package/dist/images/messageBar_closingButton.svg +3 -0
  36. package/dist/images/messageBar_warning.svg +3 -0
  37. package/dist/images/toolbarButton-editorHighlight.svg +6 -0
  38. package/dist/images/toolbarButton-menuArrow.svg +3 -0
  39. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
  40. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  41. package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts +3 -3
  42. package/dist/packages/superdoc/src/core/collaboration/collaboration-comments.d.ts.map +1 -1
  43. package/dist/packages/superdoc/src/core/collaboration/helpers.d.ts.map +1 -1
  44. package/dist/packages/superdoc/src/core/types/index.d.ts +167 -4
  45. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  46. package/dist/style.css +92 -94
  47. package/dist/super-editor/ai-writer.es.js +3 -3
  48. package/dist/super-editor/chunks/{converter-BavE2jnW.js → converter-DN_dhslo.js} +1 -1
  49. package/dist/super-editor/chunks/{docx-zipper-CY4M19qa.js → docx-zipper-Bhl_yBjL.js} +1 -1
  50. package/dist/super-editor/chunks/{editor-Cslr04KI.js → editor-3klx7hyV.js} +25818 -27908
  51. package/dist/super-editor/chunks/{index-DdTDm9oI.js → index-BDVXUeCy.js} +1 -1
  52. package/dist/super-editor/chunks/{toolbar-Zdgn--Js.js → toolbar-8YA9ltNC.js} +598 -834
  53. package/dist/super-editor/converter.es.js +1 -1
  54. package/dist/super-editor/docx-zipper.es.js +2 -2
  55. package/dist/super-editor/editor.es.js +3 -3
  56. package/dist/super-editor/file-zipper.es.js +1 -1
  57. package/dist/super-editor/style.css +21 -22
  58. package/dist/super-editor/super-editor.es.js +19 -44
  59. package/dist/super-editor/toolbar.es.js +2 -2
  60. package/dist/super-editor.cjs +1 -1
  61. package/dist/super-editor.es.js +2 -2
  62. package/dist/superdoc.cjs +2 -2
  63. package/dist/superdoc.es.js +2 -2
  64. package/dist/superdoc.umd.js +26134 -29066
  65. package/dist/superdoc.umd.js.map +1 -1
  66. package/package.json +1 -1
  67. package/dist/chunks/xml-js-LkEmUa9-.es.js +0 -2
  68. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +0 -42
  69. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-BQQuazyp.cjs");
2
+ const superEditor_es = require("./super-editor.es-CcKbh84I.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -3327,17 +3327,17 @@ function setupAwarenessHandler(provider2, superdocInstance, user) {
3327
3327
  });
3328
3328
  });
3329
3329
  }
3330
- const addYComment = (yArray, ydoc, event, user) => {
3330
+ const addYComment = (yArray, ydoc, event) => {
3331
3331
  const { comment } = event;
3332
3332
  const yComment = new Y.Map(Object.entries(comment));
3333
3333
  ydoc.transact(
3334
3334
  () => {
3335
3335
  yArray.push([yComment]);
3336
3336
  },
3337
- { user }
3337
+ { user: superdoc.user }
3338
3338
  );
3339
3339
  };
3340
- const updateYComment = (yArray, ydoc, event, user) => {
3340
+ const updateYComment = (yArray, ydoc, event) => {
3341
3341
  const { comment } = event;
3342
3342
  const yComment = new Y.Map(Object.entries(comment));
3343
3343
  const commentIndex = getCommentIndex(yArray, comment);
@@ -3347,10 +3347,10 @@ const updateYComment = (yArray, ydoc, event, user) => {
3347
3347
  yArray.delete(commentIndex, 1);
3348
3348
  yArray.insert(commentIndex, [yComment]);
3349
3349
  },
3350
- { user }
3350
+ { user: superdoc.user }
3351
3351
  );
3352
3352
  };
3353
- const deleteYComment = (yArray, ydoc, event, user) => {
3353
+ const deleteYComment = (yArray, ydoc, event) => {
3354
3354
  const { comment } = event;
3355
3355
  const commentIndex = getCommentIndex(yArray, comment);
3356
3356
  if (commentIndex === -1) return;
@@ -3358,26 +3358,26 @@ const deleteYComment = (yArray, ydoc, event, user) => {
3358
3358
  () => {
3359
3359
  yArray.delete(commentIndex, 1);
3360
3360
  },
3361
- { user }
3361
+ { user: superdoc.user }
3362
3362
  );
3363
3363
  };
3364
3364
  const getCommentIndex = (yArray, comment) => {
3365
3365
  const baseArray = yArray.toJSON();
3366
3366
  return baseArray.findIndex((c2) => c2.commentId === comment.commentId);
3367
3367
  };
3368
- const initCollaborationComments = (superdoc) => {
3369
- if (!superdoc.config.modules.comments || !superdoc.provider) return;
3368
+ const initCollaborationComments = (superdoc2) => {
3369
+ if (!superdoc2.config.modules.comments || !superdoc2.provider) return;
3370
3370
  const onSuperDocYdocSynced = () => {
3371
- const parent = superdoc.commentsStore.commentsParentElement;
3372
- const ids = superdoc.commentsStore.editorCommentIds;
3373
- superdoc.commentsStore.handleEditorLocationsUpdate(parent, ids);
3374
- superdoc.commentsStore.hasSyncedCollaborationComments = true;
3375
- superdoc.provider.off("synced", onSuperDocYdocSynced);
3371
+ const parent = superdoc2.commentsStore.commentsParentElement;
3372
+ const ids = superdoc2.commentsStore.editorCommentIds;
3373
+ superdoc2.commentsStore.handleEditorLocationsUpdate(parent, ids);
3374
+ superdoc2.commentsStore.hasSyncedCollaborationComments = true;
3375
+ superdoc2.provider.off("synced", onSuperDocYdocSynced);
3376
3376
  };
3377
- superdoc.provider.on("synced", onSuperDocYdocSynced);
3378
- const commentsArray = superdoc.ydoc.getArray("comments");
3377
+ superdoc2.provider.on("synced", onSuperDocYdocSynced);
3378
+ const commentsArray = superdoc2.ydoc.getArray("comments");
3379
3379
  commentsArray.observe((event) => {
3380
- const currentUser = superdoc.config.user;
3380
+ const currentUser = superdoc2.config.user;
3381
3381
  const { user = {} } = event.transaction.origin;
3382
3382
  if (currentUser.name === user.name && currentUser.email === user.email) return;
3383
3383
  const comments = commentsArray.toJSON();
@@ -3389,60 +3389,59 @@ const initCollaborationComments = (superdoc) => {
3389
3389
  filtered.push(c2);
3390
3390
  }
3391
3391
  });
3392
- superdoc.commentsStore.commentsList = filtered.map((c2) => useComment(c2));
3392
+ superdoc2.commentsStore.commentsList = filtered.map((c2) => useComment(c2));
3393
3393
  });
3394
3394
  };
3395
- const initSuperdocYdoc = (superdoc) => {
3396
- const { isInternal } = superdoc.config;
3397
- const baseName = `${superdoc.config.superdocId}-superdoc`;
3398
- if (!superdoc.config.superdocId) return;
3395
+ const initSuperdocYdoc = (superdoc2) => {
3396
+ const { isInternal } = superdoc2.config;
3397
+ const baseName = `${superdoc2.config.superdocId}-superdoc`;
3398
+ if (!superdoc2.config.superdocId) return;
3399
3399
  const documentId = isInternal ? baseName : `${baseName}-external`;
3400
3400
  const superdocCollaborationOptions = {
3401
- config: superdoc.config.modules.collaboration,
3402
- user: superdoc.config.user,
3401
+ config: superdoc2.config.modules.collaboration,
3402
+ user: superdoc2.config.user,
3403
3403
  documentId,
3404
- socket: superdoc.config.socket,
3405
- superdocInstance: superdoc
3404
+ socket: superdoc2.config.socket,
3405
+ superdocInstance: superdoc2
3406
3406
  };
3407
3407
  const { provider: superdocProvider, ydoc: superdocYdoc } = createProvider(superdocCollaborationOptions);
3408
3408
  return { ydoc: superdocYdoc, provider: superdocProvider };
3409
3409
  };
3410
- const makeDocumentsCollaborative = (superdoc) => {
3410
+ const makeDocumentsCollaborative = (superdoc2) => {
3411
3411
  const processedDocuments = [];
3412
- superdoc.config.documents.forEach((doc) => {
3413
- superdoc.config.user.color = superdoc.colors[0];
3412
+ superdoc2.config.documents.forEach((doc) => {
3413
+ superdoc2.config.user.color = superdoc2.colors[0];
3414
3414
  const options = {
3415
- config: superdoc.config.modules.collaboration,
3416
- user: superdoc.config.user,
3415
+ config: superdoc2.config.modules.collaboration,
3416
+ user: superdoc2.config.user,
3417
3417
  documentId: doc.id,
3418
- socket: superdoc.config.socket,
3419
- superdocInstance: superdoc
3418
+ socket: superdoc2.config.socket,
3419
+ superdocInstance: superdoc2
3420
3420
  };
3421
3421
  const { provider: provider2, ydoc } = createProvider(options);
3422
3422
  doc.provider = provider2;
3423
- doc.socket = superdoc.config.socket;
3423
+ doc.socket = superdoc2.config.socket;
3424
3424
  doc.ydoc = ydoc;
3425
- doc.role = superdoc.config.role;
3425
+ doc.role = superdoc2.config.role;
3426
3426
  processedDocuments.push(doc);
3427
3427
  });
3428
3428
  return processedDocuments;
3429
3429
  };
3430
- const syncCommentsToClients = (superdoc, event) => {
3431
- if (!superdoc.isCollaborative || !superdoc.config.modules.comments) return;
3432
- const yArray = superdoc.ydoc.getArray("comments");
3433
- const user = superdoc.config.user;
3430
+ const syncCommentsToClients = (superdoc2, event) => {
3431
+ if (!superdoc2.isCollaborative || !superdoc2.config.modules.comments) return;
3432
+ const yArray = superdoc2.ydoc.getArray("comments");
3434
3433
  switch (event.type) {
3435
3434
  case "add":
3436
- addYComment(yArray, superdoc.ydoc, event, user);
3435
+ addYComment(yArray, superdoc2.ydoc, event);
3437
3436
  break;
3438
3437
  case "update":
3439
- updateYComment(yArray, superdoc.ydoc, event, user);
3438
+ updateYComment(yArray, superdoc2.ydoc, event);
3440
3439
  break;
3441
3440
  case "resolved":
3442
- updateYComment(yArray, superdoc.ydoc, event, user);
3441
+ updateYComment(yArray, superdoc2.ydoc, event);
3443
3442
  break;
3444
3443
  case "deleted":
3445
- deleteYComment(yArray, superdoc.ydoc, event, user);
3444
+ deleteYComment(yArray, superdoc2.ydoc, event);
3446
3445
  break;
3447
3446
  }
3448
3447
  };
@@ -3517,22 +3516,22 @@ function useComment(params2) {
3517
3516
  const resolvedTime = vue.ref(params2.resolvedTime || null);
3518
3517
  const resolvedByEmail = vue.ref(params2.resolvedByEmail || null);
3519
3518
  const resolvedByName = vue.ref(params2.resolvedByName || null);
3520
- const resolveComment = ({ email, name, superdoc }) => {
3519
+ const resolveComment = ({ email, name, superdoc: superdoc2 }) => {
3521
3520
  if (resolvedTime.value) return;
3522
3521
  resolvedTime.value = Date.now();
3523
3522
  resolvedByEmail.value = email;
3524
3523
  resolvedByName.value = name;
3525
3524
  if (trackedChange.value) {
3526
3525
  const emitData2 = { type: comments_module_events.RESOLVED, comment: getValues() };
3527
- propagateUpdate(superdoc, emitData2);
3528
- superdoc.activeEditor?.commands?.resolveComment({ commentId, importedId });
3526
+ propagateUpdate(superdoc2, emitData2);
3527
+ superdoc2.activeEditor?.commands?.resolveComment({ commentId, importedId });
3529
3528
  return;
3530
3529
  }
3531
3530
  const emitData = { type: comments_module_events.RESOLVED, comment: getValues() };
3532
- propagateUpdate(superdoc, emitData);
3533
- superdoc.activeEditor?.commands?.resolveComment({ commentId, importedId });
3531
+ propagateUpdate(superdoc2, emitData);
3532
+ superdoc2.activeEditor?.commands?.resolveComment({ commentId, importedId });
3534
3533
  };
3535
- const setIsInternal = ({ isInternal: newIsInternal, superdoc }) => {
3534
+ const setIsInternal = ({ isInternal: newIsInternal, superdoc: superdoc2 }) => {
3536
3535
  const previousValue = isInternal.value;
3537
3536
  if (previousValue === newIsInternal) return;
3538
3537
  isInternal.value = newIsInternal;
@@ -3541,16 +3540,16 @@ function useComment(params2) {
3541
3540
  changes: [{ key: "isInternal", value: newIsInternal, previousValue }],
3542
3541
  comment: getValues()
3543
3542
  };
3544
- propagateUpdate(superdoc, emitData);
3545
- const activeEditor = superdoc.activeEditor;
3543
+ propagateUpdate(superdoc2, emitData);
3544
+ const activeEditor = superdoc2.activeEditor;
3546
3545
  if (!activeEditor) return;
3547
3546
  activeEditor.commands.setCommentInternal({ commentId, importedId, isInternal: newIsInternal });
3548
3547
  };
3549
- const setActive = (superdoc) => {
3550
- const { activeEditor } = superdoc;
3548
+ const setActive = (superdoc2) => {
3549
+ const { activeEditor } = superdoc2;
3551
3550
  activeEditor?.commands.setActiveComment({ commentId, importedId });
3552
3551
  };
3553
- const setText = ({ text, superdoc, suppressUpdate }) => {
3552
+ const setText = ({ text, superdoc: superdoc2, suppressUpdate }) => {
3554
3553
  commentText.value = text;
3555
3554
  mentions.value = extractMentions(text);
3556
3555
  if (suppressUpdate) return;
@@ -3559,7 +3558,7 @@ function useComment(params2) {
3559
3558
  changes: [{ key: "text", value: text }],
3560
3559
  comment: getValues()
3561
3560
  };
3562
- propagateUpdate(superdoc, emitData);
3561
+ propagateUpdate(superdoc2, emitData);
3563
3562
  };
3564
3563
  const extractMentions = (htmlString) => {
3565
3564
  const parser = new DOMParser();
@@ -3596,9 +3595,9 @@ function useComment(params2) {
3596
3595
  const user = importedAuthor.value ? { name: importedAuthor.value.name || "(Imported)", email: importedAuthor.value.email } : { name: creatorName, email: creatorEmail, image: creatorImage };
3597
3596
  return user;
3598
3597
  };
3599
- const propagateUpdate = (superdoc, event) => {
3600
- superdoc.emit("comments-update", event);
3601
- syncCommentsToClients(superdoc, event);
3598
+ const propagateUpdate = (superdoc2, event) => {
3599
+ superdoc2.emit("comments-update", event);
3600
+ syncCommentsToClients(superdoc2, event);
3602
3601
  };
3603
3602
  const getValues = () => {
3604
3603
  return {
@@ -4023,21 +4022,21 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4023
4022
  if (id === void 0 || id === null) return null;
4024
4023
  return commentsList.value.find((c2) => c2.commentId == id || c2.importedId == id);
4025
4024
  };
4026
- const setActiveComment = (superdoc, id) => {
4025
+ const setActiveComment = (superdoc2, id) => {
4027
4026
  if (id === void 0 || id === null) {
4028
4027
  activeComment.value = null;
4029
- if (superdoc.activeEditor) {
4030
- superdoc.activeEditor.commands?.setActiveComment({ commentId: null });
4028
+ if (superdoc2.activeEditor) {
4029
+ superdoc2.activeEditor.commands?.setActiveComment({ commentId: null });
4031
4030
  }
4032
4031
  return;
4033
4032
  }
4034
4033
  const comment = getComment(id);
4035
4034
  if (comment) activeComment.value = comment.commentId;
4036
- if (superdoc.activeEditor) {
4037
- superdoc.activeEditor.commands?.setActiveComment({ commentId: activeComment.value });
4035
+ if (superdoc2.activeEditor) {
4036
+ superdoc2.activeEditor.commands?.setActiveComment({ commentId: activeComment.value });
4038
4037
  }
4039
4038
  };
4040
- const handleTrackedChangeUpdate = ({ superdoc, params: params2 }) => {
4039
+ const handleTrackedChangeUpdate = ({ superdoc: superdoc2, params: params2 }) => {
4041
4040
  const {
4042
4041
  event,
4043
4042
  changeId,
@@ -4070,7 +4069,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4070
4069
  }
4071
4070
  });
4072
4071
  if (event === "add") {
4073
- addComment({ superdoc, comment });
4072
+ addComment({ superdoc: superdoc2, comment });
4074
4073
  } else if (event === "update") {
4075
4074
  const existingTrackedChange = commentsList.value.find((comment2) => comment2.commentId === changeId);
4076
4075
  if (!existingTrackedChange) return;
@@ -4082,33 +4081,33 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4082
4081
  type: COMMENT_EVENTS.UPDATE,
4083
4082
  comment: existingTrackedChange.getValues()
4084
4083
  };
4085
- syncCommentsToClients(superdoc, emitData);
4086
- debounceEmit(changeId, emitData, superdoc);
4084
+ syncCommentsToClients(superdoc2, emitData);
4085
+ debounceEmit(changeId, emitData, superdoc2);
4087
4086
  }
4088
4087
  };
4089
- const debounceEmit = (commentId, event, superdoc, delay = 1e3) => {
4088
+ const debounceEmit = (commentId, event, superdoc2, delay = 1e3) => {
4090
4089
  if (debounceTimers[commentId]) {
4091
4090
  clearTimeout(debounceTimers[commentId]);
4092
4091
  }
4093
4092
  debounceTimers[commentId] = setTimeout(() => {
4094
- if (superdoc) {
4095
- superdoc.emit("comments-update", event);
4093
+ if (superdoc2) {
4094
+ superdoc2.emit("comments-update", event);
4096
4095
  }
4097
4096
  delete debounceTimers[commentId];
4098
4097
  }, delay);
4099
4098
  };
4100
- const showAddComment = (superdoc) => {
4099
+ const showAddComment = (superdoc2) => {
4101
4100
  const event = { type: COMMENT_EVENTS.PENDING };
4102
- superdoc.emit("comments-update", event);
4101
+ superdoc2.emit("comments-update", event);
4103
4102
  const selection = { ...superdocStore.activeSelection };
4104
4103
  selection.selectionBounds = { ...selection.selectionBounds };
4105
4104
  if (superdocStore.selectionPosition?.source) {
4106
4105
  superdocStore.selectionPosition.source = null;
4107
4106
  }
4108
4107
  pendingComment.value = getPendingComment({ selection, documentId: selection.documentId, parentCommentId: null });
4109
- if (!superdoc.config.isInternal) pendingComment.value.isInternal = false;
4110
- if (superdoc.activeEditor?.commands) {
4111
- superdoc.activeEditor.commands.insertComment({
4108
+ if (!superdoc2.config.isInternal) pendingComment.value.isInternal = false;
4109
+ if (superdoc2.activeEditor?.commands) {
4110
+ superdoc2.activeEditor.commands.insertComment({
4112
4111
  ...pendingComment.value.getValues(),
4113
4112
  commentId: "pending",
4114
4113
  skipEmit: true
@@ -4178,14 +4177,14 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4178
4177
  ...options
4179
4178
  });
4180
4179
  };
4181
- const removePendingComment = (superdoc) => {
4180
+ const removePendingComment = (superdoc2) => {
4182
4181
  currentCommentText.value = "";
4183
4182
  pendingComment.value = null;
4184
4183
  activeComment.value = null;
4185
4184
  superdocStore.selectionPosition = null;
4186
- superdoc.activeEditor?.commands.removeComment({ commentId: "pending" });
4185
+ superdoc2.activeEditor?.commands.removeComment({ commentId: "pending" });
4187
4186
  };
4188
- const addComment = ({ superdoc, comment, skipEditorUpdate = false }) => {
4187
+ const addComment = ({ superdoc: superdoc2, comment, skipEditorUpdate = false }) => {
4189
4188
  let parentComment = commentsList.value.find((c2) => c2.commentId === activeComment.value);
4190
4189
  if (!parentComment) parentComment = comment;
4191
4190
  const newComment = useComment(comment.getValues());
@@ -4196,22 +4195,22 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4196
4195
  const isParentInternal = parentComment.isInternal;
4197
4196
  newComment.isInternal = isParentInternal;
4198
4197
  }
4199
- if (!superdoc.config.isInternal) newComment.isInternal = false;
4198
+ if (!superdoc2.config.isInternal) newComment.isInternal = false;
4200
4199
  commentsList.value.push(newComment);
4201
- removePendingComment(superdoc);
4202
- if (!skipEditorUpdate && !comment.trackedChange && superdoc.activeEditor?.commands && !comment.parentCommentId) {
4203
- superdoc.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
4200
+ removePendingComment(superdoc2);
4201
+ if (!skipEditorUpdate && !comment.trackedChange && superdoc2.activeEditor?.commands && !comment.parentCommentId) {
4202
+ superdoc2.activeEditor.commands.insertComment({ ...newComment.getValues(), skipEmit: true });
4204
4203
  }
4205
4204
  const event = { type: COMMENT_EVENTS.ADD, comment: newComment.getValues() };
4206
- syncCommentsToClients(superdoc, event);
4207
- superdoc.emit("comments-update", event);
4205
+ syncCommentsToClients(superdoc2, event);
4206
+ superdoc2.emit("comments-update", event);
4208
4207
  };
4209
- const deleteComment = ({ commentId: commentIdToDelete, superdoc }) => {
4208
+ const deleteComment = ({ commentId: commentIdToDelete, superdoc: superdoc2 }) => {
4210
4209
  const commentIndex = commentsList.value.findIndex((c2) => c2.commentId === commentIdToDelete);
4211
4210
  const comment = commentsList.value[commentIndex];
4212
4211
  const { commentId, importedId } = comment;
4213
4212
  const { fileId } = comment;
4214
- superdoc.activeEditor?.commands?.removeComment({ commentId, importedId });
4213
+ superdoc2.activeEditor?.commands?.removeComment({ commentId, importedId });
4215
4214
  commentsList.value.splice(commentIndex, 1);
4216
4215
  const childCommentIds = commentsList.value.filter((c2) => c2.parentCommentId === commentId).map((c2) => c2.commentId || c2.importedId);
4217
4216
  commentsList.value = commentsList.value.filter((c2) => !childCommentIds.includes(c2.commentId));
@@ -4220,13 +4219,13 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4220
4219
  comment: comment.getValues(),
4221
4220
  changes: [{ key: "deleted", commentId, fileId }]
4222
4221
  };
4223
- superdoc.emit("comments-update", event);
4224
- syncCommentsToClients(superdoc, event);
4222
+ superdoc2.emit("comments-update", event);
4223
+ syncCommentsToClients(superdoc2, event);
4225
4224
  };
4226
- const cancelComment = (superdoc) => {
4227
- removePendingComment(superdoc);
4225
+ const cancelComment = (superdoc2) => {
4226
+ removePendingComment(superdoc2);
4228
4227
  };
4229
- const processLoadedDocxComments = async ({ superdoc, editor, comments, documentId }) => {
4228
+ const processLoadedDocxComments = async ({ superdoc: superdoc2, editor, comments, documentId }) => {
4230
4229
  const document2 = superdocStore.getDocument(documentId);
4231
4230
  comments.forEach((comment) => {
4232
4231
  const htmlContent = getHtmlFromComment(comment.textJson);
@@ -4258,7 +4257,7 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4258
4257
  trackedChangeType: comment.trackedChangeType,
4259
4258
  deletedText: comment.trackedDeletedText
4260
4259
  });
4261
- addComment({ superdoc, comment: newComment });
4260
+ addComment({ superdoc: superdoc2, comment: newComment });
4262
4261
  });
4263
4262
  setTimeout(() => {
4264
4263
  createCommentForTrackChanges(editor);
@@ -4426,62 +4425,6 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4426
4425
  handleTrackedChangeUpdate
4427
4426
  };
4428
4427
  });
4429
- 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>';
4430
- 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>';
4431
- 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>';
4432
- 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>';
4433
- 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>';
4434
- 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>';
4435
- 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>';
4436
- const superdocIcons = {
4437
- comment: commentIconSvg,
4438
- caretDown: caretDownIconSvg,
4439
- internal: userCheckIconSvg,
4440
- external: usersIconSvg,
4441
- markDone: checkIconSvg,
4442
- acceptChange: checkIconSvg,
4443
- rejectChange: xmarkIconSvg,
4444
- overflow: ellipsisVerticalSvg
4445
- };
4446
- const _export_sfc = (sfc, props) => {
4447
- const target = sfc.__vccOpts || sfc;
4448
- for (const [key, val] of props) {
4449
- target[key] = val;
4450
- }
4451
- return target;
4452
- };
4453
- const _hoisted_1$f = { class: "user-container" };
4454
- const _hoisted_2$9 = ["src"];
4455
- const _hoisted_3$7 = {
4456
- key: 1,
4457
- class: "user-bg"
4458
- };
4459
- const _sfc_main$g = {
4460
- __name: "Avatar",
4461
- props: {
4462
- user: {
4463
- type: Object,
4464
- required: true
4465
- }
4466
- },
4467
- setup(__props) {
4468
- const getInitials = (name, email) => {
4469
- if (!name && !email) return;
4470
- const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
4471
- return firstLetter;
4472
- };
4473
- return (_ctx, _cache) => {
4474
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
4475
- __props.user.image ? (vue.openBlock(), vue.createElementBlock("img", {
4476
- key: 0,
4477
- class: "user-bg",
4478
- src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
4479
- }, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
4480
- ]);
4481
- };
4482
- }
4483
- };
4484
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
4485
4428
  function plugin$1(options) {
4486
4429
  let _bPrefix = ".";
4487
4430
  let _ePrefix = "__";
@@ -8082,30 +8025,30 @@ const defaultClsPrefix = "n";
8082
8025
  function useConfig(props = {}, options = {
8083
8026
  defaultBordered: true
8084
8027
  }) {
8085
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
8028
+ const NConfigProvider = vue.inject(configProviderInjectionKey, null);
8086
8029
  return {
8087
8030
  // NConfigProvider,
8088
- inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
8089
- mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
8090
- mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
8091
- mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
8031
+ inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
8032
+ mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
8033
+ mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
8034
+ mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
8092
8035
  mergedBorderedRef: vue.computed(() => {
8093
8036
  var _a, _b;
8094
8037
  const {
8095
8038
  bordered
8096
8039
  } = props;
8097
8040
  if (bordered !== void 0) return bordered;
8098
- return (_b = (_a = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
8041
+ 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;
8099
8042
  }),
8100
- mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix),
8101
- namespaceRef: vue.computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
8043
+ mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix),
8044
+ namespaceRef: vue.computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
8102
8045
  };
8103
8046
  }
8104
8047
  function useThemeClass(componentName, hashRef, cssVarsRef, props) {
8105
8048
  if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
8106
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
8107
- const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
8108
- const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
8049
+ const NConfigProvider = vue.inject(configProviderInjectionKey, null);
8050
+ const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
8051
+ const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
8109
8052
  const themeClassRef = vue.ref("");
8110
8053
  const ssrAdapter2 = useSsrAdapter();
8111
8054
  let renderCallback;
@@ -9574,7 +9517,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
9574
9517
  }
9575
9518
  return componentRtlState;
9576
9519
  });
9577
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
9520
+ const NConfigProvider = vue.inject(configProviderInjectionKey, null);
9578
9521
  const mountStyle = () => {
9579
9522
  vue.watchEffect(() => {
9580
9523
  const {
@@ -9594,7 +9537,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
9594
9537
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
9595
9538
  },
9596
9539
  ssr: ssrAdapter2,
9597
- parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9540
+ parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9598
9541
  });
9599
9542
  });
9600
9543
  };
@@ -9653,7 +9596,7 @@ function useStyle(mountId, style2, clsPrefixRef) {
9653
9596
  return;
9654
9597
  }
9655
9598
  const ssrAdapter2 = useSsrAdapter();
9656
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
9599
+ const NConfigProvider = vue.inject(configProviderInjectionKey, null);
9657
9600
  const mountStyle = () => {
9658
9601
  const clsPrefix = clsPrefixRef.value;
9659
9602
  style2.mount({
@@ -9664,15 +9607,15 @@ function useStyle(mountId, style2, clsPrefixRef) {
9664
9607
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
9665
9608
  },
9666
9609
  ssr: ssrAdapter2,
9667
- parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9610
+ parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9668
9611
  });
9669
- if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
9612
+ if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
9670
9613
  globalStyle.mount({
9671
9614
  id: "n-global",
9672
9615
  head: true,
9673
9616
  anchorMetaName: cssrAnchorMetaName,
9674
9617
  ssr: ssrAdapter2,
9675
- parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9618
+ parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9676
9619
  });
9677
9620
  }
9678
9621
  };
@@ -9687,7 +9630,7 @@ function createTheme(theme) {
9687
9630
  }
9688
9631
  function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
9689
9632
  const ssrAdapter2 = useSsrAdapter();
9690
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
9633
+ const NConfigProvider = vue.inject(configProviderInjectionKey, null);
9691
9634
  if (style2) {
9692
9635
  const mountStyle = () => {
9693
9636
  const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
@@ -9699,15 +9642,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
9699
9642
  },
9700
9643
  anchorMetaName: cssrAnchorMetaName,
9701
9644
  ssr: ssrAdapter2,
9702
- parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9645
+ parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9703
9646
  });
9704
- if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
9647
+ if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
9705
9648
  globalStyle.mount({
9706
9649
  id: "n-global",
9707
9650
  head: true,
9708
9651
  anchorMetaName: cssrAnchorMetaName,
9709
9652
  ssr: ssrAdapter2,
9710
- parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9653
+ parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9711
9654
  });
9712
9655
  }
9713
9656
  };
@@ -9739,11 +9682,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
9739
9682
  self: globalSelf = void 0,
9740
9683
  peers: globalPeers = {}
9741
9684
  } = {}
9742
- } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
9685
+ } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
9743
9686
  const {
9744
9687
  common: globalCommonOverrides = void 0,
9745
9688
  [resolveId]: globalSelfOverrides = {}
9746
- } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
9689
+ } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
9747
9690
  const {
9748
9691
  common: globalSelfCommonOverrides,
9749
9692
  peers: globalPeersOverrides = {}
@@ -13586,209 +13529,6 @@ const NCheckbox = vue.defineComponent({
13586
13529
  }))), labelNode);
13587
13530
  }
13588
13531
  });
13589
- const configProviderProps = {
13590
- abstract: Boolean,
13591
- bordered: {
13592
- type: Boolean,
13593
- default: void 0
13594
- },
13595
- clsPrefix: String,
13596
- locale: Object,
13597
- dateLocale: Object,
13598
- namespace: String,
13599
- rtl: Array,
13600
- tag: {
13601
- type: String,
13602
- default: "div"
13603
- },
13604
- hljs: Object,
13605
- katex: Object,
13606
- theme: Object,
13607
- themeOverrides: Object,
13608
- componentOptions: Object,
13609
- icons: Object,
13610
- breakpoints: Object,
13611
- preflightStyleDisabled: Boolean,
13612
- styleMountTarget: Object,
13613
- inlineThemeDisabled: {
13614
- type: Boolean,
13615
- default: void 0
13616
- },
13617
- // deprecated
13618
- as: {
13619
- type: String,
13620
- validator: () => {
13621
- warn("config-provider", "`as` is deprecated, please use `tag` instead.");
13622
- return true;
13623
- },
13624
- default: void 0
13625
- }
13626
- };
13627
- const NConfigProvider = vue.defineComponent({
13628
- name: "ConfigProvider",
13629
- alias: ["App"],
13630
- props: configProviderProps,
13631
- setup(props) {
13632
- const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
13633
- const mergedThemeRef = vue.computed(() => {
13634
- const {
13635
- theme
13636
- } = props;
13637
- if (theme === null) return void 0;
13638
- const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
13639
- return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
13640
- });
13641
- const mergedThemeOverridesRef = vue.computed(() => {
13642
- const {
13643
- themeOverrides
13644
- } = props;
13645
- if (themeOverrides === null) return void 0;
13646
- if (themeOverrides === void 0) {
13647
- return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
13648
- } else {
13649
- const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
13650
- if (inheritedThemeOverrides === void 0) {
13651
- return themeOverrides;
13652
- } else {
13653
- return merge$1({}, inheritedThemeOverrides, themeOverrides);
13654
- }
13655
- }
13656
- });
13657
- const mergedNamespaceRef = useMemo(() => {
13658
- const {
13659
- namespace: namespace2
13660
- } = props;
13661
- return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
13662
- });
13663
- const mergedBorderedRef = useMemo(() => {
13664
- const {
13665
- bordered
13666
- } = props;
13667
- return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
13668
- });
13669
- const mergedIconsRef = vue.computed(() => {
13670
- const {
13671
- icons
13672
- } = props;
13673
- return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
13674
- });
13675
- const mergedComponentPropsRef = vue.computed(() => {
13676
- const {
13677
- componentOptions
13678
- } = props;
13679
- if (componentOptions !== void 0) return componentOptions;
13680
- return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
13681
- });
13682
- const mergedClsPrefixRef = vue.computed(() => {
13683
- const {
13684
- clsPrefix
13685
- } = props;
13686
- if (clsPrefix !== void 0) return clsPrefix;
13687
- if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
13688
- return defaultClsPrefix;
13689
- });
13690
- const mergedRtlRef = vue.computed(() => {
13691
- var _a;
13692
- const {
13693
- rtl
13694
- } = props;
13695
- if (rtl === void 0) {
13696
- return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
13697
- }
13698
- const rtlEnabledState = {};
13699
- for (const rtlInfo of rtl) {
13700
- rtlEnabledState[rtlInfo.name] = vue.markRaw(rtlInfo);
13701
- (_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
13702
- if (!(peerRtlInfo.name in rtlEnabledState)) {
13703
- rtlEnabledState[peerRtlInfo.name] = vue.markRaw(peerRtlInfo);
13704
- }
13705
- });
13706
- }
13707
- return rtlEnabledState;
13708
- });
13709
- const mergedBreakpointsRef = vue.computed(() => {
13710
- return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
13711
- });
13712
- const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
13713
- const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
13714
- const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
13715
- const mergedThemeHashRef = vue.computed(() => {
13716
- const {
13717
- value: theme
13718
- } = mergedThemeRef;
13719
- const {
13720
- value: mergedThemeOverrides
13721
- } = mergedThemeOverridesRef;
13722
- const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
13723
- const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
13724
- if (themeName) {
13725
- if (hasThemeOverrides) {
13726
- return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
13727
- }
13728
- return themeName;
13729
- } else {
13730
- if (hasThemeOverrides) {
13731
- return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
13732
- }
13733
- return "";
13734
- }
13735
- });
13736
- vue.provide(configProviderInjectionKey, {
13737
- mergedThemeHashRef,
13738
- mergedBreakpointsRef,
13739
- mergedRtlRef,
13740
- mergedIconsRef,
13741
- mergedComponentPropsRef,
13742
- mergedBorderedRef,
13743
- mergedNamespaceRef,
13744
- mergedClsPrefixRef,
13745
- mergedLocaleRef: vue.computed(() => {
13746
- const {
13747
- locale
13748
- } = props;
13749
- if (locale === null) return void 0;
13750
- return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
13751
- }),
13752
- mergedDateLocaleRef: vue.computed(() => {
13753
- const {
13754
- dateLocale
13755
- } = props;
13756
- if (dateLocale === null) return void 0;
13757
- return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
13758
- }),
13759
- mergedHljsRef: vue.computed(() => {
13760
- const {
13761
- hljs
13762
- } = props;
13763
- return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
13764
- }),
13765
- mergedKatexRef: vue.computed(() => {
13766
- const {
13767
- katex
13768
- } = props;
13769
- return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
13770
- }),
13771
- mergedThemeRef,
13772
- mergedThemeOverridesRef,
13773
- inlineThemeDisabled: inlineThemeDisabled || false,
13774
- preflightStyleDisabled: preflightStyleDisabled || false,
13775
- styleMountTarget
13776
- });
13777
- return {
13778
- mergedClsPrefix: mergedClsPrefixRef,
13779
- mergedBordered: mergedBorderedRef,
13780
- mergedNamespace: mergedNamespaceRef,
13781
- mergedTheme: mergedThemeRef,
13782
- mergedThemeOverrides: mergedThemeOverridesRef
13783
- };
13784
- },
13785
- render() {
13786
- var _a, _b, _c, _d;
13787
- return !this.abstract ? vue.h(this.as || this.tag, {
13788
- class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
13789
- }, (_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);
13790
- }
13791
- });
13792
13532
  const commonVariables$1 = {
13793
13533
  padding: "4px 0",
13794
13534
  optionIconSizeSmall: "14px",
@@ -15665,20 +15405,62 @@ const NMessageProvider = vue.defineComponent({
15665
15405
  }))) : null);
15666
15406
  }
15667
15407
  });
15668
- const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
15669
- function useUiFontFamily() {
15670
- const instance = vue.getCurrentInstance();
15671
- const uiFontFamily = vue.computed(() => {
15672
- const configured = instance?.proxy?.$superdoc?.config?.uiDisplayFallbackFont;
15673
- if (typeof configured === "string" && configured.trim()) {
15674
- return configured.trim();
15675
- }
15676
- return DEFAULT_UI_FONT_FAMILY;
15677
- });
15678
- return {
15679
- uiFontFamily
15680
- };
15681
- }
15408
+ 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>';
15409
+ 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>';
15410
+ 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>';
15411
+ 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>';
15412
+ 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>';
15413
+ 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>';
15414
+ 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>';
15415
+ const superdocIcons = {
15416
+ comment: commentIconSvg,
15417
+ caretDown: caretDownIconSvg,
15418
+ internal: userCheckIconSvg,
15419
+ external: usersIconSvg,
15420
+ markDone: checkIconSvg,
15421
+ acceptChange: checkIconSvg,
15422
+ rejectChange: xmarkIconSvg,
15423
+ overflow: ellipsisVerticalSvg
15424
+ };
15425
+ const _export_sfc = (sfc, props) => {
15426
+ const target = sfc.__vccOpts || sfc;
15427
+ for (const [key, val] of props) {
15428
+ target[key] = val;
15429
+ }
15430
+ return target;
15431
+ };
15432
+ const _hoisted_1$f = { class: "user-container" };
15433
+ const _hoisted_2$9 = ["src"];
15434
+ const _hoisted_3$7 = {
15435
+ key: 1,
15436
+ class: "user-bg"
15437
+ };
15438
+ const _sfc_main$g = {
15439
+ __name: "Avatar",
15440
+ props: {
15441
+ user: {
15442
+ type: Object,
15443
+ required: true
15444
+ }
15445
+ },
15446
+ setup(__props) {
15447
+ const getInitials = (name, email) => {
15448
+ if (!name && !email) return;
15449
+ const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
15450
+ return firstLetter;
15451
+ };
15452
+ return (_ctx, _cache) => {
15453
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
15454
+ __props.user.image ? (vue.openBlock(), vue.createElementBlock("img", {
15455
+ key: 0,
15456
+ class: "user-bg",
15457
+ src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
15458
+ }, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
15459
+ ]);
15460
+ };
15461
+ }
15462
+ };
15463
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
15682
15464
  const _hoisted_1$e = { class: "comment-option" };
15683
15465
  const _hoisted_2$8 = ["innerHTML"];
15684
15466
  const _hoisted_3$6 = { class: "option-state" };
@@ -15699,7 +15481,6 @@ const _sfc_main$f = {
15699
15481
  setup(__props, { emit: __emit }) {
15700
15482
  const emit = __emit;
15701
15483
  const props = __props;
15702
- const { uiFontFamily } = useUiFontFamily();
15703
15484
  const renderIcon = (icon) => {
15704
15485
  return () => {
15705
15486
  return vue.h("div", { innerHTML: icon, class: "internal-dropdown__item-icon" });
@@ -15761,8 +15542,7 @@ const _sfc_main$f = {
15761
15542
  trigger: "click",
15762
15543
  options,
15763
15544
  onSelect: _cache[0] || (_cache[0] = ($event) => handleSelect($event)),
15764
- disabled: __props.isDisabled,
15765
- "content-style": { fontFamily: vue.unref(uiFontFamily) }
15545
+ disabled: __props.isDisabled
15766
15546
  }, {
15767
15547
  default: vue.withCtx(() => [
15768
15548
  vue.createBaseVNode("div", _hoisted_1$e, [
@@ -15778,12 +15558,12 @@ const _sfc_main$f = {
15778
15558
  ])
15779
15559
  ]),
15780
15560
  _: 1
15781
- }, 8, ["disabled", "content-style"])
15561
+ }, 8, ["disabled"])
15782
15562
  ], 4);
15783
15563
  };
15784
15564
  }
15785
15565
  };
15786
- const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8b9e3b75"]]);
15566
+ const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a88dddd9"]]);
15787
15567
  function formatDate(timestamp) {
15788
15568
  const date = new Date(timestamp);
15789
15569
  const hours = date.getHours();
@@ -15929,7 +15709,6 @@ const _sfc_main$e = {
15929
15709
  const role = proxy.$superdoc.config.role;
15930
15710
  const isInternal = proxy.$superdoc.config.isInternal;
15931
15711
  const isOwnComment = props.comment.creatorEmail === proxy.$superdoc.config.user.email;
15932
- const { uiFontFamily } = useUiFontFamily();
15933
15712
  const OVERFLOW_OPTIONS = Object.freeze({
15934
15713
  edit: { label: "Edit", key: "edit" },
15935
15714
  delete: { label: "Delete", key: "delete" }
@@ -16033,8 +15812,7 @@ const _sfc_main$e = {
16033
15812
  key: 2,
16034
15813
  trigger: "click",
16035
15814
  options: getOverflowOptions.value,
16036
- onSelect: handleSelect,
16037
- "content-style": { fontFamily: vue.unref(uiFontFamily) }
15815
+ onSelect: handleSelect
16038
15816
  }, {
16039
15817
  default: vue.withCtx(() => [
16040
15818
  vue.createBaseVNode("div", {
@@ -16049,13 +15827,13 @@ const _sfc_main$e = {
16049
15827
  ])
16050
15828
  ]),
16051
15829
  _: 1
16052
- }, 8, ["options", "content-style"])) : vue.createCommentVNode("", true)
15830
+ }, 8, ["options"])) : vue.createCommentVNode("", true)
16053
15831
  ])
16054
15832
  ]);
16055
15833
  };
16056
15834
  }
16057
15835
  };
16058
- const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5e404f08"]]);
15836
+ const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-0f4f53ef"]]);
16059
15837
  const _hoisted_1$c = { class: "input-section" };
16060
15838
  const _sfc_main$d = {
16061
15839
  __name: "CommentInput",
@@ -16475,7 +16253,7 @@ const _sfc_main$c = {
16475
16253
  };
16476
16254
  }
16477
16255
  };
16478
- const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-abfa4e05"]]);
16256
+ const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-36e5f63e"]]);
16479
16257
  const _hoisted_1$a = { class: "comments-list" };
16480
16258
  const _hoisted_2$5 = { key: 0 };
16481
16259
  const _hoisted_3$3 = { class: "comment-item" };
@@ -16538,12 +16316,12 @@ class SuperComments extends eventemitter3.EventEmitter {
16538
16316
  element: null,
16539
16317
  commentsStore: null
16540
16318
  };
16541
- constructor(options, superdoc) {
16319
+ constructor(options, superdoc2) {
16542
16320
  super();
16543
16321
  this.config = { ...this.config, ...options };
16544
16322
  this.element = this.config.element;
16545
16323
  this.app = null;
16546
- this.superdoc = superdoc;
16324
+ this.superdoc = superdoc2;
16547
16325
  this.open();
16548
16326
  }
16549
16327
  createVueApp() {
@@ -16772,8 +16550,7 @@ const _sfc_main$9 = {
16772
16550
  measurementTimeoutId.value = null;
16773
16551
  }
16774
16552
  const totalComments = getFloatingComments.value.length;
16775
- const measuredComments = renderedSizes.value.length;
16776
- if (totalComments === 0 || measuredComments === 0) {
16553
+ if (totalComments === 0) {
16777
16554
  return;
16778
16555
  }
16779
16556
  vue.nextTick(processLocations);
@@ -16854,7 +16631,7 @@ const _sfc_main$9 = {
16854
16631
  };
16855
16632
  }
16856
16633
  };
16857
- const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-1402ce8c"]]);
16634
+ const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-6905dd07"]]);
16858
16635
  const _sfc_main$8 = {
16859
16636
  __name: "TextField",
16860
16637
  props: {
@@ -17077,7 +16854,7 @@ const _sfc_main$4 = {
17077
16854
  };
17078
16855
  }
17079
16856
  };
17080
- const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1e49d9b3"]]);
16857
+ const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b8cacb22"]]);
17081
16858
  const floor = (val, precision) => {
17082
16859
  const multiplier = 10 ** precision;
17083
16860
  return Math.floor(val * multiplier) / multiplier;
@@ -17482,7 +17259,7 @@ const _sfc_main = {
17482
17259
  __name: "SuperDoc",
17483
17260
  emits: ["selection-update"],
17484
17261
  setup(__props, { emit: __emit }) {
17485
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-B9LcTIm2.cjs")));
17262
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-B-xTd4XY.cjs")));
17486
17263
  const superdocStore = useSuperdocStore();
17487
17264
  const commentsStore = useCommentsStore();
17488
17265
  const {
@@ -17522,15 +17299,11 @@ const _sfc_main = {
17522
17299
  const { proxy } = vue.getCurrentInstance();
17523
17300
  commentsStore.proxy = proxy;
17524
17301
  const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
17525
- const { uiFontFamily } = useUiFontFamily();
17526
17302
  const commentsModuleConfig = vue.computed(() => {
17527
17303
  const config = modules.comments;
17528
17304
  if (config === false || config == null) return null;
17529
17305
  return config;
17530
17306
  });
17531
- const superdocStyleVars = vue.computed(() => ({
17532
- "--sd-ui-font-family": uiFontFamily.value
17533
- }));
17534
17307
  const layers = vue.ref(null);
17535
17308
  const commentsLayer = vue.ref(null);
17536
17309
  const toolsMenuPosition = vue.reactive({ top: null, right: "-25px", zIndex: 101 });
@@ -18047,164 +17820,155 @@ const _sfc_main = {
18047
17820
  });
18048
17821
  return (_ctx, _cache) => {
18049
17822
  const _directive_click_outside = vue.resolveDirective("click-outside");
18050
- return vue.openBlock(), vue.createBlock(vue.unref(NConfigProvider), {
18051
- abstract: "",
18052
- "preflight-style-disabled": ""
18053
- }, {
18054
- default: vue.withCtx(() => [
18055
- vue.createBaseVNode("div", {
18056
- class: vue.normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": vue.unref(isHighContrastMode2) }]),
18057
- style: vue.normalizeStyle(superdocStyleVars.value)
17823
+ return vue.openBlock(), vue.createElementBlock("div", {
17824
+ class: vue.normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": vue.unref(isHighContrastMode2) }])
17825
+ }, [
17826
+ vue.createBaseVNode("div", {
17827
+ class: "superdoc__layers layers",
17828
+ ref_key: "layers",
17829
+ ref: layers,
17830
+ role: "group"
17831
+ }, [
17832
+ showToolsFloatingMenu.value ? (vue.openBlock(), vue.createElementBlock("div", {
17833
+ key: 0,
17834
+ class: "superdoc__tools tools",
17835
+ style: vue.normalizeStyle(toolsMenuPosition)
18058
17836
  }, [
18059
17837
  vue.createBaseVNode("div", {
18060
- class: "superdoc__layers layers",
18061
- ref_key: "layers",
18062
- ref: layers,
18063
- role: "group"
17838
+ class: "tools-item",
17839
+ "data-id": "is-tool",
17840
+ onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
17841
+ }, [
17842
+ vue.createBaseVNode("div", {
17843
+ class: "superdoc__tools-icon",
17844
+ innerHTML: vue.unref(superdocIcons).comment
17845
+ }, null, 8, _hoisted_1)
17846
+ ], 32),
17847
+ vue.unref(proxy).$superdoc.config.modules.ai ? (vue.openBlock(), vue.createElementBlock("div", {
17848
+ key: 0,
17849
+ class: "tools-item",
17850
+ "data-id": "is-tool",
17851
+ onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
17852
+ }, [..._cache[3] || (_cache[3] = [
17853
+ vue.createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
17854
+ ])], 32)) : vue.createCommentVNode("", true)
17855
+ ], 4)) : vue.createCommentVNode("", true),
17856
+ vue.createBaseVNode("div", _hoisted_2, [
17857
+ isCommentsEnabled.value ? (vue.openBlock(), vue.createElementBlock("div", {
17858
+ key: 0,
17859
+ class: "superdoc__selection-layer selection-layer",
17860
+ onMousedown: handleSelectionStart,
17861
+ onMouseup: handleDragEnd,
17862
+ ref_key: "selectionLayer",
17863
+ ref: selectionLayer
18064
17864
  }, [
18065
- showToolsFloatingMenu.value ? (vue.openBlock(), vue.createElementBlock("div", {
17865
+ vue.unref(selectionPosition) && shouldShowSelection.value ? (vue.openBlock(), vue.createElementBlock("div", {
18066
17866
  key: 0,
18067
- class: "superdoc__tools tools",
18068
- style: vue.normalizeStyle(toolsMenuPosition)
17867
+ style: vue.normalizeStyle(getSelectionPosition.value),
17868
+ class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
17869
+ }, null, 4)) : vue.createCommentVNode("", true)
17870
+ ], 544)) : vue.createCommentVNode("", true),
17871
+ "hrbr-fields" in vue.unref(modules) && layers.value ? (vue.openBlock(), vue.createBlock(HrbrFieldsLayer, {
17872
+ key: 1,
17873
+ fields: vue.unref(modules)["hrbr-fields"],
17874
+ class: "superdoc__comments-layer comments-layer",
17875
+ style: { "z-index": "2" },
17876
+ ref_key: "hrbrFieldsLayer",
17877
+ ref: hrbrFieldsLayer
17878
+ }, null, 8, ["fields"])) : vue.createCommentVNode("", true),
17879
+ layers.value ? (vue.openBlock(), vue.createBlock(CommentsLayer, {
17880
+ key: 2,
17881
+ class: "superdoc__comments-layer comments-layer",
17882
+ style: { "z-index": "3" },
17883
+ ref_key: "commentsLayer",
17884
+ ref: commentsLayer,
17885
+ parent: layers.value,
17886
+ user: vue.unref(user),
17887
+ onHighlightClick: handleHighlightClick
17888
+ }, null, 8, ["parent", "user"])) : vue.createCommentVNode("", true),
17889
+ vue.unref(showAiLayer) ? (vue.openBlock(), vue.createBlock(AiLayer, {
17890
+ key: 3,
17891
+ class: "ai-layer",
17892
+ style: { "z-index": "4" },
17893
+ ref_key: "aiLayer",
17894
+ ref: aiLayer,
17895
+ editor: vue.unref(proxy).$superdoc.activeEditor
17896
+ }, null, 8, ["editor"])) : vue.createCommentVNode("", true),
17897
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(documents), (doc) => {
17898
+ return vue.openBlock(), vue.createElementBlock("div", {
17899
+ class: "superdoc__sub-document sub-document",
17900
+ key: doc.id
18069
17901
  }, [
18070
- vue.createBaseVNode("div", {
18071
- class: "tools-item",
18072
- "data-id": "is-tool",
18073
- onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
18074
- }, [
18075
- vue.createBaseVNode("div", {
18076
- class: "superdoc__tools-icon",
18077
- innerHTML: vue.unref(superdocIcons).comment
18078
- }, null, 8, _hoisted_1)
18079
- ], 32),
18080
- vue.unref(proxy).$superdoc.config.modules.ai ? (vue.openBlock(), vue.createElementBlock("div", {
18081
- key: 0,
18082
- class: "tools-item",
18083
- "data-id": "is-tool",
18084
- onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
18085
- }, [..._cache[3] || (_cache[3] = [
18086
- vue.createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
18087
- ])], 32)) : vue.createCommentVNode("", true)
18088
- ], 4)) : vue.createCommentVNode("", true),
18089
- vue.createBaseVNode("div", _hoisted_2, [
18090
- isCommentsEnabled.value ? (vue.openBlock(), vue.createElementBlock("div", {
17902
+ doc.type === vue.unref(PDF) ? (vue.openBlock(), vue.createBlock(vue.unref(PdfViewer), {
18091
17903
  key: 0,
18092
- class: "superdoc__selection-layer selection-layer",
18093
- onMousedown: handleSelectionStart,
18094
- onMouseup: handleDragEnd,
18095
- ref_key: "selectionLayer",
18096
- ref: selectionLayer
18097
- }, [
18098
- vue.unref(selectionPosition) && shouldShowSelection.value ? (vue.openBlock(), vue.createElementBlock("div", {
18099
- key: 0,
18100
- style: vue.normalizeStyle(getSelectionPosition.value),
18101
- class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
18102
- }, null, 4)) : vue.createCommentVNode("", true)
18103
- ], 544)) : vue.createCommentVNode("", true),
18104
- "hrbr-fields" in vue.unref(modules) && layers.value ? (vue.openBlock(), vue.createBlock(HrbrFieldsLayer, {
18105
- key: 1,
18106
- fields: vue.unref(modules)["hrbr-fields"],
18107
- class: "superdoc__comments-layer comments-layer",
18108
- style: { "z-index": "2" },
18109
- ref_key: "hrbrFieldsLayer",
18110
- ref: hrbrFieldsLayer
18111
- }, null, 8, ["fields"])) : vue.createCommentVNode("", true),
18112
- layers.value ? (vue.openBlock(), vue.createBlock(CommentsLayer, {
18113
- key: 2,
18114
- class: "superdoc__comments-layer comments-layer",
18115
- style: { "z-index": "3" },
18116
- ref_key: "commentsLayer",
18117
- ref: commentsLayer,
18118
- parent: layers.value,
18119
- user: vue.unref(user),
18120
- onHighlightClick: handleHighlightClick
18121
- }, null, 8, ["parent", "user"])) : vue.createCommentVNode("", true),
18122
- vue.unref(showAiLayer) ? (vue.openBlock(), vue.createBlock(AiLayer, {
18123
- key: 3,
18124
- class: "ai-layer",
18125
- style: { "z-index": "4" },
18126
- ref_key: "aiLayer",
18127
- ref: aiLayer,
18128
- editor: vue.unref(proxy).$superdoc.activeEditor
18129
- }, null, 8, ["editor"])) : vue.createCommentVNode("", true),
18130
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(documents), (doc) => {
18131
- return vue.openBlock(), vue.createElementBlock("div", {
18132
- class: "superdoc__sub-document sub-document",
18133
- key: doc.id
18134
- }, [
18135
- doc.type === vue.unref(PDF) ? (vue.openBlock(), vue.createBlock(vue.unref(PdfViewer), {
17904
+ "document-data": doc,
17905
+ config: vue.unref(pdfConfig),
17906
+ onSelectionChange: handleSelectionChange,
17907
+ onReady: handleDocumentReady,
17908
+ onPageLoaded: vue.unref(handlePageReady),
17909
+ onBypassSelection: handlePdfClick
17910
+ }, null, 8, ["document-data", "config", "onPageLoaded"])) : vue.createCommentVNode("", true),
17911
+ vue.createVNode(vue.unref(NMessageProvider), null, {
17912
+ default: vue.withCtx(() => [
17913
+ doc.type === vue.unref(DOCX) ? (vue.openBlock(), vue.createBlock(vue.unref(superEditor_es.SuperEditor), {
18136
17914
  key: 0,
18137
- "document-data": doc,
18138
- config: vue.unref(pdfConfig),
18139
- onSelectionChange: handleSelectionChange,
18140
- onReady: handleDocumentReady,
18141
- onPageLoaded: vue.unref(handlePageReady),
18142
- onBypassSelection: handlePdfClick
18143
- }, null, 8, ["document-data", "config", "onPageLoaded"])) : vue.createCommentVNode("", true),
18144
- vue.createVNode(vue.unref(NMessageProvider), null, {
18145
- default: vue.withCtx(() => [
18146
- doc.type === vue.unref(DOCX) ? (vue.openBlock(), vue.createBlock(vue.unref(superEditor_es.SuperEditor), {
18147
- key: 0,
18148
- "file-source": doc.data,
18149
- state: doc.state,
18150
- "document-id": doc.id,
18151
- options: { ...editorOptions(doc), rulers: doc.rulers },
18152
- onEditorReady,
18153
- onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
18154
- }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : vue.createCommentVNode("", true)
18155
- ]),
18156
- _: 2
18157
- }, 1024),
18158
- doc.type === vue.unref(HTML) ? (vue.openBlock(), vue.createBlock(HtmlViewer, {
18159
- key: 1,
18160
- onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
18161
- onSelectionChange: handleSelectionChange,
18162
17915
  "file-source": doc.data,
18163
- "document-id": doc.id
18164
- }, null, 8, ["file-source", "document-id"])) : vue.createCommentVNode("", true)
18165
- ]);
18166
- }), 128))
18167
- ])
18168
- ], 512),
18169
- showCommentsSidebar.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
18170
- vue.unref(pendingComment) ? vue.withDirectives((vue.openBlock(), vue.createBlock(CommentDialog, {
18171
- key: 0,
18172
- comment: vue.unref(pendingComment),
18173
- "auto-focus": true,
18174
- "is-floating": true
18175
- }, null, 8, ["comment"])), [
18176
- [_directive_click_outside, cancelPendingComment]
18177
- ]) : vue.createCommentVNode("", true),
18178
- vue.createBaseVNode("div", _hoisted_4, [
18179
- vue.unref(hasInitializedLocations) && vue.unref(getFloatingComments).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(documentsWithConverations), (doc) => {
18180
- return vue.openBlock(), vue.createBlock(FloatingComments, {
18181
- parent: layers.value,
18182
- "current-document": doc
18183
- }, null, 8, ["parent", "current-document"]);
18184
- }), 256)) : vue.createCommentVNode("", true)
18185
- ])
18186
- ])) : vue.createCommentVNode("", true),
18187
- vue.unref(showAiWriter) ? (vue.openBlock(), vue.createElementBlock("div", {
18188
- key: 1,
18189
- class: "ai-writer-container",
18190
- style: vue.normalizeStyle(vue.unref(aiWriterPosition))
18191
- }, [
18192
- vue.createVNode(vue.unref(superEditor_es.AIWriter), {
18193
- "selected-text": vue.unref(selectedText),
18194
- "handle-close": vue.unref(handleAiWriterClose),
18195
- editor: vue.unref(proxy).$superdoc.activeEditor,
18196
- "api-key": vue.unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
18197
- endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
18198
- }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
18199
- ], 4)) : vue.createCommentVNode("", true)
18200
- ], 6)
18201
- ]),
18202
- _: 1
18203
- });
17916
+ state: doc.state,
17917
+ "document-id": doc.id,
17918
+ options: { ...editorOptions(doc), rulers: doc.rulers },
17919
+ onEditorReady,
17920
+ onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
17921
+ }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : vue.createCommentVNode("", true)
17922
+ ]),
17923
+ _: 2
17924
+ }, 1024),
17925
+ doc.type === vue.unref(HTML) ? (vue.openBlock(), vue.createBlock(HtmlViewer, {
17926
+ key: 1,
17927
+ onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
17928
+ onSelectionChange: handleSelectionChange,
17929
+ "file-source": doc.data,
17930
+ "document-id": doc.id
17931
+ }, null, 8, ["file-source", "document-id"])) : vue.createCommentVNode("", true)
17932
+ ]);
17933
+ }), 128))
17934
+ ])
17935
+ ], 512),
17936
+ showCommentsSidebar.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
17937
+ vue.unref(pendingComment) ? vue.withDirectives((vue.openBlock(), vue.createBlock(CommentDialog, {
17938
+ key: 0,
17939
+ comment: vue.unref(pendingComment),
17940
+ "auto-focus": true,
17941
+ "is-floating": true
17942
+ }, null, 8, ["comment"])), [
17943
+ [_directive_click_outside, cancelPendingComment]
17944
+ ]) : vue.createCommentVNode("", true),
17945
+ vue.createBaseVNode("div", _hoisted_4, [
17946
+ vue.unref(hasInitializedLocations) && vue.unref(getFloatingComments).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(documentsWithConverations), (doc) => {
17947
+ return vue.openBlock(), vue.createBlock(FloatingComments, {
17948
+ parent: layers.value,
17949
+ "current-document": doc
17950
+ }, null, 8, ["parent", "current-document"]);
17951
+ }), 256)) : vue.createCommentVNode("", true)
17952
+ ])
17953
+ ])) : vue.createCommentVNode("", true),
17954
+ vue.unref(showAiWriter) ? (vue.openBlock(), vue.createElementBlock("div", {
17955
+ key: 1,
17956
+ class: "ai-writer-container",
17957
+ style: vue.normalizeStyle(vue.unref(aiWriterPosition))
17958
+ }, [
17959
+ vue.createVNode(vue.unref(superEditor_es.AIWriter), {
17960
+ "selected-text": vue.unref(selectedText),
17961
+ "handle-close": vue.unref(handleAiWriterClose),
17962
+ editor: vue.unref(proxy).$superdoc.activeEditor,
17963
+ "api-key": vue.unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
17964
+ endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
17965
+ }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
17966
+ ], 4)) : vue.createCommentVNode("", true)
17967
+ ], 2);
18204
17968
  };
18205
17969
  }
18206
17970
  };
18207
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-309688b3"]]);
17971
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e229774d"]]);
18208
17972
  const createSuperdocVueApp = () => {
18209
17973
  const app = vue.createApp(App);
18210
17974
  const pinia = createPinia();
@@ -18314,8 +18078,6 @@ class SuperDoc extends eventemitter3.EventEmitter {
18314
18078
  toolbarGroups: ["left", "center", "right"],
18315
18079
  toolbarIcons: {},
18316
18080
  toolbarTexts: {},
18317
- // UI font for SuperDoc surfaces (toolbar, comments UI, etc.)
18318
- uiDisplayFallbackFont: "Arial, Helvetica, sans-serif",
18319
18081
  isDev: false,
18320
18082
  // telemetry config
18321
18083
  telemetry: null,
@@ -18386,7 +18148,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18386
18148
  this.config.colors = shuffleArray(this.config.colors);
18387
18149
  this.userColorMap = /* @__PURE__ */ new Map();
18388
18150
  this.colorIndex = 0;
18389
- this.version = "1.0.0-next.10";
18151
+ this.version = "1.0.0-next.2";
18390
18152
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18391
18153
  this.superdocId = config.superdocId || uuid.v4();
18392
18154
  this.colors = this.config.colors;
@@ -18745,7 +18507,6 @@ class SuperDoc extends eventemitter3.EventEmitter {
18745
18507
  superdoc: this,
18746
18508
  aiApiKey: this.config.modules?.ai?.apiKey,
18747
18509
  aiEndpoint: this.config.modules?.ai?.endpoint,
18748
- uiDisplayFallbackFont: this.config.uiDisplayFallbackFont,
18749
18510
  ...moduleConfig,
18750
18511
  excludeItems
18751
18512
  // Override moduleConfig.excludeItems with our computed list