superdoc 2.29.0-next.1 → 2.29.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 (35) hide show
  1. package/dist/chunks/{create-super-doc-ui-0OA8hCNb.cjs → create-super-doc-ui-BAGOnYGM.cjs} +2 -2
  2. package/dist/chunks/{create-super-doc-ui-Duf65d0b.es.js → create-super-doc-ui-BFt8agAI.es.js} +2 -2
  3. package/dist/collaboration-upgrade-engine.cjs +1 -1
  4. package/dist/collaboration-upgrade-engine.es.js +1 -1
  5. package/dist/document-api/src/contract/metadata-types.d.ts +1 -1
  6. package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
  7. package/dist/document-api/src/tables/tables.d.ts +2 -1
  8. package/dist/document-api/src/types/table-operations.types.d.ts +1 -0
  9. package/dist/layout-engine/contracts/src/index.d.ts +1 -1
  10. package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +3 -1
  11. package/dist/public/ui-react.cjs +1 -1
  12. package/dist/public/ui-react.es.js +1 -1
  13. package/dist/public/ui-vue.cjs +1 -1
  14. package/dist/public/ui-vue.es.js +1 -1
  15. package/dist/public/ui.cjs +1 -1
  16. package/dist/public/ui.es.js +1 -1
  17. package/dist/style.css +1 -1
  18. package/dist/style.layered.css +1 -1
  19. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +699 -28
  20. package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +107 -22
  21. package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +689 -14
  22. package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +55 -20
  23. package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +24 -8
  24. package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +5 -3
  25. package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +60 -12
  26. package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +20 -6
  27. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +1 -0
  28. package/dist/superdoc/src/components/general/Avatar.vue.d.ts +12 -5
  29. package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -1
  30. package/dist/superdoc.cjs +94 -59
  31. package/dist/superdoc.es.js +86 -52
  32. package/dist-cdn/style.layered.css +1 -1
  33. package/dist-cdn/superdoc.min.css +1 -1
  34. package/dist-cdn/superdoc.min.js +23 -23
  35. package/package.json +2 -2
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
3
3
  const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
4
- const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-0OA8hCNb.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-BAGOnYGM.cjs");
5
5
  const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
6
6
  const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
7
7
  const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-6MBoygIY.cjs");
@@ -259,7 +259,7 @@ var v_click_outside_default = {
259
259
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
260
260
  function getSuperdocVersion() {
261
261
  try {
262
- return "2.29.0-next.1";
262
+ return "2.29.0-next.2";
263
263
  } catch {
264
264
  return "unknown";
265
265
  }
@@ -11093,7 +11093,7 @@ function useUiFontFamily() {
11093
11093
  }) };
11094
11094
  }
11095
11095
  //#endregion
11096
- //#region src/components/CommentsLayer/CommentsDropdown.vue
11096
+ //#region src/components/CommentsLayer/CommentsDropdown.vue?vue&type=script&setup=true&lang.ts
11097
11097
  var _hoisted_1$31 = { class: "comments-dropdown" };
11098
11098
  var _hoisted_2$24 = ["onClick"];
11099
11099
  var _hoisted_3$21 = {
@@ -11102,7 +11102,7 @@ var _hoisted_3$21 = {
11102
11102
  };
11103
11103
  var _hoisted_4$15 = ["innerHTML"];
11104
11104
  var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
11105
- var _sfc_main$25 = {
11105
+ var CommentsDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
11106
11106
  __name: "CommentsDropdown",
11107
11107
  props: {
11108
11108
  options: {
@@ -11251,15 +11251,17 @@ var _sfc_main$25 = {
11251
11251
  }), 128))], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true)]))]);
11252
11252
  };
11253
11253
  }
11254
- };
11255
- var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$25, [["__scopeId", "data-v-7eced80a"]]);
11254
+ });
11256
11255
  //#endregion
11257
- //#region src/components/CommentsLayer/InternalDropdown.vue
11256
+ //#region src/components/CommentsLayer/CommentsDropdown.vue
11257
+ var CommentsDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentsDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-70674ffd"]]);
11258
+ //#endregion
11259
+ //#region src/components/CommentsLayer/InternalDropdown.vue?vue&type=script&setup=true&lang.ts
11258
11260
  var _hoisted_1$30 = { class: "sd-comment-option" };
