superdoc 2.25.0-next.1 → 2.25.0-next.11
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/{FindReplaceSurface-BUw19rV8.cjs → FindReplaceSurface-8V8AjgR4.cjs} +1 -1
- package/dist/chunks/{FindReplaceSurface-B5dzB2sG.es.js → FindReplaceSurface-RUiTFDt3.es.js} +1 -1
- package/dist/chunks/{PasswordPromptSurface-DaIztq50.cjs → PasswordPromptSurface-B5DHV6qr.cjs} +1 -1
- package/dist/chunks/{PasswordPromptSurface-Ciu8aSmK.es.js → PasswordPromptSurface-BDpxqdzp.es.js} +1 -1
- package/dist/chunks/{PdfViewer-B8y_9or_.es.js → PdfViewer-DjdsIh6n.es.js} +1 -1
- package/dist/chunks/{PdfViewer-DRzLH3eS.cjs → PdfViewer-omriDChK.cjs} +1 -1
- package/dist/chunks/{_plugin-vue_export-helper-DHiJKCsy.es.js → _plugin-vue_export-helper-7ZiLY07t.es.js} +4 -1
- package/dist/chunks/{_plugin-vue_export-helper-CYxINHh_.cjs → _plugin-vue_export-helper-BUdjGKyl.cjs} +9 -0
- package/dist/chunks/{create-super-doc-ui-bTFGKVRb.cjs → create-super-doc-ui-ABeUNZlq.cjs} +105 -8
- package/dist/chunks/{create-super-doc-ui-8UTu16Lw.es.js → create-super-doc-ui-CCNvH6mr.es.js} +105 -8
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/comments/comments.d.ts +2 -1
- package/dist/document-api/src/comments/comments.types.d.ts +2 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +4 -2
- package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +9 -2
- package/dist/document-api/src/images/images.types.d.ts +3 -3
- package/dist/document-api/src/index.d.ts +1 -0
- package/dist/document-api/src/lists/lists.types.d.ts +11 -11
- package/dist/document-api/src/permission-ranges/permission-ranges.d.ts +9 -1
- package/dist/document-api/src/permission-ranges/permission-ranges.types.d.ts +17 -0
- package/dist/document-api/src/protection/protection.types.d.ts +2 -2
- package/dist/document-api/src/receipt-bridge.d.ts +3 -0
- package/dist/document-api/src/selection/selection.types.d.ts +3 -2
- package/dist/document-api/src/types/blocks.types.d.ts +2 -2
- package/dist/document-api/src/types/mutation-plan.types.d.ts +45 -5
- package/dist/document-api/src/types/receipt.d.ts +12 -0
- package/dist/document-api/src/types/sd-contract.d.ts +3 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +8 -0
- package/dist/layout-engine/contracts/src/incremental-dependency.d.ts +2 -2
- package/dist/layout-engine/contracts/src/index.d.ts +4 -0
- package/dist/layout-engine/layout-bridge/src/font-metrics-cache.d.ts +2 -23
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +11 -4
- package/dist/layout-engine/layout-bridge/src/index.d.ts +3 -3
- package/dist/layout-engine/layout-bridge/src/measurement-environment.d.ts +12 -0
- package/dist/layout-engine/layout-bridge/src/resolveLiveCrossReferences.d.ts +1 -1
- package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +8 -0
- package/dist/layout-engine/painters/dom/src/decoration-geometry.d.ts +17 -0
- package/dist/layout-engine/painters/dom/src/index.d.ts +5 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +0 -31
- package/dist/layout-engine/painters/dom/src/runs/text-run.d.ts +2 -17
- package/dist/layout-engine/painters/dom/src/runs/text-style-facts.d.ts +9 -0
- package/dist/layout-engine/painters/dom/src/runs/tracked-changes.d.ts +6 -9
- package/dist/layout-engine/painters/dom/src/styles.d.ts +21 -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/shared/font-system/src/registry.d.ts +5 -1
- package/dist/shared/font-system/src/resolver.d.ts +2 -0
- package/dist/style.css +1 -4239
- package/dist/style.layered.css +1 -4239
- package/dist/superdoc/src/composables/use-link-popover.d.ts +9 -0
- package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -0
- package/dist/superdoc/src/core/types/index.d.ts +1 -1
- package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +1 -0
- package/dist/superdoc/src/index.d.cts +2 -0
- package/dist/superdoc/src/index.d.ts +1 -0
- package/dist/superdoc/src/public/index.d.cts +8 -0
- package/dist/superdoc/src/public/index.d.ts +2 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +7 -4
- package/dist/superdoc/src/stores/superdoc-store.d.ts +21 -12
- package/dist/superdoc.cjs +357 -137
- package/dist/superdoc.es.js +356 -138
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
package/dist/superdoc.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
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 createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
3
|
+
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-CCNvH6mr.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
|
-
import { $ as
|
|
6
|
+
import { $ as vModelText, A as onActivated, B as renderSlot, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRaw$2, H as resolveDynamicComponent, I as provide$1, J as unref, K as toRef, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelSelect, R as ref, S as isReactive$1, T as mergeProps, U as shallowRef$1, V as resolveDirective, W as toDisplayString, X as useSlots, Y as useAttrs, Z as vModelCheckbox, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as watch$1, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withModifiers, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withDirectives, o as createApp, p as createVNode, q as toRefs, r as Teleport, rt as withKeys, s as createBlock, t as _plugin_vue_export_helper_default, tt as withCtx, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderList } from "./chunks/_plugin-vue_export-helper-7ZiLY07t.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";
|
|
8
8
|
import { t as PDF_TO_CSS_UNITS } from "./chunks/constants-B6VBlmKp.es.js";
|
|
9
9
|
import * as Vue from "vue";
|
|
@@ -302,7 +302,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
302
302
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
303
303
|
function getSuperdocVersion() {
|
|
304
304
|
try {
|
|
305
|
-
return "2.25.0-next.
|
|
305
|
+
return "2.25.0-next.11";
|
|
306
306
|
} catch {
|
|
307
307
|
return "unknown";
|
|
308
308
|
}
|
|
@@ -7845,6 +7845,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
7845
7845
|
const editorCommentPositions = ref({});
|
|
7846
7846
|
const isCommentHighlighted = ref(false);
|
|
7847
7847
|
const floatingCommentsOffset = ref(0);
|
|
7848
|
+
const committedReviewPresentations = shallowRef$1({});
|
|
7848
7849
|
const sortedConversations = ref([]);
|
|
7849
7850
|
const visibleConversations = ref([]);
|
|
7850
7851
|
const skipSelectionUpdate = ref(false);
|
|
@@ -8512,6 +8513,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8512
8513
|
const commentCanonicalId = trackedComment.trackedChangeCanonicalId != null ? String(trackedComment.trackedChangeCanonicalId) : null;
|
|
8513
8514
|
const commentAliasIds = getCommentAliasIds(trackedComment);
|
|
8514
8515
|
const hasCompatibleStory = trackedChangeStoryKeysAreCompatible(getTrackedChangeStoryKey(trackedComment), incomingStoryKey);
|
|
8516
|
+
if (normalizedTrackedChangeCanonicalId && commentCanonicalId && normalizedTrackedChangeCanonicalId !== commentCanonicalId) return false;
|
|
8515
8517
|
if (hasCompatibleStory && commentAliasIds.includes(normalizedChangeId)) return true;
|
|
8516
8518
|
const incomingAliasIds = new Set(normalizedTrackedChangePositionAliases ?? []);
|
|
8517
8519
|
if (hasCompatibleStory && incomingAliasIds.size > 0 && [
|
|
@@ -8860,7 +8862,17 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8860
8862
|
resolvedComments: resolvedComments.sort(sorter)
|
|
8861
8863
|
};
|
|
8862
8864
|
};
|
|
8863
|
-
const buildGroupedComments = (sorter) =>
|
|
8865
|
+
const buildGroupedComments = (sorter) => {
|
|
8866
|
+
const presentations = committedReviewPresentations.value;
|
|
8867
|
+
if (!Object.keys(presentations).length) return buildGroupedCommentsFrom(commentsList.value, sorter);
|
|
8868
|
+
const rows = new Map(commentsList.value.map((row) => [JSON.stringify([String(row.fileId), String(row.commentId)]), row]));
|
|
8869
|
+
const legacy = buildGroupedCommentsFrom(commentsList.value.filter((row) => !presentations[String(row.fileId)]), sorter);
|
|
8870
|
+
for (const [documentId, presentation] of Object.entries(presentations)) {
|
|
8871
|
+
legacy.parentComments.push(...presentation.groupOrder.open.map((id) => rows.get(JSON.stringify([documentId, String(id)]))).filter((row) => row && isThreadVisible(row)));
|
|
8872
|
+
legacy.resolvedComments.push(...presentation.groupOrder.resolved.map((id) => rows.get(JSON.stringify([documentId, String(id)]))).filter((row) => row && isThreadVisible(row)));
|
|
8873
|
+
}
|
|
8874
|
+
return legacy;
|
|
8875
|
+
};
|
|
8864
8876
|
/** @type {import('vue').ComputedRef<{parentComments: Array, resolvedComments: Array}>} Comments grouped and sorted by creation time */
|
|
8865
8877
|
const getGroupedComments = computed$1(() => buildGroupedComments(compareByCreatedTime));
|
|
8866
8878
|
const getGroupedReviewDirectory = computed$1(() => buildGroupedCommentsFrom(reviewDirectoryList.value, compareByCreatedTime));
|
|
@@ -9223,8 +9235,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9223
9235
|
};
|
|
9224
9236
|
const activeId = normalizeCommentId(activeComment.value);
|
|
9225
9237
|
if (activeId && droppedIds.has(activeId)) clearActiveCommentSelection();
|
|
9238
|
+
const adapter = getV2CommentsAdapter(superdoc);
|
|
9226
9239
|
removedComments.forEach((comment) => {
|
|
9227
9240
|
const payload = typeof comment.getValues === "function" ? comment.getValues() : comment;
|
|
9241
|
+
if (isCurrentV2CommentsAdapter(adapter) && adapter.isPendingCommentCreation?.(payload?.commentId)) return;
|
|
9228
9242
|
const event = {
|
|
9229
9243
|
type: COMMENT_EVENTS.DELETED,
|
|
9230
9244
|
comment: payload,
|
|
@@ -9833,7 +9847,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9833
9847
|
* wraps this action in one Pinia `$patch`; all fallible mapping completes
|
|
9834
9848
|
* before either row family mutates.
|
|
9835
9849
|
*/
|
|
9836
|
-
const applyReviewWindowFromV2 = ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch } = {}) => withInteractionSpan("store.reviewWindow.apply", "store-reconciliation", {
|
|
9850
|
+
const applyReviewWindowFromV2 = ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch } = {}) => withInteractionSpan("store.reviewWindow.apply", "store-reconciliation", {
|
|
9837
9851
|
commentItemCount: Array.isArray(commentItems) ? commentItems.length : null,
|
|
9838
9852
|
trackedItemCount: Array.isArray(trackedChangeItems) ? trackedChangeItems.length : null
|
|
9839
9853
|
}, () => {
|
|
@@ -9859,6 +9873,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9859
9873
|
ok: false,
|
|
9860
9874
|
reason: "document-mismatch"
|
|
9861
9875
|
};
|
|
9876
|
+
if (preparedReview && (!Array.isArray(preparedReview.comments) || !Array.isArray(preparedReview.trackedChanges) || preparedReview.comments.length > 4096 || preparedReview.trackedChanges.length > 4096)) return {
|
|
9877
|
+
ok: false,
|
|
9878
|
+
reason: "items-invalid"
|
|
9879
|
+
};
|
|
9862
9880
|
if (!Array.isArray(commentItems) || !Array.isArray(trackedChangeItems)) return {
|
|
9863
9881
|
ok: false,
|
|
9864
9882
|
reason: "items-invalid"
|
|
@@ -9872,7 +9890,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9872
9890
|
reason: "adapter-mapper-missing"
|
|
9873
9891
|
};
|
|
9874
9892
|
let effectiveCommentItems = commentItems;
|
|
9875
|
-
if (typeof commentsAdapter.seedReviewCatalog === "function") {
|
|
9893
|
+
if (!preparedReview && typeof commentsAdapter.seedReviewCatalog === "function") {
|
|
9876
9894
|
const seeded = commentsAdapter.seedReviewCatalog(commentItems, {
|
|
9877
9895
|
sourceCoverageRevision,
|
|
9878
9896
|
evaluatedRevision
|
|
@@ -9888,11 +9906,22 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9888
9906
|
let preparedInputs;
|
|
9889
9907
|
let preparedParams;
|
|
9890
9908
|
try {
|
|
9891
|
-
preparedInputs =
|
|
9909
|
+
preparedInputs = preparedReview ? preparedReview.comments.map((input) => ({
|
|
9910
|
+
...input,
|
|
9911
|
+
fileId: normalizedDocumentId,
|
|
9912
|
+
fileType,
|
|
9913
|
+
selection: {
|
|
9914
|
+
...input.selection,
|
|
9915
|
+
documentId: normalizedDocumentId
|
|
9916
|
+
}
|
|
9917
|
+
})) : effectiveCommentItems.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9892
9918
|
fileId: normalizedDocumentId,
|
|
9893
9919
|
fileType
|
|
9894
9920
|
})).filter(Boolean);
|
|
9895
|
-
preparedParams =
|
|
9921
|
+
preparedParams = preparedReview ? preparedReview.trackedChanges.map((params) => ({
|
|
9922
|
+
...params,
|
|
9923
|
+
documentId: normalizedDocumentId
|
|
9924
|
+
})) : trackedChangeItems.map((item) => trackedChangesAdapter.mapV2TrackedChangeToCommentParams(item)).filter(Boolean);
|
|
9896
9925
|
} catch (error) {
|
|
9897
9926
|
return {
|
|
9898
9927
|
ok: false,
|
|
@@ -9927,6 +9956,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9927
9956
|
])
|
|
9928
9957
|
].map((value) => normalizeCommentId(value)).filter(Boolean));
|
|
9929
9958
|
patch(() => {
|
|
9959
|
+
if (preparedReview?.presentation) committedReviewPresentations.value = {
|
|
9960
|
+
...committedReviewPresentations.value,
|
|
9961
|
+
[normalizedDocumentId]: preparedReview.presentation
|
|
9962
|
+
};
|
|
9930
9963
|
reconcileTrackedChangesFromV2({
|
|
9931
9964
|
superdoc,
|
|
9932
9965
|
adapter: trackedChangesAdapter,
|
|
@@ -10329,6 +10362,11 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10329
10362
|
function removeCommentsForDocument(documentId) {
|
|
10330
10363
|
const activeDocumentId = documentId != null ? String(documentId) : null;
|
|
10331
10364
|
if (!activeDocumentId) return;
|
|
10365
|
+
if (committedReviewPresentations.value[activeDocumentId]) {
|
|
10366
|
+
const next = { ...committedReviewPresentations.value };
|
|
10367
|
+
delete next[activeDocumentId];
|
|
10368
|
+
committedReviewPresentations.value = next;
|
|
10369
|
+
}
|
|
10332
10370
|
cancelImportedTrackedChangeBootstrap(activeDocumentId);
|
|
10333
10371
|
const removedComments = commentsList.value.filter((comment) => belongsToDocument(comment, activeDocumentId, { allowSingleDocumentMismatch: true }));
|
|
10334
10372
|
if (!removedComments.length) return;
|
|
@@ -10602,11 +10640,8 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10602
10640
|
return normalizedDecision === "accept" && type === "insertion" || normalizedDecision === "reject" && type === "deletion";
|
|
10603
10641
|
};
|
|
10604
10642
|
const getBodyTrackedChangeIdentityIds = (comment) => {
|
|
10605
|
-
|
|
10606
|
-
const canonicalId = normalizeCommentId(comment.trackedChangeCanonicalId);
|
|
10607
|
-
return [commentId, ...!(canonicalId && canonicalId !== commentId) ? [
|
|
10643
|
+
return [normalizeCommentId(comment.commentId), ...!normalizeCommentId(comment.trackedChangeCanonicalId) ? [
|
|
10608
10644
|
comment.importedId,
|
|
10609
|
-
canonicalId,
|
|
10610
10645
|
comment.trackedChangeAnchorKey,
|
|
10611
10646
|
...normalizeTrackedChangePositionAliases(comment.trackedChangePositionAliases)
|
|
10612
10647
|
] : []].map((id) => normalizeCommentId(id)).filter(Boolean);
|
|
@@ -11988,6 +12023,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
11988
12023
|
hasInitializedLocations,
|
|
11989
12024
|
isCommentHighlighted,
|
|
11990
12025
|
floatingCommentsOffset,
|
|
12026
|
+
committedReviewPresentations,
|
|
11991
12027
|
sortedConversations,
|
|
11992
12028
|
visibleConversations,
|
|
11993
12029
|
skipSelectionUpdate,
|
|
@@ -12200,14 +12236,14 @@ function useUiFontFamily() {
|
|
|
12200
12236
|
}
|
|
12201
12237
|
//#endregion
|
|
12202
12238
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
12203
|
-
var _hoisted_1$
|
|
12239
|
+
var _hoisted_1$32 = { class: "comments-dropdown" };
|
|
12204
12240
|
var _hoisted_2$25 = ["onClick"];
|
|
12205
12241
|
var _hoisted_3$21 = {
|
|
12206
12242
|
key: 0,
|
|
12207
12243
|
class: "comments-dropdown__option-icon"
|
|
12208
12244
|
};
|
|
12209
|
-
var _hoisted_4$
|
|
12210
|
-
var _hoisted_5$
|
|
12245
|
+
var _hoisted_4$14 = ["innerHTML"];
|
|
12246
|
+
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
12211
12247
|
var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
12212
12248
|
__name: "CommentsDropdown",
|
|
12213
12249
|
props: {
|
|
@@ -12331,7 +12367,7 @@ var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12331
12367
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
12332
12368
|
});
|
|
12333
12369
|
return (_ctx, _cache) => {
|
|
12334
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12370
|
+
return openBlock(), createElementBlock("div", _hoisted_1$32, [createElementVNode("div", {
|
|
12335
12371
|
ref_key: "triggerRef",
|
|
12336
12372
|
ref: triggerRef,
|
|
12337
12373
|
class: "comments-dropdown__trigger",
|
|
@@ -12350,20 +12386,20 @@ var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12350
12386
|
}, [hasIcon(option) ? (openBlock(), createElementBlock("span", _hoisted_3$21, [option.iconString ? (openBlock(), createElementBlock("span", {
|
|
12351
12387
|
key: 0,
|
|
12352
12388
|
innerHTML: option.iconString
|
|
12353
|
-
}, null, 8, _hoisted_4$
|
|
12389
|
+
}, null, 8, _hoisted_4$14)) : (openBlock(), createBlock(unref(OptionIcon), {
|
|
12354
12390
|
key: 1,
|
|
12355
12391
|
option
|
|
12356
|
-
}, null, 8, ["option"]))])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$
|
|
12392
|
+
}, null, 8, ["option"]))])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$11, toDisplayString(option.label), 1)], 10, _hoisted_2$25);
|
|
12357
12393
|
}), 128))], 4)) : createCommentVNode("", true)]))]);
|
|
12358
12394
|
};
|
|
12359
12395
|
}
|
|
12360
12396
|
}, [["__scopeId", "data-v-7eced80a"]]);
|
|
12361
12397
|
//#endregion
|
|
12362
12398
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
12363
|
-
var _hoisted_1$
|
|
12399
|
+
var _hoisted_1$31 = { class: "sd-comment-option" };
|
|
12364
12400
|
var _hoisted_2$24 = ["innerHTML"];
|
|
12365
12401
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
12366
|
-
var _hoisted_4$
|
|
12402
|
+
var _hoisted_4$13 = ["innerHTML"];
|
|
12367
12403
|
var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
12368
12404
|
__name: "InternalDropdown",
|
|
12369
12405
|
props: {
|
|
@@ -12431,7 +12467,7 @@ var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12431
12467
|
disabled: __props.isDisabled,
|
|
12432
12468
|
"content-style": { fontFamily: unref(uiFontFamily) }
|
|
12433
12469
|
}, {
|
|
12434
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
12470
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$31, [
|
|
12435
12471
|
createElementVNode("div", {
|
|
12436
12472
|
class: "sd-active-icon",
|
|
12437
12473
|
innerHTML: activeIcon.value
|
|
@@ -12440,7 +12476,7 @@ var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12440
12476
|
createElementVNode("div", {
|
|
12441
12477
|
class: "sd-dropdown-caret",
|
|
12442
12478
|
innerHTML: unref(superdocIcons).caretDown
|
|
12443
|
-
}, null, 8, _hoisted_4$
|
|
12479
|
+
}, null, 8, _hoisted_4$13)
|
|
12444
12480
|
])]),
|
|
12445
12481
|
_: 1
|
|
12446
12482
|
}, 8, ["disabled", "content-style"])], 4);
|
|
@@ -12596,7 +12632,7 @@ var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
|
12596
12632
|
};
|
|
12597
12633
|
//#endregion
|
|
12598
12634
|
//#region src/components/general/Avatar.vue
|
|
12599
|
-
var _hoisted_1$
|
|
12635
|
+
var _hoisted_1$30 = { class: "user-container" };
|
|
12600
12636
|
var _hoisted_2$23 = ["src"];
|
|
12601
12637
|
var _hoisted_3$19 = {
|
|
12602
12638
|
key: 1,
|
|
@@ -12619,7 +12655,7 @@ var Avatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12619
12655
|
return email?.substring(0, 1)?.toUpperCase() || null;
|
|
12620
12656
|
};
|
|
12621
12657
|
return (_ctx, _cache) => {
|
|
12622
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12658
|
+
return openBlock(), createElementBlock("div", _hoisted_1$30, [__props.user.image ? (openBlock(), createElementBlock("img", {
|
|
12623
12659
|
key: 0,
|
|
12624
12660
|
class: "user-bg",
|
|
12625
12661
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
@@ -12629,11 +12665,11 @@ var Avatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12629
12665
|
}, [["__scopeId", "data-v-c95b2073"]]);
|
|
12630
12666
|
//#endregion
|
|
12631
12667
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
12632
|
-
var _hoisted_1$
|
|
12668
|
+
var _hoisted_1$29 = { class: "card-section comment-header" };
|
|
12633
12669
|
var _hoisted_2$22 = { class: "comment-header-left" };
|
|
12634
12670
|
var _hoisted_3$18 = { class: "user-info" };
|
|
12635
|
-
var _hoisted_4$
|
|
12636
|
-
var _hoisted_5$
|
|
12671
|
+
var _hoisted_4$12 = { class: "user-name" };
|
|
12672
|
+
var _hoisted_5$10 = {
|
|
12637
12673
|
key: 0,
|
|
12638
12674
|
class: "imported-tag"
|
|
12639
12675
|
};
|
|
@@ -12889,10 +12925,10 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12889
12925
|
return user;
|
|
12890
12926
|
});
|
|
12891
12927
|
return (_ctx, _cache) => {
|
|
12892
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12928
|
+
return openBlock(), createElementBlock("div", _hoisted_1$29, [createElementVNode("div", _hoisted_2$22, [createVNode(Avatar_default, {
|
|
12893
12929
|
user: getCurrentUser.value,
|
|
12894
12930
|
class: "avatar"
|
|
12895
|
-
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$18, [createElementVNode("div", _hoisted_4$
|
|
12931
|
+
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$18, [createElementVNode("div", _hoisted_4$12, [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 }]) }, [
|
|
12896
12932
|
allowResolve.value ? (openBlock(), createElementBlock("div", {
|
|
12897
12933
|
key: 0,
|
|
12898
12934
|
class: normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -12940,20 +12976,20 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12940
12976
|
}, [["__scopeId", "data-v-f2f11c96"]]);
|
|
12941
12977
|
//#endregion
|
|
12942
12978
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
12943
|
-
var _hoisted_1$
|
|
12979
|
+
var _hoisted_1$28 = { class: "input-section" };
|
|
12944
12980
|
var _hoisted_2$21 = { class: "comment-composer" };
|
|
12945
12981
|
var _hoisted_3$17 = [
|
|
12946
12982
|
"aria-expanded",
|
|
12947
12983
|
"aria-controls",
|
|
12948
12984
|
"aria-activedescendant"
|
|
12949
12985
|
];
|
|
12950
|
-
var _hoisted_4$
|
|
12986
|
+
var _hoisted_4$11 = [
|
|
12951
12987
|
"id",
|
|
12952
12988
|
"aria-selected",
|
|
12953
12989
|
"data-sd-comment-mention-option",
|
|
12954
12990
|
"onMousedown"
|
|
12955
12991
|
];
|
|
12956
|
-
var _hoisted_5$
|
|
12992
|
+
var _hoisted_5$9 = { class: "comment-mention-option__name" };
|
|
12957
12993
|
var _hoisted_6$7 = {
|
|
12958
12994
|
key: 0,
|
|
12959
12995
|
class: "comment-mention-option__email"
|
|
@@ -13114,7 +13150,7 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13114
13150
|
watch$1(currentCommentText, scheduleInputHeightSync);
|
|
13115
13151
|
__expose({ focus });
|
|
13116
13152
|
return (_ctx, _cache) => {
|
|
13117
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13153
|
+
return openBlock(), createElementBlock("div", _hoisted_1$28, [__props.includeHeader ? (openBlock(), createBlock(CommentHeader_default, {
|
|
13118
13154
|
key: 0,
|
|
13119
13155
|
config: __props.config,
|
|
13120
13156
|
comment: __props.comment,
|
|
@@ -13153,7 +13189,7 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13153
13189
|
"aria-selected": index === highlightedMentionIndex.value,
|
|
13154
13190
|
"data-sd-comment-mention-option": userKey(user),
|
|
13155
13191
|
onMousedown: withModifiers(($event) => selectMention(user), ["prevent"])
|
|
13156
|
-
}, [createElementVNode("span", _hoisted_5$
|
|
13192
|
+
}, [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$11);
|
|
13157
13193
|
}), 128))])) : createCommentVNode("", true)])], 2)]);
|
|
13158
13194
|
};
|
|
13159
13195
|
}
|
|
@@ -13268,7 +13304,7 @@ function renderCommentHtml(value) {
|
|
|
13268
13304
|
}
|
|
13269
13305
|
//#endregion
|
|
13270
13306
|
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13271
|
-
var _hoisted_1$
|
|
13307
|
+
var _hoisted_1$27 = [
|
|
13272
13308
|
"aria-label",
|
|
13273
13309
|
"data-comment-instance-id",
|
|
13274
13310
|
"data-comment-thread-id",
|
|
@@ -13280,8 +13316,8 @@ var _hoisted_2$20 = {
|
|
|
13280
13316
|
class: "existing-internal-input"
|
|
13281
13317
|
};
|
|
13282
13318
|
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
13283
|
-
var _hoisted_4$
|
|
13284
|
-
var _hoisted_5$
|
|
13319
|
+
var _hoisted_4$10 = { class: "reply-actions" };
|
|
13320
|
+
var _hoisted_5$8 = ["disabled"];
|
|
13285
13321
|
var _hoisted_6$6 = {
|
|
13286
13322
|
key: 0,
|
|
13287
13323
|
class: "resolved-badge"
|
|
@@ -14349,14 +14385,14 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14349
14385
|
"config",
|
|
14350
14386
|
"comment"
|
|
14351
14387
|
])]),
|
|
14352
|
-
createElementVNode("div", _hoisted_4$
|
|
14388
|
+
createElementVNode("div", _hoisted_4$10, [createElementVNode("button", {
|
|
14353
14389
|
class: "sd-button reply-btn-cancel",
|
|
14354
14390
|
onClick: withModifiers(handleCancel, ["stop", "prevent"])
|
|
14355
14391
|
}, "Cancel"), createElementVNode("button", {
|
|
14356
14392
|
class: normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isSubmittingNewComment.value }]),
|
|
14357
14393
|
onClick: withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14358
14394
|
disabled: !hasTextContent.value || isSubmittingNewComment.value
|
|
14359
|
-
}, " Comment ", 10, _hoisted_5$
|
|
14395
|
+
}, " Comment ", 10, _hoisted_5$8)])
|
|
14360
14396
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14361
14397
|
resolvedBadgeLabel.value ? (openBlock(), createElementBlock("div", _hoisted_6$6, [createElementVNode("span", {
|
|
14362
14398
|
class: "resolved-badge__icon",
|
|
@@ -14522,13 +14558,13 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14522
14558
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14523
14559
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14524
14560
|
}, " Reply ", 10, _hoisted_53)])]))], 64)) : createCommentVNode("", true)
|
|
14525
|
-
], 64))], 14, _hoisted_1$
|
|
14561
|
+
], 64))], 14, _hoisted_1$27)), [[_directive_click_outside, handleClickOutside]]);
|
|
14526
14562
|
};
|
|
14527
14563
|
}
|
|
14528
14564
|
}, [["__scopeId", "data-v-5ace8cef"]]);
|
|
14529
14565
|
//#endregion
|
|
14530
14566
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14531
|
-
var _hoisted_1$
|
|
14567
|
+
var _hoisted_1$26 = [
|
|
14532
14568
|
"tabindex",
|
|
14533
14569
|
"aria-posinset",
|
|
14534
14570
|
"aria-setsize",
|
|
@@ -14666,13 +14702,13 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
14666
14702
|
"floating-page-index",
|
|
14667
14703
|
"floating-position-entry",
|
|
14668
14704
|
"is-floating-instance-active"
|
|
14669
|
-
])) : createCommentVNode("", true)], 44, _hoisted_1$
|
|
14705
|
+
])) : createCommentVNode("", true)], 44, _hoisted_1$26);
|
|
14670
14706
|
};
|
|
14671
14707
|
}
|
|
14672
14708
|
}, [["__scopeId", "data-v-29650a06"]]);
|
|
14673
14709
|
//#endregion
|
|
14674
14710
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
14675
|
-
var _hoisted_1$
|
|
14711
|
+
var _hoisted_1$25 = ["aria-busy"];
|
|
14676
14712
|
var _hoisted_2$19 = { key: 0 };
|
|
14677
14713
|
var _hoisted_3$15 = { key: 1 };
|
|
14678
14714
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
@@ -14833,7 +14869,7 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14833
14869
|
"total",
|
|
14834
14870
|
"tab-index"
|
|
14835
14871
|
]);
|
|
14836
|
-
}), 128))])) : createCommentVNode("", true)], 8, _hoisted_1$
|
|
14872
|
+
}), 128))])) : createCommentVNode("", true)], 8, _hoisted_1$25);
|
|
14837
14873
|
};
|
|
14838
14874
|
}
|
|
14839
14875
|
}, [["__scopeId", "data-v-89244745"]]);
|
|
@@ -15248,6 +15284,62 @@ var composeAuthorColorResolver = (config) => {
|
|
|
15248
15284
|
};
|
|
15249
15285
|
};
|
|
15250
15286
|
//#endregion
|
|
15287
|
+
//#region ../document-api/src/permission-ranges/permission-ranges.ts
|
|
15288
|
+
function editorKey(editor) {
|
|
15289
|
+
return editor.id?.trim() ? editor.id : editor.email?.trim() || void 0;
|
|
15290
|
+
}
|
|
15291
|
+
function editorMatches(editor, id) {
|
|
15292
|
+
return Boolean(id.trim()) && (editor.id === id || Boolean(editor.email?.trim() && editor.email.trim().toLowerCase() === id.toLowerCase()));
|
|
15293
|
+
}
|
|
15294
|
+
/**
|
|
15295
|
+
* Resolve a host ID or imported Word email against an explicitly supplied roster.
|
|
15296
|
+
* Word receives the email when available; opaque IDs remain host-specific.
|
|
15297
|
+
* Duplicate IDs/emails are ambiguous. This does not authenticate a user.
|
|
15298
|
+
*/
|
|
15299
|
+
function resolvePermissionRangeEditor(editors, id) {
|
|
15300
|
+
const matches = editors.filter((editor) => editorMatches(editor, id));
|
|
15301
|
+
if (matches.length === 0) return {
|
|
15302
|
+
status: "unknown",
|
|
15303
|
+
id
|
|
15304
|
+
};
|
|
15305
|
+
if (matches.length !== 1) return {
|
|
15306
|
+
status: "ambiguous",
|
|
15307
|
+
id
|
|
15308
|
+
};
|
|
15309
|
+
const editor = matches[0];
|
|
15310
|
+
const wordId = editor.email?.trim() || editor.id;
|
|
15311
|
+
if (editors.filter((candidate) => editorMatches(candidate, wordId)).length !== 1) return {
|
|
15312
|
+
status: "ambiguous",
|
|
15313
|
+
id
|
|
15314
|
+
};
|
|
15315
|
+
return {
|
|
15316
|
+
status: "resolved",
|
|
15317
|
+
id,
|
|
15318
|
+
editor: { ...editor },
|
|
15319
|
+
principal: {
|
|
15320
|
+
kind: "editor",
|
|
15321
|
+
id: wordId
|
|
15322
|
+
}
|
|
15323
|
+
};
|
|
15324
|
+
}
|
|
15325
|
+
/** Enumerate the host roster for an editor picker, including ambiguous entries. */
|
|
15326
|
+
function listPermissionRangeEditors(editors) {
|
|
15327
|
+
const ids = new Set(editors.map(editorKey).filter((id) => id !== void 0));
|
|
15328
|
+
return Array.from(ids, (id) => resolvePermissionRangeEditor(editors, id));
|
|
15329
|
+
}
|
|
15330
|
+
//#endregion
|
|
15331
|
+
//#region src/core/superdoc-ui-owner.js
|
|
15332
|
+
var ownerIds = /* @__PURE__ */ new WeakMap();
|
|
15333
|
+
function getSuperDocUiOwnerId(superdoc) {
|
|
15334
|
+
if (!superdoc || typeof superdoc !== "object") return null;
|
|
15335
|
+
let ownerId = ownerIds.get(superdoc);
|
|
15336
|
+
if (!ownerId) {
|
|
15337
|
+
ownerId = v4();
|
|
15338
|
+
ownerIds.set(superdoc, ownerId);
|
|
15339
|
+
}
|
|
15340
|
+
return ownerId;
|
|
15341
|
+
}
|
|
15342
|
+
//#endregion
|
|
15251
15343
|
//#region src/components/CommentsLayer/floating-comment-positioning.js
|
|
15252
15344
|
var normalizeFloatingAnchorTop = (top) => {
|
|
15253
15345
|
return top;
|
|
@@ -15302,7 +15394,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
15302
15394
|
};
|
|
15303
15395
|
//#endregion
|
|
15304
15396
|
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15305
|
-
var _hoisted_1$
|
|
15397
|
+
var _hoisted_1$24 = [
|
|
15306
15398
|
"data-comment-id",
|
|
15307
15399
|
"data-comment-instance-id",
|
|
15308
15400
|
"data-comment-thread-id",
|
|
@@ -15357,7 +15449,22 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15357
15449
|
const { clearInstantSidebarAlignment } = commentsStore;
|
|
15358
15450
|
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(commentsStore);
|
|
15359
15451
|
const { activeZoom } = storeToRefs(superdocStore);
|
|
15452
|
+
const committedPresentation = computed$1(() => commentsStore.committedReviewPresentations?.[String(props.currentDocument?.id)] ?? null);
|
|
15453
|
+
const committedInstances = computed$1(() => {
|
|
15454
|
+
const presentation = committedPresentation.value;
|
|
15455
|
+
if (!presentation) return null;
|
|
15456
|
+
const rows = new Map(commentsStore.commentsList.filter((row) => String(row.fileId) === String(props.currentDocument?.id)).map((row) => [String(row.commentId), row]));
|
|
15457
|
+
return presentation.instances.flatMap((instance) => {
|
|
15458
|
+
const comment = instance.rowId === "pending" ? pendingComment.value : rows.get(instance.rowId);
|
|
15459
|
+
return comment ? [{
|
|
15460
|
+
...instance,
|
|
15461
|
+
comment,
|
|
15462
|
+
rowVersion: presentation.rowVersions[instance.rowId] ?? 0
|
|
15463
|
+
}] : [];
|
|
15464
|
+
});
|
|
15465
|
+
});
|
|
15360
15466
|
const floatingCommentInstances = computed$1(() => {
|
|
15467
|
+
if (committedInstances.value) return committedInstances.value.filter((instance) => instance.rowId !== "pending");
|
|
15361
15468
|
const currentFloatingCommentInstances = commentsStore.getFloatingCommentInstances;
|
|
15362
15469
|
if (!Array.isArray(currentFloatingCommentInstances)) return [];
|
|
15363
15470
|
const documentId = props.currentDocument?.id;
|
|
@@ -15475,7 +15582,7 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15475
15582
|
const shouldRenderDialog = (position) => {
|
|
15476
15583
|
return shouldMountFloatingCommentDialog({
|
|
15477
15584
|
id: position?.id,
|
|
15478
|
-
visibleIds: visibleIds.value,
|
|
15585
|
+
visibleIds: committedPresentation.value ? new Set(allPositions.value.filter((item) => item.instanceRef?.mount).map((item) => item.id)) : visibleIds.value,
|
|
15479
15586
|
activeCommentInstanceId: activeCommentInstanceId.value,
|
|
15480
15587
|
comment: position?.commentRef
|
|
15481
15588
|
});
|
|
@@ -15521,6 +15628,19 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15521
15628
|
});
|
|
15522
15629
|
const allPositions = computed$1(() => {
|
|
15523
15630
|
viewportRevision.value;
|
|
15631
|
+
if (committedInstances.value) return committedInstances.value.map((instance) => ({
|
|
15632
|
+
id: instance.id,
|
|
15633
|
+
threadId: instance.threadId,
|
|
15634
|
+
pageIndex: instance.pageIndex,
|
|
15635
|
+
anchorTop: instance.anchorTop,
|
|
15636
|
+
anchorBottom: instance.anchorBottom,
|
|
15637
|
+
top: instance.top,
|
|
15638
|
+
height: instance.height,
|
|
15639
|
+
hasAnchorGeometry: instance.positionEntry != null || instance.rowId === "pending",
|
|
15640
|
+
isOffscreenReviewCard: instance.isOffscreenReviewCard,
|
|
15641
|
+
commentRef: instance.comment,
|
|
15642
|
+
instanceRef: instance
|
|
15643
|
+
}));
|
|
15524
15644
|
const positionedInstances = geometryBearingInstances.value;
|
|
15525
15645
|
const hasPending = pendingComment.value && pendingComment.value.fileId === props.currentDocument.id;
|
|
15526
15646
|
if (!positionedInstances.length && !floatingCommentInstances.value.length && !hasPending) return [];
|
|
@@ -15619,6 +15739,45 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
15619
15739
|
resolveCollisions(collisionPositions, activeIndex, 15);
|
|
15620
15740
|
return positions;
|
|
15621
15741
|
});
|
|
15742
|
+
watch$1(() => {
|
|
15743
|
+
const presentation = committedPresentation.value, container = floatingCommentsContainer.value;
|
|
15744
|
+
if (!presentation || !container) return null;
|
|
15745
|
+
viewportRevision.value;
|
|
15746
|
+
const viewport = getFloatingViewportRange();
|
|
15747
|
+
if (!viewport) return null;
|
|
15748
|
+
const rail = container.getBoundingClientRect();
|
|
15749
|
+
const stage = typeof presentation.readPaintOrigin === "function" ? presentation.readPaintOrigin() : props.parent?.getBoundingClientRect?.();
|
|
15750
|
+
if (!stage || !Number.isFinite(stage.left) || !Number.isFinite(stage.top)) return null;
|
|
15751
|
+
const instances = committedInstances.value ?? [];
|
|
15752
|
+
return {
|
|
15753
|
+
activeThreadId: activeComment.value == null ? null : String(activeComment.value),
|
|
15754
|
+
activeInstanceId: activeCommentInstanceId.value == null ? null : String(activeCommentInstanceId.value),
|
|
15755
|
+
editingRowId: editingCommentId.value == null ? null : String(editingCommentId.value),
|
|
15756
|
+
retainedThreadIds: [],
|
|
15757
|
+
visibility: {
|
|
15758
|
+
comments: commentsStore.viewingVisibility?.documentMode !== "viewing" || commentsStore.viewingVisibility?.commentsVisible === true,
|
|
15759
|
+
trackedChanges: commentsStore.viewingVisibility?.documentMode !== "viewing" || commentsStore.viewingVisibility?.trackChangesVisible === true
|
|
15760
|
+
},
|
|
15761
|
+
viewport: {
|
|
15762
|
+
...viewport,
|
|
15763
|
+
width: Math.max(1, rail.width),
|
|
15764
|
+
scale: 1,
|
|
15765
|
+
stageOffsetX: (stage?.left ?? rail.left) - rail.left,
|
|
15766
|
+
stageOffsetY: (stage?.top ?? rail.top) - rail.top
|
|
15767
|
+
},
|
|
15768
|
+
pending: pendingComment.value?.fileId === props.currentDocument.id && getPendingAnchorTop() != null ? {
|
|
15769
|
+
anchorTop: getPendingAnchorTop(),
|
|
15770
|
+
height: measuredHeights.value.pending || ESTIMATED_HEIGHT
|
|
15771
|
+
} : null,
|
|
15772
|
+
measurements: instances.filter((instance) => measuredHeights.value[instance.id] > 0).map((instance) => ({
|
|
15773
|
+
instanceId: instance.id,
|
|
15774
|
+
rowVersion: instance.rowVersion,
|
|
15775
|
+
height: measuredHeights.value[instance.id]
|
|
15776
|
+
}))
|
|
15777
|
+
};
|
|
15778
|
+
}, (input) => {
|
|
15779
|
+
if (input) committedPresentation.value?.updateContext(input);
|
|
15780
|
+
}, { immediate: true });
|
|
15622
15781
|
const wrapperMinHeight = computed$1(() => {
|
|
15623
15782
|
viewportRevision.value;
|
|
15624
15783
|
return Math.max(0, props.parent?.clientHeight || 0, props.parent?.scrollHeight || 0);
|
|
@@ -16134,7 +16293,7 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16134
16293
|
}, [createElementVNode("div", {
|
|
16135
16294
|
class: "sidebar-container",
|
|
16136
16295
|
style: normalizeStyle({
|
|
16137
|
-
transform: `translateY(${sidebarOffsetY.value}px)`,
|
|
16296
|
+
transform: `translateY(${committedPresentation.value ? 0 : sidebarOffsetY.value}px)`,
|
|
16138
16297
|
transition: disableInstantLayoutTransitions.value ? "none" : void 0
|
|
16139
16298
|
})
|
|
16140
16299
|
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(allPositions.value, (pos) => {
|
|
@@ -16149,7 +16308,7 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16149
16308
|
"data-comment-page-index": pos.pageIndex ?? "",
|
|
16150
16309
|
class: normalizeClass([{ "is-direct-decision-continuity-target": pos.id === directDecisionContinuityTargetId.value }, "comment-placeholder"]),
|
|
16151
16310
|
style: normalizeStyle({
|
|
16152
|
-
top: (pos.isOffscreenReviewCard ? pos.top - sidebarOffsetY.value : pos.top) + "px",
|
|
16311
|
+
top: (pos.isOffscreenReviewCard && !committedPresentation.value ? pos.top - sidebarOffsetY.value : pos.top) + "px",
|
|
16153
16312
|
height: pos.height + "px",
|
|
16154
16313
|
transition: disableInstantLayoutTransitions.value ? "none" : void 0
|
|
16155
16314
|
})
|
|
@@ -16172,14 +16331,14 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16172
16331
|
"floating-page-index",
|
|
16173
16332
|
"floating-position-entry",
|
|
16174
16333
|
"is-floating-instance-active"
|
|
16175
|
-
])) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
16334
|
+
])) : createCommentVNode("", true)], 14, _hoisted_1$24);
|
|
16176
16335
|
}), 128))], 4)], 36);
|
|
16177
16336
|
};
|
|
16178
16337
|
}
|
|
16179
|
-
}, [["__scopeId", "data-v-
|
|
16338
|
+
}, [["__scopeId", "data-v-028441bf"]]);
|
|
16180
16339
|
//#endregion
|
|
16181
16340
|
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
16182
|
-
var _hoisted_1$
|
|
16341
|
+
var _hoisted_1$23 = {
|
|
16183
16342
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
16184
16343
|
"aria-hidden": "false"
|
|
16185
16344
|
};
|
|
@@ -16285,7 +16444,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16285
16444
|
emit("anchor-activate", anchor.commentId);
|
|
16286
16445
|
};
|
|
16287
16446
|
return (_ctx, _cache) => {
|
|
16288
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
16447
|
+
return openBlock(), createElementBlock("div", _hoisted_1$23, [(openBlock(true), createElementBlock(Fragment, null, renderList(pdfCommentAnchors.value, (anchor) => {
|
|
16289
16448
|
return openBlock(), createElementBlock("div", {
|
|
16290
16449
|
key: anchor.commentId,
|
|
16291
16450
|
class: "sd-comment-anchor sd-highlight",
|
|
@@ -16454,7 +16613,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
16454
16613
|
};
|
|
16455
16614
|
//#endregion
|
|
16456
16615
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
16457
|
-
var _hoisted_1$
|
|
16616
|
+
var _hoisted_1$22 = ["data-page-index"];
|
|
16458
16617
|
var WhiteboardPage_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
16459
16618
|
__name: "WhiteboardPage",
|
|
16460
16619
|
props: {
|
|
@@ -16586,7 +16745,7 @@ var WhiteboardPage_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16586
16745
|
height: (__props.pageSize?.height ?? __props.page.size?.height) + "px",
|
|
16587
16746
|
transform: `translate(${__props.pageOffset?.left ?? 0}px, ${__props.pageOffset?.top ?? 0}px)`
|
|
16588
16747
|
})
|
|
16589
|
-
}, null, 44, _hoisted_1$
|
|
16748
|
+
}, null, 44, _hoisted_1$22);
|
|
16590
16749
|
};
|
|
16591
16750
|
}
|
|
16592
16751
|
}, [["__scopeId", "data-v-c876c9b5"]]);
|
|
@@ -16661,7 +16820,7 @@ var WhiteboardLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16661
16820
|
}, [["__scopeId", "data-v-54546c3d"]]);
|
|
16662
16821
|
//#endregion
|
|
16663
16822
|
//#region src/components/HtmlViewer/HtmlViewer.vue
|
|
16664
|
-
var _hoisted_1$
|
|
16823
|
+
var _hoisted_1$21 = { class: "superdoc-html-viewer" };
|
|
16665
16824
|
var _hoisted_2$17 = { class: "superdoc-html-viewer__document" };
|
|
16666
16825
|
var _hoisted_3$14 = ["innerHTML"];
|
|
16667
16826
|
var HtmlViewer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
@@ -16711,7 +16870,7 @@ var HtmlViewer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16711
16870
|
initViewer();
|
|
16712
16871
|
});
|
|
16713
16872
|
return (_ctx, _cache) => {
|
|
16714
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
16873
|
+
return openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("div", _hoisted_2$17, [createElementVNode("div", {
|
|
16715
16874
|
class: "superdoc-html-viewer__content",
|
|
16716
16875
|
innerHTML: documentContent.value,
|
|
16717
16876
|
onMouseup: handleSelectionChange
|
|
@@ -17760,7 +17919,7 @@ function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhan
|
|
|
17760
17919
|
})
|
|
17761
17920
|
});
|
|
17762
17921
|
} else {
|
|
17763
|
-
const PasswordPromptSurface = (await import("./chunks/PasswordPromptSurface-
|
|
17922
|
+
const PasswordPromptSurface = (await import("./chunks/PasswordPromptSurface-BDpxqdzp.es.js")).default;
|
|
17764
17923
|
const surfaceId = `password-prompt-${doc.id}`;
|
|
17765
17924
|
handle = manager.open({
|
|
17766
17925
|
id: surfaceId,
|
|
@@ -18618,7 +18777,7 @@ function useFindReplace({ getSurfaceManager, getActiveEditor, activeEditorRef, g
|
|
|
18618
18777
|
/** @type {object | undefined} */
|
|
18619
18778
|
let FindReplaceSurface;
|
|
18620
18779
|
try {
|
|
18621
|
-
FindReplaceSurface = (await import("./chunks/FindReplaceSurface-
|
|
18780
|
+
FindReplaceSurface = (await import("./chunks/FindReplaceSurface-RUiTFDt3.es.js")).default;
|
|
18622
18781
|
} catch {
|
|
18623
18782
|
opening = false;
|
|
18624
18783
|
return;
|
|
@@ -18973,7 +19132,7 @@ var toolbarIcons = {
|
|
|
18973
19132
|
};
|
|
18974
19133
|
//#endregion
|
|
18975
19134
|
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
18976
|
-
var _hoisted_1$
|
|
19135
|
+
var _hoisted_1$20 = {
|
|
18977
19136
|
key: 0,
|
|
18978
19137
|
class: "link-title"
|
|
18979
19138
|
};
|
|
@@ -18985,11 +19144,11 @@ var _hoisted_3$13 = {
|
|
|
18985
19144
|
key: 2,
|
|
18986
19145
|
class: "link-title"
|
|
18987
19146
|
};
|
|
18988
|
-
var _hoisted_4$
|
|
19147
|
+
var _hoisted_4$9 = {
|
|
18989
19148
|
key: 3,
|
|
18990
19149
|
class: "link-title"
|
|
18991
19150
|
};
|
|
18992
|
-
var _hoisted_5$
|
|
19151
|
+
var _hoisted_5$7 = {
|
|
18993
19152
|
key: 4,
|
|
18994
19153
|
class: "link-input-wrapper"
|
|
18995
19154
|
};
|
|
@@ -19228,8 +19387,8 @@ var LinkInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
19228
19387
|
};
|
|
19229
19388
|
return (_ctx, _cache) => {
|
|
19230
19389
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["link-input-ctn", { "high-contrast": unref(isHighContrastMode) }]) }, [
|
|
19231
|
-
isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
19232
|
-
__props.showInput && !isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
19390
|
+
isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_1$20, "Page anchor")) : isViewingMode.value ? (openBlock(), createElementBlock("div", _hoisted_2$16, "Link details")) : isEditing.value ? (openBlock(), createElementBlock("div", _hoisted_3$13, "Edit link")) : (openBlock(), createElementBlock("div", _hoisted_4$9, "Add link")),
|
|
19391
|
+
__props.showInput && !isAnchor.value ? (openBlock(), createElementBlock("div", _hoisted_5$7, [
|
|
19233
19392
|
createElementVNode("div", _hoisted_6$5, [_cache[5] || (_cache[5] = createElementVNode("div", { class: "input-icon text-input-icon" }, "T", -1)), withDirectives(createElementVNode("input", {
|
|
19234
19393
|
type: "text",
|
|
19235
19394
|
name: "text",
|
|
@@ -19329,6 +19488,7 @@ function scrollToElement(targetElement, options = {
|
|
|
19329
19488
|
/** @typedef {import('../core/types/index.js').Editor} Editor */
|
|
19330
19489
|
/** @typedef {import('../public/ui/types.js').SuperDocUI} SuperDocUI */
|
|
19331
19490
|
/** @typedef {import('@superdoc/document-api').HyperlinkTarget} HyperlinkTarget */
|
|
19491
|
+
/** @typedef {{ getHandles?: () => { editing?: { input?: { runAfterPendingInput?: (action: (signal?: AbortSignal) => Promise<boolean>) => Promise<boolean> } } } }} LinkNavigationHost */
|
|
19332
19492
|
/**
|
|
19333
19493
|
* A single-block text-selection target in the Document API `query.match`
|
|
19334
19494
|
* result shape.
|
|
@@ -19887,6 +20047,26 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19887
20047
|
const anchorName = decodeAnchorFragment(anchorUrl.slice(1));
|
|
19888
20048
|
const editor = getActiveEditor();
|
|
19889
20049
|
const generation = openGeneration;
|
|
20050
|
+
/** @param {AbortSignal} [signal] */
|
|
20051
|
+
const navigate = (signal) => navigateAnchorInEditor(anchorName, editor, generation, placeCaret, revalidateCaretAfterReveal, signal);
|
|
20052
|
+
if (revalidateCaretAfterReveal) try {
|
|
20053
|
+
const input = (editor?.host)?.getHandles?.()?.editing?.input;
|
|
20054
|
+
if (typeof input?.runAfterPendingInput === "function") return await input.runAfterPendingInput(navigate);
|
|
20055
|
+
} catch {
|
|
20056
|
+
return false;
|
|
20057
|
+
}
|
|
20058
|
+
return navigate();
|
|
20059
|
+
}
|
|
20060
|
+
/**
|
|
20061
|
+
* @param {string} anchorName
|
|
20062
|
+
* @param {Editor | null | undefined} editor
|
|
20063
|
+
* @param {number} generation
|
|
20064
|
+
* @param {boolean} placeCaret
|
|
20065
|
+
* @param {boolean} revalidateCaretAfterReveal
|
|
20066
|
+
* @param {AbortSignal} [signal]
|
|
20067
|
+
*/
|
|
20068
|
+
async function navigateAnchorInEditor(anchorName, editor, generation, placeCaret, revalidateCaretAfterReveal, signal) {
|
|
20069
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19890
20070
|
/** @type {LinkPopoverDocumentApi | null | undefined} */
|
|
19891
20071
|
const doc = editor?.doc;
|
|
19892
20072
|
const bookmarkGet = doc?.bookmarks?.get;
|
|
@@ -19903,14 +20083,16 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19903
20083
|
try {
|
|
19904
20084
|
const list = doc?.bookmarks?.list;
|
|
19905
20085
|
if (typeof list === "function") {
|
|
19906
|
-
|
|
20086
|
+
const catalog = await Promise.resolve(list.call(doc.bookmarks));
|
|
20087
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
20088
|
+
if (catalog?.items?.filter((item) => item.name === anchorName).length !== 1) return null;
|
|
19907
20089
|
}
|
|
19908
20090
|
const bookmark = await Promise.resolve(bookmarkGet.call(doc.bookmarks, { target: {
|
|
19909
20091
|
kind: "entity",
|
|
19910
20092
|
entityType: "bookmark",
|
|
19911
20093
|
name: anchorName
|
|
19912
20094
|
} }));
|
|
19913
|
-
if (editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
20095
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
19914
20096
|
const story = bookmark?.address?.story;
|
|
19915
20097
|
if (story && story.storyType !== "body" || bookmark?.tableColumn) return null;
|
|
19916
20098
|
const blockId = bookmark?.range?.from?.blockId;
|
|
@@ -19925,41 +20107,44 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19925
20107
|
}
|
|
19926
20108
|
}
|
|
19927
20109
|
let position = await readBodyBookmark();
|
|
19928
|
-
if (!position) return false;
|
|
20110
|
+
if (!position || signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19929
20111
|
if (placeCaret && !revalidateCaretAfterReveal) await placeCaretAtBookmark(position.blockId, position.offset);
|
|
19930
20112
|
const viewport = getUi()?.viewport;
|
|
19931
20113
|
const scrollIntoView = viewport?.scrollIntoView;
|
|
19932
20114
|
if (typeof scrollIntoView !== "function") return false;
|
|
19933
|
-
for (let step = 0; step < MAX_ANCHOR_NAVIGATION_STEPS; step += 1)
|
|
19934
|
-
|
|
19935
|
-
|
|
19936
|
-
|
|
19937
|
-
|
|
19938
|
-
|
|
19939
|
-
|
|
19940
|
-
|
|
19941
|
-
|
|
19942
|
-
|
|
19943
|
-
|
|
19944
|
-
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
|
|
19948
|
-
|
|
19949
|
-
if (
|
|
19950
|
-
|
|
19951
|
-
if (
|
|
19952
|
-
|
|
19953
|
-
|
|
19954
|
-
|
|
20115
|
+
for (let step = 0; step < MAX_ANCHOR_NAVIGATION_STEPS; step += 1) {
|
|
20116
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20117
|
+
try {
|
|
20118
|
+
const target = {
|
|
20119
|
+
kind: "text",
|
|
20120
|
+
blockId: position.blockId,
|
|
20121
|
+
range: {
|
|
20122
|
+
start: position.offset,
|
|
20123
|
+
end: position.offset
|
|
20124
|
+
}
|
|
20125
|
+
};
|
|
20126
|
+
const result = await Promise.resolve(scrollIntoView.call(viewport, {
|
|
20127
|
+
target,
|
|
20128
|
+
block: "start",
|
|
20129
|
+
behavior: "instant"
|
|
20130
|
+
}));
|
|
20131
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20132
|
+
if (result?.success !== false) {
|
|
20133
|
+
if (revalidateCaretAfterReveal) {
|
|
20134
|
+
const current = await readBodyBookmark();
|
|
20135
|
+
if (!current || signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20136
|
+
if (current.blockId !== position.blockId || current.offset !== position.offset) {
|
|
20137
|
+
position = current;
|
|
20138
|
+
continue;
|
|
20139
|
+
}
|
|
20140
|
+
if (placeCaret) await placeCaretAtBookmark(current.blockId, current.offset);
|
|
20141
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19955
20142
|
}
|
|
19956
|
-
|
|
19957
|
-
if (editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20143
|
+
return true;
|
|
19958
20144
|
}
|
|
19959
|
-
|
|
20145
|
+
} catch {
|
|
20146
|
+
return false;
|
|
19960
20147
|
}
|
|
19961
|
-
} catch {
|
|
19962
|
-
return false;
|
|
19963
20148
|
}
|
|
19964
20149
|
return false;
|
|
19965
20150
|
}
|
|
@@ -21646,7 +21831,7 @@ var FOCUSABLE_SELECTOR = [
|
|
|
21646
21831
|
].join(", ");
|
|
21647
21832
|
//#endregion
|
|
21648
21833
|
//#region src/components/surfaces/SurfaceDialog.vue
|
|
21649
|
-
var _hoisted_1$
|
|
21834
|
+
var _hoisted_1$19 = ["aria-labelledby", "aria-label"];
|
|
21650
21835
|
var _hoisted_2$15 = ["id"];
|
|
21651
21836
|
var _hoisted_3$12 = { class: "sd-surface-dialog__content" };
|
|
21652
21837
|
var SurfaceDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
@@ -21794,13 +21979,13 @@ var SurfaceDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
21794
21979
|
"render",
|
|
21795
21980
|
"resolve",
|
|
21796
21981
|
"close"
|
|
21797
|
-
])) : __props.surface.component ? (openBlock(), createBlock(resolveDynamicComponent(__props.surface.component), normalizeProps(mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : createCommentVNode("", true)])], 12, _hoisted_1$
|
|
21982
|
+
])) : __props.surface.component ? (openBlock(), createBlock(resolveDynamicComponent(__props.surface.component), normalizeProps(mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : createCommentVNode("", true)])], 12, _hoisted_1$19)], 32);
|
|
21798
21983
|
};
|
|
21799
21984
|
}
|
|
21800
21985
|
}, [["__scopeId", "data-v-5cee3b11"]]);
|
|
21801
21986
|
//#endregion
|
|
21802
21987
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
21803
|
-
var _hoisted_1$
|
|
21988
|
+
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
21804
21989
|
var _hoisted_2$14 = ["id"];
|
|
21805
21990
|
var _hoisted_3$11 = { class: "sd-surface-floating__content" };
|
|
21806
21991
|
var SurfaceFloating_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
@@ -21948,7 +22133,7 @@ var SurfaceFloating_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
21948
22133
|
"render",
|
|
21949
22134
|
"resolve",
|
|
21950
22135
|
"close"
|
|
21951
|
-
])) : __props.surface.component ? (openBlock(), createBlock(resolveDynamicComponent(__props.surface.component), normalizeProps(mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : createCommentVNode("", true)])], 14, _hoisted_1$
|
|
22136
|
+
])) : __props.surface.component ? (openBlock(), createBlock(resolveDynamicComponent(__props.surface.component), normalizeProps(mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : createCommentVNode("", true)])], 14, _hoisted_1$18);
|
|
21952
22137
|
};
|
|
21953
22138
|
}
|
|
21954
22139
|
}, [["__scopeId", "data-v-cd2be5db"]]);
|
|
@@ -22176,9 +22361,10 @@ var SurfaceHost_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22176
22361
|
}, [["__scopeId", "data-v-dad99b67"]]);
|
|
22177
22362
|
//#endregion
|
|
22178
22363
|
//#region src/SuperDoc.vue
|
|
22179
|
-
var _hoisted_1$
|
|
22180
|
-
var _hoisted_2$13 =
|
|
22181
|
-
var _hoisted_3$10 = { class: "
|
|
22364
|
+
var _hoisted_1$17 = ["data-superdoc-ui-owner"];
|
|
22365
|
+
var _hoisted_2$13 = ["innerHTML"];
|
|
22366
|
+
var _hoisted_3$10 = { class: "superdoc__document document" };
|
|
22367
|
+
var _hoisted_4$8 = { class: "floating-comments" };
|
|
22182
22368
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
22183
22369
|
var UNAVAILABLE_COMMAND_RESULT = false;
|
|
22184
22370
|
var V2_SELECTION_TOOLBAR_SYNC_RETRY_FRAMES = 3;
|
|
@@ -22186,7 +22372,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22186
22372
|
__name: "SuperDoc",
|
|
22187
22373
|
emits: ["selection-update"],
|
|
22188
22374
|
setup(__props, { emit: __emit }) {
|
|
22189
|
-
const PdfViewer = defineAsyncComponent(() => import("./chunks/PdfViewer-
|
|
22375
|
+
const PdfViewer = defineAsyncComponent(() => import("./chunks/PdfViewer-DjdsIh6n.es.js"));
|
|
22190
22376
|
const getDocumentLoadPassword = (doc) => doc.password ?? proxy.$superdoc.config.password;
|
|
22191
22377
|
const resolveDocumentV2Collaboration = (doc) => {
|
|
22192
22378
|
const rawConfig = doc?.v2Collaboration;
|
|
@@ -22533,6 +22719,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22533
22719
|
documentId: ctx?.documentId,
|
|
22534
22720
|
commentItems: result?.comments?.items,
|
|
22535
22721
|
trackedChangeItems: result?.trackedChanges?.items,
|
|
22722
|
+
preparedReview: result?.preparedReview,
|
|
22536
22723
|
requestedCommentIds: result?.comments?.requestedIds,
|
|
22537
22724
|
requestedTrackedChangeIds: result?.trackedChanges?.requestedIds,
|
|
22538
22725
|
unresolvedCommentIds: result?.comments?.unresolvedCommentIds,
|
|
@@ -22723,7 +22910,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
22723
22910
|
if (typeof selectionTargets?.apply !== "function") return createV2AuthoringFailure("selection-target-unavailable", "editing.selectionTargets.apply is not available");
|
|
22724
22911
|
let result;
|
|
22725
22912
|
try {
|
|
22726
|
-
result = selectionTargets.apply(selectionTarget);
|
|
22913
|
+
result = await (selectionTargets.applyAndWait ?? selectionTargets.apply).call(selectionTargets, selectionTarget);
|
|
22727
22914
|
} catch (error) {
|
|
22728
22915
|
const message = error instanceof Error ? error.message : String(error);
|
|
22729
22916
|
return createV2AuthoringFailure("selection-target-threw", message);
|
|
@@ -23651,7 +23838,6 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
23651
23838
|
const onFontsResolvedFn = proxy.$superdoc.listeners?.("fonts-resolved")?.length > 0 ? proxy.$superdoc.listeners("fonts-resolved")[0] : null;
|
|
23652
23839
|
const useLayoutEngine = proxy.$superdoc.config.useLayoutEngine !== false;
|
|
23653
23840
|
const isNewFile = doc.isNewFile;
|
|
23654
|
-
const benchmarkExecutionMode = proxy.$superdoc.config?.benchmarkExecutionMode;
|
|
23655
23841
|
const benchmarkTraceEnabled = proxy.$superdoc.config?.benchmarkTraceEnabled === true;
|
|
23656
23842
|
const collaborationResolution = resolveDocumentV2Collaboration(doc);
|
|
23657
23843
|
const v2Collaboration = collaborationResolution.state === "valid" ? collaborationResolution.config : null;
|
|
@@ -23668,7 +23854,6 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
23668
23854
|
html: doc.html,
|
|
23669
23855
|
markdown: doc.markdown,
|
|
23670
23856
|
documentMode: proxy.$superdoc.config.documentMode,
|
|
23671
|
-
...benchmarkExecutionMode ? { benchmarkExecutionMode } : {},
|
|
23672
23857
|
...benchmarkTraceEnabled ? { benchmarkTraceEnabled: true } : {},
|
|
23673
23858
|
allowSelectionInViewMode: proxy.$superdoc.config.allowSelectionInViewMode,
|
|
23674
23859
|
rulers: doc.rulers,
|
|
@@ -24607,6 +24792,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24607
24792
|
"superdoc--contained": unref(proxy).$superdoc.config.contained,
|
|
24608
24793
|
"high-contrast": unref(isHighContrastMode)
|
|
24609
24794
|
}]),
|
|
24795
|
+
"data-superdoc-ui-owner": unref(getSuperDocUiOwnerId)(unref(proxy).$superdoc),
|
|
24610
24796
|
style: normalizeStyle(superdocStyleVars.value),
|
|
24611
24797
|
onKeydown: handleContainerKeydown
|
|
24612
24798
|
}, [
|
|
@@ -24626,7 +24812,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24626
24812
|
}, [createElementVNode("div", {
|
|
24627
24813
|
class: "superdoc__tools-icon",
|
|
24628
24814
|
innerHTML: unref(superdocIcons).comment
|
|
24629
|
-
}, null, 8,
|
|
24815
|
+
}, null, 8, _hoisted_2$13)], 32)], 4)) : createCommentVNode("", true), createElementVNode("div", _hoisted_3$10, [
|
|
24630
24816
|
isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
|
|
24631
24817
|
key: 0,
|
|
24632
24818
|
class: "superdoc__selection-layer selection-layer",
|
|
@@ -24761,7 +24947,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24761
24947
|
ref_key: "rightSidebarRef",
|
|
24762
24948
|
ref: rightSidebarRef,
|
|
24763
24949
|
class: "superdoc__right-sidebar right-sidebar"
|
|
24764
|
-
}, [createElementVNode("div",
|
|
24950
|
+
}, [createElementVNode("div", _hoisted_4$8, [unref(hasInitializedLocations) && (floatingComments.value.length > 0 || unref(pendingComment)) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc) => {
|
|
24765
24951
|
return openBlock(), createBlock(FloatingComments_default, {
|
|
24766
24952
|
parent: layers.value,
|
|
24767
24953
|
"current-document": doc
|
|
@@ -24776,10 +24962,10 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24776
24962
|
parent: layers.value
|
|
24777
24963
|
}, null, 8, ["comment", "parent"])], 4)) : createCommentVNode("", true),
|
|
24778
24964
|
createVNode(SurfaceHost_default, { "geometry-target": layers.value }, null, 8, ["geometry-target"])
|
|
24779
|
-
],
|
|
24965
|
+
], 46, _hoisted_1$17);
|
|
24780
24966
|
};
|
|
24781
24967
|
}
|
|
24782
|
-
}, [["__scopeId", "data-v-
|
|
24968
|
+
}, [["__scopeId", "data-v-c843616f"]]);
|
|
24783
24969
|
//#endregion
|
|
24784
24970
|
//#region src/core/create-app.js
|
|
24785
24971
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -39322,7 +39508,7 @@ var throttle = (func, wait, options) => {
|
|
|
39322
39508
|
};
|
|
39323
39509
|
//#endregion
|
|
39324
39510
|
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
39325
|
-
var _hoisted_1$
|
|
39511
|
+
var _hoisted_1$16 = { class: "sd-toolbar-icon" };
|
|
39326
39512
|
var _hoisted_2$12 = ["innerHTML"];
|
|
39327
39513
|
var ToolbarButtonIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
39328
39514
|
__name: "ToolbarButtonIcon",
|
|
@@ -39350,7 +39536,7 @@ var ToolbarButtonIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
39350
39536
|
return ["color", "highlight"].includes(props.name);
|
|
39351
39537
|
});
|
|
39352
39538
|
return (_ctx, _cache) => {
|
|
39353
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
39539
|
+
return openBlock(), createElementBlock("div", _hoisted_1$16, [createElementVNode("div", {
|
|
39354
39540
|
class: normalizeClass(["sd-toolbar-icon__icon", [`sd-toolbar-icon__icon--${props.name}`]]),
|
|
39355
39541
|
innerHTML: __props.icon
|
|
39356
39542
|
}, null, 10, _hoisted_2$12), hasColorBar.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -39363,7 +39549,7 @@ var ToolbarButtonIcon_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
39363
39549
|
}, [["__scopeId", "data-v-65ecd5b1"]]);
|
|
39364
39550
|
//#endregion
|
|
39365
39551
|
//#region src/internal/toolbar/built-in/ToolbarButton.vue
|
|
39366
|
-
var _hoisted_1$
|
|
39552
|
+
var _hoisted_1$15 = [
|
|
39367
39553
|
"role",
|
|
39368
39554
|
"aria-label",
|
|
39369
39555
|
"aria-disabled"
|
|
@@ -39374,7 +39560,7 @@ var _hoisted_4$7 = {
|
|
|
39374
39560
|
key: 1,
|
|
39375
39561
|
class: "sd-button-label"
|
|
39376
39562
|
};
|
|
39377
|
-
var _hoisted_5$
|
|
39563
|
+
var _hoisted_5$6 = ["data-item", "aria-label"];
|
|
39378
39564
|
var _hoisted_6$4 = ["innerHTML"];
|
|
39379
39565
|
var _hoisted_7$2 = { key: 2 };
|
|
39380
39566
|
var _hoisted_8$2 = ["onKeydown", "id"];
|
|
@@ -39602,7 +39788,7 @@ var ToolbarButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
39602
39788
|
class: "sd-dropdown-caret",
|
|
39603
39789
|
innerHTML: caretIcon.value,
|
|
39604
39790
|
style: normalizeStyle({ opacity: unref(disabled) ? .6 : 1 })
|
|
39605
|
-
}, null, 12, _hoisted_6$4)], 8, _hoisted_5$
|
|
39791
|
+
}, null, 12, _hoisted_6$4)], 8, _hoisted_5$6)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
39606
39792
|
unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon_default, {
|
|
39607
39793
|
key: 0,
|
|
39608
39794
|
color: unref(iconColor),
|
|
@@ -39657,13 +39843,13 @@ var ToolbarButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
39657
39843
|
}, null, 12, _hoisted_10$1)) : createCommentVNode("", true)
|
|
39658
39844
|
], 64)),
|
|
39659
39845
|
createElementVNode("div", _hoisted_11$1, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
|
|
39660
|
-
], 10, _hoisted_2$11)], 46, _hoisted_1$
|
|
39846
|
+
], 10, _hoisted_2$11)], 46, _hoisted_1$15);
|
|
39661
39847
|
};
|
|
39662
39848
|
}
|
|
39663
39849
|
}, [["__scopeId", "data-v-96796456"]]);
|
|
39664
39850
|
//#endregion
|
|
39665
39851
|
//#region src/internal/toolbar/built-in/ToolbarSeparator.vue
|
|
39666
|
-
var _hoisted_1$
|
|
39852
|
+
var _hoisted_1$14 = {
|
|
39667
39853
|
class: "toolbar-separator",
|
|
39668
39854
|
role: "separator",
|
|
39669
39855
|
"aria-label": "Toolbar separator"
|
|
@@ -39682,7 +39868,7 @@ var ToolbarSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
39682
39868
|
return "var(--sd-ui-border, #dbdbdb)";
|
|
39683
39869
|
};
|
|
39684
39870
|
return (_ctx, _cache) => {
|
|
39685
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
39871
|
+
return openBlock(), createElementBlock("div", _hoisted_1$14, [createElementVNode("div", {
|
|
39686
39872
|
class: "separator-inner",
|
|
39687
39873
|
style: normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
39688
39874
|
}, null, 4)]);
|
|
@@ -39691,13 +39877,14 @@ var ToolbarSeparator_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
39691
39877
|
}, [["__scopeId", "data-v-cb82253a"]]);
|
|
39692
39878
|
//#endregion
|
|
39693
39879
|
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
39694
|
-
var _hoisted_1$
|
|
39695
|
-
var _hoisted_2$10 = ["
|
|
39696
|
-
var _hoisted_3$8 =
|
|
39880
|
+
var _hoisted_1$13 = { class: "toolbar-dropdown" };
|
|
39881
|
+
var _hoisted_2$10 = ["data-superdoc-ui-owner"];
|
|
39882
|
+
var _hoisted_3$8 = ["onClick"];
|
|
39883
|
+
var _hoisted_4$6 = {
|
|
39697
39884
|
key: 0,
|
|
39698
39885
|
class: "toolbar-dropdown-option__icon"
|
|
39699
39886
|
};
|
|
39700
|
-
var
|
|
39887
|
+
var _hoisted_5$5 = { class: "toolbar-dropdown-option__label" };
|
|
39701
39888
|
var TRIGGER_FOCUS_SELECTOR = "button, [href], input, select, textarea, [role=\"button\"], [tabindex]:not([tabindex=\"-1\"])";
|
|
39702
39889
|
var ToolbarDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
39703
39890
|
__name: "ToolbarDropdown",
|
|
@@ -39744,6 +39931,7 @@ var ToolbarDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
39744
39931
|
const props = __props;
|
|
39745
39932
|
const emit = __emit;
|
|
39746
39933
|
const slots = useSlots();
|
|
39934
|
+
const toolbarOwnerId = inject$1("sdToolbarOwnerId", null);
|
|
39747
39935
|
const triggerRef = ref(null);
|
|
39748
39936
|
const menuRef = ref(null);
|
|
39749
39937
|
const menuPosition = ref({
|
|
@@ -40046,7 +40234,7 @@ var ToolbarDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40046
40234
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
40047
40235
|
});
|
|
40048
40236
|
return (_ctx, _cache) => {
|
|
40049
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
40237
|
+
return openBlock(), createElementBlock("div", _hoisted_1$13, [createElementVNode("div", {
|
|
40050
40238
|
ref_key: "triggerRef",
|
|
40051
40239
|
ref: triggerRef,
|
|
40052
40240
|
class: "toolbar-dropdown-trigger",
|
|
@@ -40060,7 +40248,7 @@ var ToolbarDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40060
40248
|
"data-sd-part": "dropdown-menu",
|
|
40061
40249
|
class: mergedMenuClass.value,
|
|
40062
40250
|
style: menuStyle.value
|
|
40063
|
-
}, computedMenuAttrs.value), [hasCustomMenu.value ? renderSlot(_ctx.$slots, "menu", { key: 0 }, void 0, true) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(hasCustomMenu.value ? [] : __props.options, (option, index) => {
|
|
40251
|
+
}, computedMenuAttrs.value, { "data-superdoc-ui-owner": unref(toolbarOwnerId) }), [hasCustomMenu.value ? renderSlot(_ctx.$slots, "menu", { key: 0 }, void 0, true) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(hasCustomMenu.value ? [] : __props.options, (option, index) => {
|
|
40064
40252
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
40065
40253
|
key: option.key,
|
|
40066
40254
|
ref_for: true,
|
|
@@ -40081,13 +40269,13 @@ var ToolbarDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40081
40269
|
}), [isRenderOption(option) ? (openBlock(), createBlock(unref(RenderOption), {
|
|
40082
40270
|
key: 0,
|
|
40083
40271
|
option
|
|
40084
|
-
}, null, 8, ["option"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [hasIcon(option) ? (openBlock(), createElementBlock("span",
|
|
40085
|
-
}), 128))], 16)) : createCommentVNode("", true)]),
|
|
40272
|
+
}, null, 8, ["option"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [hasIcon(option) ? (openBlock(), createElementBlock("span", _hoisted_4$6, [createVNode(unref(OptionIcon), { option }, null, 8, ["option"])])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$5, toDisplayString(option.label), 1)], 64))], 16, _hoisted_3$8);
|
|
40273
|
+
}), 128))], 16, _hoisted_2$10)) : createCommentVNode("", true)]),
|
|
40086
40274
|
_: 3
|
|
40087
40275
|
})], 8, ["to"]))]);
|
|
40088
40276
|
};
|
|
40089
40277
|
}
|
|
40090
|
-
}, [["__scopeId", "data-v-
|
|
40278
|
+
}, [["__scopeId", "data-v-e6f71d76"]]);
|
|
40091
40279
|
//#endregion
|
|
40092
40280
|
//#region src/internal/toolbar/built-in/toolbar-focus-helpers.js
|
|
40093
40281
|
var preventEditorFocusTransfer = (event) => {
|
|
@@ -40309,7 +40497,7 @@ var normalizeCustomFontSize = (value) => {
|
|
|
40309
40497
|
};
|
|
40310
40498
|
//#endregion
|
|
40311
40499
|
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
40312
|
-
var _hoisted_1$
|
|
40500
|
+
var _hoisted_1$12 = ["data-item"];
|
|
40313
40501
|
var _hoisted_2$9 = [
|
|
40314
40502
|
"id",
|
|
40315
40503
|
"value",
|
|
@@ -40326,7 +40514,11 @@ var _hoisted_3$7 = [
|
|
|
40326
40514
|
"disabled"
|
|
40327
40515
|
];
|
|
40328
40516
|
var _hoisted_4$5 = ["innerHTML"];
|
|
40329
|
-
var _hoisted_5$4 = [
|
|
40517
|
+
var _hoisted_5$4 = [
|
|
40518
|
+
"data-superdoc-ui-owner",
|
|
40519
|
+
"id",
|
|
40520
|
+
"aria-label"
|
|
40521
|
+
];
|
|
40330
40522
|
var _hoisted_6$3 = [
|
|
40331
40523
|
"id",
|
|
40332
40524
|
"aria-selected",
|
|
@@ -40369,6 +40561,7 @@ var ToolbarComboBox_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40369
40561
|
const props = __props;
|
|
40370
40562
|
const emit = __emit;
|
|
40371
40563
|
const { isHighContrastMode } = useHighContrastMode();
|
|
40564
|
+
const toolbarOwnerId = inject$1("sdToolbarOwnerId", null);
|
|
40372
40565
|
const inputRef = ref(null);
|
|
40373
40566
|
const rootRef = ref(null);
|
|
40374
40567
|
const popupRef = ref(null);
|
|
@@ -40795,6 +40988,7 @@ var ToolbarComboBox_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40795
40988
|
ref: popupRef,
|
|
40796
40989
|
role: "listbox",
|
|
40797
40990
|
"data-sd-part": "dropdown-menu",
|
|
40991
|
+
"data-superdoc-ui-owner": unref(toolbarOwnerId),
|
|
40798
40992
|
id: listboxId.value,
|
|
40799
40993
|
"aria-label": ariaLabel.value,
|
|
40800
40994
|
class: normalizeClass(["sd-font-combobox__listbox", { "high-contrast": unref(isHighContrastMode) }]),
|
|
@@ -40820,10 +41014,10 @@ var ToolbarComboBox_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
40820
41014
|
}), [createElementVNode("span", _hoisted_7$1, toDisplayString(option.label), 1)], 16, _hoisted_6$3);
|
|
40821
41015
|
}), 128))], 14, _hoisted_5$4)) : createCommentVNode("", true)])),
|
|
40822
41016
|
createElementVNode("span", _hoisted_8$1, toDisplayString(appliedLabel.value), 1)
|
|
40823
|
-
], 14, _hoisted_1$
|
|
41017
|
+
], 14, _hoisted_1$12);
|
|
40824
41018
|
};
|
|
40825
41019
|
}
|
|
40826
|
-
}, [["__scopeId", "data-v-
|
|
41020
|
+
}, [["__scopeId", "data-v-eb442535"]]);
|
|
40827
41021
|
//#endregion
|
|
40828
41022
|
//#region src/internal/toolbar/built-in/FontFamilyCombobox.vue
|
|
40829
41023
|
var _sfc_main$14 = {
|
|
@@ -41126,7 +41320,7 @@ var SdTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
41126
41320
|
}), [["__scopeId", "data-v-71c6de4c"]]);
|
|
41127
41321
|
//#endregion
|
|
41128
41322
|
//#region src/internal/toolbar/built-in/ButtonGroup.vue
|
|
41129
|
-
var _hoisted_1$
|
|
41323
|
+
var _hoisted_1$11 = [
|
|
41130
41324
|
"onKeydown",
|
|
41131
41325
|
"tabindex",
|
|
41132
41326
|
"data-item-id"
|
|
@@ -41622,7 +41816,7 @@ var ButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
41622
41816
|
"onButtonClick",
|
|
41623
41817
|
"overflow-items"
|
|
41624
41818
|
])) : createCommentVNode("", true)
|
|
41625
|
-
], 42, _hoisted_1$
|
|
41819
|
+
], 42, _hoisted_1$11);
|
|
41626
41820
|
}), 128))], 36);
|
|
41627
41821
|
};
|
|
41628
41822
|
}
|
|
@@ -41811,6 +42005,7 @@ var NON_HEADLESS_EXECUTE_ITEM_NAMES = /* @__PURE__ */ new Set(["link"]);
|
|
|
41811
42005
|
new Set(Object.keys(HEADLESS_ITEM_MAP).filter((itemName) => !NON_HEADLESS_EXECUTE_ITEM_NAMES.has(itemName)));
|
|
41812
42006
|
//#endregion
|
|
41813
42007
|
//#region src/internal/toolbar/built-in/Toolbar.vue
|
|
42008
|
+
var _hoisted_1$10 = ["data-superdoc-ui-owner"];
|
|
41814
42009
|
/**
|
|
41815
42010
|
* The default font-family to use for toolbar UI surfaces when no custom font is configured.
|
|
41816
42011
|
* This constant ensures consistency across the toolbar application.
|
|
@@ -41826,6 +42021,7 @@ var Toolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
41826
42021
|
],
|
|
41827
42022
|
setup(__props, { emit: __emit }) {
|
|
41828
42023
|
const { proxy } = getCurrentInstance();
|
|
42024
|
+
provide$1("sdToolbarOwnerId", getSuperDocUiOwnerId(proxy.$toolbar.superdoc));
|
|
41829
42025
|
let toolbarKey = ref(1);
|
|
41830
42026
|
const toolbarRoot = ref(null);
|
|
41831
42027
|
const toolbarStateVersion = ref(0);
|
|
@@ -41970,6 +42166,7 @@ var Toolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
41970
42166
|
"aria-label": "Toolbar",
|
|
41971
42167
|
"data-sd-part": "toolbar",
|
|
41972
42168
|
"data-editor-ui-surface": "",
|
|
42169
|
+
"data-superdoc-ui-owner": unref(getSuperDocUiOwnerId)(unref(proxy).$toolbar.superdoc),
|
|
41973
42170
|
onMousedown: handleToolbarMousedown
|
|
41974
42171
|
}, [
|
|
41975
42172
|
unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup_default, {
|
|
@@ -42018,10 +42215,10 @@ var Toolbar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
42018
42215
|
"compact-side-groups",
|
|
42019
42216
|
"ui-font-family"
|
|
42020
42217
|
])) : createCommentVNode("", true)
|
|
42021
|
-
],
|
|
42218
|
+
], 40, _hoisted_1$10);
|
|
42022
42219
|
};
|
|
42023
42220
|
}
|
|
42024
|
-
}, [["__scopeId", "data-v-
|
|
42221
|
+
}, [["__scopeId", "data-v-0790fc37"]]);
|
|
42025
42222
|
//#endregion
|
|
42026
42223
|
//#region src/internal/toolbar/built-in/font-options.js
|
|
42027
42224
|
/**
|
|
@@ -46328,6 +46525,8 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46328
46525
|
return this.#surfacesConfig;
|
|
46329
46526
|
}
|
|
46330
46527
|
#surfaceManager;
|
|
46528
|
+
#sourceLifecycleReady;
|
|
46529
|
+
#pendingSourceLifecycle;
|
|
46331
46530
|
/**
|
|
46332
46531
|
* SuperDoc-owned editor runtime registry. This is the internal place to ask
|
|
46333
46532
|
* which mounted editor runtime is active and which runtime owns a DOM event
|
|
@@ -46400,6 +46599,8 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46400
46599
|
this.whiteboard = null;
|
|
46401
46600
|
this.colors = [];
|
|
46402
46601
|
this.readyEditors = 0;
|
|
46602
|
+
this.#sourceLifecycleReady = false;
|
|
46603
|
+
this.#pendingSourceLifecycle = [];
|
|
46403
46604
|
this.#editorRuntimeRegistry = new EditorRuntimeRegistry();
|
|
46404
46605
|
this.#editorRuntimeRegistryUnsub = null;
|
|
46405
46606
|
this.#applyingRuntimeActiveChange = false;
|
|
@@ -46553,7 +46754,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46553
46754
|
}
|
|
46554
46755
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46555
46756
|
this.colorIndex = 0;
|
|
46556
|
-
this.version = "2.25.0-next.
|
|
46757
|
+
this.version = "2.25.0-next.11";
|
|
46557
46758
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46558
46759
|
this.superdocId = config.superdocId || v4();
|
|
46559
46760
|
this.colors = this.config.colors ?? [];
|
|
@@ -46590,6 +46791,8 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46590
46791
|
* Mount the Vue app, stores, and editor runtime.
|
|
46591
46792
|
*/
|
|
46592
46793
|
#startRuntime() {
|
|
46794
|
+
this.#sourceLifecycleReady = false;
|
|
46795
|
+
this.#pendingSourceLifecycle = [];
|
|
46593
46796
|
this.#initVueApp();
|
|
46594
46797
|
this.readyEditors = 0;
|
|
46595
46798
|
if (!this.app) throw new Error("SuperDoc: #startRuntime called before #initVueApp populated this.app");
|
|
@@ -47625,7 +47828,13 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
47625
47828
|
* Triggered when the superdoc is ready
|
|
47626
47829
|
*/
|
|
47627
47830
|
broadcastReady() {
|
|
47628
|
-
if (this
|
|
47831
|
+
if (this.#destroyed) return;
|
|
47832
|
+
if (this.readyEditors === this.requiredNumberOfEditors) {
|
|
47833
|
+
this.emit("ready", { superdoc: this });
|
|
47834
|
+
if (this.#destroyed) return;
|
|
47835
|
+
this.#sourceLifecycleReady = true;
|
|
47836
|
+
for (const type of this.#pendingSourceLifecycle.splice(0)) this.emit(type);
|
|
47837
|
+
}
|
|
47629
47838
|
}
|
|
47630
47839
|
/**
|
|
47631
47840
|
* Triggered before an editor is created
|
|
@@ -47644,11 +47853,19 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
47644
47853
|
this.#wireFontsChangedRelay(editor);
|
|
47645
47854
|
this.emit("editorCreate", { editor: createDeprecatedEditorProxy(editor) });
|
|
47646
47855
|
}
|
|
47856
|
+
#broadcastSourceLifecycle(type) {
|
|
47857
|
+
if (this.#destroyed) return;
|
|
47858
|
+
if (!this.#sourceLifecycleReady) {
|
|
47859
|
+
this.#pendingSourceLifecycle.push(type);
|
|
47860
|
+
return;
|
|
47861
|
+
}
|
|
47862
|
+
this.emit(type);
|
|
47863
|
+
}
|
|
47647
47864
|
broadcastSourceComplete() {
|
|
47648
|
-
this
|
|
47865
|
+
this.#broadcastSourceLifecycle("source:complete");
|
|
47649
47866
|
}
|
|
47650
47867
|
broadcastSourceSignalsComplete() {
|
|
47651
|
-
this
|
|
47868
|
+
this.#broadcastSourceLifecycle("source:signals-complete");
|
|
47652
47869
|
}
|
|
47653
47870
|
/** Editors whose `fonts-changed` we already relay, so a repeated create wires once. */
|
|
47654
47871
|
#fontsRelayEditors;
|
|
@@ -48910,6 +49127,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
48910
49127
|
destroy() {
|
|
48911
49128
|
closeInteractionHistory(this);
|
|
48912
49129
|
this.#destroyed = true;
|
|
49130
|
+
this.#pendingSourceLifecycle = [];
|
|
48913
49131
|
this.#contentControlClickRoot?.removeEventListener("click", this.#handleContentControlClick, true);
|
|
48914
49132
|
this.#contentControlClickRoot?.removeEventListener("pointerdown", this.#handleContentControlPointerDown, true);
|
|
48915
49133
|
this.#contentControlClickRoot?.ownerDocument.removeEventListener("pointerup", this.#handleContentControlPointerEnd, true);
|
|
@@ -49137,4 +49355,4 @@ function defineSuperDocExtension(extension) {
|
|
|
49137
49355
|
return extension;
|
|
49138
49356
|
}
|
|
49139
49357
|
//#endregion
|
|
49140
|
-
export { blank_default as BlankDOCX, DOCX, HTML, PDF, SuperDoc, buildTheme, compareVersions, createTheme, defineSuperDocExtension, getFileObject };
|
|
49358
|
+
export { blank_default as BlankDOCX, DOCX, HTML, PDF, SuperDoc, buildTheme, compareVersions, createTheme, defineSuperDocExtension, getFileObject, listPermissionRangeEditors, resolvePermissionRangeEditor };
|