superdoc 2.25.0-next.14 → 2.25.0-next.16
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/{create-super-doc-ui-ABeUNZlq.cjs → create-super-doc-ui-BbTRF-Z9.cjs} +13 -3
- package/dist/chunks/{create-super-doc-ui-CCNvH6mr.es.js → create-super-doc-ui-Cr_04XnJ.es.js} +13 -3
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/types/receipt.d.ts +10 -0
- package/dist/public/ui-react.cjs +5 -1
- package/dist/public/ui-react.es.js +5 -1
- package/dist/public/ui-vue.cjs +5 -1
- package/dist/public/ui-vue.es.js +5 -1
- package/dist/public/ui.cjs +16 -1
- package/dist/public/ui.es.js +16 -2
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/SuperDoc.d.ts +2 -1
- package/dist/superdoc/src/core/types/index.d.ts +8 -3
- package/dist/superdoc/src/public/ui/rejection-reasons.d.ts +1 -0
- package/dist/superdoc/src/public/ui/types.d.ts +9 -4
- package/dist/superdoc/src/public/ui.d.cts +9 -0
- package/dist/superdoc/src/public/ui.d.ts +2 -1
- package/dist/superdoc.cjs +88 -155
- package/dist/superdoc.es.js +66 -132
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +39 -39
- package/package.json +2 -2
- package/dist/superdoc/src/components/HtmlViewer/HtmlViewer.vue.d.ts +0 -10
package/dist/superdoc.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
|
|
2
2
|
import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
|
|
3
|
-
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-
|
|
3
|
+
import { c as createImageFilePicker, d as DOM_CLASS_NAMES, f as closeInteractionHistory, g as recordInteraction, h as isWorkflowRecordingEnabled, i as registerFirstPartyCommandMutation, l as resolveImageSrc, m as getWorkflowRecording, n as executeFirstPartyCommandAsync, o as applyV2CommentInvalidationFromMutation, p as createInteractionHistory, r as readFirstPartyPageNumbers, s as getV2TrackedChangeMutationImpact, t as createSuperDocUI } from "./chunks/create-super-doc-ui-Cr_04XnJ.es.js";
|
|
4
4
|
import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
|
|
5
5
|
import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
|
|
6
6
|
import { $ as vModelText, A as onActivated, B as renderSlot, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRaw$2, H as resolveDynamicComponent, I as provide$1, J as unref, K as toRef, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelSelect, R as ref, S as isReactive$1, T as mergeProps, U as shallowRef$1, V as resolveDirective, W as toDisplayString, X as useSlots, Y as useAttrs, Z as vModelCheckbox, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as watch$1, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withModifiers, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withDirectives, o as createApp, p as createVNode, q as toRefs, r as Teleport, rt as withKeys, s as createBlock, t as _plugin_vue_export_helper_default, tt as withCtx, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderList } from "./chunks/_plugin-vue_export-helper-7ZiLY07t.es.js";
|
|
@@ -302,7 +302,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
302
302
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
303
303
|
function getSuperdocVersion() {
|
|
304
304
|
try {
|
|
305
|
-
return "2.25.0-next.
|
|
305
|
+
return "2.25.0-next.16";
|
|
306
306
|
} catch {
|
|
307
307
|
return "unknown";
|
|
308
308
|
}
|
|
@@ -6785,6 +6785,11 @@ var useSuperdocStore = defineStore("superdoc", () => {
|
|
|
6785
6785
|
*/
|
|
6786
6786
|
const _initializeDocumentData = async (doc) => {
|
|
6787
6787
|
doc = normalizeDocumentEntry(doc);
|
|
6788
|
+
const documentType = doc.data?.type || doc.type;
|
|
6789
|
+
if (typeof documentType === "string") {
|
|
6790
|
+
const mimeType = documentType.split(";", 1)[0].trim().toLowerCase();
|
|
6791
|
+
if (mimeType === "text/html" || mimeType === "html") throw new Error("SuperDoc: HTML document viewing is not supported. Open a DOCX or PDF document.");
|
|
6792
|
+
}
|
|
6788
6793
|
if (currentConfig.value?.html) doc.html = currentConfig.value.html;
|
|
6789
6794
|
if (!doc.data && doc.url && !doc.type) doc.type = DOCX;
|
|
6790
6795
|
if (currentConfig.value?.modules.collaboration && !doc.isNewFile) return {
|
|
@@ -12236,9 +12241,9 @@ function useUiFontFamily() {
|
|
|
12236
12241
|
}
|
|
12237
12242
|
//#endregion
|
|
12238
12243
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
12239
|
-
var _hoisted_1$
|
|
12240
|
-
var _hoisted_2$
|
|
12241
|
-
var _hoisted_3$
|
|
12244
|
+
var _hoisted_1$31 = { class: "comments-dropdown" };
|
|
12245
|
+
var _hoisted_2$24 = ["onClick"];
|
|
12246
|
+
var _hoisted_3$20 = {
|
|
12242
12247
|
key: 0,
|
|
12243
12248
|
class: "comments-dropdown__option-icon"
|
|
12244
12249
|
};
|
|
@@ -12367,7 +12372,7 @@ var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12367
12372
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
12368
12373
|
});
|
|
12369
12374
|
return (_ctx, _cache) => {
|
|
12370
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12375
|
+
return openBlock(), createElementBlock("div", _hoisted_1$31, [createElementVNode("div", {
|
|
12371
12376
|
ref_key: "triggerRef",
|
|
12372
12377
|
ref: triggerRef,
|
|
12373
12378
|
class: "comments-dropdown__trigger",
|
|
@@ -12383,22 +12388,22 @@ var CommentsDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12383
12388
|
key: option.key,
|
|
12384
12389
|
class: normalizeClass(["comments-dropdown__option", { "sd-disabled": option.disabled }]),
|
|
12385
12390
|
onClick: ($event) => onOptionClick(option)
|
|
12386
|
-
}, [hasIcon(option) ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
12391
|
+
}, [hasIcon(option) ? (openBlock(), createElementBlock("span", _hoisted_3$20, [option.iconString ? (openBlock(), createElementBlock("span", {
|
|
12387
12392
|
key: 0,
|
|
12388
12393
|
innerHTML: option.iconString
|
|
12389
12394
|
}, null, 8, _hoisted_4$14)) : (openBlock(), createBlock(unref(OptionIcon), {
|
|
12390
12395
|
key: 1,
|
|
12391
12396
|
option
|
|
12392
|
-
}, null, 8, ["option"]))])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$11, toDisplayString(option.label), 1)], 10, _hoisted_2$
|
|
12397
|
+
}, null, 8, ["option"]))])) : createCommentVNode("", true), createElementVNode("span", _hoisted_5$11, toDisplayString(option.label), 1)], 10, _hoisted_2$24);
|
|
12393
12398
|
}), 128))], 4)) : createCommentVNode("", true)]))]);
|
|
12394
12399
|
};
|
|
12395
12400
|
}
|
|
12396
12401
|
}, [["__scopeId", "data-v-7eced80a"]]);
|
|
12397
12402
|
//#endregion
|
|
12398
12403
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
12399
|
-
var _hoisted_1$
|
|
12400
|
-
var _hoisted_2$
|
|
12401
|
-
var _hoisted_3$
|
|
12404
|
+
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
12405
|
+
var _hoisted_2$23 = ["innerHTML"];
|
|
12406
|
+
var _hoisted_3$19 = { class: "sd-option-state" };
|
|
12402
12407
|
var _hoisted_4$13 = ["innerHTML"];
|
|
12403
12408
|
var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
12404
12409
|
__name: "InternalDropdown",
|
|
@@ -12467,12 +12472,12 @@ var InternalDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12467
12472
|
disabled: __props.isDisabled,
|
|
12468
12473
|
"content-style": { fontFamily: unref(uiFontFamily) }
|
|
12469
12474
|
}, {
|
|
12470
|
-
default: withCtx(() => [createElementVNode("div", _hoisted_1$
|
|
12475
|
+
default: withCtx(() => [createElementVNode("div", _hoisted_1$30, [
|
|
12471
12476
|
createElementVNode("div", {
|
|
12472
12477
|
class: "sd-active-icon",
|
|
12473
12478
|
innerHTML: activeIcon.value
|
|
12474
|
-
}, null, 8, _hoisted_2$
|
|
12475
|
-
createElementVNode("div", _hoisted_3$
|
|
12479
|
+
}, null, 8, _hoisted_2$23),
|
|
12480
|
+
createElementVNode("div", _hoisted_3$19, toDisplayString(getState.value), 1),
|
|
12476
12481
|
createElementVNode("div", {
|
|
12477
12482
|
class: "sd-dropdown-caret",
|
|
12478
12483
|
innerHTML: unref(superdocIcons).caretDown
|
|
@@ -12632,9 +12637,9 @@ var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
|
12632
12637
|
};
|
|
12633
12638
|
//#endregion
|
|
12634
12639
|
//#region src/components/general/Avatar.vue
|
|
12635
|
-
var _hoisted_1$
|
|
12636
|
-
var _hoisted_2$
|
|
12637
|
-
var _hoisted_3$
|
|
12640
|
+
var _hoisted_1$29 = { class: "user-container" };
|
|
12641
|
+
var _hoisted_2$22 = ["src"];
|
|
12642
|
+
var _hoisted_3$18 = {
|
|
12638
12643
|
key: 1,
|
|
12639
12644
|
class: "user-bg"
|
|
12640
12645
|
};
|
|
@@ -12655,19 +12660,19 @@ var Avatar_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12655
12660
|
return email?.substring(0, 1)?.toUpperCase() || null;
|
|
12656
12661
|
};
|
|
12657
12662
|
return (_ctx, _cache) => {
|
|
12658
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12663
|
+
return openBlock(), createElementBlock("div", _hoisted_1$29, [__props.user.image ? (openBlock(), createElementBlock("img", {
|
|
12659
12664
|
key: 0,
|
|
12660
12665
|
class: "user-bg",
|
|
12661
12666
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
12662
|
-
}, null, 8, _hoisted_2$
|
|
12667
|
+
}, null, 8, _hoisted_2$22)) : (openBlock(), createElementBlock("span", _hoisted_3$18, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))]);
|
|
12663
12668
|
};
|
|
12664
12669
|
}
|
|
12665
12670
|
}, [["__scopeId", "data-v-c95b2073"]]);
|
|
12666
12671
|
//#endregion
|
|
12667
12672
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
12668
|
-
var _hoisted_1$
|
|
12669
|
-
var _hoisted_2$
|
|
12670
|
-
var _hoisted_3$
|
|
12673
|
+
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
12674
|
+
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
12675
|
+
var _hoisted_3$17 = { class: "user-info" };
|
|
12671
12676
|
var _hoisted_4$12 = { class: "user-name" };
|
|
12672
12677
|
var _hoisted_5$10 = {
|
|
12673
12678
|
key: 0,
|
|
@@ -12925,10 +12930,10 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12925
12930
|
return user;
|
|
12926
12931
|
});
|
|
12927
12932
|
return (_ctx, _cache) => {
|
|
12928
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
12933
|
+
return openBlock(), createElementBlock("div", _hoisted_1$28, [createElementVNode("div", _hoisted_2$21, [createVNode(Avatar_default, {
|
|
12929
12934
|
user: getCurrentUser.value,
|
|
12930
12935
|
class: "avatar"
|
|
12931
|
-
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$
|
|
12936
|
+
}, null, 8, ["user"]), createElementVNode("div", _hoisted_3$17, [createElementVNode("div", _hoisted_4$12, [createTextVNode(toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (openBlock(), createElementBlock("span", _hoisted_5$10, "IMPORTED")) : createCommentVNode("", true)]), props.comment.createdTime ? (openBlock(), createElementBlock("div", _hoisted_6$8, toDisplayString(unref(formatDate)(props.comment.createdTime)), 1)) : createCommentVNode("", true)])]), createElementVNode("div", { class: normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
12932
12937
|
allowResolve.value ? (openBlock(), createElementBlock("div", {
|
|
12933
12938
|
key: 0,
|
|
12934
12939
|
class: normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -12976,9 +12981,9 @@ var CommentHeader_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
12976
12981
|
}, [["__scopeId", "data-v-f2f11c96"]]);
|
|
12977
12982
|
//#endregion
|
|
12978
12983
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
12979
|
-
var _hoisted_1$
|
|
12980
|
-
var _hoisted_2$
|
|
12981
|
-
var _hoisted_3$
|
|
12984
|
+
var _hoisted_1$27 = { class: "input-section" };
|
|
12985
|
+
var _hoisted_2$20 = { class: "comment-composer" };
|
|
12986
|
+
var _hoisted_3$16 = [
|
|
12982
12987
|
"aria-expanded",
|
|
12983
12988
|
"aria-controls",
|
|
12984
12989
|
"aria-activedescendant"
|
|
@@ -13150,12 +13155,12 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13150
13155
|
watch$1(currentCommentText, scheduleInputHeightSync);
|
|
13151
13156
|
__expose({ focus });
|
|
13152
13157
|
return (_ctx, _cache) => {
|
|
13153
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
13158
|
+
return openBlock(), createElementBlock("div", _hoisted_1$27, [__props.includeHeader ? (openBlock(), createBlock(CommentHeader_default, {
|
|
13154
13159
|
key: 0,
|
|
13155
13160
|
config: __props.config,
|
|
13156
13161
|
comment: __props.comment,
|
|
13157
13162
|
"is-pending-input": true
|
|
13158
|
-
}, null, 8, ["config", "comment"])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["comment-entry", { "sd-input-active": __props.isFocused }]) }, [createElementVNode("div", _hoisted_2$
|
|
13163
|
+
}, null, 8, ["config", "comment"])) : createCommentVNode("", true), createElementVNode("div", { class: normalizeClass(["comment-entry", { "sd-input-active": __props.isFocused }]) }, [createElementVNode("div", _hoisted_2$20, [withDirectives(createElementVNode("textarea", {
|
|
13159
13164
|
ref_key: "inputRef",
|
|
13160
13165
|
ref: inputRef,
|
|
13161
13166
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => commentDraft.value = $event),
|
|
@@ -13173,7 +13178,7 @@ var CommentInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13173
13178
|
onKeydown,
|
|
13174
13179
|
onFocus: _cache[1] || (_cache[1] = ($event) => handleFocusChange(true)),
|
|
13175
13180
|
onBlur: _cache[2] || (_cache[2] = ($event) => handleFocusChange(false))
|
|
13176
|
-
}, null, 40, _hoisted_3$
|
|
13181
|
+
}, null, 40, _hoisted_3$16), [[vModelText, commentDraft.value]]), mentionListOpen.value ? (openBlock(), createElementBlock("div", {
|
|
13177
13182
|
key: 0,
|
|
13178
13183
|
id: mentionListId,
|
|
13179
13184
|
class: "comment-mention-list",
|
|
@@ -13304,18 +13309,18 @@ function renderCommentHtml(value) {
|
|
|
13304
13309
|
}
|
|
13305
13310
|
//#endregion
|
|
13306
13311
|
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13307
|
-
var _hoisted_1$
|
|
13312
|
+
var _hoisted_1$26 = [
|
|
13308
13313
|
"aria-label",
|
|
13309
13314
|
"data-comment-instance-id",
|
|
13310
13315
|
"data-comment-thread-id",
|
|
13311
13316
|
"data-comment-position-key",
|
|
13312
13317
|
"data-comment-page-index"
|
|
13313
13318
|
];
|
|
13314
|
-
var _hoisted_2$
|
|
13319
|
+
var _hoisted_2$19 = {
|
|
13315
13320
|
key: 0,
|
|
13316
13321
|
class: "existing-internal-input"
|
|
13317
13322
|
};
|
|
13318
|
-
var _hoisted_3$
|
|
13323
|
+
var _hoisted_3$15 = { class: "new-comment-input-wrapper" };
|
|
13319
13324
|
var _hoisted_4$10 = { class: "reply-actions" };
|
|
13320
13325
|
var _hoisted_5$8 = ["disabled"];
|
|
13321
13326
|
var _hoisted_6$6 = {
|
|
@@ -14361,7 +14366,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14361
14366
|
"data-comment-position-key": props.comment.trackedChangeAnchorKey ?? "",
|
|
14362
14367
|
"data-comment-page-index": Number.isFinite(props.floatingPageIndex) ? props.floatingPageIndex : ""
|
|
14363
14368
|
}, [isPendingNewComment.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14364
|
-
shouldShowInternalExternal.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
14369
|
+
shouldShowInternalExternal.value ? (openBlock(), createElementBlock("div", _hoisted_2$19, [createVNode(InternalDropdown_default, {
|
|
14365
14370
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop", "prevent"])),
|
|
14366
14371
|
class: "sd-internal-dropdown",
|
|
14367
14372
|
"is-disabled": false,
|
|
@@ -14373,7 +14378,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14373
14378
|
comment: props.comment,
|
|
14374
14379
|
"is-pending-input": true
|
|
14375
14380
|
}, null, 8, ["config", "comment"]),
|
|
14376
|
-
createElementVNode("div", _hoisted_3$
|
|
14381
|
+
createElementVNode("div", _hoisted_3$15, [createVNode(CommentInput_default, {
|
|
14377
14382
|
ref_key: "commentInput",
|
|
14378
14383
|
ref: commentInput,
|
|
14379
14384
|
users: usersFiltered.value,
|
|
@@ -14558,13 +14563,13 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14558
14563
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14559
14564
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14560
14565
|
}, " Reply ", 10, _hoisted_53)])]))], 64)) : createCommentVNode("", true)
|
|
14561
|
-
], 64))], 14, _hoisted_1$
|
|
14566
|
+
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
14562
14567
|
};
|
|
14563
14568
|
}
|
|
14564
14569
|
}, [["__scopeId", "data-v-5ace8cef"]]);
|
|
14565
14570
|
//#endregion
|
|
14566
14571
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14567
|
-
var _hoisted_1$
|
|
14572
|
+
var _hoisted_1$25 = [
|
|
14568
14573
|
"tabindex",
|
|
14569
14574
|
"aria-posinset",
|
|
14570
14575
|
"aria-setsize",
|
|
@@ -14702,15 +14707,15 @@ var ReviewDirectoryListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_de
|
|
|
14702
14707
|
"floating-page-index",
|
|
14703
14708
|
"floating-position-entry",
|
|
14704
14709
|
"is-floating-instance-active"
|
|
14705
|
-
])) : createCommentVNode("", true)], 44, _hoisted_1$
|
|
14710
|
+
])) : createCommentVNode("", true)], 44, _hoisted_1$25);
|
|
14706
14711
|
};
|
|
14707
14712
|
}
|
|
14708
14713
|
}, [["__scopeId", "data-v-29650a06"]]);
|
|
14709
14714
|
//#endregion
|
|
14710
14715
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
14711
|
-
var _hoisted_1$
|
|
14712
|
-
var _hoisted_2$
|
|
14713
|
-
var _hoisted_3$
|
|
14716
|
+
var _hoisted_1$24 = ["aria-busy"];
|
|
14717
|
+
var _hoisted_2$18 = { key: 0 };
|
|
14718
|
+
var _hoisted_3$14 = { key: 1 };
|
|
14714
14719
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
14715
14720
|
var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
14716
14721
|
__name: "commentsList",
|
|
@@ -14839,7 +14844,7 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14839
14844
|
class: "comments-list",
|
|
14840
14845
|
role: "list",
|
|
14841
14846
|
"aria-busy": unref(isReviewDirectoryActive) && unref(isReviewDirectoryLoading) ? "true" : "false"
|
|
14842
|
-
}, [__props.showMainComments ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
14847
|
+
}, [__props.showMainComments ? (openBlock(), createElementBlock("div", _hoisted_2$18, [(openBlock(true), createElementBlock(Fragment, null, renderList(parentCommentDisplayItems.value, (item, index) => {
|
|
14843
14848
|
return openBlock(), createBlock(ReviewDirectoryListItem_default, {
|
|
14844
14849
|
key: item.id,
|
|
14845
14850
|
item,
|
|
@@ -14854,7 +14859,7 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14854
14859
|
"total",
|
|
14855
14860
|
"tab-index"
|
|
14856
14861
|
]);
|
|
14857
|
-
}), 128))])) : createCommentVNode("", true), shouldShowResolvedComments.value ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
14862
|
+
}), 128))])) : createCommentVNode("", true), shouldShowResolvedComments.value ? (openBlock(), createElementBlock("div", _hoisted_3$14, [_cache[2] || (_cache[2] = createElementVNode("div", { class: "comment-title" }, "Resolved", -1)), (openBlock(true), createElementBlock(Fragment, null, renderList(resolvedCommentDisplayItems.value, (item, index) => {
|
|
14858
14863
|
return openBlock(), createBlock(ReviewDirectoryListItem_default, {
|
|
14859
14864
|
key: item.id,
|
|
14860
14865
|
item,
|
|
@@ -14869,7 +14874,7 @@ var commentsList_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14869
14874
|
"total",
|
|
14870
14875
|
"tab-index"
|
|
14871
14876
|
]);
|
|
14872
|
-
}), 128))])) : createCommentVNode("", true)], 8, _hoisted_1$
|
|
14877
|
+
}), 128))])) : createCommentVNode("", true)], 8, _hoisted_1$24);
|
|
14873
14878
|
};
|
|
14874
14879
|
}
|
|
14875
14880
|
}, [["__scopeId", "data-v-89244745"]]);
|
|
@@ -15394,7 +15399,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
15394
15399
|
};
|
|
15395
15400
|
//#endregion
|
|
15396
15401
|
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15397
|
-
var _hoisted_1$
|
|
15402
|
+
var _hoisted_1$23 = [
|
|
15398
15403
|
"data-comment-id",
|
|
15399
15404
|
"data-comment-instance-id",
|
|
15400
15405
|
"data-comment-thread-id",
|
|
@@ -16331,18 +16336,18 @@ var FloatingComments_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16331
16336
|
"floating-page-index",
|
|
16332
16337
|
"floating-position-entry",
|
|
16333
16338
|
"is-floating-instance-active"
|
|
16334
|
-
])) : createCommentVNode("", true)], 14, _hoisted_1$
|
|
16339
|
+
])) : createCommentVNode("", true)], 14, _hoisted_1$23);
|
|
16335
16340
|
}), 128))], 4)], 36);
|
|
16336
16341
|
};
|
|
16337
16342
|
}
|
|
16338
16343
|
}, [["__scopeId", "data-v-028441bf"]]);
|
|
16339
16344
|
//#endregion
|
|
16340
16345
|
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
16341
|
-
var _hoisted_1$
|
|
16346
|
+
var _hoisted_1$22 = {
|
|
16342
16347
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
16343
16348
|
"aria-hidden": "false"
|
|
16344
16349
|
};
|
|
16345
|
-
var _hoisted_2$
|
|
16350
|
+
var _hoisted_2$17 = [
|
|
16346
16351
|
"data-id",
|
|
16347
16352
|
"data-comment-id",
|
|
16348
16353
|
"data-page-number",
|
|
@@ -16444,7 +16449,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16444
16449
|
emit("anchor-activate", anchor.commentId);
|
|
16445
16450
|
};
|
|
16446
16451
|
return (_ctx, _cache) => {
|
|
16447
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
16452
|
+
return openBlock(), createElementBlock("div", _hoisted_1$22, [(openBlock(true), createElementBlock(Fragment, null, renderList(pdfCommentAnchors.value, (anchor) => {
|
|
16448
16453
|
return openBlock(), createElementBlock("div", {
|
|
16449
16454
|
key: anchor.commentId,
|
|
16450
16455
|
class: "sd-comment-anchor sd-highlight",
|
|
@@ -16456,7 +16461,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16456
16461
|
style: normalizeStyle(getAnchorStyle(anchor)),
|
|
16457
16462
|
onClick: withModifiers(($event) => activateAnchor(anchor), ["stop", "prevent"]),
|
|
16458
16463
|
onKeydown: [withKeys(withModifiers(($event) => activateAnchor(anchor), ["stop", "prevent"]), ["enter"]), withKeys(withModifiers(($event) => activateAnchor(anchor), ["stop", "prevent"]), ["space"])]
|
|
16459
|
-
}, null, 44, _hoisted_2$
|
|
16464
|
+
}, null, 44, _hoisted_2$17);
|
|
16460
16465
|
}), 128))]);
|
|
16461
16466
|
};
|
|
16462
16467
|
}
|
|
@@ -16613,7 +16618,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
16613
16618
|
};
|
|
16614
16619
|
//#endregion
|
|
16615
16620
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
16616
|
-
var _hoisted_1$
|
|
16621
|
+
var _hoisted_1$21 = ["data-page-index"];
|
|
16617
16622
|
var WhiteboardPage_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
16618
16623
|
__name: "WhiteboardPage",
|
|
16619
16624
|
props: {
|
|
@@ -16745,7 +16750,7 @@ var WhiteboardPage_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16745
16750
|
height: (__props.pageSize?.height ?? __props.page.size?.height) + "px",
|
|
16746
16751
|
transform: `translate(${__props.pageOffset?.left ?? 0}px, ${__props.pageOffset?.top ?? 0}px)`
|
|
16747
16752
|
})
|
|
16748
|
-
}, null, 44, _hoisted_1$
|
|
16753
|
+
}, null, 44, _hoisted_1$21);
|
|
16749
16754
|
};
|
|
16750
16755
|
}
|
|
16751
16756
|
}, [["__scopeId", "data-v-c876c9b5"]]);
|
|
@@ -16819,66 +16824,6 @@ var WhiteboardLayer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
16819
16824
|
}
|
|
16820
16825
|
}, [["__scopeId", "data-v-54546c3d"]]);
|
|
16821
16826
|
//#endregion
|
|
16822
|
-
//#region src/components/HtmlViewer/HtmlViewer.vue
|
|
16823
|
-
var _hoisted_1$21 = { class: "superdoc-html-viewer" };
|
|
16824
|
-
var _hoisted_2$17 = { class: "superdoc-html-viewer__document" };
|
|
16825
|
-
var _hoisted_3$14 = ["innerHTML"];
|
|
16826
|
-
var HtmlViewer_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
16827
|
-
__name: "HtmlViewer",
|
|
16828
|
-
props: {
|
|
16829
|
-
fileSource: {
|
|
16830
|
-
type: [File, Blob],
|
|
16831
|
-
required: true
|
|
16832
|
-
},
|
|
16833
|
-
documentId: {
|
|
16834
|
-
type: String,
|
|
16835
|
-
required: true
|
|
16836
|
-
}
|
|
16837
|
-
},
|
|
16838
|
-
emits: ["ready", "selection-change"],
|
|
16839
|
-
setup(__props, { emit: __emit }) {
|
|
16840
|
-
const props = __props;
|
|
16841
|
-
const documentContent = ref("");
|
|
16842
|
-
const emit = __emit;
|
|
16843
|
-
const handleSelectionChange = () => {
|
|
16844
|
-
const selection = window.getSelection();
|
|
16845
|
-
console.debug("selection from html viewer", selection);
|
|
16846
|
-
emit("selection-change", selection);
|
|
16847
|
-
};
|
|
16848
|
-
const getDocumentHtml = (fileSource) => {
|
|
16849
|
-
return new Promise((resolve, reject) => {
|
|
16850
|
-
const reader = new FileReader();
|
|
16851
|
-
reader.onload = (e) => {
|
|
16852
|
-
const htmlString = e.target.result;
|
|
16853
|
-
resolve(htmlString);
|
|
16854
|
-
};
|
|
16855
|
-
reader.onerror = (e) => reject(e);
|
|
16856
|
-
reader.readAsText(fileSource);
|
|
16857
|
-
});
|
|
16858
|
-
};
|
|
16859
|
-
const initViewer = async () => {
|
|
16860
|
-
try {
|
|
16861
|
-
const documentHtml = await getDocumentHtml(props.fileSource);
|
|
16862
|
-
documentContent.value = documentHtml;
|
|
16863
|
-
emit("ready", props.documentId);
|
|
16864
|
-
} catch (error) {
|
|
16865
|
-
emit("error", error);
|
|
16866
|
-
console.error("Error loading document", error);
|
|
16867
|
-
}
|
|
16868
|
-
};
|
|
16869
|
-
onMounted(() => {
|
|
16870
|
-
initViewer();
|
|
16871
|
-
});
|
|
16872
|
-
return (_ctx, _cache) => {
|
|
16873
|
-
return openBlock(), createElementBlock("div", _hoisted_1$21, [createElementVNode("div", _hoisted_2$17, [createElementVNode("div", {
|
|
16874
|
-
class: "superdoc-html-viewer__content",
|
|
16875
|
-
innerHTML: documentContent.value,
|
|
16876
|
-
onMouseup: handleSelectionChange
|
|
16877
|
-
}, null, 40, _hoisted_3$14)])]);
|
|
16878
|
-
};
|
|
16879
|
-
}
|
|
16880
|
-
}, [["__scopeId", "data-v-da3494ba"]]);
|
|
16881
|
-
//#endregion
|
|
16882
16827
|
//#region src/components/CommentsLayer/collect-removed-comment-ids.js
|
|
16883
16828
|
/**
|
|
16884
16829
|
* Expand deleted comment ids through comment and tracked-change descendants.
|
|
@@ -24908,14 +24853,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24908
24853
|
"onV2HostEvent",
|
|
24909
24854
|
"onV2RenderReadiness",
|
|
24910
24855
|
"onV2OpenDiagnostics"
|
|
24911
|
-
])) : createCommentVNode("", true)
|
|
24912
|
-
doc.type === unref("text/html") ? (openBlock(), createBlock(HtmlViewer_default, {
|
|
24913
|
-
key: 3,
|
|
24914
|
-
onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
|
|
24915
|
-
onSelectionChange: handleSelectionChange,
|
|
24916
|
-
"file-source": doc.data,
|
|
24917
|
-
"document-id": doc.id
|
|
24918
|
-
}, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
|
|
24856
|
+
])) : createCommentVNode("", true)
|
|
24919
24857
|
]);
|
|
24920
24858
|
}), 128)),
|
|
24921
24859
|
shouldRenderPdfWhiteboard.value ? (openBlock(), createBlock(WhiteboardLayer_default, {
|
|
@@ -24965,7 +24903,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24965
24903
|
], 46, _hoisted_1$17);
|
|
24966
24904
|
};
|
|
24967
24905
|
}
|
|
24968
|
-
}, [["__scopeId", "data-v-
|
|
24906
|
+
}, [["__scopeId", "data-v-ae3beeba"]]);
|
|
24969
24907
|
//#endregion
|
|
24970
24908
|
//#region src/core/create-app.js
|
|
24971
24909
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -46431,11 +46369,7 @@ function getActiveFontRuntime(editor) {
|
|
|
46431
46369
|
*/
|
|
46432
46370
|
var SuperDoc = class extends import_eventemitter3.default {
|
|
46433
46371
|
static {
|
|
46434
|
-
this.allowedTypes = [
|
|
46435
|
-
DOCX,
|
|
46436
|
-
PDF,
|
|
46437
|
-
HTML
|
|
46438
|
-
];
|
|
46372
|
+
this.allowedTypes = [DOCX, PDF];
|
|
46439
46373
|
}
|
|
46440
46374
|
#destroyed;
|
|
46441
46375
|
#diagnostics;
|
|
@@ -46754,7 +46688,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46754
46688
|
}
|
|
46755
46689
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46756
46690
|
this.colorIndex = 0;
|
|
46757
|
-
this.version = "2.25.0-next.
|
|
46691
|
+
this.version = "2.25.0-next.16";
|
|
46758
46692
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46759
46693
|
this.superdocId = config.superdocId || v4();
|
|
46760
46694
|
this.colors = this.config.colors ?? [];
|
|
@@ -48194,11 +48128,6 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
48194
48128
|
feature: "pdf.viewer",
|
|
48195
48129
|
status: "supported",
|
|
48196
48130
|
reason: "editorVersion ignored for PDF documents"
|
|
48197
|
-
},
|
|
48198
|
-
{
|
|
48199
|
-
feature: "html.viewer",
|
|
48200
|
-
status: "supported",
|
|
48201
|
-
reason: "editorVersion ignored for HTML documents"
|
|
48202
48131
|
}
|
|
48203
48132
|
];
|
|
48204
48133
|
}
|
|
@@ -48726,6 +48655,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
48726
48655
|
* `fit-width`; use `setZoomMode('fit-width')` to re-enter fitting).
|
|
48727
48656
|
* Updates the centralized activeZoom state, which propagates to all
|
|
48728
48657
|
* presentation editors, PDF viewers, and whiteboard layers via the Vue watcher.
|
|
48658
|
+
* Accepts any finite percentage greater than zero, independently of fit-width bounds.
|
|
48729
48659
|
* @param percent - The zoom level as a percentage (e.g., 100, 150, 200)
|
|
48730
48660
|
* @example
|
|
48731
48661
|
* superdoc.setZoom(150); // Set zoom to 150%, mode becomes 'manual'
|
|
@@ -48797,6 +48727,10 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
48797
48727
|
mode: this.superdocStore?.zoomMode ?? "manual",
|
|
48798
48728
|
value: this.superdocStore?.activeZoom ?? 100,
|
|
48799
48729
|
fitZoom: this.superdocStore?.viewportMetrics?.fitZoom ?? null,
|
|
48730
|
+
fitWidth: {
|
|
48731
|
+
min: fit.min,
|
|
48732
|
+
max: fit.max
|
|
48733
|
+
},
|
|
48800
48734
|
min: fit.min,
|
|
48801
48735
|
max: fit.max
|
|
48802
48736
|
};
|