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.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-ABeUNZlq.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
|
-
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-
|
|
7
|
+
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-BUdjGKyl.cjs");
|
|
8
8
|
const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
|
|
9
9
|
const require_constants = require("./chunks/constants-DpXuDx_g.cjs");
|
|
10
10
|
let superdoc_entry_vue = require("vue");
|
|
@@ -304,7 +304,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
304
304
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
305
305
|
function getSuperdocVersion() {
|
|
306
306
|
try {
|
|
307
|
-
return "2.25.0-next.
|
|
307
|
+
return "2.25.0-next.11";
|
|
308
308
|
} catch {
|
|
309
309
|
return "unknown";
|
|
310
310
|
}
|
|
@@ -7847,6 +7847,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
7847
7847
|
const editorCommentPositions = require__plugin_vue_export_helper.ref({});
|
|
7848
7848
|
const isCommentHighlighted = require__plugin_vue_export_helper.ref(false);
|
|
7849
7849
|
const floatingCommentsOffset = require__plugin_vue_export_helper.ref(0);
|
|
7850
|
+
const committedReviewPresentations = require__plugin_vue_export_helper.shallowRef({});
|
|
7850
7851
|
const sortedConversations = require__plugin_vue_export_helper.ref([]);
|
|
7851
7852
|
const visibleConversations = require__plugin_vue_export_helper.ref([]);
|
|
7852
7853
|
const skipSelectionUpdate = require__plugin_vue_export_helper.ref(false);
|
|
@@ -8514,6 +8515,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8514
8515
|
const commentCanonicalId = trackedComment.trackedChangeCanonicalId != null ? String(trackedComment.trackedChangeCanonicalId) : null;
|
|
8515
8516
|
const commentAliasIds = getCommentAliasIds(trackedComment);
|
|
8516
8517
|
const hasCompatibleStory = trackedChangeStoryKeysAreCompatible(getTrackedChangeStoryKey(trackedComment), incomingStoryKey);
|
|
8518
|
+
if (normalizedTrackedChangeCanonicalId && commentCanonicalId && normalizedTrackedChangeCanonicalId !== commentCanonicalId) return false;
|
|
8517
8519
|
if (hasCompatibleStory && commentAliasIds.includes(normalizedChangeId)) return true;
|
|
8518
8520
|
const incomingAliasIds = new Set(normalizedTrackedChangePositionAliases ?? []);
|
|
8519
8521
|
if (hasCompatibleStory && incomingAliasIds.size > 0 && [
|
|
@@ -8862,7 +8864,17 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8862
8864
|
resolvedComments: resolvedComments.sort(sorter)
|
|
8863
8865
|
};
|
|
8864
8866
|
};
|
|
8865
|
-
const buildGroupedComments = (sorter) =>
|
|
8867
|
+
const buildGroupedComments = (sorter) => {
|
|
8868
|
+
const presentations = committedReviewPresentations.value;
|
|
8869
|
+
if (!Object.keys(presentations).length) return buildGroupedCommentsFrom(commentsList.value, sorter);
|
|
8870
|
+
const rows = new Map(commentsList.value.map((row) => [JSON.stringify([String(row.fileId), String(row.commentId)]), row]));
|
|
8871
|
+
const legacy = buildGroupedCommentsFrom(commentsList.value.filter((row) => !presentations[String(row.fileId)]), sorter);
|
|
8872
|
+
for (const [documentId, presentation] of Object.entries(presentations)) {
|
|
8873
|
+
legacy.parentComments.push(...presentation.groupOrder.open.map((id) => rows.get(JSON.stringify([documentId, String(id)]))).filter((row) => row && isThreadVisible(row)));
|
|
8874
|
+
legacy.resolvedComments.push(...presentation.groupOrder.resolved.map((id) => rows.get(JSON.stringify([documentId, String(id)]))).filter((row) => row && isThreadVisible(row)));
|
|
8875
|
+
}
|
|
8876
|
+
return legacy;
|
|
8877
|
+
};
|
|
8866
8878
|
/** @type {import('vue').ComputedRef<{parentComments: Array, resolvedComments: Array}>} Comments grouped and sorted by creation time */
|
|
8867
8879
|
const getGroupedComments = require__plugin_vue_export_helper.computed(() => buildGroupedComments(compareByCreatedTime));
|
|
8868
8880
|
const getGroupedReviewDirectory = require__plugin_vue_export_helper.computed(() => buildGroupedCommentsFrom(reviewDirectoryList.value, compareByCreatedTime));
|
|
@@ -9225,8 +9237,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9225
9237
|
};
|
|
9226
9238
|
const activeId = normalizeCommentId(activeComment.value);
|
|
9227
9239
|
if (activeId && droppedIds.has(activeId)) clearActiveCommentSelection();
|
|
9240
|
+
const adapter = getV2CommentsAdapter(superdoc);
|
|
9228
9241
|
removedComments.forEach((comment) => {
|
|
9229
9242
|
const payload = typeof comment.getValues === "function" ? comment.getValues() : comment;
|
|
9243
|
+
if (isCurrentV2CommentsAdapter(adapter) && adapter.isPendingCommentCreation?.(payload?.commentId)) return;
|
|
9230
9244
|
const event = {
|
|
9231
9245
|
type: COMMENT_EVENTS.DELETED,
|
|
9232
9246
|
comment: payload,
|
|
@@ -9835,7 +9849,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9835
9849
|
* wraps this action in one Pinia `$patch`; all fallible mapping completes
|
|
9836
9850
|
* before either row family mutates.
|
|
9837
9851
|
*/
|
|
9838
|
-
const applyReviewWindowFromV2 = ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch } = {}) => withInteractionSpan("store.reviewWindow.apply", "store-reconciliation", {
|
|
9852
|
+
const applyReviewWindowFromV2 = ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch } = {}) => withInteractionSpan("store.reviewWindow.apply", "store-reconciliation", {
|
|
9839
9853
|
commentItemCount: Array.isArray(commentItems) ? commentItems.length : null,
|
|
9840
9854
|
trackedItemCount: Array.isArray(trackedChangeItems) ? trackedChangeItems.length : null
|
|
9841
9855
|
}, () => {
|
|
@@ -9861,6 +9875,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9861
9875
|
ok: false,
|
|
9862
9876
|
reason: "document-mismatch"
|
|
9863
9877
|
};
|
|
9878
|
+
if (preparedReview && (!Array.isArray(preparedReview.comments) || !Array.isArray(preparedReview.trackedChanges) || preparedReview.comments.length > 4096 || preparedReview.trackedChanges.length > 4096)) return {
|
|
9879
|
+
ok: false,
|
|
9880
|
+
reason: "items-invalid"
|
|
9881
|
+
};
|
|
9864
9882
|
if (!Array.isArray(commentItems) || !Array.isArray(trackedChangeItems)) return {
|
|
9865
9883
|
ok: false,
|
|
9866
9884
|
reason: "items-invalid"
|
|
@@ -9874,7 +9892,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9874
9892
|
reason: "adapter-mapper-missing"
|
|
9875
9893
|
};
|
|
9876
9894
|
let effectiveCommentItems = commentItems;
|
|
9877
|
-
if (typeof commentsAdapter.seedReviewCatalog === "function") {
|
|
9895
|
+
if (!preparedReview && typeof commentsAdapter.seedReviewCatalog === "function") {
|
|
9878
9896
|
const seeded = commentsAdapter.seedReviewCatalog(commentItems, {
|
|
9879
9897
|
sourceCoverageRevision,
|
|
9880
9898
|
evaluatedRevision
|
|
@@ -9890,11 +9908,22 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9890
9908
|
let preparedInputs;
|
|
9891
9909
|
let preparedParams;
|
|
9892
9910
|
try {
|
|
9893
|
-
preparedInputs =
|
|
9911
|
+
preparedInputs = preparedReview ? preparedReview.comments.map((input) => ({
|
|
9912
|
+
...input,
|
|
9913
|
+
fileId: normalizedDocumentId,
|
|
9914
|
+
fileType,
|
|
9915
|
+
selection: {
|
|
9916
|
+
...input.selection,
|
|
9917
|
+
documentId: normalizedDocumentId
|
|
9918
|
+
}
|
|
9919
|
+
})) : effectiveCommentItems.filter((item) => !isSyntheticTrackedChangeCommentLaneItem(item)).map((item) => commentsAdapter.mapV2CommentToUseCommentInput(item, {
|
|
9894
9920
|
fileId: normalizedDocumentId,
|
|
9895
9921
|
fileType
|
|
9896
9922
|
})).filter(Boolean);
|
|
9897
|
-
preparedParams =
|
|
9923
|
+
preparedParams = preparedReview ? preparedReview.trackedChanges.map((params) => ({
|
|
9924
|
+
...params,
|
|
9925
|
+
documentId: normalizedDocumentId
|
|
9926
|
+
})) : trackedChangeItems.map((item) => trackedChangesAdapter.mapV2TrackedChangeToCommentParams(item)).filter(Boolean);
|
|
9898
9927
|
} catch (error) {
|
|
9899
9928
|
return {
|
|
9900
9929
|
ok: false,
|
|
@@ -9929,6 +9958,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9929
9958
|
])
|
|
9930
9959
|
].map((value) => normalizeCommentId(value)).filter(Boolean));
|
|
9931
9960
|
patch(() => {
|
|
9961
|
+
if (preparedReview?.presentation) committedReviewPresentations.value = {
|
|
9962
|
+
...committedReviewPresentations.value,
|
|
9963
|
+
[normalizedDocumentId]: preparedReview.presentation
|
|
9964
|
+
};
|
|
9932
9965
|
reconcileTrackedChangesFromV2({
|
|
9933
9966
|
superdoc,
|
|
9934
9967
|
adapter: trackedChangesAdapter,
|
|
@@ -10331,6 +10364,11 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10331
10364
|
function removeCommentsForDocument(documentId) {
|
|
10332
10365
|
const activeDocumentId = documentId != null ? String(documentId) : null;
|
|
10333
10366
|
if (!activeDocumentId) return;
|
|
10367
|
+
if (committedReviewPresentations.value[activeDocumentId]) {
|
|
10368
|
+
const next = { ...committedReviewPresentations.value };
|
|
10369
|
+
delete next[activeDocumentId];
|
|
10370
|
+
committedReviewPresentations.value = next;
|
|
10371
|
+
}
|
|
10334
10372
|
cancelImportedTrackedChangeBootstrap(activeDocumentId);
|
|
10335
10373
|
const removedComments = commentsList.value.filter((comment) => belongsToDocument(comment, activeDocumentId, { allowSingleDocumentMismatch: true }));
|
|
10336
10374
|
if (!removedComments.length) return;
|
|
@@ -10604,11 +10642,8 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10604
10642
|
return normalizedDecision === "accept" && type === "insertion" || normalizedDecision === "reject" && type === "deletion";
|
|
10605
10643
|
};
|
|
10606
10644
|
const getBodyTrackedChangeIdentityIds = (comment) => {
|
|
10607
|
-
|
|
10608
|
-
const canonicalId = normalizeCommentId(comment.trackedChangeCanonicalId);
|
|
10609
|
-
return [commentId, ...!(canonicalId && canonicalId !== commentId) ? [
|
|
10645
|
+
return [normalizeCommentId(comment.commentId), ...!normalizeCommentId(comment.trackedChangeCanonicalId) ? [
|
|
10610
10646
|
comment.importedId,
|
|
10611
|
-
canonicalId,
|
|
10612
10647
|
comment.trackedChangeAnchorKey,
|
|
10613
10648
|
...normalizeTrackedChangePositionAliases(comment.trackedChangePositionAliases)
|
|
10614
10649
|
] : []].map((id) => normalizeCommentId(id)).filter(Boolean);
|
|
@@ -11990,6 +12025,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
11990
12025
|
hasInitializedLocations,
|
|
11991
12026
|
isCommentHighlighted,
|
|
11992
12027
|
floatingCommentsOffset,
|
|
12028
|
+
committedReviewPresentations,
|
|
11993
12029
|
sortedConversations,
|
|
11994
12030
|
visibleConversations,
|
|
11995
12031
|
skipSelectionUpdate,
|
|
@@ -12202,14 +12238,14 @@ function useUiFontFamily() {
|
|
|
12202
12238
|
}
|
|
12203
12239
|
//#endregion
|
|
12204
12240
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
12205
|
-
var _hoisted_1$
|
|
12241
|
+
var _hoisted_1$32 = { class: "comments-dropdown" };
|
|
12206
12242
|
var _hoisted_2$25 = ["onClick"];
|
|
12207
12243
|
var _hoisted_3$21 = {
|
|
12208
12244
|
key: 0,
|
|
12209
12245
|
class: "comments-dropdown__option-icon"
|
|
12210
12246
|
};
|
|
12211
|
-
var _hoisted_4$
|
|
12212
|
-
var _hoisted_5$
|
|
12247
|
+
var _hoisted_4$14 = ["innerHTML"];
|
|
12248
|
+
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
12213
12249
|
var _sfc_main$39 = {
|
|
12214
12250
|
__name: "CommentsDropdown",
|
|
12215
12251
|
props: {
|
|
@@ -12333,7 +12369,7 @@ var _sfc_main$39 = {
|
|
|
12333
12369
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
12334
12370
|
});
|
|
12335
12371
|
return (_ctx, _cache) => {
|
|
12336
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12372
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$32, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12337
12373
|
ref_key: "triggerRef",
|
|
12338
12374
|
ref: triggerRef,
|
|
12339
12375
|
class: "comments-dropdown__trigger",
|
|
@@ -12352,10 +12388,10 @@ var _sfc_main$39 = {
|
|
|
12352
12388
|
}, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$21, [option.iconString ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", {
|
|
12353
12389
|
key: 0,
|
|
12354
12390
|
innerHTML: option.iconString
|
|
12355
|
-
}, null, 8, _hoisted_4$
|
|
12391
|
+
}, null, 8, _hoisted_4$14)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.unref(OptionIcon), {
|
|
12356
12392
|
key: 1,
|
|
12357
12393
|
option
|
|
12358
|
-
}, null, 8, ["option"]))])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$
|
|
12394
|
+
}, null, 8, ["option"]))])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$11, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 10, _hoisted_2$25);
|
|
12359
12395
|
}), 128))], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true)]))]);
|
|
12360
12396
|
};
|
|
12361
12397
|
}
|
|
@@ -12363,10 +12399,10 @@ var _sfc_main$39 = {
|
|
|
12363
12399
|
var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$39, [["__scopeId", "data-v-7eced80a"]]);
|
|
12364
12400
|
//#endregion
|
|
12365
12401
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
12366
|
-
var _hoisted_1$
|
|
12402
|
+
var _hoisted_1$31 = { class: "sd-comment-option" };
|
|
12367
12403
|
var _hoisted_2$24 = ["innerHTML"];
|
|
12368
12404
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
12369
|
-
var _hoisted_4$
|
|
12405
|
+
var _hoisted_4$13 = ["innerHTML"];
|
|
12370
12406
|
var _sfc_main$38 = {
|
|
12371
12407
|
__name: "InternalDropdown",
|
|
12372
12408
|
props: {
|
|
@@ -12434,7 +12470,7 @@ var _sfc_main$38 = {
|
|
|
12434
12470
|
disabled: __props.isDisabled,
|
|
12435
12471
|
"content-style": { fontFamily: require__plugin_vue_export_helper.unref(uiFontFamily) }
|
|
12436
12472
|
}, {
|
|
12437
|
-
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_1$
|
|
12473
|
+
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_1$31, [
|
|
12438
12474
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12439
12475
|
class: "sd-active-icon",
|
|
12440
12476
|
innerHTML: activeIcon.value
|
|
@@ -12443,7 +12479,7 @@ var _sfc_main$38 = {
|
|
|
12443
12479
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12444
12480
|
class: "sd-dropdown-caret",
|
|
12445
12481
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).caretDown
|
|
12446
|
-
}, null, 8, _hoisted_4$
|
|
12482
|
+
}, null, 8, _hoisted_4$13)
|
|
12447
12483
|
])]),
|
|
12448
12484
|
_: 1
|
|
12449
12485
|
}, 8, ["disabled", "content-style"])], 4);
|
|
@@ -12600,7 +12636,7 @@ var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
|
12600
12636
|
};
|
|
12601
12637
|
//#endregion
|
|
12602
12638
|
//#region src/components/general/Avatar.vue
|
|
12603
|
-
var _hoisted_1$
|
|
12639
|
+
var _hoisted_1$30 = { class: "user-container" };
|
|
12604
12640
|
var _hoisted_2$23 = ["src"];
|
|
12605
12641
|
var _hoisted_3$19 = {
|
|
12606
12642
|
key: 1,
|
|
@@ -12623,7 +12659,7 @@ var _sfc_main$37 = {
|
|
|
12623
12659
|
return email?.substring(0, 1)?.toUpperCase() || null;
|
|
12624
12660
|
};
|
|
12625
12661
|
return (_ctx, _cache) => {
|
|
12626
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12662
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$30, [__props.user.image ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("img", {
|
|
12627
12663
|
key: 0,
|
|
12628
12664
|
class: "user-bg",
|
|
12629
12665
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
@@ -12634,11 +12670,11 @@ var _sfc_main$37 = {
|
|
|
12634
12670
|
var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$37, [["__scopeId", "data-v-c95b2073"]]);
|
|
12635
12671
|
//#endregion
|
|
12636
12672
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
12637
|
-
var _hoisted_1$
|
|
12673
|
+
var _hoisted_1$29 = { class: "card-section comment-header" };
|
|
12638
12674
|
var _hoisted_2$22 = { class: "comment-header-left" };
|
|
12639
12675
|
var _hoisted_3$18 = { class: "user-info" };
|
|
12640
|
-
var _hoisted_4$
|
|
12641
|
-
var _hoisted_5$
|
|
12676
|
+
var _hoisted_4$12 = { class: "user-name" };
|
|
12677
|
+
var _hoisted_5$10 = {
|
|
12642
12678
|
key: 0,
|
|
12643
12679
|
class: "imported-tag"
|
|
12644
12680
|
};
|
|
@@ -12894,10 +12930,10 @@ var _sfc_main$36 = {
|
|
|
12894
12930
|
return user;
|
|
12895
12931
|
});
|
|
12896
12932
|
return (_ctx, _cache) => {
|
|
12897
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12933
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$29, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$22, [require__plugin_vue_export_helper.createVNode(Avatar_default, {
|
|
12898
12934
|
user: getCurrentUser.value,
|
|
12899
12935
|
class: "avatar"
|
|
12900
|
-
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$
|
|
12936
|
+
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$12, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_5$10, "IMPORTED")) : require__plugin_vue_export_helper.createCommentVNode("", true)]), props.comment.createdTime ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_6$8, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(formatDate)(props.comment.createdTime)), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)])]), require__plugin_vue_export_helper.createElementVNode("div", { class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
12901
12937
|
allowResolve.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
12902
12938
|
key: 0,
|
|
12903
12939
|
class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -12946,20 +12982,20 @@ var _sfc_main$36 = {
|
|
|
12946
12982
|
var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$36, [["__scopeId", "data-v-f2f11c96"]]);
|
|
12947
12983
|
//#endregion
|
|
12948
12984
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
12949
|
-
var _hoisted_1$
|
|
12985
|
+
var _hoisted_1$28 = { class: "input-section" };
|
|
12950
12986
|
var _hoisted_2$21 = { class: "comment-composer" };
|
|
12951
12987
|
var _hoisted_3$17 = [
|
|
12952
12988
|
"aria-expanded",
|
|
12953
12989
|
"aria-controls",
|
|
12954
12990
|
"aria-activedescendant"
|
|
12955
12991
|
];
|
|
12956
|
-
var _hoisted_4$
|
|
12992
|
+
var _hoisted_4$11 = [
|
|
12957
12993
|
"id",
|
|
12958
12994
|
"aria-selected",
|
|
12959
12995
|
"data-sd-comment-mention-option",
|
|
12960
12996
|
"onMousedown"
|
|
12961
12997
|
];
|
|
12962
|
-
var _hoisted_5$
|
|
12998
|
+
var _hoisted_5$9 = { class: "comment-mention-option__name" };
|
|
12963
12999
|
var _hoisted_6$7 = {
|
|
12964
13000
|
key: 0,
|
|
12965
13001
|
class: "comment-mention-option__email"
|
|
@@ -13120,7 +13156,7 @@ var _sfc_main$35 = {
|
|
|
13120
13156
|
require__plugin_vue_export_helper.watch(currentCommentText, scheduleInputHeightSync);
|
|
13121
13157
|
__expose({ focus });
|
|
13122
13158
|
return (_ctx, _cache) => {
|
|
13123
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
13159
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$28, [__props.includeHeader ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(CommentHeader_default, {
|
|
13124
13160
|
key: 0,
|
|
13125
13161
|
config: __props.config,
|
|
13126
13162
|
comment: __props.comment,
|
|
@@ -13159,7 +13195,7 @@ var _sfc_main$35 = {
|
|
|
13159
13195
|
"aria-selected": index === highlightedMentionIndex.value,
|
|
13160
13196
|
"data-sd-comment-mention-option": userKey(user),
|
|
13161
13197
|
onMousedown: require__plugin_vue_export_helper.withModifiers(($event) => selectMention(user), ["prevent"])
|
|
13162
|
-
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$
|
|
13198
|
+
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$9, require__plugin_vue_export_helper.toDisplayString(displayName(user)), 1), user.email ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_6$7, require__plugin_vue_export_helper.toDisplayString(user.email), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 42, _hoisted_4$11);
|
|
13163
13199
|
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 2)]);
|
|
13164
13200
|
};
|
|
13165
13201
|
}
|
|
@@ -13275,7 +13311,7 @@ function renderCommentHtml(value) {
|
|
|
13275
13311
|
}
|
|
13276
13312
|
//#endregion
|
|
13277
13313
|
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13278
|
-
var _hoisted_1$
|
|
13314
|
+
var _hoisted_1$27 = [
|
|
13279
13315
|
"aria-label",
|
|
13280
13316
|
"data-comment-instance-id",
|
|
13281
13317
|
"data-comment-thread-id",
|
|
@@ -13287,8 +13323,8 @@ var _hoisted_2$20 = {
|
|
|
13287
13323
|
class: "existing-internal-input"
|
|
13288
13324
|
};
|
|
13289
13325
|
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
13290
|
-
var _hoisted_4$
|
|
13291
|
-
var _hoisted_5$
|
|
13326
|
+
var _hoisted_4$10 = { class: "reply-actions" };
|
|
13327
|
+
var _hoisted_5$8 = ["disabled"];
|
|
13292
13328
|
var _hoisted_6$6 = {
|
|
13293
13329
|
key: 0,
|
|
13294
13330
|
class: "resolved-badge"
|
|
@@ -14356,14 +14392,14 @@ var _sfc_main$34 = {
|
|
|
14356
14392
|
"config",
|
|
14357
14393
|
"comment"
|
|
14358
14394
|
])]),
|
|
14359
|
-
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$
|
|
14395
|
+
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$10, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14360
14396
|
class: "sd-button reply-btn-cancel",
|
|
14361
14397
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
14362
14398
|
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
14363
14399
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isSubmittingNewComment.value }]),
|
|
14364
14400
|
onClick: require__plugin_vue_export_helper.withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14365
14401
|
disabled: !hasTextContent.value || isSubmittingNewComment.value
|
|
14366
|
-
}, " Comment ", 10, _hoisted_5$
|
|
14402
|
+
}, " Comment ", 10, _hoisted_5$8)])
|
|
14367
14403
|
], 64)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [
|
|
14368
14404
|
resolvedBadgeLabel.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_6$6, [require__plugin_vue_export_helper.createElementVNode("span", {
|
|
14369
14405
|
class: "resolved-badge__icon",
|
|
@@ -14529,14 +14565,14 @@ var _sfc_main$34 = {
|
|
|
14529
14565
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14530
14566
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14531
14567
|
}, " Reply ", 10, _hoisted_53)])]))], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
14532
|
-
], 64))], 14, _hoisted_1$
|
|
14568
|
+
], 64))], 14, _hoisted_1$27)), [[_directive_click_outside, handleClickOutside]]);
|
|
14533
14569
|
};
|
|
14534
14570
|
}
|
|
14535
14571
|
};
|
|
14536
14572
|
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$34, [["__scopeId", "data-v-5ace8cef"]]);
|
|
14537
14573
|
//#endregion
|
|
14538
14574
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14539
|
-
var _hoisted_1$
|
|
14575
|
+
var _hoisted_1$26 = [
|
|
14540
14576
|
"tabindex",
|
|
14541
14577
|
"aria-posinset",
|
|
14542
14578
|
"aria-setsize",
|
|
@@ -14674,14 +14710,14 @@ var _sfc_main$33 = {
|
|
|
14674
14710
|
"floating-page-index",
|
|
14675
14711
|
"floating-position-entry",
|
|
14676
14712
|
"is-floating-instance-active"
|
|
14677
|
-
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$
|
|
14713
|
+
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$26);
|
|
14678
14714
|
};
|
|
14679
14715
|
}
|
|
14680
14716
|
};
|
|
14681
14717
|
var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$33, [["__scopeId", "data-v-29650a06"]]);
|
|
14682
14718
|
//#endregion
|
|
14683
14719
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
14684
|
-
var _hoisted_1$
|
|
14720
|
+
var _hoisted_1$25 = ["aria-busy"];
|
|
14685
14721
|
var _hoisted_2$19 = { key: 0 };
|
|
14686
14722
|
var _hoisted_3$15 = { key: 1 };
|
|
14687
14723
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
@@ -14842,7 +14878,7 @@ var _sfc_main$32 = {
|
|
|
14842
14878
|
"total",
|
|
14843
14879
|
"tab-index"
|
|
14844
14880
|
]);
|
|
14845
|
-
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$
|
|
14881
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$25);
|
|
14846
14882
|
};
|
|
14847
14883
|
}
|
|
14848
14884
|
};
|
|
@@ -15258,6 +15294,62 @@ var composeAuthorColorResolver = (config) => {
|
|
|
15258
15294
|
};
|
|
15259
15295
|
};
|
|
15260
15296
|
//#endregion
|
|
15297
|
+
//#region ../document-api/src/permission-ranges/permission-ranges.ts
|
|
15298
|
+
function editorKey(editor) {
|
|
15299
|
+
return editor.id?.trim() ? editor.id : editor.email?.trim() || void 0;
|
|
15300
|
+
}
|
|
15301
|
+
function editorMatches(editor, id) {
|
|
15302
|
+
return Boolean(id.trim()) && (editor.id === id || Boolean(editor.email?.trim() && editor.email.trim().toLowerCase() === id.toLowerCase()));
|
|
15303
|
+
}
|
|
15304
|
+
/**
|
|
15305
|
+
* Resolve a host ID or imported Word email against an explicitly supplied roster.
|
|
15306
|
+
* Word receives the email when available; opaque IDs remain host-specific.
|
|
15307
|
+
* Duplicate IDs/emails are ambiguous. This does not authenticate a user.
|
|
15308
|
+
*/
|
|
15309
|
+
function resolvePermissionRangeEditor(editors, id) {
|
|
15310
|
+
const matches = editors.filter((editor) => editorMatches(editor, id));
|
|
15311
|
+
if (matches.length === 0) return {
|
|
15312
|
+
status: "unknown",
|
|
15313
|
+
id
|
|
15314
|
+
};
|
|
15315
|
+
if (matches.length !== 1) return {
|
|
15316
|
+
status: "ambiguous",
|
|
15317
|
+
id
|
|
15318
|
+
};
|
|
15319
|
+
const editor = matches[0];
|
|
15320
|
+
const wordId = editor.email?.trim() || editor.id;
|
|
15321
|
+
if (editors.filter((candidate) => editorMatches(candidate, wordId)).length !== 1) return {
|
|
15322
|
+
status: "ambiguous",
|
|
15323
|
+
id
|
|
15324
|
+
};
|
|
15325
|
+
return {
|
|
15326
|
+
status: "resolved",
|
|
15327
|
+
id,
|
|
15328
|
+
editor: { ...editor },
|
|
15329
|
+
principal: {
|
|
15330
|
+
kind: "editor",
|
|
15331
|
+
id: wordId
|
|
15332
|
+
}
|
|
15333
|
+
};
|
|
15334
|
+
}
|
|
15335
|
+
/** Enumerate the host roster for an editor picker, including ambiguous entries. */
|
|
15336
|
+
function listPermissionRangeEditors(editors) {
|
|
15337
|
+
const ids = new Set(editors.map(editorKey).filter((id) => id !== void 0));
|
|
15338
|
+
return Array.from(ids, (id) => resolvePermissionRangeEditor(editors, id));
|
|
15339
|
+
}
|
|
15340
|
+
//#endregion
|
|
15341
|
+
//#region src/core/superdoc-ui-owner.js
|
|
15342
|
+
var ownerIds = /* @__PURE__ */ new WeakMap();
|
|
15343
|
+
function getSuperDocUiOwnerId(superdoc) {
|
|
15344
|
+
if (!superdoc || typeof superdoc !== "object") return null;
|
|
15345
|
+
let ownerId = ownerIds.get(superdoc);
|
|
15346
|
+
if (!ownerId) {
|
|
15347
|
+
ownerId = require_uuid.v4();
|
|
15348
|
+
ownerIds.set(superdoc, ownerId);
|
|
15349
|
+
}
|
|
15350
|
+
return ownerId;
|
|
15351
|
+
}
|
|
15352
|
+
//#endregion
|
|
15261
15353
|
//#region src/components/CommentsLayer/floating-comment-positioning.js
|
|
15262
15354
|
var normalizeFloatingAnchorTop = (top) => {
|
|
15263
15355
|
return top;
|
|
@@ -15312,7 +15404,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
15312
15404
|
};
|
|
15313
15405
|
//#endregion
|
|
15314
15406
|
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15315
|
-
var _hoisted_1$
|
|
15407
|
+
var _hoisted_1$24 = [
|
|
15316
15408
|
"data-comment-id",
|
|
15317
15409
|
"data-comment-instance-id",
|
|
15318
15410
|
"data-comment-thread-id",
|
|
@@ -15367,7 +15459,22 @@ var _sfc_main$31 = {
|
|
|
15367
15459
|
const { clearInstantSidebarAlignment } = commentsStore;
|
|
15368
15460
|
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(commentsStore);
|
|
15369
15461
|
const { activeZoom } = storeToRefs(superdocStore);
|
|
15462
|
+
const committedPresentation = require__plugin_vue_export_helper.computed(() => commentsStore.committedReviewPresentations?.[String(props.currentDocument?.id)] ?? null);
|
|
15463
|
+
const committedInstances = require__plugin_vue_export_helper.computed(() => {
|
|
15464
|
+
const presentation = committedPresentation.value;
|
|
15465
|
+
if (!presentation) return null;
|
|
15466
|
+
const rows = new Map(commentsStore.commentsList.filter((row) => String(row.fileId) === String(props.currentDocument?.id)).map((row) => [String(row.commentId), row]));
|
|
15467
|
+
return presentation.instances.flatMap((instance) => {
|
|
15468
|
+
const comment = instance.rowId === "pending" ? pendingComment.value : rows.get(instance.rowId);
|
|
15469
|
+
return comment ? [{
|
|
15470
|
+
...instance,
|
|
15471
|
+
comment,
|
|
15472
|
+
rowVersion: presentation.rowVersions[instance.rowId] ?? 0
|
|
15473
|
+
}] : [];
|
|
15474
|
+
});
|
|
15475
|
+
});
|
|
15370
15476
|
const floatingCommentInstances = require__plugin_vue_export_helper.computed(() => {
|
|
15477
|
+
if (committedInstances.value) return committedInstances.value.filter((instance) => instance.rowId !== "pending");
|
|
15371
15478
|
const currentFloatingCommentInstances = commentsStore.getFloatingCommentInstances;
|
|
15372
15479
|
if (!Array.isArray(currentFloatingCommentInstances)) return [];
|
|
15373
15480
|
const documentId = props.currentDocument?.id;
|
|
@@ -15485,7 +15592,7 @@ var _sfc_main$31 = {
|
|
|
15485
15592
|
const shouldRenderDialog = (position) => {
|
|
15486
15593
|
return shouldMountFloatingCommentDialog({
|
|
15487
15594
|
id: position?.id,
|
|
15488
|
-
visibleIds: visibleIds.value,
|
|
15595
|
+
visibleIds: committedPresentation.value ? new Set(allPositions.value.filter((item) => item.instanceRef?.mount).map((item) => item.id)) : visibleIds.value,
|
|
15489
15596
|
activeCommentInstanceId: activeCommentInstanceId.value,
|
|
15490
15597
|
comment: position?.commentRef
|
|
15491
15598
|
});
|
|
@@ -15531,6 +15638,19 @@ var _sfc_main$31 = {
|
|
|
15531
15638
|
});
|
|
15532
15639
|
const allPositions = require__plugin_vue_export_helper.computed(() => {
|
|
15533
15640
|
viewportRevision.value;
|
|
15641
|
+
if (committedInstances.value) return committedInstances.value.map((instance) => ({
|
|
15642
|
+
id: instance.id,
|
|
15643
|
+
threadId: instance.threadId,
|
|
15644
|
+
pageIndex: instance.pageIndex,
|
|
15645
|
+
anchorTop: instance.anchorTop,
|
|
15646
|
+
anchorBottom: instance.anchorBottom,
|
|
15647
|
+
top: instance.top,
|
|
15648
|
+
height: instance.height,
|
|
15649
|
+
hasAnchorGeometry: instance.positionEntry != null || instance.rowId === "pending",
|
|
15650
|
+
isOffscreenReviewCard: instance.isOffscreenReviewCard,
|
|
15651
|
+
commentRef: instance.comment,
|
|
15652
|
+
instanceRef: instance
|
|
15653
|
+
}));
|
|
15534
15654
|
const positionedInstances = geometryBearingInstances.value;
|
|
15535
15655
|
const hasPending = pendingComment.value && pendingComment.value.fileId === props.currentDocument.id;
|
|
15536
15656
|
if (!positionedInstances.length && !floatingCommentInstances.value.length && !hasPending) return [];
|
|
@@ -15629,6 +15749,45 @@ var _sfc_main$31 = {
|
|
|
15629
15749
|
resolveCollisions(collisionPositions, activeIndex, 15);
|
|
15630
15750
|
return positions;
|
|
15631
15751
|
});
|
|
15752
|
+
require__plugin_vue_export_helper.watch(() => {
|
|
15753
|
+
const presentation = committedPresentation.value, container = floatingCommentsContainer.value;
|
|
15754
|
+
if (!presentation || !container) return null;
|
|
15755
|
+
viewportRevision.value;
|
|
15756
|
+
const viewport = getFloatingViewportRange();
|
|
15757
|
+
if (!viewport) return null;
|
|
15758
|
+
const rail = container.getBoundingClientRect();
|
|
15759
|
+
const stage = typeof presentation.readPaintOrigin === "function" ? presentation.readPaintOrigin() : props.parent?.getBoundingClientRect?.();
|
|
15760
|
+
if (!stage || !Number.isFinite(stage.left) || !Number.isFinite(stage.top)) return null;
|
|
15761
|
+
const instances = committedInstances.value ?? [];
|
|
15762
|
+
return {
|
|
15763
|
+
activeThreadId: activeComment.value == null ? null : String(activeComment.value),
|
|
15764
|
+
activeInstanceId: activeCommentInstanceId.value == null ? null : String(activeCommentInstanceId.value),
|
|
15765
|
+
editingRowId: editingCommentId.value == null ? null : String(editingCommentId.value),
|
|
15766
|
+
retainedThreadIds: [],
|
|
15767
|
+
visibility: {
|
|
15768
|
+
comments: commentsStore.viewingVisibility?.documentMode !== "viewing" || commentsStore.viewingVisibility?.commentsVisible === true,
|
|
15769
|
+
trackedChanges: commentsStore.viewingVisibility?.documentMode !== "viewing" || commentsStore.viewingVisibility?.trackChangesVisible === true
|
|
15770
|
+
},
|
|
15771
|
+
viewport: {
|
|
15772
|
+
...viewport,
|
|
15773
|
+
width: Math.max(1, rail.width),
|
|
15774
|
+
scale: 1,
|
|
15775
|
+
stageOffsetX: (stage?.left ?? rail.left) - rail.left,
|
|
15776
|
+
stageOffsetY: (stage?.top ?? rail.top) - rail.top
|
|
15777
|
+
},
|
|
15778
|
+
pending: pendingComment.value?.fileId === props.currentDocument.id && getPendingAnchorTop() != null ? {
|
|
15779
|
+
anchorTop: getPendingAnchorTop(),
|
|
15780
|
+
height: measuredHeights.value.pending || ESTIMATED_HEIGHT
|
|
15781
|
+
} : null,
|
|
15782
|
+
measurements: instances.filter((instance) => measuredHeights.value[instance.id] > 0).map((instance) => ({
|
|
15783
|
+
instanceId: instance.id,
|
|
15784
|
+
rowVersion: instance.rowVersion,
|
|
15785
|
+
height: measuredHeights.value[instance.id]
|
|
15786
|
+
}))
|
|
15787
|
+
};
|
|
15788
|
+
}, (input) => {
|
|
15789
|
+
if (input) committedPresentation.value?.updateContext(input);
|
|
15790
|
+
}, { immediate: true });
|
|
15632
15791
|
const wrapperMinHeight = require__plugin_vue_export_helper.computed(() => {
|
|
15633
15792
|
viewportRevision.value;
|
|
15634
15793
|
return Math.max(0, props.parent?.clientHeight || 0, props.parent?.scrollHeight || 0);
|
|
@@ -16144,7 +16303,7 @@ var _sfc_main$31 = {
|
|
|
16144
16303
|
}, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
16145
16304
|
class: "sidebar-container",
|
|
16146
16305
|
style: require__plugin_vue_export_helper.normalizeStyle({
|
|
16147
|
-
transform: `translateY(${sidebarOffsetY.value}px)`,
|
|
16306
|
+
transform: `translateY(${committedPresentation.value ? 0 : sidebarOffsetY.value}px)`,
|
|
16148
16307
|
transition: disableInstantLayoutTransitions.value ? "none" : void 0
|
|
16149
16308
|
})
|
|
16150
16309
|
}, [(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(allPositions.value, (pos) => {
|
|
@@ -16159,7 +16318,7 @@ var _sfc_main$31 = {
|
|
|
16159
16318
|
"data-comment-page-index": pos.pageIndex ?? "",
|
|
16160
16319
|
class: require__plugin_vue_export_helper.normalizeClass([{ "is-direct-decision-continuity-target": pos.id === directDecisionContinuityTargetId.value }, "comment-placeholder"]),
|
|
16161
16320
|
style: require__plugin_vue_export_helper.normalizeStyle({
|
|
16162
|
-
top: (pos.isOffscreenReviewCard ? pos.top - sidebarOffsetY.value : pos.top) + "px",
|
|
16321
|
+
top: (pos.isOffscreenReviewCard && !committedPresentation.value ? pos.top - sidebarOffsetY.value : pos.top) + "px",
|
|
16163
16322
|
height: pos.height + "px",
|
|
16164
16323
|
transition: disableInstantLayoutTransitions.value ? "none" : void 0
|
|
16165
16324
|
})
|
|
@@ -16182,15 +16341,15 @@ var _sfc_main$31 = {
|
|
|
16182
16341
|
"floating-page-index",
|
|
16183
16342
|
"floating-position-entry",
|
|
16184
16343
|
"is-floating-instance-active"
|
|
16185
|
-
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 14, _hoisted_1$
|
|
16344
|
+
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 14, _hoisted_1$24);
|
|
16186
16345
|
}), 128))], 4)], 36);
|
|
16187
16346
|
};
|
|
16188
16347
|
}
|
|
16189
16348
|
};
|
|
16190
|
-
var FloatingComments_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$31, [["__scopeId", "data-v-
|
|
16349
|
+
var FloatingComments_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$31, [["__scopeId", "data-v-028441bf"]]);
|
|
16191
16350
|
//#endregion
|
|
16192
16351
|
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
16193
|
-
var _hoisted_1$
|
|
16352
|
+
var _hoisted_1$23 = {
|
|
16194
16353
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
16195
16354
|
"aria-hidden": "false"
|
|
16196
16355
|
};
|
|
@@ -16296,7 +16455,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
16296
16455
|
emit("anchor-activate", anchor.commentId);
|
|
16297
16456
|
};
|
|
16298
16457
|
return (_ctx, _cache) => {
|
|
16299
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
16458
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$23, [(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(pdfCommentAnchors.value, (anchor) => {
|
|
16300
16459
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
16301
16460
|
key: anchor.commentId,
|
|
16302
16461
|
class: "sd-comment-anchor sd-highlight",
|
|
@@ -16465,7 +16624,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
16465
16624
|
};
|
|
16466
16625
|
//#endregion
|
|
16467
16626
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
16468
|
-
var _hoisted_1$
|
|
16627
|
+
var _hoisted_1$22 = ["data-page-index"];
|
|
16469
16628
|
var _sfc_main$29 = {
|
|
16470
16629
|
__name: "WhiteboardPage",
|
|
16471
16630
|
props: {
|
|
@@ -16597,7 +16756,7 @@ var _sfc_main$29 = {
|
|
|
16597
16756
|
height: (__props.pageSize?.height ?? __props.page.size?.height) + "px",
|
|
16598
16757
|
transform: `translate(${__props.pageOffset?.left ?? 0}px, ${__props.pageOffset?.top ?? 0}px)`
|
|
16599
16758
|
})
|
|
16600
|
-
}, null, 44, _hoisted_1$
|
|
16759
|
+
}, null, 44, _hoisted_1$22);
|
|
16601
16760
|
};
|
|
16602
16761
|
}
|
|
16603
16762
|
};
|
|
@@ -16676,7 +16835,7 @@ var _sfc_main$28 = {
|
|
|
16676
16835
|
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$28, [["__scopeId", "data-v-54546c3d"]]);
|
|
16677
16836
|
//#endregion
|
|
16678
16837
|
//#region src/components/HtmlViewer/HtmlViewer.vue
|
|
16679
|
-
var _hoisted_1$
|
|
16838
|
+
var _hoisted_1$21 = { class: "superdoc-html-viewer" };
|
|
16680
16839
|
var _hoisted_2$17 = { class: "superdoc-html-viewer__document" };
|
|
16681
16840
|
var _hoisted_3$14 = ["innerHTML"];
|
|
16682
16841
|
var _sfc_main$27 = {
|
|
@@ -16726,7 +16885,7 @@ var _sfc_main$27 = {
|
|
|
16726
16885
|
initViewer();
|
|
16727
16886
|
});
|
|
16728
16887
|
return (_ctx, _cache) => {
|
|
16729
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
16888
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$21, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$17, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
16730
16889
|
class: "superdoc-html-viewer__content",
|
|
16731
16890
|
innerHTML: documentContent.value,
|
|
16732
16891
|
onMouseup: handleSelectionChange
|
|
@@ -17776,7 +17935,7 @@ function usePasswordPrompt({ getSurfaceManager, getPasswordPromptConfig, onUnhan
|
|
|
17776
17935
|
})
|
|
17777
17936
|
});
|
|
17778
17937
|
} else {
|
|
17779
|
-
const PasswordPromptSurface = (await Promise.resolve().then(() => require("./chunks/PasswordPromptSurface-
|
|
17938
|
+
const PasswordPromptSurface = (await Promise.resolve().then(() => require("./chunks/PasswordPromptSurface-B5DHV6qr.cjs"))).default;
|
|
17780
17939
|
const surfaceId = `password-prompt-${doc.id}`;
|
|
17781
17940
|
handle = manager.open({
|
|
17782
17941
|
id: surfaceId,
|
|
@@ -18634,7 +18793,7 @@ function useFindReplace({ getSurfaceManager, getActiveEditor, activeEditorRef, g
|
|
|
18634
18793
|
/** @type {object | undefined} */
|
|
18635
18794
|
let FindReplaceSurface;
|
|
18636
18795
|
try {
|
|
18637
|
-
FindReplaceSurface = (await Promise.resolve().then(() => require("./chunks/FindReplaceSurface-
|
|
18796
|
+
FindReplaceSurface = (await Promise.resolve().then(() => require("./chunks/FindReplaceSurface-8V8AjgR4.cjs"))).default;
|
|
18638
18797
|
} catch {
|
|
18639
18798
|
opening = false;
|
|
18640
18799
|
return;
|
|
@@ -18989,7 +19148,7 @@ var toolbarIcons = {
|
|
|
18989
19148
|
};
|
|
18990
19149
|
//#endregion
|
|
18991
19150
|
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
18992
|
-
var _hoisted_1$
|
|
19151
|
+
var _hoisted_1$20 = {
|
|
18993
19152
|
key: 0,
|
|
18994
19153
|
class: "link-title"
|
|
18995
19154
|
};
|
|
@@ -19001,11 +19160,11 @@ var _hoisted_3$13 = {
|
|
|
19001
19160
|
key: 2,
|
|
19002
19161
|
class: "link-title"
|
|
19003
19162
|
};
|
|
19004
|
-
var _hoisted_4$
|
|
19163
|
+
var _hoisted_4$9 = {
|
|
19005
19164
|
key: 3,
|
|
19006
19165
|
class: "link-title"
|
|
19007
19166
|
};
|
|
19008
|
-
var _hoisted_5$
|
|
19167
|
+
var _hoisted_5$7 = {
|
|
19009
19168
|
key: 4,
|
|
19010
19169
|
class: "link-input-wrapper"
|
|
19011
19170
|
};
|
|
@@ -19260,8 +19419,8 @@ var _sfc_main$26 = {
|
|
|
19260
19419
|
};
|
|
19261
19420
|
return (_ctx, _cache) => {
|
|
19262
19421
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", { class: require__plugin_vue_export_helper.normalizeClass(["link-input-ctn", { "high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode) }]) }, [
|
|
19263
|
-
isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
19264
|
-
__props.showInput && !isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_5$
|
|
19422
|
+
isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$20, "Page anchor")) : isViewingMode.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_2$16, "Link details")) : isEditing.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$13, "Edit link")) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$9, "Add link")),
|
|
19423
|
+
__props.showInput && !isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_5$7, [
|
|
19265
19424
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_6$5, [_cache[5] || (_cache[5] = require__plugin_vue_export_helper.createElementVNode("div", { class: "input-icon text-input-icon" }, "T", -1)), require__plugin_vue_export_helper.withDirectives(require__plugin_vue_export_helper.createElementVNode("input", {
|
|
19266
19425
|
type: "text",
|
|
19267
19426
|
name: "text",
|
|
@@ -19362,6 +19521,7 @@ function scrollToElement(targetElement, options = {
|
|
|
19362
19521
|
/** @typedef {import('../core/types/index.js').Editor} Editor */
|
|
19363
19522
|
/** @typedef {import('../public/ui/types.js').SuperDocUI} SuperDocUI */
|
|
19364
19523
|
/** @typedef {import('@superdoc/document-api').HyperlinkTarget} HyperlinkTarget */
|
|
19524
|
+
/** @typedef {{ getHandles?: () => { editing?: { input?: { runAfterPendingInput?: (action: (signal?: AbortSignal) => Promise<boolean>) => Promise<boolean> } } } }} LinkNavigationHost */
|
|
19365
19525
|
/**
|
|
19366
19526
|
* A single-block text-selection target in the Document API `query.match`
|
|
19367
19527
|
* result shape.
|
|
@@ -19920,6 +20080,26 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19920
20080
|
const anchorName = decodeAnchorFragment(anchorUrl.slice(1));
|
|
19921
20081
|
const editor = getActiveEditor();
|
|
19922
20082
|
const generation = openGeneration;
|
|
20083
|
+
/** @param {AbortSignal} [signal] */
|
|
20084
|
+
const navigate = (signal) => navigateAnchorInEditor(anchorName, editor, generation, placeCaret, revalidateCaretAfterReveal, signal);
|
|
20085
|
+
if (revalidateCaretAfterReveal) try {
|
|
20086
|
+
const input = (editor?.host)?.getHandles?.()?.editing?.input;
|
|
20087
|
+
if (typeof input?.runAfterPendingInput === "function") return await input.runAfterPendingInput(navigate);
|
|
20088
|
+
} catch {
|
|
20089
|
+
return false;
|
|
20090
|
+
}
|
|
20091
|
+
return navigate();
|
|
20092
|
+
}
|
|
20093
|
+
/**
|
|
20094
|
+
* @param {string} anchorName
|
|
20095
|
+
* @param {Editor | null | undefined} editor
|
|
20096
|
+
* @param {number} generation
|
|
20097
|
+
* @param {boolean} placeCaret
|
|
20098
|
+
* @param {boolean} revalidateCaretAfterReveal
|
|
20099
|
+
* @param {AbortSignal} [signal]
|
|
20100
|
+
*/
|
|
20101
|
+
async function navigateAnchorInEditor(anchorName, editor, generation, placeCaret, revalidateCaretAfterReveal, signal) {
|
|
20102
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19923
20103
|
/** @type {LinkPopoverDocumentApi | null | undefined} */
|
|
19924
20104
|
const doc = editor?.doc;
|
|
19925
20105
|
const bookmarkGet = doc?.bookmarks?.get;
|
|
@@ -19936,14 +20116,16 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19936
20116
|
try {
|
|
19937
20117
|
const list = doc?.bookmarks?.list;
|
|
19938
20118
|
if (typeof list === "function") {
|
|
19939
|
-
|
|
20119
|
+
const catalog = await Promise.resolve(list.call(doc.bookmarks));
|
|
20120
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
20121
|
+
if (catalog?.items?.filter((item) => item.name === anchorName).length !== 1) return null;
|
|
19940
20122
|
}
|
|
19941
20123
|
const bookmark = await Promise.resolve(bookmarkGet.call(doc.bookmarks, { target: {
|
|
19942
20124
|
kind: "entity",
|
|
19943
20125
|
entityType: "bookmark",
|
|
19944
20126
|
name: anchorName
|
|
19945
20127
|
} }));
|
|
19946
|
-
if (editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
20128
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return null;
|
|
19947
20129
|
const story = bookmark?.address?.story;
|
|
19948
20130
|
if (story && story.storyType !== "body" || bookmark?.tableColumn) return null;
|
|
19949
20131
|
const blockId = bookmark?.range?.from?.blockId;
|
|
@@ -19958,41 +20140,44 @@ function useLinkPopover({ getSurfaceManager, getActiveEditor, getUi, getActivati
|
|
|
19958
20140
|
}
|
|
19959
20141
|
}
|
|
19960
20142
|
let position = await readBodyBookmark();
|
|
19961
|
-
if (!position) return false;
|
|
20143
|
+
if (!position || signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19962
20144
|
if (placeCaret && !revalidateCaretAfterReveal) await placeCaretAtBookmark(position.blockId, position.offset);
|
|
19963
20145
|
const viewport = getUi()?.viewport;
|
|
19964
20146
|
const scrollIntoView = viewport?.scrollIntoView;
|
|
19965
20147
|
if (typeof scrollIntoView !== "function") return false;
|
|
19966
|
-
for (let step = 0; step < MAX_ANCHOR_NAVIGATION_STEPS; step += 1)
|
|
19967
|
-
|
|
19968
|
-
|
|
19969
|
-
|
|
19970
|
-
|
|
19971
|
-
|
|
19972
|
-
|
|
19973
|
-
|
|
19974
|
-
|
|
19975
|
-
|
|
19976
|
-
|
|
19977
|
-
|
|
19978
|
-
|
|
19979
|
-
|
|
19980
|
-
|
|
19981
|
-
|
|
19982
|
-
if (
|
|
19983
|
-
|
|
19984
|
-
if (
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
20148
|
+
for (let step = 0; step < MAX_ANCHOR_NAVIGATION_STEPS; step += 1) {
|
|
20149
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20150
|
+
try {
|
|
20151
|
+
const target = {
|
|
20152
|
+
kind: "text",
|
|
20153
|
+
blockId: position.blockId,
|
|
20154
|
+
range: {
|
|
20155
|
+
start: position.offset,
|
|
20156
|
+
end: position.offset
|
|
20157
|
+
}
|
|
20158
|
+
};
|
|
20159
|
+
const result = await Promise.resolve(scrollIntoView.call(viewport, {
|
|
20160
|
+
target,
|
|
20161
|
+
block: "start",
|
|
20162
|
+
behavior: "instant"
|
|
20163
|
+
}));
|
|
20164
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20165
|
+
if (result?.success !== false) {
|
|
20166
|
+
if (revalidateCaretAfterReveal) {
|
|
20167
|
+
const current = await readBodyBookmark();
|
|
20168
|
+
if (!current || signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20169
|
+
if (current.blockId !== position.blockId || current.offset !== position.offset) {
|
|
20170
|
+
position = current;
|
|
20171
|
+
continue;
|
|
20172
|
+
}
|
|
20173
|
+
if (placeCaret) await placeCaretAtBookmark(current.blockId, current.offset);
|
|
20174
|
+
if (signal?.aborted || editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
19988
20175
|
}
|
|
19989
|
-
|
|
19990
|
-
if (editor !== getActiveEditor() || generation !== openGeneration) return false;
|
|
20176
|
+
return true;
|
|
19991
20177
|
}
|
|
19992
|
-
|
|
20178
|
+
} catch {
|
|
20179
|
+
return false;
|
|
19993
20180
|
}
|
|
19994
|
-
} catch {
|
|
19995
|
-
return false;
|
|
19996
20181
|
}
|
|
19997
20182
|
return false;
|
|
19998
20183
|
}
|
|
@@ -21682,7 +21867,7 @@ var FOCUSABLE_SELECTOR = [
|
|
|
21682
21867
|
].join(", ");
|
|
21683
21868
|
//#endregion
|
|
21684
21869
|
//#region src/components/surfaces/SurfaceDialog.vue
|
|
21685
|
-
var _hoisted_1$
|
|
21870
|
+
var _hoisted_1$19 = ["aria-labelledby", "aria-label"];
|
|
21686
21871
|
var _hoisted_2$15 = ["id"];
|
|
21687
21872
|
var _hoisted_3$12 = { class: "sd-surface-dialog__content" };
|
|
21688
21873
|
var _sfc_main$24 = {
|
|
@@ -21830,14 +22015,14 @@ var _sfc_main$24 = {
|
|
|
21830
22015
|
"render",
|
|
21831
22016
|
"resolve",
|
|
21832
22017
|
"close"
|
|
21833
|
-
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 12, _hoisted_1$
|
|
22018
|
+
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 12, _hoisted_1$19)], 32);
|
|
21834
22019
|
};
|
|
21835
22020
|
}
|
|
21836
22021
|
};
|
|
21837
22022
|
var SurfaceDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$24, [["__scopeId", "data-v-5cee3b11"]]);
|
|
21838
22023
|
//#endregion
|
|
21839
22024
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
21840
|
-
var _hoisted_1$
|
|
22025
|
+
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
21841
22026
|
var _hoisted_2$14 = ["id"];
|
|
21842
22027
|
var _hoisted_3$11 = { class: "sd-surface-floating__content" };
|
|
21843
22028
|
var _sfc_main$23 = {
|
|
@@ -21985,7 +22170,7 @@ var _sfc_main$23 = {
|
|
|
21985
22170
|
"render",
|
|
21986
22171
|
"resolve",
|
|
21987
22172
|
"close"
|
|
21988
|
-
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 14, _hoisted_1$
|
|
22173
|
+
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 14, _hoisted_1$18);
|
|
21989
22174
|
};
|
|
21990
22175
|
}
|
|
21991
22176
|
};
|
|
@@ -22217,9 +22402,10 @@ var _sfc_main$22 = {
|
|
|
22217
22402
|
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$22, [["__scopeId", "data-v-dad99b67"]]);
|
|
22218
22403
|
//#endregion
|
|
22219
22404
|
//#region src/SuperDoc.vue
|
|
22220
|
-
var _hoisted_1$
|
|
22221
|
-
var _hoisted_2$13 =
|
|
22222
|
-
var _hoisted_3$10 = { class: "
|
|
22405
|
+
var _hoisted_1$17 = ["data-superdoc-ui-owner"];
|
|
22406
|
+
var _hoisted_2$13 = ["innerHTML"];
|
|
22407
|
+
var _hoisted_3$10 = { class: "superdoc__document document" };
|
|
22408
|
+
var _hoisted_4$8 = { class: "floating-comments" };
|
|
22223
22409
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
22224
22410
|
var UNAVAILABLE_COMMAND_RESULT = false;
|
|
22225
22411
|
var V2_SELECTION_TOOLBAR_SYNC_RETRY_FRAMES = 3;
|
|
@@ -22227,7 +22413,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22227
22413
|
__name: "SuperDoc",
|
|
22228
22414
|
emits: ["selection-update"],
|
|
22229
22415
|
setup(__props, { emit: __emit }) {
|
|
22230
|
-
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-
|
|
22416
|
+
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-omriDChK.cjs")));
|
|
22231
22417
|
const getDocumentLoadPassword = (doc) => doc.password ?? proxy.$superdoc.config.password;
|
|
22232
22418
|
const resolveDocumentV2Collaboration = (doc) => {
|
|
22233
22419
|
const rawConfig = doc?.v2Collaboration;
|
|
@@ -22574,6 +22760,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22574
22760
|
documentId: ctx?.documentId,
|
|
22575
22761
|
commentItems: result?.comments?.items,
|
|
22576
22762
|
trackedChangeItems: result?.trackedChanges?.items,
|
|
22763
|
+
preparedReview: result?.preparedReview,
|
|
22577
22764
|
requestedCommentIds: result?.comments?.requestedIds,
|
|
22578
22765
|
requestedTrackedChangeIds: result?.trackedChanges?.requestedIds,
|
|
22579
22766
|
unresolvedCommentIds: result?.comments?.unresolvedCommentIds,
|
|
@@ -22764,7 +22951,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22764
22951
|
if (typeof selectionTargets?.apply !== "function") return createV2AuthoringFailure("selection-target-unavailable", "editing.selectionTargets.apply is not available");
|
|
22765
22952
|
let result;
|
|
22766
22953
|
try {
|
|
22767
|
-
result = selectionTargets.apply(selectionTarget);
|
|
22954
|
+
result = await (selectionTargets.applyAndWait ?? selectionTargets.apply).call(selectionTargets, selectionTarget);
|
|
22768
22955
|
} catch (error) {
|
|
22769
22956
|
const message = error instanceof Error ? error.message : String(error);
|
|
22770
22957
|
return createV2AuthoringFailure("selection-target-threw", message);
|
|
@@ -23692,7 +23879,6 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23692
23879
|
const onFontsResolvedFn = proxy.$superdoc.listeners?.("fonts-resolved")?.length > 0 ? proxy.$superdoc.listeners("fonts-resolved")[0] : null;
|
|
23693
23880
|
const useLayoutEngine = proxy.$superdoc.config.useLayoutEngine !== false;
|
|
23694
23881
|
const isNewFile = doc.isNewFile;
|
|
23695
|
-
const benchmarkExecutionMode = proxy.$superdoc.config?.benchmarkExecutionMode;
|
|
23696
23882
|
const benchmarkTraceEnabled = proxy.$superdoc.config?.benchmarkTraceEnabled === true;
|
|
23697
23883
|
const collaborationResolution = resolveDocumentV2Collaboration(doc);
|
|
23698
23884
|
const v2Collaboration = collaborationResolution.state === "valid" ? collaborationResolution.config : null;
|
|
@@ -23709,7 +23895,6 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23709
23895
|
html: doc.html,
|
|
23710
23896
|
markdown: doc.markdown,
|
|
23711
23897
|
documentMode: proxy.$superdoc.config.documentMode,
|
|
23712
|
-
...benchmarkExecutionMode ? { benchmarkExecutionMode } : {},
|
|
23713
23898
|
...benchmarkTraceEnabled ? { benchmarkTraceEnabled: true } : {},
|
|
23714
23899
|
allowSelectionInViewMode: proxy.$superdoc.config.allowSelectionInViewMode,
|
|
23715
23900
|
rulers: doc.rulers,
|
|
@@ -24648,6 +24833,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24648
24833
|
"superdoc--contained": require__plugin_vue_export_helper.unref(proxy).$superdoc.config.contained,
|
|
24649
24834
|
"high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode)
|
|
24650
24835
|
}]),
|
|
24836
|
+
"data-superdoc-ui-owner": require__plugin_vue_export_helper.unref(getSuperDocUiOwnerId)(require__plugin_vue_export_helper.unref(proxy).$superdoc),
|
|
24651
24837
|
style: require__plugin_vue_export_helper.normalizeStyle(superdocStyleVars.value),
|
|
24652
24838
|
onKeydown: handleContainerKeydown
|
|
24653
24839
|
}, [
|
|
@@ -24667,7 +24853,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24667
24853
|
}, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
24668
24854
|
class: "superdoc__tools-icon",
|
|
24669
24855
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).comment
|
|
24670
|
-
}, null, 8,
|
|
24856
|
+
}, null, 8, _hoisted_2$13)], 32)], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$10, [
|
|
24671
24857
|
isCommentsEnabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
24672
24858
|
key: 0,
|
|
24673
24859
|
class: "superdoc__selection-layer selection-layer",
|
|
@@ -24802,7 +24988,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24802
24988
|
ref_key: "rightSidebarRef",
|
|
24803
24989
|
ref: rightSidebarRef,
|
|
24804
24990
|
class: "superdoc__right-sidebar right-sidebar"
|
|
24805
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div",
|
|
24991
|
+
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$8, [require__plugin_vue_export_helper.unref(hasInitializedLocations) && (floatingComments.value.length > 0 || require__plugin_vue_export_helper.unref(pendingComment)) ? (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 0 }, require__plugin_vue_export_helper.renderList(require__plugin_vue_export_helper.unref(documentsWithConverations), (doc) => {
|
|
24806
24992
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(FloatingComments_default, {
|
|
24807
24993
|
parent: layers.value,
|
|
24808
24994
|
"current-document": doc
|
|
@@ -24817,10 +25003,10 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24817
25003
|
parent: layers.value
|
|
24818
25004
|
}, null, 8, ["comment", "parent"])], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
24819
25005
|
require__plugin_vue_export_helper.createVNode(SurfaceHost_default, { "geometry-target": layers.value }, null, 8, ["geometry-target"])
|
|
24820
|
-
],
|
|
25006
|
+
], 46, _hoisted_1$17);
|
|
24821
25007
|
};
|
|
24822
25008
|
}
|
|
24823
|
-
}, [["__scopeId", "data-v-
|
|
25009
|
+
}, [["__scopeId", "data-v-c843616f"]]);
|
|
24824
25010
|
//#endregion
|
|
24825
25011
|
//#region src/core/create-app.js
|
|
24826
25012
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -39363,7 +39549,7 @@ var throttle = (func, wait, options) => {
|
|
|
39363
39549
|
};
|
|
39364
39550
|
//#endregion
|
|
39365
39551
|
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
39366
|
-
var _hoisted_1$
|
|
39552
|
+
var _hoisted_1$16 = { class: "sd-toolbar-icon" };
|
|
39367
39553
|
var _hoisted_2$12 = ["innerHTML"];
|
|
39368
39554
|
var _sfc_main$20 = {
|
|
39369
39555
|
__name: "ToolbarButtonIcon",
|
|
@@ -39391,7 +39577,7 @@ var _sfc_main$20 = {
|
|
|
39391
39577
|
return ["color", "highlight"].includes(props.name);
|
|
39392
39578
|
});
|
|
39393
39579
|
return (_ctx, _cache) => {
|
|
39394
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
39580
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$16, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
39395
39581
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-toolbar-icon__icon", [`sd-toolbar-icon__icon--${props.name}`]]),
|
|
39396
39582
|
innerHTML: __props.icon
|
|
39397
39583
|
}, null, 10, _hoisted_2$12), hasColorBar.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
@@ -39405,7 +39591,7 @@ var _sfc_main$20 = {
|
|
|
39405
39591
|
var ToolbarButtonIcon_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-65ecd5b1"]]);
|
|
39406
39592
|
//#endregion
|
|
39407
39593
|
//#region src/internal/toolbar/built-in/ToolbarButton.vue
|
|
39408
|
-
var _hoisted_1$
|
|
39594
|
+
var _hoisted_1$15 = [
|
|
39409
39595
|
"role",
|
|
39410
39596
|
"aria-label",
|
|
39411
39597
|
"aria-disabled"
|
|
@@ -39416,7 +39602,7 @@ var _hoisted_4$7 = {
|
|
|
39416
39602
|
key: 1,
|
|
39417
39603
|
class: "sd-button-label"
|
|
39418
39604
|
};
|
|
39419
|
-
var _hoisted_5$
|
|
39605
|
+
var _hoisted_5$6 = ["data-item", "aria-label"];
|
|
39420
39606
|
var _hoisted_6$4 = ["innerHTML"];
|
|
39421
39607
|
var _hoisted_7$2 = { key: 2 };
|
|
39422
39608
|
var _hoisted_8$2 = ["onKeydown", "id"];
|
|
@@ -39644,7 +39830,7 @@ var _sfc_main$19 = {
|
|
|
39644
39830
|
class: "sd-dropdown-caret",
|
|
39645
39831
|
innerHTML: caretIcon.value,
|
|
39646
39832
|
style: require__plugin_vue_export_helper.normalizeStyle({ opacity: require__plugin_vue_export_helper.unref(disabled) ? .6 : 1 })
|
|
39647
|
-
}, null, 12, _hoisted_6$4)], 8, _hoisted_5$
|
|
39833
|
+
}, null, 12, _hoisted_6$4)], 8, _hoisted_5$6)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 2 }, [
|
|
39648
39834
|
require__plugin_vue_export_helper.unref(icon) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ToolbarButtonIcon_default, {
|
|
39649
39835
|
key: 0,
|
|
39650
39836
|
color: require__plugin_vue_export_helper.unref(iconColor),
|
|
@@ -39699,14 +39885,14 @@ var _sfc_main$19 = {
|
|
|
39699
39885
|
}, null, 12, _hoisted_10$1)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
39700
39886
|
], 64)),
|
|
39701
39887
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_11$1, require__plugin_vue_export_helper.toDisplayString(`${require__plugin_vue_export_helper.unref(attributes).ariaLabel} ${require__plugin_vue_export_helper.unref(active) ? "selected" : "unset"}`), 1)
|
|
39702
|
-
], 10, _hoisted_2$11)], 46, _hoisted_1$
|
|
39888
|
+
], 10, _hoisted_2$11)], 46, _hoisted_1$15);
|
|
39703
39889
|
};
|
|
39704
39890
|
}
|
|
39705
39891
|
};
|
|
39706
39892
|
var ToolbarButton_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$19, [["__scopeId", "data-v-96796456"]]);
|
|
39707
39893
|
//#endregion
|
|
39708
39894
|
//#region src/internal/toolbar/built-in/ToolbarSeparator.vue
|
|
39709
|
-
var _hoisted_1$
|
|
39895
|
+
var _hoisted_1$14 = {
|
|
39710
39896
|
class: "toolbar-separator",
|
|
39711
39897
|
role: "separator",
|
|
39712
39898
|
"aria-label": "Toolbar separator"
|
|
@@ -39725,7 +39911,7 @@ var _sfc_main$18 = {
|
|
|
39725
39911
|
return "var(--sd-ui-border, #dbdbdb)";
|
|
39726
39912
|
};
|
|
39727
39913
|
return (_ctx, _cache) => {
|
|
39728
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
39914
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$14, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
39729
39915
|
class: "separator-inner",
|
|
39730
39916
|
style: require__plugin_vue_export_helper.normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
39731
39917
|
}, null, 4)]);
|
|
@@ -39735,13 +39921,14 @@ var _sfc_main$18 = {
|
|
|
39735
39921
|
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$18, [["__scopeId", "data-v-cb82253a"]]);
|
|
39736
39922
|
//#endregion
|
|
39737
39923
|
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
39738
|
-
var _hoisted_1$
|
|
39739
|
-
var _hoisted_2$10 = ["
|
|
39740
|
-
var _hoisted_3$8 =
|
|
39924
|
+
var _hoisted_1$13 = { class: "toolbar-dropdown" };
|
|
39925
|
+
var _hoisted_2$10 = ["data-superdoc-ui-owner"];
|
|
39926
|
+
var _hoisted_3$8 = ["onClick"];
|
|
39927
|
+
var _hoisted_4$6 = {
|
|
39741
39928
|
key: 0,
|
|
39742
39929
|
class: "toolbar-dropdown-option__icon"
|
|
39743
39930
|
};
|
|
39744
|
-
var
|
|
39931
|
+
var _hoisted_5$5 = { class: "toolbar-dropdown-option__label" };
|
|
39745
39932
|
var TRIGGER_FOCUS_SELECTOR = "button, [href], input, select, textarea, [role=\"button\"], [tabindex]:not([tabindex=\"-1\"])";
|
|
39746
39933
|
var _sfc_main$17 = {
|
|
39747
39934
|
__name: "ToolbarDropdown",
|
|
@@ -39788,6 +39975,7 @@ var _sfc_main$17 = {
|
|
|
39788
39975
|
const props = __props;
|
|
39789
39976
|
const emit = __emit;
|
|
39790
39977
|
const slots = require__plugin_vue_export_helper.useSlots();
|
|
39978
|
+
const toolbarOwnerId = require__plugin_vue_export_helper.inject("sdToolbarOwnerId", null);
|
|
39791
39979
|
const triggerRef = require__plugin_vue_export_helper.ref(null);
|
|
39792
39980
|
const menuRef = require__plugin_vue_export_helper.ref(null);
|
|
39793
39981
|
const menuPosition = require__plugin_vue_export_helper.ref({
|
|
@@ -40090,7 +40278,7 @@ var _sfc_main$17 = {
|
|
|
40090
40278
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
40091
40279
|
});
|
|
40092
40280
|
return (_ctx, _cache) => {
|
|
40093
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
40281
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$13, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
40094
40282
|
ref_key: "triggerRef",
|
|
40095
40283
|
ref: triggerRef,
|
|
40096
40284
|
class: "toolbar-dropdown-trigger",
|
|
@@ -40104,7 +40292,7 @@ var _sfc_main$17 = {
|
|
|
40104
40292
|
"data-sd-part": "dropdown-menu",
|
|
40105
40293
|
class: mergedMenuClass.value,
|
|
40106
40294
|
style: menuStyle.value
|
|
40107
|
-
}, computedMenuAttrs.value), [hasCustomMenu.value ? require__plugin_vue_export_helper.renderSlot(_ctx.$slots, "menu", { key: 0 }, void 0, true) : require__plugin_vue_export_helper.createCommentVNode("", true), (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(hasCustomMenu.value ? [] : __props.options, (option, index) => {
|
|
40295
|
+
}, computedMenuAttrs.value, { "data-superdoc-ui-owner": require__plugin_vue_export_helper.unref(toolbarOwnerId) }), [hasCustomMenu.value ? require__plugin_vue_export_helper.renderSlot(_ctx.$slots, "menu", { key: 0 }, void 0, true) : require__plugin_vue_export_helper.createCommentVNode("", true), (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(hasCustomMenu.value ? [] : __props.options, (option, index) => {
|
|
40108
40296
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", require__plugin_vue_export_helper.mergeProps({
|
|
40109
40297
|
key: option.key,
|
|
40110
40298
|
ref_for: true,
|
|
@@ -40125,14 +40313,14 @@ var _sfc_main$17 = {
|
|
|
40125
40313
|
}), [isRenderOption(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.unref(RenderOption), {
|
|
40126
40314
|
key: 0,
|
|
40127
40315
|
option
|
|
40128
|
-
}, null, 8, ["option"])) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span",
|
|
40129
|
-
}), 128))], 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)]),
|
|
40316
|
+
}, null, 8, ["option"])) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 1 }, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_4$6, [require__plugin_vue_export_helper.createVNode(require__plugin_vue_export_helper.unref(OptionIcon), { option }, null, 8, ["option"])])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$5, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 64))], 16, _hoisted_3$8);
|
|
40317
|
+
}), 128))], 16, _hoisted_2$10)) : require__plugin_vue_export_helper.createCommentVNode("", true)]),
|
|
40130
40318
|
_: 3
|
|
40131
40319
|
})], 8, ["to"]))]);
|
|
40132
40320
|
};
|
|
40133
40321
|
}
|
|
40134
40322
|
};
|
|
40135
|
-
var ToolbarDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$17, [["__scopeId", "data-v-
|
|
40323
|
+
var ToolbarDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$17, [["__scopeId", "data-v-e6f71d76"]]);
|
|
40136
40324
|
//#endregion
|
|
40137
40325
|
//#region src/internal/toolbar/built-in/toolbar-focus-helpers.js
|
|
40138
40326
|
var preventEditorFocusTransfer = (event) => {
|
|
@@ -40357,7 +40545,7 @@ var normalizeCustomFontSize = (value) => {
|
|
|
40357
40545
|
};
|
|
40358
40546
|
//#endregion
|
|
40359
40547
|
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
40360
|
-
var _hoisted_1$
|
|
40548
|
+
var _hoisted_1$12 = ["data-item"];
|
|
40361
40549
|
var _hoisted_2$9 = [
|
|
40362
40550
|
"id",
|
|
40363
40551
|
"value",
|
|
@@ -40374,7 +40562,11 @@ var _hoisted_3$7 = [
|
|
|
40374
40562
|
"disabled"
|
|
40375
40563
|
];
|
|
40376
40564
|
var _hoisted_4$5 = ["innerHTML"];
|
|
40377
|
-
var _hoisted_5$4 = [
|
|
40565
|
+
var _hoisted_5$4 = [
|
|
40566
|
+
"data-superdoc-ui-owner",
|
|
40567
|
+
"id",
|
|
40568
|
+
"aria-label"
|
|
40569
|
+
];
|
|
40378
40570
|
var _hoisted_6$3 = [
|
|
40379
40571
|
"id",
|
|
40380
40572
|
"aria-selected",
|
|
@@ -40417,6 +40609,7 @@ var _sfc_main$15 = {
|
|
|
40417
40609
|
const props = __props;
|
|
40418
40610
|
const emit = __emit;
|
|
40419
40611
|
const { isHighContrastMode } = useHighContrastMode();
|
|
40612
|
+
const toolbarOwnerId = require__plugin_vue_export_helper.inject("sdToolbarOwnerId", null);
|
|
40420
40613
|
const inputRef = require__plugin_vue_export_helper.ref(null);
|
|
40421
40614
|
const rootRef = require__plugin_vue_export_helper.ref(null);
|
|
40422
40615
|
const popupRef = require__plugin_vue_export_helper.ref(null);
|
|
@@ -40843,6 +41036,7 @@ var _sfc_main$15 = {
|
|
|
40843
41036
|
ref: popupRef,
|
|
40844
41037
|
role: "listbox",
|
|
40845
41038
|
"data-sd-part": "dropdown-menu",
|
|
41039
|
+
"data-superdoc-ui-owner": require__plugin_vue_export_helper.unref(toolbarOwnerId),
|
|
40846
41040
|
id: listboxId.value,
|
|
40847
41041
|
"aria-label": ariaLabel.value,
|
|
40848
41042
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-font-combobox__listbox", { "high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode) }]),
|
|
@@ -40868,11 +41062,11 @@ var _sfc_main$15 = {
|
|
|
40868
41062
|
}), [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_7$1, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 16, _hoisted_6$3);
|
|
40869
41063
|
}), 128))], 14, _hoisted_5$4)) : require__plugin_vue_export_helper.createCommentVNode("", true)])),
|
|
40870
41064
|
require__plugin_vue_export_helper.createElementVNode("span", _hoisted_8$1, require__plugin_vue_export_helper.toDisplayString(appliedLabel.value), 1)
|
|
40871
|
-
], 14, _hoisted_1$
|
|
41065
|
+
], 14, _hoisted_1$12);
|
|
40872
41066
|
};
|
|
40873
41067
|
}
|
|
40874
41068
|
};
|
|
40875
|
-
var ToolbarComboBox_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$15, [["__scopeId", "data-v-
|
|
41069
|
+
var ToolbarComboBox_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$15, [["__scopeId", "data-v-eb442535"]]);
|
|
40876
41070
|
//#endregion
|
|
40877
41071
|
//#region src/internal/toolbar/built-in/FontFamilyCombobox.vue
|
|
40878
41072
|
var _sfc_main$14 = {
|
|
@@ -41176,7 +41370,7 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
41176
41370
|
var SdTooltip_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$12, [["__scopeId", "data-v-71c6de4c"]]);
|
|
41177
41371
|
//#endregion
|
|
41178
41372
|
//#region src/internal/toolbar/built-in/ButtonGroup.vue
|
|
41179
|
-
var _hoisted_1$
|
|
41373
|
+
var _hoisted_1$11 = [
|
|
41180
41374
|
"onKeydown",
|
|
41181
41375
|
"tabindex",
|
|
41182
41376
|
"data-item-id"
|
|
@@ -41672,7 +41866,7 @@ var _sfc_main$11 = {
|
|
|
41672
41866
|
"onButtonClick",
|
|
41673
41867
|
"overflow-items"
|
|
41674
41868
|
])) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
41675
|
-
], 42, _hoisted_1$
|
|
41869
|
+
], 42, _hoisted_1$11);
|
|
41676
41870
|
}), 128))], 36);
|
|
41677
41871
|
};
|
|
41678
41872
|
}
|
|
@@ -41862,6 +42056,7 @@ var NON_HEADLESS_EXECUTE_ITEM_NAMES = /* @__PURE__ */ new Set(["link"]);
|
|
|
41862
42056
|
new Set(Object.keys(HEADLESS_ITEM_MAP).filter((itemName) => !NON_HEADLESS_EXECUTE_ITEM_NAMES.has(itemName)));
|
|
41863
42057
|
//#endregion
|
|
41864
42058
|
//#region src/internal/toolbar/built-in/Toolbar.vue
|
|
42059
|
+
var _hoisted_1$10 = ["data-superdoc-ui-owner"];
|
|
41865
42060
|
/**
|
|
41866
42061
|
* The default font-family to use for toolbar UI surfaces when no custom font is configured.
|
|
41867
42062
|
* This constant ensures consistency across the toolbar application.
|
|
@@ -41877,6 +42072,7 @@ var Toolbar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vu
|
|
|
41877
42072
|
],
|
|
41878
42073
|
setup(__props, { emit: __emit }) {
|
|
41879
42074
|
const { proxy } = require__plugin_vue_export_helper.getCurrentInstance();
|
|
42075
|
+
require__plugin_vue_export_helper.provide("sdToolbarOwnerId", getSuperDocUiOwnerId(proxy.$toolbar.superdoc));
|
|
41880
42076
|
let toolbarKey = require__plugin_vue_export_helper.ref(1);
|
|
41881
42077
|
const toolbarRoot = require__plugin_vue_export_helper.ref(null);
|
|
41882
42078
|
const toolbarStateVersion = require__plugin_vue_export_helper.ref(0);
|
|
@@ -42021,6 +42217,7 @@ var Toolbar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vu
|
|
|
42021
42217
|
"aria-label": "Toolbar",
|
|
42022
42218
|
"data-sd-part": "toolbar",
|
|
42023
42219
|
"data-editor-ui-surface": "",
|
|
42220
|
+
"data-superdoc-ui-owner": require__plugin_vue_export_helper.unref(getSuperDocUiOwnerId)(require__plugin_vue_export_helper.unref(proxy).$toolbar.superdoc),
|
|
42024
42221
|
onMousedown: handleToolbarMousedown
|
|
42025
42222
|
}, [
|
|
42026
42223
|
require__plugin_vue_export_helper.unref(showLeftSide) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ButtonGroup_default, {
|
|
@@ -42069,10 +42266,10 @@ var Toolbar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vu
|
|
|
42069
42266
|
"compact-side-groups",
|
|
42070
42267
|
"ui-font-family"
|
|
42071
42268
|
])) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
42072
|
-
],
|
|
42269
|
+
], 40, _hoisted_1$10);
|
|
42073
42270
|
};
|
|
42074
42271
|
}
|
|
42075
|
-
}, [["__scopeId", "data-v-
|
|
42272
|
+
}, [["__scopeId", "data-v-0790fc37"]]);
|
|
42076
42273
|
//#endregion
|
|
42077
42274
|
//#region src/internal/toolbar/built-in/font-options.js
|
|
42078
42275
|
/**
|
|
@@ -46399,6 +46596,8 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46399
46596
|
return this.#surfacesConfig;
|
|
46400
46597
|
}
|
|
46401
46598
|
#surfaceManager;
|
|
46599
|
+
#sourceLifecycleReady;
|
|
46600
|
+
#pendingSourceLifecycle;
|
|
46402
46601
|
/**
|
|
46403
46602
|
* SuperDoc-owned editor runtime registry. This is the internal place to ask
|
|
46404
46603
|
* which mounted editor runtime is active and which runtime owns a DOM event
|
|
@@ -46471,6 +46670,8 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46471
46670
|
this.whiteboard = null;
|
|
46472
46671
|
this.colors = [];
|
|
46473
46672
|
this.readyEditors = 0;
|
|
46673
|
+
this.#sourceLifecycleReady = false;
|
|
46674
|
+
this.#pendingSourceLifecycle = [];
|
|
46474
46675
|
this.#editorRuntimeRegistry = new EditorRuntimeRegistry();
|
|
46475
46676
|
this.#editorRuntimeRegistryUnsub = null;
|
|
46476
46677
|
this.#applyingRuntimeActiveChange = false;
|
|
@@ -46624,7 +46825,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46624
46825
|
}
|
|
46625
46826
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46626
46827
|
this.colorIndex = 0;
|
|
46627
|
-
this.version = "2.25.0-next.
|
|
46828
|
+
this.version = "2.25.0-next.11";
|
|
46628
46829
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46629
46830
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46630
46831
|
this.colors = this.config.colors ?? [];
|
|
@@ -46661,6 +46862,8 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46661
46862
|
* Mount the Vue app, stores, and editor runtime.
|
|
46662
46863
|
*/
|
|
46663
46864
|
#startRuntime() {
|
|
46865
|
+
this.#sourceLifecycleReady = false;
|
|
46866
|
+
this.#pendingSourceLifecycle = [];
|
|
46664
46867
|
this.#initVueApp();
|
|
46665
46868
|
this.readyEditors = 0;
|
|
46666
46869
|
if (!this.app) throw new Error("SuperDoc: #startRuntime called before #initVueApp populated this.app");
|
|
@@ -47696,7 +47899,13 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47696
47899
|
* Triggered when the superdoc is ready
|
|
47697
47900
|
*/
|
|
47698
47901
|
broadcastReady() {
|
|
47699
|
-
if (this
|
|
47902
|
+
if (this.#destroyed) return;
|
|
47903
|
+
if (this.readyEditors === this.requiredNumberOfEditors) {
|
|
47904
|
+
this.emit("ready", { superdoc: this });
|
|
47905
|
+
if (this.#destroyed) return;
|
|
47906
|
+
this.#sourceLifecycleReady = true;
|
|
47907
|
+
for (const type of this.#pendingSourceLifecycle.splice(0)) this.emit(type);
|
|
47908
|
+
}
|
|
47700
47909
|
}
|
|
47701
47910
|
/**
|
|
47702
47911
|
* Triggered before an editor is created
|
|
@@ -47715,11 +47924,19 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47715
47924
|
this.#wireFontsChangedRelay(editor);
|
|
47716
47925
|
this.emit("editorCreate", { editor: createDeprecatedEditorProxy(editor) });
|
|
47717
47926
|
}
|
|
47927
|
+
#broadcastSourceLifecycle(type) {
|
|
47928
|
+
if (this.#destroyed) return;
|
|
47929
|
+
if (!this.#sourceLifecycleReady) {
|
|
47930
|
+
this.#pendingSourceLifecycle.push(type);
|
|
47931
|
+
return;
|
|
47932
|
+
}
|
|
47933
|
+
this.emit(type);
|
|
47934
|
+
}
|
|
47718
47935
|
broadcastSourceComplete() {
|
|
47719
|
-
this
|
|
47936
|
+
this.#broadcastSourceLifecycle("source:complete");
|
|
47720
47937
|
}
|
|
47721
47938
|
broadcastSourceSignalsComplete() {
|
|
47722
|
-
this
|
|
47939
|
+
this.#broadcastSourceLifecycle("source:signals-complete");
|
|
47723
47940
|
}
|
|
47724
47941
|
/** Editors whose `fonts-changed` we already relay, so a repeated create wires once. */
|
|
47725
47942
|
#fontsRelayEditors;
|
|
@@ -48981,6 +49198,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48981
49198
|
destroy() {
|
|
48982
49199
|
require_create_super_doc_ui.closeInteractionHistory(this);
|
|
48983
49200
|
this.#destroyed = true;
|
|
49201
|
+
this.#pendingSourceLifecycle = [];
|
|
48984
49202
|
this.#contentControlClickRoot?.removeEventListener("click", this.#handleContentControlClick, true);
|
|
48985
49203
|
this.#contentControlClickRoot?.removeEventListener("pointerdown", this.#handleContentControlPointerDown, true);
|
|
48986
49204
|
this.#contentControlClickRoot?.ownerDocument.removeEventListener("pointerup", this.#handleContentControlPointerEnd, true);
|
|
@@ -49218,3 +49436,5 @@ exports.compareVersions = compareVersions;
|
|
|
49218
49436
|
exports.createTheme = createTheme;
|
|
49219
49437
|
exports.defineSuperDocExtension = defineSuperDocExtension;
|
|
49220
49438
|
exports.getFileObject = getFileObject;
|
|
49439
|
+
exports.listPermissionRangeEditors = listPermissionRangeEditors;
|
|
49440
|
+
exports.resolvePermissionRangeEditor = resolvePermissionRangeEditor;
|