superdoc 2.28.0 → 2.29.0-next.1
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-0OA8hCNb.cjs} +201 -23
- package/dist/chunks/{create-super-doc-ui-BbjHD1ul.es.js → create-super-doc-ui-Duf65d0b.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/index.d.ts +1 -1
- package/dist/document-api/src/lists/lists.d.ts +79 -79
- package/dist/document-api/src/write/write.d.ts +10 -9
- 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 +1670 -24
- package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +2 -2
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +2 -2
- package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +21 -8
- package/dist/superdoc/src/components/general/Avatar.vue.d.ts +7 -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 +1 -0
- 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 +319 -401
- package/dist/superdoc.es.js +247 -330
- 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-0OA8hCNb.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.1";
|
|
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
|
|
@@ -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 _sfc_main$
|
|
11105
|
+
var _sfc_main$25 = {
|
|
11084
11106
|
__name: "CommentsDropdown",
|
|
11085
11107
|
props: {
|
|
11086
11108
|
options: {
|
|
@@ -11230,14 +11252,14 @@ var _sfc_main$38 = {
|
|
|
11230
11252
|
};
|
|
11231
11253
|
}
|
|
11232
11254
|
};
|
|
11233
|
-
var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
11255
|
+
var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$25, [["__scopeId", "data-v-7eced80a"]]);
|
|
11234
11256
|
//#endregion
|
|
11235
11257
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
11236
11258
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
11237
11259
|
var _hoisted_2$23 = ["innerHTML"];
|
|
11238
11260
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
11239
11261
|
var _hoisted_4$14 = ["innerHTML"];
|
|
11240
|
-
var _sfc_main$
|
|
11262
|
+
var _sfc_main$24 = {
|
|
11241
11263
|
__name: "InternalDropdown",
|
|
11242
11264
|
props: {
|
|
11243
11265
|
state: {
|
|
@@ -11320,7 +11342,7 @@ var _sfc_main$37 = {
|
|
|
11320
11342
|
};
|
|
11321
11343
|
}
|
|
11322
11344
|
};
|
|
11323
|
-
var InternalDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
11345
|
+
var InternalDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$24, [["__scopeId", "data-v-138d641e"]]);
|
|
11324
11346
|
//#endregion
|
|
11325
11347
|
//#region src/components/CommentsLayer/helpers.js
|
|
11326
11348
|
/**
|
|
@@ -11353,122 +11375,6 @@ function formatDate(timestamp) {
|
|
|
11353
11375
|
return `${`${formattedHours}:${minutes.toString().padStart(2, "0")}${meridiem}`} ${month} ${day}`;
|
|
11354
11376
|
}
|
|
11355
11377
|
//#endregion
|
|
11356
|
-
//#region src/core/collaboration/permissions.js
|
|
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
11378
|
//#region src/components/general/Avatar.vue
|
|
11473
11379
|
var _hoisted_1$29 = { class: "user-container" };
|
|
11474
11380
|
var _hoisted_2$22 = ["src"];
|
|
@@ -11476,7 +11382,7 @@ var _hoisted_3$19 = {
|
|
|
11476
11382
|
key: 1,
|
|
11477
11383
|
class: "user-bg"
|
|
11478
11384
|
};
|
|
11479
|
-
var _sfc_main$
|
|
11385
|
+
var _sfc_main$23 = {
|
|
11480
11386
|
__name: "Avatar",
|
|
11481
11387
|
props: { user: {
|
|
11482
11388
|
type: Object,
|
|
@@ -11501,7 +11407,7 @@ var _sfc_main$36 = {
|
|
|
11501
11407
|
};
|
|
11502
11408
|
}
|
|
11503
11409
|
};
|
|
11504
|
-
var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
11410
|
+
var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$23, [["__scopeId", "data-v-c95b2073"]]);
|
|
11505
11411
|
//#endregion
|
|
11506
11412
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
11507
11413
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
@@ -11533,7 +11439,7 @@ var _hoisted_9$4 = [
|
|
|
11533
11439
|
];
|
|
11534
11440
|
var _hoisted_10$4 = { class: "overflow-menu__icon" };
|
|
11535
11441
|
var _hoisted_11$4 = ["innerHTML"];
|
|
11536
|
-
var _sfc_main$
|
|
11442
|
+
var _sfc_main$22 = {
|
|
11537
11443
|
__name: "CommentHeader",
|
|
11538
11444
|
props: {
|
|
11539
11445
|
timestamp: {
|
|
@@ -11654,11 +11560,12 @@ var _sfc_main$35 = {
|
|
|
11654
11560
|
if (props.isPendingInput) return false;
|
|
11655
11561
|
return true;
|
|
11656
11562
|
});
|
|
11563
|
+
const resolveIsDisabled = () => props.config.allowResolve === false;
|
|
11657
11564
|
const allowResolve = require__plugin_vue_export_helper.computed(() => {
|
|
11658
11565
|
if (!generallyAllowed.value) return false;
|
|
11659
11566
|
if (props.comment.trackedChange) {
|
|
11660
11567
|
if (!trackedChangeDecisionsVisible.value) return false;
|
|
11661
|
-
} else if (!commentMutationsVisible.value ||
|
|
11568
|
+
} else if (!commentMutationsVisible.value || resolveIsDisabled()) return false;
|
|
11662
11569
|
if (props.comment.parentCommentId) return false;
|
|
11663
11570
|
if (trackedChangeThreadParentId.value) return false;
|
|
11664
11571
|
const context = {
|
|
@@ -11666,8 +11573,8 @@ var _sfc_main$35 = {
|
|
|
11666
11573
|
currentUser: proxy.$superdoc.config.user,
|
|
11667
11574
|
superdoc: proxy.$superdoc
|
|
11668
11575
|
};
|
|
11669
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11670
|
-
return isAllowed(PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11576
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11577
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11671
11578
|
});
|
|
11672
11579
|
const allowReject = require__plugin_vue_export_helper.computed(() => {
|
|
11673
11580
|
if (!generallyAllowed.value) return false;
|
|
@@ -11678,12 +11585,12 @@ var _sfc_main$35 = {
|
|
|
11678
11585
|
currentUser: proxy.$superdoc.config.user,
|
|
11679
11586
|
superdoc: proxy.$superdoc
|
|
11680
11587
|
};
|
|
11681
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.REJECT_OWN, role, isInternal, context);
|
|
11682
|
-
return isAllowed(PERMISSIONS.REJECT_OTHER, role, isInternal, context);
|
|
11588
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.REJECT_OWN, role, isInternal, context);
|
|
11589
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.REJECT_OTHER, role, isInternal, context);
|
|
11683
11590
|
});
|
|
11684
11591
|
const allowReopen = require__plugin_vue_export_helper.computed(() => {
|
|
11685
11592
|
if (!commentMutationsVisible.value) return false;
|
|
11686
|
-
if (
|
|
11593
|
+
if (resolveIsDisabled()) return false;
|
|
11687
11594
|
if (!props.reopenSupported) return false;
|
|
11688
11595
|
if (!props.comment) return false;
|
|
11689
11596
|
if (!props.comment.resolvedTime) return false;
|
|
@@ -11697,8 +11604,8 @@ var _sfc_main$35 = {
|
|
|
11697
11604
|
currentUser: proxy.$superdoc.config.user,
|
|
11698
11605
|
superdoc: proxy.$superdoc
|
|
11699
11606
|
};
|
|
11700
|
-
if (isOwnComment.value) return isAllowed(PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11701
|
-
return isAllowed(PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11607
|
+
if (isOwnComment.value) return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OWN, role, isInternal, context);
|
|
11608
|
+
return require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.RESOLVE_OTHER, role, isInternal, context);
|
|
11702
11609
|
});
|
|
11703
11610
|
const allowOverflow = require__plugin_vue_export_helper.computed(() => {
|
|
11704
11611
|
if (!generallyAllowed.value) return false;
|
|
@@ -11720,15 +11627,15 @@ var _sfc_main$35 = {
|
|
|
11720
11627
|
currentUser: proxy.$superdoc.config.user,
|
|
11721
11628
|
superdoc: proxy.$superdoc
|
|
11722
11629
|
};
|
|
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");
|
|
11630
|
+
if (isOwnComment && require_create_super_doc_ui.isAllowed(require_create_super_doc_ui.PERMISSIONS.COMMENTS_DELETE_OWN, role, isInternal, context)) options.add("delete");
|
|
11631
|
+
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
11632
|
options.forEach((option) => allowedOptions.push(OVERFLOW_OPTIONS[option]));
|
|
11726
11633
|
return allowedOptions;
|
|
11727
11634
|
});
|
|
11728
11635
|
const handleResolve = () => {
|
|
11729
11636
|
if (props.comment?.trackedChange) {
|
|
11730
11637
|
if (!trackedChangeDecisionsVisible.value) return;
|
|
11731
|
-
} else if (!commentMutationsVisible.value ||
|
|
11638
|
+
} else if (!commentMutationsVisible.value || resolveIsDisabled()) return;
|
|
11732
11639
|
if (props.resolveDisabledReason) return;
|
|
11733
11640
|
emit("resolve");
|
|
11734
11641
|
};
|
|
@@ -11738,7 +11645,7 @@ var _sfc_main$35 = {
|
|
|
11738
11645
|
emit("reject");
|
|
11739
11646
|
};
|
|
11740
11647
|
const handleReopen = () => {
|
|
11741
|
-
if (!commentMutationsVisible.value ||
|
|
11648
|
+
if (!commentMutationsVisible.value || resolveIsDisabled()) return;
|
|
11742
11649
|
if (props.reopenDisabledReason) return;
|
|
11743
11650
|
emit("reopen");
|
|
11744
11651
|
};
|
|
@@ -11813,7 +11720,7 @@ var _sfc_main$35 = {
|
|
|
11813
11720
|
};
|
|
11814
11721
|
}
|
|
11815
11722
|
};
|
|
11816
|
-
var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
11723
|
+
var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$22, [["__scopeId", "data-v-3af1135b"]]);
|
|
11817
11724
|
//#endregion
|
|
11818
11725
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
11819
11726
|
var _hoisted_1$27 = { class: "input-section" };
|
|
@@ -11835,7 +11742,7 @@ var _hoisted_6$7 = {
|
|
|
11835
11742
|
class: "comment-mention-option__email"
|
|
11836
11743
|
};
|
|
11837
11744
|
var commentInputSequence = 0;
|
|
11838
|
-
var _sfc_main$
|
|
11745
|
+
var _sfc_main$21 = {
|
|
11839
11746
|
__name: "CommentInput",
|
|
11840
11747
|
props: {
|
|
11841
11748
|
users: {
|
|
@@ -12034,7 +11941,7 @@ var _sfc_main$34 = {
|
|
|
12034
11941
|
};
|
|
12035
11942
|
}
|
|
12036
11943
|
};
|
|
12037
|
-
var CommentInput_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
11944
|
+
var CommentInput_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$21, [["__scopeId", "data-v-0720a671"]]);
|
|
12038
11945
|
//#endregion
|
|
12039
11946
|
//#region src/internal/toolbar/built-in/url-safety.js
|
|
12040
11947
|
/**
|
|
@@ -12144,7 +12051,7 @@ function renderCommentHtml(value) {
|
|
|
12144
12051
|
return template.innerHTML;
|
|
12145
12052
|
}
|
|
12146
12053
|
//#endregion
|
|
12147
|
-
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
12054
|
+
//#region src/components/CommentsLayer/CommentDialog.vue?vue&type=script&setup=true&lang.ts
|
|
12148
12055
|
var _hoisted_1$26 = [
|
|
12149
12056
|
"aria-label",
|
|
12150
12057
|
"data-comment-instance-id",
|
|
@@ -12233,34 +12140,33 @@ var _hoisted_42 = {
|
|
|
12233
12140
|
};
|
|
12234
12141
|
var _hoisted_43 = { class: "reply-input-wrapper" };
|
|
12235
12142
|
var _hoisted_44 = { class: "reply-actions" };
|
|
12236
|
-
var _hoisted_45 = [
|
|
12237
|
-
var _hoisted_46 = [
|
|
12143
|
+
var _hoisted_45 = [
|
|
12238
12144
|
"onClick",
|
|
12239
12145
|
"disabled",
|
|
12240
12146
|
"data-disabled-reason"
|
|
12241
12147
|
];
|
|
12242
|
-
var
|
|
12243
|
-
var
|
|
12148
|
+
var _hoisted_46 = { class: "collapsed-avatars" };
|
|
12149
|
+
var _hoisted_47 = {
|
|
12244
12150
|
key: 3,
|
|
12245
12151
|
class: "comment-separator"
|
|
12246
12152
|
};
|
|
12247
|
-
var
|
|
12153
|
+
var _hoisted_48 = {
|
|
12248
12154
|
key: 3,
|
|
12249
12155
|
class: "tracked-change-decision-alert",
|
|
12250
12156
|
role: "alert"
|
|
12251
12157
|
};
|
|
12252
|
-
var
|
|
12253
|
-
var
|
|
12254
|
-
var
|
|
12158
|
+
var _hoisted_49 = { class: "tracked-change-decision-alert__message" };
|
|
12159
|
+
var _hoisted_50 = ["disabled", "data-disabled-reason"];
|
|
12160
|
+
var _hoisted_51 = {
|
|
12255
12161
|
key: 1,
|
|
12256
12162
|
class: "reply-expanded"
|
|
12257
12163
|
};
|
|
12258
|
-
var
|
|
12259
|
-
var
|
|
12260
|
-
var
|
|
12164
|
+
var _hoisted_52 = { class: "reply-input-wrapper" };
|
|
12165
|
+
var _hoisted_53 = { class: "reply-actions" };
|
|
12166
|
+
var _hoisted_54 = ["disabled", "data-disabled-reason"];
|
|
12261
12167
|
var commentEditSessions = /* @__PURE__ */ new WeakMap();
|
|
12262
12168
|
var commentReplySessions = /* @__PURE__ */ new WeakMap();
|
|
12263
|
-
var
|
|
12169
|
+
var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
12264
12170
|
__name: "CommentDialog",
|
|
12265
12171
|
props: {
|
|
12266
12172
|
comment: {
|
|
@@ -12305,9 +12211,10 @@ var _sfc_main$33 = {
|
|
|
12305
12211
|
setup(__props, { emit: __emit }) {
|
|
12306
12212
|
const emit = __emit;
|
|
12307
12213
|
const props = __props;
|
|
12308
|
-
const
|
|
12214
|
+
const proxy = useSuperDocInstance().proxy;
|
|
12309
12215
|
const superdocStore = useSuperdocStore();
|
|
12310
|
-
const
|
|
12216
|
+
const piniaCommentsStore = useCommentsStore();
|
|
12217
|
+
const commentsStore = piniaCommentsStore;
|
|
12311
12218
|
const editSessionOwner = {};
|
|
12312
12219
|
const replySessionOwner = {};
|
|
12313
12220
|
const retireOwnEditSession = () => {
|
|
@@ -12317,7 +12224,7 @@ var _sfc_main$33 = {
|
|
|
12317
12224
|
if (commentReplySessions.get(commentsStore)?.owner === replySessionOwner) commentReplySessions.delete(commentsStore);
|
|
12318
12225
|
};
|
|
12319
12226
|
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(
|
|
12227
|
+
const { suppressInternalExternal, getConfig, activeComment, activeFloatingCommentInstanceId, floatingCommentsOffset, pendingComment, currentCommentText, currentCommentMentions, isDebugging, editingCommentId, editorCommentPositions, isCommentHighlighted } = storeToRefs(piniaCommentsStore);
|
|
12321
12228
|
const isInternal = require__plugin_vue_export_helper.ref(true);
|
|
12322
12229
|
const commentInput = require__plugin_vue_export_helper.ref(null);
|
|
12323
12230
|
const editCommentInputs = require__plugin_vue_export_helper.ref(/* @__PURE__ */ new Map());
|
|
@@ -12332,8 +12239,8 @@ var _sfc_main$33 = {
|
|
|
12332
12239
|
];
|
|
12333
12240
|
const TRACKED_CHANGE_PREVIEW_MAX_PX = 90;
|
|
12334
12241
|
const trackedChangeImagePreviewStyle = (preview) => {
|
|
12335
|
-
const width =
|
|
12336
|
-
const height =
|
|
12242
|
+
const width = require_is_finite_number.isFiniteNumber(preview?.width) ? preview.width : null;
|
|
12243
|
+
const height = require_is_finite_number.isFiniteNumber(preview?.height) ? preview.height : null;
|
|
12337
12244
|
if (!width || !height || width <= 0 || height <= 0) return {};
|
|
12338
12245
|
const scale = Math.min(TRACKED_CHANGE_PREVIEW_MAX_PX / width, TRACKED_CHANGE_PREVIEW_MAX_PX / height, 1);
|
|
12339
12246
|
return {
|
|
@@ -12385,13 +12292,14 @@ var _sfc_main$33 = {
|
|
|
12385
12292
|
const findIgnoredElementByGeometry = (clientX, clientY) => {
|
|
12386
12293
|
if (!Number.isFinite(clientX) || !Number.isFinite(clientY)) return null;
|
|
12387
12294
|
const ignoredElements = document.querySelectorAll(CLICK_OUTSIDE_IGNORED_SELECTORS);
|
|
12388
|
-
for (const element of ignoredElements) if (element instanceof HTMLElement && elementContainsClickPoint(element, clientX, clientY)) return element;
|
|
12295
|
+
for (const element of Array.from(ignoredElements)) if (element instanceof HTMLElement && elementContainsClickPoint(element, clientX, clientY)) return element;
|
|
12389
12296
|
return null;
|
|
12390
12297
|
};
|
|
12391
12298
|
const focusEditInput = (commentId) => {
|
|
12392
12299
|
editCommentInputs.value.get(commentId)?.focus?.();
|
|
12393
12300
|
};
|
|
12394
12301
|
const commentDialogElement = require__plugin_vue_export_helper.ref(null);
|
|
12302
|
+
const trackedChangeStoryType = (story) => typeof story === "object" ? story?.storyType : void 0;
|
|
12395
12303
|
const getCommentFocusThreadId = (comment) => {
|
|
12396
12304
|
if (comment.resolvedTime) return comment.commentId;
|
|
12397
12305
|
return comment.importedId || comment.commentId;
|
|
@@ -12417,7 +12325,7 @@ var _sfc_main$33 = {
|
|
|
12417
12325
|
};
|
|
12418
12326
|
const getEntryBoundsCoordinate = (entry, coordinate) => {
|
|
12419
12327
|
const value = entry?.bounds?.[coordinate];
|
|
12420
|
-
return
|
|
12328
|
+
return require_is_finite_number.isFiniteNumber(value) ? value : null;
|
|
12421
12329
|
};
|
|
12422
12330
|
const entriesShareLine = (entry, candidateEntry) => {
|
|
12423
12331
|
if (!entry || !candidateEntry) return false;
|
|
@@ -12431,12 +12339,7 @@ var _sfc_main$33 = {
|
|
|
12431
12339
|
const candidateLeft = getEntryBoundsCoordinate(candidateEntry, "left");
|
|
12432
12340
|
const entryRight = getEntryBoundsCoordinate(entry, "right");
|
|
12433
12341
|
const candidateRight = getEntryBoundsCoordinate(candidateEntry, "right");
|
|
12434
|
-
if (
|
|
12435
|
-
entryLeft,
|
|
12436
|
-
candidateLeft,
|
|
12437
|
-
entryRight,
|
|
12438
|
-
candidateRight
|
|
12439
|
-
].some((value) => value == null)) return false;
|
|
12342
|
+
if (entryLeft == null || candidateLeft == null || entryRight == null || candidateRight == null) return false;
|
|
12440
12343
|
return candidateLeft < entryRight && entryLeft < candidateRight;
|
|
12441
12344
|
};
|
|
12442
12345
|
const entriesOverlapRange = (entry, candidateEntry) => {
|
|
@@ -12444,12 +12347,7 @@ var _sfc_main$33 = {
|
|
|
12444
12347
|
const entryEnd = entry?.end;
|
|
12445
12348
|
const candidateStart = candidateEntry?.start;
|
|
12446
12349
|
const candidateEnd = candidateEntry?.end;
|
|
12447
|
-
if (!
|
|
12448
|
-
entryStart,
|
|
12449
|
-
entryEnd,
|
|
12450
|
-
candidateStart,
|
|
12451
|
-
candidateEnd
|
|
12452
|
-
].every(Number.isFinite)) return false;
|
|
12350
|
+
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
12351
|
return candidateStart <= entryEnd && entryStart <= candidateEnd;
|
|
12454
12352
|
};
|
|
12455
12353
|
const shouldIncludeThreadAlias = (entry, candidateEntry) => {
|
|
@@ -12470,7 +12368,7 @@ var _sfc_main$33 = {
|
|
|
12470
12368
|
return [...lookupIds];
|
|
12471
12369
|
};
|
|
12472
12370
|
const isDialogAlreadyAlignedWithTarget = (dialogElement, targetClientY, tolerancePx = 24) => {
|
|
12473
|
-
if (!
|
|
12371
|
+
if (!require_is_finite_number.isFiniteNumber(targetClientY) || typeof dialogElement?.getBoundingClientRect !== "function") return false;
|
|
12474
12372
|
const dialogTop = dialogElement.getBoundingClientRect().top;
|
|
12475
12373
|
return Number.isFinite(dialogTop) && Math.abs(dialogTop - targetClientY) <= tolerancePx;
|
|
12476
12374
|
};
|
|
@@ -12496,14 +12394,19 @@ var _sfc_main$33 = {
|
|
|
12496
12394
|
if (showInputSection.value && index === visible.length - 1) return true;
|
|
12497
12395
|
return visible.length > 1 && index !== visible.length - 1;
|
|
12498
12396
|
});
|
|
12397
|
+
const commentsAreReadOnly = () => getConfig.value?.readOnly === true;
|
|
12398
|
+
const resolveIsDisabled = () => getConfig.value?.allowResolve === false;
|
|
12499
12399
|
const showInputSection = require__plugin_vue_export_helper.computed(() => {
|
|
12500
|
-
return !
|
|
12400
|
+
return !commentsAreReadOnly() && isDialogActive.value && !props.comment.resolvedTime && !isEditingAnyComment.value;
|
|
12501
12401
|
});
|
|
12502
12402
|
const readOnlyMutationOutcome = () => ({
|
|
12503
12403
|
ok: false,
|
|
12504
12404
|
reason: "read-only-document"
|
|
12505
12405
|
});
|
|
12506
|
-
const
|
|
12406
|
+
const resolveDisabledOutcome = () => ({
|
|
12407
|
+
ok: false,
|
|
12408
|
+
reason: "resolve-disabled"
|
|
12409
|
+
});
|
|
12507
12410
|
const trackedChangeDecisionsAreDisabled = () => {
|
|
12508
12411
|
const allowDecisions = proxy.$superdoc?.interactionConfig?.trackedChanges?.allowDecisions;
|
|
12509
12412
|
if (typeof allowDecisions === "boolean") return !allowDecisions;
|
|
@@ -12581,7 +12484,7 @@ var _sfc_main$33 = {
|
|
|
12581
12484
|
require__plugin_vue_export_helper.nextTick(() => emit("resize"));
|
|
12582
12485
|
};
|
|
12583
12486
|
const setParentBodyRef = (el) => {
|
|
12584
|
-
parentBodyRef.value = el
|
|
12487
|
+
parentBodyRef.value = el;
|
|
12585
12488
|
};
|
|
12586
12489
|
const checkOverflow = () => {
|
|
12587
12490
|
if (textExpanded.value) return;
|
|
@@ -12664,7 +12567,7 @@ var _sfc_main$33 = {
|
|
|
12664
12567
|
};
|
|
12665
12568
|
const isInternalDropdownDisabled = require__plugin_vue_export_helper.computed(() => {
|
|
12666
12569
|
if (props.comment.resolvedTime) return true;
|
|
12667
|
-
return
|
|
12570
|
+
return commentsAreReadOnly();
|
|
12668
12571
|
});
|
|
12669
12572
|
const isEditingThisComment = require__plugin_vue_export_helper.computed(() => (comment) => {
|
|
12670
12573
|
return isDialogActive.value && editingCommentId.value === comment.commentId;
|
|
@@ -12674,7 +12577,7 @@ var _sfc_main$33 = {
|
|
|
12674
12577
|
return comments.value.some((c) => c.commentId === editingCommentId.value);
|
|
12675
12578
|
});
|
|
12676
12579
|
const shouldShowInternalExternal = require__plugin_vue_export_helper.computed(() => {
|
|
12677
|
-
if (
|
|
12580
|
+
if (commentsAreReadOnly()) return false;
|
|
12678
12581
|
if (!proxy.$superdoc.config.isInternal) return false;
|
|
12679
12582
|
if (isV2Mode.value) return false;
|
|
12680
12583
|
return !suppressInternalExternal.value && !props.comment.trackedChange;
|
|
@@ -12718,7 +12621,7 @@ var _sfc_main$33 = {
|
|
|
12718
12621
|
if (editor) {
|
|
12719
12622
|
const { entry: resolvedFocusEntry } = resolveCommentPositionEntry(props.comment);
|
|
12720
12623
|
const focusEntry = props.floatingPositionEntry ?? resolvedFocusEntry;
|
|
12721
|
-
const usePageScopedAnchorOnly = Number.isFinite(props.floatingPageIndex) && props.comment?.trackedChangeStory
|
|
12624
|
+
const usePageScopedAnchorOnly = Number.isFinite(props.floatingPageIndex) && trackedChangeStoryType(props.comment?.trackedChangeStory) === "headerFooterPart";
|
|
12722
12625
|
const visibleAnchorTargetY = getVisibleThreadAnchorClientY(props.parent, focusEntry);
|
|
12723
12626
|
const visibleHighlightTargetY = usePageScopedAnchorOnly ? null : getVisibleThreadHighlightClientY(getThreadHighlightLookupIds(props.comment));
|
|
12724
12627
|
const visibleThreadTargetY = Number.isFinite(visibleHighlightTargetY) ? visibleHighlightTargetY : visibleAnchorTargetY;
|
|
@@ -12936,7 +12839,7 @@ var _sfc_main$33 = {
|
|
|
12936
12839
|
const getReopenDisabledReason = () => {
|
|
12937
12840
|
if (!isV2Mode.value) return null;
|
|
12938
12841
|
if (!v2CommentsAdapter.value) return "v2-comments-adapter-missing";
|
|
12939
|
-
if (
|
|
12842
|
+
if (commentsAreReadOnly()) return "read-only-document";
|
|
12940
12843
|
if (isV2WriteDisabled.value) return v2WriteCapability.value?.reason ?? "v2-write-unavailable";
|
|
12941
12844
|
return null;
|
|
12942
12845
|
};
|
|
@@ -13039,10 +12942,7 @@ var _sfc_main$33 = {
|
|
|
13039
12942
|
if (trackedChangeDecisionsAreDisabled()) return trackedChangeDecisionDisabledOutcome();
|
|
13040
12943
|
} else {
|
|
13041
12944
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13042
|
-
if (
|
|
13043
|
-
ok: false,
|
|
13044
|
-
reason: "resolve-disabled"
|
|
13045
|
-
};
|
|
12945
|
+
if (resolveIsDisabled()) return resolveDisabledOutcome();
|
|
13046
12946
|
}
|
|
13047
12947
|
const customHandler = proxy.$superdoc.config.onTrackedChangeBubbleAccept;
|
|
13048
12948
|
if (props.comment.trackedChange && isV2Mode.value) {
|
|
@@ -13107,10 +13007,7 @@ var _sfc_main$33 = {
|
|
|
13107
13007
|
};
|
|
13108
13008
|
const handleReopen = async () => {
|
|
13109
13009
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13110
|
-
if (
|
|
13111
|
-
ok: false,
|
|
13112
|
-
reason: "resolve-disabled"
|
|
13113
|
-
};
|
|
13010
|
+
if (resolveIsDisabled()) return resolveDisabledOutcome();
|
|
13114
13011
|
if (!isV2Mode.value || !v2CommentsAdapter.value) return;
|
|
13115
13012
|
const outcome = await commentsStore.reopenCommentV2({
|
|
13116
13013
|
superdoc: proxy.$superdoc,
|
|
@@ -13135,7 +13032,7 @@ var _sfc_main$33 = {
|
|
|
13135
13032
|
owner: editSessionOwner,
|
|
13136
13033
|
submission: null
|
|
13137
13034
|
});
|
|
13138
|
-
currentCommentText.value = comment?.commentText
|
|
13035
|
+
currentCommentText.value = comment?.commentText ?? "";
|
|
13139
13036
|
currentCommentMentions.value = Array.isArray(comment?.mentions) ? [...comment.mentions] : [];
|
|
13140
13037
|
activeComment.value = props.comment.commentId;
|
|
13141
13038
|
if (props.floatingInstanceId) setActiveFloatingCommentInstance(props.floatingInstanceId);
|
|
@@ -13207,7 +13104,7 @@ var _sfc_main$33 = {
|
|
|
13207
13104
|
const getProcessedDate = (timestamp) => {
|
|
13208
13105
|
return typeof timestamp === "string" ? new Date(timestamp).getTime() : timestamp;
|
|
13209
13106
|
};
|
|
13210
|
-
const handleCancel = (
|
|
13107
|
+
const handleCancel = () => {
|
|
13211
13108
|
commentSaveFailure.value = "";
|
|
13212
13109
|
retireOwnEditSession();
|
|
13213
13110
|
retireOwnReplySession();
|
|
@@ -13217,7 +13114,7 @@ var _sfc_main$33 = {
|
|
|
13217
13114
|
};
|
|
13218
13115
|
const usersFiltered = require__plugin_vue_export_helper.computed(() => {
|
|
13219
13116
|
const users = proxy.$superdoc.users;
|
|
13220
|
-
if (props.comment.isInternal === true) return users.filter((user) => user.access === "internal" || user.access?.role === "internal");
|
|
13117
|
+
if (props.comment.isInternal === true) return users.filter((user) => user.access === "internal" || typeof user.access === "object" && user.access?.role === "internal");
|
|
13221
13118
|
return users;
|
|
13222
13119
|
});
|
|
13223
13120
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
@@ -13254,7 +13151,7 @@ var _sfc_main$33 = {
|
|
|
13254
13151
|
focusEditInput(commentId);
|
|
13255
13152
|
});
|
|
13256
13153
|
});
|
|
13257
|
-
require__plugin_vue_export_helper.watch(
|
|
13154
|
+
require__plugin_vue_export_helper.watch(commentsAreReadOnly, (readOnly) => {
|
|
13258
13155
|
if (!readOnly) return;
|
|
13259
13156
|
isReplying.value = false;
|
|
13260
13157
|
if (comments.value.some((comment) => comment.commentId === editingCommentId.value)) editingCommentId.value = null;
|
|
@@ -13342,11 +13239,11 @@ var _sfc_main$33 = {
|
|
|
13342
13239
|
timestamp: getProcessedDate(comment.createdTime),
|
|
13343
13240
|
comment,
|
|
13344
13241
|
"is-active": isDialogActive.value,
|
|
13345
|
-
"resolve-disabled-reason": getResolveDisabledReason(comment),
|
|
13346
|
-
"reject-disabled-reason": getRejectDisabledReason(comment),
|
|
13242
|
+
"resolve-disabled-reason": getResolveDisabledReason(comment) ?? void 0,
|
|
13243
|
+
"reject-disabled-reason": getRejectDisabledReason(comment) ?? void 0,
|
|
13347
13244
|
"reopen-supported": isV2Mode.value && Boolean(v2CommentsAdapter.value),
|
|
13348
|
-
"reopen-disabled-reason": getReopenDisabledReason(),
|
|
13349
|
-
"write-disabled-reason": v2OverflowWriteDisabledReason.value,
|
|
13245
|
+
"reopen-disabled-reason": getReopenDisabledReason() ?? void 0,
|
|
13246
|
+
"write-disabled-reason": v2OverflowWriteDisabledReason.value ?? void 0,
|
|
13350
13247
|
onResolve: handleResolve,
|
|
13351
13248
|
onReject: handleReject,
|
|
13352
13249
|
onReopen: handleReopen,
|
|
@@ -13413,7 +13310,7 @@ var _sfc_main$33 = {
|
|
|
13413
13310
|
ref_for: true,
|
|
13414
13311
|
ref: index === 0 ? setParentBodyRef : void 0,
|
|
13415
13312
|
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, {
|
|
13313
|
+
}, 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
13314
|
ref_for: true,
|
|
13418
13315
|
ref: setEditCommentInputRef(comment.commentId),
|
|
13419
13316
|
users: [],
|
|
@@ -13422,13 +13319,13 @@ var _sfc_main$33 = {
|
|
|
13422
13319
|
comment
|
|
13423
13320
|
}, null, 8, ["config", "comment"])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_44, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13424
13321
|
class: "sd-button reply-btn-cancel",
|
|
13425
|
-
onClick: require__plugin_vue_export_helper.withModifiers(
|
|
13426
|
-
}, "Cancel"
|
|
13322
|
+
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
13323
|
+
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13427
13324
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isV2WriteDisabled.value }]),
|
|
13428
13325
|
onClick: require__plugin_vue_export_helper.withModifiers(($event) => handleCommentUpdate(comment), ["stop", "prevent"]),
|
|
13429
13326
|
disabled: !hasTextContent.value || isV2WriteDisabled.value,
|
|
13430
13327
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
13431
|
-
}, " Update ", 10,
|
|
13328
|
+
}, " Update ", 10, _hoisted_45)])])),
|
|
13432
13329
|
shouldTruncate.value && isTextOverflowing.value && index === 0 && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
13433
13330
|
key: 3,
|
|
13434
13331
|
class: "show-more-toggle",
|
|
@@ -13443,29 +13340,29 @@ var _sfc_main$33 = {
|
|
|
13443
13340
|
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
13341
|
class: "collapsed-replies",
|
|
13445
13342
|
onClick: require__plugin_vue_export_helper.withModifiers(expandThread, ["stop", "prevent"])
|
|
13446
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div",
|
|
13343
|
+
}, [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
13344
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(Avatar_default, {
|
|
13448
|
-
key: author.email || author.name,
|
|
13345
|
+
key: (author.email || author.name) ?? void 0,
|
|
13449
13346
|
user: author,
|
|
13450
13347
|
class: "mini-avatar"
|
|
13451
13348
|
}, null, 8, ["user"]);
|
|
13452
13349
|
}), 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",
|
|
13350
|
+
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
13351
|
]);
|
|
13455
13352
|
}), 128)),
|
|
13456
|
-
trackedChangeDecisionFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div",
|
|
13353
|
+
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
13354
|
type: "button",
|
|
13458
13355
|
class: "sd-button tracked-change-decision-alert__retry",
|
|
13459
13356
|
onClick: require__plugin_vue_export_helper.withModifiers(retryTrackedChangeDecision, ["stop", "prevent"])
|
|
13460
13357
|
}, " Retry ")])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13461
|
-
showInputSection.value
|
|
13358
|
+
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
13359
|
key: 0,
|
|
13463
13360
|
type: "button",
|
|
13464
13361
|
class: require__plugin_vue_export_helper.normalizeClass(["reply-pill", { "sd-is-disabled": isV2WriteDisabled.value }]),
|
|
13465
13362
|
onClick: require__plugin_vue_export_helper.withModifiers(startReply, ["stop", "prevent"]),
|
|
13466
13363
|
disabled: isV2WriteDisabled.value,
|
|
13467
13364
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
13468
|
-
}, " Reply or add others with @ ", 10,
|
|
13365
|
+
}, " 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
13366
|
ref_key: "commentInput",
|
|
13470
13367
|
ref: commentInput,
|
|
13471
13368
|
users: usersFiltered.value,
|
|
@@ -13476,7 +13373,7 @@ var _sfc_main$33 = {
|
|
|
13476
13373
|
"users",
|
|
13477
13374
|
"config",
|
|
13478
13375
|
"comment"
|
|
13479
|
-
])]), require__plugin_vue_export_helper.createElementVNode("div",
|
|
13376
|
+
])]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_53, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13480
13377
|
class: "sd-button reply-btn-cancel",
|
|
13481
13378
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
13482
13379
|
}, "Cancel"), require__plugin_vue_export_helper.createElementVNode("button", {
|
|
@@ -13484,12 +13381,14 @@ var _sfc_main$33 = {
|
|
|
13484
13381
|
onClick: require__plugin_vue_export_helper.withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
13485
13382
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
13486
13383
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
13487
|
-
}, " Reply ", 10,
|
|
13384
|
+
}, " Reply ", 10, _hoisted_54)])]))], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
13488
13385
|
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
13489
13386
|
};
|
|
13490
13387
|
}
|
|
13491
|
-
};
|
|
13492
|
-
|
|
13388
|
+
});
|
|
13389
|
+
//#endregion
|
|
13390
|
+
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13391
|
+
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"]]);
|
|
13493
13392
|
//#endregion
|
|
13494
13393
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
13495
13394
|
var _hoisted_1$25 = [
|
|
@@ -13503,7 +13402,7 @@ var _hoisted_1$25 = [
|
|
|
13503
13402
|
"data-comment-page-index",
|
|
13504
13403
|
"data-review-directory-index"
|
|
13505
13404
|
];
|
|
13506
|
-
var _sfc_main$
|
|
13405
|
+
var _sfc_main$20 = {
|
|
13507
13406
|
__name: "ReviewDirectoryListItem",
|
|
13508
13407
|
props: {
|
|
13509
13408
|
item: {
|
|
@@ -13634,14 +13533,14 @@ var _sfc_main$32 = {
|
|
|
13634
13533
|
};
|
|
13635
13534
|
}
|
|
13636
13535
|
};
|
|
13637
|
-
var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
13536
|
+
var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-29650a06"]]);
|
|
13638
13537
|
//#endregion
|
|
13639
13538
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
13640
13539
|
var _hoisted_1$24 = ["aria-busy"];
|
|
13641
13540
|
var _hoisted_2$18 = { key: 0 };
|
|
13642
13541
|
var _hoisted_3$15 = { key: 1 };
|
|
13643
13542
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
13644
|
-
var _sfc_main$
|
|
13543
|
+
var _sfc_main$19 = {
|
|
13645
13544
|
__name: "commentsList",
|
|
13646
13545
|
props: {
|
|
13647
13546
|
showMainComments: {
|
|
@@ -13802,7 +13701,7 @@ var _sfc_main$31 = {
|
|
|
13802
13701
|
};
|
|
13803
13702
|
}
|
|
13804
13703
|
};
|
|
13805
|
-
var commentsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
13704
|
+
var commentsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$19, [["__scopeId", "data-v-89244745"]]);
|
|
13806
13705
|
//#endregion
|
|
13807
13706
|
//#region src/components/CommentsLayer/commentsList/super-comments-list.js
|
|
13808
13707
|
/**
|
|
@@ -13939,10 +13838,10 @@ var FIT_WIDTH_DEFAULTS = Object.freeze({
|
|
|
13939
13838
|
});
|
|
13940
13839
|
var resolveFitWidthOptions = (rawFitConfig) => {
|
|
13941
13840
|
const raw = rawFitConfig && typeof rawFitConfig === "object" ? rawFitConfig : {};
|
|
13942
|
-
const positiveOr = (value, fallback) =>
|
|
13841
|
+
const positiveOr = (value, fallback) => require_is_finite_number.isFiniteNumber(value) && value > 0 ? value : fallback;
|
|
13943
13842
|
const min = positiveOr(raw.min, FIT_WIDTH_DEFAULTS.min);
|
|
13944
13843
|
const max = positiveOr(raw.max, FIT_WIDTH_DEFAULTS.max);
|
|
13945
|
-
const padding =
|
|
13844
|
+
const padding = require_is_finite_number.isFiniteNumber(raw.padding) && raw.padding >= 0 ? raw.padding : FIT_WIDTH_DEFAULTS.padding;
|
|
13946
13845
|
return {
|
|
13947
13846
|
min: Math.min(min, max),
|
|
13948
13847
|
max: Math.max(min, max),
|
|
@@ -13966,12 +13865,12 @@ var normalizePdfPageMeasurement = (measured, scaleFactor, zoomFactor) => {
|
|
|
13966
13865
|
var resolveV2WidestPageWidth = (snapshot) => {
|
|
13967
13866
|
if (!snapshot || typeof snapshot !== "object") return 0;
|
|
13968
13867
|
const published = snapshot.widestPageWidthPx;
|
|
13969
|
-
if (
|
|
13868
|
+
if (require_is_finite_number.isFiniteNumber(published)) return published;
|
|
13970
13869
|
let widestPage = 0;
|
|
13971
13870
|
const pages = snapshot.pages;
|
|
13972
13871
|
if (Array.isArray(pages)) for (const page of pages) {
|
|
13973
13872
|
const width = page?.base?.widthPx;
|
|
13974
|
-
if (
|
|
13873
|
+
if (require_is_finite_number.isFiniteNumber(width) && width > widestPage) widestPage = width;
|
|
13975
13874
|
}
|
|
13976
13875
|
return widestPage;
|
|
13977
13876
|
};
|
|
@@ -13988,7 +13887,7 @@ var resolveEditorPageWidth = (editor) => {
|
|
|
13988
13887
|
const pages = editor.getPages?.();
|
|
13989
13888
|
if (Array.isArray(pages)) for (const page of pages) {
|
|
13990
13889
|
const width = page?.size?.w;
|
|
13991
|
-
if (
|
|
13890
|
+
if (require_is_finite_number.isFiniteNumber(width) && width > widestPage) widestPage = width;
|
|
13992
13891
|
}
|
|
13993
13892
|
} catch {
|
|
13994
13893
|
widestPage = 0;
|
|
@@ -14001,7 +13900,7 @@ var resolveEditorPageWidth = (editor) => {
|
|
|
14001
13900
|
pageStyles = null;
|
|
14002
13901
|
}
|
|
14003
13902
|
const pageWidthInches = pageStyles?.pageSize?.width;
|
|
14004
|
-
if (
|
|
13903
|
+
if (require_is_finite_number.isFiniteNumber(pageWidthInches) && pageWidthInches > 0) return pageWidthInches * CSS_PX_PER_INCH;
|
|
14005
13904
|
return null;
|
|
14006
13905
|
};
|
|
14007
13906
|
/**
|
|
@@ -14152,12 +14051,14 @@ function createHighContrastMode() {
|
|
|
14152
14051
|
}
|
|
14153
14052
|
};
|
|
14154
14053
|
}
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
|
|
14158
|
-
}
|
|
14054
|
+
function createHighContrastOff() {
|
|
14055
|
+
return {
|
|
14056
|
+
isHighContrastMode: require__plugin_vue_export_helper.readonly(require__plugin_vue_export_helper.ref(false)),
|
|
14057
|
+
setHighContrastMode: () => {}
|
|
14058
|
+
};
|
|
14059
|
+
}
|
|
14159
14060
|
function useHighContrastMode() {
|
|
14160
|
-
return require__plugin_vue_export_helper.inject(HIGH_CONTRAST_MODE_KEY,
|
|
14061
|
+
return require__plugin_vue_export_helper.inject(HIGH_CONTRAST_MODE_KEY, createHighContrastOff, true);
|
|
14161
14062
|
}
|
|
14162
14063
|
//#endregion
|
|
14163
14064
|
//#region ../layout-engine/contracts/src/author-colors.ts
|
|
@@ -14416,7 +14317,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
14416
14317
|
return null;
|
|
14417
14318
|
};
|
|
14418
14319
|
//#endregion
|
|
14419
|
-
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
14320
|
+
//#region src/components/CommentsLayer/FloatingComments.vue?vue&type=script&setup=true&lang.ts
|
|
14420
14321
|
var _hoisted_1$23 = [
|
|
14421
14322
|
"data-comment-id",
|
|
14422
14323
|
"data-comment-instance-id",
|
|
@@ -14425,7 +14326,7 @@ var _hoisted_1$23 = [
|
|
|
14425
14326
|
"data-comment-page-index"
|
|
14426
14327
|
];
|
|
14427
14328
|
var _heightsCache = {};
|
|
14428
|
-
var
|
|
14329
|
+
var FloatingComments_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
14429
14330
|
__name: "FloatingComments",
|
|
14430
14331
|
props: {
|
|
14431
14332
|
currentDocument: {
|
|
@@ -14468,9 +14369,10 @@ var _sfc_main$30 = {
|
|
|
14468
14369
|
};
|
|
14469
14370
|
const props = __props;
|
|
14470
14371
|
const superdocStore = useSuperdocStore();
|
|
14471
|
-
const
|
|
14372
|
+
const piniaCommentsStore = useCommentsStore();
|
|
14373
|
+
const commentsStore = piniaCommentsStore;
|
|
14472
14374
|
const { clearInstantSidebarAlignment } = commentsStore;
|
|
14473
|
-
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(
|
|
14375
|
+
const { activeComment, activeFloatingCommentInstanceId, editorCommentPositions, pendingComment, editingCommentId, instantSidebarAlignmentTargetY, instantSidebarAlignmentThreadId, instantSidebarAlignmentInstanceId } = storeToRefs(piniaCommentsStore);
|
|
14474
14376
|
const { activeZoom } = storeToRefs(superdocStore);
|
|
14475
14377
|
const committedPresentation = require__plugin_vue_export_helper.computed(() => commentsStore.committedReviewPresentations?.[String(props.currentDocument?.id)] ?? null);
|
|
14476
14378
|
const committedInstances = require__plugin_vue_export_helper.computed(() => {
|
|
@@ -14577,7 +14479,7 @@ var _sfc_main$30 = {
|
|
|
14577
14479
|
return bottom != null ? bottom * zoom : anchorTop;
|
|
14578
14480
|
}
|
|
14579
14481
|
const bottom = instance?.positionEntry?.bounds?.bottom;
|
|
14580
|
-
return
|
|
14482
|
+
return require_is_finite_number.isFiniteNumber(bottom) ? bottom : anchorTop;
|
|
14581
14483
|
};
|
|
14582
14484
|
const geometryBearingInstances = require__plugin_vue_export_helper.computed(() => {
|
|
14583
14485
|
const positioned = [];
|
|
@@ -14585,8 +14487,8 @@ var _sfc_main$30 = {
|
|
|
14585
14487
|
const id = instance?.id;
|
|
14586
14488
|
const threadId = getThreadId(instance?.comment);
|
|
14587
14489
|
const anchorTop = getAnchorTop(instance);
|
|
14588
|
-
if (id == null || threadId == null || !
|
|
14589
|
-
const top = normalizeFloatingAnchorTop(anchorTop
|
|
14490
|
+
if (id == null || threadId == null || !require_is_finite_number.isFiniteNumber(anchorTop)) continue;
|
|
14491
|
+
const top = normalizeFloatingAnchorTop(anchorTop);
|
|
14590
14492
|
positioned.push({
|
|
14591
14493
|
id,
|
|
14592
14494
|
threadId,
|
|
@@ -14608,8 +14510,7 @@ var _sfc_main$30 = {
|
|
|
14608
14510
|
return shouldMountFloatingCommentDialog({
|
|
14609
14511
|
id: position?.id,
|
|
14610
14512
|
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
|
|
14513
|
+
activeCommentInstanceId: activeCommentInstanceId.value
|
|
14613
14514
|
});
|
|
14614
14515
|
};
|
|
14615
14516
|
const getFloatingViewportRange = () => {
|
|
@@ -14965,14 +14866,14 @@ var _sfc_main$30 = {
|
|
|
14965
14866
|
if (!directDecisionContinuity) return;
|
|
14966
14867
|
const actionElement = (event?.target instanceof Element ? event.target : null)?.closest?.("[data-comment-action]");
|
|
14967
14868
|
const action = actionElement?.getAttribute?.("data-comment-action");
|
|
14968
|
-
if (!((action === "resolve" || action === "reject") && floatingCommentsContainer.value?.contains?.(actionElement))) releaseDirectDecisionContinuity();
|
|
14869
|
+
if (!((action === "resolve" || action === "reject") && floatingCommentsContainer.value?.contains?.(actionElement ?? null))) releaseDirectDecisionContinuity();
|
|
14969
14870
|
};
|
|
14970
14871
|
const clearDeferredRemeasureTimers = () => {
|
|
14971
14872
|
remeasureTimers.forEach(clearTimeout);
|
|
14972
14873
|
remeasureTimers = [];
|
|
14973
14874
|
};
|
|
14974
14875
|
const remeasureCommentKeys = (keys) => {
|
|
14975
|
-
for (const key of keys.filter(Boolean)) {
|
|
14876
|
+
for (const key of keys.filter((candidate) => Boolean(candidate))) {
|
|
14976
14877
|
const el = placeholderRefs.value[key];
|
|
14977
14878
|
if (!el) continue;
|
|
14978
14879
|
const dialog = el.querySelector(".comments-dialog");
|
|
@@ -15093,7 +14994,7 @@ var _sfc_main$30 = {
|
|
|
15093
14994
|
removedId: removedKey
|
|
15094
14995
|
});
|
|
15095
14996
|
const targetClientY = (targetKey ? placeholderRefs.value[targetKey] : null)?.getBoundingClientRect?.().top;
|
|
15096
|
-
if (!targetKey || !
|
|
14997
|
+
if (!targetKey || !require_is_finite_number.isFiniteNumber(targetClientY)) {
|
|
15097
14998
|
clearSidebarContinuityAnchor();
|
|
15098
14999
|
return false;
|
|
15099
15000
|
}
|
|
@@ -15106,9 +15007,9 @@ var _sfc_main$30 = {
|
|
|
15106
15007
|
return true;
|
|
15107
15008
|
};
|
|
15108
15009
|
const prepareSidebarContinuityForDirectDecision = (event) => {
|
|
15109
|
-
const actionElement = event?.target?.closest?.("[data-comment-action]");
|
|
15010
|
+
const actionElement = (event?.target instanceof Element ? event.target : null)?.closest?.("[data-comment-action]");
|
|
15110
15011
|
const action = actionElement?.getAttribute?.("data-comment-action");
|
|
15111
|
-
if (action !== "resolve" && action !== "reject") return;
|
|
15012
|
+
if (!actionElement || action !== "resolve" && action !== "reject") return;
|
|
15112
15013
|
releaseDirectDecisionContinuity();
|
|
15113
15014
|
if (actionElement.getAttribute?.("aria-disabled") === "true") return;
|
|
15114
15015
|
const removedKey = (actionElement.closest?.("[data-comment-id]"))?.getAttribute?.("data-comment-id");
|
|
@@ -15124,7 +15025,7 @@ var _sfc_main$30 = {
|
|
|
15124
15025
|
removedId: removedKey
|
|
15125
15026
|
});
|
|
15126
15027
|
const targetClientY = (targetKey ? placeholderRefs.value[targetKey] : null)?.getBoundingClientRect?.().top;
|
|
15127
|
-
if (!targetKey || !
|
|
15028
|
+
if (!targetKey || !require_is_finite_number.isFiniteNumber(targetClientY)) return;
|
|
15128
15029
|
directDecisionContinuity = {
|
|
15129
15030
|
removedKey,
|
|
15130
15031
|
targetKey,
|
|
@@ -15184,7 +15085,7 @@ var _sfc_main$30 = {
|
|
|
15184
15085
|
instantAlignmentInstanceKey,
|
|
15185
15086
|
instantSidebarAlignmentTargetY
|
|
15186
15087
|
], ([activeKey, requestKey, targetY]) => {
|
|
15187
|
-
if (!activeKey || !requestKey || activeKey !== requestKey || !
|
|
15088
|
+
if (!activeKey || !requestKey || activeKey !== requestKey || !require_is_finite_number.isFiniteNumber(targetY)) return;
|
|
15188
15089
|
applyInstantSidebarAlignment(activeKey, targetY);
|
|
15189
15090
|
});
|
|
15190
15091
|
require__plugin_vue_export_helper.watch(editingCommentId, () => {
|
|
@@ -15241,10 +15142,10 @@ var _sfc_main$30 = {
|
|
|
15241
15142
|
let prevActiveLayoutTop = null;
|
|
15242
15143
|
require__plugin_vue_export_helper.watch(allPositions, (positions) => {
|
|
15243
15144
|
const activePosition = activeCommentInstanceId.value ? positions.find((position) => position.id === activeCommentInstanceId.value) : null;
|
|
15244
|
-
const activeAnchorTop =
|
|
15145
|
+
const activeAnchorTop = require_is_finite_number.isFiniteNumber(activePosition?.anchorTop) ? activePosition.anchorTop : null;
|
|
15245
15146
|
const sameActiveInstance = activeCommentInstanceId.value === prevActiveInstanceId;
|
|
15246
15147
|
const activeAnchorMoved = sameActiveInstance && activeAnchorTop != null && prevActiveAnchorTop != null && Math.abs(activeAnchorTop - prevActiveAnchorTop) > 1;
|
|
15247
|
-
const activeLayoutTop =
|
|
15148
|
+
const activeLayoutTop = require_is_finite_number.isFiniteNumber(activePosition?.top) ? activePosition.top : null;
|
|
15248
15149
|
const activeLayoutMoved = sameActiveInstance && activeLayoutTop != null && prevActiveLayoutTop != null && Math.abs(activeLayoutTop - prevActiveLayoutTop) > 1;
|
|
15249
15150
|
if (activeAnchorMoved && sidebarOffsetY.value !== 0 && !Number.isFinite(instantSidebarAlignmentTargetY.value)) {
|
|
15250
15151
|
sidebarOffsetY.value = 0;
|
|
@@ -15408,8 +15309,8 @@ var _sfc_main$30 = {
|
|
|
15408
15309
|
parent: __props.parent,
|
|
15409
15310
|
comment: pos.commentRef,
|
|
15410
15311
|
"floating-instance-id": pos.id,
|
|
15411
|
-
"floating-page-index": pos.pageIndex,
|
|
15412
|
-
"floating-position-entry": pos.instanceRef?.positionEntry ??
|
|
15312
|
+
"floating-page-index": pos.pageIndex ?? void 0,
|
|
15313
|
+
"floating-position-entry": pos.instanceRef?.positionEntry ?? void 0,
|
|
15413
15314
|
"is-floating-instance-active": pos.id === activeCommentInstanceId.value
|
|
15414
15315
|
}, null, 8, [
|
|
15415
15316
|
"onResize",
|
|
@@ -15423,8 +15324,10 @@ var _sfc_main$30 = {
|
|
|
15423
15324
|
}), 128))], 4)], 36);
|
|
15424
15325
|
};
|
|
15425
15326
|
}
|
|
15426
|
-
};
|
|
15427
|
-
|
|
15327
|
+
});
|
|
15328
|
+
//#endregion
|
|
15329
|
+
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15330
|
+
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"]]);
|
|
15428
15331
|
//#endregion
|
|
15429
15332
|
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
15430
15333
|
var _hoisted_1$22 = {
|
|
@@ -15703,7 +15606,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
15703
15606
|
//#endregion
|
|
15704
15607
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
15705
15608
|
var _hoisted_1$21 = ["data-page-index"];
|
|
15706
|
-
var _sfc_main$
|
|
15609
|
+
var _sfc_main$17 = {
|
|
15707
15610
|
__name: "WhiteboardPage",
|
|
15708
15611
|
props: {
|
|
15709
15612
|
whiteboard: {
|
|
@@ -15838,10 +15741,10 @@ var _sfc_main$28 = {
|
|
|
15838
15741
|
};
|
|
15839
15742
|
}
|
|
15840
15743
|
};
|
|
15841
|
-
var WhiteboardPage_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
15744
|
+
var WhiteboardPage_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$17, [["__scopeId", "data-v-c876c9b5"]]);
|
|
15842
15745
|
//#endregion
|
|
15843
15746
|
//#region src/components/Whiteboard/WhiteboardLayer.vue
|
|
15844
|
-
var _sfc_main$
|
|
15747
|
+
var _sfc_main$16 = {
|
|
15845
15748
|
__name: "WhiteboardLayer",
|
|
15846
15749
|
props: {
|
|
15847
15750
|
whiteboard: {
|
|
@@ -15910,7 +15813,7 @@ var _sfc_main$27 = {
|
|
|
15910
15813
|
};
|
|
15911
15814
|
}
|
|
15912
15815
|
};
|
|
15913
|
-
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
15816
|
+
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$16, [["__scopeId", "data-v-54546c3d"]]);
|
|
15914
15817
|
//#endregion
|
|
15915
15818
|
//#region src/components/CommentsLayer/collect-removed-comment-ids.js
|
|
15916
15819
|
/**
|
|
@@ -15953,18 +15856,6 @@ var collectRemovedCommentIds = (comments, targetIds, isInScope = () => true) =>
|
|
|
15953
15856
|
}
|
|
15954
15857
|
return removedIds;
|
|
15955
15858
|
};
|
|
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
15859
|
var VALID_COMMENTS_LAYOUTS = /* @__PURE__ */ new Set([
|
|
15969
15860
|
"auto",
|
|
15970
15861
|
"sidebar",
|
|
@@ -16003,13 +15894,13 @@ function normalizeCommentsUiConfig(commentsConfig) {
|
|
|
16003
15894
|
if (deprecatedTarget === void 0) delete normalized.compactMeasurementSelector;
|
|
16004
15895
|
else normalized.compactMeasurementSelector = deprecatedTarget;
|
|
16005
15896
|
const deprecatedBreakpoint = commentsConfig.compactBreakpointPx;
|
|
16006
|
-
if (!(
|
|
15897
|
+
if (!(require_is_finite_number.isFiniteNumber(deprecatedBreakpoint) && deprecatedBreakpoint >= 0)) delete normalized.compactBreakpointPx;
|
|
16007
15898
|
delete normalized.layout;
|
|
16008
15899
|
delete normalized.responsive;
|
|
16009
15900
|
if (isCommentsLayout(layout)) normalized.layout = layout;
|
|
16010
15901
|
const normalizedResponsive = {};
|
|
16011
15902
|
if (target !== void 0) normalizedResponsive.target = target;
|
|
16012
|
-
if (
|
|
15903
|
+
if (require_is_finite_number.isFiniteNumber(breakpoint) && breakpoint >= 0) normalizedResponsive.breakpoint = breakpoint;
|
|
16013
15904
|
if (Object.keys(normalizedResponsive).length > 0) normalized.responsive = normalizedResponsive;
|
|
16014
15905
|
return normalized;
|
|
16015
15906
|
}
|
|
@@ -16017,7 +15908,7 @@ function normalizeCommentsUiConfig(commentsConfig) {
|
|
|
16017
15908
|
//#region src/composables/use-comment-small-screen.js
|
|
16018
15909
|
var SUPERDOC_DOCUMENT_SELECTOR = ".superdoc__document";
|
|
16019
15910
|
var isValidCompactBreakpoint = (value) => {
|
|
16020
|
-
return
|
|
15911
|
+
return require_is_finite_number.isFiniteNumber(value) && value >= 0;
|
|
16021
15912
|
};
|
|
16022
15913
|
var getRequiredSidebarWidth = (documentWidth) => {
|
|
16023
15914
|
return documentWidth + 320 + 24;
|
|
@@ -16164,18 +16055,17 @@ var COMMENT_HIGHLIGHT_DATA_ATTR = "data-comment-ids";
|
|
|
16164
16055
|
var PDF_COMMENT_ANCHOR_SELECTOR = ".sd-comment-anchor";
|
|
16165
16056
|
var clamp = (value, min, max) => Math.min(Math.max(value, min), max);
|
|
16166
16057
|
var toNumber = (value) => Number(value);
|
|
16167
|
-
var isFiniteNumber = (value) => Number.isFinite(value);
|
|
16168
16058
|
var getCommentAnchorId = (comment) => comment?.commentId ?? comment?.importedId ?? null;
|
|
16169
16059
|
var parseCommentIds = (value) => String(value || "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
16170
16060
|
var resolveInteractionAnchor = (lastClickAnchor) => {
|
|
16171
16061
|
const anchor = lastClickAnchor?.value;
|
|
16172
16062
|
if (!anchor) return null;
|
|
16173
16063
|
const ts = toNumber(anchor.ts);
|
|
16174
|
-
if (!isFiniteNumber(ts) || Date.now() - ts > INTERACTION_ANCHOR_TTL_MS) return null;
|
|
16064
|
+
if (!require_is_finite_number.isFiniteNumber(ts) || Date.now() - ts > INTERACTION_ANCHOR_TTL_MS) return null;
|
|
16175
16065
|
const x = toNumber(anchor.x);
|
|
16176
16066
|
const rectBottom = toNumber(anchor.anchorRect?.bottom);
|
|
16177
|
-
const y = isFiniteNumber(rectBottom) ? rectBottom : toNumber(anchor.y);
|
|
16178
|
-
if (!isFiniteNumber(x) || !isFiniteNumber(y)) return null;
|
|
16067
|
+
const y = require_is_finite_number.isFiniteNumber(rectBottom) ? rectBottom : toNumber(anchor.y);
|
|
16068
|
+
if (!require_is_finite_number.isFiniteNumber(x) || !require_is_finite_number.isFiniteNumber(y)) return null;
|
|
16179
16069
|
return {
|
|
16180
16070
|
x,
|
|
16181
16071
|
y
|
|
@@ -16206,7 +16096,7 @@ var resolveInlineHighlightAnchorRect = ({ rootEl, comment, pendingComment }) =>
|
|
|
16206
16096
|
var resolveEntryAnchorBottom = (resolveCommentPositionEntry, comment) => {
|
|
16207
16097
|
const { entry } = resolveCommentPositionEntry(getCommentAnchorId(comment));
|
|
16208
16098
|
const boundsBottom = toNumber(entry?.bounds?.bottom);
|
|
16209
|
-
if (isFiniteNumber(boundsBottom)) return boundsBottom;
|
|
16099
|
+
if (require_is_finite_number.isFiniteNumber(boundsBottom)) return boundsBottom;
|
|
16210
16100
|
return toNumber(entry?.bounds?.top);
|
|
16211
16101
|
};
|
|
16212
16102
|
var isPdfContextForAnchorLookup = ({ selectionPosition, comment, pendingComment }) => selectionPosition.value?.source === "pdf" || comment?.selection?.source === "pdf" || pendingComment.value?.selection?.source === "pdf";
|
|
@@ -16220,9 +16110,9 @@ var resolvePdfDomAnchorBottom = ({ rootEl, layersRect, comment }) => {
|
|
|
16220
16110
|
var resolvePendingSelectionAnchorBottom = ({ comment, pendingComment, selectionPosition, activeZoom }) => {
|
|
16221
16111
|
if (!pendingComment.value || comment?.commentId !== pendingComment.value?.commentId) return NaN;
|
|
16222
16112
|
const selectedBottom = toNumber(selectionPosition.value?.bottom);
|
|
16223
|
-
if (isFiniteNumber(selectedBottom)) return selectedBottom * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16113
|
+
if (require_is_finite_number.isFiniteNumber(selectedBottom)) return selectedBottom * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16224
16114
|
const selectedTop = toNumber(selectionPosition.value?.top);
|
|
16225
|
-
if (!isFiniteNumber(selectedTop)) return NaN;
|
|
16115
|
+
if (!require_is_finite_number.isFiniteNumber(selectedTop)) return NaN;
|
|
16226
16116
|
return selectedTop * (selectionPosition.value?.source === "pdf" ? (activeZoom.value ?? 100) / 100 : 1);
|
|
16227
16117
|
};
|
|
16228
16118
|
var toPopoverStyle = ({ top, left }) => ({
|
|
@@ -16234,7 +16124,7 @@ var resolvePopoverPosition = ({ rootRect, layersRect, anchorBottom, anchorClient
|
|
|
16234
16124
|
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
16125
|
const maxLeft = Math.max(SAFE_MARGIN_PX, rootRect.width - POPOVER_WIDTH_PX - SAFE_MARGIN_PX);
|
|
16236
16126
|
let left;
|
|
16237
|
-
if (isFiniteNumber(anchorClientX)) left = clamp(anchorClientX - rootRect.left + SAFE_MARGIN_PX, SAFE_MARGIN_PX, maxLeft);
|
|
16127
|
+
if (require_is_finite_number.isFiniteNumber(anchorClientX)) left = clamp(anchorClientX - rootRect.left + SAFE_MARGIN_PX, SAFE_MARGIN_PX, maxLeft);
|
|
16238
16128
|
else {
|
|
16239
16129
|
const rightCandidate = rootRect.width - (layersRect.left - rootRect.left + layersRect.width) + SAFE_MARGIN_PX;
|
|
16240
16130
|
left = clamp(rootRect.width - rightCandidate - POPOVER_WIDTH_PX, SAFE_MARGIN_PX, maxLeft);
|
|
@@ -16321,7 +16211,7 @@ function useCompactCommentPopover({ activeComment, pendingComment, activeCompact
|
|
|
16321
16211
|
anchorBottom = inlineRect.bottom - layersRect.top;
|
|
16322
16212
|
anchorClientX = inlineRect.left;
|
|
16323
16213
|
} else anchorBottom = resolveEntryAnchorBottom(resolveCommentPositionEntry, comment);
|
|
16324
|
-
if (!isFiniteNumber(anchorBottom) && isPdfContextForAnchorLookup({
|
|
16214
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom) && isPdfContextForAnchorLookup({
|
|
16325
16215
|
selectionPosition,
|
|
16326
16216
|
comment,
|
|
16327
16217
|
pendingComment
|
|
@@ -16330,13 +16220,13 @@ function useCompactCommentPopover({ activeComment, pendingComment, activeCompact
|
|
|
16330
16220
|
layersRect,
|
|
16331
16221
|
comment
|
|
16332
16222
|
});
|
|
16333
|
-
if (!isFiniteNumber(anchorBottom)) anchorBottom = resolvePendingSelectionAnchorBottom({
|
|
16223
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom)) anchorBottom = resolvePendingSelectionAnchorBottom({
|
|
16334
16224
|
comment,
|
|
16335
16225
|
pendingComment,
|
|
16336
16226
|
selectionPosition,
|
|
16337
16227
|
activeZoom
|
|
16338
16228
|
});
|
|
16339
|
-
if (!isFiniteNumber(anchorBottom)) return fallback;
|
|
16229
|
+
if (!require_is_finite_number.isFiniteNumber(anchorBottom)) return fallback;
|
|
16340
16230
|
return toPopoverStyle(resolvePopoverPosition({
|
|
16341
16231
|
rootRect,
|
|
16342
16232
|
layersRect,
|
|
@@ -17993,7 +17883,7 @@ var toolbarIcons = {
|
|
|
17993
17883
|
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
17884
|
};
|
|
17995
17885
|
//#endregion
|
|
17996
|
-
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
17886
|
+
//#region src/internal/toolbar/built-in/LinkInput.vue?vue&type=script&setup=true&lang.ts
|
|
17997
17887
|
var _hoisted_1$20 = {
|
|
17998
17888
|
key: 0,
|
|
17999
17889
|
class: "link-title"
|
|
@@ -18057,7 +17947,7 @@ var _hoisted_18$1 = {
|
|
|
18057
17947
|
* `btn-link-remove`, `btn-link-open`, `input[name="link"]`) is preserved so the
|
|
18058
17948
|
* proof lane and behavior tests keep working.
|
|
18059
17949
|
*/
|
|
18060
|
-
var
|
|
17950
|
+
var LinkInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
18061
17951
|
__name: "LinkInput",
|
|
18062
17952
|
props: {
|
|
18063
17953
|
showInput: {
|
|
@@ -18208,7 +18098,7 @@ var _sfc_main$26 = {
|
|
|
18208
18098
|
commandError.value = "";
|
|
18209
18099
|
try {
|
|
18210
18100
|
const result = await runLinkCommand(payload);
|
|
18211
|
-
if (result === false || result == null || typeof result === "object" &&
|
|
18101
|
+
if (result === false || result == null || typeof result === "object" && result.success === false) {
|
|
18212
18102
|
commandError.value = "Could not apply link. Check the selection and try again.";
|
|
18213
18103
|
return;
|
|
18214
18104
|
}
|
|
@@ -18318,8 +18208,10 @@ var _sfc_main$26 = {
|
|
|
18318
18208
|
], 2);
|
|
18319
18209
|
};
|
|
18320
18210
|
}
|
|
18321
|
-
};
|
|
18322
|
-
|
|
18211
|
+
});
|
|
18212
|
+
//#endregion
|
|
18213
|
+
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
18214
|
+
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
18215
|
//#endregion
|
|
18324
18216
|
//#region src/internal/toolbar/built-in/scroll-helpers.js
|
|
18325
18217
|
function getScrollableParent(element) {
|
|
@@ -20236,7 +20128,7 @@ function translateExportDiagnostic(error, ctx = {}) {
|
|
|
20236
20128
|
* event only fires on success, fires AFTER the diagnostics events on the
|
|
20237
20129
|
* success path, and never fires at all for a failed attempt.
|
|
20238
20130
|
*
|
|
20239
|
-
* @param {{generation?: unknown}} [payload]
|
|
20131
|
+
* @param {{generation?: unknown} | null} [payload]
|
|
20240
20132
|
* @returns {number}
|
|
20241
20133
|
*/
|
|
20242
20134
|
function getV2DiagnosticGeneration(payload) {
|
|
@@ -20309,8 +20201,8 @@ function isBootDiagnosticRedundant(bootDiagnostic, reason, translatedRecords) {
|
|
|
20309
20201
|
return Boolean(bootDiagnostic) && bootDiagnostic.internalCode === reason && translatedRecords.length > 0;
|
|
20310
20202
|
}
|
|
20311
20203
|
//#endregion
|
|
20312
|
-
//#region src/components/surfaces/SurfaceExternalMount.vue
|
|
20313
|
-
var
|
|
20204
|
+
//#region src/components/surfaces/SurfaceExternalMount.vue?vue&type=script&setup=true&lang.ts
|
|
20205
|
+
var SurfaceExternalMount_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20314
20206
|
__name: "SurfaceExternalMount",
|
|
20315
20207
|
props: {
|
|
20316
20208
|
surfaceId: {
|
|
@@ -20372,8 +20264,10 @@ var _sfc_main$25 = {
|
|
|
20372
20264
|
}, null, 512);
|
|
20373
20265
|
};
|
|
20374
20266
|
}
|
|
20375
|
-
};
|
|
20376
|
-
|
|
20267
|
+
});
|
|
20268
|
+
//#endregion
|
|
20269
|
+
//#region src/components/surfaces/SurfaceExternalMount.vue
|
|
20270
|
+
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
20271
|
//#endregion
|
|
20378
20272
|
//#region src/components/surfaces/focusable-selector.js
|
|
20379
20273
|
/**
|
|
@@ -20389,11 +20283,11 @@ var FOCUSABLE_SELECTOR = [
|
|
|
20389
20283
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
20390
20284
|
].join(", ");
|
|
20391
20285
|
//#endregion
|
|
20392
|
-
//#region src/components/surfaces/SurfaceDialog.vue
|
|
20286
|
+
//#region src/components/surfaces/SurfaceDialog.vue?vue&type=script&setup=true&lang.ts
|
|
20393
20287
|
var _hoisted_1$19 = ["aria-labelledby", "aria-label"];
|
|
20394
20288
|
var _hoisted_2$15 = ["id"];
|
|
20395
20289
|
var _hoisted_3$13 = { class: "sd-surface-dialog__content" };
|
|
20396
|
-
var
|
|
20290
|
+
var SurfaceDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20397
20291
|
__name: "SurfaceDialog",
|
|
20398
20292
|
props: {
|
|
20399
20293
|
surface: {
|
|
@@ -20440,7 +20334,7 @@ var _sfc_main$24 = {
|
|
|
20440
20334
|
if (props.scrollLockTarget) scrollLockTarget = props.scrollLockTarget;
|
|
20441
20335
|
else {
|
|
20442
20336
|
const superdocRoot = dialogRef.value?.closest(".superdoc");
|
|
20443
|
-
scrollLockTarget = superdocRoot?.querySelector(".superdoc__layers") ?? superdocRoot;
|
|
20337
|
+
scrollLockTarget = superdocRoot?.querySelector(".superdoc__layers") ?? superdocRoot ?? null;
|
|
20444
20338
|
}
|
|
20445
20339
|
if (!scrollLockTarget) return;
|
|
20446
20340
|
originalOverflow = scrollLockTarget.style.overflow;
|
|
@@ -20541,14 +20435,16 @@ var _sfc_main$24 = {
|
|
|
20541
20435
|
])) : __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
20436
|
};
|
|
20543
20437
|
}
|
|
20544
|
-
};
|
|
20545
|
-
|
|
20438
|
+
});
|
|
20439
|
+
//#endregion
|
|
20440
|
+
//#region src/components/surfaces/SurfaceDialog.vue
|
|
20441
|
+
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
20442
|
//#endregion
|
|
20547
20443
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
20548
20444
|
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
20549
20445
|
var _hoisted_2$14 = ["id"];
|
|
20550
20446
|
var _hoisted_3$12 = { class: "sd-surface-floating__content" };
|
|
20551
|
-
var _sfc_main$
|
|
20447
|
+
var _sfc_main$15 = {
|
|
20552
20448
|
__name: "SurfaceFloating",
|
|
20553
20449
|
props: { surface: {
|
|
20554
20450
|
type: Object,
|
|
@@ -20697,10 +20593,10 @@ var _sfc_main$23 = {
|
|
|
20697
20593
|
};
|
|
20698
20594
|
}
|
|
20699
20595
|
};
|
|
20700
|
-
var SurfaceFloating_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
20596
|
+
var SurfaceFloating_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$15, [["__scopeId", "data-v-cd2be5db"]]);
|
|
20701
20597
|
//#endregion
|
|
20702
20598
|
//#region src/components/surfaces/SurfaceHost.vue
|
|
20703
|
-
var _sfc_main$
|
|
20599
|
+
var _sfc_main$14 = {
|
|
20704
20600
|
__name: "SurfaceHost",
|
|
20705
20601
|
props: { geometryTarget: {
|
|
20706
20602
|
type: Object,
|
|
@@ -20922,9 +20818,9 @@ var _sfc_main$22 = {
|
|
|
20922
20818
|
};
|
|
20923
20819
|
}
|
|
20924
20820
|
};
|
|
20925
|
-
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
20821
|
+
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$14, [["__scopeId", "data-v-dad99b67"]]);
|
|
20926
20822
|
//#endregion
|
|
20927
|
-
//#region src/SuperDoc.vue
|
|
20823
|
+
//#region src/SuperDoc.vue?vue&type=script&setup=true&lang.ts
|
|
20928
20824
|
var _hoisted_1$17 = ["data-superdoc-ui-owner"];
|
|
20929
20825
|
var _hoisted_2$13 = ["innerHTML"];
|
|
20930
20826
|
var _hoisted_3$11 = { class: "superdoc__document document" };
|
|
@@ -20932,11 +20828,11 @@ var _hoisted_4$9 = { class: "floating-comments" };
|
|
|
20932
20828
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
20933
20829
|
var UNAVAILABLE_COMMAND_RESULT = false;
|
|
20934
20830
|
var V2_SELECTION_TOOLBAR_SYNC_RETRY_FRAMES = 3;
|
|
20935
|
-
var
|
|
20831
|
+
var SuperDoc_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
20936
20832
|
__name: "SuperDoc",
|
|
20937
20833
|
emits: ["selection-update"],
|
|
20938
20834
|
setup(__props, { emit: __emit }) {
|
|
20939
|
-
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-
|
|
20835
|
+
const PdfViewer = require__plugin_vue_export_helper.defineAsyncComponent(() => Promise.resolve().then(() => require("./chunks/PdfViewer-boENOZdF.cjs")));
|
|
20940
20836
|
const getDocumentLoadPassword = (doc) => doc.password ?? proxy.$superdoc.config.password;
|
|
20941
20837
|
const resolveDocumentV2Collaboration = (doc) => {
|
|
20942
20838
|
const rawConfig = doc?.v2Collaboration;
|
|
@@ -21198,7 +21094,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21198
21094
|
if (typeof bindSessionShortcuts !== "function") return;
|
|
21199
21095
|
const unbind = bindSessionShortcuts({
|
|
21200
21096
|
routes: createV2SessionShortcutRoutes({
|
|
21201
|
-
resolveToolbarElement: () => proxy.$superdoc?.toolbar?.toolbarContainer ?? null,
|
|
21097
|
+
resolveToolbarElement: () => (proxy.$superdoc?.toolbar)?.toolbarContainer ?? null,
|
|
21202
21098
|
getDocumentApi: () => documentApi ?? null,
|
|
21203
21099
|
...firstPartyCommandMutation ? { runReferenceMutation: (memberPath, input) => firstPartyCommandMutation.run(memberPath, [input]) } : {},
|
|
21204
21100
|
pageNumberCommand: {
|
|
@@ -21233,7 +21129,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21233
21129
|
if (document && provider?.sendStateless) document.provider = null;
|
|
21234
21130
|
const entry = v2Runtimes.get(documentId);
|
|
21235
21131
|
if (!entry) return;
|
|
21236
|
-
proxy.$superdoc
|
|
21132
|
+
proxy.$superdoc["unregisterEditorRuntime"](entry.runtimeId);
|
|
21237
21133
|
v2Runtimes.delete(documentId);
|
|
21238
21134
|
const hostRoot = subDocumentRoots.get(documentId);
|
|
21239
21135
|
if (hostRoot) unmarkRuntimeRoot(hostRoot);
|
|
@@ -21253,7 +21149,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21253
21149
|
host,
|
|
21254
21150
|
getLegacyEditorProjection: () => facade,
|
|
21255
21151
|
onUnregister: (id) => {
|
|
21256
|
-
proxy.$superdoc
|
|
21152
|
+
proxy.$superdoc["unregisterEditorRuntime"](id);
|
|
21257
21153
|
const current = v2Runtimes.get(documentId);
|
|
21258
21154
|
if (current && current.runtimeId === id) v2Runtimes.delete(documentId);
|
|
21259
21155
|
const hostRoot = subDocumentRoots.get(documentId);
|
|
@@ -21262,12 +21158,12 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21262
21158
|
});
|
|
21263
21159
|
adapter.attachMountHandle(mount ?? null);
|
|
21264
21160
|
markRuntimeRoot(root, runtimeId);
|
|
21265
|
-
proxy.$superdoc
|
|
21161
|
+
proxy.$superdoc["registerEditorRuntime"](adapter.runtime);
|
|
21266
21162
|
v2Runtimes.set(documentId, {
|
|
21267
21163
|
runtimeId,
|
|
21268
21164
|
adapter
|
|
21269
21165
|
});
|
|
21270
|
-
proxy.$superdoc
|
|
21166
|
+
proxy.$superdoc["setActiveRuntime"](runtimeId, "v2-editor-ready");
|
|
21271
21167
|
return true;
|
|
21272
21168
|
};
|
|
21273
21169
|
const v2ReviewWindowController = resolvedEditorIntegration.createReviewWindowController({ applyReviewWindow: (ctx, result) => commentsStore.applyReviewWindowFromV2?.({
|
|
@@ -21793,7 +21689,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21793
21689
|
if (!isV2Mode.value) return;
|
|
21794
21690
|
let handles = null;
|
|
21795
21691
|
try {
|
|
21796
|
-
handles = proxy.$superdoc?.activeEditor?.host?.getHandles?.() ?? null;
|
|
21692
|
+
handles = (proxy.$superdoc?.activeEditor)?.host?.getHandles?.() ?? null;
|
|
21797
21693
|
} catch {
|
|
21798
21694
|
handles = null;
|
|
21799
21695
|
}
|
|
@@ -21872,7 +21768,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21872
21768
|
syncV2SelectionToolbarState();
|
|
21873
21769
|
};
|
|
21874
21770
|
const getActiveV2MountContainer = () => {
|
|
21875
|
-
return v2GeometryRender.value?.mountContainer ?? proxy.$superdoc?.activeEditor?.mount?.container ?? null;
|
|
21771
|
+
return v2GeometryRender.value?.mountContainer ?? (proxy.$superdoc?.activeEditor)?.mount?.container ?? null;
|
|
21876
21772
|
};
|
|
21877
21773
|
const escapeCssIdent = (value) => {
|
|
21878
21774
|
const raw = String(value);
|
|
@@ -22383,7 +22279,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22383
22279
|
}
|
|
22384
22280
|
};
|
|
22385
22281
|
const activateRuntimeFromEvent = (event, reason) => {
|
|
22386
|
-
proxy.$superdoc?.activateRuntimeFromEventTarget?.(event.target, reason);
|
|
22282
|
+
proxy.$superdoc?.["activateRuntimeFromEventTarget"]?.(event.target, reason);
|
|
22387
22283
|
};
|
|
22388
22284
|
const handleRuntimeFocusIn = (event) => activateRuntimeFromEvent(event, "focusin");
|
|
22389
22285
|
const handleRuntimePointerDown = (event) => activateRuntimeFromEvent(event, "pointerdown");
|
|
@@ -22501,7 +22397,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22501
22397
|
commentHighlights: proxy.$superdoc.uiConfig.comments.highlights,
|
|
22502
22398
|
resolveTrackedChangeColor: composeAuthorColorResolver(proxy.$superdoc.config.modules?.trackChanges?.authorColors)
|
|
22503
22399
|
} : void 0,
|
|
22504
|
-
permissionResolver: createTrackedChangePermissionResolver(proxy.$superdoc)
|
|
22400
|
+
permissionResolver: require_create_super_doc_ui.createTrackedChangePermissionResolver(proxy.$superdoc)
|
|
22505
22401
|
};
|
|
22506
22402
|
};
|
|
22507
22403
|
const REPLAY_MUTABLE_COMMENT_FIELDS = /* @__PURE__ */ new Set([
|
|
@@ -22791,8 +22687,8 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22791
22687
|
if (!isCommentsEnabled.value) return false;
|
|
22792
22688
|
return !getConfig.value?.readOnly && selectionPosition.value;
|
|
22793
22689
|
});
|
|
22794
|
-
require__plugin_vue_export_helper.watch(showCommentsSidebar, (
|
|
22795
|
-
proxy.$superdoc.broadcastSidebarToggle(
|
|
22690
|
+
require__plugin_vue_export_helper.watch(() => Boolean(showCommentsSidebar.value), (isOpened) => {
|
|
22691
|
+
proxy.$superdoc.broadcastSidebarToggle(isOpened);
|
|
22796
22692
|
});
|
|
22797
22693
|
useViewportFit({
|
|
22798
22694
|
getSuperdoc: () => proxy.$superdoc,
|
|
@@ -22873,7 +22769,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
22873
22769
|
const activeElement = document.activeElement;
|
|
22874
22770
|
if (!(activeElement instanceof Node)) return false;
|
|
22875
22771
|
if (root?.contains(activeElement)) return true;
|
|
22876
|
-
const activeEditorDom = proxy.$superdoc?.activeEditor?.view?.dom;
|
|
22772
|
+
const activeEditorDom = (proxy.$superdoc?.activeEditor?.view)?.dom;
|
|
22877
22773
|
return activeEditorDom instanceof Node && (activeElement === activeEditorDom || activeEditorDom.contains?.(activeElement));
|
|
22878
22774
|
}
|
|
22879
22775
|
/**
|
|
@@ -23066,16 +22962,18 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23066
22962
|
resetSelection();
|
|
23067
22963
|
selectionLayer.value.style.pointerEvents = "auto";
|
|
23068
22964
|
require__plugin_vue_export_helper.nextTick(() => {
|
|
22965
|
+
const layer = selectionLayer.value;
|
|
22966
|
+
if (!layer) return;
|
|
23069
22967
|
isDragging.value = true;
|
|
23070
|
-
|
|
22968
|
+
layer.style.pointerEvents = "none";
|
|
23071
22969
|
const pageNumber = getPdfPageNumberFromEvent(e);
|
|
23072
|
-
|
|
22970
|
+
layer.style.pointerEvents = "auto";
|
|
23073
22971
|
if (!pageNumber) {
|
|
23074
22972
|
isDragging.value = false;
|
|
23075
|
-
|
|
22973
|
+
layer.style.pointerEvents = "none";
|
|
23076
22974
|
return;
|
|
23077
22975
|
}
|
|
23078
|
-
const layerBounds =
|
|
22976
|
+
const layerBounds = layer.getBoundingClientRect();
|
|
23079
22977
|
const zoom = activeZoom.value / 100;
|
|
23080
22978
|
const x = (e.clientX - layerBounds.left) / zoom;
|
|
23081
22979
|
const y = (e.clientY - layerBounds.top) / zoom;
|
|
@@ -23085,7 +22983,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23085
22983
|
page: pageNumber,
|
|
23086
22984
|
source: "pdf"
|
|
23087
22985
|
});
|
|
23088
|
-
|
|
22986
|
+
layer.addEventListener("mousemove", handleDragMove);
|
|
23089
22987
|
});
|
|
23090
22988
|
};
|
|
23091
22989
|
const handleDragMove = (e) => {
|
|
@@ -23160,7 +23058,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23160
23058
|
if (typeof container === "string") return (typeof document !== "undefined" ? document : globalThis.document)?.querySelector(container) ?? null;
|
|
23161
23059
|
return typeof HTMLElement !== "undefined" && container instanceof HTMLElement ? container : null;
|
|
23162
23060
|
};
|
|
23163
|
-
const getActiveV2DocumentId = () => proxy.$superdoc?.activeEditor?.documentId ?? proxy.$superdoc?.activeEditor?.options?.documentId ?? null;
|
|
23061
|
+
const getActiveV2DocumentId = () => (proxy.$superdoc?.activeEditor)?.documentId ?? proxy.$superdoc?.activeEditor?.options?.documentId ?? null;
|
|
23164
23062
|
const resolveV2RulerAlignmentContainer = () => {
|
|
23165
23063
|
if (resolvedRulerContainer.value) return resolveV2RulerContainer();
|
|
23166
23064
|
const activeDocumentId = getActiveV2DocumentId();
|
|
@@ -23551,7 +23449,10 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23551
23449
|
], 46, _hoisted_1$17);
|
|
23552
23450
|
};
|
|
23553
23451
|
}
|
|
23554
|
-
}
|
|
23452
|
+
});
|
|
23453
|
+
//#endregion
|
|
23454
|
+
//#region src/SuperDoc.vue
|
|
23455
|
+
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
23456
|
//#endregion
|
|
23556
23457
|
//#region src/core/create-app.js
|
|
23557
23458
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -38048,10 +37949,10 @@ var throttle = (func, wait, options) => {
|
|
|
38048
37949
|
return throttled;
|
|
38049
37950
|
};
|
|
38050
37951
|
//#endregion
|
|
38051
|
-
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
37952
|
+
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue?vue&type=script&setup=true&lang.ts
|
|
38052
37953
|
var _hoisted_1$16 = { class: "sd-toolbar-icon" };
|
|
38053
37954
|
var _hoisted_2$12 = ["innerHTML"];
|
|
38054
|
-
var
|
|
37955
|
+
var ToolbarButtonIcon_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38055
37956
|
__name: "ToolbarButtonIcon",
|
|
38056
37957
|
props: {
|
|
38057
37958
|
name: {
|
|
@@ -38087,10 +37988,12 @@ var _sfc_main$20 = {
|
|
|
38087
37988
|
}, null, 4)) : require__plugin_vue_export_helper.createCommentVNode("", true)]);
|
|
38088
37989
|
};
|
|
38089
37990
|
}
|
|
38090
|
-
};
|
|
38091
|
-
var ToolbarButtonIcon_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-65ecd5b1"]]);
|
|
37991
|
+
});
|
|
38092
37992
|
//#endregion
|
|
38093
|
-
//#region src/internal/toolbar/built-in/
|
|
37993
|
+
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
37994
|
+
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"]]);
|
|
37995
|
+
//#endregion
|
|
37996
|
+
//#region src/internal/toolbar/built-in/ToolbarButton.vue?vue&type=script&setup=true&lang.ts
|
|
38094
37997
|
var _hoisted_1$15 = [
|
|
38095
37998
|
"role",
|
|
38096
37999
|
"aria-label",
|
|
@@ -38117,7 +38020,7 @@ var _hoisted_11$1 = {
|
|
|
38117
38020
|
"aria-live": "polite",
|
|
38118
38021
|
class: "sd-visually-hidden"
|
|
38119
38022
|
};
|
|
38120
|
-
var
|
|
38023
|
+
var ToolbarButton_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38121
38024
|
__name: "ToolbarButton",
|
|
38122
38025
|
props: {
|
|
38123
38026
|
iconColor: {
|
|
@@ -38160,9 +38063,9 @@ var _sfc_main$19 = {
|
|
|
38160
38063
|
],
|
|
38161
38064
|
setup(__props, { emit: __emit }) {
|
|
38162
38065
|
const emit = __emit;
|
|
38163
|
-
const
|
|
38066
|
+
const proxy = require__plugin_vue_export_helper.getCurrentInstance()?.proxy;
|
|
38164
38067
|
const props = __props;
|
|
38165
|
-
const { name, active, icon, label, hideLabel, iconColor, hasCaret, splitButton, disabled, expand, inlineTextInputVisible, hasInlineTextInput,
|
|
38068
|
+
const { name, active, icon, label, hideLabel, iconColor, hasCaret, splitButton, disabled, expand, inlineTextInputVisible, hasInlineTextInput, style, attributes } = props.toolbarItem;
|
|
38166
38069
|
const isSplit = require__plugin_vue_export_helper.computed(() => Boolean(splitButton?.value) && Boolean(hasCaret?.value));
|
|
38167
38070
|
const itemName = require__plugin_vue_export_helper.computed(() => name?.value ?? "");
|
|
38168
38071
|
const inlineTextInput = require__plugin_vue_export_helper.ref("");
|
|
@@ -38274,17 +38177,13 @@ var _sfc_main$19 = {
|
|
|
38274
38177
|
}
|
|
38275
38178
|
if (itemName.value === "fontSize") require__plugin_vue_export_helper.nextTick(focusEditorSurface);
|
|
38276
38179
|
};
|
|
38277
|
-
const getStyle = require__plugin_vue_export_helper.computed(() => {
|
|
38278
|
-
if (style.value) return style.value;
|
|
38279
|
-
return { minWidth: props.minWidth };
|
|
38280
|
-
});
|
|
38281
38180
|
const caretIcon = require__plugin_vue_export_helper.computed(() => {
|
|
38282
38181
|
return expand?.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
|
|
38283
38182
|
});
|
|
38284
38183
|
return (_ctx, _cache) => {
|
|
38285
38184
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
38286
38185
|
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(
|
|
38186
|
+
style: require__plugin_vue_export_helper.normalizeStyle(require__plugin_vue_export_helper.unref(style)),
|
|
38288
38187
|
role: __props.isOverflowItem ? "menuitem" : "button",
|
|
38289
38188
|
"aria-label": require__plugin_vue_export_helper.unref(attributes).ariaLabel,
|
|
38290
38189
|
"aria-disabled": require__plugin_vue_export_helper.unref(disabled) ? "true" : void 0,
|
|
@@ -38388,8 +38287,10 @@ var _sfc_main$19 = {
|
|
|
38388
38287
|
], 10, _hoisted_2$11)], 46, _hoisted_1$15);
|
|
38389
38288
|
};
|
|
38390
38289
|
}
|
|
38391
|
-
};
|
|
38392
|
-
|
|
38290
|
+
});
|
|
38291
|
+
//#endregion
|
|
38292
|
+
//#region src/internal/toolbar/built-in/ToolbarButton.vue
|
|
38293
|
+
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
38294
|
//#endregion
|
|
38394
38295
|
//#region src/internal/toolbar/built-in/ToolbarSeparator.vue
|
|
38395
38296
|
var _hoisted_1$14 = {
|
|
@@ -38397,7 +38298,7 @@ var _hoisted_1$14 = {
|
|
|
38397
38298
|
role: "separator",
|
|
38398
38299
|
"aria-label": "Toolbar separator"
|
|
38399
38300
|
};
|
|
38400
|
-
var _sfc_main$
|
|
38301
|
+
var _sfc_main$13 = {
|
|
38401
38302
|
__name: "ToolbarSeparator",
|
|
38402
38303
|
props: { active: {
|
|
38403
38304
|
type: Boolean,
|
|
@@ -38418,9 +38319,9 @@ var _sfc_main$18 = {
|
|
|
38418
38319
|
};
|
|
38419
38320
|
}
|
|
38420
38321
|
};
|
|
38421
|
-
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
38322
|
+
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$13, [["__scopeId", "data-v-cb82253a"]]);
|
|
38422
38323
|
//#endregion
|
|
38423
|
-
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
38324
|
+
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
38424
38325
|
var _hoisted_1$13 = { class: "toolbar-dropdown" };
|
|
38425
38326
|
var _hoisted_2$10 = ["data-superdoc-ui-owner"];
|
|
38426
38327
|
var _hoisted_3$9 = ["onClick"];
|
|
@@ -38430,7 +38331,7 @@ var _hoisted_4$7 = {
|
|
|
38430
38331
|
};
|
|
38431
38332
|
var _hoisted_5$5 = { class: "toolbar-dropdown-option__label" };
|
|
38432
38333
|
var TRIGGER_FOCUS_SELECTOR = "button, [href], input, select, textarea, [role=\"button\"], [tabindex]:not([tabindex=\"-1\"])";
|
|
38433
|
-
var
|
|
38334
|
+
var ToolbarDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
38434
38335
|
__name: "ToolbarDropdown",
|
|
38435
38336
|
props: {
|
|
38436
38337
|
options: {
|
|
@@ -38587,7 +38488,7 @@ var _sfc_main$17 = {
|
|
|
38587
38488
|
if (!value) return false;
|
|
38588
38489
|
if (typeof value === "string") return value.split(/\s+/).includes("sd-selected");
|
|
38589
38490
|
if (Array.isArray(value)) return value.some(classHasSelected);
|
|
38590
|
-
if (typeof value === "object") return Boolean(value["sd-selected"]);
|
|
38491
|
+
if (typeof value === "object") return "sd-selected" in value && Boolean(value["sd-selected"]);
|
|
38591
38492
|
return false;
|
|
38592
38493
|
};
|
|
38593
38494
|
const isOptionSelected = (option) => {
|
|
@@ -38819,8 +38720,10 @@ var _sfc_main$17 = {
|
|
|
38819
38720
|
})], 8, ["to"]))]);
|
|
38820
38721
|
};
|
|
38821
38722
|
}
|
|
38822
|
-
};
|
|
38823
|
-
|
|
38723
|
+
});
|
|
38724
|
+
//#endregion
|
|
38725
|
+
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
38726
|
+
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
38727
|
//#endregion
|
|
38825
38728
|
//#region src/internal/toolbar/built-in/toolbar-focus-helpers.js
|
|
38826
38729
|
var preventEditorFocusTransfer = (event) => {
|
|
@@ -38844,7 +38747,7 @@ var refocusEditorSurface = (superToolbar, preferredEditor = null) => {
|
|
|
38844
38747
|
};
|
|
38845
38748
|
//#endregion
|
|
38846
38749
|
//#region src/internal/toolbar/built-in/OverflowMenu.vue
|
|
38847
|
-
var _sfc_main$
|
|
38750
|
+
var _sfc_main$12 = {
|
|
38848
38751
|
__name: "OverflowMenu",
|
|
38849
38752
|
props: {
|
|
38850
38753
|
toolbarItem: {
|
|
@@ -38941,7 +38844,7 @@ var _sfc_main$16 = {
|
|
|
38941
38844
|
};
|
|
38942
38845
|
}
|
|
38943
38846
|
};
|
|
38944
|
-
var OverflowMenu_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
38847
|
+
var OverflowMenu_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$12, [["__scopeId", "data-v-1227fcf9"]]);
|
|
38945
38848
|
//#endregion
|
|
38946
38849
|
//#region src/internal/toolbar/built-in/font-typeahead.js
|
|
38947
38850
|
/**
|
|
@@ -39044,7 +38947,7 @@ var normalizeCustomFontSize = (value) => {
|
|
|
39044
38947
|
return String(Math.min(halfPoint, MAX_FONT_SIZE));
|
|
39045
38948
|
};
|
|
39046
38949
|
//#endregion
|
|
39047
|
-
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
38950
|
+
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue?vue&type=script&setup=true&lang.ts
|
|
39048
38951
|
var _hoisted_1$12 = ["data-item"];
|
|
39049
38952
|
var _hoisted_2$9 = [
|
|
39050
38953
|
"id",
|
|
@@ -39079,7 +38982,7 @@ var _hoisted_8$1 = {
|
|
|
39079
38982
|
class: "sd-button-label sd-font-combobox__legacy-label",
|
|
39080
38983
|
"aria-hidden": "true"
|
|
39081
38984
|
};
|
|
39082
|
-
var
|
|
38985
|
+
var ToolbarComboBox_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
39083
38986
|
__name: "ToolbarComboBox",
|
|
39084
38987
|
props: {
|
|
39085
38988
|
item: {
|
|
@@ -39565,11 +39468,13 @@ var _sfc_main$15 = {
|
|
|
39565
39468
|
], 14, _hoisted_1$12);
|
|
39566
39469
|
};
|
|
39567
39470
|
}
|
|
39568
|
-
};
|
|
39569
|
-
|
|
39471
|
+
});
|
|
39472
|
+
//#endregion
|
|
39473
|
+
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
39474
|
+
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
39475
|
//#endregion
|
|
39571
39476
|
//#region src/internal/toolbar/built-in/FontFamilyCombobox.vue
|
|
39572
|
-
var _sfc_main$
|
|
39477
|
+
var _sfc_main$11 = {
|
|
39573
39478
|
__name: "FontFamilyCombobox",
|
|
39574
39479
|
props: {
|
|
39575
39480
|
item: {
|
|
@@ -39610,7 +39515,7 @@ var _sfc_main$14 = {
|
|
|
39610
39515
|
};
|
|
39611
39516
|
//#endregion
|
|
39612
39517
|
//#region src/internal/toolbar/built-in/FontSizeCombobox.vue
|
|
39613
|
-
var _sfc_main$
|
|
39518
|
+
var _sfc_main$10 = {
|
|
39614
39519
|
__name: "FontSizeCombobox",
|
|
39615
39520
|
props: {
|
|
39616
39521
|
item: {
|
|
@@ -39650,9 +39555,10 @@ var _sfc_main$13 = {
|
|
|
39650
39555
|
}
|
|
39651
39556
|
};
|
|
39652
39557
|
//#endregion
|
|
39653
|
-
//#region src/internal/toolbar/built-in/SdTooltip.vue
|
|
39558
|
+
//#region src/internal/toolbar/built-in/SdTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
39654
39559
|
var AUTO_HIDE_DELAY = 2500;
|
|
39655
|
-
var
|
|
39560
|
+
var SdTooltip_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
39561
|
+
inheritAttrs: false,
|
|
39656
39562
|
__name: "SdTooltip",
|
|
39657
39563
|
props: {
|
|
39658
39564
|
trigger: {
|
|
@@ -39867,7 +39773,9 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
39867
39773
|
};
|
|
39868
39774
|
}
|
|
39869
39775
|
});
|
|
39870
|
-
|
|
39776
|
+
//#endregion
|
|
39777
|
+
//#region src/internal/toolbar/built-in/SdTooltip.vue
|
|
39778
|
+
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
39779
|
//#endregion
|
|
39872
39780
|
//#region src/internal/toolbar/built-in/ButtonGroup.vue
|
|
39873
39781
|
var _hoisted_1$11 = [
|
|
@@ -39880,7 +39788,7 @@ var _hoisted_3$7 = { key: 0 };
|
|
|
39880
39788
|
var _hoisted_4$5 = { key: 0 };
|
|
39881
39789
|
var _hoisted_5$3 = { key: 0 };
|
|
39882
39790
|
var _hoisted_6$2 = { key: 0 };
|
|
39883
|
-
var _sfc_main$
|
|
39791
|
+
var _sfc_main$9 = {
|
|
39884
39792
|
__name: "ButtonGroup",
|
|
39885
39793
|
props: {
|
|
39886
39794
|
toolbarItems: {
|
|
@@ -40255,7 +40163,7 @@ var _sfc_main$11 = {
|
|
|
40255
40163
|
disabled: !item.tooltip?.value,
|
|
40256
40164
|
"content-style": { fontFamily: props.uiFontFamily }
|
|
40257
40165
|
}, {
|
|
40258
|
-
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$
|
|
40166
|
+
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$11, {
|
|
40259
40167
|
item,
|
|
40260
40168
|
"ui-font-family": props.uiFontFamily,
|
|
40261
40169
|
class: "sd-toolbar-button sd-editor-toolbar-dropdown",
|
|
@@ -40272,7 +40180,7 @@ var _sfc_main$11 = {
|
|
|
40272
40180
|
disabled: !item.tooltip?.value,
|
|
40273
40181
|
"content-style": { fontFamily: props.uiFontFamily }
|
|
40274
40182
|
}, {
|
|
40275
|
-
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$
|
|
40183
|
+
trigger: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createVNode(_sfc_main$10, {
|
|
40276
40184
|
item,
|
|
40277
40185
|
"ui-font-family": props.uiFontFamily,
|
|
40278
40186
|
class: "sd-toolbar-button sd-editor-toolbar-dropdown",
|
|
@@ -40371,7 +40279,7 @@ var _sfc_main$11 = {
|
|
|
40371
40279
|
};
|
|
40372
40280
|
}
|
|
40373
40281
|
};
|
|
40374
|
-
var ButtonGroup_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
40282
|
+
var ButtonGroup_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$9, [["__scopeId", "data-v-fb216897"]]);
|
|
40375
40283
|
var TOOLBAR_FONTS = [
|
|
40376
40284
|
["Arial", "sans-serif"],
|
|
40377
40285
|
["Arial Black", "sans-serif"],
|
|
@@ -40778,7 +40686,6 @@ var useToolbarItem = (options) => {
|
|
|
40778
40686
|
const style = require__plugin_vue_export_helper.ref(options.style);
|
|
40779
40687
|
const isNarrow = require__plugin_vue_export_helper.ref(options.isNarrow);
|
|
40780
40688
|
const isWide = require__plugin_vue_export_helper.ref(options.isWide);
|
|
40781
|
-
const minWidth = require__plugin_vue_export_helper.ref(options.minWidth);
|
|
40782
40689
|
const layoutWidth = require__plugin_vue_export_helper.ref(options.layoutWidth);
|
|
40783
40690
|
const suppressActiveHighlight = require__plugin_vue_export_helper.ref(options.suppressActiveHighlight || false);
|
|
40784
40691
|
const argument = require__plugin_vue_export_helper.ref(options.argument);
|
|
@@ -40855,7 +40762,6 @@ var useToolbarItem = (options) => {
|
|
|
40855
40762
|
style,
|
|
40856
40763
|
isNarrow,
|
|
40857
40764
|
isWide,
|
|
40858
|
-
minWidth,
|
|
40859
40765
|
layoutWidth,
|
|
40860
40766
|
argument,
|
|
40861
40767
|
parentItem,
|
|
@@ -40996,7 +40902,7 @@ var _hoisted_1$8 = [
|
|
|
40996
40902
|
"aria-label",
|
|
40997
40903
|
"onKeydown"
|
|
40998
40904
|
];
|
|
40999
|
-
var _sfc_main$
|
|
40905
|
+
var _sfc_main$6 = {
|
|
41000
40906
|
__name: "StyleButtonsList",
|
|
41001
40907
|
props: {
|
|
41002
40908
|
buttons: {
|
|
@@ -41081,7 +40987,7 @@ var _sfc_main$8 = {
|
|
|
41081
40987
|
};
|
|
41082
40988
|
}
|
|
41083
40989
|
};
|
|
41084
|
-
var StyleButtonsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
40990
|
+
var StyleButtonsList_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$6, [["__scopeId", "data-v-44f37ff6"]]);
|
|
41085
40991
|
//#endregion
|
|
41086
40992
|
//#region src/internal/toolbar/built-in/list-style-buttons.js
|
|
41087
40993
|
var bulletStyleButtons = [
|
|
@@ -41151,7 +41057,7 @@ var _hoisted_3$6 = ["innerHTML"];
|
|
|
41151
41057
|
var _hoisted_4$4 = { class: "document-mode-column text-column" };
|
|
41152
41058
|
var _hoisted_5$2 = { class: "document-mode-type" };
|
|
41153
41059
|
var _hoisted_6$1 = { class: "document-mode-description" };
|
|
41154
|
-
var _sfc_main$
|
|
41060
|
+
var _sfc_main$5 = {
|
|
41155
41061
|
__name: "DocumentMode",
|
|
41156
41062
|
props: { options: { type: Array } },
|
|
41157
41063
|
emits: ["select"],
|
|
@@ -41216,9 +41122,9 @@ var _sfc_main$7 = {
|
|
|
41216
41122
|
};
|
|
41217
41123
|
}
|
|
41218
41124
|
};
|
|
41219
|
-
var DocumentMode_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41125
|
+
var DocumentMode_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$5, [["__scopeId", "data-v-bee14d7a"]]);
|
|
41220
41126
|
//#endregion
|
|
41221
|
-
//#region src/internal/toolbar/built-in/LinkedStyle.vue
|
|
41127
|
+
//#region src/internal/toolbar/built-in/LinkedStyle.vue?vue&type=script&setup=true&lang.ts
|
|
41222
41128
|
var _hoisted_1$6 = {
|
|
41223
41129
|
class: "linked-style-buttons",
|
|
41224
41130
|
"data-editor-ui-surface": ""
|
|
@@ -41248,7 +41154,7 @@ var _hoisted_4$3 = ["innerHTML"];
|
|
|
41248
41154
|
* (`data-item="btn-linkedStyles-option"`, keyboard navigation) and makes no
|
|
41249
41155
|
* v1-only shape assumptions.
|
|
41250
41156
|
*/
|
|
41251
|
-
var
|
|
41157
|
+
var LinkedStyle_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
41252
41158
|
__name: "LinkedStyle",
|
|
41253
41159
|
props: {
|
|
41254
41160
|
styles: {
|
|
@@ -41349,8 +41255,10 @@ var _sfc_main$6 = {
|
|
|
41349
41255
|
}), 128))]);
|
|
41350
41256
|
};
|
|
41351
41257
|
}
|
|
41352
|
-
};
|
|
41353
|
-
|
|
41258
|
+
});
|
|
41259
|
+
//#endregion
|
|
41260
|
+
//#region src/internal/toolbar/built-in/LinkedStyle.vue
|
|
41261
|
+
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
41262
|
//#endregion
|
|
41355
41263
|
//#region src/internal/toolbar/built-in/AIWriter.vue
|
|
41356
41264
|
var _hoisted_1$5 = ["placeholder"];
|
|
@@ -41363,7 +41271,7 @@ var _hoisted_3$4 = {
|
|
|
41363
41271
|
var _hoisted_4$2 = ["disabled"];
|
|
41364
41272
|
var DEFAULT_AI_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
41365
41273
|
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$
|
|
41274
|
+
var _sfc_main$4 = {
|
|
41367
41275
|
__name: "AIWriter",
|
|
41368
41276
|
props: {
|
|
41369
41277
|
selectedText: {
|
|
@@ -41521,7 +41429,7 @@ var _sfc_main$5 = {
|
|
|
41521
41429
|
};
|
|
41522
41430
|
}
|
|
41523
41431
|
};
|
|
41524
|
-
var AIWriter_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41432
|
+
var AIWriter_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$4, [["__scopeId", "data-v-67f6c6f7"]]);
|
|
41525
41433
|
//#endregion
|
|
41526
41434
|
//#region src/internal/toolbar/built-in/IconGridRow.vue
|
|
41527
41435
|
var _hoisted_1$4 = [
|
|
@@ -41532,7 +41440,7 @@ var _hoisted_1$4 = [
|
|
|
41532
41440
|
var _hoisted_2$4 = ["innerHTML"];
|
|
41533
41441
|
var _hoisted_3$3 = ["innerHTML"];
|
|
41534
41442
|
var ROW_SIZE$1 = 7;
|
|
41535
|
-
var _sfc_main$
|
|
41443
|
+
var _sfc_main$3 = {
|
|
41536
41444
|
__name: "IconGridRow",
|
|
41537
41445
|
props: {
|
|
41538
41446
|
icons: {
|
|
@@ -41659,7 +41567,7 @@ var _sfc_main$4 = {
|
|
|
41659
41567
|
};
|
|
41660
41568
|
}
|
|
41661
41569
|
};
|
|
41662
|
-
var IconGridRow_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41570
|
+
var IconGridRow_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$3, [["__scopeId", "data-v-05eb02fc"]]);
|
|
41663
41571
|
//#endregion
|
|
41664
41572
|
//#region ../../shared/common/icons/droplet-slash.svg?raw
|
|
41665
41573
|
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 +41576,7 @@ var droplet_slash_default = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\
|
|
|
41668
41576
|
var _hoisted_1$3 = { class: "options-grid-wrap" };
|
|
41669
41577
|
var _hoisted_2$3 = ["innerHTML"];
|
|
41670
41578
|
var _hoisted_3$2 = { class: "option-grid-ctn" };
|
|
41671
|
-
var _sfc_main$
|
|
41579
|
+
var _sfc_main$2 = {
|
|
41672
41580
|
__name: "IconGrid",
|
|
41673
41581
|
props: {
|
|
41674
41582
|
icons: {
|
|
@@ -41716,7 +41624,7 @@ var _sfc_main$3 = {
|
|
|
41716
41624
|
};
|
|
41717
41625
|
}
|
|
41718
41626
|
};
|
|
41719
|
-
var IconGrid_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$
|
|
41627
|
+
var IconGrid_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$2, [["__scopeId", "data-v-52b0283a"]]);
|
|
41720
41628
|
//#endregion
|
|
41721
41629
|
//#region src/internal/toolbar/built-in/color-dropdown-helpers.js
|
|
41722
41630
|
var closeDropdown$1 = (dropdown) => {
|
|
@@ -41962,7 +41870,7 @@ var _hoisted_2$1 = [
|
|
|
41962
41870
|
var _hoisted_3$1 = { class: "toolbar-table-actions__icon" };
|
|
41963
41871
|
var _hoisted_4$1 = ["innerHTML"];
|
|
41964
41872
|
var _hoisted_5$1 = { class: "toolbar-table-actions__label" };
|
|
41965
|
-
var _sfc_main
|
|
41873
|
+
var _sfc_main = {
|
|
41966
41874
|
__name: "TableActions",
|
|
41967
41875
|
props: { options: { type: Array } },
|
|
41968
41876
|
emits: ["select"],
|
|
@@ -41992,9 +41900,9 @@ var _sfc_main$1 = {
|
|
|
41992
41900
|
};
|
|
41993
41901
|
}
|
|
41994
41902
|
};
|
|
41995
|
-
var TableActions_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main
|
|
41903
|
+
var TableActions_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main, [["__scopeId", "data-v-72123aae"]]);
|
|
41996
41904
|
//#endregion
|
|
41997
|
-
//#region src/internal/toolbar/built-in/PageNumberMenu.vue
|
|
41905
|
+
//#region src/internal/toolbar/built-in/PageNumberMenu.vue?vue&type=script&setup=true&lang.ts
|
|
41998
41906
|
var _hoisted_1 = ["aria-busy"];
|
|
41999
41907
|
var _hoisted_2 = ["aria-disabled"];
|
|
42000
41908
|
var _hoisted_3 = {
|
|
@@ -42042,7 +41950,7 @@ var _hoisted_20 = ["disabled"];
|
|
|
42042
41950
|
var _hoisted_21 = ["disabled"];
|
|
42043
41951
|
var _hoisted_22 = ["disabled"];
|
|
42044
41952
|
var _hoisted_23 = { class: "sd-page-number-menu__cursor-text" };
|
|
42045
|
-
var
|
|
41953
|
+
var PageNumberMenu_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
42046
41954
|
__name: "PageNumberMenu",
|
|
42047
41955
|
props: {
|
|
42048
41956
|
/** Command state of `page-numbers-apply`, read when the popover opens. */
|
|
@@ -42171,7 +42079,7 @@ var _sfc_main = {
|
|
|
42171
42079
|
const { isHighContrastMode } = useHighContrastMode();
|
|
42172
42080
|
const remembered = props.initialChoice ?? {};
|
|
42173
42081
|
const position = require__plugin_vue_export_helper.ref(remembered.position === "top" ? "top" : "bottom");
|
|
42174
|
-
const alignment = require__plugin_vue_export_helper.ref(
|
|
42082
|
+
const alignment = require__plugin_vue_export_helper.ref(isAlignment(remembered.alignment) ? remembered.alignment : "right");
|
|
42175
42083
|
const showOnFirstPage = require__plugin_vue_export_helper.ref(remembered.showOnFirstPage !== false);
|
|
42176
42084
|
const format = require__plugin_vue_export_helper.ref("decimal");
|
|
42177
42085
|
const restart = require__plugin_vue_export_helper.ref(false);
|
|
@@ -42206,6 +42114,9 @@ var _sfc_main = {
|
|
|
42206
42114
|
const platform = typeof navigator === "undefined" ? "" : navigator.platform || navigator.userAgent || "";
|
|
42207
42115
|
return /Mac|iPhone|iPad/i.test(platform) ? "⌥⇧⌘P" : "Ctrl+Alt+Shift+P";
|
|
42208
42116
|
});
|
|
42117
|
+
function isAlignment(value) {
|
|
42118
|
+
return ALIGNMENTS.some((entry) => entry.value === value);
|
|
42119
|
+
}
|
|
42209
42120
|
function isTileSelected(tile) {
|
|
42210
42121
|
return tile.position === position.value && tile.alignment === alignment.value;
|
|
42211
42122
|
}
|
|
@@ -42275,8 +42186,12 @@ var _sfc_main = {
|
|
|
42275
42186
|
const value = Math.floor(Number(startAt.value));
|
|
42276
42187
|
return Number.isFinite(value) && value >= 0 ? value : 1;
|
|
42277
42188
|
}
|
|
42189
|
+
function failureDetails(result) {
|
|
42190
|
+
if (typeof result !== "object" || result === null || result.success) return null;
|
|
42191
|
+
return require_create_super_doc_ui.isPlainObject(result.failure?.details) ? result.failure.details : null;
|
|
42192
|
+
}
|
|
42278
42193
|
function failureMessage(result, action) {
|
|
42279
|
-
const details = result
|
|
42194
|
+
const details = failureDetails(result);
|
|
42280
42195
|
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
42196
|
if (details?.reason === "page-number-exists") return "This section already has page numbers.";
|
|
42282
42197
|
if (action === "remove") return "Page numbers couldn’t be removed. Try again.";
|
|
@@ -42294,7 +42209,7 @@ var _sfc_main = {
|
|
|
42294
42209
|
await loaded;
|
|
42295
42210
|
const { execute, outcome } = prepare();
|
|
42296
42211
|
const result = await execute();
|
|
42297
|
-
if (result === true || result
|
|
42212
|
+
if (result === true || typeof result === "object" && result !== null && result.success === true) {
|
|
42298
42213
|
props.close(outcome);
|
|
42299
42214
|
return;
|
|
42300
42215
|
}
|
|
@@ -42344,8 +42259,9 @@ var _sfc_main = {
|
|
|
42344
42259
|
}
|
|
42345
42260
|
require__plugin_vue_export_helper.onMounted(() => {
|
|
42346
42261
|
require__plugin_vue_export_helper.nextTick(() => tileRefs.value[focusIndex.value]?.focus({ preventScroll: true }));
|
|
42347
|
-
|
|
42348
|
-
|
|
42262
|
+
const loadCurrent = props.loadCurrent;
|
|
42263
|
+
if (typeof loadCurrent !== "function") return;
|
|
42264
|
+
loaded = Promise.resolve().then(() => loadCurrent()).then(adoptCurrent, () => adoptCurrent(null)).finally(() => {
|
|
42349
42265
|
loading.value = false;
|
|
42350
42266
|
});
|
|
42351
42267
|
});
|
|
@@ -42384,7 +42300,7 @@ var _sfc_main = {
|
|
|
42384
42300
|
onClick: ($event) => selectTile(tile),
|
|
42385
42301
|
onDblclick: applyPageNumbers,
|
|
42386
42302
|
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-
|
|
42303
|
+
}, [(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
42304
|
class: "sd-page-number-menu__chip",
|
|
42389
42305
|
x: CHIP_X[tile.alignment],
|
|
42390
42306
|
y: CHIP_Y[tile.position],
|
|
@@ -42464,8 +42380,10 @@ var _sfc_main = {
|
|
|
42464
42380
|
], 10, _hoisted_1);
|
|
42465
42381
|
};
|
|
42466
42382
|
}
|
|
42467
|
-
};
|
|
42468
|
-
|
|
42383
|
+
});
|
|
42384
|
+
//#endregion
|
|
42385
|
+
//#region src/internal/toolbar/built-in/PageNumberMenu.vue
|
|
42386
|
+
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
42387
|
//#endregion
|
|
42470
42388
|
//#region src/internal/toolbar/built-in/page-number-feedback.js
|
|
42471
42389
|
var FLASH_CLASS = "sd-page-number-flash";
|
|
@@ -45298,7 +45216,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45298
45216
|
}
|
|
45299
45217
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45300
45218
|
this.colorIndex = 0;
|
|
45301
|
-
this.version = "2.
|
|
45219
|
+
this.version = "2.29.0-next.1";
|
|
45302
45220
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45303
45221
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45304
45222
|
this.colors = this.config.colors ?? [];
|
|
@@ -46682,7 +46600,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46682
46600
|
const getValues = storeComment?.getValues;
|
|
46683
46601
|
resolvedComment = typeof getValues === "function" ? getValues.call(storeComment) : storeComment;
|
|
46684
46602
|
}
|
|
46685
|
-
return isAllowed(permission, role, isInternal, {
|
|
46603
|
+
return require_create_super_doc_ui.isAllowed(permission, role, isInternal, {
|
|
46686
46604
|
superdoc: this,
|
|
46687
46605
|
currentUser: this.config.user,
|
|
46688
46606
|
comment: resolvedComment ?? null,
|
|
@@ -47090,7 +47008,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47090
47008
|
* superdoc.setZoom(50); // Set zoom to 50%
|
|
47091
47009
|
*/
|
|
47092
47010
|
setZoom(percent) {
|
|
47093
|
-
if (
|
|
47011
|
+
if (!require_is_finite_number.isFiniteNumber(percent) || percent <= 0) {
|
|
47094
47012
|
console.warn("[SuperDoc] setZoom expects a positive number representing percentage");
|
|
47095
47013
|
return;
|
|
47096
47014
|
}
|