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