superdoc 2.30.0-next.13 → 2.30.0-next.19
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-CvK1JdZv.cjs → create-super-doc-ui-D7uBUZfs.cjs} +9277 -9185
- package/dist/chunks/{create-super-doc-ui--o8TcYYv.es.js → create-super-doc-ui-_t6kMzLs.es.js} +9277 -9185
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -0
- 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/core/types/index.d.ts +1 -4
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +6 -0
- package/dist/superdoc/src/public/ui/content-controls-handle.d.ts +31 -0
- package/dist/superdoc/src/public/ui/heavy-read-gate.d.ts +41 -0
- package/dist/superdoc/src/public/ui/search-handle.d.ts +24 -0
- package/dist/superdoc/src/public/ui/styles-handle.d.ts +54 -0
- package/dist/superdoc/src/public/ui/types.d.ts +6 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +40 -1
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +3 -3
- package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +2 -1
- package/dist/superdoc.cjs +90 -55
- package/dist/superdoc.es.js +90 -55
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -38
- package/package.json +2 -2
package/dist/superdoc.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
|
|
2
2
|
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, ct as isThenable$1, 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, st as isPlainObject$1, 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-CmkaJDnr.es.js";
|
|
3
3
|
import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
4
|
-
import { C as createInteractionHistory, E as recordInteraction, S as closeInteractionHistory, T as isWorkflowRecordingEnabled, _ as isAllowed, a as registerFirstPartyCommandMutation, b as isRecord, c as applyV2CommentInvalidationFromMutation, d as createImageFilePicker, f as resolveImageSrc, g as createTrackedChangePermissionResolver, h as PERMISSIONS, i as readFirstPartyPageNumbers, l as getV2TrackedChangeMutationImpact, m as BUILT_IN_PERMISSION_METHOD, n as executeFirstPartyCommandAsync, r as executeFirstPartyShortcutAsync, s as getCommandDescriptor, t as createSuperDocUI, u as mutationCommittedEventChangedDocument, v as isSyntheticTrackedChangeCommentLaneItem, w as getWorkflowRecording, x as DOM_CLASS_NAMES, y as isStoryLocator } from "./chunks/create-super-doc-ui
|
|
4
|
+
import { C as createInteractionHistory, E as recordInteraction, S as closeInteractionHistory, T as isWorkflowRecordingEnabled, _ as isAllowed, a as registerFirstPartyCommandMutation, b as isRecord, c as applyV2CommentInvalidationFromMutation, d as createImageFilePicker, f as resolveImageSrc, g as createTrackedChangePermissionResolver, h as PERMISSIONS, i as readFirstPartyPageNumbers, l as getV2TrackedChangeMutationImpact, m as BUILT_IN_PERMISSION_METHOD, n as executeFirstPartyCommandAsync, r as executeFirstPartyShortcutAsync, s as getCommandDescriptor, t as createSuperDocUI, u as mutationCommittedEventChangedDocument, v as isSyntheticTrackedChangeCommentLaneItem, w as getWorkflowRecording, x as DOM_CLASS_NAMES, y as isStoryLocator } from "./chunks/create-super-doc-ui-_t6kMzLs.es.js";
|
|
5
5
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
6
6
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
7
7
|
import { a as init_dist$1, i as global, n as init_dist$2, o as Buffer, r as process$1, s as init_dist, t as require_jszip_min } from "./chunks/jszip-BzJ3CyxR.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.30.0-next.
|
|
261
|
+
return "2.30.0-next.19";
|
|
262
262
|
} catch {
|
|
263
263
|
return "unknown";
|
|
264
264
|
}
|
|
@@ -8069,6 +8069,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8069
8069
|
const isCommentsListVisible = ref(false);
|
|
8070
8070
|
const isReviewDirectoryActive = ref(false);
|
|
8071
8071
|
const isReviewDirectoryLoading = ref(false);
|
|
8072
|
+
const reviewAnalysisProgress = ref(null);
|
|
8072
8073
|
const editorCommentIds = ref([]);
|
|
8073
8074
|
const editorCommentPositions = ref({});
|
|
8074
8075
|
const isCommentHighlighted = ref(false);
|
|
@@ -10802,6 +10803,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10802
10803
|
isCommentsListVisible,
|
|
10803
10804
|
isReviewDirectoryActive,
|
|
10804
10805
|
isReviewDirectoryLoading,
|
|
10806
|
+
reviewAnalysisProgress,
|
|
10805
10807
|
generalCommentIds,
|
|
10806
10808
|
editorCommentIds,
|
|
10807
10809
|
commentsParentElement,
|
|
@@ -11029,7 +11031,7 @@ var _hoisted_3$21 = {
|
|
|
11029
11031
|
key: 0,
|
|
11030
11032
|
class: "comments-dropdown__option-icon"
|
|
11031
11033
|
};
|
|
11032
|
-
var _hoisted_4$
|
|
11034
|
+
var _hoisted_4$16 = ["innerHTML"];
|
|
11033
11035
|
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
11034
11036
|
//#endregion
|
|
11035
11037
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
@@ -11175,7 +11177,7 @@ var CommentsDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default
|
|
|
11175
11177
|
}, [hasIcon(option) ? (openBlock(), createElementBlock("span", _hoisted_3$21, [option.iconString ? (openBlock(), createElementBlock("span", {
|
|
11176
11178
|
key: 0,
|
|
11177
11179
|
innerHTML: option.iconString
|
|
11178
|
-
}, null, 8, _hoisted_4$
|
|
11180
|
+
}, null, 8, _hoisted_4$16)) : (openBlock(), createBlock(unref(OptionIcon), {
|
|
11179
11181
|
key: 1,
|
|
11180
11182
|
option
|
|
11181
11183
|
}, null, 8, ["option"]))])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$11, toDisplayString(option.label), 1)], 10, _hoisted_2$24);
|
|
@@ -11188,7 +11190,7 @@ var CommentsDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default
|
|
|
11188
11190
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
11189
11191
|
var _hoisted_2$23 = ["innerHTML"];
|
|
11190
11192
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
11191
|
-
var _hoisted_4$
|
|
11193
|
+
var _hoisted_4$15 = ["innerHTML"];
|
|
11192
11194
|
//#endregion
|
|
11193
11195
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
11194
11196
|
var InternalDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -11267,7 +11269,7 @@ var InternalDropdown_default = /* @__PURE__ */ _plugin_vue_export_helper_default
|
|
|
11267
11269
|
createElementVNode("div", {
|
|
11268
11270
|
class: "sd-dropdown-caret",
|
|
11269
11271
|
innerHTML: unref(superdocIcons).caretDown
|
|
11270
|
-
}, null, 8, _hoisted_4$
|
|
11272
|
+
}, null, 8, _hoisted_4$15)
|
|
11271
11273
|
])]),
|
|
11272
11274
|
_: 1
|
|
11273
11275
|
}, 8, ["disabled", "content-style"])], 4);
|
|
@@ -11342,7 +11344,7 @@ var Avatar_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
11342
11344
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
11343
11345
|
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
11344
11346
|
var _hoisted_3$18 = { class: "user-info" };
|
|
11345
|
-
var _hoisted_4$
|
|
11347
|
+
var _hoisted_4$14 = { class: "user-name" };
|
|
11346
11348
|
var _hoisted_5$10 = {
|
|
11347
11349
|
key: 0,
|
|
11348
11350
|
class: "imported-tag"
|
|
@@ -11605,7 +11607,7 @@ var CommentHeader_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
11605
11607
|
return openBlock(), createElementBlock("div", _hoisted_1$28, [createElementVNode("div", _hoisted_2$21, [createVNode(Avatar_default, {
|
|
11606
11608
|
user: getCurrentUser.value,
|
|
11607
11609
|
class: "avatar"
|
|
11608
|
-
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$18, [createElementVNode("div", _hoisted_4$
|
|
11610
|
+
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$18, [createElementVNode("div", _hoisted_4$14, [createTextVNode(toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (openBlock(), createElementBlock("span", _hoisted_5$10, "IMPORTED")) : createCommentVNode("", true)]), props.comment.createdTime ? (openBlock(), createElementBlock("div", _hoisted_6$8, toDisplayString(unref(formatDate)(props.comment.createdTime)), 1)) : createCommentVNode("", true)])]), createElementVNode("div", { class: normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
11609
11611
|
allowResolve.value ? (openBlock(), createElementBlock("div", {
|
|
11610
11612
|
key: 0,
|
|
11611
11613
|
class: normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -11660,7 +11662,7 @@ var _hoisted_3$17 = [
|
|
|
11660
11662
|
"aria-controls",
|
|
11661
11663
|
"aria-activedescendant"
|
|
11662
11664
|
];
|
|
11663
|
-
var _hoisted_4$
|
|
11665
|
+
var _hoisted_4$13 = [
|
|
11664
11666
|
"id",
|
|
11665
11667
|
"aria-selected",
|
|
11666
11668
|
"data-sd-comment-mention-option",
|
|
@@ -11869,7 +11871,7 @@ var CommentInput_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
11869
11871
|
"aria-selected": index === highlightedMentionIndex.value,
|
|
11870
11872
|
"data-sd-comment-mention-option": userKey(user),
|
|
11871
11873
|
onMousedown: withModifiers(($event) => selectMention(user), ["prevent"])
|
|
11872
|
-
}, [createElementVNode("span", _hoisted_5$9, toDisplayString(displayName(user)), 1), user.email ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(user.email), 1)) : createCommentVNode("", true)], 42, _hoisted_4$
|
|
11874
|
+
}, [createElementVNode("span", _hoisted_5$9, toDisplayString(displayName(user)), 1), user.email ? (openBlock(), createElementBlock("span", _hoisted_6$7, toDisplayString(user.email), 1)) : createCommentVNode("", true)], 42, _hoisted_4$13);
|
|
11873
11875
|
}), 128))])) : createCommentVNode("", true)])], 2)]);
|
|
11874
11876
|
};
|
|
11875
11877
|
}
|
|
@@ -11995,7 +11997,7 @@ var _hoisted_2$19 = {
|
|
|
11995
11997
|
class: "existing-internal-input"
|
|
11996
11998
|
};
|
|
11997
11999
|
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
11998
|
-
var _hoisted_4$
|
|
12000
|
+
var _hoisted_4$12 = {
|
|
11999
12001
|
key: 1,
|
|
12000
12002
|
class: "tracked-change-decision-alert",
|
|
12001
12003
|
role: "alert"
|
|
@@ -12996,14 +12998,15 @@ var CommentDialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
12996
12998
|
if (session?.owner === editSessionOwner) session.submission = submission;
|
|
12997
12999
|
const editorOwner = captureCommentEditorOwner();
|
|
12998
13000
|
const documentId = editorOwner.adapter.documentId;
|
|
12999
|
-
const
|
|
13001
|
+
const threadId = props.comment.commentId;
|
|
13002
|
+
const fileId = props.comment.fileId;
|
|
13000
13003
|
const draft = currentCommentText.value;
|
|
13001
13004
|
const outcome = await commentsStore.editCommentV2({
|
|
13002
13005
|
superdoc: proxy.$superdoc,
|
|
13003
13006
|
commentId: comment.commentId,
|
|
13004
13007
|
text: draft
|
|
13005
13008
|
});
|
|
13006
|
-
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || !editorOwner.isCurrent() || editorOwner.adapter.documentId !== documentId || props.comment !==
|
|
13009
|
+
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || !editorOwner.isCurrent() || editorOwner.adapter.documentId !== documentId || props.comment.commentId !== threadId || props.comment.fileId !== fileId || editingCommentId.value !== comment.commentId || currentCommentText.value !== draft) return outcome;
|
|
13007
13010
|
if (!outcome?.ok) {
|
|
13008
13011
|
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
13009
13012
|
return outcome;
|
|
@@ -13142,7 +13145,7 @@ var CommentDialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
13142
13145
|
"config",
|
|
13143
13146
|
"comment"
|
|
13144
13147
|
])]),
|
|
13145
|
-
commentSaveFailure.value ? (openBlock(), createElementBlock("p", _hoisted_4$
|
|
13148
|
+
commentSaveFailure.value ? (openBlock(), createElementBlock("p", _hoisted_4$12, toDisplayString(commentSaveFailure.value), 1)) : createCommentVNode("", true),
|
|
13146
13149
|
createElementVNode("div", _hoisted_5$8, [createElementVNode("button", {
|
|
13147
13150
|
class: "sd-button reply-btn-cancel",
|
|
13148
13151
|
onClick: withModifiers(handleCancel, ["stop", "prevent"])
|
|
@@ -13320,7 +13323,7 @@ var CommentDialog_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
13320
13323
|
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
13321
13324
|
};
|
|
13322
13325
|
}
|
|
13323
|
-
}), [["__scopeId", "data-v-
|
|
13326
|
+
}), [["__scopeId", "data-v-919d450b"]]);
|
|
13324
13327
|
//#endregion
|
|
13325
13328
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue?vue&type=script&setup=true&lang.ts
|
|
13326
13329
|
var _hoisted_1$25 = [
|
|
@@ -13475,8 +13478,14 @@ var ReviewDirectoryListItem_default = /* @__PURE__ */ _plugin_vue_export_helper_
|
|
|
13475
13478
|
//#endregion
|
|
13476
13479
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue?vue&type=script&setup=true&lang.ts
|
|
13477
13480
|
var _hoisted_1$24 = ["aria-busy"];
|
|
13478
|
-
var _hoisted_2$18 = {
|
|
13481
|
+
var _hoisted_2$18 = {
|
|
13482
|
+
key: 0,
|
|
13483
|
+
class: "review-analysis",
|
|
13484
|
+
role: "status",
|
|
13485
|
+
"data-testid": "review-analysis-progress"
|
|
13486
|
+
};
|
|
13479
13487
|
var _hoisted_3$15 = { key: 1 };
|
|
13488
|
+
var _hoisted_4$11 = { key: 2 };
|
|
13480
13489
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
13481
13490
|
//#endregion
|
|
13482
13491
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
@@ -13500,7 +13509,12 @@ var commentsList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
13500
13509
|
const rovingIndex = ref(0);
|
|
13501
13510
|
const isCommentsListVisible = toRef(commentsStore, "isCommentsListVisible");
|
|
13502
13511
|
const floatingCommentInstances = computed$1(() => commentsStore.getFloatingCommentInstances);
|
|
13503
|
-
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(piniaCommentsStore);
|
|
13512
|
+
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading, reviewAnalysisProgress } = storeToRefs(piniaCommentsStore);
|
|
13513
|
+
const reviewAnalysisLabel = computed$1(() => {
|
|
13514
|
+
const progress = reviewAnalysisProgress.value;
|
|
13515
|
+
if (!isReviewDirectoryActive.value || !isReviewDirectoryLoading.value || !progress) return null;
|
|
13516
|
+
return `Analysing changes… ${Math.min(progress.done, progress.total)} of ${progress.total}`;
|
|
13517
|
+
});
|
|
13504
13518
|
const groupedComments = computed$1(() => isReviewDirectoryActive.value ? commentsStore.getGroupedReviewDirectory : commentsStore.getGroupedComments);
|
|
13505
13519
|
const reviewRows = computed$1(() => isReviewDirectoryActive.value ? reviewDirectoryList.value : commentsList.value);
|
|
13506
13520
|
const commentAliases = (comment) => [
|
|
@@ -13613,42 +13627,50 @@ var commentsList_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/*
|
|
|
13613
13627
|
class: "comments-list",
|
|
13614
13628
|
role: "list",
|
|
13615
13629
|
"aria-busy": unref(isReviewDirectoryActive) && unref(isReviewDirectoryLoading) ? "true" : "false"
|
|
13616
|
-
}, [
|
|
13617
|
-
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13630
|
+
}, [
|
|
13631
|
+
reviewAnalysisLabel.value ? (openBlock(), createElementBlock("div", _hoisted_2$18, toDisplayString(reviewAnalysisLabel.value), 1)) : createCommentVNode("", true),
|
|
13632
|
+
__props.showMainComments ? (openBlock(), createElementBlock("div", _hoisted_3$15, [(openBlock(true), createElementBlock(Fragment, null, renderList(parentCommentDisplayItems.value, (item, index) => {
|
|
13633
|
+
return openBlock(), createBlock(ReviewDirectoryListItem_default, {
|
|
13634
|
+
key: item.id,
|
|
13635
|
+
item,
|
|
13636
|
+
index,
|
|
13637
|
+
total: totalDisplayItems.value,
|
|
13638
|
+
"tab-index": index === rovingIndex.value ? 0 : -1,
|
|
13639
|
+
onFocusItem: _cache[0] || (_cache[0] = ($event) => rovingIndex.value = $event),
|
|
13640
|
+
onNavigate: focusDirectoryItem
|
|
13641
|
+
}, null, 8, [
|
|
13642
|
+
"item",
|
|
13643
|
+
"index",
|
|
13644
|
+
"total",
|
|
13645
|
+
"tab-index"
|
|
13646
|
+
]);
|
|
13647
|
+
}), 128))])) : createCommentVNode("", true),
|
|
13648
|
+
shouldShowResolvedComments.value ? (openBlock(), createElementBlock("div", _hoisted_4$11, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "comment-title" }, "Resolved", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(resolvedCommentDisplayItems.value, (item, index) => {
|
|
13649
|
+
return openBlock(), createBlock(ReviewDirectoryListItem_default, {
|
|
13650
|
+
key: item.id,
|
|
13651
|
+
item,
|
|
13652
|
+
index: displayedMainCount.value + index,
|
|
13653
|
+
total: totalDisplayItems.value,
|
|
13654
|
+
"tab-index": displayedMainCount.value + index === rovingIndex.value ? 0 : -1,
|
|
13655
|
+
onFocusItem: _cache[1] || (_cache[1] = ($event) => rovingIndex.value = $event),
|
|
13656
|
+
onNavigate: focusDirectoryItem
|
|
13657
|
+
}, null, 8, [
|
|
13658
|
+
"item",
|
|
13659
|
+
"index",
|
|
13660
|
+
"total",
|
|
13661
|
+
"tab-index"
|
|
13662
|
+
]);
|
|
13663
|
+
}), 128))])) : createCommentVNode("", true)
|
|
13664
|
+
], 8, _hoisted_1$24);
|
|
13647
13665
|
};
|
|
13648
13666
|
}
|
|
13649
|
-
}), [["__scopeId", "data-v-
|
|
13667
|
+
}), [["__scopeId", "data-v-641eba1e"]]);
|
|
13650
13668
|
//#endregion
|
|
13651
13669
|
//#region src/components/CommentsLayer/commentsList/super-comments-list.ts
|
|
13670
|
+
var reviewAnalysisOf = (snapshot) => {
|
|
13671
|
+
const analysis = snapshot?.analysis;
|
|
13672
|
+
return analysis && typeof analysis.done === "number" && typeof analysis.total === "number" && analysis.total > 0 ? analysis : null;
|
|
13673
|
+
};
|
|
13652
13674
|
var isReviewDirectoryStore = (value) => isPlainObject$1(value) && typeof value.setReviewDirectoryFromV2 === "function" && typeof value.clearReviewDirectory === "function";
|
|
13653
13675
|
var readCommentsStore = (superdoc) => {
|
|
13654
13676
|
const store = superdoc?.["commentsStore"];
|
|
@@ -13706,9 +13728,16 @@ var SuperComments = class extends import_eventemitter3.default {
|
|
|
13706
13728
|
if (generation !== this.directoryGeneration) return;
|
|
13707
13729
|
if ((snapshot?.listStatus ?? snapshot?.status) !== "ready") {
|
|
13708
13730
|
const store = readCommentsStore(this.superdoc);
|
|
13709
|
-
if (store)
|
|
13731
|
+
if (store) {
|
|
13732
|
+
store.isReviewDirectoryLoading = true;
|
|
13733
|
+
if (family === "trackChanges") store.reviewAnalysisProgress = reviewAnalysisOf(snapshot);
|
|
13734
|
+
}
|
|
13710
13735
|
return;
|
|
13711
13736
|
}
|
|
13737
|
+
if (family === "trackChanges") {
|
|
13738
|
+
const store = readCommentsStore(this.superdoc);
|
|
13739
|
+
if (store) store.reviewAnalysisProgress = null;
|
|
13740
|
+
}
|
|
13712
13741
|
const items = Array.isArray(snapshot.items) ? snapshot.items : [];
|
|
13713
13742
|
if (this.directoryItemRefs[family] === items) {
|
|
13714
13743
|
const store = readCommentsStore(this.superdoc);
|
|
@@ -13767,6 +13796,7 @@ var SuperComments = class extends import_eventemitter3.default {
|
|
|
13767
13796
|
store.clearReviewDirectory();
|
|
13768
13797
|
store.isReviewDirectoryActive = false;
|
|
13769
13798
|
store.isReviewDirectoryLoading = false;
|
|
13799
|
+
store.reviewAnalysisProgress = null;
|
|
13770
13800
|
}
|
|
13771
13801
|
if (this.app) {
|
|
13772
13802
|
this.app.unmount();
|
|
@@ -16355,6 +16385,7 @@ function createReviewGeometryDelivery(deliver) {
|
|
|
16355
16385
|
payload.documentEpoch,
|
|
16356
16386
|
payload.paintEpoch,
|
|
16357
16387
|
payload.commitSequence,
|
|
16388
|
+
payload.generation,
|
|
16358
16389
|
payload.pageIndices,
|
|
16359
16390
|
payload.zoomScale,
|
|
16360
16391
|
payload.reviewGeometry
|
|
@@ -22287,6 +22318,9 @@ var SuperDoc_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
22287
22318
|
onCommentsUpdate: onEditorCommentsUpdate,
|
|
22288
22319
|
onFontsResolved: onFontsResolvedFn,
|
|
22289
22320
|
onPageCountKnown: proxy.$superdoc.config.onPageCountKnown ?? null,
|
|
22321
|
+
onReviewAnalysisProgress: (progress) => {
|
|
22322
|
+
v2ReviewWindowController.noteAnalysisProgress?.(progress);
|
|
22323
|
+
},
|
|
22290
22324
|
onReviewWindowCommitted: (payload) => {
|
|
22291
22325
|
v2ReviewWindowController.onCommittedPagePaint?.({
|
|
22292
22326
|
...payload,
|
|
@@ -23372,7 +23406,7 @@ var SuperDoc_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
23372
23406
|
ref_key: "rightSidebarRef",
|
|
23373
23407
|
ref: rightSidebarRef,
|
|
23374
23408
|
class: "superdoc__right-sidebar right-sidebar"
|
|
23375
|
-
}, [createElementVNode("div", _hoisted_4$9, [unref(hasInitializedLocations)
|
|
23409
|
+
}, [createElementVNode("div", _hoisted_4$9, [unref(hasInitializedLocations) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc) => {
|
|
23376
23410
|
return openBlock(), createBlock(FloatingComments_default, {
|
|
23377
23411
|
parent: layers.value,
|
|
23378
23412
|
"current-document": doc
|
|
@@ -23390,7 +23424,7 @@ var SuperDoc_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__P
|
|
|
23390
23424
|
], 46, _hoisted_1$17);
|
|
23391
23425
|
};
|
|
23392
23426
|
}
|
|
23393
|
-
}), [["__scopeId", "data-v-
|
|
23427
|
+
}), [["__scopeId", "data-v-9bae9abb"]]);
|
|
23394
23428
|
//#endregion
|
|
23395
23429
|
//#region src/core/create-app.ts
|
|
23396
23430
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -33525,7 +33559,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
33525
33559
|
}
|
|
33526
33560
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
33527
33561
|
this.colorIndex = 0;
|
|
33528
|
-
this.version = "2.30.0-next.
|
|
33562
|
+
this.version = "2.30.0-next.19";
|
|
33529
33563
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
33530
33564
|
this.superdocId = config.superdocId || v4();
|
|
33531
33565
|
this.colors = this.config.colors ?? [];
|
|
@@ -34427,9 +34461,10 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
34427
34461
|
const results = await Promise.allSettled(runtimes.map((runtime) => runtime.setUser?.(runtimeUserOf(next))));
|
|
34428
34462
|
const failure = results.find((result) => result.status === "rejected");
|
|
34429
34463
|
if (failure) {
|
|
34430
|
-
if (current) await Promise.allSettled(runtimes.filter((_, index) => results[index].status === "fulfilled").map((runtime) => runtime.setUser?.(runtimeUserOf(current))));
|
|
34464
|
+
if (current && !this.#destroyed) await Promise.allSettled(runtimes.filter((_, index) => results[index].status === "fulfilled").map((runtime) => runtime.setUser?.(runtimeUserOf(current))));
|
|
34431
34465
|
throw failure.reason;
|
|
34432
34466
|
}
|
|
34467
|
+
if (this.#destroyed) return;
|
|
34433
34468
|
const target = this.config.user ?? (this.config.user = {});
|
|
34434
34469
|
for (const key of Object.keys(target)) delete target[key];
|
|
34435
34470
|
Object.assign(target, next);
|
|
@@ -35601,7 +35636,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
35601
35636
|
const result = await activeEditor.replaceFile(replacementSource);
|
|
35602
35637
|
const state = result && typeof result === "object" ? result.state : null;
|
|
35603
35638
|
const confirmed = state === null || state === "review-ready" || state === "editing-ready";
|
|
35604
|
-
if (confirmed) {
|
|
35639
|
+
if (confirmed && !this.#destroyed) {
|
|
35605
35640
|
this.#replaceActiveDocumentData(activeEditor, replacementSource);
|
|
35606
35641
|
this.emit("document-replaced", {
|
|
35607
35642
|
editor: activeEditor,
|