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