superdoc 2.28.0-next.4 → 2.28.0-next.6
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/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/contract/operation-definitions.d.ts +11 -11
- package/dist/document-api/src/index.d.ts +1 -1
- package/dist/document-api/src/replace/replace.d.ts +4 -1
- package/dist/document-api/src/types/mutation-plan.types.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/style.layered.css +1 -1
- package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -0
- package/dist/superdoc/src/core/types/index.d.ts +10 -0
- package/dist/superdoc.cjs +142 -96
- package/dist/superdoc.es.js +142 -96
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +37 -37
- package/package.json +2 -2
package/dist/superdoc.es.js
CHANGED
|
@@ -258,7 +258,7 @@ var v_click_outside_default = {
|
|
|
258
258
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
259
259
|
function getSuperdocVersion() {
|
|
260
260
|
try {
|
|
261
|
-
return "2.28.0-next.
|
|
261
|
+
return "2.28.0-next.6";
|
|
262
262
|
} catch {
|
|
263
263
|
return "unknown";
|
|
264
264
|
}
|
|
@@ -5462,7 +5462,8 @@ function resolveWebsocketFamily(family, candidate) {
|
|
|
5462
5462
|
roomMode,
|
|
5463
5463
|
serverUrl,
|
|
5464
5464
|
...params ? { params } : {},
|
|
5465
|
-
...token ? { token } : {}
|
|
5465
|
+
...token ? { token } : {},
|
|
5466
|
+
...family === "hocuspocus" && candidate.retry !== void 0 ? { retry: candidate.retry } : {}
|
|
5466
5467
|
}
|
|
5467
5468
|
};
|
|
5468
5469
|
}
|
|
@@ -9019,6 +9020,8 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
9019
9020
|
rejected: true,
|
|
9020
9021
|
comment: comment.getValues(),
|
|
9021
9022
|
reason: outcome?.reason ?? "v2-delete-failed",
|
|
9023
|
+
...outcome?.code !== void 0 ? { code: outcome.code } : {},
|
|
9024
|
+
...outcome?.detail !== void 0 ? { detail: outcome.detail } : {},
|
|
9022
9025
|
...outcome?.committed ? { committed: true } : {}
|
|
9023
9026
|
});
|
|
9024
9027
|
return outcome;
|
|
@@ -13331,97 +13334,107 @@ var _hoisted_2$19 = {
|
|
|
13331
13334
|
class: "existing-internal-input"
|
|
13332
13335
|
};
|
|
13333
13336
|
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
13334
|
-
var _hoisted_4$11 = {
|
|
13335
|
-
|
|
13336
|
-
|
|
13337
|
+
var _hoisted_4$11 = {
|
|
13338
|
+
key: 1,
|
|
13339
|
+
class: "tracked-change-decision-alert",
|
|
13340
|
+
role: "alert"
|
|
13341
|
+
};
|
|
13342
|
+
var _hoisted_5$8 = { class: "reply-actions" };
|
|
13343
|
+
var _hoisted_6$6 = ["disabled"];
|
|
13344
|
+
var _hoisted_7$4 = {
|
|
13337
13345
|
key: 0,
|
|
13338
13346
|
class: "resolved-badge"
|
|
13339
13347
|
};
|
|
13340
|
-
var
|
|
13341
|
-
var
|
|
13348
|
+
var _hoisted_8$4 = ["innerHTML"];
|
|
13349
|
+
var _hoisted_9$3 = {
|
|
13342
13350
|
key: 1,
|
|
13343
13351
|
class: "existing-internal-input"
|
|
13344
13352
|
};
|
|
13345
|
-
var
|
|
13353
|
+
var _hoisted_10$3 = {
|
|
13354
|
+
key: 2,
|
|
13355
|
+
class: "tracked-change-decision-alert",
|
|
13356
|
+
role: "alert"
|
|
13357
|
+
};
|
|
13358
|
+
var _hoisted_11$3 = {
|
|
13346
13359
|
key: 0,
|
|
13347
13360
|
class: "card-section comment-body"
|
|
13348
13361
|
};
|
|
13349
|
-
var
|
|
13350
|
-
var
|
|
13351
|
-
var
|
|
13352
|
-
var
|
|
13362
|
+
var _hoisted_12$2 = ["data-track-change-semantic-color-key"];
|
|
13363
|
+
var _hoisted_13$2 = { key: 0 };
|
|
13364
|
+
var _hoisted_14$2 = { class: "change-type tracked-change-label" };
|
|
13365
|
+
var _hoisted_15$2 = {
|
|
13353
13366
|
key: 0,
|
|
13354
13367
|
class: "tracked-change-detail-lines"
|
|
13355
13368
|
};
|
|
13356
|
-
var
|
|
13369
|
+
var _hoisted_16$2 = {
|
|
13357
13370
|
key: 0,
|
|
13358
13371
|
class: "tracked-change-text"
|
|
13359
13372
|
};
|
|
13360
|
-
var
|
|
13373
|
+
var _hoisted_17$2 = {
|
|
13361
13374
|
key: 1,
|
|
13362
13375
|
class: "change-type"
|
|
13363
13376
|
};
|
|
13364
|
-
var
|
|
13365
|
-
var
|
|
13366
|
-
var _hoisted_18$2 = { class: "tracked-change-text is-inserted" };
|
|
13367
|
-
var _hoisted_19$1 = { key: 2 };
|
|
13377
|
+
var _hoisted_18$2 = { class: "change-type" };
|
|
13378
|
+
var _hoisted_19$1 = { key: 1 };
|
|
13368
13379
|
var _hoisted_20$1 = { class: "tracked-change-text is-inserted" };
|
|
13369
|
-
var _hoisted_21$1 = { key:
|
|
13370
|
-
var _hoisted_22$1 = {
|
|
13371
|
-
var _hoisted_23$1 = { key:
|
|
13372
|
-
var _hoisted_24 = { key:
|
|
13373
|
-
var _hoisted_25 = {
|
|
13374
|
-
var _hoisted_26 = { key:
|
|
13375
|
-
var _hoisted_27 = { class: "tracked-change-text
|
|
13376
|
-
var _hoisted_28 = {
|
|
13377
|
-
var _hoisted_29 = {
|
|
13378
|
-
var _hoisted_30 = {
|
|
13379
|
-
var _hoisted_31 = { key:
|
|
13380
|
-
var _hoisted_32 = {
|
|
13381
|
-
var _hoisted_33 = { key:
|
|
13382
|
-
var _hoisted_34 = { class: "tracked-change-text is-
|
|
13383
|
-
var _hoisted_35 =
|
|
13384
|
-
var _hoisted_36 =
|
|
13385
|
-
var _hoisted_37 =
|
|
13380
|
+
var _hoisted_21$1 = { key: 2 };
|
|
13381
|
+
var _hoisted_22$1 = { class: "tracked-change-text is-inserted" };
|
|
13382
|
+
var _hoisted_23$1 = { key: 3 };
|
|
13383
|
+
var _hoisted_24 = { key: 4 };
|
|
13384
|
+
var _hoisted_25 = { key: 5 };
|
|
13385
|
+
var _hoisted_26 = { key: 6 };
|
|
13386
|
+
var _hoisted_27 = { class: "tracked-change-text" };
|
|
13387
|
+
var _hoisted_28 = { key: 7 };
|
|
13388
|
+
var _hoisted_29 = { class: "tracked-change-text is-deleted" };
|
|
13389
|
+
var _hoisted_30 = { class: "tracked-change-text is-inserted" };
|
|
13390
|
+
var _hoisted_31 = { key: 8 };
|
|
13391
|
+
var _hoisted_32 = { key: 9 };
|
|
13392
|
+
var _hoisted_33 = { key: 10 };
|
|
13393
|
+
var _hoisted_34 = { class: "tracked-change-text is-deleted" };
|
|
13394
|
+
var _hoisted_35 = { key: 11 };
|
|
13395
|
+
var _hoisted_36 = { class: "tracked-change-text is-inserted" };
|
|
13396
|
+
var _hoisted_37 = ["data-track-change-image-preview-role"];
|
|
13397
|
+
var _hoisted_38 = ["src", "alt"];
|
|
13398
|
+
var _hoisted_39 = {
|
|
13386
13399
|
key: 1,
|
|
13387
13400
|
class: "card-section comment-body"
|
|
13388
13401
|
};
|
|
13389
|
-
var
|
|
13390
|
-
var
|
|
13402
|
+
var _hoisted_40 = ["innerHTML"];
|
|
13403
|
+
var _hoisted_41 = {
|
|
13391
13404
|
key: 1,
|
|
13392
13405
|
class: "comment"
|
|
13393
13406
|
};
|
|
13394
|
-
var
|
|
13407
|
+
var _hoisted_42 = {
|
|
13395
13408
|
key: 2,
|
|
13396
13409
|
class: "reply-expanded"
|
|
13397
13410
|
};
|
|
13398
|
-
var
|
|
13399
|
-
var
|
|
13400
|
-
var
|
|
13401
|
-
var
|
|
13411
|
+
var _hoisted_43 = { class: "reply-input-wrapper" };
|
|
13412
|
+
var _hoisted_44 = { class: "reply-actions" };
|
|
13413
|
+
var _hoisted_45 = ["onClick"];
|
|
13414
|
+
var _hoisted_46 = [
|
|
13402
13415
|
"onClick",
|
|
13403
13416
|
"disabled",
|
|
13404
13417
|
"data-disabled-reason"
|
|
13405
13418
|
];
|
|
13406
|
-
var
|
|
13407
|
-
var
|
|
13419
|
+
var _hoisted_47 = { class: "collapsed-avatars" };
|
|
13420
|
+
var _hoisted_48 = {
|
|
13408
13421
|
key: 3,
|
|
13409
13422
|
class: "comment-separator"
|
|
13410
13423
|
};
|
|
13411
|
-
var
|
|
13412
|
-
key:
|
|
13424
|
+
var _hoisted_49 = {
|
|
13425
|
+
key: 3,
|
|
13413
13426
|
class: "tracked-change-decision-alert",
|
|
13414
13427
|
role: "alert"
|
|
13415
13428
|
};
|
|
13416
|
-
var
|
|
13417
|
-
var
|
|
13418
|
-
var
|
|
13429
|
+
var _hoisted_50 = { class: "tracked-change-decision-alert__message" };
|
|
13430
|
+
var _hoisted_51 = ["disabled", "data-disabled-reason"];
|
|
13431
|
+
var _hoisted_52 = {
|
|
13419
13432
|
key: 1,
|
|
13420
13433
|
class: "reply-expanded"
|
|
13421
13434
|
};
|
|
13422
|
-
var
|
|
13423
|
-
var
|
|
13424
|
-
var
|
|
13435
|
+
var _hoisted_53 = { class: "reply-input-wrapper" };
|
|
13436
|
+
var _hoisted_54 = { class: "reply-actions" };
|
|
13437
|
+
var _hoisted_55 = ["disabled", "data-disabled-reason"];
|
|
13425
13438
|
var commentEditSessions = /* @__PURE__ */ new WeakMap();
|
|
13426
13439
|
var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
13427
13440
|
__name: "CommentDialog",
|
|
@@ -13674,12 +13687,17 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13674
13687
|
const isReplying = ref(false);
|
|
13675
13688
|
const isSubmittingReply = ref(false);
|
|
13676
13689
|
const isSubmittingNewComment = ref(false);
|
|
13690
|
+
const commentSaveFailure = ref("");
|
|
13691
|
+
const commentSaveFailureMessage = (outcome, hasDraft = true) => {
|
|
13692
|
+
return `Your comment could not be saved${outcome?.detail === "document-mode-read-only" ? " because the document or connection is read-only" : outcome?.code === "PERMISSION_DENIED" ? " because you do not have permission" : ""}.${hasDraft ? " Your draft is still here. Try again or cancel." : " Try again."}`;
|
|
13693
|
+
};
|
|
13677
13694
|
const startReply = () => {
|
|
13678
13695
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
13679
13696
|
if (isV2WriteDisabled.value) return {
|
|
13680
13697
|
ok: false,
|
|
13681
13698
|
reason: v2WriteCapability.value?.reason ?? "v2-write-unavailable"
|
|
13682
13699
|
};
|
|
13700
|
+
commentSaveFailure.value = "";
|
|
13683
13701
|
isReplying.value = true;
|
|
13684
13702
|
nextTick(() => {
|
|
13685
13703
|
commentInput.value?.focus?.();
|
|
@@ -13929,6 +13947,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13929
13947
|
reason: "reply-submit-in-flight"
|
|
13930
13948
|
};
|
|
13931
13949
|
isSubmittingReply.value = true;
|
|
13950
|
+
commentSaveFailure.value = "";
|
|
13932
13951
|
try {
|
|
13933
13952
|
const parentCommentId = getV2ExistingReplyParentId(props.comment);
|
|
13934
13953
|
const trackedChangeTarget = getV2TrackedChangeCommentTarget(props.comment);
|
|
@@ -13940,6 +13959,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13940
13959
|
...trackedChangeTarget ? { trackedChangeTarget } : {}
|
|
13941
13960
|
});
|
|
13942
13961
|
if (!outcome?.ok) {
|
|
13962
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
13943
13963
|
nextTick(() => emit("resize"));
|
|
13944
13964
|
return outcome;
|
|
13945
13965
|
}
|
|
@@ -13958,6 +13978,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13958
13978
|
reason: "comment-submit-in-flight"
|
|
13959
13979
|
};
|
|
13960
13980
|
isSubmittingNewComment.value = true;
|
|
13981
|
+
commentSaveFailure.value = "";
|
|
13961
13982
|
}
|
|
13962
13983
|
const options = {
|
|
13963
13984
|
documentId: props.comment.fileId,
|
|
@@ -13973,7 +13994,10 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
13973
13994
|
Promise.resolve().then(() => addComment({
|
|
13974
13995
|
superdoc: proxy.$superdoc,
|
|
13975
13996
|
comment
|
|
13976
|
-
})).
|
|
13997
|
+
})).then((outcome) => {
|
|
13998
|
+
if (isPendingNewComment.value && outcome?.ok === false) commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
13999
|
+
}).catch((err) => {
|
|
14000
|
+
commentSaveFailure.value = commentSaveFailureMessage();
|
|
13977
14001
|
console.error("[SuperDoc] addComment failed", err);
|
|
13978
14002
|
}).finally(() => {
|
|
13979
14003
|
isSubmittingNewComment.value = false;
|
|
@@ -14198,10 +14222,15 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14198
14222
|
});
|
|
14199
14223
|
v1TrackedChangeDecisionApplied = Boolean(outcome?.ok) && outcome.success !== false;
|
|
14200
14224
|
} else if (isV2Mode.value && v2CommentsAdapter.value) {
|
|
14201
|
-
|
|
14225
|
+
const outcome = await commentsStore.resolveCommentV2({
|
|
14202
14226
|
superdoc: proxy.$superdoc,
|
|
14203
14227
|
commentId: props.comment.commentId
|
|
14204
|
-
})
|
|
14228
|
+
});
|
|
14229
|
+
if (!outcome?.ok) {
|
|
14230
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome, false);
|
|
14231
|
+
return outcome;
|
|
14232
|
+
}
|
|
14233
|
+
commentSaveFailure.value = "";
|
|
14205
14234
|
} else props.comment.resolveComment({
|
|
14206
14235
|
id: superdocStore.user.id,
|
|
14207
14236
|
email: superdocStore.user.email,
|
|
@@ -14230,17 +14259,22 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14230
14259
|
reason: "resolve-disabled"
|
|
14231
14260
|
};
|
|
14232
14261
|
if (!isV2Mode.value || !v2CommentsAdapter.value) return;
|
|
14233
|
-
|
|
14262
|
+
const outcome = await commentsStore.reopenCommentV2({
|
|
14234
14263
|
superdoc: proxy.$superdoc,
|
|
14235
14264
|
commentId: props.comment.commentId
|
|
14236
|
-
})
|
|
14265
|
+
});
|
|
14266
|
+
if (!outcome?.ok) {
|
|
14267
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome, false);
|
|
14268
|
+
return outcome;
|
|
14269
|
+
}
|
|
14270
|
+
commentSaveFailure.value = "";
|
|
14237
14271
|
nextTick(() => {
|
|
14238
14272
|
commentsStore.lastUpdate = /* @__PURE__ */ new Date();
|
|
14239
14273
|
commentsStore.setActiveComment(proxy.$superdoc, activeComment.value);
|
|
14240
14274
|
proxy.$superdoc.focus?.();
|
|
14241
14275
|
});
|
|
14242
14276
|
};
|
|
14243
|
-
const handleOverflowSelect = (value, comment) => {
|
|
14277
|
+
const handleOverflowSelect = async (value, comment) => {
|
|
14244
14278
|
if (commentsAreReadOnly()) return readOnlyMutationOutcome();
|
|
14245
14279
|
switch (value) {
|
|
14246
14280
|
case "edit":
|
|
@@ -14259,10 +14293,13 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14259
14293
|
});
|
|
14260
14294
|
break;
|
|
14261
14295
|
case "delete":
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
|
|
14265
|
-
|
|
14296
|
+
{
|
|
14297
|
+
const outcome = await deleteComment({
|
|
14298
|
+
superdoc: proxy.$superdoc,
|
|
14299
|
+
commentId: comment.commentId
|
|
14300
|
+
});
|
|
14301
|
+
commentSaveFailure.value = outcome?.ok ? "" : commentSaveFailureMessage(outcome, false);
|
|
14302
|
+
}
|
|
14266
14303
|
break;
|
|
14267
14304
|
}
|
|
14268
14305
|
};
|
|
@@ -14283,8 +14320,12 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14283
14320
|
commentId: comment.commentId,
|
|
14284
14321
|
text: draft
|
|
14285
14322
|
});
|
|
14286
|
-
if (!outcome?.ok) return outcome;
|
|
14287
14323
|
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || proxy.$superdoc.activeEditor !== editor || editor.v2Comments !== adapter || adapter.documentId !== documentId || editor.doc !== document || props.comment !== thread || editingCommentId.value !== comment.commentId || currentCommentText.value !== draft) return outcome;
|
|
14324
|
+
if (!outcome?.ok) {
|
|
14325
|
+
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
14326
|
+
return outcome;
|
|
14327
|
+
}
|
|
14328
|
+
commentSaveFailure.value = "";
|
|
14288
14329
|
retireOwnEditSession();
|
|
14289
14330
|
editingCommentId.value = null;
|
|
14290
14331
|
removePendingComment(proxy.$superdoc);
|
|
@@ -14316,6 +14357,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14316
14357
|
return typeof timestamp === "string" ? new Date(timestamp).getTime() : timestamp;
|
|
14317
14358
|
};
|
|
14318
14359
|
const handleCancel = (comment) => {
|
|
14360
|
+
commentSaveFailure.value = "";
|
|
14319
14361
|
retireOwnEditSession();
|
|
14320
14362
|
editingCommentId.value = null;
|
|
14321
14363
|
isReplying.value = false;
|
|
@@ -14415,26 +14457,28 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14415
14457
|
"config",
|
|
14416
14458
|
"comment"
|
|
14417
14459
|
])]),
|
|
14418
|
-
|
|
14460
|
+
commentSaveFailure.value ? (openBlock(), createElementBlock("p", _hoisted_4$11, toDisplayString(commentSaveFailure.value), 1)) : createCommentVNode("", true),
|
|
14461
|
+
createElementVNode("div", _hoisted_5$8, [createElementVNode("button", {
|
|
14419
14462
|
class: "sd-button reply-btn-cancel",
|
|
14420
14463
|
onClick: withModifiers(handleCancel, ["stop", "prevent"])
|
|
14421
14464
|
}, "Cancel"), createElementVNode("button", {
|
|
14422
14465
|
class: normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isSubmittingNewComment.value }]),
|
|
14423
14466
|
onClick: withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14424
14467
|
disabled: !hasTextContent.value || isSubmittingNewComment.value
|
|
14425
|
-
}, " Comment ", 10,
|
|
14468
|
+
}, " Comment ", 10, _hoisted_6$6)])
|
|
14426
14469
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14427
|
-
resolvedBadgeLabel.value ? (openBlock(), createElementBlock("div",
|
|
14470
|
+
resolvedBadgeLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$4, [createElementVNode("span", {
|
|
14428
14471
|
class: "resolved-badge__icon",
|
|
14429
14472
|
innerHTML: unref(superdocIcons).markDone
|
|
14430
|
-
}, null, 8,
|
|
14431
|
-
shouldShowInternalExternal.value ? (openBlock(), createElementBlock("div",
|
|
14473
|
+
}, null, 8, _hoisted_8$4), createTextVNode(" " + toDisplayString(resolvedBadgeLabel.value), 1)])) : createCommentVNode("", true),
|
|
14474
|
+
shouldShowInternalExternal.value ? (openBlock(), createElementBlock("div", _hoisted_9$3, [createVNode(InternalDropdown_default, {
|
|
14432
14475
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {}, ["stop", "prevent"])),
|
|
14433
14476
|
class: "sd-internal-dropdown",
|
|
14434
14477
|
"is-disabled": isInternalDropdownDisabled.value,
|
|
14435
14478
|
state: __props.comment.isInternal ? "internal" : "external",
|
|
14436
14479
|
onSelect: handleInternalExternalSelect
|
|
14437
14480
|
}, null, 8, ["is-disabled", "state"])])) : createCommentVNode("", true),
|
|
14481
|
+
commentSaveFailure.value ? (openBlock(), createElementBlock("p", _hoisted_10$3, toDisplayString(commentSaveFailure.value), 1)) : createCommentVNode("", true),
|
|
14438
14482
|
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleComments.value, (comment, index) => {
|
|
14439
14483
|
return openBlock(), createElementBlock("div", {
|
|
14440
14484
|
key: comment.commentId,
|
|
@@ -14466,27 +14510,27 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14466
14510
|
"write-disabled-reason",
|
|
14467
14511
|
"onOverflowSelect"
|
|
14468
14512
|
]),
|
|
14469
|
-
comment.trackedChange ? (openBlock(), createElementBlock("div",
|
|
14513
|
+
comment.trackedChange ? (openBlock(), createElementBlock("div", _hoisted_11$3, [
|
|
14470
14514
|
createElementVNode("div", {
|
|
14471
14515
|
class: normalizeClass(["tracked-change", index === 0 ? bodyOverflowClass.value : void 0]),
|
|
14472
14516
|
"data-track-change-semantic-color-key": comment.semanticColorKey ?? void 0,
|
|
14473
14517
|
ref_for: true,
|
|
14474
14518
|
ref: index === 0 ? setParentBodyRef : void 0
|
|
14475
|
-
}, [comment.trackedChangeLabel ? (openBlock(), createElementBlock("div",
|
|
14519
|
+
}, [comment.trackedChangeLabel ? (openBlock(), createElementBlock("div", _hoisted_13$2, [createElementVNode("span", _hoisted_14$2, toDisplayString(comment.trackedChangeLabel), 1), comment.trackedChangeDetailLines && comment.trackedChangeDetailLines.length ? (openBlock(), createElementBlock("div", _hoisted_15$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(comment.trackedChangeDetailLines, (line, lineIndex) => {
|
|
14476
14520
|
return openBlock(), createElementBlock("div", {
|
|
14477
14521
|
key: lineIndex,
|
|
14478
14522
|
class: "tracked-change-detail-line"
|
|
14479
14523
|
}, [
|
|
14480
|
-
line.excerpt ? (openBlock(), createElementBlock("span",
|
|
14481
|
-
line.excerpt ? (openBlock(), createElementBlock("span",
|
|
14482
|
-
createElementVNode("span",
|
|
14524
|
+
line.excerpt ? (openBlock(), createElementBlock("span", _hoisted_16$2, "\"" + toDisplayString(line.excerpt) + "\"", 1)) : createCommentVNode("", true),
|
|
14525
|
+
line.excerpt ? (openBlock(), createElementBlock("span", _hoisted_17$2, " — ")) : createCommentVNode("", true),
|
|
14526
|
+
createElementVNode("span", _hoisted_18$2, toDisplayString(line.label), 1)
|
|
14483
14527
|
]);
|
|
14484
|
-
}), 128))])) : createCommentVNode("", true)])) : comment.trackedChangeDisplayType === "hyperlinkAdded" ? (openBlock(), createElementBlock("div",
|
|
14528
|
+
}), 128))])) : createCommentVNode("", true)])) : comment.trackedChangeDisplayType === "hyperlinkAdded" ? (openBlock(), createElementBlock("div", _hoisted_19$1, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "change-type" }, "Added hyperlink ", -1)), createElementVNode("span", _hoisted_20$1, "\"" + toDisplayString(comment.trackedChangeText) + "\"", 1)])) : comment.trackedChangeDisplayType === "hyperlinkModified" ? (openBlock(), createElementBlock("div", _hoisted_21$1, [_cache[3] || (_cache[3] = createElementVNode("span", { class: "change-type" }, "Changed hyperlink to ", -1)), createElementVNode("span", _hoisted_22$1, "\"" + toDisplayString(comment.trackedChangeText) + "\"", 1)])) : comment.trackedChangeDisplayType === "paragraphSplit" ? (openBlock(), createElementBlock("div", _hoisted_23$1, [..._cache[4] || (_cache[4] = [createElementVNode("span", { class: "change-type" }, "Added new line", -1)])])) : comment.trackedChangeDisplayType === "tableInsert" ? (openBlock(), createElementBlock("div", _hoisted_24, [..._cache[5] || (_cache[5] = [createElementVNode("span", { class: "change-type" }, "Added table", -1)])])) : comment.trackedChangeDisplayType === "tableDelete" ? (openBlock(), createElementBlock("div", _hoisted_25, [..._cache[6] || (_cache[6] = [createElementVNode("span", { class: "change-type" }, "Deleted table", -1)])])) : comment.trackedChangeType === "trackFormat" ? (openBlock(), createElementBlock("div", _hoisted_26, [_cache[7] || (_cache[7] = createElementVNode("span", { class: "change-type" }, "Format: ", -1)), createElementVNode("span", _hoisted_27, toDisplayString(comment.trackedChangeText), 1)])) : comment.trackedChangeType === "both" ? (openBlock(), createElementBlock("div", _hoisted_28, [
|
|
14485
14529
|
_cache[8] || (_cache[8] = createElementVNode("span", { class: "change-type" }, "Replaced ", -1)),
|
|
14486
|
-
createElementVNode("span",
|
|
14530
|
+
createElementVNode("span", _hoisted_29, "\"" + toDisplayString(comment.deletedText) + "\"", 1),
|
|
14487
14531
|
_cache[9] || (_cache[9] = createElementVNode("span", { class: "change-type" }, " with ", -1)),
|
|
14488
|
-
createElementVNode("span",
|
|
14489
|
-
])) : comment.deletedText && comment.deletedText === "\n" ? (openBlock(), createElementBlock("div",
|
|
14532
|
+
createElementVNode("span", _hoisted_30, "\"" + toDisplayString(comment.trackedChangeText) + "\"", 1)
|
|
14533
|
+
])) : comment.deletedText && comment.deletedText === "\n" ? (openBlock(), createElementBlock("div", _hoisted_31, [..._cache[10] || (_cache[10] = [createElementVNode("span", { class: "change-type" }, "Deleted line break", -1)])])) : comment.trackedChangeText && comment.trackedChangeText === "\n" ? (openBlock(), createElementBlock("div", _hoisted_32, [..._cache[11] || (_cache[11] = [createElementVNode("span", { class: "change-type" }, "Added line break", -1)])])) : comment.deletedText ? (openBlock(), createElementBlock("div", _hoisted_33, [_cache[12] || (_cache[12] = createElementVNode("span", { class: "change-type" }, "Deleted ", -1)), createElementVNode("span", _hoisted_34, "\"" + toDisplayString(comment.deletedText) + "\"", 1)])) : comment.trackedChangeText ? (openBlock(), createElementBlock("div", _hoisted_35, [_cache[13] || (_cache[13] = createElementVNode("span", { class: "change-type" }, "Added ", -1)), createElementVNode("span", _hoisted_36, "\"" + toDisplayString(comment.trackedChangeText) + "\"", 1)])) : createCommentVNode("", true), comment.trackedChangeImagePreview?.src ? (openBlock(), createElementBlock("div", {
|
|
14490
14534
|
key: 12,
|
|
14491
14535
|
class: "tracked-change-image-preview",
|
|
14492
14536
|
"data-track-change-image-preview-role": comment.trackedChangeImagePreview.role ?? void 0
|
|
@@ -14497,7 +14541,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14497
14541
|
style: normalizeStyle(trackedChangeImagePreviewStyle(comment.trackedChangeImagePreview)),
|
|
14498
14542
|
loading: "lazy",
|
|
14499
14543
|
decoding: "async"
|
|
14500
|
-
}, null, 12,
|
|
14544
|
+
}, null, 12, _hoisted_38)], 8, _hoisted_37)) : createCommentVNode("", true)], 10, _hoisted_12$2),
|
|
14501
14545
|
shouldTruncate.value && isTextOverflowing.value && index === 0 ? (openBlock(), createElementBlock("div", {
|
|
14502
14546
|
key: 0,
|
|
14503
14547
|
class: "show-more-toggle",
|
|
@@ -14509,29 +14553,29 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14509
14553
|
onClick: withModifiers(toggleTruncation, ["stop", "prevent"])
|
|
14510
14554
|
}, " Show less ")) : createCommentVNode("", true)
|
|
14511
14555
|
])) : createCommentVNode("", true),
|
|
14512
|
-
!comment.trackedChange ? (openBlock(), createElementBlock("div",
|
|
14556
|
+
!comment.trackedChange ? (openBlock(), createElementBlock("div", _hoisted_39, [
|
|
14513
14557
|
!unref(isDebugging) && !isEditingThisComment.value(comment) ? (openBlock(), createElementBlock("div", {
|
|
14514
14558
|
key: 0,
|
|
14515
14559
|
class: normalizeClass(["comment", index === 0 ? bodyOverflowClass.value : void 0]),
|
|
14516
14560
|
ref_for: true,
|
|
14517
14561
|
ref: index === 0 ? setParentBodyRef : void 0,
|
|
14518
14562
|
innerHTML: renderedCommentTexts.value.get(comment.commentId)
|
|
14519
|
-
}, null, 10,
|
|
14563
|
+
}, null, 10, _hoisted_40)) : unref(isDebugging) && !isEditingThisComment.value(comment) ? (openBlock(), createElementBlock("div", _hoisted_41, toDisplayString(unref(editorCommentPositions)[comment.importedId !== void 0 ? comment.importedId : comment.commentId]?.bounds), 1)) : (openBlock(), createElementBlock("div", _hoisted_42, [createElementVNode("div", _hoisted_43, [createVNode(CommentInput_default, {
|
|
14520
14564
|
ref_for: true,
|
|
14521
14565
|
ref: setEditCommentInputRef(comment.commentId),
|
|
14522
14566
|
users: [],
|
|
14523
14567
|
config: unref(getConfig),
|
|
14524
14568
|
"include-header": false,
|
|
14525
14569
|
comment
|
|
14526
|
-
}, null, 8, ["config", "comment"])]), createElementVNode("div",
|
|
14570
|
+
}, null, 8, ["config", "comment"])]), createElementVNode("div", _hoisted_44, [createElementVNode("button", {
|
|
14527
14571
|
class: "sd-button reply-btn-cancel",
|
|
14528
14572
|
onClick: withModifiers(($event) => handleCancel(comment), ["stop", "prevent"])
|
|
14529
|
-
}, "Cancel", 8,
|
|
14573
|
+
}, "Cancel", 8, _hoisted_45), createElementVNode("button", {
|
|
14530
14574
|
class: normalizeClass(["sd-button primary reply-btn-primary", { "sd-is-disabled": !hasTextContent.value || isV2WriteDisabled.value }]),
|
|
14531
14575
|
onClick: withModifiers(($event) => handleCommentUpdate(comment), ["stop", "prevent"]),
|
|
14532
14576
|
disabled: !hasTextContent.value || isV2WriteDisabled.value,
|
|
14533
14577
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
14534
|
-
}, " Update ", 10,
|
|
14578
|
+
}, " Update ", 10, _hoisted_46)])])),
|
|
14535
14579
|
shouldTruncate.value && isTextOverflowing.value && index === 0 && !isEditingThisComment.value(comment) ? (openBlock(), createElementBlock("div", {
|
|
14536
14580
|
key: 3,
|
|
14537
14581
|
class: "show-more-toggle",
|
|
@@ -14546,29 +14590,29 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14546
14590
|
shouldCollapseThread.value && index === 0 ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [_cache[14] || (_cache[14] = createElementVNode("div", { class: "comment-separator" }, null, -1)), createElementVNode("div", {
|
|
14547
14591
|
class: "collapsed-replies",
|
|
14548
14592
|
onClick: withModifiers(expandThread, ["stop", "prevent"])
|
|
14549
|
-
}, [createElementVNode("div",
|
|
14593
|
+
}, [createElementVNode("div", _hoisted_47, [(openBlock(true), createElementBlock(Fragment, null, renderList(collapsedReplyAuthors.value, (author) => {
|
|
14550
14594
|
return openBlock(), createBlock(Avatar_default, {
|
|
14551
14595
|
key: author.email || author.name,
|
|
14552
14596
|
user: author,
|
|
14553
14597
|
class: "mini-avatar"
|
|
14554
14598
|
}, null, 8, ["user"]);
|
|
14555
14599
|
}), 128))]), createElementVNode("span", null, toDisplayString(collapsedReplyCount.value) + " more " + toDisplayString(collapsedReplyCount.value === 1 ? "reply" : "replies"), 1)])], 64)) : createCommentVNode("", true),
|
|
14556
|
-
showSeparator.value(index) ? (openBlock(), createElementBlock("div",
|
|
14600
|
+
showSeparator.value(index) ? (openBlock(), createElementBlock("div", _hoisted_48)) : createCommentVNode("", true)
|
|
14557
14601
|
]);
|
|
14558
14602
|
}), 128)),
|
|
14559
|
-
trackedChangeDecisionFailure.value ? (openBlock(), createElementBlock("div",
|
|
14603
|
+
trackedChangeDecisionFailure.value ? (openBlock(), createElementBlock("div", _hoisted_49, [createElementVNode("span", _hoisted_50, toDisplayString(trackedChangeDecisionFailureMessage.value), 1), createElementVNode("button", {
|
|
14560
14604
|
type: "button",
|
|
14561
14605
|
class: "sd-button tracked-change-decision-alert__retry",
|
|
14562
14606
|
onClick: withModifiers(retryTrackedChangeDecision, ["stop", "prevent"])
|
|
14563
14607
|
}, " Retry ")])) : createCommentVNode("", true),
|
|
14564
|
-
showInputSection.value && !unref(getConfig).readOnly ? (openBlock(), createElementBlock(Fragment, { key:
|
|
14608
|
+
showInputSection.value && !unref(getConfig).readOnly ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [!isReplying.value ? (openBlock(), createElementBlock("button", {
|
|
14565
14609
|
key: 0,
|
|
14566
14610
|
type: "button",
|
|
14567
14611
|
class: normalizeClass(["reply-pill", { "sd-is-disabled": isV2WriteDisabled.value }]),
|
|
14568
14612
|
onClick: withModifiers(startReply, ["stop", "prevent"]),
|
|
14569
14613
|
disabled: isV2WriteDisabled.value,
|
|
14570
14614
|
"data-disabled-reason": isV2WriteDisabled.value ? v2WriteCapability.value?.reason ?? null : null
|
|
14571
|
-
}, " Reply or add others with @ ", 10,
|
|
14615
|
+
}, " Reply or add others with @ ", 10, _hoisted_51)) : (openBlock(), createElementBlock("div", _hoisted_52, [createElementVNode("div", _hoisted_53, [createVNode(CommentInput_default, {
|
|
14572
14616
|
ref_key: "commentInput",
|
|
14573
14617
|
ref: commentInput,
|
|
14574
14618
|
users: usersFiltered.value,
|
|
@@ -14579,7 +14623,7 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14579
14623
|
"users",
|
|
14580
14624
|
"config",
|
|
14581
14625
|
"comment"
|
|
14582
|
-
])]), createElementVNode("div",
|
|
14626
|
+
])]), createElementVNode("div", _hoisted_54, [createElementVNode("button", {
|
|
14583
14627
|
class: "sd-button reply-btn-cancel",
|
|
14584
14628
|
onClick: withModifiers(handleCancel, ["stop", "prevent"])
|
|
14585
14629
|
}, "Cancel"), createElementVNode("button", {
|
|
@@ -14587,11 +14631,11 @@ var CommentDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
14587
14631
|
onClick: withModifiers(handleAddComment, ["stop", "prevent"]),
|
|
14588
14632
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14589
14633
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14590
|
-
}, " Reply ", 10,
|
|
14634
|
+
}, " Reply ", 10, _hoisted_55)])]))], 64)) : createCommentVNode("", true)
|
|
14591
14635
|
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
14592
14636
|
};
|
|
14593
14637
|
}
|
|
14594
|
-
}, [["__scopeId", "data-v-
|
|
14638
|
+
}, [["__scopeId", "data-v-05d27982"]]);
|
|
14595
14639
|
//#endregion
|
|
14596
14640
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14597
14641
|
var _hoisted_1$25 = [
|
|
@@ -23260,7 +23304,8 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
23260
23304
|
return;
|
|
23261
23305
|
}
|
|
23262
23306
|
const collaborationException = createCollaborationException(reason, documentId);
|
|
23263
|
-
const
|
|
23307
|
+
const baseMessage = collaborationException?.error.message ?? getV2EditorFailureMessage(reason);
|
|
23308
|
+
const message = reason === "collaboration-config-invalid" && detail ? `${baseMessage} ${detail}` : baseMessage;
|
|
23264
23309
|
const workerFailure = payload?.workerFailure && typeof payload.workerFailure === "object" ? payload.workerFailure : null;
|
|
23265
23310
|
setV2EditorFailure(documentId, {
|
|
23266
23311
|
reason,
|
|
@@ -23276,7 +23321,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
23276
23321
|
};
|
|
23277
23322
|
if (reason === "collaboration-v1-config-unsupported" || reason === "collaboration-room-format-unsupported" || reason === "collaboration-room-format-conflict" || reason === "collaboration-room-corrupt" || reason === "collaboration-v2-room-missing" || reason === "collaboration-v2-room-already-exists" || reason === "collaboration-v2-room-initializing" || reason === "collaboration-v2-room-bootstrap-stalled" || reason === "collaboration-open-intent-invalid" || reason === "collaboration-config-invalid") console.warn(`[SuperDoc] ${message}`, logContext);
|
|
23278
23323
|
else console.error(`[SuperDoc] ${message}`, logContext);
|
|
23279
|
-
proxy.$superdoc.emit("exception", collaborationException
|
|
23324
|
+
proxy.$superdoc.emit("exception", collaborationException && reason !== "collaboration-config-invalid" ? collaborationException : {
|
|
23280
23325
|
error: new Error(message),
|
|
23281
23326
|
code: reason,
|
|
23282
23327
|
...documentId ? { documentId } : {},
|
|
@@ -24504,7 +24549,7 @@ var SuperDoc_default = /*#__PURE__*/ _plugin_vue_export_helper_default({
|
|
|
24504
24549
|
], 46, _hoisted_1$17);
|
|
24505
24550
|
};
|
|
24506
24551
|
}
|
|
24507
|
-
}, [["__scopeId", "data-v-
|
|
24552
|
+
}, [["__scopeId", "data-v-2fc1721f"]]);
|
|
24508
24553
|
//#endregion
|
|
24509
24554
|
//#region src/core/create-app.js
|
|
24510
24555
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -46201,7 +46246,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46201
46246
|
}
|
|
46202
46247
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46203
46248
|
this.colorIndex = 0;
|
|
46204
|
-
this.version = "2.28.0-next.
|
|
46249
|
+
this.version = "2.28.0-next.6";
|
|
46205
46250
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46206
46251
|
this.superdocId = config.superdocId || v4();
|
|
46207
46252
|
this.colors = this.config.colors ?? [];
|
|
@@ -46917,7 +46962,8 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46917
46962
|
...syncTimeoutOption,
|
|
46918
46963
|
...target.serverUrl ? { serverUrl: target.serverUrl } : {},
|
|
46919
46964
|
...target.params ? { params: target.params } : {},
|
|
46920
|
-
...target.token ? { token: target.token } : {}
|
|
46965
|
+
...target.token ? { token: target.token } : {},
|
|
46966
|
+
...target.retry !== void 0 ? { retry: target.retry } : {}
|
|
46921
46967
|
};
|
|
46922
46968
|
return {
|
|
46923
46969
|
providerType: "y-websocket",
|