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.
- package/dist/chunks/{create-super-doc-ui-0OA8hCNb.cjs → create-super-doc-ui-BAGOnYGM.cjs} +2 -2
- package/dist/chunks/{create-super-doc-ui-Duf65d0b.es.js → create-super-doc-ui-BFt8agAI.es.js} +2 -2
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/metadata-types.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/tables/tables.d.ts +2 -1
- package/dist/document-api/src/types/table-operations.types.d.ts +1 -0
- package/dist/layout-engine/contracts/src/index.d.ts +1 -1
- package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +3 -1
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +699 -28
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +107 -22
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +689 -14
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +55 -20
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +24 -8
- package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +5 -3
- package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +60 -12
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +20 -6
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +1 -0
- package/dist/superdoc/src/components/general/Avatar.vue.d.ts +12 -5
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -1
- package/dist/superdoc.cjs +94 -59
- package/dist/superdoc.es.js +86 -52
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +23 -23
- package/package.json +2 -2
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
|
|
2
2
|
import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
3
|
-
import { C as getWorkflowRecording, S as createInteractionHistory, T as recordInteraction, _ as isAllowed, a as registerFirstPartyCommandMutation, b as DOM_CLASS_NAMES, c as getCommandDescriptor, d as mutationCommittedEventChangedDocument, f as createImageFilePicker, g as createTrackedChangePermissionResolver, h as PERMISSIONS, i as readFirstPartyPageNumbers, l as applyV2CommentInvalidationFromMutation, n as executeFirstPartyCommandAsync, o as isRecord, p as resolveImageSrc, r as executeFirstPartyShortcutAsync, t as createSuperDocUI, u as getV2TrackedChangeMutationImpact, v as isPlainObject$1, w as isWorkflowRecordingEnabled, x as closeInteractionHistory, y as isSyntheticTrackedChangeCommentLaneItem } from "./chunks/create-super-doc-ui-
|
|
3
|
+
import { C as getWorkflowRecording, S as createInteractionHistory, T as recordInteraction, _ as isAllowed, a as registerFirstPartyCommandMutation, b as DOM_CLASS_NAMES, c as getCommandDescriptor, d as mutationCommittedEventChangedDocument, f as createImageFilePicker, g as createTrackedChangePermissionResolver, h as PERMISSIONS, i as readFirstPartyPageNumbers, l as applyV2CommentInvalidationFromMutation, n as executeFirstPartyCommandAsync, o as isRecord, p as resolveImageSrc, r as executeFirstPartyShortcutAsync, t as createSuperDocUI, u as getV2TrackedChangeMutationImpact, v as isPlainObject$1, w as isWorkflowRecordingEnabled, x as closeInteractionHistory, y as isSyntheticTrackedChangeCommentLaneItem } from "./chunks/create-super-doc-ui-BFt8agAI.es.js";
|
|
4
4
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
5
5
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
6
6
|
import { $ as vModelSelect, A as onActivated, B as renderList, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toDisplayString, H as resolveDirective, I as provide$1, J as toRefs, K as toRaw$2, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelCheckbox, R as readonly, S as isReactive$1, T as mergeProps, U as resolveDynamicComponent, V as renderSlot, W as shallowRef$1, X as useAttrs, Y as unref, Z as useSlots, _ as getCurrentInstance, a as computed$1, at as withModifiers, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as vModelText, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withKeys, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withCtx, o as createApp, p as createVNode, q as toRef, r as Teleport, rt as withDirectives, s as createBlock, t as _plugin_vue_export_helper_default, tt as watch$1, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as ref } from "./chunks/_plugin-vue_export-helper-CsJQtMvr.es.js";
|
|
@@ -258,7 +258,7 @@ var v_click_outside_default = {
|
|
|
258
258
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
259
259
|
function getSuperdocVersion() {
|
|
260
260
|
try {
|
|
261
|
-
return "2.29.0-next.
|
|
261
|
+
return "2.29.0-next.2";
|
|
262
262
|
} catch {
|
|
263
263
|
return "unknown";
|
|
264
264
|
}
|
|
@@ -11092,7 +11092,7 @@ function useUiFontFamily() {
|
|
|
11092
11092
|
}) };
|
|
11093
11093
|
}
|
|
11094
11094
|
//#endregion
|
|
11095
|
-
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
11095
|
+
//#region src/components/CommentsLayer/CommentsDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
11096
11096
|
var _hoisted_1$31 = { class: "comments-dropdown" };
|
|
11097
11097
|
var _hoisted_2$24 = ["onClick"];
|
|
11098
11098
|
var _hoisted_3$21 = {
|
|
@@ -11101,7 +11101,9 @@ var _hoisted_3$21 = {
|
|
|
11101
11101
|
};
|
|
11102
11102
|
var _hoisted_4$15 = ["innerHTML"];
|
|
11103
11103
|
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
11104
|
-
|
|
11104
|
+
//#endregion
|
|
11105
|
+
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
11106
|
+
var CommentsDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
11105
11107
|
__name: "CommentsDropdown",
|
|
11106
11108
|
props: {
|
|
11107
11109
|
options: {
|
|
@@ -11250,14 +11252,16 @@ var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11250
11252
|
}), 128))], 4)) : createCommentVNode("", true)]))]);
|
|
11251
11253
|
};
|
|
11252
11254
|
}
|
|
11253
|
-
}, [["__scopeId", "data-v-
|
|
11255
|
+
}), [["__scopeId", "data-v-70674ffd"]]);
|
|
11254
11256
|
//#endregion
|
|
11255
|
-
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
11257
|
+
//#region src/components/CommentsLayer/InternalDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
11256
11258
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
11257
11259
|
var _hoisted_2$23 = ["innerHTML"];
|
|
11258
11260
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
11259
11261
|
var _hoisted_4$14 = ["innerHTML"];
|
|
11260
|
-
|
|
11262
|
+
//#endregion
|
|
11263
|
+
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
11264
|
+
var InternalDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
11261
11265
|
__name: "InternalDropdown",
|
|
11262
11266
|
props: {
|
|
11263
11267
|
state: {
|
|
@@ -11339,7 +11343,7 @@ var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11339
11343
|
}, 8, ["disabled", "content-style"])], 4);
|
|
11340
11344
|
};
|
|
11341
11345
|
}
|
|
11342
|
-
}, [["__scopeId", "data-v-
|
|
11346
|
+
}), [["__scopeId", "data-v-026f5d66"]]);
|
|
11343
11347
|
//#endregion
|
|
11344
11348
|
//#region src/components/CommentsLayer/helpers.js
|
|
11345
11349
|
/**
|
|
@@ -11372,14 +11376,16 @@ function formatDate(timestamp) {
|
|
|
11372
11376
|
return `${`${formattedHours}:${minutes.toString().padStart(2, "0")}${meridiem}`} ${month} ${day}`;
|
|
11373
11377
|
}
|
|
11374
11378
|
//#endregion
|
|
11375
|
-
//#region src/components/general/Avatar.vue
|
|
11379
|
+
//#region src/components/general/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
11376
11380
|
var _hoisted_1$29 = { class: "user-container" };
|
|
11377
11381
|
var _hoisted_2$22 = ["src"];
|
|
11378
11382
|
var _hoisted_3$19 = {
|
|
11379
11383
|
key: 1,
|
|
11380
11384
|
class: "user-bg"
|
|
11381
11385
|
};
|
|
11382
|
-
|
|
11386
|
+
//#endregion
|
|
11387
|
+
//#region src/components/general/Avatar.vue
|
|
11388
|
+
var Avatar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
11383
11389
|
__name: "Avatar",
|
|
11384
11390
|
props: { user: {
|
|
11385
11391
|
type: Object,
|
|
@@ -11403,9 +11409,9 @@ var Avatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11403
11409
|
}, null, 8, _hoisted_2$22)) : (openBlock(), createElementBlock("span", _hoisted_3$19, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))]);
|
|
11404
11410
|
};
|
|
11405
11411
|
}
|
|
11406
|
-
}, [["__scopeId", "data-v-
|
|
11412
|
+
}), [["__scopeId", "data-v-0b3a0868"]]);
|
|
11407
11413
|
//#endregion
|
|
11408
|
-
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
11414
|
+
//#region src/components/CommentsLayer/CommentHeader.vue?vue&type=script&setup=true&lang.ts
|
|
11409
11415
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
11410
11416
|
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
11411
11417
|
var _hoisted_3$18 = { class: "user-info" };
|
|
@@ -11435,7 +11441,9 @@ var _hoisted_9$4 = [
|
|
|
11435
11441
|
];
|
|
11436
11442
|
var _hoisted_10$4 = { class: "overflow-menu__icon" };
|
|
11437
11443
|
var _hoisted_11$4 = ["innerHTML"];
|
|
11438
|
-
|
|
11444
|
+
//#endregion
|
|
11445
|
+
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
11446
|
+
var CommentHeader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
11439
11447
|
__name: "CommentHeader",
|
|
11440
11448
|
props: {
|
|
11441
11449
|
timestamp: {
|
|
@@ -11448,7 +11456,7 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11448
11456
|
},
|
|
11449
11457
|
comment: {
|
|
11450
11458
|
type: Object,
|
|
11451
|
-
required:
|
|
11459
|
+
required: true
|
|
11452
11460
|
},
|
|
11453
11461
|
isPendingInput: {
|
|
11454
11462
|
type: Boolean,
|
|
@@ -11490,9 +11498,9 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11490
11498
|
const emit = __emit;
|
|
11491
11499
|
const commentsStore = useCommentsStore();
|
|
11492
11500
|
const props = __props;
|
|
11493
|
-
const { proxy } =
|
|
11494
|
-
const role =
|
|
11495
|
-
const isInternal =
|
|
11501
|
+
const { proxy, superdoc } = useSuperDocInstance();
|
|
11502
|
+
const role = superdoc.config.role;
|
|
11503
|
+
const isInternal = superdoc.config.isInternal;
|
|
11496
11504
|
const isCommentOwnedByCurrentUser = (comment) => {
|
|
11497
11505
|
const currentUser = proxy.$superdoc.config.user;
|
|
11498
11506
|
const otherUser = {
|
|
@@ -11715,9 +11723,9 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11715
11723
|
], 2)]);
|
|
11716
11724
|
};
|
|
11717
11725
|
}
|
|
11718
|
-
}, [["__scopeId", "data-v-
|
|
11726
|
+
}), [["__scopeId", "data-v-33950cc9"]]);
|
|
11719
11727
|
//#endregion
|
|
11720
|
-
//#region src/components/CommentsLayer/CommentInput.vue
|
|
11728
|
+
//#region src/components/CommentsLayer/CommentInput.vue?vue&type=script&setup=true&lang.ts
|
|
11721
11729
|
var _hoisted_1$27 = { class: "input-section" };
|
|
11722
11730
|
var _hoisted_2$20 = { class: "comment-composer" };
|
|
11723
11731
|
var _hoisted_3$17 = [
|
|
@@ -11737,7 +11745,9 @@ var _hoisted_6$7 = {
|
|
|
11737
11745
|
class: "comment-mention-option__email"
|
|
11738
11746
|
};
|
|
11739
11747
|
var commentInputSequence = 0;
|
|
11740
|
-
|
|
11748
|
+
//#endregion
|
|
11749
|
+
//#region src/components/CommentsLayer/CommentInput.vue
|
|
11750
|
+
var CommentInput_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
11741
11751
|
__name: "CommentInput",
|
|
11742
11752
|
props: {
|
|
11743
11753
|
users: {
|
|
@@ -11759,7 +11769,7 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11759
11769
|
},
|
|
11760
11770
|
comment: {
|
|
11761
11771
|
type: Object,
|
|
11762
|
-
required:
|
|
11772
|
+
required: true
|
|
11763
11773
|
}
|
|
11764
11774
|
},
|
|
11765
11775
|
emits: ["focus"],
|
|
@@ -11846,7 +11856,8 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11846
11856
|
};
|
|
11847
11857
|
const onInput = (event) => {
|
|
11848
11858
|
currentCommentMentions.value = currentCommentMentions.value.filter((user) => commentDraft.value.includes(`@${displayName(user)}`));
|
|
11849
|
-
|
|
11859
|
+
const caret = event.target instanceof HTMLTextAreaElement ? event.target.selectionStart : null;
|
|
11860
|
+
updateMentionQuery(caret ?? commentDraft.value.length);
|
|
11850
11861
|
syncInputHeight();
|
|
11851
11862
|
};
|
|
11852
11863
|
const selectMention = (user) => {
|
|
@@ -11935,7 +11946,7 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
11935
11946
|
}), 128))])) : createCommentVNode("", true)])], 2)]);
|
|
11936
11947
|
};
|
|
11937
11948
|
}
|
|
11938
|
-
}, [["__scopeId", "data-v-
|
|
11949
|
+
}), [["__scopeId", "data-v-65c31fdc"]]);
|
|
11939
11950
|
//#endregion
|
|
11940
11951
|
//#region src/internal/toolbar/built-in/url-safety.js
|
|
11941
11952
|
/**
|
|
@@ -13383,7 +13394,7 @@ var CommentDialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
13383
13394
|
}
|
|
13384
13395
|
}), [["__scopeId", "data-v-752d9e0b"]]);
|
|
13385
13396
|
//#endregion
|
|
13386
|
-
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
13397
|
+
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue?vue&type=script&setup=true&lang.ts
|
|
13387
13398
|
var _hoisted_1$25 = [
|
|
13388
13399
|
"tabindex",
|
|
13389
13400
|
"aria-posinset",
|
|
@@ -13395,7 +13406,9 @@ var _hoisted_1$25 = [
|
|
|
13395
13406
|
"data-comment-page-index",
|
|
13396
13407
|
"data-review-directory-index"
|
|
13397
13408
|
];
|
|
13398
|
-
|
|
13409
|
+
//#endregion
|
|
13410
|
+
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
13411
|
+
var ReviewDirectoryListItem_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13399
13412
|
__name: "ReviewDirectoryListItem",
|
|
13400
13413
|
props: {
|
|
13401
13414
|
item: {
|
|
@@ -13444,12 +13457,15 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13444
13457
|
});
|
|
13445
13458
|
const measure = () => {
|
|
13446
13459
|
const height = shell.value?.getBoundingClientRect?.().height;
|
|
13447
|
-
if (
|
|
13460
|
+
if (isFiniteNumber(height) && height > 0) measuredHeight.value = height;
|
|
13448
13461
|
};
|
|
13449
13462
|
const onFocusIn = () => {
|
|
13450
13463
|
containsFocus.value = true;
|
|
13451
13464
|
emit("focus-item", props.index);
|
|
13452
13465
|
};
|
|
13466
|
+
const onFocusOut = (event) => {
|
|
13467
|
+
containsFocus.value = event.relatedTarget instanceof Node && shell.value?.contains(event.relatedTarget) === true;
|
|
13468
|
+
};
|
|
13453
13469
|
const onKeydown = (event) => {
|
|
13454
13470
|
if (![
|
|
13455
13471
|
"ArrowDown",
|
|
@@ -13457,7 +13473,7 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13457
13473
|
"Home",
|
|
13458
13474
|
"End"
|
|
13459
13475
|
].includes(event.key)) return;
|
|
13460
|
-
if (event.target
|
|
13476
|
+
if (event.target instanceof Element && event.target.closest("input, textarea, select, button, [contenteditable=\"true\"]")) return;
|
|
13461
13477
|
event.preventDefault();
|
|
13462
13478
|
emit("navigate", {
|
|
13463
13479
|
index: props.index,
|
|
@@ -13465,6 +13481,8 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13465
13481
|
});
|
|
13466
13482
|
};
|
|
13467
13483
|
onMounted(() => {
|
|
13484
|
+
const element = shell.value;
|
|
13485
|
+
if (!element) return;
|
|
13468
13486
|
if (typeof IntersectionObserver !== "undefined") {
|
|
13469
13487
|
intersectionObserver = new IntersectionObserver((entries) => {
|
|
13470
13488
|
const entry = entries[0];
|
|
@@ -13475,11 +13493,11 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13475
13493
|
root: null,
|
|
13476
13494
|
rootMargin: "600px 0px"
|
|
13477
13495
|
});
|
|
13478
|
-
intersectionObserver.observe(
|
|
13496
|
+
intersectionObserver.observe(element);
|
|
13479
13497
|
}
|
|
13480
13498
|
if (typeof ResizeObserver !== "undefined") {
|
|
13481
13499
|
resizeObserver = new ResizeObserver(measure);
|
|
13482
|
-
resizeObserver.observe(
|
|
13500
|
+
resizeObserver.observe(element);
|
|
13483
13501
|
}
|
|
13484
13502
|
nextTick(measure);
|
|
13485
13503
|
});
|
|
@@ -13504,7 +13522,7 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13504
13522
|
"data-comment-page-index": Number.isFinite(__props.item.floatingPageIndex) ? __props.item.floatingPageIndex : "",
|
|
13505
13523
|
"data-review-directory-index": __props.index,
|
|
13506
13524
|
onFocusin: onFocusIn,
|
|
13507
|
-
onFocusout:
|
|
13525
|
+
onFocusout: onFocusOut,
|
|
13508
13526
|
onKeydown
|
|
13509
13527
|
}, [materialized.value ? (openBlock(), createBlock(CommentDialog_default, {
|
|
13510
13528
|
key: 0,
|
|
@@ -13525,14 +13543,16 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
13525
13543
|
])) : createCommentVNode("", true)], 44, _hoisted_1$25);
|
|
13526
13544
|
};
|
|
13527
13545
|
}
|
|
13528
|
-
}, [["__scopeId", "data-v-
|
|
13546
|
+
}), [["__scopeId", "data-v-db6ccae8"]]);
|
|
13529
13547
|
//#endregion
|
|
13530
|
-
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
13548
|
+
//#region src/components/CommentsLayer/commentsList/commentsList.vue?vue&type=script&setup=true&lang.ts
|
|
13531
13549
|
var _hoisted_1$24 = ["aria-busy"];
|
|
13532
13550
|
var _hoisted_2$18 = { key: 0 };
|
|
13533
13551
|
var _hoisted_3$15 = { key: 1 };
|
|
13534
13552
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
13535
|
-
|
|
13553
|
+
//#endregion
|
|
13554
|
+
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
13555
|
+
var commentsList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
13536
13556
|
__name: "commentsList",
|
|
13537
13557
|
props: {
|
|
13538
13558
|
showMainComments: {
|
|
@@ -13546,12 +13566,13 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13546
13566
|
},
|
|
13547
13567
|
setup(__props) {
|
|
13548
13568
|
const props = __props;
|
|
13549
|
-
const
|
|
13569
|
+
const piniaCommentsStore = useCommentsStore();
|
|
13570
|
+
const commentsStore = piniaCommentsStore;
|
|
13550
13571
|
const listRoot = ref(null);
|
|
13551
13572
|
const rovingIndex = ref(0);
|
|
13552
13573
|
const isCommentsListVisible = toRef(commentsStore, "isCommentsListVisible");
|
|
13553
13574
|
const floatingCommentInstances = computed$1(() => commentsStore.getFloatingCommentInstances);
|
|
13554
|
-
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(
|
|
13575
|
+
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(piniaCommentsStore);
|
|
13555
13576
|
const groupedComments = computed$1(() => isReviewDirectoryActive.value ? commentsStore.getGroupedReviewDirectory : commentsStore.getGroupedComments);
|
|
13556
13577
|
const reviewRows = computed$1(() => isReviewDirectoryActive.value ? reviewDirectoryList.value : commentsList.value);
|
|
13557
13578
|
const commentAliases = (comment) => [
|
|
@@ -13582,11 +13603,15 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13582
13603
|
}
|
|
13583
13604
|
return [parentComment];
|
|
13584
13605
|
};
|
|
13606
|
+
const getStoryType = (comment) => {
|
|
13607
|
+
const story = comment?.trackedChangeStory;
|
|
13608
|
+
return typeof story === "object" && story !== null ? story.storyType : void 0;
|
|
13609
|
+
};
|
|
13585
13610
|
const getRepeatedHeaderFooterInstances = (comment) => {
|
|
13586
13611
|
const matchingInstances = floatingCommentInstances.value.filter((instance) => instance?.comment?.commentId === comment?.commentId);
|
|
13587
13612
|
if (matchingInstances.length < 2) return [];
|
|
13588
13613
|
if (!comment?.trackedChange) return [];
|
|
13589
|
-
if (comment
|
|
13614
|
+
if (getStoryType(comment) !== REPEATED_HEADER_FOOTER_STORY_TYPE) return [];
|
|
13590
13615
|
return matchingInstances;
|
|
13591
13616
|
};
|
|
13592
13617
|
const isRepeatedInstanceActive = (instance) => {
|
|
@@ -13643,8 +13668,9 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13643
13668
|
rovingIndex.value = nextIndex;
|
|
13644
13669
|
await nextTick();
|
|
13645
13670
|
const target = listRoot.value?.querySelector?.(`[data-review-directory-index="${nextIndex}"]`);
|
|
13646
|
-
target
|
|
13647
|
-
target?.
|
|
13671
|
+
if (!(target instanceof HTMLElement)) return;
|
|
13672
|
+
target.scrollIntoView?.({ block: "nearest" });
|
|
13673
|
+
target.focus?.({ preventScroll: true });
|
|
13648
13674
|
};
|
|
13649
13675
|
onMounted(() => {
|
|
13650
13676
|
isCommentsListVisible.value = true;
|
|
@@ -13692,7 +13718,7 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13692
13718
|
}), 128))])) : createCommentVNode("", true)], 8, _hoisted_1$24);
|
|
13693
13719
|
};
|
|
13694
13720
|
}
|
|
13695
|
-
}, [["__scopeId", "data-v-
|
|
13721
|
+
}), [["__scopeId", "data-v-8eca48e1"]]);
|
|
13696
13722
|
//#endregion
|
|
13697
13723
|
//#region src/components/CommentsLayer/commentsList/super-comments-list.js
|
|
13698
13724
|
/**
|
|
@@ -15319,7 +15345,7 @@ var FloatingComments_default = /* @__PURE__ */ _plugin_vue_export_helper_default
|
|
|
15319
15345
|
}
|
|
15320
15346
|
}), [["__scopeId", "data-v-e74251e0"]]);
|
|
15321
15347
|
//#endregion
|
|
15322
|
-
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
15348
|
+
//#region src/components/CommentsLayer/PdfCommentsLayer.vue?vue&type=script&setup=true&lang.ts
|
|
15323
15349
|
var _hoisted_1$22 = {
|
|
15324
15350
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
15325
15351
|
"aria-hidden": "false"
|
|
@@ -15334,7 +15360,9 @@ var _hoisted_2$17 = [
|
|
|
15334
15360
|
var PDF_SELECTION_SOURCE = "pdf";
|
|
15335
15361
|
var INTERNAL_HIGHLIGHT_COLOR = "#078383";
|
|
15336
15362
|
var EXTERNAL_HIGHLIGHT_COLOR = "#B1124B";
|
|
15337
|
-
|
|
15363
|
+
//#endregion
|
|
15364
|
+
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
15365
|
+
var PdfCommentsLayer_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
15338
15366
|
__name: "PdfCommentsLayer",
|
|
15339
15367
|
emits: ["anchor-activate"],
|
|
15340
15368
|
setup(__props, { emit: __emit }) {
|
|
@@ -15353,11 +15381,12 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15353
15381
|
* on-document DOCX comment markers.
|
|
15354
15382
|
*/
|
|
15355
15383
|
const emit = __emit;
|
|
15356
|
-
const
|
|
15384
|
+
const piniaCommentsStore = useCommentsStore();
|
|
15385
|
+
const commentsStore = piniaCommentsStore;
|
|
15357
15386
|
const superdocStore = useSuperdocStore();
|
|
15358
|
-
const { activeComment } = storeToRefs(
|
|
15387
|
+
const { activeComment } = storeToRefs(piniaCommentsStore);
|
|
15359
15388
|
const { documents, activeZoom } = storeToRefs(superdocStore);
|
|
15360
|
-
const { proxy } =
|
|
15389
|
+
const { proxy } = useSuperDocInstance();
|
|
15361
15390
|
const isFiniteNumber = (value) => {
|
|
15362
15391
|
if (typeof value === "number") return Number.isFinite(value);
|
|
15363
15392
|
if (typeof value === "string" && value.trim() !== "") return Number.isFinite(Number(value));
|
|
@@ -15396,15 +15425,20 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15396
15425
|
const pdfCommentAnchors = computed$1(() => {
|
|
15397
15426
|
const parentComments = commentsStore.getFloatingComments;
|
|
15398
15427
|
if (!Array.isArray(parentComments)) return [];
|
|
15399
|
-
return parentComments.
|
|
15428
|
+
return parentComments.flatMap((comment) => {
|
|
15429
|
+
if (comment?.selection?.source !== PDF_SELECTION_SOURCE) return [];
|
|
15430
|
+
if (comment.resolvedTime) return [];
|
|
15400
15431
|
const commentId = getAnchorCommentId(comment);
|
|
15401
|
-
|
|
15402
|
-
|
|
15432
|
+
if (commentId === null) return [];
|
|
15433
|
+
const selectionBounds = comment.selection.selectionBounds;
|
|
15434
|
+
if (!hasFiniteBounds(selectionBounds)) return [];
|
|
15435
|
+
if (!belongsToOpenPdfDocument(comment)) return [];
|
|
15436
|
+
return [{
|
|
15403
15437
|
commentId,
|
|
15404
|
-
page: comment.selection
|
|
15438
|
+
page: comment.selection.page ?? null,
|
|
15405
15439
|
isInternal: comment.isInternal !== false,
|
|
15406
|
-
bounds
|
|
15407
|
-
};
|
|
15440
|
+
bounds: normalizeBounds(selectionBounds)
|
|
15441
|
+
}];
|
|
15408
15442
|
});
|
|
15409
15443
|
});
|
|
15410
15444
|
const getAnchorStyle = (anchor) => {
|
|
@@ -15442,7 +15476,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15442
15476
|
}), 128))]);
|
|
15443
15477
|
};
|
|
15444
15478
|
}
|
|
15445
|
-
}, [["__scopeId", "data-v-
|
|
15479
|
+
}), [["__scopeId", "data-v-86166837"]]);
|
|
15446
15480
|
//#endregion
|
|
15447
15481
|
//#region src/components/Whiteboard/use-whiteboard.js
|
|
15448
15482
|
var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
@@ -34048,7 +34082,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
34048
34082
|
}
|
|
34049
34083
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
34050
34084
|
this.colorIndex = 0;
|
|
34051
|
-
this.version = "2.29.0-next.
|
|
34085
|
+
this.version = "2.29.0-next.2";
|
|
34052
34086
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
34053
34087
|
this.superdocId = config.superdocId || v4();
|
|
34054
34088
|
this.colors = this.config.colors ?? [];
|