superdoc 2.28.0 → 2.29.0-next.2
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/{PdfViewer-JHXZQZ9x.es.js → PdfViewer-D4lVeOJu.es.js} +3 -2
- package/dist/chunks/{PdfViewer-Cg072l5d.cjs → PdfViewer-boENOZdF.cjs} +3 -2
- package/dist/chunks/{create-super-doc-ui-BfgYblyI.cjs → create-super-doc-ui-BAGOnYGM.cjs} +201 -23
- package/dist/chunks/{create-super-doc-ui-BbjHD1ul.es.js → create-super-doc-ui-BFt8agAI.es.js} +180 -20
- package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
- package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/capabilities/html-markdown-support.d.ts +3 -3
- package/dist/document-api/src/contract/metadata-types.d.ts +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/index.d.ts +1 -1
- package/dist/document-api/src/lists/lists.d.ts +79 -79
- package/dist/document-api/src/tables/tables.d.ts +2 -1
- package/dist/document-api/src/types/table-operations.types.d.ts +1 -0
- package/dist/document-api/src/write/write.d.ts +10 -9
- package/dist/layout-engine/contracts/src/index.d.ts +1 -1
- package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +3 -1
- package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
- package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/SuperDoc.vue.d.ts +5 -3
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +2365 -48
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +108 -23
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +689 -14
- package/dist/superdoc/src/components/CommentsLayer/CommentsDropdown.vue.d.ts +55 -20
- package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +21 -8
- package/dist/superdoc/src/components/CommentsLayer/InternalDropdown.vue.d.ts +24 -8
- package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +5 -3
- package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +60 -12
- package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +20 -6
- package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +1 -0
- package/dist/superdoc/src/components/general/Avatar.vue.d.ts +14 -0
- package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
- package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
- package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
- package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +4 -1
- package/dist/superdoc/src/core/SuperDoc.d.ts +1 -1
- package/dist/superdoc/src/core/collaboration/permissions.d.ts +2 -1
- package/dist/superdoc/src/core/types/index.d.ts +9 -4
- package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
- package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
- package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
- package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
- package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
- package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +82 -11
- package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +122 -33
- package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +0 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +151 -28
- package/dist/superdoc/src/stores/superdoc-store.d.ts +454 -85
- package/dist/superdoc.cjs +396 -443
- package/dist/superdoc.es.js +329 -378
- 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/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
package/dist/superdoc.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
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-BAGOnYGM.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-6MBoygIY.cjs");
|
|
8
8
|
const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
|
|
9
|
+
const require_is_finite_number = require("./chunks/is-finite-number-BEXgTRgc.cjs");
|
|
9
10
|
const require_constants = require("./chunks/constants-DpXuDx_g.cjs");
|
|
10
11
|
let superdoc_entry_vue = require("vue");
|
|
11
12
|
superdoc_entry_vue = require_rolldown_runtime.__toESM(superdoc_entry_vue, 1);
|
|
@@ -258,7 +259,7 @@ var v_click_outside_default = {
|
|
|
258
259
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
259
260
|
function getSuperdocVersion() {
|
|
260
261
|
try {
|
|
261
|
-
return "2.
|
|
262
|
+
return "2.29.0-next.2";
|
|
262
263
|
} catch {
|
|
263
264
|
return "unknown";
|
|
264
265
|
}
|
|
@@ -5397,7 +5398,7 @@ function normalizeRoomMode(value) {
|
|
|
5397
5398
|
}
|
|
5398
5399
|
function normalizeSyncTimeoutMs(value) {
|
|
5399
5400
|
if (value === void 0) return void 0;
|
|
5400
|
-
return
|
|
5401
|
+
return require_is_finite_number.isFiniteNumber(value) && value > 0 && value <= 2147483647 ? value : null;
|
|
5401
5402
|
}
|
|
5402
5403
|
function withSyncTimeout(resolution, syncTimeoutMs) {
|
|
5403
5404
|
if (!resolution.ok || syncTimeoutMs === void 0) return resolution;
|
|
@@ -6584,7 +6585,7 @@ var useSuperdocStore = defineStore("superdoc", () => {
|
|
|
6584
6585
|
currentConfig.value = config;
|
|
6585
6586
|
if (config.zoom?.initial !== void 0) {
|
|
6586
6587
|
const initialZoom = config.zoom.initial;
|
|
6587
|
-
if (
|
|
6588
|
+
if (require_is_finite_number.isFiniteNumber(initialZoom) && initialZoom > 0) activeZoom.value = initialZoom;
|
|
6588
6589
|
else console.warn("[SuperDoc] zoom.initial expects a positive number representing percentage");
|
|
6589
6590
|
}
|
|
6590
6591
|
if (config.zoom?.mode !== void 0) {
|
|
@@ -7449,8 +7450,8 @@ var normalizeTrackedChangeImagePreview = (preview) => {
|
|
|
7449
7450
|
if (!src || !src.startsWith("data:image/")) return null;
|
|
7450
7451
|
const contentType = typeof preview.contentType === "string" && preview.contentType.startsWith("image/") ? preview.contentType : null;
|
|
7451
7452
|
const role = typeof preview.role === "string" ? preview.role : null;
|
|
7452
|
-
const width =
|
|
7453
|
-
const height =
|
|
7453
|
+
const width = require_is_finite_number.isFiniteNumber(preview.width) && preview.width > 0 ? preview.width : null;
|
|
7454
|
+
const height = require_is_finite_number.isFiniteNumber(preview.height) && preview.height > 0 ? preview.height : null;
|
|
7454
7455
|
const alt = typeof preview.alt === "string" && preview.alt.length > 0 ? preview.alt : "Tracked image preview";
|
|
7455
7456
|
return {
|
|
7456
7457
|
src,
|
|
@@ -8478,10 +8479,10 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8478
8479
|
* Get a new pending comment
|
|
8479
8480
|
*
|
|
8480
8481
|
* @param {Object} param0
|
|
8481
|
-
* @param {Object} param0.selection The selection object
|
|
8482
|
-
* @param {
|
|
8483
|
-
* @param {
|
|
8484
|
-
* @returns {
|
|
8482
|
+
* @param {Object} [param0.selection] The selection object
|
|
8483
|
+
* @param {string | null} [param0.documentId] The document ID
|
|
8484
|
+
* @param {string | null} [param0.parentCommentId] The parent comment
|
|
8485
|
+
* @returns {ReturnType<typeof useComment>} The new comment object
|
|
8485
8486
|
*/
|
|
8486
8487
|
const getPendingComment = ({ selection, documentId, parentCommentId, ...options }) => {
|
|
8487
8488
|
return _getNewcomment({
|
|
@@ -8553,7 +8554,11 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8553
8554
|
*
|
|
8554
8555
|
* @param {Object} param0
|
|
8555
8556
|
* @param {Object} param0.superdoc The SuperDoc instance
|
|
8556
|
-
* @
|
|
8557
|
+
* @param {ReturnType<typeof useComment>} param0.comment The comment to add
|
|
8558
|
+
* @param {boolean} [param0.skipEditorUpdate] Skip writing the comment into the editor
|
|
8559
|
+
* @param {boolean} [param0.broadcastChanges] Emit and sync the change
|
|
8560
|
+
* @param {boolean} [param0.isHydration] The comment comes from import or collaboration
|
|
8561
|
+
* @returns {{ ok: boolean, reason?: string, detail?: string, code?: string } | Promise<{ ok: boolean, reason?: string, detail?: string, code?: string }>} The mutation outcome
|
|
8557
8562
|
*/
|
|
8558
8563
|
const addCommentInternal = ({ superdoc, comment, skipEditorUpdate = false, broadcastChanges = true, isHydration = false }) => {
|
|
8559
8564
|
if (commentsAreReadOnly() && !isHydration) return readOnlyMutationOutcome();
|
|
@@ -9134,6 +9139,13 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9134
9139
|
* - successful mutation refreshes from v2 list and reconciles
|
|
9135
9140
|
* - rejection preserves rows and emits a rejected `comments-update` event
|
|
9136
9141
|
* - committed-but-refresh-failed surfaces honestly (no reconcile with `[]`)
|
|
9142
|
+
*
|
|
9143
|
+
* @param {Object} [param0]
|
|
9144
|
+
* @param {Object} [param0.superdoc] The SuperDoc instance.
|
|
9145
|
+
* @param {string | null} [param0.parentCommentId] The comment or tracked-change row being replied to.
|
|
9146
|
+
* @param {string} [param0.text] The reply text.
|
|
9147
|
+
* @param {Array<{ name?: string | null, email?: string | null }>} [param0.mentions] Users mentioned in the reply.
|
|
9148
|
+
* @param {{ kind: 'trackedChange', trackedChangeId: string, story?: unknown, side?: 'source' | 'destination' }} [param0.trackedChangeTarget] The tracked change a first reply anchors to.
|
|
9137
9149
|
*/
|
|
9138
9150
|
const replyCommentV2 = async ({ superdoc, parentCommentId, text, mentions = [], trackedChangeTarget } = {}) => {
|
|
9139
9151
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
@@ -10404,15 +10416,13 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10404
10416
|
} catch {}
|
|
10405
10417
|
};
|
|
10406
10418
|
/**
|
|
10407
|
-
*
|
|
10408
|
-
*
|
|
10409
|
-
* Useful after bulk document transforms (like diff replay) where tracked-change
|
|
10410
|
-
* marks may be remapped and incremental tracked-change events are not emitted.
|
|
10419
|
+
* Accept or reject the tracked change behind a sidebar row.
|
|
10411
10420
|
*
|
|
10412
10421
|
* @param {Object} param0
|
|
10413
10422
|
* @param {Object} param0.superdoc The SuperDoc instance.
|
|
10414
|
-
* @param {Object} param0.
|
|
10415
|
-
* @
|
|
10423
|
+
* @param {Object} param0.comment The tracked-change row.
|
|
10424
|
+
* @param {string} param0.decision `'accept'` or `'reject'`.
|
|
10425
|
+
* @returns {{ ok: boolean, success?: boolean, reason?: string } | Promise<{ ok: boolean, success?: boolean, reason?: string }>} The decision outcome.
|
|
10416
10426
|
*/
|
|
10417
10427
|
const decideTrackedChangeFromSidebar = ({ superdoc, comment, decision }) => {
|
|
10418
10428
|
const disabledReason = trackedChangeDecisionDisabledReason(superdoc);
|
|
@@ -10940,6 +10950,18 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10940
10950
|
};
|
|
10941
10951
|
});
|
|
10942
10952
|
//#endregion
|
|
10953
|
+
//#region src/composables/use-superdoc-instance.ts
|
|
10954
|
+
function useSuperDocInstance() {
|
|
10955
|
+
const instance = require__plugin_vue_export_helper.getCurrentInstance();
|
|
10956
|
+
if (!instance?.proxy) throw new Error("useSuperDocInstance() must be called during a component setup function.");
|
|
10957
|
+
const superdoc = instance.appContext.config.globalProperties.$superdoc;
|
|
10958
|
+
if (!superdoc) throw new Error("useSuperDocInstance() found no SuperDoc registered at app.config.globalProperties.$superdoc.");
|
|
10959
|
+
return {
|
|
10960
|
+
proxy: instance.proxy,
|
|
10961
|
+
superdoc
|
|
10962
|
+
};
|
|
10963
|
+
}
|
|
10964
|
+
//#endregion
|
|
10943
10965
|
//#region ../../shared/common/icons/comment-solid.svg?raw
|
|
10944
10966
|
var comment_solid_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z\"/></svg>";
|
|
10945
10967
|
//#endregion
|
|
@@ -11071,7 +11093,7 @@ function useUiFontFamily() {
|
|
|
11071
11093
|
}) };
|
|
11072
11094
|
}
|
|
11073
11095
|
//#endregion
|
|
11074
|
-
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
11096
|
+
//#region src/components/CommentsLayer/CommentsDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
11075
11097
|
var _hoisted_1$31 = { class: "comments-dropdown" };
|
|
11076
11098
|
var _hoisted_2$24 = ["onClick"];
|
|
11077
11099
|
var _hoisted_3$21 = {
|
|
@@ -11080,7 +11102,7 @@ var _hoisted_3$21 = {
|
|
|
11080
11102
|
};
|
|
11081
11103
|
var _hoisted_4$15 = ["innerHTML"];
|
|
11082
11104
|
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
11083
|
-
var
|
|
11105
|
+
var CommentsDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11084
11106
|
__name: "CommentsDropdown",
|
|
11085
11107
|
props: {
|
|
11086
11108
|
options: {
|
|
@@ -11229,15 +11251,17 @@ var _sfc_main$38 = {
|
|
|
11229
11251
|
}), 128))], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true)]))]);
|
|
11230
11252
|
};
|
|
11231
11253
|
}
|
|
11232
|
-
};
|
|
11233
|
-
var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$38, [["__scopeId", "data-v-7eced80a"]]);
|
|
11254
|
+
});
|
|
11234
11255
|
//#endregion
|
|
11235
|
-
//#region src/components/CommentsLayer/
|
|
11256
|
+
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
11257
|
+
var CommentsDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentsDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-70674ffd"]]);
|
|
11258
|
+
//#endregion
|
|
11259
|
+
//#region src/components/CommentsLayer/InternalDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
11236
11260
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
11237
11261
|
var _hoisted_2$23 = ["innerHTML"];
|
|
11238
11262
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
11239
11263
|
var _hoisted_4$14 = ["innerHTML"];
|
|
11240
|
-
var
|
|
11264
|
+
var InternalDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11241
11265
|
__name: "InternalDropdown",
|
|
11242
11266
|
props: {
|
|
11243
11267
|
state: {
|
|
@@ -11319,8 +11343,10 @@ var _sfc_main$37 = {
|
|
|
11319
11343
|
}, 8, ["disabled", "content-style"])], 4);
|
|
11320
11344
|
};
|
|
11321
11345
|
}
|
|
11322
|
-
};
|
|
11323
|
-
|
|
11346
|
+
});
|
|
11347
|
+
//#endregion
|
|
11348
|
+
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
11349
|
+
var InternalDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(InternalDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-026f5d66"]]);
|
|
11324
11350
|
//#endregion
|
|
11325
11351
|
//#region src/components/CommentsLayer/helpers.js
|
|
11326
11352
|
/**
|
|
@@ -11353,130 +11379,14 @@ function formatDate(timestamp) {
|
|
|
11353
11379
|
return `${`${formattedHours}:${minutes.toString().padStart(2, "0")}${meridiem}`} ${month} ${day}`;
|
|
11354
11380
|
}
|
|
11355
11381
|
//#endregion
|
|
11356
|
-
//#region src/
|
|
11357
|
-
var PERMISSIONS = Object.freeze({
|
|
11358
|
-
RESOLVE_OWN: "RESOLVE_OWN",
|
|
11359
|
-
RESOLVE_OTHER: "RESOLVE_OTHER",
|
|
11360
|
-
REJECT_OWN: "REJECT_OWN",
|
|
11361
|
-
REJECT_OTHER: "REJECT_OTHER",
|
|
11362
|
-
COMMENTS_OVERFLOW_OWN: "COMMENTS_OVERFLOW",
|
|
11363
|
-
COMMENTS_OVERFLOW_OTHER: "COMMENTS_OVERFLOW_OTHER",
|
|
11364
|
-
COMMENTS_DELETE_OWN: "COMMENTS_DELETE_OWN",
|
|
11365
|
-
COMMENTS_DELETE_OTHER: "COMMENTS_DELETE_OTHER",
|
|
11366
|
-
UPLOAD_VERSION: "UPLOAD_VERSION",
|
|
11367
|
-
VERSION_HISTORY: "VERSION_HISTORY"
|
|
11368
|
-
});
|
|
11369
|
-
var ROLES = Object.freeze({
|
|
11370
|
-
EDITOR: "editor",
|
|
11371
|
-
SUGGESTER: "suggester",
|
|
11372
|
-
VIEWER: "viewer"
|
|
11373
|
-
});
|
|
11374
|
-
var PERMISSION_MATRIX = Object.freeze({
|
|
11375
|
-
[PERMISSIONS.RESOLVE_OWN]: {
|
|
11376
|
-
internal: [ROLES.EDITOR],
|
|
11377
|
-
external: [ROLES.EDITOR]
|
|
11378
|
-
},
|
|
11379
|
-
[PERMISSIONS.RESOLVE_OTHER]: {
|
|
11380
|
-
internal: [ROLES.EDITOR],
|
|
11381
|
-
external: [ROLES.EDITOR]
|
|
11382
|
-
},
|
|
11383
|
-
[PERMISSIONS.REJECT_OWN]: {
|
|
11384
|
-
internal: [ROLES.EDITOR, ROLES.SUGGESTER],
|
|
11385
|
-
external: [ROLES.EDITOR, ROLES.SUGGESTER]
|
|
11386
|
-
},
|
|
11387
|
-
[PERMISSIONS.REJECT_OTHER]: {
|
|
11388
|
-
internal: [ROLES.EDITOR],
|
|
11389
|
-
external: [ROLES.EDITOR]
|
|
11390
|
-
},
|
|
11391
|
-
[PERMISSIONS.COMMENTS_OVERFLOW_OWN]: {
|
|
11392
|
-
internal: [ROLES.EDITOR, ROLES.SUGGESTER],
|
|
11393
|
-
external: [ROLES.EDITOR, ROLES.SUGGESTER]
|
|
11394
|
-
},
|
|
11395
|
-
[PERMISSIONS.COMMENTS_OVERFLOW_OTHER]: {
|
|
11396
|
-
internal: [ROLES.EDITOR],
|
|
11397
|
-
external: [ROLES.EDITOR]
|
|
11398
|
-
},
|
|
11399
|
-
[PERMISSIONS.COMMENTS_DELETE_OWN]: {
|
|
11400
|
-
internal: [ROLES.EDITOR, ROLES.SUGGESTER],
|
|
11401
|
-
external: [ROLES.EDITOR, ROLES.SUGGESTER]
|
|
11402
|
-
},
|
|
11403
|
-
[PERMISSIONS.COMMENTS_DELETE_OTHER]: {
|
|
11404
|
-
internal: [ROLES.EDITOR],
|
|
11405
|
-
external: [ROLES.EDITOR]
|
|
11406
|
-
},
|
|
11407
|
-
[PERMISSIONS.UPLOAD_VERSION]: {
|
|
11408
|
-
internal: [ROLES.EDITOR],
|
|
11409
|
-
external: []
|
|
11410
|
-
},
|
|
11411
|
-
[PERMISSIONS.VERSION_HISTORY]: {
|
|
11412
|
-
internal: [ROLES.EDITOR],
|
|
11413
|
-
external: []
|
|
11414
|
-
}
|
|
11415
|
-
});
|
|
11416
|
-
var pickResolver = (context = {}) => {
|
|
11417
|
-
if (typeof context.permissionResolver === "function") return context.permissionResolver;
|
|
11418
|
-
if (typeof context.superdoc?.config?.permissionResolver === "function") return context.superdoc.config.permissionResolver;
|
|
11419
|
-
const deprecatedResolver = context.superdoc?.config?.modules?.comments?.permissionResolver;
|
|
11420
|
-
if (typeof deprecatedResolver === "function") return deprecatedResolver;
|
|
11421
|
-
return null;
|
|
11422
|
-
};
|
|
11423
|
-
var BUILT_IN_PERMISSION_METHOD = Symbol.for("superdoc.internal.permission-method.builtin");
|
|
11424
|
-
var BUILT_IN_PERMISSION_RESOLVER = Symbol.for("superdoc.internal.permission-resolver.builtin");
|
|
11425
|
-
/** Create the shell's internal, live tracked-change permission shim. */
|
|
11426
|
-
var createTrackedChangePermissionResolver = (superdoc) => {
|
|
11427
|
-
const isBuiltInPolicy = () => superdoc.canPerformPermission?.[BUILT_IN_PERMISSION_METHOD] === true && pickResolver({ superdoc }) === null;
|
|
11428
|
-
const resolver = (payload = {}) => isBuiltInPolicy() ? defaultDecisionFor(payload.permission, superdoc.config.role, superdoc.config.isInternal) : superdoc.canPerformPermission({
|
|
11429
|
-
...payload,
|
|
11430
|
-
role: superdoc.config.role,
|
|
11431
|
-
isInternal: superdoc.config.isInternal
|
|
11432
|
-
});
|
|
11433
|
-
Object.defineProperty(resolver, BUILT_IN_PERMISSION_RESOLVER, { value: isBuiltInPolicy });
|
|
11434
|
-
return resolver;
|
|
11435
|
-
};
|
|
11436
|
-
var defaultDecisionFor = (permission, role, isInternal) => {
|
|
11437
|
-
const internalExternal = isInternal ? "internal" : "external";
|
|
11438
|
-
return PERMISSION_MATRIX[permission]?.[internalExternal]?.includes(role) ?? false;
|
|
11439
|
-
};
|
|
11440
|
-
/**
|
|
11441
|
-
* Resolve a client-side permission through the built-in matrix and optional
|
|
11442
|
-
* resolver.
|
|
11443
|
-
*
|
|
11444
|
-
* @param {string} permission The permission to check
|
|
11445
|
-
* @param {string} role The role to check
|
|
11446
|
-
* @param {boolean} isInternal The internal/external flag
|
|
11447
|
-
* @param {object} [context] Context passed to the permission resolver
|
|
11448
|
-
* @param {object | null} [context.comment] The comment/tracked change being evaluated
|
|
11449
|
-
* @param {object | null} [context.superdoc] The SuperDoc instance
|
|
11450
|
-
* @param {object | null} [context.currentUser] The active user object performing the action
|
|
11451
|
-
* @param {Function} [context.permissionResolver] Explicit resolver override
|
|
11452
|
-
* @param {object | null} [context.trackedChange] Tracked change metadata (for tracked-change permissions)
|
|
11453
|
-
* @returns {boolean} Whether the permission is allowed
|
|
11454
|
-
*/
|
|
11455
|
-
var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
11456
|
-
const defaultDecision = defaultDecisionFor(permission, role, isInternal);
|
|
11457
|
-
const resolver = pickResolver(context);
|
|
11458
|
-
if (typeof resolver !== "function") return defaultDecision;
|
|
11459
|
-
const decision = resolver({
|
|
11460
|
-
permission,
|
|
11461
|
-
role,
|
|
11462
|
-
isInternal,
|
|
11463
|
-
defaultDecision,
|
|
11464
|
-
comment: context.comment ?? null,
|
|
11465
|
-
currentUser: context.currentUser ?? context.superdoc?.config?.user ?? null,
|
|
11466
|
-
superdoc: context.superdoc ?? null,
|
|
11467
|
-
trackedChange: context.trackedChange ?? null
|
|
11468
|
-
});
|
|
11469
|
-
return typeof decision === "boolean" ? decision : defaultDecision;
|
|
11470
|
-
};
|
|
11471
|
-
//#endregion
|
|
11472
|
-
//#region src/components/general/Avatar.vue
|
|
11382
|
+
//#region src/components/general/Avatar.vue?vue&type=script&setup=true&lang.ts
|
|
11473
11383
|
var _hoisted_1$29 = { class: "user-container" };
|
|
11474
11384
|
var _hoisted_2$22 = ["src"];
|
|
11475
11385
|
var _hoisted_3$19 = {
|
|
11476
11386
|
key: 1,
|
|
11477
11387
|
class: "user-bg"
|
|
11478
11388
|
};
|
|
11479
|
-
var
|
|
11389
|
+
var Avatar_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11480
11390
|
__name: "Avatar",
|
|
11481
11391
|
props: { user: {
|
|
11482
11392
|
type: Object,
|
|
@@ -11500,10 +11410,12 @@ var _sfc_main$36 = {
|
|
|
11500
11410
|
}, null, 8, _hoisted_2$22)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$19, require__plugin_vue_export_helper.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))]);
|
|
11501
11411
|
};
|
|
11502
11412
|
}
|
|
11503
|
-
};
|
|
11504
|
-
var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$36, [["__scopeId", "data-v-c95b2073"]]);
|
|
11413
|
+
});
|
|
11505
11414
|
//#endregion
|
|
11506
|
-
//#region src/components/
|
|
11415
|
+
//#region src/components/general/Avatar.vue
|
|
11416
|
+
var Avatar_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(Avatar_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-0b3a0868"]]);
|
|
11417
|
+
//#endregion
|
|
11418
|
+
//#region src/components/CommentsLayer/CommentHeader.vue?vue&type=script&setup=true&lang.ts
|
|
11507
11419
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
11508
11420
|
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
11509
11421
|
var _hoisted_3$18 = { class: "user-info" };
|
|
@@ -11533,7 +11445,7 @@ var _hoisted_9$4 = [
|
|
|
11533
11445
|
];
|
|
11534
11446
|
var _hoisted_10$4 = { class: "overflow-menu__icon" };
|
|
11535
11447
|
var _hoisted_11$4 = ["innerHTML"];
|
|
11536
|
-
var
|
|
11448
|
+
var CommentHeader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11537
11449
|
__name: "CommentHeader",
|
|
11538
11450
|
props: {
|
|
11539
11451
|
timestamp: {
|
|
@@ -11546,7 +11458,7 @@ var _sfc_main$35 = {
|
|
|
11546
11458
|
},
|
|
11547
11459
|
comment: {
|
|
11548
11460
|
type: Object,
|
|
11549
|
-
required:
|
|
11461
|
+
required: true
|
|
11550
11462
|
},
|
|
11551
11463
|
isPendingInput: {
|
|
11552
11464
|
type: Boolean,
|
|
@@ -11588,9 +11500,9 @@ var _sfc_main$35 = {
|
|
|
11588
11500
|
const emit = __emit;
|
|
11589
11501
|
const commentsStore = useCommentsStore();
|
|
11590
11502
|
const props = __props;
|
|
11591
|
-
const { proxy } =
|
|
11592
|
-
const role =
|
|
11593
|
-
const isInternal =
|
|
11503
|
+
const { proxy, superdoc } = useSuperDocInstance();
|
|
11504
|
+
const role = superdoc.config.role;
|
|
11505
|
+
const isInternal = superdoc.config.isInternal;
|
|
11594
11506
|
const isCommentOwnedByCurrentUser = (comment) => {
|
|
11595
11507
|
const currentUser = proxy.$superdoc.config.user;
|
|
11596
11508
|
const otherUser = {
|
|
@@ -11654,11 +11566,12 @@ var _sfc_main$35 = {
|
|
|
11654
11566
|
if (props.isPendingInput) return false;
|
|
11655
11567
|
return true;
|
|
11656
11568
|
});
|
|
11569
|
+
const resolveIsDisabled = () => props.config.allowResolve === false;
|
|
11657
11570
|
const allowResolve = require__plugin_vue_export_helper.computed(() => {
|
|
11658
11571
|
if (!generallyAllowed.value) return false;
|
|
11659
11572
|
if (props.comment.trackedChange) {
|
|
11660
11573
|
if (!trackedChangeDecisionsVisible.value) return false;
|
|
11661
|
-
} else if (!commentMutationsVisible.value ||
|
|
11574
|
+
} else if (!commentMutationsVisible.value || resolveIsDisabled()) return false;
|
|
11662
11575
|
if (props.comment.parentCommentId) return false;
|
|
11663
11576
|
if (trackedChangeThreadParentId.value) return false;
|
|
11664
11577
|
const context = {
|
|
@@ -11666,8 +11579,8 @@ var _sfc_main$35 = {
|
|
|
11666
11579
|
currentUser: proxy.$superdoc.config.user,
|
|
11667
11580
|
superdoc: proxy.$superdoc
|
|
11668
11581
|
};
|
|
11669
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11670
|
-
return isAllowed(PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11582
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11583
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11671
11584
|
});
|
|
11672
11585
|
const allowReject = require__plugin_vue_export_helper.computed(() => {
|
|
11673
11586
|
if (!generallyAllowed.value) return false;
|
|
@@ -11678,12 +11591,12 @@ var _sfc_main$35 = {
|
|
|
11678
11591
|
currentUser: proxy.$superdoc.config.user,
|
|
11679
11592
|
superdoc: proxy.$superdoc
|
|
11680
11593
|
};
|
|
11681
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.REJECT_OWN, role, isInternal, context);
|
|
11682
|
-
return isAllowed(PERMISSIONS.REJECT_OTHER, role, isInternal, context);
|
|
11594
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.REJECT_OWN, role, isInternal, context);
|
|
11595
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.REJECT_OTHER, role, isInternal, context);
|
|
11683
11596
|
});
|
|
11684
11597
|
const allowReopen = require__plugin_vue_export_helper.computed(() => {
|
|
11685
11598
|
if (!commentMutationsVisible.value) return false;
|
|
11686
|
-
if (
|
|
11599
|
+
if (resolveIsDisabled()) return false;
|
|
11687
11600
|
if (!props.reopenSupported) return false;
|
|
11688
11601
|
if (!props.comment) return false;
|
|
11689
11602
|
if (!props.comment.resolvedTime) return false;
|
|
@@ -11697,8 +11610,8 @@ var _sfc_main$35 = {
|
|
|
11697
11610
|
currentUser: proxy.$superdoc.config.user,
|
|
11698
11611
|
superdoc: proxy.$superdoc
|
|
11699
11612
|
};
|
|
11700
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11701
|
-
return isAllowed(PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11613
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11614
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11702
11615
|
});
|
|
11703
11616
|
const allowOverflow = require__plugin_vue_export_helper.computed(() => {
|
|
11704
11617
|
if (!generallyAllowed.value) return false;
|
|
@@ -11720,15 +11633,15 @@ var _sfc_main$35 = {
|
|
|
11720
11633
|
currentUser: proxy.$superdoc.config.user,
|
|
11721
11634
|
superdoc: proxy.$superdoc
|
|
11722
11635
|
};
|
|
11723
|
-
if (isOwnComment && isAllowed(PERMISSIONS.COMMENTS_DELETE_OWN, role, isInternal, context)) options.add("delete");
|
|
11724
|
-
else if (!isOwnComment && isAllowed(PERMISSIONS.COMMENTS_DELETE_OTHER, role, isInternal, context)) options.add("delete");
|
|
11636
|
+
if (isOwnComment && require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.COMMENTS_DELETE_OWN, role, isInternal, context)) options.add("delete");
|
|
11637
|
+
else if (!isOwnComment && require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.COMMENTS_DELETE_OTHER, role, isInternal, context)) options.add("delete");
|
|
11725
11638
|
options.forEach((option) => allowedOptions.push(OVERFLOW_OPTIONS[option]));
|
|
11726
11639
|
return allowedOptions;
|
|
11727
11640
|
});
|
|
11728
11641
|
const handleResolve = () => {
|
|
11729
11642
|
if (props.comment?.trackedChange) {
|
|
11730
11643
|
if (!trackedChangeDecisionsVisible.value) return;
|
|
11731
|
-
} else if (!commentMutationsVisible.value ||
|
|
11644
|
+
} else if (!commentMutationsVisible.value || resolveIsDisabled()) return;
|
|
11732
11645
|
if (props.resolveDisabledReason) return;
|
|
11733
11646
|
emit("resolve");
|
|
11734
11647
|
};
|
|
@@ -11738,7 +11651,7 @@ var _sfc_main$35 = {
|
|
|
11738
11651
|
emit("reject");
|
|
11739
11652
|
};
|
|
11740
11653
|
const handleReopen = () => {
|
|
11741
|
-
if (!commentMutationsVisible.value ||
|
|
11654
|
+
if (!commentMutationsVisible.value || resolveIsDisabled()) return;
|
|
11742
11655
|
if (props.reopenDisabledReason) return;
|
|
11743
11656
|
emit("reopen");
|
|
11744
11657
|
};
|
|
@@ -11812,10 +11725,12 @@ var _sfc_main$35 = {
|
|
|
11812
11725
|
], 2)]);
|
|
11813
11726
|
};
|
|
11814
11727
|
}
|
|
11815
|
-
};
|
|
11816
|
-
var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$35, [["__scopeId", "data-v-b2a33943"]]);
|
|
11728
|
+
});
|
|
11817
11729
|
//#endregion
|
|
11818
|
-
//#region src/components/CommentsLayer/
|
|
11730
|
+
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
11731
|
+
var CommentHeader_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentHeader_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-33950cc9"]]);
|
|
11732
|
+
//#endregion
|
|
11733
|
+
//#region src/components/CommentsLayer/CommentInput.vue?vue&type=script&setup=true&lang.ts
|
|
11819
11734
|
var _hoisted_1$27 = { class: "input-section" };
|
|
11820
11735
|
var _hoisted_2$20 = { class: "comment-composer" };
|
|
11821
11736
|
var _hoisted_3$17 = [
|
|
@@ -11835,7 +11750,7 @@ var _hoisted_6$7 = {
|
|
|
11835
11750
|
class: "comment-mention-option__email"
|
|
11836
11751
|
};
|
|
11837
11752
|
var commentInputSequence = 0;
|
|
11838
|
-
var
|
|
11753
|
+
var CommentInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11839
11754
|
__name: "CommentInput",
|
|
11840
11755
|
props: {
|
|
11841
11756
|
users: {
|
|
@@ -11857,7 +11772,7 @@ var _sfc_main$34 = {
|
|
|
11857
11772
|
},
|
|
11858
11773
|
comment: {
|
|
11859
11774
|
type: Object,
|
|
11860
|
-
required:
|
|
11775
|
+
required: true
|
|
11861
11776
|
}
|
|
11862
11777
|
},
|
|
11863
11778
|
emits: ["focus"],
|
|
@@ -11944,7 +11859,8 @@ var _sfc_main$34 = {
|
|
|
11944
11859
|
};
|
|
11945
11860
|
const onInput = (event) => {
|
|
11946
11861
|
currentCommentMentions.value = currentCommentMentions.value.filter((user) => commentDraft.value.includes(`@${displayName(user)}`));
|
|
11947
|
-
|
|
11862
|
+
const caret = event.target instanceof HTMLTextAreaElement ? event.target.selectionStart : null;
|
|
11863
|
+
updateMentionQuery(caret ?? commentDraft.value.length);
|
|
11948
11864
|
syncInputHeight();
|
|
11949
11865
|
};
|
|
11950
11866
|
const selectMention = (user) => {
|
|
@@ -12033,8 +11949,10 @@ var _sfc_main$34 = {
|
|
|
12033
11949
|
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 2)]);
|
|
12034
11950
|
};
|
|
12035
11951
|
}
|
|
12036
|
-
};
|
|
12037
|
-
|
|
11952
|
+
});
|
|
11953
|
+
//#endregion
|
|
11954
|
+
//#region src/components/CommentsLayer/CommentInput.vue
|
|
11955
|
+
var CommentInput_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-65c31fdc"]]);
|
|
12038
11956
|
//#endregion
|
|
12039
11957
|
//#region src/internal/toolbar/built-in/url-safety.js
|
|
12040
11958
|
/**
|
|
@@ -12144,7 +12062,7 @@ function renderCommentHtml(value) {
|
|
|
12144
12062
|
return template.innerHTML;
|
|
12145
12063
|
}
|
|
12146
12064
|
//#endregion
|
|
12147
|
-
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
12065
|
+
//#region src/components/CommentsLayer/CommentDialog.vue?vue&type=script&setup=true&lang.ts
|
|
12148
12066
|
var _hoisted_1$26 = [
|
|
12149
12067
|
"aria-label",
|
|
12150
12068
|
"data-comment-instance-id",
|
|
@@ -12233,34 +12151,33 @@ var _hoisted_42 = {
|
|
|
12233
12151
|
};
|
|
12234
12152
|
var _hoisted_43 = { class: "reply-input-wrapper" };
|
|
12235
12153
|
var _hoisted_44 = { class: "reply-actions" };
|
|
12236
|
-
var _hoisted_45 = [
|
|
12237
|
-
var _hoisted_46 = [
|
|
12154
|
+
var _hoisted_45 = [
|
|
12238
12155
|
"onClick",
|
|
12239
12156
|
"disabled",
|
|
12240
12157
|
"data-disabled-reason"
|
|
12241
12158
|
];
|
|
12242
|
-
var
|
|
12243
|
-
var
|
|
12159
|
+
var _hoisted_46 = { class: "collapsed-avatars" };
|
|
12160
|
+
var _hoisted_47 = {
|
|
12244
12161
|
key: 3,
|
|
12245
12162
|
class: "comment-separator"
|
|
12246
12163
|
};
|
|
12247
|
-
var
|
|
12164
|
+
var _hoisted_48 = {
|
|
12248
12165
|
key: 3,
|
|
12249
12166
|
class: "tracked-change-decision-alert",
|
|
12250
12167
|
role: "alert"
|
|
12251
12168
|
};
|
|
12252
|
-
var
|
|
12253
|
-
var
|
|
12254
|
-
var
|
|
12169
|
+
var _hoisted_49 = { class: "tracked-change-decision-alert__message" };
|
|
12170
|
+
var _hoisted_50 = ["disabled", "data-disabled-reason"];
|
|
12171
|
+
var _hoisted_51 = {
|
|
12255
12172
|
key: 1,
|
|
12256
12173
|
class: "reply-expanded"
|
|
12257
12174
|
};
|
|
12258
|
-
var
|
|
12259
|
-
var
|
|
12260
|
-
var
|
|
12175
|
+
var _hoisted_52 = { class: "reply-input-wrapper" };
|
|
12176
|
+
var _hoisted_53 = { class: "reply-actions" };
|
|
12177
|
+
var _hoisted_54 = ["disabled", "data-disabled-reason"];
|
|
12261
12178
|
var commentEditSessions = /* @__PURE__ */ new WeakMap();
|
|
12262
12179
|
var commentReplySessions = /* @__PURE__ */ new WeakMap();
|
|
12263
|
-
var
|
|
12180
|
+
var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
12264
12181
|
__name: "CommentDialog",
|
|
12265
12182
|
props: {
|
|
12266
12183
|
comment: {
|
|
@@ -12305,9 +12222,10 @@ var _sfc_main$33 = {
|
|
|
12305
12222
|
setup(__props, { emit: __emit }) {
|
|
12306
12223
|
const emit = __emit;
|
|
12307
12224
|
const props = __props;
|
|
12308
|
-
const
|
|
12225
|
+
const proxy = useSuperDocInstance().proxy;
|
|
12309
12226
|
const superdocStore = useSuperdocStore();
|
|
12310
|
-
const
|
|
12227
|
+
const piniaCommentsStore = useCommentsStore();
|
|
12228
|
+
const commentsStore = piniaCommentsStore;
|
|
12311
12229
|
const editSessionOwner = {};
|
|
12312
12230
|
const replySessionOwner = {};
|
|
12313
12231
|
const retireOwnEditSession = () => {
|
|
@@ -12317,7 +12235,7 @@ var _sfc_main$33 = {
|
|
|
12317
12235
|
if (commentReplySessions.get(commentsStore)?.owner === replySessionOwner) commentReplySessions.delete(commentsStore);
|
|
12318
12236
|
};
|
|
12319
12237
|
const { addComment, cancelComment, deleteComment, getCommentAliasIds, removePendingComment, getCommentDocumentId, requestInstantSidebarAlignment, resolveCommentPositionEntry, clearInstantSidebarAlignment, setActiveFloatingCommentInstance } = commentsStore;
|
|
12320
|
-
const { suppressInternalExternal, getConfig, activeComment, activeFloatingCommentInstanceId, floatingCommentsOffset, pendingComment, currentCommentText, currentCommentMentions, isDebugging, editingCommentId, editorCommentPositions, isCommentHighlighted } = storeToRefs(
|
|
12238
|
+
const { suppressInternalExternal, getConfig, activeComment, activeFloatingCommentInstanceId, floatingCommentsOffset, pendingComment, currentCommentText, currentCommentMentions, isDebugging, editingCommentId, editorCommentPositions, isCommentHighlighted } = storeToRefs(piniaCommentsStore);
|
|
12321
12239
|
const isInternal = require__plugin_vue_export_helper.ref(true);
|
|
12322
12240
|
const commentInput = require__plugin_vue_export_helper.ref(null);
|
|
12323
12241
|
const editCommentInputs = require__plugin_vue_export_helper.ref(/* @__PURE__ */ new Map());
|
|
@@ -12332,8 +12250,8 @@ var _sfc_main$33 = {
|
|
|
12332
12250
|
];
|
|
12333
12251
|
const TRACKED_CHANGE_PREVIEW_MAX_PX = 90;
|
|
12334
12252
|
const trackedChangeImagePreviewStyle = (preview) => {
|
|
12335
|
-
const width =
|
|
12336
|
-
const height =
|
|
12253
|
+
const width = require_is_finite_number.isFiniteNumber(preview?.width) ? preview.width : null;
|
|
12254
|
+
const height = require_is_finite_number.isFiniteNumber(preview?.height) ? preview.height : null;
|
|
12337
12255
|
if (!width || !height || width <= 0 || height <= 0) return {};
|
|
12338
12256
|
const scale = Math.min(TRACKED_CHANGE_PREVIEW_MAX_PX / width, TRACKED_CHANGE_PREVIEW_MAX_PX / height, 1);
|
|
12339
12257
|
return {
|
|
@@ -12385,13 +12303,14 @@ var _sfc_main$33 = {
|
|
|
12385
12303
|
const findIgnoredElementByGeometry = (clientX, clientY) => {
|
|
12386
12304
|
if (!Number.isFinite(clientX) || !Number.isFinite(clientY)) return null;
|
|
12387
12305
|
const ignoredElements = document.querySelectorAll(CLICK_OUTSIDE_IGNORED_SELECTORS);
|
|
12388
|
-
for (const element of ignoredElements) if (element instanceof HTMLElement && elementContainsClickPoint(element, clientX, clientY)) return element;
|
|
12306
|
+
for (const element of Array.from(ignoredElements)) if (element instanceof HTMLElement && elementContainsClickPoint(element, clientX, clientY)) return element;
|
|
12389
12307
|
return null;
|
|
12390
12308
|
};
|
|
12391
12309
|
const focusEditInput = (commentId) => {
|
|
12392
12310
|
editCommentInputs.value.get(commentId)?.focus?.();
|
|
12393
12311
|
};
|
|
12394
12312
|
const commentDialogElement = require__plugin_vue_export_helper.ref(null);
|
|
12313
|
+
const trackedChangeStoryType = (story) => typeof story === "object" ? story?.storyType : void 0;
|
|
12395
12314
|
const getCommentFocusThreadId = (comment) => {
|
|
12396
12315
|
if (comment.resolvedTime) return comment.commentId;
|
|
12397
12316
|
return comment.importedId || comment.commentId;
|
|
@@ -12417,7 +12336,7 @@ var _sfc_main$33 = {
|
|
|
12417
12336
|
};
|
|
12418
12337
|
const getEntryBoundsCoordinate = (entry, coordinate) => {
|
|
12419
12338
|
const value = entry?.bounds?.[coordinate];
|
|
12420
|
-
return
|
|
12339
|
+
return require_is_finite_number.isFiniteNumber(value) ? value : null;
|
|
12421
12340
|
};
|
|
12422
12341
|
const entriesShareLine = (entry, candidateEntry) => {
|
|
12423
12342
|
if (!entry || !candidateEntry) return false;
|
|
@@ -12431,12 +12350,7 @@ var _sfc_main$33 = {
|
|
|
12431
12350
|
const candidateLeft = getEntryBoundsCoordinate(candidateEntry, "left");
|
|
12432
12351
|
const entryRight = getEntryBoundsCoordinate(entry, "right");
|
|
12433
12352
|
const candidateRight = getEntryBoundsCoordinate(candidateEntry, "right");
|
|
12434
|
-
if (
|
|
12435
|
-
entryLeft,
|
|
12436
|
-
candidateLeft,
|
|
12437
|
-
entryRight,
|
|
12438
|
-
candidateRight
|
|
12439
|
-
].some((value) => value == null)) return false;
|
|
12353
|
+
if (entryLeft == null || candidateLeft == null || entryRight == null || candidateRight == null) return false;
|
|
12440
12354
|
return candidateLeft < entryRight && entryLeft < candidateRight;
|
|
12441
12355
|
};
|
|
12442
12356
|
const entriesOverlapRange = (entry, candidateEntry) => {
|
|
@@ -12444,12 +12358,7 @@ var _sfc_main$33 = {
|
|
|
12444
12358
|
const entryEnd = entry?.end;
|
|
12445
12359
|
const candidateStart = candidateEntry?.start;
|
|
12446
12360
|
const candidateEnd = candidateEntry?.end;
|
|
12447
|
-
if (!
|
|
12448
|
-
entryStart,
|
|
12449
|
-
entryEnd,
|
|
12450
|
-
candidateStart,
|
|
12451
|
-
candidateEnd
|
|
12452
|
-
].every(Number.isFinite)) return false;
|
|
12361
|
+
if (!require_is_finite_number.isFiniteNumber(entryStart) || !require_is_finite_number.isFiniteNumber(entryEnd) || !require_is_finite_number.isFiniteNumber(candidateStart) || !require_is_finite_number.isFiniteNumber(candidateEnd)) return false;
|
|
12453
12362
|
return candidateStart <= entryEnd && entryStart <= candidateEnd;
|
|
12454
12363
|
};
|
|
12455
12364
|
const shouldIncludeThreadAlias = (entry, candidateEntry) => {
|
|
@@ -12470,7 +12379,7 @@ var _sfc_main$33 = {
|
|
|
12470
12379
|
return [...lookupIds];
|
|
12471
12380
|
};
|
|
12472
12381
|
const isDialogAlreadyAlignedWithTarget = (dialogElement, targetClientY, tolerancePx = 24) => {
|
|
12473
|
-
if (!
|
|
12382
|
+
if (!require_is_finite_number.isFiniteNumber(targetClientY) || typeof dialogElement?.getBoundingClientRect !== "function") return false;
|
|
12474
12383
|
const dialogTop = dialogElement.getBoundingClientRect().top;
|
|
12475
12384
|
return Number.isFinite(dialogTop) && Math.abs(dialogTop - targetClientY) <= tolerancePx;
|
|
12476
12385
|
};
|
|
@@ -12496,14 +12405,19 @@ var _sfc_main$33 = {
|
|
|
12496
12405
|
if (showInputSection.value && index === visible.length - 1) return true;
|
|
12497
12406
|
return visible.length > 1 && index !== visible.length - 1;
|
|
12498
12407
|
});
|
|
12408
|
+
const commentsAreReadOnly = () => getConfig.value?.readOnly === true;
|
|
12409
|
+
const resolveIsDisabled = () => getConfig.value?.allowResolve === false;
|
|
12499
12410
|
const showInputSection = require__plugin_vue_export_helper.computed(() => {
|
|
12500
|
-
return !
|
|
12411
|
+
return !commentsAreReadOnly() && isDialogActive.value && !props.comment.resolvedTime && !isEditingAnyComment.value;
|
|
12501
12412
|
});
|
|
12502
12413
|
const readOnlyMutationOutcome = () => ({
|
|
12503
12414
|
ok: false,
|
|
12504
12415
|
reason: "read-only-document"
|
|
12505
12416
|
});
|
|
12506
|
-
const
|
|
12417
|
+
const resolveDisabledOutcome = () => ({
|
|
12418
|
+
ok: false,
|
|
12419
|
+
reason: "resolve-disabled"
|
|
12420
|
+
});
|
|
12507
12421
|
const trackedChangeDecisionsAreDisabled = () => {
|
|
12508
12422
|
const allowDecisions = proxy.$superdoc?.interactionConfig?.trackedChanges?.allowDecisions;
|
|
12509
12423
|
if (typeof allowDecisions === "boolean") return !allowDecisions;
|
|
@@ -12581,7 +12495,7 @@ var _sfc_main$33 = {
|
|
|
12581
12495
|
require__plugin_vue_export_helper.nextTick(() => emit("resize"));
|
|
12582
12496
|
};
|
|
12583
12497
|
const setParentBodyRef = (el) => {
|
|
12584
|
-
parentBodyRef.value = el
|
|
12498
|
+
parentBodyRef.value = el;
|
|
12585
12499
|
};
|
|
12586
12500
|
const checkOverflow = () => {
|
|
12587
12501
|
if (textExpanded.value) return;
|
|
@@ -12664,7 +12578,7 @@ var _sfc_main$33 = {
|
|
|
12664
12578
|
};
|
|
12665
12579
|
const isInternalDropdownDisabled = require__plugin_vue_export_helper.computed(() => {
|
|
12666
12580
|
if (props.comment.resolvedTime) return true;
|
|
12667
|
-
return
|
|
12581
|
+
return commentsAreReadOnly();
|
|
12668
12582
|
});
|
|
12669
12583
|
const isEditingThisComment = require__plugin_vue_export_helper.computed(() => (comment) => {
|
|
12670
12584
|
return isDialogActive.value && editingCommentId.value === comment.commentId;
|
|
@@ -12674,7 +12588,7 @@ var _sfc_main$33 = {
|
|
|
12674
12588
|
return comments.value.some((c) => c.commentId === editingCommentId.value);
|
|
12675
12589
|
});
|
|
12676
12590
|
const shouldShowInternalExternal = require__plugin_vue_export_helper.computed(() => {
|
|
12677
|
-
if (
|
|
12591
|
+
if (commentsAreReadOnly()) return false;
|
|
12678
12592
|
if (!proxy.$superdoc.config.isInternal) return false;
|
|
12679
12593
|
if (isV2Mode.value) return false;
|
|
12680
12594
|
return !suppressInternalExternal.value && !props.comment.trackedChange;
|
|
@@ -12718,7 +12632,7 @@ var _sfc_main$33 = {
|
|
|
12718
12632
|
if (editor) {
|
|
12719
12633
|
const { entry: resolvedFocusEntry } = resolveCommentPositionEntry(props.comment);
|
|
12720
12634
|
const focusEntry = props.floatingPositionEntry ?? resolvedFocusEntry;
|
|
12721
|
-
const usePageScopedAnchorOnly = Number.isFinite(props.floatingPageIndex) && props.comment?.trackedChangeStory
|
|
12635
|
+
const usePageScopedAnchorOnly = Number.isFinite(props.floatingPageIndex) && trackedChangeStoryType(props.comment?.trackedChangeStory) === "headerFooterPart";
|
|
12722
12636
|
const visibleAnchorTargetY = getVisibleThreadAnchorClientY(props.parent, focusEntry);
|
|
12723
12637
|
const visibleHighlightTargetY = usePageScopedAnchorOnly ? null : getVisibleThreadHighlightClientY(getThreadHighlightLookupIds(props.comment));
|
|
12724
12638
|
const visibleThreadTargetY = Number.isFinite(visibleHighlightTargetY) ? visibleHighlightTargetY : visibleAnchorTargetY;
|
|
@@ -12936,7 +12850,7 @@ var _sfc_main$33 = {
|
|
|
12936
12850
|
const getReopenDisabledReason = () => {
|
|
12937
12851
|
if (!isV2Mode.value) return null;
|
|
12938
12852
|
if (!v2CommentsAdapter.value) return "v2-comments-adapter-missing";
|
|
12939
|
-
if (
|
|
12853
|
+
if (commentsAreReadOnly()) return "read-only-document";
|
|
12940
12854
|
if (isV2WriteDisabled.value) return v2WriteCapability.value?.reason ?? "v2-write-unavailable";
|
|
12941
12855
|
return null;
|
|
12942
12856
|
};
|
|
@@ -13039,10 +12953,7 @@ var _sfc_main$33 = {
|
|
|
13039
12953
|
if (trackedChangeDecisionsAreDisabled()) return trackedChangeDecisionDisabledOutcome();
|
|
13040
12954
|
} else {
|
|
13041
12955
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13042
|
-
if (
|
|
13043
|
-
ok: false,
|
|
13044
|
-
reason: "resolve-disabled"
|
|
13045
|
-
};
|
|
12956
|
+
if (resolveIsDisabled()) return resolveDisabledOutcome();
|
|
13046
12957
|
}
|
|
13047
12958
|
const customHandler = proxy.$superdoc.config.onTrackedChangeBubbleAccept;
|
|
13048
12959
|
if (props.comment.trackedChange && isV2Mode.value) {
|
|
@@ -13107,10 +13018,7 @@ var _sfc_main$33 = {
|
|
|
13107
13018
|
};
|
|
13108
13019
|
const handleReopen = async () => {
|
|
13109
13020
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13110
|
-
if (
|
|
13111
|
-
ok: false,
|
|
13112
|
-
reason: "resolve-disabled"
|
|
13113
|
-
};
|
|
13021
|
+
if (resolveIsDisabled()) return resolveDisabledOutcome();
|
|
13114
13022
|
if (!isV2Mode.value || !v2CommentsAdapter.value) return;
|
|
13115
13023
|
const outcome = await commentsStore.reopenCommentV2({
|
|
13116
13024
|
superdoc: proxy.$superdoc,
|
|
@@ -13135,7 +13043,7 @@ var _sfc_main$33 = {
|
|
|
13135
13043
|
owner: editSessionOwner,
|
|
13136
13044
|
submission: null
|
|
13137
13045
|
});
|
|
13138
|
-
currentCommentText.value = comment?.commentText
|
|
13046
|
+
currentCommentText.value = comment?.commentText ?? "";
|
|
13139
13047
|
currentCommentMentions.value = Array.isArray(comment?.mentions) ? [...comment.mentions] : [];
|
|
13140
13048
|
activeComment.value = props.comment.commentId;
|
|
13141
13049
|
if (props.floatingInstanceId) setActiveFloatingCommentInstance(props.floatingInstanceId);
|
|
@@ -13207,7 +13115,7 @@ var _sfc_main$33 = {
|
|
|
13207
13115
|
const getProcessedDate = (timestamp) => {
|
|
13208
13116
|
return typeof timestamp === "string" ? new Date(timestamp).getTime() : timestamp;
|
|
13209
13117
|
};
|
|
13210
|
-
const handleCancel = (
|
|
13118
|
+
const handleCancel = () => {
|
|
13211
13119
|
commentSaveFailure.value = "";
|
|
13212
13120
|
retireOwnEditSession();
|
|
13213
13121
|
retireOwnReplySession();
|
|
@@ -13217,7 +13125,7 @@ var _sfc_main$33 = {
|
|
|
13217
13125
|
};
|
|
13218
13126
|
const usersFiltered = require__plugin_vue_export_helper.computed(() => {
|
|
13219
13127
|
const users = proxy.$superdoc.users;
|
|
13220
|
-
if (props.comment.isInternal === true) return users.filter((user) => user.access === "internal" || user.access?.role === "internal");
|
|
13128
|
+
if (props.comment.isInternal === true) return users.filter((user) => user.access === "internal" || typeof user.access === "object" && user.access?.role === "internal");
|
|
13221
13129
|
return users;
|
|
13222
13130
|
});
|
|
13223
13131
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
@@ -13254,7 +13162,7 @@ var _sfc_main$33 = {
|
|
|
13254
13162
|
focusEditInput(commentId);
|
|
13255
13163
|
});
|
|
13256
13164
|
});
|
|
13257
|
-
require__plugin_vue_export_helper.watch(
|
|
13165
|
+
require__plugin_vue_export_helper.watch(commentsAreReadOnly, (readOnly) => {
|
|
13258
13166
|
if (!readOnly) return;
|
|
13259
13167
|
isReplying.value = false;
|
|
13260
13168
|
if (comments.value.some((comment) => comment.commentId === editingCommentId.value)) editingCommentId.value = null;
|
|
@@ -13342,11 +13250,11 @@ var _sfc_main$33 = {
|
|
|
13342
13250
|
timestamp: getProcessedDate(comment.createdTime),
|
|
13343
13251
|
comment,
|
|
13344
13252
|
"is-active": isDialogActive.value,
|
|
13345
|
-
"resolve-disabled-reason": getResolveDisabledReason(comment),
|
|
13346
|
-
"reject-disabled-reason": getRejectDisabledReason(comment),
|
|
13253
|
+
"resolve-disabled-reason": getResolveDisabledReason(comment) ?? void 0,
|
|
13254
|
+
"reject-disabled-reason": getRejectDisabledReason(comment) ?? void 0,
|
|
13347
13255
|
"reopen-supported": isV2Mode.value && Boolean(v2CommentsAdapter.value),
|
|
13348
|
-
"reopen-disabled-reason": getReopenDisabledReason(),
|
|
13349
|
-
"write-disabled-reason": v2OverflowWriteDisabledReason.value,
|
|
13256
|
+
"reopen-disabled-reason": getReopenDisabledReason() ?? void 0,
|
|
13257
|
+
"write-disabled-reason": v2OverflowWriteDisabledReason.value ?? void 0,
|
|
13350
13258
|
onResolve: handleResolve,
|
|
13351
13259
|
onReject: handleReject,
|
|
13352
13260
|
onReopen: handleReopen,
|
|
@@ -13413,7 +13321,7 @@ var _sfc_main$33 = {
|
|
|
13413
13321
|
ref_for: true,
|
|
13414
13322
|
ref: index === 0 ? setParentBodyRef : void 0,
|
|
13415
13323
|
innerHTML: renderedCommentTexts.value.get(comment.commentId)
|
|
13416
|
-
}, null, 10, _hoisted_40)) : require__plugin_vue_export_helper.unref(isDebugging) && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_41, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(editorCommentPositions)[comment.importedId !== void 0 ? comment.importedId : comment.commentId]?.bounds), 1)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_42, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_43, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
13324
|
+
}, null, 10, _hoisted_40)) : require__plugin_vue_export_helper.unref(isDebugging) && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_41, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(editorCommentPositions)[String(comment.importedId !== void 0 ? comment.importedId : comment.commentId)]?.bounds), 1)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_42, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_43, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
13417
13325
|
ref_for: true,
|
|
13418
13326
|
ref: setEditCommentInputRef(comment.commentId),
|
|
13419
13327
|
users: [],
|
|
@@ -13422,13 +13330,13 @@ var _sfc_main$33 = {
|
|
|
13422
13330
|
comment
|
|
13423
13331
|
}, null, 8, ["config", "comment"])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_44, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13424
13332
|
class: "sd-button reply-btn-cancel",
|
|
13425
|
-
onClick: require__plugin_vue_export_helper.withModifiers(
|
|
13426
|
-
}, "Cancel"
|
|
13333
|
+
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
13334
|
+
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13427
13335
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isV2WriteDisabled.value }]),
|
|
13428
13336
|
onClick: require__plugin_vue_export_helper.withModifiers(($event) => handleCommentUpdate(comment), ["stop", "prevent"]),
|
|
13429
13337
|
disabled: !hasTextContent.value || isV2WriteDisabled.value,
|
|
13430
13338
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
13431
|
-
}, " Update ", 10,
|
|
13339
|
+
}, " Update ", 10, _hoisted_45)])])),
|
|
13432
13340
|
shouldTruncate.value && isTextOverflowing.value && index === 0 && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
13433
13341
|
key: 3,
|
|
13434
13342
|
class: "show-more-toggle",
|
|
@@ -13443,29 +13351,29 @@ var _sfc_main$33 = {
|
|
|
13443
13351
|
shouldCollapseThread.value && index === 0 ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 2 }, [_cache[14] || (_cache[14] = require__plugin_vue_export_helper.createElementVNode("div", { class: "comment-separator" }, null, -1)), require__plugin_vue_export_helper.createElementVNode("div", {
|
|
13444
13352
|
class: "collapsed-replies",
|
|
13445
13353
|
onClick: require__plugin_vue_export_helper.withModifiers(expandThread, ["stop", "prevent"])
|
|
13446
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div",
|
|
13354
|
+
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_46, [(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(collapsedReplyAuthors.value, (author) => {
|
|
13447
13355
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(Avatar_default, {
|
|
13448
|
-
key: author.email || author.name,
|
|
13356
|
+
key: (author.email || author.name) ?? void 0,
|
|
13449
13357
|
user: author,
|
|
13450
13358
|
class: "mini-avatar"
|
|
13451
13359
|
}, null, 8, ["user"]);
|
|
13452
13360
|
}), 128))]), require__plugin_vue_export_helper.createElementVNode("span", null, require__plugin_vue_export_helper.toDisplayString(collapsedReplyCount.value) + " more " + require__plugin_vue_export_helper.toDisplayString(collapsedReplyCount.value === 1 ? "reply" : "replies"), 1)])], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13453
|
-
showSeparator.value(index) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
13361
|
+
showSeparator.value(index) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_47)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
13454
13362
|
]);
|
|
13455
13363
|
}), 128)),
|
|
13456
|
-
trackedChangeDecisionFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
13364
|
+
trackedChangeDecisionFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_48, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_49, require__plugin_vue_export_helper.toDisplayString(trackedChangeDecisionFailureMessage.value), 1), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13457
13365
|
type: "button",
|
|
13458
13366
|
class: "sd-button tracked-change-decision-alert__retry",
|
|
13459
13367
|
onClick: require__plugin_vue_export_helper.withModifiers(retryTrackedChangeDecision, ["stop", "prevent"])
|
|
13460
13368
|
}, " Retry ")])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13461
|
-
showInputSection.value
|
|
13369
|
+
showInputSection.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 4 }, [!isReplying.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("button", {
|
|
13462
13370
|
key: 0,
|
|
13463
13371
|
type: "button",
|
|
13464
13372
|
class: require__plugin_vue_export_helper.normalizeClass(["reply-pill", { "sd-is-disabled": isV2WriteDisabled.value }]),
|
|
13465
13373
|
onClick: require__plugin_vue_export_helper.withModifiers(startReply, ["stop", "prevent"]),
|
|
13466
13374
|
disabled: isV2WriteDisabled.value,
|
|
13467
13375
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
13468
|
-
}, " Reply or add others with @ ", 10,
|
|
13376
|
+
}, " Reply or add others with @ ", 10, _hoisted_50)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_51, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_52, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
13469
13377
|
ref_key: "commentInput",
|
|
13470
13378
|
ref: commentInput,
|
|
13471
13379
|
users: usersFiltered.value,
|
|
@@ -13476,7 +13384,7 @@ var _sfc_main$33 = {
|
|
|
13476
13384
|
"users",
|
|
13477
13385
|
"config",
|
|
13478
13386
|
"comment"
|
|
13479
|
-
])]), require__plugin_vue_export_helper.createElementVNode("div",
|
|
13387
|
+
])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_53, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13480
13388
|
class: "sd-button reply-btn-cancel",
|
|
13481
13389
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
13482
13390
|
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
@@ -13484,14 +13392,16 @@ var _sfc_main$33 = {
|
|
|
13484
13392
|
onClick: require__plugin_vue_export_helper.withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
13485
13393
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
13486
13394
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
13487
|
-
}, " Reply ", 10,
|
|
13395
|
+
}, " Reply ", 10, _hoisted_54)])]))], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
13488
13396
|
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
13489
13397
|
};
|
|
13490
13398
|
}
|
|
13491
|
-
};
|
|
13492
|
-
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$33, [["__scopeId", "data-v-239e0310"]]);
|
|
13399
|
+
});
|
|
13493
13400
|
//#endregion
|
|
13494
|
-
//#region src/components/CommentsLayer/
|
|
13401
|
+
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13402
|
+
var CommentDialog_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(CommentDialog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-752d9e0b"]]);
|
|
13403
|
+
//#endregion
|
|
13404
|
+
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue?vue&type=script&setup=true&lang.ts
|
|
13495
13405
|
var _hoisted_1$25 = [
|
|
13496
13406
|
"tabindex",
|
|
13497
13407
|
"aria-posinset",
|
|
@@ -13503,7 +13413,7 @@ var _hoisted_1$25 = [
|
|
|
13503
13413
|
"data-comment-page-index",
|
|
13504
13414
|
"data-review-directory-index"
|
|
13505
13415
|
];
|
|
13506
|
-
var
|
|
13416
|
+
var ReviewDirectoryListItem_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
13507
13417
|
__name: "ReviewDirectoryListItem",
|
|
13508
13418
|
props: {
|
|
13509
13419
|
item: {
|
|
@@ -13552,12 +13462,15 @@ var _sfc_main$32 = {
|
|
|
13552
13462
|
});
|
|
13553
13463
|
const measure = () => {
|
|
13554
13464
|
const height = shell.value?.getBoundingClientRect?.().height;
|
|
13555
|
-
if (
|
|
13465
|
+
if (require_is_finite_number.isFiniteNumber(height) && height > 0) measuredHeight.value = height;
|
|
13556
13466
|
};
|
|
13557
13467
|
const onFocusIn = () => {
|
|
13558
13468
|
containsFocus.value = true;
|
|
13559
13469
|
emit("focus-item", props.index);
|
|
13560
13470
|
};
|
|
13471
|
+
const onFocusOut = (event) => {
|
|
13472
|
+
containsFocus.value = event.relatedTarget instanceof Node && shell.value?.contains(event.relatedTarget) === true;
|
|
13473
|
+
};
|
|
13561
13474
|
const onKeydown = (event) => {
|
|
13562
13475
|
if (![
|
|
13563
13476
|
"ArrowDown",
|
|
@@ -13565,7 +13478,7 @@ var _sfc_main$32 = {
|
|
|
13565
13478
|
"Home",
|
|
13566
13479
|
"End"
|
|
13567
13480
|
].includes(event.key)) return;
|
|
13568
|
-
if (event.target
|
|
13481
|
+
if (event.target instanceof Element && event.target.closest("input, textarea, select, button, [contenteditable=\"true\"]")) return;
|
|
13569
13482
|
event.preventDefault();
|
|
13570
13483
|
emit("navigate", {
|
|
13571
13484
|
index: props.index,
|
|
@@ -13573,6 +13486,8 @@ var _sfc_main$32 = {
|
|
|
13573
13486
|
});
|
|
13574
13487
|
};
|
|
13575
13488
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
13489
|
+
const element = shell.value;
|
|
13490
|
+
if (!element) return;
|
|
13576
13491
|
if (typeof IntersectionObserver !== "undefined") {
|
|
13577
13492
|
intersectionObserver = new IntersectionObserver((entries) => {
|
|
13578
13493
|
const entry = entries[0];
|
|
@@ -13583,11 +13498,11 @@ var _sfc_main$32 = {
|
|
|
13583
13498
|
root: null,
|
|
13584
13499
|
rootMargin: "600px 0px"
|
|
13585
13500
|
});
|
|
13586
|
-
intersectionObserver.observe(
|
|
13501
|
+
intersectionObserver.observe(element);
|
|
13587
13502
|
}
|
|
13588
13503
|
if (typeof ResizeObserver !== "undefined") {
|
|
13589
13504
|
resizeObserver = new ResizeObserver(measure);
|
|
13590
|
-
resizeObserver.observe(
|
|
13505
|
+
resizeObserver.observe(element);
|
|
13591
13506
|
}
|
|
13592
13507
|
require__plugin_vue_export_helper.nextTick(measure);
|
|
13593
13508
|
});
|
|
@@ -13612,7 +13527,7 @@ var _sfc_main$32 = {
|
|
|
13612
13527
|
"data-comment-page-index": Number.isFinite(__props.item.floatingPageIndex) ? __props.item.floatingPageIndex : "",
|
|
13613
13528
|
"data-review-directory-index": __props.index,
|
|
13614
13529
|
onFocusin: onFocusIn,
|
|
13615
|
-
onFocusout:
|
|
13530
|
+
onFocusout: onFocusOut,
|
|
13616
13531
|
onKeydown
|
|
13617
13532
|
}, [materialized.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(CommentDialog_default, {
|
|
13618
13533
|
key: 0,
|
|
@@ -13633,15 +13548,17 @@ var _sfc_main$32 = {
|
|
|
13633
13548
|
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$25);
|
|
13634
13549
|
};
|
|
13635
13550
|
}
|
|
13636
|
-
};
|
|
13637
|
-
var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$32, [["__scopeId", "data-v-29650a06"]]);
|
|
13551
|
+
});
|
|
13638
13552
|
//#endregion
|
|
13639
|
-
//#region src/components/CommentsLayer/commentsList/
|
|
13553
|
+
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
13554
|
+
var ReviewDirectoryListItem_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ReviewDirectoryListItem_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-db6ccae8"]]);
|
|
13555
|
+
//#endregion
|
|
13556
|
+
//#region src/components/CommentsLayer/commentsList/commentsList.vue?vue&type=script&setup=true&lang.ts
|
|
13640
13557
|
var _hoisted_1$24 = ["aria-busy"];
|
|
13641
13558
|
var _hoisted_2$18 = { key: 0 };
|
|
13642
13559
|
var _hoisted_3$15 = { key: 1 };
|
|
13643
13560
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
13644
|
-
var
|
|
13561
|
+
var commentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
13645
13562
|
__name: "commentsList",
|
|
13646
13563
|
props: {
|
|
13647
13564
|
showMainComments: {
|
|
@@ -13655,12 +13572,13 @@ var _sfc_main$31 = {
|
|
|
13655
13572
|
},
|
|
13656
13573
|
setup(__props) {
|
|
13657
13574
|
const props = __props;
|
|
13658
|
-
const
|
|
13575
|
+
const piniaCommentsStore = useCommentsStore();
|
|
13576
|
+
const commentsStore = piniaCommentsStore;
|
|
13659
13577
|
const listRoot = require__plugin_vue_export_helper.ref(null);
|
|
13660
13578
|
const rovingIndex = require__plugin_vue_export_helper.ref(0);
|
|
13661
13579
|
const isCommentsListVisible = require__plugin_vue_export_helper.toRef(commentsStore, "isCommentsListVisible");
|
|
13662
13580
|
const floatingCommentInstances = require__plugin_vue_export_helper.computed(() => commentsStore.getFloatingCommentInstances);
|
|
13663
|
-
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(
|
|
13581
|
+
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(piniaCommentsStore);
|
|
13664
13582
|
const groupedComments = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? commentsStore.getGroupedReviewDirectory : commentsStore.getGroupedComments);
|
|
13665
13583
|
const reviewRows = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? reviewDirectoryList.value : commentsList.value);
|
|
13666
13584
|
const commentAliases = (comment) => [
|
|
@@ -13691,11 +13609,15 @@ var _sfc_main$31 = {
|
|
|
13691
13609
|
}
|
|
13692
13610
|
return [parentComment];
|
|
13693
13611
|
};
|
|
13612
|
+
const getStoryType = (comment) => {
|
|
13613
|
+
const story = comment?.trackedChangeStory;
|
|
13614
|
+
return typeof story === "object" && story !== null ? story.storyType : void 0;
|
|
13615
|
+
};
|
|
13694
13616
|
const getRepeatedHeaderFooterInstances = (comment) => {
|
|
13695
13617
|
const matchingInstances = floatingCommentInstances.value.filter((instance) => instance?.comment?.commentId === comment?.commentId);
|
|
13696
13618
|
if (matchingInstances.length < 2) return [];
|
|
13697
13619
|
if (!comment?.trackedChange) return [];
|
|
13698
|
-
if (comment
|
|
13620
|
+
if (getStoryType(comment) !== REPEATED_HEADER_FOOTER_STORY_TYPE) return [];
|
|
13699
13621
|
return matchingInstances;
|
|
13700
13622
|
};
|
|
13701
13623
|
const isRepeatedInstanceActive = (instance) => {
|
|
@@ -13752,8 +13674,9 @@ var _sfc_main$31 = {
|
|
|
13752
13674
|
rovingIndex.value = nextIndex;
|
|
13753
13675
|
await require__plugin_vue_export_helper.nextTick();
|
|
13754
13676
|
const target = listRoot.value?.querySelector?.(`[data-review-directory-index="${nextIndex}"]`);
|
|
13755
|
-
target
|
|
13756
|
-
target?.
|
|
13677
|
+
if (!(target instanceof HTMLElement)) return;
|
|
13678
|
+
target.scrollIntoView?.({ block: "nearest" });
|
|
13679
|
+
target.focus?.({ preventScroll: true });
|
|
13757
13680
|
};
|
|
13758
13681
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
13759
13682
|
isCommentsListVisible.value = true;
|
|
@@ -13801,8 +13724,10 @@ var _sfc_main$31 = {
|
|
|
13801
13724
|
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$24);
|
|
13802
13725
|
};
|
|
13803
13726
|
}
|
|
13804
|
-
};
|
|
13805
|
-
|
|
13727
|
+
});
|
|
13728
|
+
//#endregion
|
|
13729
|
+
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
13730
|
+
var commentsList_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(commentsList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-8eca48e1"]]);
|
|
13806
13731
|
//#endregion
|
|
13807
13732
|
//#region src/components/CommentsLayer/commentsList/super-comments-list.js
|
|
13808
13733
|
/**
|
|
@@ -13939,10 +13864,10 @@ var FIT_WIDTH_DEFAULTS = Object.freeze({
|
|
|
13939
13864
|
});
|
|
13940
13865
|
var resolveFitWidthOptions = (rawFitConfig) => {
|
|
13941
13866
|
const raw = rawFitConfig && typeof rawFitConfig === "object" ? rawFitConfig : {};
|
|
13942
|
-
const positiveOr = (value, fallback) =>
|
|
13867
|
+
const positiveOr = (value, fallback) => require_is_finite_number.isFiniteNumber(value) && value > 0 ? value : fallback;
|
|
13943
13868
|
const min = positiveOr(raw.min, FIT_WIDTH_DEFAULTS.min);
|
|
13944
13869
|
const max = positiveOr(raw.max, FIT_WIDTH_DEFAULTS.max);
|
|
13945
|
-
const padding =
|
|
13870
|
+
const padding = require_is_finite_number.isFiniteNumber(raw.padding) && raw.padding >= 0 ? raw.padding : FIT_WIDTH_DEFAULTS.padding;
|
|
13946
13871
|
return {
|
|
13947
13872
|
min: Math.min(min, max),
|
|
13948
13873
|
max: Math.max(min, max),
|
|
@@ -13966,12 +13891,12 @@ var normalizePdfPageMeasurement = (measured, scaleFactor, zoomFactor) => {
|
|
|
13966
13891
|
var resolveV2WidestPageWidth = (snapshot) => {
|
|
13967
13892
|
if (!snapshot || typeof snapshot !== "object") return 0;
|
|
13968
13893
|
const published = snapshot.widestPageWidthPx;
|
|
13969
|
-
if (
|
|
13894
|
+
if (require_is_finite_number.isFiniteNumber(published)) return published;
|
|
13970
13895
|
let widestPage = 0;
|
|
13971
13896
|
const pages = snapshot.pages;
|
|
13972
13897
|
if (Array.isArray(pages)) for (const page of pages) {
|
|
13973
13898
|
const width = page?.base?.widthPx;
|
|
13974
|
-
if (
|
|
13899
|
+
if (require_is_finite_number.isFiniteNumber(width) && width > widestPage) widestPage = width;
|
|
13975
13900
|
}
|
|
13976
13901
|
return widestPage;
|
|
13977
13902
|
};
|
|
@@ -13988,7 +13913,7 @@ var resolveEditorPageWidth = (editor) => {
|
|
|
13988
13913
|
const pages = editor.getPages?.();
|
|
13989
13914
|
if (Array.isArray(pages)) for (const page of pages) {
|
|
13990
13915
|
const width = page?.size?.w;
|
|
13991
|
-
if (
|
|
13916
|
+
if (require_is_finite_number.isFiniteNumber(width) && width > widestPage) widestPage = width;
|
|
13992
13917
|
}
|
|
13993
13918
|
} catch {
|
|
13994
13919
|
widestPage = 0;
|
|
@@ -14001,7 +13926,7 @@ var resolveEditorPageWidth = (editor) => {
|
|
|
14001
13926
|
pageStyles = null;
|
|
14002
13927
|
}
|
|
14003
13928
|
const pageWidthInches = pageStyles?.pageSize?.width;
|
|
14004
|
-
if (
|
|
13929
|
+
if (require_is_finite_number.isFiniteNumber(pageWidthInches) && pageWidthInches > 0) return pageWidthInches * CSS_PX_PER_INCH;
|
|
14005
13930
|
return null;
|
|
14006
13931
|
};
|
|
14007
13932
|
/**
|
|
@@ -14152,12 +14077,14 @@ function createHighContrastMode() {
|
|
|
14152
14077
|
}
|
|
14153
14078
|
};
|
|
14154
14079
|
}
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
}
|
|
14080
|
+
function createHighContrastOff() {
|
|
14081
|
+
return {
|
|
14082
|
+
isHighContrastMode: require__plugin_vue_export_helper.readonly(require__plugin_vue_export_helper.ref(false)),
|
|
14083
|
+
setHighContrastMode: () => {}
|
|
14084
|
+
};
|
|
14085
|
+
}
|
|
14159
14086
|
function useHighContrastMode() {
|
|
14160
|
-
return require__plugin_vue_export_helper.inject(HIGH_CONTRAST_MODE_KEY,
|
|
14087
|
+
return require__plugin_vue_export_helper.inject(HIGH_CONTRAST_MODE_KEY, createHighContrastOff, true);
|
|
14161
14088
|
}
|
|
14162
14089
|
//#endregion
|
|
14163
14090
|
//#region ../layout-engine/contracts/src/author-colors.ts
|
|
@@ -14416,7 +14343,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
14416
14343
|
return null;
|
|
14417
14344
|
};
|
|
14418
14345
|
//#endregion
|
|
14419
|
-
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
14346
|
+
//#region src/components/CommentsLayer/FloatingComments.vue?vue&type=script&setup=true&lang.ts
|
|
14420
14347
|
var _hoisted_1$23 = [
|
|
14421
14348
|
"data-comment-id",
|
|
14422
14349
|
"data-comment-instance-id",
|
|
@@ -14425,7 +14352,7 @@ var _hoisted_1$23 = [
|
|
|
14425
14352
|
"data-comment-page-index"
|
|
14426
14353
|
];
|
|
14427
14354
|
var _heightsCache = {};
|
|
14428
|
-
var
|
|
14355
|
+
var FloatingComments_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
14429
14356
|
__name: "FloatingComments",
|
|
14430
14357
|
props: {
|
|
14431
14358
|
currentDocument: {
|
|
@@ -14468,9 +14395,10 @@ var _sfc_main$30 = {
|
|
|
14468
14395
|
};
|
|
14469
14396
|
const props = __props;
|
|
14470
14397
|
const superdocStore = useSuperdocStore();
|
|
14471
|
-
const
|
|
14398
|
+
const piniaCommentsStore = useCommentsStore();
|
|
14399
|
+
const commentsStore = piniaCommentsStore;
|
|
14472
14400
|
const { clearInstantSidebarAlignment } = commentsStore;
|
|
14473
|
-
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(
|
|
14401
|
+
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(piniaCommentsStore);
|
|
14474
14402
|
const { activeZoom } = storeToRefs(superdocStore);
|
|
14475
14403
|
const committedPresentation = require__plugin_vue_export_helper.computed(() => commentsStore.committedReviewPresentations?.[String(props.currentDocument?.id)] ?? null);
|
|
14476
14404
|
const committedInstances = require__plugin_vue_export_helper.computed(() => {
|
|
@@ -14577,7 +14505,7 @@ var _sfc_main$30 = {
|
|
|
14577
14505
|
return bottom != null ? bottom * zoom : anchorTop;
|
|
14578
14506
|
}
|
|
14579
14507
|
const bottom = instance?.positionEntry?.bounds?.bottom;
|
|
14580
|
-
return
|
|
14508
|
+
return require_is_finite_number.isFiniteNumber(bottom) ? bottom : anchorTop;
|
|
14581
14509
|
};
|
|
14582
14510
|
const geometryBearingInstances = require__plugin_vue_export_helper.computed(() => {
|
|
14583
14511
|
const positioned = [];
|
|
@@ -14585,8 +14513,8 @@ var _sfc_main$30 = {
|
|
|
14585
14513
|
const id = instance?.id;
|
|
14586
14514
|
const threadId = getThreadId(instance?.comment);
|
|
14587
14515
|
const anchorTop = getAnchorTop(instance);
|
|
14588
|
-
if (id == null || threadId == null || !
|
|
14589
|
-
const top = normalizeFloatingAnchorTop(anchorTop
|
|
14516
|
+
if (id == null || threadId == null || !require_is_finite_number.isFiniteNumber(anchorTop)) continue;
|
|
14517
|
+
const top = normalizeFloatingAnchorTop(anchorTop);
|
|
14590
14518
|
positioned.push({
|
|
14591
14519
|
id,
|
|
14592
14520
|
threadId,
|
|
@@ -14608,8 +14536,7 @@ var _sfc_main$30 = {
|
|
|
14608
14536
|
return shouldMountFloatingCommentDialog({
|
|
14609
14537
|
id: position?.id,
|
|
14610
14538
|
visibleIds: committedPresentation.value ? new Set(allPositions.value.filter((item) => item.instanceRef?.mount).map((item) => item.id)) : visibleIds.value,
|
|
14611
|
-
activeCommentInstanceId: activeCommentInstanceId.value
|
|
14612
|
-
comment: position?.commentRef
|
|
14539
|
+
activeCommentInstanceId: activeCommentInstanceId.value
|
|
14613
14540
|
});
|
|
14614
14541
|
};
|
|
14615
14542
|
const getFloatingViewportRange = () => {
|
|
@@ -14965,14 +14892,14 @@ var _sfc_main$30 = {
|
|
|
14965
14892
|
if (!directDecisionContinuity) return;
|
|
14966
14893
|
const actionElement = (event?.target instanceof Element ? event.target : null)?.closest?.("[data-comment-action]");
|
|
14967
14894
|
const action = actionElement?.getAttribute?.("data-comment-action");
|
|
14968
|
-
if (!((action === "resolve" || action === "reject") && floatingCommentsContainer.value?.contains?.(actionElement))) releaseDirectDecisionContinuity();
|
|
14895
|
+
if (!((action === "resolve" || action === "reject") && floatingCommentsContainer.value?.contains?.(actionElement ?? null))) releaseDirectDecisionContinuity();
|
|
14969
14896
|
};
|
|
14970
14897
|
const clearDeferredRemeasureTimers = () => {
|
|
14971
14898
|
remeasureTimers.forEach(clearTimeout);
|
|
14972
14899
|
remeasureTimers = [];
|
|
14973
14900
|
};
|
|
14974
14901
|
const remeasureCommentKeys = (keys) => {
|
|
14975
|
-
for (const key of keys.filter(Boolean)) {
|
|
14902
|
+
for (const key of keys.filter((candidate) => Boolean(candidate))) {
|
|
14976
14903
|
const el = placeholderRefs.value[key];
|
|
14977
14904
|
if (!el) continue;
|
|
14978
14905
|
const dialog = el.querySelector(".comments-dialog");
|
|
@@ -15093,7 +15020,7 @@ var _sfc_main$30 = {
|
|
|
15093
15020
|
removedId: removedKey
|
|
15094
15021
|
});
|
|
15095
15022
|
const targetClientY = (targetKey ? placeholderRefs.value[targetKey] : null)?.getBoundingClientRect?.().top;
|
|
15096
|
-
if (!targetKey || !
|
|
15023
|
+
if (!targetKey || !require_is_finite_number.isFiniteNumber(targetClientY)) {
|
|
15097
15024
|
clearSidebarContinuityAnchor();
|
|
15098
15025
|
return false;
|
|
15099
15026
|
}
|
|
@@ -15106,9 +15033,9 @@ var _sfc_main$30 = {
|
|
|
15106
15033
|
return true;
|
|
15107
15034
|
};
|
|
15108
15035
|
const prepareSidebarContinuityForDirectDecision = (event) => {
|
|
15109
|
-
const actionElement = event?.target?.closest?.("[data-comment-action]");
|
|
15036
|
+
const actionElement = (event?.target instanceof Element ? event.target : null)?.closest?.("[data-comment-action]");
|
|
15110
15037
|
const action = actionElement?.getAttribute?.("data-comment-action");
|
|
15111
|
-
if (action !== "resolve" && action !== "reject") return;
|
|
15038
|
+
if (!actionElement || action !== "resolve" && action !== "reject") return;
|
|
15112
15039
|
releaseDirectDecisionContinuity();
|
|
15113
15040
|
if (actionElement.getAttribute?.("aria-disabled") === "true") return;
|
|
15114
15041
|
const removedKey = (actionElement.closest?.("[data-comment-id]"))?.getAttribute?.("data-comment-id");
|
|
@@ -15124,7 +15051,7 @@ var _sfc_main$30 = {
|
|
|
15124
15051
|
removedId: removedKey
|
|
15125
15052
|
});
|
|
15126
15053
|
const targetClientY = (targetKey ? placeholderRefs.value[targetKey] : null)?.getBoundingClientRect?.().top;
|
|
15127
|
-
if (!targetKey || !
|
|
15054
|
+
if (!targetKey || !require_is_finite_number.isFiniteNumber(targetClientY)) return;
|
|
15128
15055
|
directDecisionContinuity = {
|
|
15129
15056
|
removedKey,
|
|
15130
15057
|
targetKey,
|
|
@@ -15184,7 +15111,7 @@ var _sfc_main$30 = {
|
|
|
15184
15111
|
instantAlignmentInstanceKey,
|
|
15185
15112
|
instantSidebarAlignmentTargetY
|
|
15186
15113
|
], ([activeKey, requestKey, targetY]) => {
|
|
15187
|
-
if (!activeKey || !requestKey || activeKey !== requestKey || !
|
|
15114
|
+
if (!activeKey || !requestKey || activeKey !== requestKey || !require_is_finite_number.isFiniteNumber(targetY)) return;
|
|
15188
15115
|
applyInstantSidebarAlignment(activeKey, targetY);
|
|
15189
15116
|
});
|
|
15190
15117
|
require__plugin_vue_export_helper.watch(editingCommentId, () => {
|
|
@@ -15241,10 +15168,10 @@ var _sfc_main$30 = {
|
|
|
15241
15168
|
let prevActiveLayoutTop = null;
|
|
15242
15169
|
require__plugin_vue_export_helper.watch(allPositions, (positions) => {
|
|
15243
15170
|
const activePosition = activeCommentInstanceId.value ? positions.find((position) => position.id === activeCommentInstanceId.value) : null;
|
|
15244
|
-
const activeAnchorTop =
|
|
15171
|
+
const activeAnchorTop = require_is_finite_number.isFiniteNumber(activePosition?.anchorTop) ? activePosition.anchorTop : null;
|
|
15245
15172
|
const sameActiveInstance = activeCommentInstanceId.value === prevActiveInstanceId;
|
|
15246
15173
|
const activeAnchorMoved = sameActiveInstance && activeAnchorTop != null && prevActiveAnchorTop != null && Math.abs(activeAnchorTop - prevActiveAnchorTop) > 1;
|
|
15247
|
-
const activeLayoutTop =
|
|
15174
|
+
const activeLayoutTop = require_is_finite_number.isFiniteNumber(activePosition?.top) ? activePosition.top : null;
|
|
15248
15175
|
const activeLayoutMoved = sameActiveInstance && activeLayoutTop != null && prevActiveLayoutTop != null && Math.abs(activeLayoutTop - prevActiveLayoutTop) > 1;
|
|
15249
15176
|
if (activeAnchorMoved && sidebarOffsetY.value !== 0 && !Number.isFinite(instantSidebarAlignmentTargetY.value)) {
|
|
15250
15177
|
sidebarOffsetY.value = 0;
|
|
@@ -15408,8 +15335,8 @@ var _sfc_main$30 = {
|
|
|
15408
15335
|
parent: __props.parent,
|
|
15409
15336
|
comment: pos.commentRef,
|
|
15410
15337
|
"floating-instance-id": pos.id,
|
|
15411
|
-
"floating-page-index": pos.pageIndex,
|
|
15412
|
-
"floating-position-entry": pos.instanceRef?.positionEntry ??
|
|
15338
|
+
"floating-page-index": pos.pageIndex ?? void 0,
|
|
15339
|
+
"floating-position-entry": pos.instanceRef?.positionEntry ?? void 0,
|
|
15413
15340
|
"is-floating-instance-active": pos.id === activeCommentInstanceId.value
|
|
15414
15341
|
}, null, 8, [
|
|
15415
15342
|
"onResize",
|
|
@@ -15423,10 +15350,12 @@ var _sfc_main$30 = {
|
|
|
15423
15350
|
}), 128))], 4)], 36);
|
|
15424
15351
|
};
|
|
15425
15352
|
}
|
|
15426
|
-
};
|
|
15427
|
-
var FloatingComments_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$30, [["__scopeId", "data-v-145f83db"]]);
|
|
15353
|
+
});
|
|
15428
15354
|
//#endregion
|
|
15429
|
-
//#region src/components/CommentsLayer/
|
|
15355
|
+
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15356
|
+
var FloatingComments_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(FloatingComments_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e74251e0"]]);
|
|
15357
|
+
//#endregion
|
|
15358
|
+
//#region src/components/CommentsLayer/PdfCommentsLayer.vue?vue&type=script&setup=true&lang.ts
|
|
15430
15359
|
var _hoisted_1$22 = {
|
|
15431
15360
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
15432
15361
|
"aria-hidden": "false"
|
|
@@ -15441,7 +15370,7 @@ var _hoisted_2$17 = [
|
|
|
15441
15370
|
var PDF_SELECTION_SOURCE = "pdf";
|
|
15442
15371
|
var INTERNAL_HIGHLIGHT_COLOR = "#078383";
|
|
15443
15372
|
var EXTERNAL_HIGHLIGHT_COLOR = "#B1124B";
|
|
15444
|
-
var
|
|
15373
|
+
var PdfCommentsLayer_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
15445
15374
|
__name: "PdfCommentsLayer",
|
|
15446
15375
|
emits: ["anchor-activate"],
|
|
15447
15376
|
setup(__props, { emit: __emit }) {
|
|
@@ -15460,11 +15389,12 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
15460
15389
|
* on-document DOCX comment markers.
|
|
15461
15390
|
*/
|
|
15462
15391
|
const emit = __emit;
|
|
15463
|
-
const
|
|
15392
|
+
const piniaCommentsStore = useCommentsStore();
|
|
15393
|
+
const commentsStore = piniaCommentsStore;
|
|
15464
15394
|
const superdocStore = useSuperdocStore();
|
|
15465
|
-
const { activeComment } = storeToRefs(
|
|
15395
|
+
const { activeComment } = storeToRefs(piniaCommentsStore);
|
|
15466
15396
|
const { documents, activeZoom } = storeToRefs(superdocStore);
|
|
15467
|
-
const { proxy } =
|
|
15397
|
+
const { proxy } = useSuperDocInstance();
|
|
15468
15398
|
const isFiniteNumber = (value) => {
|
|
15469
15399
|
if (typeof value === "number") return Number.isFinite(value);
|
|
15470
15400
|
if (typeof value === "string" && value.trim() !== "") return Number.isFinite(Number(value));
|
|
@@ -15503,15 +15433,20 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
15503
15433
|
const pdfCommentAnchors = require__plugin_vue_export_helper.computed(() => {
|
|
15504
15434
|
const parentComments = commentsStore.getFloatingComments;
|
|
15505
15435
|
if (!Array.isArray(parentComments)) return [];
|
|
15506
|
-
return parentComments.
|
|
15436
|
+
return parentComments.flatMap((comment) => {
|
|
15437
|
+
if (comment?.selection?.source !== PDF_SELECTION_SOURCE) return [];
|
|
15438
|
+
if (comment.resolvedTime) return [];
|
|
15507
15439
|
const commentId = getAnchorCommentId(comment);
|
|
15508
|
-
|
|
15509
|
-
|
|
15440
|
+
if (commentId === null) return [];
|
|
15441
|
+
const selectionBounds = comment.selection.selectionBounds;
|
|
15442
|
+
if (!hasFiniteBounds(selectionBounds)) return [];
|
|
15443
|
+
if (!belongsToOpenPdfDocument(comment)) return [];
|
|
15444
|
+
return [{
|
|
15510
15445
|
commentId,
|
|
15511
|
-
page: comment.selection
|
|
15446
|
+
page: comment.selection.page ?? null,
|
|
15512
15447
|
isInternal: comment.isInternal !== false,
|
|
15513
|
-
bounds
|
|
15514
|
-
};
|
|
15448
|
+
bounds: normalizeBounds(selectionBounds)
|
|
15449
|
+
}];
|
|
15515
15450
|
});
|
|
15516
15451
|
});
|
|
15517
15452
|
const getAnchorStyle = (anchor) => {
|
|
@@ -15549,7 +15484,10 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
15549
15484
|
}), 128))]);
|
|
15550
15485
|
};
|
|
15551
15486
|
}
|
|
15552
|
-
}
|
|
15487
|
+
});
|
|
15488
|
+
//#endregion
|
|
15489
|
+
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
15490
|
+
var PdfCommentsLayer_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(PdfCommentsLayer_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-86166837"]]);
|
|
15553
15491
|
//#endregion
|
|
15554
15492
|
//#region src/components/Whiteboard/use-whiteboard.js
|
|
15555
15493
|
var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
@@ -15703,7 +15641,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
15703
15641
|
//#endregion
|
|
15704
15642
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
15705
15643
|
var _hoisted_1$21 = ["data-page-index"];
|
|
15706
|
-
var _sfc_main$
|
|
15644
|
+
var _sfc_main$17 = {
|
|
15707
15645
|
__name: "WhiteboardPage",
|
|
15708
15646
|
props: {
|
|
15709
15647
|
whiteboard: {
|
|
@@ -15838,10 +15776,10 @@ var _sfc_main$28 = {
|
|
|
15838
15776
|
};
|
|
15839
15777
|
}
|
|
15840
15778
|
};
|
|
15841
|
-
var WhiteboardPage_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
15779
|
+
var WhiteboardPage_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$17, [["__scopeId", "data-v-c876c9b5"]]);
|
|
15842
15780
|
//#endregion
|
|
15843
15781
|
//#region src/components/Whiteboard/WhiteboardLayer.vue
|
|
15844
|
-
var _sfc_main$
|
|
15782
|
+
var _sfc_main$16 = {
|
|
15845
15783
|
__name: "WhiteboardLayer",
|
|
15846
15784
|
props: {
|
|
15847
15785
|
whiteboard: {
|
|
@@ -15910,7 +15848,7 @@ var _sfc_main$27 = {
|
|
|
15910
15848
|
};
|
|
15911
15849
|
}
|
|
15912
15850
|
};
|
|
15913
|
-
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
15851
|
+
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$16, [["__scopeId", "data-v-54546c3d"]]);
|
|
15914
15852
|
//#endregion
|
|
15915
15853
|
//#region src/components/CommentsLayer/collect-removed-comment-ids.js
|
|
15916
15854
|
/**
|
|
@@ -15953,18 +15891,6 @@ var collectRemovedCommentIds = (comments, targetIds, isInScope = () => true) =>
|
|
|
15953
15891
|
}
|
|
15954
15892
|
return removedIds;
|
|
15955
15893
|
};
|
|
15956
|
-
//#endregion
|
|
15957
|
-
//#region src/composables/use-superdoc-instance.ts
|
|
15958
|
-
function useSuperDocInstance() {
|
|
15959
|
-
const instance = require__plugin_vue_export_helper.getCurrentInstance();
|
|
15960
|
-
if (!instance?.proxy) throw new Error("useSuperDocInstance() must be called during a component setup function.");
|
|
15961
|
-
const superdoc = instance.appContext.config.globalProperties.$superdoc;
|
|
15962
|
-
if (!superdoc) throw new Error("useSuperDocInstance() found no SuperDoc registered at app.config.globalProperties.$superdoc.");
|
|
15963
|
-
return {
|
|
15964
|
-
proxy: instance.proxy,
|
|
15965
|
-
superdoc
|
|
15966
|
-
};
|
|
15967
|
-
}
|
|
15968
15894
|
var VALID_COMMENTS_LAYOUTS = /* @__PURE__ */ new Set([
|
|
15969
15895
|
"auto",
|
|
15970
15896
|
"sidebar",
|
|
@@ -16003,13 +15929,13 @@ function normalizeCommentsUiConfig(commentsConfig) {
|
|
|
16003
15929
|
if (deprecatedTarget === void 0) delete normalized.compactMeasurementSelector;
|
|
16004
15930
|
else normalized.compactMeasurementSelector = deprecatedTarget;
|
|
16005
15931
|
const deprecatedBreakpoint = commentsConfig.compactBreakpointPx;
|
|
16006
|
-
if (!(
|
|
15932
|
+
if (!(require_is_finite_number.isFiniteNumber(deprecatedBreakpoint) && deprecatedBreakpoint >= 0)) delete normalized.compactBreakpointPx;
|
|
16007
15933
|
delete normalized.layout;
|
|
16008
15934
|
delete normalized.responsive;
|
|
16009
15935
|
if (isCommentsLayout(layout)) normalized.layout = layout;
|
|
16010
15936
|
const normalizedResponsive = {};
|
|
16011
15937
|
if (target !== void 0) normalizedResponsive.target = target;
|
|
16012
|
-
if (
|
|
15938
|
+
if (require_is_finite_number.isFiniteNumber(breakpoint) && breakpoint >= 0) normalizedResponsive.breakpoint = breakpoint;
|
|
16013
15939
|
if (Object.keys(normalizedResponsive).length > 0) normalized.responsive = normalizedResponsive;
|
|
16014
15940
|
return normalized;
|
|
16015
15941
|
}
|
|
@@ -16017,7 +15943,7 @@ function normalizeCommentsUiConfig(commentsConfig) {
|
|
|
16017
15943
|
//#region src/composables/use-comment-small-screen.js
|
|
16018
15944
|
var SUPERDOC_DOCUMENT_SELECTOR = ".superdoc__document";
|
|
16019
15945
|
var isValidCompactBreakpoint = (value) => {
|
|
16020
|
-
return
|
|
15946
|
+
return require_is_finite_number.isFiniteNumber(value) && value >= 0;
|
|
16021
15947
|
};
|
|
16022
15948
|
var getRequiredSidebarWidth = (documentWidth) => {
|
|
16023
15949
|
return documentWidth + 320 + 24;
|
|
@@ -16164,18 +16090,17 @@ var COMMENT_HIGHLIGHT_DATA_ATTR = "data-comment-ids";
|
|
|
16164
16090
|
var PDF_COMMENT_ANCHOR_SELECTOR = ".sd-comment-anchor";
|
|
16165
16091
|
var clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
16166
16092
|
var toNumber = (value) => Number(value);
|
|
16167
|
-
var isFiniteNumber = (value) => Number.isFinite(value);
|
|
16168
16093
|
var getCommentAnchorId = (comment) => comment?.commentId ?? comment?.importedId ?? null;
|
|
16169
16094
|
var parseCommentIds = (value) => String(value || "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
16170
16095
|
var resolveInteractionAnchor = (lastClickAnchor) => {
|
|
16171
16096
|
const anchor = lastClickAnchor?.value;
|
|
16172
16097
|
if (!anchor) return null;
|
|
16173
16098
|
const ts = toNumber(anchor.ts);
|
|
16174
|
-
if (!isFiniteNumber(ts) || Date.now() - ts > INTERACTION_ANCHOR_TTL_MS) return null;
|
|
16099
|
+
if (!require_is_finite_number.isFiniteNumber(ts) || Date.now() - ts > INTERACTION_ANCHOR_TTL_MS) return null;
|
|
16175
16100
|
const x = toNumber(anchor.x);
|
|
16176
16101
|
const rectBottom = toNumber(anchor.anchorRect?.bottom);
|
|
16177
|
-
const y = isFiniteNumber(rectBottom) ? rectBottom : toNumber(anchor.y);
|
|
16178
|
-
if (!isFiniteNumber(x) || !isFiniteNumber(y)) return null;
|
|
16102
|
+
const y = require_is_finite_number.isFiniteNumber(rectBottom) ? rectBottom : toNumber(anchor.y);
|
|
16103
|
+
if (!require_is_finite_number.isFiniteNumber(x) || !require_is_finite_number.isFiniteNumber(y)) return null;
|
|
16179
16104
|
return {
|
|
16180
16105
|
x,
|
|
16181
16106
|
y
|
|
@@ -16206,7 +16131,7 @@ var resolveInlineHighlightAnchorRect = ({ rootEl, comment, pendingComment }) =>
|
|
|
16206
16131
|
var resolveEntryAnchorBottom = (resolveCommentPositionEntry, comment) => {
|
|
16207
16132
|
const { entry } = resolveCommentPositionEntry(getCommentAnchorId(comment));
|
|
16208
16133
|
const boundsBottom = toNumber(entry?.bounds?.bottom);
|
|
16209
|
-
if (isFiniteNumber(boundsBottom)) return boundsBottom;
|
|
16134
|
+
if (require_is_finite_number.isFiniteNumber(boundsBottom)) return boundsBottom;
|
|
16210
16135
|
return toNumber(entry?.bounds?.top);
|
|
16211
16136
|
};
|
|
16212
16137
|
var isPdfContextForAnchorLookup = ({ selectionPosition, comment, pendingComment }) => selectionPosition.value?.source === "pdf" || comment?.selection?.source === "pdf" || pendingComment.value?.selection?.source === "pdf";
|
|
@@ -16220,9 +16145,9 @@ var resolvePdfDomAnchorBottom = ({ rootEl, layersRect, comment }) => {
|
|
|
16220
16145
|
var resolvePendingSelectionAnchorBottom = ({ comment, pendingComment, selectionPosition, activeZoom }) => {
|
|
16221
16146
|
if (!pendingComment.value || comment?.commentId !== pendingComment.value?.commentId) return NaN;
|
|
16222
16147
|
const selectedBottom = toNumber(selectionPosition.value?.bottom);
|
|
16223
|
-
if (isFiniteNumber(selectedBottom)) return selectedBottom * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16148
|
+
if (require_is_finite_number.isFiniteNumber(selectedBottom)) return selectedBottom * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16224
16149
|
const selectedTop = toNumber(selectionPosition.value?.top);
|
|
16225
|
-
if (!isFiniteNumber(selectedTop)) return NaN;
|
|
16150
|
+
if (!require_is_finite_number.isFiniteNumber(selectedTop)) return NaN;
|
|
16226
16151
|
return selectedTop * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16227
16152
|
};
|
|
16228
16153
|
var toPopoverStyle = ({ top, left }) => ({
|
|
@@ -16234,7 +16159,7 @@ var resolvePopoverPosition = ({ rootRect, layersRect, anchorBottom, anchorClient
|
|
|
16234
16159
|
const top = clamp(layersRect.top - rootRect.top + anchorBottom + ANCHOR_TOP_OFFSET_PX, SAFE_MARGIN_PX, Math.max(SAFE_MARGIN_PX, rootRect.height - MIN_BOTTOM_SPACE_PX));
|
|
16235
16160
|
const maxLeft = Math.max(SAFE_MARGIN_PX, rootRect.width - POPOVER_WIDTH_PX - SAFE_MARGIN_PX);
|
|
16236
16161
|
let left;
|
|
16237
|
-
if (isFiniteNumber(anchorClientX)) left = clamp(anchorClientX - rootRect.left + SAFE_MARGIN_PX, SAFE_MARGIN_PX, maxLeft);
|
|
16162
|
+
if (require_is_finite_number.isFiniteNumber(anchorClientX)) left = clamp(anchorClientX - rootRect.left + SAFE_MARGIN_PX, SAFE_MARGIN_PX, maxLeft);
|
|
16238
16163
|
else {
|
|
16239
16164
|
const rightCandidate = rootRect.width - (layersRect.left - rootRect.left + layersRect.width) + SAFE_MARGIN_PX;
|
|
16240
16165
|
left = clamp(rootRect.width - rightCandidate - POPOVER_WIDTH_PX, SAFE_MARGIN_PX, maxLeft);
|
|
@@ -16321,7 +16246,7 @@ function useCompactCommentPopover({ activeComment, pendingComment, activeCompact
|
|
|
16321
16246
|
anchorBottom = inlineRect.bottom - layersRect.top;
|
|
16322
16247
|
anchorClientX = inlineRect.left;
|
|
16323
16248
|
} else anchorBottom = resolveEntryAnchorBottom(resolveCommentPositionEntry, comment);
|
|
16324
|
-
if (!isFiniteNumber(anchorBottom) && isPdfContextForAnchorLookup({
|
|
16249
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom) && isPdfContextForAnchorLookup({
|
|
16325
16250
|
selectionPosition,
|
|
16326
16251
|
comment,
|
|
16327
16252
|
pendingComment
|
|
@@ -16330,13 +16255,13 @@ function useCompactCommentPopover({ activeComment, pendingComment, activeCompact
|
|
|
16330
16255
|
layersRect,
|
|
16331
16256
|
comment
|
|
16332
16257
|
});
|
|
16333
|
-
if (!isFiniteNumber(anchorBottom)) anchorBottom = resolvePendingSelectionAnchorBottom({
|
|
16258
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom)) anchorBottom = resolvePendingSelectionAnchorBottom({
|
|
16334
16259
|
comment,
|
|
16335
16260
|
pendingComment,
|
|
16336
16261
|
selectionPosition,
|
|
16337
16262
|
activeZoom
|
|
16338
16263
|
});
|
|
16339
|
-
if (!isFiniteNumber(anchorBottom)) return fallback;
|
|
16264
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom)) return fallback;
|
|
16340
16265
|
return toPopoverStyle(resolvePopoverPosition({
|
|
16341
16266
|
rootRect,
|
|
16342
16267
|
layersRect,
|
|
@@ -17993,7 +17918,7 @@ var toolbarIcons = {
|
|
|
17993
17918
|
formattingMarks: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><text x=\"12\" y=\"18\" text-anchor=\"middle\" font-family=\"Arial, Helvetica, sans-serif\" font-size=\"20\" font-weight=\"700\" fill=\"currentColor\">¶</text></svg>\n"
|
|
17994
17919
|
};
|
|
17995
17920
|
//#endregion
|
|
17996
|
-
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
17921
|
+
//#region src/internal/toolbar/built-in/LinkInput.vue?vue&type=script&setup=true&lang.ts
|
|
17997
17922
|
var _hoisted_1$20 = {
|
|
17998
17923
|
key: 0,
|
|
17999
17924
|
class: "link-title"
|
|
@@ -18057,7 +17982,7 @@ var _hoisted_18$1 = {
|
|
|
18057
17982
|
* `btn-link-remove`, `btn-link-open`, `input[name="link"]`) is preserved so the
|
|
18058
17983
|
* proof lane and behavior tests keep working.
|
|
18059
17984
|
*/
|
|
18060
|
-
var
|
|
17985
|
+
var LinkInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
18061
17986
|
__name: "LinkInput",
|
|
18062
17987
|
props: {
|
|
18063
17988
|
showInput: {
|
|
@@ -18208,7 +18133,7 @@ var _sfc_main$26 = {
|
|
|
18208
18133
|
commandError.value = "";
|
|
18209
18134
|
try {
|
|
18210
18135
|
const result = await runLinkCommand(payload);
|
|
18211
|
-
if (result === false || result == null || typeof result === "object" &&
|
|
18136
|
+
if (result === false || result == null || typeof result === "object" && result.success === false) {
|
|
18212
18137
|
commandError.value = "Could not apply link. Check the selection and try again.";
|
|
18213
18138
|
return;
|
|
18214
18139
|
}
|
|
@@ -18318,8 +18243,10 @@ var _sfc_main$26 = {
|
|
|
18318
18243
|
], 2);
|
|
18319
18244
|
};
|
|
18320
18245
|
}
|
|
18321
|
-
};
|
|
18322
|
-
|
|
18246
|
+
});
|
|
18247
|
+
//#endregion
|
|
18248
|
+
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
18249
|
+
var LinkInput_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(LinkInput_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-172107e4"]]);
|
|
18323
18250
|
//#endregion
|
|
18324
18251
|
//#region src/internal/toolbar/built-in/scroll-helpers.js
|
|
18325
18252
|
function getScrollableParent(element) {
|
|
@@ -20236,7 +20163,7 @@ function translateExportDiagnostic(error, ctx = {}) {
|
|
|
20236
20163
|
* event only fires on success, fires AFTER the diagnostics events on the
|
|
20237
20164
|
* success path, and never fires at all for a failed attempt.
|
|
20238
20165
|
*
|
|
20239
|
-
* @param {{generation?: unknown}} [payload]
|
|
20166
|
+
* @param {{generation?: unknown} | null} [payload]
|
|
20240
20167
|
* @returns {number}
|
|
20241
20168
|
*/
|
|
20242
20169
|
function getV2DiagnosticGeneration(payload) {
|
|
@@ -20309,8 +20236,8 @@ function isBootDiagnosticRedundant(bootDiagnostic, reason, translatedRecords) {
|
|
|
20309
20236
|
return Boolean(bootDiagnostic) && bootDiagnostic.internalCode === reason && translatedRecords.length > 0;
|
|
20310
20237
|
}
|
|
20311
20238
|
//#endregion
|
|
20312
|
-
//#region src/components/surfaces/SurfaceExternalMount.vue
|
|
20313
|
-
var
|
|
20239
|
+
//#region src/components/surfaces/SurfaceExternalMount.vue?vue&type=script&setup=true&lang.ts
|
|
20240
|
+
var SurfaceExternalMount_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20314
20241
|
__name: "SurfaceExternalMount",
|
|
20315
20242
|
props: {
|
|
20316
20243
|
surfaceId: {
|
|
@@ -20372,8 +20299,10 @@ var _sfc_main$25 = {
|
|
|
20372
20299
|
}, null, 512);
|
|
20373
20300
|
};
|
|
20374
20301
|
}
|
|
20375
|
-
};
|
|
20376
|
-
|
|
20302
|
+
});
|
|
20303
|
+
//#endregion
|
|
20304
|
+
//#region src/components/surfaces/SurfaceExternalMount.vue
|
|
20305
|
+
var SurfaceExternalMount_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(SurfaceExternalMount_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-d1081bc8"]]);
|
|
20377
20306
|
//#endregion
|
|
20378
20307
|
//#region src/components/surfaces/focusable-selector.js
|
|
20379
20308
|
/**
|
|
@@ -20389,11 +20318,11 @@ var FOCUSABLE_SELECTOR = [
|
|
|
20389
20318
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
20390
20319
|
].join(", ");
|
|
20391
20320
|
//#endregion
|
|
20392
|
-
//#region src/components/surfaces/SurfaceDialog.vue
|
|
20321
|
+
//#region src/components/surfaces/SurfaceDialog.vue?vue&type=script&setup=true&lang.ts
|
|
20393
20322
|
var _hoisted_1$19 = ["aria-labelledby", "aria-label"];
|
|
20394
20323
|
var _hoisted_2$15 = ["id"];
|
|
20395
20324
|
var _hoisted_3$13 = { class: "sd-surface-dialog__content" };
|
|
20396
|
-
var
|
|
20325
|
+
var SurfaceDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20397
20326
|
__name: "SurfaceDialog",
|
|
20398
20327
|
props: {
|
|
20399
20328
|
surface: {
|
|
@@ -20440,7 +20369,7 @@ var _sfc_main$24 = {
|
|
|
20440
20369
|
if (props.scrollLockTarget) scrollLockTarget = props.scrollLockTarget;
|
|
20441
20370
|
else {
|
|
20442
20371
|
const superdocRoot = dialogRef.value?.closest(".superdoc");
|
|
20443
|
-
scrollLockTarget = superdocRoot?.querySelector(".superdoc__layers") ?? superdocRoot;
|
|
20372
|
+
scrollLockTarget = superdocRoot?.querySelector(".superdoc__layers") ?? superdocRoot ?? null;
|
|
20444
20373
|
}
|
|
20445
20374
|
if (!scrollLockTarget) return;
|
|
20446
20375
|
originalOverflow = scrollLockTarget.style.overflow;
|
|
@@ -20541,14 +20470,16 @@ var _sfc_main$24 = {
|
|
|
20541
20470
|
])) : __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);
|
|
20542
20471
|
};
|
|
20543
20472
|
}
|
|
20544
|
-
};
|
|
20545
|
-
|
|
20473
|
+
});
|
|
20474
|
+
//#endregion
|
|
20475
|
+
//#region src/components/surfaces/SurfaceDialog.vue
|
|
20476
|
+
var SurfaceDialog_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(SurfaceDialog_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-6ce23dd7"]]);
|
|
20546
20477
|
//#endregion
|
|
20547
20478
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
20548
20479
|
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
20549
20480
|
var _hoisted_2$14 = ["id"];
|
|
20550
20481
|
var _hoisted_3$12 = { class: "sd-surface-floating__content" };
|
|
20551
|
-
var _sfc_main$
|
|
20482
|
+
var _sfc_main$15 = {
|
|
20552
20483
|
__name: "SurfaceFloating",
|
|
20553
20484
|
props: { surface: {
|
|
20554
20485
|
type: Object,
|
|
@@ -20697,10 +20628,10 @@ var _sfc_main$23 = {
|
|
|
20697
20628
|
};
|
|
20698
20629
|
}
|
|
20699
20630
|
};
|
|
20700
|
-
var SurfaceFloating_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
20631
|
+
var SurfaceFloating_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$15, [["__scopeId", "data-v-cd2be5db"]]);
|
|
20701
20632
|
//#endregion
|
|
20702
20633
|
//#region src/components/surfaces/SurfaceHost.vue
|
|
20703
|
-
var _sfc_main$
|
|
20634
|
+
var _sfc_main$14 = {
|
|
20704
20635
|
__name: "SurfaceHost",
|
|
20705
20636
|
props: { geometryTarget: {
|
|
20706
20637
|
type: Object,
|
|
@@ -20922,9 +20853,9 @@ var _sfc_main$22 = {
|
|
|
20922
20853
|
};
|
|
20923
20854
|
}
|
|
20924
20855
|
};
|
|
20925
|
-
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
20856
|
+
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$14, [["__scopeId", "data-v-dad99b67"]]);
|
|
20926
20857
|
//#endregion
|
|
20927
|
-
//#region src/SuperDoc.vue
|
|
20858
|
+
//#region src/SuperDoc.vue?vue&type=script&setup=true&lang.ts
|
|
20928
20859
|
var _hoisted_1$17 = ["data-superdoc-ui-owner"];
|
|
20929
20860
|
var _hoisted_2$13 = ["innerHTML"];
|
|
20930
20861
|
var _hoisted_3$11 = { class: "superdoc__document document" };
|
|
@@ -20932,11 +20863,11 @@ var _hoisted_4$9 = { class: "floating-comments" };
|
|
|
20932
20863
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
20933
20864
|
var UNAVAILABLE_COMMAND_RESULT = false;
|
|
20934
20865
|
var V2_SELECTION_TOOLBAR_SYNC_RETRY_FRAMES = 3;
|
|
20935
|
-
var
|
|
20866
|
+
var SuperDoc_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20936
20867
|
__name: "SuperDoc",
|
|
20937
20868
|
emits: ["selection-update"],
|
|
20938
20869
|
setup(__props, { emit: __emit }) {
|
|
20939
|
-
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-
|
|
20870
|
+
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-boENOZdF.cjs")));
|
|
20940
20871
|
const getDocumentLoadPassword = (doc) => doc.password ?? proxy.$superdoc.config.password;
|
|
20941
20872
|
const resolveDocumentV2Collaboration = (doc) => {
|
|
20942
20873
|
const rawConfig = doc?.v2Collaboration;
|
|
@@ -21198,7 +21129,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21198
21129
|
if (typeof bindSessionShortcuts !== "function") return;
|
|
21199
21130
|
const unbind = bindSessionShortcuts({
|
|
21200
21131
|
routes: createV2SessionShortcutRoutes({
|
|
21201
|
-
resolveToolbarElement: () => proxy.$superdoc?.toolbar?.toolbarContainer ?? null,
|
|
21132
|
+
resolveToolbarElement: () => (proxy.$superdoc?.toolbar)?.toolbarContainer ?? null,
|
|
21202
21133
|
getDocumentApi: () => documentApi ?? null,
|
|
21203
21134
|
...firstPartyCommandMutation ? { runReferenceMutation: (memberPath, input) => firstPartyCommandMutation.run(memberPath, [input]) } : {},
|
|
21204
21135
|
pageNumberCommand: {
|
|
@@ -21233,7 +21164,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21233
21164
|
if (document && provider?.sendStateless) document.provider = null;
|
|
21234
21165
|
const entry = v2Runtimes.get(documentId);
|
|
21235
21166
|
if (!entry) return;
|
|
21236
|
-
proxy.$superdoc
|
|
21167
|
+
proxy.$superdoc["unregisterEditorRuntime"](entry.runtimeId);
|
|
21237
21168
|
v2Runtimes.delete(documentId);
|
|
21238
21169
|
const hostRoot = subDocumentRoots.get(documentId);
|
|
21239
21170
|
if (hostRoot) unmarkRuntimeRoot(hostRoot);
|
|
@@ -21253,7 +21184,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21253
21184
|
host,
|
|
21254
21185
|
getLegacyEditorProjection: () => facade,
|
|
21255
21186
|
onUnregister: (id) => {
|
|
21256
|
-
proxy.$superdoc
|
|
21187
|
+
proxy.$superdoc["unregisterEditorRuntime"](id);
|
|
21257
21188
|
const current = v2Runtimes.get(documentId);
|
|
21258
21189
|
if (current && current.runtimeId === id) v2Runtimes.delete(documentId);
|
|
21259
21190
|
const hostRoot = subDocumentRoots.get(documentId);
|
|
@@ -21262,12 +21193,12 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21262
21193
|
});
|
|
21263
21194
|
adapter.attachMountHandle(mount ?? null);
|
|
21264
21195
|
markRuntimeRoot(root, runtimeId);
|
|
21265
|
-
proxy.$superdoc
|
|
21196
|
+
proxy.$superdoc["registerEditorRuntime"](adapter.runtime);
|
|
21266
21197
|
v2Runtimes.set(documentId, {
|
|
21267
21198
|
runtimeId,
|
|
21268
21199
|
adapter
|
|
21269
21200
|
});
|
|
21270
|
-
proxy.$superdoc
|
|
21201
|
+
proxy.$superdoc["setActiveRuntime"](runtimeId, "v2-editor-ready");
|
|
21271
21202
|
return true;
|
|
21272
21203
|
};
|
|
21273
21204
|
const v2ReviewWindowController = resolvedEditorIntegration.createReviewWindowController({ applyReviewWindow: (ctx, result) => commentsStore.applyReviewWindowFromV2?.({
|
|
@@ -21793,7 +21724,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21793
21724
|
if (!isV2Mode.value) return;
|
|
21794
21725
|
let handles = null;
|
|
21795
21726
|
try {
|
|
21796
|
-
handles = proxy.$superdoc?.activeEditor?.host?.getHandles?.() ?? null;
|
|
21727
|
+
handles = (proxy.$superdoc?.activeEditor)?.host?.getHandles?.() ?? null;
|
|
21797
21728
|
} catch {
|
|
21798
21729
|
handles = null;
|
|
21799
21730
|
}
|
|
@@ -21872,7 +21803,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21872
21803
|
syncV2SelectionToolbarState();
|
|
21873
21804
|
};
|
|
21874
21805
|
const getActiveV2MountContainer = () => {
|
|
21875
|
-
return v2GeometryRender.value?.mountContainer ?? proxy.$superdoc?.activeEditor?.mount?.container ?? null;
|
|
21806
|
+
return v2GeometryRender.value?.mountContainer ?? (proxy.$superdoc?.activeEditor)?.mount?.container ?? null;
|
|
21876
21807
|
};
|
|
21877
21808
|
const escapeCssIdent = (value) => {
|
|
21878
21809
|
const raw = String(value);
|
|
@@ -22383,7 +22314,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22383
22314
|
}
|
|
22384
22315
|
};
|
|
22385
22316
|
const activateRuntimeFromEvent = (event, reason) => {
|
|
22386
|
-
proxy.$superdoc?.activateRuntimeFromEventTarget?.(event.target, reason);
|
|
22317
|
+
proxy.$superdoc?.["activateRuntimeFromEventTarget"]?.(event.target, reason);
|
|
22387
22318
|
};
|
|
22388
22319
|
const handleRuntimeFocusIn = (event) => activateRuntimeFromEvent(event, "focusin");
|
|
22389
22320
|
const handleRuntimePointerDown = (event) => activateRuntimeFromEvent(event, "pointerdown");
|
|
@@ -22501,7 +22432,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22501
22432
|
commentHighlights: proxy.$superdoc.uiConfig.comments.highlights,
|
|
22502
22433
|
resolveTrackedChangeColor: composeAuthorColorResolver(proxy.$superdoc.config.modules?.trackChanges?.authorColors)
|
|
22503
22434
|
} : void 0,
|
|
22504
|
-
permissionResolver: createTrackedChangePermissionResolver(proxy.$superdoc)
|
|
22435
|
+
permissionResolver: require_create_super_doc_ui.createTrackedChangePermissionResolver(proxy.$superdoc)
|
|
22505
22436
|
};
|
|
22506
22437
|
};
|
|
22507
22438
|
const REPLAY_MUTABLE_COMMENT_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -22791,8 +22722,8 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22791
22722
|
if (!isCommentsEnabled.value) return false;
|
|
22792
22723
|
return !getConfig.value?.readOnly && selectionPosition.value;
|
|
22793
22724
|
});
|
|
22794
|
-
require__plugin_vue_export_helper.watch(showCommentsSidebar, (
|
|
22795
|
-
proxy.$superdoc.broadcastSidebarToggle(
|
|
22725
|
+
require__plugin_vue_export_helper.watch(() => Boolean(showCommentsSidebar.value), (isOpened) => {
|
|
22726
|
+
proxy.$superdoc.broadcastSidebarToggle(isOpened);
|
|
22796
22727
|
});
|
|
22797
22728
|
useViewportFit({
|
|
22798
22729
|
getSuperdoc: () => proxy.$superdoc,
|
|
@@ -22873,7 +22804,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22873
22804
|
const activeElement = document.activeElement;
|
|
22874
22805
|
if (!(activeElement instanceof Node)) return false;
|
|
22875
22806
|
if (root?.contains(activeElement)) return true;
|
|
22876
|
-
const activeEditorDom = proxy.$superdoc?.activeEditor?.view?.dom;
|
|
22807
|
+
const activeEditorDom = (proxy.$superdoc?.activeEditor?.view)?.dom;
|
|
22877
22808
|
return activeEditorDom instanceof Node && (activeElement === activeEditorDom || activeEditorDom.contains?.(activeElement));
|
|
22878
22809
|
}
|
|
22879
22810
|
/**
|
|
@@ -23066,16 +22997,18 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23066
22997
|
resetSelection();
|
|
23067
22998
|
selectionLayer.value.style.pointerEvents = "auto";
|
|
23068
22999
|
require__plugin_vue_export_helper.nextTick(() => {
|
|
23000
|
+
const layer = selectionLayer.value;
|
|
23001
|
+
if (!layer) return;
|
|
23069
23002
|
isDragging.value = true;
|
|
23070
|
-
|
|
23003
|
+
layer.style.pointerEvents = "none";
|
|
23071
23004
|
const pageNumber = getPdfPageNumberFromEvent(e);
|
|
23072
|
-
|
|
23005
|
+
layer.style.pointerEvents = "auto";
|
|
23073
23006
|
if (!pageNumber) {
|
|
23074
23007
|
isDragging.value = false;
|
|
23075
|
-
|
|
23008
|
+
layer.style.pointerEvents = "none";
|
|
23076
23009
|
return;
|
|
23077
23010
|
}
|
|
23078
|
-
const layerBounds =
|
|
23011
|
+
const layerBounds = layer.getBoundingClientRect();
|
|
23079
23012
|
const zoom = activeZoom.value / 100;
|
|
23080
23013
|
const x = (e.clientX - layerBounds.left) / zoom;
|
|
23081
23014
|
const y = (e.clientY - layerBounds.top) / zoom;
|
|
@@ -23085,7 +23018,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23085
23018
|
page: pageNumber,
|
|
23086
23019
|
source: "pdf"
|
|
23087
23020
|
});
|
|
23088
|
-
|
|
23021
|
+
layer.addEventListener("mousemove", handleDragMove);
|
|
23089
23022
|
});
|
|
23090
23023
|
};
|
|
23091
23024
|
const handleDragMove = (e) => {
|
|
@@ -23160,7 +23093,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23160
23093
|
if (typeof container === "string") return (typeof document !== "undefined" ? document : globalThis.document)?.querySelector(container) ?? null;
|
|
23161
23094
|
return typeof HTMLElement !== "undefined" && container instanceof HTMLElement ? container : null;
|
|
23162
23095
|
};
|
|
23163
|
-
const getActiveV2DocumentId = () => proxy.$superdoc?.activeEditor?.documentId ?? proxy.$superdoc?.activeEditor?.options?.documentId ?? null;
|
|
23096
|
+
const getActiveV2DocumentId = () => (proxy.$superdoc?.activeEditor)?.documentId ?? proxy.$superdoc?.activeEditor?.options?.documentId ?? null;
|
|
23164
23097
|
const resolveV2RulerAlignmentContainer = () => {
|
|
23165
23098
|
if (resolvedRulerContainer.value) return resolveV2RulerContainer();
|
|
23166
23099
|
const activeDocumentId = getActiveV2DocumentId();
|
|
@@ -23551,7 +23484,10 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23551
23484
|
], 46, _hoisted_1$17);
|
|
23552
23485
|
};
|
|
23553
23486
|
}
|
|
23554
|
-
}
|
|
23487
|
+
});
|
|
23488
|
+
//#endregion
|
|
23489
|
+
//#region src/SuperDoc.vue
|
|
23490
|
+
var SuperDoc_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(SuperDoc_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-da95e5c5"]]);
|
|
23555
23491
|
//#endregion
|
|
23556
23492
|
//#region src/core/create-app.js
|
|
23557
23493
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -38048,10 +37984,10 @@ var throttle = (func, wait, options) => {
|
|
|
38048
37984
|
return throttled;
|
|
38049
37985
|
};
|
|
38050
37986
|
//#endregion
|
|
38051
|
-
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
37987
|
+
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue?vue&type=script&setup=true&lang.ts
|
|
38052
37988
|
var _hoisted_1$16 = { class: "sd-toolbar-icon" };
|
|
38053
37989
|
var _hoisted_2$12 = ["innerHTML"];
|
|
38054
|
-
var
|
|
37990
|
+
var ToolbarButtonIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38055
37991
|
__name: "ToolbarButtonIcon",
|
|
38056
37992
|
props: {
|
|
38057
37993
|
name: {
|
|
@@ -38087,10 +38023,12 @@ var _sfc_main$20 = {
|
|
|
38087
38023
|
}, null, 4)) : require__plugin_vue_export_helper.createCommentVNode("", true)]);
|
|
38088
38024
|
};
|
|
38089
38025
|
}
|
|
38090
|
-
};
|
|
38091
|
-
var ToolbarButtonIcon_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-65ecd5b1"]]);
|
|
38026
|
+
});
|
|
38092
38027
|
//#endregion
|
|
38093
|
-
//#region src/internal/toolbar/built-in/
|
|
38028
|
+
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
38029
|
+
var ToolbarButtonIcon_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ToolbarButtonIcon_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e72eee56"]]);
|
|
38030
|
+
//#endregion
|
|
38031
|
+
//#region src/internal/toolbar/built-in/ToolbarButton.vue?vue&type=script&setup=true&lang.ts
|
|
38094
38032
|
var _hoisted_1$15 = [
|
|
38095
38033
|
"role",
|
|
38096
38034
|
"aria-label",
|
|
@@ -38117,7 +38055,7 @@ var _hoisted_11$1 = {
|
|
|
38117
38055
|
"aria-live": "polite",
|
|
38118
38056
|
class: "sd-visually-hidden"
|
|
38119
38057
|
};
|
|
38120
|
-
var
|
|
38058
|
+
var ToolbarButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38121
38059
|
__name: "ToolbarButton",
|
|
38122
38060
|
props: {
|
|
38123
38061
|
iconColor: {
|
|
@@ -38160,9 +38098,9 @@ var _sfc_main$19 = {
|
|
|
38160
38098
|
],
|
|
38161
38099
|
setup(__props, { emit: __emit }) {
|
|
38162
38100
|
const emit = __emit;
|
|
38163
|
-
const
|
|
38101
|
+
const proxy = require__plugin_vue_export_helper.getCurrentInstance()?.proxy;
|
|
38164
38102
|
const props = __props;
|
|
38165
|
-
const { name, active, icon, label, hideLabel, iconColor, hasCaret, splitButton, disabled, expand, inlineTextInputVisible, hasInlineTextInput,
|
|
38103
|
+
const { name, active, icon, label, hideLabel, iconColor, hasCaret, splitButton, disabled, expand, inlineTextInputVisible, hasInlineTextInput, style, attributes } = props.toolbarItem;
|
|
38166
38104
|
const isSplit = require__plugin_vue_export_helper.computed(() => Boolean(splitButton?.value) && Boolean(hasCaret?.value));
|
|
38167
38105
|
const itemName = require__plugin_vue_export_helper.computed(() => name?.value ?? "");
|
|
38168
38106
|
const inlineTextInput = require__plugin_vue_export_helper.ref("");
|
|
@@ -38274,17 +38212,13 @@ var _sfc_main$19 = {
|
|
|
38274
38212
|
}
|
|
38275
38213
|
if (itemName.value === "fontSize") require__plugin_vue_export_helper.nextTick(focusEditorSurface);
|
|
38276
38214
|
};
|
|
38277
|
-
const getStyle = require__plugin_vue_export_helper.computed(() => {
|
|
38278
|
-
if (style.value) return style.value;
|
|
38279
|
-
return { minWidth: props.minWidth };
|
|
38280
|
-
});
|
|
38281
38215
|
const caretIcon = require__plugin_vue_export_helper.computed(() => {
|
|
38282
38216
|
return expand?.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
|
|
38283
38217
|
});
|
|
38284
38218
|
return (_ctx, _cache) => {
|
|
38285
38219
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
38286
38220
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-toolbar-item", require__plugin_vue_export_helper.unref(attributes).className]),
|
|
38287
|
-
style: require__plugin_vue_export_helper.normalizeStyle(
|
|
38221
|
+
style: require__plugin_vue_export_helper.normalizeStyle(require__plugin_vue_export_helper.unref(style)),
|
|
38288
38222
|
role: __props.isOverflowItem ? "menuitem" : "button",
|
|
38289
38223
|
"aria-label": require__plugin_vue_export_helper.unref(attributes).ariaLabel,
|
|
38290
38224
|
"aria-disabled": require__plugin_vue_export_helper.unref(disabled) ? "true" : void 0,
|
|
@@ -38388,8 +38322,10 @@ var _sfc_main$19 = {
|
|
|
38388
38322
|
], 10, _hoisted_2$11)], 46, _hoisted_1$15);
|
|
38389
38323
|
};
|
|
38390
38324
|
}
|
|
38391
|
-
};
|
|
38392
|
-
|
|
38325
|
+
});
|
|
38326
|
+
//#endregion
|
|
38327
|
+
//#region src/internal/toolbar/built-in/ToolbarButton.vue
|
|
38328
|
+
var ToolbarButton_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ToolbarButton_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-40889353"]]);
|
|
38393
38329
|
//#endregion
|
|
38394
38330
|
//#region src/internal/toolbar/built-in/ToolbarSeparator.vue
|
|
38395
38331
|
var _hoisted_1$14 = {
|
|
@@ -38397,7 +38333,7 @@ var _hoisted_1$14 = {
|
|
|
38397
38333
|
role: "separator",
|
|
38398
38334
|
"aria-label": "Toolbar separator"
|
|
38399
38335
|
};
|
|
38400
|
-
var _sfc_main$
|
|
38336
|
+
var _sfc_main$13 = {
|
|
38401
38337
|
__name: "ToolbarSeparator",
|
|
38402
38338
|
props: { active: {
|
|
38403
38339
|
type: Boolean,
|
|
@@ -38418,9 +38354,9 @@ var _sfc_main$18 = {
|
|
|
38418
38354
|
};
|
|
38419
38355
|
}
|
|
38420
38356
|
};
|
|
38421
|
-
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
38357
|
+
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$13, [["__scopeId", "data-v-cb82253a"]]);
|
|
38422
38358
|
//#endregion
|
|
38423
|
-
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
38359
|
+
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
38424
38360
|
var _hoisted_1$13 = { class: "toolbar-dropdown" };
|
|
38425
38361
|
var _hoisted_2$10 = ["data-superdoc-ui-owner"];
|
|
38426
38362
|
var _hoisted_3$9 = ["onClick"];
|
|
@@ -38430,7 +38366,7 @@ var _hoisted_4$7 = {
|
|
|
38430
38366
|
};
|
|
38431
38367
|
var _hoisted_5$5 = { class: "toolbar-dropdown-option__label" };
|
|
38432
38368
|
var TRIGGER_FOCUS_SELECTOR = "button, [href], input, select, textarea, [role=\"button\"], [tabindex]:not([tabindex=\"-1\"])";
|
|
38433
|
-
var
|
|
38369
|
+
var ToolbarDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38434
38370
|
__name: "ToolbarDropdown",
|
|
38435
38371
|
props: {
|
|
38436
38372
|
options: {
|
|
@@ -38587,7 +38523,7 @@ var _sfc_main$17 = {
|
|
|
38587
38523
|
if (!value) return false;
|
|
38588
38524
|
if (typeof value === "string") return value.split(/\s+/).includes("sd-selected");
|
|
38589
38525
|
if (Array.isArray(value)) return value.some(classHasSelected);
|
|
38590
|
-
if (typeof value === "object") return Boolean(value["sd-selected"]);
|
|
38526
|
+
if (typeof value === "object") return "sd-selected" in value && Boolean(value["sd-selected"]);
|
|
38591
38527
|
return false;
|
|
38592
38528
|
};
|
|
38593
38529
|
const isOptionSelected = (option) => {
|
|
@@ -38819,8 +38755,10 @@ var _sfc_main$17 = {
|
|
|
38819
38755
|
})], 8, ["to"]))]);
|
|
38820
38756
|
};
|
|
38821
38757
|
}
|
|
38822
|
-
};
|
|
38823
|
-
|
|
38758
|
+
});
|
|
38759
|
+
//#endregion
|
|
38760
|
+
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
38761
|
+
var ToolbarDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ToolbarDropdown_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-50758732"]]);
|
|
38824
38762
|
//#endregion
|
|
38825
38763
|
//#region src/internal/toolbar/built-in/toolbar-focus-helpers.js
|
|
38826
38764
|
var preventEditorFocusTransfer = (event) => {
|
|
@@ -38844,7 +38782,7 @@ var refocusEditorSurface = (superToolbar, preferredEditor = null) => {
|
|
|
38844
38782
|
};
|
|
38845
38783
|
//#endregion
|
|
38846
38784
|
//#region src/internal/toolbar/built-in/OverflowMenu.vue
|
|
38847
|
-
var _sfc_main$
|
|
38785
|
+
var _sfc_main$12 = {
|
|
38848
38786
|
__name: "OverflowMenu",
|
|
38849
38787
|
props: {
|
|
38850
38788
|
toolbarItem: {
|
|
@@ -38941,7 +38879,7 @@ var _sfc_main$16 = {
|
|
|
38941
38879
|
};
|
|
38942
38880
|
}
|
|
38943
38881
|
};
|
|
38944
|
-
var OverflowMenu_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
38882
|
+
var OverflowMenu_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$12, [["__scopeId", "data-v-1227fcf9"]]);
|
|
38945
38883
|
//#endregion
|
|
38946
38884
|
//#region src/internal/toolbar/built-in/font-typeahead.js
|
|
38947
38885
|
/**
|
|
@@ -39044,7 +38982,7 @@ var normalizeCustomFontSize = (value) => {
|
|
|
39044
38982
|
return String(Math.min(halfPoint, MAX_FONT_SIZE));
|
|
39045
38983
|
};
|
|
39046
38984
|
//#endregion
|
|
39047
|
-
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
38985
|
+
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue?vue&type=script&setup=true&lang.ts
|
|
39048
38986
|
var _hoisted_1$12 = ["data-item"];
|
|
39049
38987
|
var _hoisted_2$9 = [
|
|
39050
38988
|
"id",
|
|
@@ -39079,7 +39017,7 @@ var _hoisted_8$1 = {
|
|
|
39079
39017
|
class: "sd-button-label sd-font-combobox__legacy-label",
|
|
39080
39018
|
"aria-hidden": "true"
|
|
39081
39019
|
};
|
|
39082
|
-
var
|
|
39020
|
+
var ToolbarComboBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
39083
39021
|
__name: "ToolbarComboBox",
|
|
39084
39022
|
props: {
|
|
39085
39023
|
item: {
|
|
@@ -39565,11 +39503,13 @@ var _sfc_main$15 = {
|
|
|
39565
39503
|
], 14, _hoisted_1$12);
|
|
39566
39504
|
};
|
|
39567
39505
|
}
|
|
39568
|
-
};
|
|
39569
|
-
|
|
39506
|
+
});
|
|
39507
|
+
//#endregion
|
|
39508
|
+
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
39509
|
+
var ToolbarComboBox_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(ToolbarComboBox_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-e9143b7e"]]);
|
|
39570
39510
|
//#endregion
|
|
39571
39511
|
//#region src/internal/toolbar/built-in/FontFamilyCombobox.vue
|
|
39572
|
-
var _sfc_main$
|
|
39512
|
+
var _sfc_main$11 = {
|
|
39573
39513
|
__name: "FontFamilyCombobox",
|
|
39574
39514
|
props: {
|
|
39575
39515
|
item: {
|
|
@@ -39610,7 +39550,7 @@ var _sfc_main$14 = {
|
|
|
39610
39550
|
};
|
|
39611
39551
|
//#endregion
|
|
39612
39552
|
//#region src/internal/toolbar/built-in/FontSizeCombobox.vue
|
|
39613
|
-
var _sfc_main$
|
|
39553
|
+
var _sfc_main$10 = {
|
|
39614
39554
|
__name: "FontSizeCombobox",
|
|
39615
39555
|
props: {
|
|
39616
39556
|
item: {
|
|
@@ -39650,9 +39590,10 @@ var _sfc_main$13 = {
|
|
|
39650
39590
|
}
|
|
39651
39591
|
};
|
|
39652
39592
|
//#endregion
|
|
39653
|
-
//#region src/internal/toolbar/built-in/SdTooltip.vue
|
|
39593
|
+
//#region src/internal/toolbar/built-in/SdTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
39654
39594
|
var AUTO_HIDE_DELAY = 2500;
|
|
39655
|
-
var
|
|
39595
|
+
var SdTooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
39596
|
+
inheritAttrs: false,
|
|
39656
39597
|
__name: "SdTooltip",
|
|
39657
39598
|
props: {
|
|
39658
39599
|
trigger: {
|
|
@@ -39867,7 +39808,9 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
39867
39808
|
};
|
|
39868
39809
|
}
|
|
39869
39810
|
});
|
|
39870
|
-
|
|
39811
|
+
//#endregion
|
|
39812
|
+
//#region src/internal/toolbar/built-in/SdTooltip.vue
|
|
39813
|
+
var SdTooltip_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(SdTooltip_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-dfd6f1d1"]]);
|
|
39871
39814
|
//#endregion
|
|
39872
39815
|
//#region src/internal/toolbar/built-in/ButtonGroup.vue
|
|
39873
39816
|
var _hoisted_1$11 = [
|
|
@@ -39880,7 +39823,7 @@ var _hoisted_3$7 = { key: 0 };
|
|
|
39880
39823
|
var _hoisted_4$5 = { key: 0 };
|
|
39881
39824
|
var _hoisted_5$3 = { key: 0 };
|
|
39882
39825
|
var _hoisted_6$2 = { key: 0 };
|
|
39883
|
-
var _sfc_main$
|
|
39826
|
+
var _sfc_main$9 = {
|
|
39884
39827
|
__name: "ButtonGroup",
|
|
39885
39828
|
props: {
|
|
39886
39829
|
toolbarItems: {
|
|
@@ -40255,7 +40198,7 @@ var _sfc_main$11 = {
|
|
|
40255
40198
|
disabled: !item.tooltip?.value,
|
|
40256
40199
|
"content-style": { fontFamily: props.uiFontFamily }
|
|
40257
40200
|
}, {
|
|
40258
|
-
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$
|
|
40201
|
+
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$11, {
|
|
40259
40202
|
item,
|
|
40260
40203
|
"ui-font-family": props.uiFontFamily,
|
|
40261
40204
|
class: "sd-toolbar-button sd-editor-toolbar-dropdown",
|
|
@@ -40272,7 +40215,7 @@ var _sfc_main$11 = {
|
|
|
40272
40215
|
disabled: !item.tooltip?.value,
|
|
40273
40216
|
"content-style": { fontFamily: props.uiFontFamily }
|
|
40274
40217
|
}, {
|
|
40275
|
-
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$
|
|
40218
|
+
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$10, {
|
|
40276
40219
|
item,
|
|
40277
40220
|
"ui-font-family": props.uiFontFamily,
|
|
40278
40221
|
class: "sd-toolbar-button sd-editor-toolbar-dropdown",
|
|
@@ -40371,7 +40314,7 @@ var _sfc_main$11 = {
|
|
|
40371
40314
|
};
|
|
40372
40315
|
}
|
|
40373
40316
|
};
|
|
40374
|
-
var ButtonGroup_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
40317
|
+
var ButtonGroup_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$9, [["__scopeId", "data-v-fb216897"]]);
|
|
40375
40318
|
var TOOLBAR_FONTS = [
|
|
40376
40319
|
["Arial", "sans-serif"],
|
|
40377
40320
|
["Arial Black", "sans-serif"],
|
|
@@ -40778,7 +40721,6 @@ var useToolbarItem = (options) => {
|
|
|
40778
40721
|
const style = require__plugin_vue_export_helper.ref(options.style);
|
|
40779
40722
|
const isNarrow = require__plugin_vue_export_helper.ref(options.isNarrow);
|
|
40780
40723
|
const isWide = require__plugin_vue_export_helper.ref(options.isWide);
|
|
40781
|
-
const minWidth = require__plugin_vue_export_helper.ref(options.minWidth);
|
|
40782
40724
|
const layoutWidth = require__plugin_vue_export_helper.ref(options.layoutWidth);
|
|
40783
40725
|
const suppressActiveHighlight = require__plugin_vue_export_helper.ref(options.suppressActiveHighlight || false);
|
|
40784
40726
|
const argument = require__plugin_vue_export_helper.ref(options.argument);
|
|
@@ -40855,7 +40797,6 @@ var useToolbarItem = (options) => {
|
|
|
40855
40797
|
style,
|
|
40856
40798
|
isNarrow,
|
|
40857
40799
|
isWide,
|
|
40858
|
-
minWidth,
|
|
40859
40800
|
layoutWidth,
|
|
40860
40801
|
argument,
|
|
40861
40802
|
parentItem,
|
|
@@ -40996,7 +40937,7 @@ var _hoisted_1$8 = [
|
|
|
40996
40937
|
"aria-label",
|
|
40997
40938
|
"onKeydown"
|
|
40998
40939
|
];
|
|
40999
|
-
var _sfc_main$
|
|
40940
|
+
var _sfc_main$6 = {
|
|
41000
40941
|
__name: "StyleButtonsList",
|
|
41001
40942
|
props: {
|
|
41002
40943
|
buttons: {
|
|
@@ -41081,7 +41022,7 @@ var _sfc_main$8 = {
|
|
|
41081
41022
|
};
|
|
41082
41023
|
}
|
|
41083
41024
|
};
|
|
41084
|
-
var StyleButtonsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41025
|
+
var StyleButtonsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$6, [["__scopeId", "data-v-44f37ff6"]]);
|
|
41085
41026
|
//#endregion
|
|
41086
41027
|
//#region src/internal/toolbar/built-in/list-style-buttons.js
|
|
41087
41028
|
var bulletStyleButtons = [
|
|
@@ -41151,7 +41092,7 @@ var _hoisted_3$6 = ["innerHTML"];
|
|
|
41151
41092
|
var _hoisted_4$4 = { class: "document-mode-column text-column" };
|
|
41152
41093
|
var _hoisted_5$2 = { class: "document-mode-type" };
|
|
41153
41094
|
var _hoisted_6$1 = { class: "document-mode-description" };
|
|
41154
|
-
var _sfc_main$
|
|
41095
|
+
var _sfc_main$5 = {
|
|
41155
41096
|
__name: "DocumentMode",
|
|
41156
41097
|
props: { options: { type: Array } },
|
|
41157
41098
|
emits: ["select"],
|
|
@@ -41216,9 +41157,9 @@ var _sfc_main$7 = {
|
|
|
41216
41157
|
};
|
|
41217
41158
|
}
|
|
41218
41159
|
};
|
|
41219
|
-
var DocumentMode_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41160
|
+
var DocumentMode_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$5, [["__scopeId", "data-v-bee14d7a"]]);
|
|
41220
41161
|
//#endregion
|
|
41221
|
-
//#region src/internal/toolbar/built-in/LinkedStyle.vue
|
|
41162
|
+
//#region src/internal/toolbar/built-in/LinkedStyle.vue?vue&type=script&setup=true&lang.ts
|
|
41222
41163
|
var _hoisted_1$6 = {
|
|
41223
41164
|
class: "linked-style-buttons",
|
|
41224
41165
|
"data-editor-ui-surface": ""
|
|
@@ -41248,7 +41189,7 @@ var _hoisted_4$3 = ["innerHTML"];
|
|
|
41248
41189
|
* (`data-item="btn-linkedStyles-option"`, keyboard navigation) and makes no
|
|
41249
41190
|
* v1-only shape assumptions.
|
|
41250
41191
|
*/
|
|
41251
|
-
var
|
|
41192
|
+
var LinkedStyle_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
41252
41193
|
__name: "LinkedStyle",
|
|
41253
41194
|
props: {
|
|
41254
41195
|
styles: {
|
|
@@ -41349,8 +41290,10 @@ var _sfc_main$6 = {
|
|
|
41349
41290
|
}), 128))]);
|
|
41350
41291
|
};
|
|
41351
41292
|
}
|
|
41352
|
-
};
|
|
41353
|
-
|
|
41293
|
+
});
|
|
41294
|
+
//#endregion
|
|
41295
|
+
//#region src/internal/toolbar/built-in/LinkedStyle.vue
|
|
41296
|
+
var LinkedStyle_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(LinkedStyle_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-4e36f956"]]);
|
|
41354
41297
|
//#endregion
|
|
41355
41298
|
//#region src/internal/toolbar/built-in/AIWriter.vue
|
|
41356
41299
|
var _hoisted_1$5 = ["placeholder"];
|
|
@@ -41363,7 +41306,7 @@ var _hoisted_3$4 = {
|
|
|
41363
41306
|
var _hoisted_4$2 = ["disabled"];
|
|
41364
41307
|
var DEFAULT_AI_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
41365
41308
|
var SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. Only write what is asked for.";
|
|
41366
|
-
var _sfc_main$
|
|
41309
|
+
var _sfc_main$4 = {
|
|
41367
41310
|
__name: "AIWriter",
|
|
41368
41311
|
props: {
|
|
41369
41312
|
selectedText: {
|
|
@@ -41521,7 +41464,7 @@ var _sfc_main$5 = {
|
|
|
41521
41464
|
};
|
|
41522
41465
|
}
|
|
41523
41466
|
};
|
|
41524
|
-
var AIWriter_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41467
|
+
var AIWriter_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$4, [["__scopeId", "data-v-67f6c6f7"]]);
|
|
41525
41468
|
//#endregion
|
|
41526
41469
|
//#region src/internal/toolbar/built-in/IconGridRow.vue
|
|
41527
41470
|
var _hoisted_1$4 = [
|
|
@@ -41532,7 +41475,7 @@ var _hoisted_1$4 = [
|
|
|
41532
41475
|
var _hoisted_2$4 = ["innerHTML"];
|
|
41533
41476
|
var _hoisted_3$3 = ["innerHTML"];
|
|
41534
41477
|
var ROW_SIZE$1 = 7;
|
|
41535
|
-
var _sfc_main$
|
|
41478
|
+
var _sfc_main$3 = {
|
|
41536
41479
|
__name: "IconGridRow",
|
|
41537
41480
|
props: {
|
|
41538
41481
|
icons: {
|
|
@@ -41659,7 +41602,7 @@ var _sfc_main$4 = {
|
|
|
41659
41602
|
};
|
|
41660
41603
|
}
|
|
41661
41604
|
};
|
|
41662
|
-
var IconGridRow_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41605
|
+
var IconGridRow_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$3, [["__scopeId", "data-v-05eb02fc"]]);
|
|
41663
41606
|
//#endregion
|
|
41664
41607
|
//#region ../../shared/common/icons/droplet-slash.svg?raw
|
|
41665
41608
|
var droplet_slash_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 640 512\"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d=\"M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z\"/></svg>\n";
|
|
@@ -41668,7 +41611,7 @@ var droplet_slash_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\
|
|
|
41668
41611
|
var _hoisted_1$3 = { class: "options-grid-wrap" };
|
|
41669
41612
|
var _hoisted_2$3 = ["innerHTML"];
|
|
41670
41613
|
var _hoisted_3$2 = { class: "option-grid-ctn" };
|
|
41671
|
-
var _sfc_main$
|
|
41614
|
+
var _sfc_main$2 = {
|
|
41672
41615
|
__name: "IconGrid",
|
|
41673
41616
|
props: {
|
|
41674
41617
|
icons: {
|
|
@@ -41716,7 +41659,7 @@ var _sfc_main$3 = {
|
|
|
41716
41659
|
};
|
|
41717
41660
|
}
|
|
41718
41661
|
};
|
|
41719
|
-
var IconGrid_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41662
|
+
var IconGrid_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$2, [["__scopeId", "data-v-52b0283a"]]);
|
|
41720
41663
|
//#endregion
|
|
41721
41664
|
//#region src/internal/toolbar/built-in/color-dropdown-helpers.js
|
|
41722
41665
|
var closeDropdown$1 = (dropdown) => {
|
|
@@ -41962,7 +41905,7 @@ var _hoisted_2$1 = [
|
|
|
41962
41905
|
var _hoisted_3$1 = { class: "toolbar-table-actions__icon" };
|
|
41963
41906
|
var _hoisted_4$1 = ["innerHTML"];
|
|
41964
41907
|
var _hoisted_5$1 = { class: "toolbar-table-actions__label" };
|
|
41965
|
-
var _sfc_main
|
|
41908
|
+
var _sfc_main = {
|
|
41966
41909
|
__name: "TableActions",
|
|
41967
41910
|
props: { options: { type: Array } },
|
|
41968
41911
|
emits: ["select"],
|
|
@@ -41992,9 +41935,9 @@ var _sfc_main$1 = {
|
|
|
41992
41935
|
};
|
|
41993
41936
|
}
|
|
41994
41937
|
};
|
|
41995
|
-
var TableActions_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main
|
|
41938
|
+
var TableActions_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main, [["__scopeId", "data-v-72123aae"]]);
|
|
41996
41939
|
//#endregion
|
|
41997
|
-
//#region src/internal/toolbar/built-in/PageNumberMenu.vue
|
|
41940
|
+
//#region src/internal/toolbar/built-in/PageNumberMenu.vue?vue&type=script&setup=true&lang.ts
|
|
41998
41941
|
var _hoisted_1 = ["aria-busy"];
|
|
41999
41942
|
var _hoisted_2 = ["aria-disabled"];
|
|
42000
41943
|
var _hoisted_3 = {
|
|
@@ -42042,7 +41985,7 @@ var _hoisted_20 = ["disabled"];
|
|
|
42042
41985
|
var _hoisted_21 = ["disabled"];
|
|
42043
41986
|
var _hoisted_22 = ["disabled"];
|
|
42044
41987
|
var _hoisted_23 = { class: "sd-page-number-menu__cursor-text" };
|
|
42045
|
-
var
|
|
41988
|
+
var PageNumberMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
42046
41989
|
__name: "PageNumberMenu",
|
|
42047
41990
|
props: {
|
|
42048
41991
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
@@ -42171,7 +42114,7 @@ var _sfc_main = {
|
|
|
42171
42114
|
const { isHighContrastMode } = useHighContrastMode();
|
|
42172
42115
|
const remembered = props.initialChoice ?? {};
|
|
42173
42116
|
const position = require__plugin_vue_export_helper.ref(remembered.position === "top" ? "top" : "bottom");
|
|
42174
|
-
const alignment = require__plugin_vue_export_helper.ref(
|
|
42117
|
+
const alignment = require__plugin_vue_export_helper.ref(isAlignment(remembered.alignment) ? remembered.alignment : "right");
|
|
42175
42118
|
const showOnFirstPage = require__plugin_vue_export_helper.ref(remembered.showOnFirstPage !== false);
|
|
42176
42119
|
const format = require__plugin_vue_export_helper.ref("decimal");
|
|
42177
42120
|
const restart = require__plugin_vue_export_helper.ref(false);
|
|
@@ -42206,6 +42149,9 @@ var _sfc_main = {
|
|
|
42206
42149
|
const platform = typeof navigator === "undefined" ? "" : navigator.platform || navigator.userAgent || "";
|
|
42207
42150
|
return /Mac|iPhone|iPad/i.test(platform) ? "⌥⇧⌘P" : "Ctrl+Alt+Shift+P";
|
|
42208
42151
|
});
|
|
42152
|
+
function isAlignment(value) {
|
|
42153
|
+
return ALIGNMENTS.some((entry) => entry.value === value);
|
|
42154
|
+
}
|
|
42209
42155
|
function isTileSelected(tile) {
|
|
42210
42156
|
return tile.position === position.value && tile.alignment === alignment.value;
|
|
42211
42157
|
}
|
|
@@ -42275,8 +42221,12 @@ var _sfc_main = {
|
|
|
42275
42221
|
const value = Math.floor(Number(startAt.value));
|
|
42276
42222
|
return Number.isFinite(value) && value >= 0 ? value : 1;
|
|
42277
42223
|
}
|
|
42224
|
+
function failureDetails(result) {
|
|
42225
|
+
if (typeof result !== "object" || result === null || result.success) return null;
|
|
42226
|
+
return require_create_super_doc_ui.isPlainObject(result.failure?.details) ? result.failure.details : null;
|
|
42227
|
+
}
|
|
42278
42228
|
function failureMessage(result, action) {
|
|
42279
|
-
const details = result
|
|
42229
|
+
const details = failureDetails(result);
|
|
42280
42230
|
if (details?.reason === "page-number-has-content") return `A page number shares its line with other text. Edit the ${details.kind === "header" ? "header" : "footer"} directly to change it.`;
|
|
42281
42231
|
if (details?.reason === "page-number-exists") return "This section already has page numbers.";
|
|
42282
42232
|
if (action === "remove") return "Page numbers couldn’t be removed. Try again.";
|
|
@@ -42294,7 +42244,7 @@ var _sfc_main = {
|
|
|
42294
42244
|
await loaded;
|
|
42295
42245
|
const { execute, outcome } = prepare();
|
|
42296
42246
|
const result = await execute();
|
|
42297
|
-
if (result === true || result
|
|
42247
|
+
if (result === true || typeof result === "object" && result !== null && result.success === true) {
|
|
42298
42248
|
props.close(outcome);
|
|
42299
42249
|
return;
|
|
42300
42250
|
}
|
|
@@ -42344,8 +42294,9 @@ var _sfc_main = {
|
|
|
42344
42294
|
}
|
|
42345
42295
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
42346
42296
|
require__plugin_vue_export_helper.nextTick(() => tileRefs.value[focusIndex.value]?.focus({ preventScroll: true }));
|
|
42347
|
-
|
|
42348
|
-
|
|
42297
|
+
const loadCurrent = props.loadCurrent;
|
|
42298
|
+
if (typeof loadCurrent !== "function") return;
|
|
42299
|
+
loaded = Promise.resolve().then(() => loadCurrent()).then(adoptCurrent, () => adoptCurrent(null)).finally(() => {
|
|
42349
42300
|
loading.value = false;
|
|
42350
42301
|
});
|
|
42351
42302
|
});
|
|
@@ -42384,7 +42335,7 @@ var _sfc_main = {
|
|
|
42384
42335
|
onClick: ($event) => selectTile(tile),
|
|
42385
42336
|
onDblclick: applyPageNumbers,
|
|
42386
42337
|
onKeydown: onTileKeydown
|
|
42387
|
-
}, [(require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("svg", _hoisted_5, [_cache[4] || (_cache[4] = require__plugin_vue_export_helper.createStaticVNode("<rect class=\"sd-page-number-menu__sheet\" x=\"0.75\" y=\"0.75\" width=\"34.5\" height=\"44.5\" rx=\"2.5\" data-v-
|
|
42338
|
+
}, [(require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("svg", _hoisted_5, [_cache[4] || (_cache[4] = require__plugin_vue_export_helper.createStaticVNode("<rect class=\"sd-page-number-menu__sheet\" x=\"0.75\" y=\"0.75\" width=\"34.5\" height=\"44.5\" rx=\"2.5\" data-v-a6c124c0></rect><rect class=\"sd-page-number-menu__line\" x=\"7\" y=\"14\" width=\"22\" height=\"2\" rx=\"1\" data-v-a6c124c0></rect><rect class=\"sd-page-number-menu__line\" x=\"7\" y=\"19\" width=\"18\" height=\"2\" rx=\"1\" data-v-a6c124c0></rect><rect class=\"sd-page-number-menu__line\" x=\"7\" y=\"24\" width=\"22\" height=\"2\" rx=\"1\" data-v-a6c124c0></rect><rect class=\"sd-page-number-menu__line\" x=\"7\" y=\"29\" width=\"14\" height=\"2\" rx=\"1\" data-v-a6c124c0></rect>", 5)), require__plugin_vue_export_helper.createElementVNode("rect", {
|
|
42388
42339
|
class: "sd-page-number-menu__chip",
|
|
42389
42340
|
x: CHIP_X[tile.alignment],
|
|
42390
42341
|
y: CHIP_Y[tile.position],
|
|
@@ -42464,8 +42415,10 @@ var _sfc_main = {
|
|
|
42464
42415
|
], 10, _hoisted_1);
|
|
42465
42416
|
};
|
|
42466
42417
|
}
|
|
42467
|
-
};
|
|
42468
|
-
|
|
42418
|
+
});
|
|
42419
|
+
//#endregion
|
|
42420
|
+
//#region src/internal/toolbar/built-in/PageNumberMenu.vue
|
|
42421
|
+
var PageNumberMenu_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(PageNumberMenu_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-a6c124c0"]]);
|
|
42469
42422
|
//#endregion
|
|
42470
42423
|
//#region src/internal/toolbar/built-in/page-number-feedback.js
|
|
42471
42424
|
var FLASH_CLASS = "sd-page-number-flash";
|
|
@@ -45298,7 +45251,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45298
45251
|
}
|
|
45299
45252
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45300
45253
|
this.colorIndex = 0;
|
|
45301
|
-
this.version = "2.
|
|
45254
|
+
this.version = "2.29.0-next.2";
|
|
45302
45255
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45303
45256
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45304
45257
|
this.colors = this.config.colors ?? [];
|
|
@@ -46682,7 +46635,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46682
46635
|
const getValues = storeComment?.getValues;
|
|
46683
46636
|
resolvedComment = typeof getValues === "function" ? getValues.call(storeComment) : storeComment;
|
|
46684
46637
|
}
|
|
46685
|
-
return isAllowed(permission, role, isInternal, {
|
|
46638
|
+
return require_create_super_doc_ui.isAllowed(permission, role, isInternal, {
|
|
46686
46639
|
superdoc: this,
|
|
46687
46640
|
currentUser: this.config.user,
|
|
46688
46641
|
comment: resolvedComment ?? null,
|
|
@@ -47090,7 +47043,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47090
47043
|
* superdoc.setZoom(50); // Set zoom to 50%
|
|
47091
47044
|
*/
|
|
47092
47045
|
setZoom(percent) {
|
|
47093
|
-
if (
|
|
47046
|
+
if (!require_is_finite_number.isFiniteNumber(percent) || percent <= 0) {
|
|
47094
47047
|
console.warn("[SuperDoc] setZoom expects a positive number representing percentage");
|
|
47095
47048
|
return;
|
|
47096
47049
|
}
|