11259
11261
  var _hoisted_2$23 = ["innerHTML"];
11260
11262
  var _hoisted_3$20 = { class: "sd-option-state" };
11261
11263
  var _hoisted_4$14 = ["innerHTML"];
11262
- var _sfc_main$24 = {
11264
+ var InternalDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
11263
11265
  __name: "InternalDropdown",
11264
11266
  props: {
11265
11267
  state: {
@@ -11341,8 +11343,10 @@ var _sfc_main$24 = {
11341
11343
  }, 8, ["disabled", "content-style"])], 4);
11342
11344
  };
11343
11345
  }
11344
- };
11345
- var InternalDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$24, [["__scopeId", "data-v-138d641e"]]);
11346
+ });
11347
+ //#endregion
11348
+ //#region src/components/CommentsLayer/InternalDropdown.vue
11349
+ var InternalDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(InternalDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-026f5d66"]]);
11346
11350
  //#endregion
11347
11351
  //#region src/components/CommentsLayer/helpers.js
11348
11352
  /**
@@ -11375,14 +11379,14 @@ function formatDate(timestamp) {
11375
11379
  return `${`${formattedHours}:${minutes.toString().padStart(2, "0")}${meridiem}`} ${month} ${day}`;
11376
11380
  }
11377
11381
  //#endregion
11378
- //#region src/components/general/Avatar.vue
11382
+ //#region src/components/general/Avatar.vue?vue&type=script&setup=true&lang.ts
11379
11383
  var _hoisted_1$29 = { class: "user-container" };
11380
11384
  var _hoisted_2$22 = ["src"];
11381
11385
  var _hoisted_3$19 = {
11382
11386
  key: 1,
11383
11387
  class: "user-bg"
11384
11388
  };
11385
- var _sfc_main$23 = {
11389
+ var Avatar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
11386
11390
  __name: "Avatar",
11387
11391
  props: { user: {
11388
11392
  type: Object,
@@ -11406,10 +11410,12 @@ var _sfc_main$23 = {
11406
11410
  }, null, 8, _hoisted_2$22)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$19, require__plugin_vue_export_helper.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))]);
11407
11411
  };
11408
11412
  }
11409
- };
11410
- var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$23, [["__scopeId", "data-v-c95b2073"]]);
11413
+ });
11411
11414
  //#endregion
11412
- //#region src/components/CommentsLayer/CommentHeader.vue
11415
+ //#region src/components/general/Avatar.vue
11416
+ var Avatar_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(Avatar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0b3a0868"]]);
11417
+ //#endregion
11418
+ //#region src/components/CommentsLayer/CommentHeader.vue?vue&type=script&setup=true&lang.ts
11413
11419
  var _hoisted_1$28 = { class: "card-section comment-header" };
11414
11420
  var _hoisted_2$21 = { class: "comment-header-left" };
11415
11421
  var _hoisted_3$18 = { class: "user-info" };
@@ -11439,7 +11445,7 @@ var _hoisted_9$4 = [
11439
11445
  ];
11440
11446
  var _hoisted_10$4 = { class: "overflow-menu__icon" };
11441
11447
  var _hoisted_11$4 = ["innerHTML"];
11442
- var _sfc_main$22 = {
11448
+ var CommentHeader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
11443
11449
  __name: "CommentHeader",
11444
11450
  props: {
11445
11451
  timestamp: {
@@ -11452,7 +11458,7 @@ var _sfc_main$22 = {
11452
11458
  },
11453
11459
  comment: {
11454
11460
  type: Object,
11455
- required: false
11461
+ required: true
11456
11462
  },
11457
11463
  isPendingInput: {
11458
11464
  type: Boolean,
@@ -11494,9 +11500,9 @@ var _sfc_main$22 = {
11494
11500
  const emit = __emit;
11495
11501
  const commentsStore = useCommentsStore();
11496
11502
  const props = __props;
11497
- const { proxy } = require__plugin_vue_export_helper.getCurrentInstance();
11498
- const role = proxy.$superdoc.config.role;
11499
- const isInternal = proxy.$superdoc.config.isInternal;
11503
+ const { proxy, superdoc } = useSuperDocInstance();
11504
+ const role = superdoc.config.role;
11505
+ const isInternal = superdoc.config.isInternal;
11500
11506
  const isCommentOwnedByCurrentUser = (comment) => {
11501
11507
  const currentUser = proxy.$superdoc.config.user;
11502
11508
  const otherUser = {
@@ -11719,10 +11725,12 @@ var _sfc_main$22 = {
11719
11725
  ], 2)]);
11720
11726
  };
11721
11727
  }
11722
- };
11723
- var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$22, [["__scopeId", "data-v-3af1135b"]]);
11728
+ });
11724
11729
  //#endregion
11725
- //#region src/components/CommentsLayer/CommentInput.vue
11730
+ //#region src/components/CommentsLayer/CommentHeader.vue
11731
+ var CommentHeader_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentHeader_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-33950cc9"]]);
11732
+ //#endregion
11733
+ //#region src/components/CommentsLayer/CommentInput.vue?vue&type=script&setup=true&lang.ts
11726
11734
  var _hoisted_1$27 = { class: "input-section" };
11727
11735
  var _hoisted_2$20 = { class: "comment-composer" };
11728
11736
  var _hoisted_3$17 = [
@@ -11742,7 +11750,7 @@ var _hoisted_6$7 = {
11742
11750
  class: "comment-mention-option__email"
11743
11751
  };
11744
11752
  var commentInputSequence = 0;
11745
- var _sfc_main$21 = {
11753
+ var CommentInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
11746
11754
  __name: "CommentInput",
11747
11755
  props: {
11748
11756
  users: {
@@ -11764,7 +11772,7 @@ var _sfc_main$21 = {
11764
11772
  },
11765
11773
  comment: {
11766
11774
  type: Object,
11767
- required: false
11775
+ required: true
11768
11776
  }
11769
11777
  },
11770
11778
  emits: ["focus"],
@@ -11851,7 +11859,8 @@ var _sfc_main$21 = {
11851
11859
  };
11852
11860
  const onInput = (event) => {
11853
11861
  currentCommentMentions.value = currentCommentMentions.value.filter((user) => commentDraft.value.includes(`@${displayName(user)}`));
11854
- updateMentionQuery(event.target.selectionStart ?? commentDraft.value.length);
11862
+ const caret = event.target instanceof HTMLTextAreaElement ? event.target.selectionStart : null;
11863
+ updateMentionQuery(caret ?? commentDraft.value.length);
11855
11864
  syncInputHeight();
11856
11865
  };
11857
11866
  const selectMention = (user) => {
@@ -11940,8 +11949,10 @@ var _sfc_main$21 = {
11940
11949
  }), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 2)]);
11941
11950
  };
11942
11951
  }
11943
- };
11944
- var CommentInput_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$21, [["__scopeId", "data-v-0720a671"]]);
11952
+ });
11953
+ //#endregion
11954
+ //#region src/components/CommentsLayer/CommentInput.vue
11955
+ var CommentInput_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-65c31fdc"]]);
11945
11956
  //#endregion
11946
11957
  //#region src/internal/toolbar/built-in/url-safety.js
11947
11958
  /**
@@ -13390,7 +13401,7 @@ var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ re
13390
13401
  //#region src/components/CommentsLayer/CommentDialog.vue
13391
13402
  var CommentDialog_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentDialog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-752d9e0b"]]);
13392
13403
  //#endregion
13393
- //#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
13404
+ //#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue?vue&type=script&setup=true&lang.ts
13394
13405
  var _hoisted_1$25 = [
13395
13406
  "tabindex",
13396
13407
  "aria-posinset",
@@ -13402,7 +13413,7 @@ var _hoisted_1$25 = [
13402
13413
  "data-comment-page-index",
13403
13414
  "data-review-directory-index"
13404
13415
  ];
13405
- var _sfc_main$20 = {
13416
+ var ReviewDirectoryListItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
13406
13417
  __name: "ReviewDirectoryListItem",
13407
13418
  props: {
13408
13419
  item: {
@@ -13451,12 +13462,15 @@ var _sfc_main$20 = {
13451
13462
  });
13452
13463
  const measure = () => {
13453
13464
  const height = shell.value?.getBoundingClientRect?.().height;
13454
- if (Number.isFinite(height) && height > 0) measuredHeight.value = height;
13465
+ if (require_is_finite_number.isFiniteNumber(height) && height > 0) measuredHeight.value = height;
13455
13466
  };
13456
13467
  const onFocusIn = () => {
13457
13468
  containsFocus.value = true;
13458
13469
  emit("focus-item", props.index);
13459
13470
  };
13471
+ const onFocusOut = (event) => {
13472
+ containsFocus.value = event.relatedTarget instanceof Node && shell.value?.contains(event.relatedTarget) === true;
13473
+ };
13460
13474
  const onKeydown = (event) => {
13461
13475
  if (![
13462
13476
  "ArrowDown",
@@ -13464,7 +13478,7 @@ var _sfc_main$20 = {
13464
13478
  "Home",
13465
13479
  "End"
13466
13480
  ].includes(event.key)) return;
13467
- if (event.target?.closest?.("input, textarea, select, button, [contenteditable=\"true\"]")) return;
13481
+ if (event.target instanceof Element && event.target.closest("input, textarea, select, button, [contenteditable=\"true\"]")) return;
13468
13482
  event.preventDefault();
13469
13483
  emit("navigate", {
13470
13484
  index: props.index,
@@ -13472,6 +13486,8 @@ var _sfc_main$20 = {
13472
13486
  });
13473
13487
  };
13474
13488
  require__plugin_vue_export_helper.onMounted(() => {
13489
+ const element = shell.value;
13490
+ if (!element) return;
13475
13491
  if (typeof IntersectionObserver !== "undefined") {
13476
13492
  intersectionObserver = new IntersectionObserver((entries) => {
13477
13493
  const entry = entries[0];
@@ -13482,11 +13498,11 @@ var _sfc_main$20 = {
13482
13498
  root: null,
13483
13499
  rootMargin: "600px 0px"
13484
13500
  });
13485
- intersectionObserver.observe(shell.value);
13501
+ intersectionObserver.observe(element);
13486
13502
  }
13487
13503
  if (typeof ResizeObserver !== "undefined") {
13488
13504
  resizeObserver = new ResizeObserver(measure);
13489
- resizeObserver.observe(shell.value);
13505
+ resizeObserver.observe(element);
13490
13506
  }
13491
13507
  require__plugin_vue_export_helper.nextTick(measure);
13492
13508
  });
@@ -13511,7 +13527,7 @@ var _sfc_main$20 = {
13511
13527
  "data-comment-page-index": Number.isFinite(__props.item.floatingPageIndex) ? __props.item.floatingPageIndex : "",
13512
13528
  "data-review-directory-index": __props.index,
13513
13529
  onFocusin: onFocusIn,
13514
- onFocusout: _cache[0] || (_cache[0] = ($event) => containsFocus.value = shell.value?.contains?.($event.relatedTarget) === true),
13530
+ onFocusout: onFocusOut,
13515
13531
  onKeydown
13516
13532
  }, [materialized.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(CommentDialog_default, {
13517
13533
  key: 0,
@@ -13532,15 +13548,17 @@ var _sfc_main$20 = {
13532
13548
  ])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$25);
13533
13549
  };
13534
13550
  }
13535
- };
13536
- var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-29650a06"]]);
13551
+ });
13537
13552
  //#endregion
13538
- //#region src/components/CommentsLayer/commentsList/commentsList.vue
13553
+ //#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
13554
+ var ReviewDirectoryListItem_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ReviewDirectoryListItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-db6ccae8"]]);
13555
+ //#endregion
13556
+ //#region src/components/CommentsLayer/commentsList/commentsList.vue?vue&type=script&setup=true&lang.ts
13539
13557
  var _hoisted_1$24 = ["aria-busy"];
13540
13558
  var _hoisted_2$18 = { key: 0 };
13541
13559
  var _hoisted_3$15 = { key: 1 };
13542
13560
  var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
13543
- var _sfc_main$19 = {
13561
+ var commentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
13544
13562
  __name: "commentsList",
13545
13563
  props: {
13546
13564
  showMainComments: {
@@ -13554,12 +13572,13 @@ var _sfc_main$19 = {
13554
13572
  },
13555
13573
  setup(__props) {
13556
13574
  const props = __props;
13557
- const commentsStore = useCommentsStore();
13575
+ const piniaCommentsStore = useCommentsStore();
13576
+ const commentsStore = piniaCommentsStore;
13558
13577
  const listRoot = require__plugin_vue_export_helper.ref(null);
13559
13578
  const rovingIndex = require__plugin_vue_export_helper.ref(0);
13560
13579
  const isCommentsListVisible = require__plugin_vue_export_helper.toRef(commentsStore, "isCommentsListVisible");
13561
13580
  const floatingCommentInstances = require__plugin_vue_export_helper.computed(() => commentsStore.getFloatingCommentInstances);
13562
- const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(commentsStore);
13581
+ const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(piniaCommentsStore);
13563
13582
  const groupedComments = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? commentsStore.getGroupedReviewDirectory : commentsStore.getGroupedComments);
13564
13583
  const reviewRows = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? reviewDirectoryList.value : commentsList.value);
13565
13584
  const commentAliases = (comment) => [
@@ -13590,11 +13609,15 @@ var _sfc_main$19 = {
13590
13609
  }
13591
13610
  return [parentComment];
13592
13611
  };
13612
+ const getStoryType = (comment) => {
13613
+ const story = comment?.trackedChangeStory;
13614
+ return typeof story === "object" && story !== null ? story.storyType : void 0;
13615
+ };
13593
13616
  const getRepeatedHeaderFooterInstances = (comment) => {
13594
13617
  const matchingInstances = floatingCommentInstances.value.filter((instance) => instance?.comment?.commentId === comment?.commentId);
13595
13618
  if (matchingInstances.length < 2) return [];
13596
13619
  if (!comment?.trackedChange) return [];
13597
- if (comment?.trackedChangeStory?.storyType !== REPEATED_HEADER_FOOTER_STORY_TYPE) return [];
13620
+ if (getStoryType(comment) !== REPEATED_HEADER_FOOTER_STORY_TYPE) return [];
13598
13621
  return matchingInstances;
13599
13622
  };
13600
13623
  const isRepeatedInstanceActive = (instance) => {
@@ -13651,8 +13674,9 @@ var _sfc_main$19 = {
13651
13674
  rovingIndex.value = nextIndex;
13652
13675
  await require__plugin_vue_export_helper.nextTick();
13653
13676
  const target = listRoot.value?.querySelector?.(`[data-review-directory-index="${nextIndex}"]`);
13654
- target?.scrollIntoView?.({ block: "nearest" });
13655
- target?.focus?.({ preventScroll: true });
13677
+ if (!(target instanceof HTMLElement)) return;
13678
+ target.scrollIntoView?.({ block: "nearest" });
13679
+ target.focus?.({ preventScroll: true });
13656
13680
  };
13657
13681
  require__plugin_vue_export_helper.onMounted(() => {
13658
13682
  isCommentsListVisible.value = true;
@@ -13700,8 +13724,10 @@ var _sfc_main$19 = {
13700
13724
  }), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$24);
13701
13725
  };
13702
13726
  }
13703
- };
13704
- var commentsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$19, [["__scopeId", "data-v-89244745"]]);
13727
+ });
13728
+ //#endregion
13729
+ //#region src/components/CommentsLayer/commentsList/commentsList.vue
13730
+ var commentsList_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(commentsList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8eca48e1"]]);
13705
13731
  //#endregion
13706
13732
  //#region src/components/CommentsLayer/commentsList/super-comments-list.js
13707
13733
  /**
@@ -15329,7 +15355,7 @@ var FloatingComments_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
15329
15355
  //#region src/components/CommentsLayer/FloatingComments.vue
15330
15356
  var FloatingComments_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(FloatingComments_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e74251e0"]]);
15331
15357
  //#endregion
15332
- //#region src/components/CommentsLayer/PdfCommentsLayer.vue
15358
+ //#region src/components/CommentsLayer/PdfCommentsLayer.vue?vue&type=script&setup=true&lang.ts
15333
15359
  var _hoisted_1$22 = {
15334
15360
  class: "superdoc__pdf-comments-layer pdf-comments-layer",
15335
15361
  "aria-hidden": "false"
@@ -15344,7 +15370,7 @@ var _hoisted_2$17 = [
15344
15370
  var PDF_SELECTION_SOURCE = "pdf";
15345
15371
  var INTERNAL_HIGHLIGHT_COLOR = "#078383";
15346
15372
  var EXTERNAL_HIGHLIGHT_COLOR = "#B1124B";
15347
- var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default({
15373
+ var PdfCommentsLayer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
15348
15374
  __name: "PdfCommentsLayer",
15349
15375
  emits: ["anchor-activate"],
15350
15376
  setup(__props, { emit: __emit }) {
@@ -15363,11 +15389,12 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
15363
15389
  * on-document DOCX comment markers.
15364
15390
  */
15365
15391
  const emit = __emit;
15366
- const commentsStore = useCommentsStore();
15392
+ const piniaCommentsStore = useCommentsStore();
15393
+ const commentsStore = piniaCommentsStore;
15367
15394
  const superdocStore = useSuperdocStore();
15368
- const { activeComment } = storeToRefs(commentsStore);
15395
+ const { activeComment } = storeToRefs(piniaCommentsStore);
15369
15396
  const { documents, activeZoom } = storeToRefs(superdocStore);
15370
- const { proxy } = require__plugin_vue_export_helper.getCurrentInstance();
15397
+ const { proxy } = useSuperDocInstance();
15371
15398
  const isFiniteNumber = (value) => {
15372
15399
  if (typeof value === "number") return Number.isFinite(value);
15373
15400
  if (typeof value === "string" && value.trim() !== "") return Number.isFinite(Number(value));
@@ -15406,15 +15433,20 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
15406
15433
  const pdfCommentAnchors = require__plugin_vue_export_helper.computed(() => {
15407
15434
  const parentComments = commentsStore.getFloatingComments;
15408
15435
  if (!Array.isArray(parentComments)) return [];
15409
- return parentComments.filter((comment) => comment?.selection?.source === PDF_SELECTION_SOURCE).filter((comment) => !comment.resolvedTime).filter((comment) => getAnchorCommentId(comment) !== null).filter((comment) => hasFiniteBounds(comment.selection?.selectionBounds)).filter((comment) => belongsToOpenPdfDocument(comment)).map((comment) => {
15436
+ return parentComments.flatMap((comment) => {
15437
+ if (comment?.selection?.source !== PDF_SELECTION_SOURCE) return [];
15438
+ if (comment.resolvedTime) return [];
15410
15439
  const commentId = getAnchorCommentId(comment);
15411
- const bounds = normalizeBounds(comment.selection.selectionBounds);
15412
- return {
15440
+ if (commentId === null) return [];
15441
+ const selectionBounds = comment.selection.selectionBounds;
15442
+ if (!hasFiniteBounds(selectionBounds)) return [];
15443
+ if (!belongsToOpenPdfDocument(comment)) return [];
15444
+ return [{
15413
15445
  commentId,
15414
- page: comment.selection?.page ?? null,
15446
+ page: comment.selection.page ?? null,
15415
15447
  isInternal: comment.isInternal !== false,
15416
- bounds
15417
- };
15448
+ bounds: normalizeBounds(selectionBounds)
15449
+ }];
15418
15450
  });
15419
15451
  });
15420
15452
  const getAnchorStyle = (anchor) => {
@@ -15452,7 +15484,10 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
15452
15484
  }), 128))]);
15453
15485
  };
15454
15486
  }
15455
- }, [["__scopeId", "data-v-b5ad4c58"]]);
15487
+ });
15488
+ //#endregion
15489
+ //#region src/components/CommentsLayer/PdfCommentsLayer.vue
15490
+ var PdfCommentsLayer_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(PdfCommentsLayer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-86166837"]]);
15456
15491
  //#endregion
15457
15492
  //#region src/components/Whiteboard/use-whiteboard.js
15458
15493
  var useWhiteboard = ({ proxy, layers, documents, modules }) => {
@@ -45216,7 +45251,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45216
45251
  }
45217
45252
  this.userColorMap = /* @__PURE__ */ new Map();
45218
45253
  this.colorIndex = 0;
45219
- this.version = "2.29.0-next.1";
45254
+ this.version = "2.29.0-next.2";
45220
45255
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45221
45256
  this.superdocId = config.superdocId || require_uuid.v4();
45222
45257
  this.colors = this.config.colors ?? [];