superdoc 2.30.0-next.13 → 2.30.0-next.19
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-CvK1JdZv.cjs → create-super-doc-ui-D7uBUZfs.cjs} +9277 -9185
- package/dist/chunks/{create-super-doc-ui--o8TcYYv.es.js → create-super-doc-ui-_t6kMzLs.es.js} +9277 -9185
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -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/core/types/index.d.ts +1 -4
- package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +6 -0
- package/dist/superdoc/src/public/ui/content-controls-handle.d.ts +31 -0
- package/dist/superdoc/src/public/ui/heavy-read-gate.d.ts +41 -0
- package/dist/superdoc/src/public/ui/search-handle.d.ts +24 -0
- package/dist/superdoc/src/public/ui/styles-handle.d.ts +54 -0
- package/dist/superdoc/src/public/ui/types.d.ts +6 -0
- package/dist/superdoc/src/stores/comments-store.d.ts +40 -1
- package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +3 -3
- package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +2 -1
- package/dist/superdoc.cjs +90 -55
- package/dist/superdoc.es.js +90 -55
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +38 -38
- package/package.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SearchController, SearchSnapshot, SnapshotSubscribable, Subscribable } from './types.js';
|
|
2
|
+
export type SearchCommandId = 'find.replace' | 'find.replaceAll';
|
|
3
|
+
export interface SearchCommandState {
|
|
4
|
+
enabled?: unknown;
|
|
5
|
+
reason?: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface SearchHandleDeps {
|
|
8
|
+
hostSearch: () => unknown;
|
|
9
|
+
editCommandSearch: () => unknown;
|
|
10
|
+
editCommandState: (commandId: SearchCommandId) => SearchCommandState | null;
|
|
11
|
+
snapshotHandle: (sub: Subscribable<SearchSnapshot>) => SnapshotSubscribable<SearchSnapshot>;
|
|
12
|
+
isDisposed: () => boolean;
|
|
13
|
+
onDocumentReset: (hook: () => void) => void;
|
|
14
|
+
onDocumentModeChange: (hook: () => void) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface SearchHandleController {
|
|
17
|
+
handle: SearchController;
|
|
18
|
+
scheduleRefresh: () => void;
|
|
19
|
+
stopRefresh: () => void;
|
|
20
|
+
clearListeners: () => void;
|
|
21
|
+
invalidateInFlightRequests: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const SEARCH_REFRESH_DELAY_MS = 120;
|
|
24
|
+
export declare function createSearchHandle(deps: SearchHandleDeps): SearchHandleController;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AsyncReadEntry } from './async-read-cache.js';
|
|
2
|
+
import { LooseRecord } from './loose-record.js';
|
|
3
|
+
import { ActiveParagraphStyle, SelectionSlice, SliceStatus, SnapshotSubscribable, StyleCatalogItem, StylesGetCatalogInput, StylesGetCatalogResult, StylesHandle, StylesSlice, Subscribable, SuperDocUIFailureReceipt, SuperDocUIState, WorkflowReceipt } from './types.js';
|
|
4
|
+
export declare const WORD_DEFAULT_PARAGRAPH_STYLE_ID = "Normal";
|
|
5
|
+
export type StyleCatalogCache = {
|
|
6
|
+
full: StylesGetCatalogResult;
|
|
7
|
+
quickGallery: readonly StyleCatalogItem[];
|
|
8
|
+
byId: Map<string, StyleCatalogItem>;
|
|
9
|
+
};
|
|
10
|
+
export interface StyleCatalogRead {
|
|
11
|
+
cache: StyleCatalogCache | null;
|
|
12
|
+
status: SliceStatus;
|
|
13
|
+
}
|
|
14
|
+
export interface ActiveParagraphStyleRead {
|
|
15
|
+
style: ActiveParagraphStyle;
|
|
16
|
+
status: SliceStatus;
|
|
17
|
+
}
|
|
18
|
+
interface AsyncRead<T> {
|
|
19
|
+
value: T | null;
|
|
20
|
+
status: SliceStatus;
|
|
21
|
+
}
|
|
22
|
+
export interface StyleReadsDeps {
|
|
23
|
+
hasEditor: () => boolean;
|
|
24
|
+
getDoc: () => LooseRecord | null;
|
|
25
|
+
contentToken: () => string;
|
|
26
|
+
readAsync: <T>(key: string, token: string, run: () => unknown, normalize: (raw: unknown) => T | null) => AsyncRead<T>;
|
|
27
|
+
readNodeById: (doc: LooseRecord | null, blockId: string, story: LooseRecord) => AsyncRead<LooseRecord>;
|
|
28
|
+
}
|
|
29
|
+
export interface StyleReads {
|
|
30
|
+
readCatalog: (input?: StylesGetCatalogInput) => AsyncRead<StylesGetCatalogResult>;
|
|
31
|
+
catalog: () => StyleCatalogRead;
|
|
32
|
+
activeParagraphStyle: (selection: SelectionSlice) => ActiveParagraphStyleRead;
|
|
33
|
+
computeSlice: (selection: SelectionSlice) => StylesSlice;
|
|
34
|
+
}
|
|
35
|
+
export interface StylesHandleDeps {
|
|
36
|
+
reads: StyleReads;
|
|
37
|
+
select: (selector: (state: Pick<SuperDocUIState, 'styles'>) => StylesSlice) => Subscribable<StylesSlice>;
|
|
38
|
+
snapshotHandle: (sub: Subscribable<StylesSlice>) => SnapshotSubscribable<StylesSlice>;
|
|
39
|
+
currentSelection: () => SelectionSlice;
|
|
40
|
+
isDisposed: () => boolean;
|
|
41
|
+
getDoc: () => LooseRecord | null;
|
|
42
|
+
contentToken: () => string;
|
|
43
|
+
demandHeavyDocRead: (key: string) => void;
|
|
44
|
+
readAsyncEntry: (key: string) => AsyncReadEntry | undefined;
|
|
45
|
+
readDocumentMode: () => SuperDocUIState['documentMode'];
|
|
46
|
+
readHostSelectionSnapshot: () => object | null;
|
|
47
|
+
readSelectionInfoFresh: () => Promise<SelectionSlice>;
|
|
48
|
+
settleWorkflowReceipt: (receipt: unknown, fallback: SuperDocUIFailureReceipt) => WorkflowReceipt;
|
|
49
|
+
}
|
|
50
|
+
export declare function styleCatalogReadKey(input?: StylesGetCatalogInput): string;
|
|
51
|
+
export declare function documentDefaultParagraphStyleId(catalog: StyleCatalogCache | null): string;
|
|
52
|
+
export declare function createStyleReads(deps: StyleReadsDeps): StyleReads;
|
|
53
|
+
export declare function createStylesHandle(deps: StylesHandleDeps): StylesHandle;
|
|
54
|
+
export {};
|
|
@@ -629,6 +629,7 @@ export interface TrackChangesSlice {
|
|
|
629
629
|
status: SliceStatus;
|
|
630
630
|
/** Readiness of the tracked-change list alone, independent of selection. */
|
|
631
631
|
listStatus: SliceStatus;
|
|
632
|
+
analysis?: ReviewAnalysisProgress | null;
|
|
632
633
|
/** All tracked changes currently loaded. */
|
|
633
634
|
items: readonly TrackChangesItem[];
|
|
634
635
|
/** Total tracked-change count. */
|
|
@@ -638,6 +639,11 @@ export interface TrackChangesSlice {
|
|
|
638
639
|
/** Distinct authors across the loaded changes. */
|
|
639
640
|
authors: readonly string[];
|
|
640
641
|
}
|
|
642
|
+
export interface ReviewAnalysisProgress {
|
|
643
|
+
done: number;
|
|
644
|
+
total: number;
|
|
645
|
+
stage: string | null;
|
|
646
|
+
}
|
|
641
647
|
/** Content-controls slice. */
|
|
642
648
|
export interface ContentControlsSlice {
|
|
643
649
|
/** Readiness of the underlying async content-control read ({@link SliceStatus}). */
|
|
@@ -2661,6 +2661,19 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
2661
2661
|
isCommentsListVisible: Ref<boolean, boolean>;
|
|
2662
2662
|
isReviewDirectoryActive: Ref<boolean, boolean>;
|
|
2663
2663
|
isReviewDirectoryLoading: Ref<boolean, boolean>;
|
|
2664
|
+
reviewAnalysisProgress: Ref<{
|
|
2665
|
+
done: number;
|
|
2666
|
+
total: number;
|
|
2667
|
+
stage: string | null;
|
|
2668
|
+
} | null, {
|
|
2669
|
+
done: number;
|
|
2670
|
+
total: number;
|
|
2671
|
+
stage: string | null;
|
|
2672
|
+
} | {
|
|
2673
|
+
done: number;
|
|
2674
|
+
total: number;
|
|
2675
|
+
stage: string | null;
|
|
2676
|
+
} | null>;
|
|
2664
2677
|
generalCommentIds: Ref<string[], string[]>;
|
|
2665
2678
|
editorCommentIds: Ref<string[], string[]>;
|
|
2666
2679
|
commentsParentElement: Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -7927,7 +7940,7 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
7927
7940
|
remapTrackedChangeIdentities: (pairs?: readonly RemappedPair[], { documentId }?: {
|
|
7928
7941
|
documentId?: CommentId | null;
|
|
7929
7942
|
}) => void;
|
|
7930
|
-
}, "COMMENT_EVENTS" | "hasSyncedCollaborationComments" | "editingCommentId" | "activeComment" | "activeFloatingCommentInstanceId" | "suppressInternalExternal" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "editorCommentPositions" | "hasInitializedLocations" | "isCommentHighlighted" | "floatingCommentsOffset" | "committedReviewPresentations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2CommentsAdapter" | "v2TrackedChangesAdapter">, Pick<{
|
|
7943
|
+
}, "COMMENT_EVENTS" | "hasSyncedCollaborationComments" | "editingCommentId" | "activeComment" | "activeFloatingCommentInstanceId" | "suppressInternalExternal" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "reviewAnalysisProgress" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "editorCommentPositions" | "hasInitializedLocations" | "isCommentHighlighted" | "floatingCommentsOffset" | "committedReviewPresentations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2CommentsAdapter" | "v2TrackedChangesAdapter">, Pick<{
|
|
7931
7944
|
COMMENT_EVENTS: {
|
|
7932
7945
|
readonly RESOLVED: "resolved";
|
|
7933
7946
|
readonly NEW: "new";
|
|
@@ -10415,6 +10428,19 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
10415
10428
|
isCommentsListVisible: Ref<boolean, boolean>;
|
|
10416
10429
|
isReviewDirectoryActive: Ref<boolean, boolean>;
|
|
10417
10430
|
isReviewDirectoryLoading: Ref<boolean, boolean>;
|
|
10431
|
+
reviewAnalysisProgress: Ref<{
|
|
10432
|
+
done: number;
|
|
10433
|
+
total: number;
|
|
10434
|
+
stage: string | null;
|
|
10435
|
+
} | null, {
|
|
10436
|
+
done: number;
|
|
10437
|
+
total: number;
|
|
10438
|
+
stage: string | null;
|
|
10439
|
+
} | {
|
|
10440
|
+
done: number;
|
|
10441
|
+
total: number;
|
|
10442
|
+
stage: string | null;
|
|
10443
|
+
} | null>;
|
|
10418
10444
|
generalCommentIds: Ref<string[], string[]>;
|
|
10419
10445
|
editorCommentIds: Ref<string[], string[]>;
|
|
10420
10446
|
commentsParentElement: Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -18169,6 +18195,19 @@ export declare const useCommentsStore: import('pinia').StoreDefinition<"comments
|
|
|
18169
18195
|
isCommentsListVisible: Ref<boolean, boolean>;
|
|
18170
18196
|
isReviewDirectoryActive: Ref<boolean, boolean>;
|
|
18171
18197
|
isReviewDirectoryLoading: Ref<boolean, boolean>;
|
|
18198
|
+
reviewAnalysisProgress: Ref<{
|
|
18199
|
+
done: number;
|
|
18200
|
+
total: number;
|
|
18201
|
+
stage: string | null;
|
|
18202
|
+
} | null, {
|
|
18203
|
+
done: number;
|
|
18204
|
+
total: number;
|
|
18205
|
+
stage: string | null;
|
|
18206
|
+
} | {
|
|
18207
|
+
done: number;
|
|
18208
|
+
total: number;
|
|
18209
|
+
stage: string | null;
|
|
18210
|
+
} | null>;
|
|
18172
18211
|
generalCommentIds: Ref<string[], string[]>;
|
|
18173
18212
|
editorCommentIds: Ref<string[], string[]>;
|
|
18174
18213
|
commentsParentElement: Ref<HTMLElement | null, HTMLElement | null>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export type PendingSelectionHost = {
|
|
1
|
+
export type PendingSelectionHost<Snapshot = unknown> = {
|
|
2
2
|
activeEditor?: {
|
|
3
3
|
options?: {
|
|
4
4
|
documentId?: unknown;
|
|
5
5
|
} | null;
|
|
6
6
|
doc?: {
|
|
7
7
|
selection?: {
|
|
8
|
-
current?: () =>
|
|
8
|
+
current?: () => Snapshot | PromiseLike<Snapshot>;
|
|
9
9
|
} | null;
|
|
10
10
|
} | null;
|
|
11
11
|
} | null;
|
|
@@ -14,4 +14,4 @@ export type PendingActiveSelection = {
|
|
|
14
14
|
source?: unknown;
|
|
15
15
|
documentId?: unknown;
|
|
16
16
|
} | null | undefined;
|
|
17
|
-
export declare const getPendingSelectionSnapshot: (superdoc: PendingSelectionHost
|
|
17
|
+
export declare const getPendingSelectionSnapshot: <Snapshot>(superdoc: PendingSelectionHost<Snapshot>, activeSelection: PendingActiveSelection) => Snapshot | Promise<Snapshot | null> | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectionInfo } from '../../../../document-api/src/index.js';
|
|
1
2
|
import { CommentInputParams } from '../../components/CommentsLayer/comment-params.js';
|
|
2
3
|
import { StoryLocator } from '../../core/types/index.js';
|
|
3
4
|
import { TrackedChangeDecisionOutcome } from './tracked-change-decision.js';
|
|
@@ -77,7 +78,7 @@ export interface V2CommentsAdapter {
|
|
|
77
78
|
mapV2CommentToUseCommentInput(item: unknown, options: V2CommentInputOptions): CommentInputParams | null;
|
|
78
79
|
getCapabilityState?(command?: string | null): V2CommentsCapabilityState | null | undefined;
|
|
79
80
|
captureCurrentSelection?(options?: {
|
|
80
|
-
beforeReady?: (snapshot:
|
|
81
|
+
beforeReady?: (snapshot: SelectionInfo) => void | Promise<void>;
|
|
81
82
|
}): Promise<V2CommentSelectionCapture>;
|
|
82
83
|
isPendingCommentCreation?(commentId: string | undefined): boolean;
|
|
83
84
|
seedReviewCatalog?(items: unknown[], metadata?: {
|
package/dist/superdoc.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-BzM2_tVU.cjs");
|
|
4
4
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
5
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
5
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-D7uBUZfs.cjs");
|
|
6
6
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
7
7
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
8
8
|
const require_jszip = require("./chunks/jszip-D8mAFF-r.cjs");
|
|
@@ -259,7 +259,7 @@ var v_click_outside_default = {
|
|
|
259
259
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
260
260
|
function getSuperdocVersion() {
|
|
261
261
|
try {
|
|
262
|
-
return "2.30.0-next.
|
|
262
|
+
return "2.30.0-next.19";
|
|
263
263
|
} catch {
|
|
264
264
|
return "unknown";
|
|
265
265
|
}
|
|
@@ -8070,6 +8070,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8070
8070
|
const isCommentsListVisible = require__plugin_vue_export_helper.ref(false);
|
|
8071
8071
|
const isReviewDirectoryActive = require__plugin_vue_export_helper.ref(false);
|
|
8072
8072
|
const isReviewDirectoryLoading = require__plugin_vue_export_helper.ref(false);
|
|
8073
|
+
const reviewAnalysisProgress = require__plugin_vue_export_helper.ref(null);
|
|
8073
8074
|
const editorCommentIds = require__plugin_vue_export_helper.ref([]);
|
|
8074
8075
|
const editorCommentPositions = require__plugin_vue_export_helper.ref({});
|
|
8075
8076
|
const isCommentHighlighted = require__plugin_vue_export_helper.ref(false);
|
|
@@ -10803,6 +10804,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10803
10804
|
isCommentsListVisible,
|
|
10804
10805
|
isReviewDirectoryActive,
|
|
10805
10806
|
isReviewDirectoryLoading,
|
|
10807
|
+
reviewAnalysisProgress,
|
|
10806
10808
|
generalCommentIds,
|
|
10807
10809
|
editorCommentIds,
|
|
10808
10810
|
commentsParentElement,
|
|
@@ -11030,7 +11032,7 @@ var _hoisted_3$21 = {
|
|
|
11030
11032
|
key: 0,
|
|
11031
11033
|
class: "comments-dropdown__option-icon"
|
|
11032
11034
|
};
|
|
11033
|
-
var _hoisted_4$
|
|
11035
|
+
var _hoisted_4$16 = ["innerHTML"];
|
|
11034
11036
|
var _hoisted_5$11 = { class: "comments-dropdown__option-label" };
|
|
11035
11037
|
var CommentsDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11036
11038
|
__name: "CommentsDropdown",
|
|
@@ -11174,7 +11176,7 @@ var CommentsDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
11174
11176
|
}, [hasIcon(option) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_3$21, [option.iconString ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", {
|
|
11175
11177
|
key: 0,
|
|
11176
11178
|
innerHTML: option.iconString
|
|
11177
|
-
}, null, 8, _hoisted_4$
|
|
11179
|
+
}, null, 8, _hoisted_4$16)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.unref(OptionIcon), {
|
|
11178
11180
|
key: 1,
|
|
11179
11181
|
option
|
|
11180
11182
|
}, null, 8, ["option"]))])) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$11, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 10, _hoisted_2$24);
|
|
@@ -11190,7 +11192,7 @@ var CommentsDropdown_default = /* @__PURE__ */ require__plugin_vue_export_helper
|
|
|
11190
11192
|
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
11191
11193
|
var _hoisted_2$23 = ["innerHTML"];
|
|
11192
11194
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
11193
|
-
var _hoisted_4$
|
|
11195
|
+
var _hoisted_4$15 = ["innerHTML"];
|
|
11194
11196
|
var InternalDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
11195
11197
|
__name: "InternalDropdown",
|
|
11196
11198
|
props: {
|
|
@@ -11267,7 +11269,7 @@ var InternalDropdown_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/
|
|
|
11267
11269
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
11268
11270
|
class: "sd-dropdown-caret",
|
|
11269
11271
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).caretDown
|
|
11270
|
-
}, null, 8, _hoisted_4$
|
|
11272
|
+
}, null, 8, _hoisted_4$15)
|
|
11271
11273
|
])]),
|
|
11272
11274
|
_: 1
|
|
11273
11275
|
}, 8, ["disabled", "content-style"])], 4);
|
|
@@ -11346,7 +11348,7 @@ var Avatar_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_v
|
|
|
11346
11348
|
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
11347
11349
|
var _hoisted_2$21 = { class: "comment-header-left" };
|
|
11348
11350
|
var _hoisted_3$18 = { class: "user-info" };
|
|
11349
|
-
var _hoisted_4$
|
|
11351
|
+
var _hoisted_4$14 = { class: "user-name" };
|
|
11350
11352
|
var _hoisted_5$10 = {
|
|
11351
11353
|
key: 0,
|
|
11352
11354
|
class: "imported-tag"
|
|
@@ -11607,7 +11609,7 @@ var CommentHeader_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ re
|
|
|
11607
11609
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$28, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$21, [require__plugin_vue_export_helper.createVNode(Avatar_default, {
|
|
11608
11610
|
user: getCurrentUser.value,
|
|
11609
11611
|
class: "avatar"
|
|
11610
|
-
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$
|
|
11612
|
+
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$14, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_5$10, "IMPORTED")) : require__plugin_vue_export_helper.createCommentVNode("", true)]), props.comment.createdTime ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_6$8, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(formatDate)(props.comment.createdTime)), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)])]), require__plugin_vue_export_helper.createElementVNode("div", { class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
11611
11613
|
allowResolve.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
11612
11614
|
key: 0,
|
|
11613
11615
|
class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu__icon", { "sd-is-disabled": Boolean(__props.resolveDisabledReason) }]),
|
|
@@ -11665,7 +11667,7 @@ var _hoisted_3$17 = [
|
|
|
11665
11667
|
"aria-controls",
|
|
11666
11668
|
"aria-activedescendant"
|
|
11667
11669
|
];
|
|
11668
|
-
var _hoisted_4$
|
|
11670
|
+
var _hoisted_4$13 = [
|
|
11669
11671
|
"id",
|
|
11670
11672
|
"aria-selected",
|
|
11671
11673
|
"data-sd-comment-mention-option",
|
|
@@ -11872,7 +11874,7 @@ var CommentInput_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ req
|
|
|
11872
11874
|
"aria-selected": index === highlightedMentionIndex.value,
|
|
11873
11875
|
"data-sd-comment-mention-option": userKey(user),
|
|
11874
11876
|
onMousedown: require__plugin_vue_export_helper.withModifiers(($event) => selectMention(user), ["prevent"])
|
|
11875
|
-
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$9, require__plugin_vue_export_helper.toDisplayString(displayName(user)), 1), user.email ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_6$7, require__plugin_vue_export_helper.toDisplayString(user.email), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 42, _hoisted_4$
|
|
11877
|
+
}, [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_5$9, require__plugin_vue_export_helper.toDisplayString(displayName(user)), 1), user.email ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_6$7, require__plugin_vue_export_helper.toDisplayString(user.email), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)], 42, _hoisted_4$13);
|
|
11876
11878
|
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 2)]);
|
|
11877
11879
|
};
|
|
11878
11880
|
}
|
|
@@ -12001,7 +12003,7 @@ var _hoisted_2$19 = {
|
|
|
12001
12003
|
class: "existing-internal-input"
|
|
12002
12004
|
};
|
|
12003
12005
|
var _hoisted_3$16 = { class: "new-comment-input-wrapper" };
|
|
12004
|
-
var _hoisted_4$
|
|
12006
|
+
var _hoisted_4$12 = {
|
|
12005
12007
|
key: 1,
|
|
12006
12008
|
class: "tracked-change-decision-alert",
|
|
12007
12009
|
role: "alert"
|
|
@@ -13000,14 +13002,15 @@ var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ re
|
|
|
13000
13002
|
if (session?.owner === editSessionOwner) session.submission = submission;
|
|
13001
13003
|
const editorOwner = captureCommentEditorOwner();
|
|
13002
13004
|
const documentId = editorOwner.adapter.documentId;
|
|
13003
|
-
const
|
|
13005
|
+
const threadId = props.comment.commentId;
|
|
13006
|
+
const fileId = props.comment.fileId;
|
|
13004
13007
|
const draft = currentCommentText.value;
|
|
13005
13008
|
const outcome = await commentsStore.editCommentV2({
|
|
13006
13009
|
superdoc: proxy.$superdoc,
|
|
13007
13010
|
commentId: comment.commentId,
|
|
13008
13011
|
text: draft
|
|
13009
13012
|
});
|
|
13010
|
-
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || !editorOwner.isCurrent() || editorOwner.adapter.documentId !== documentId || props.comment !==
|
|
13013
|
+
if (session?.owner !== editSessionOwner || commentEditSessions.get(commentsStore) !== session || session.submission !== submission || !editorOwner.isCurrent() || editorOwner.adapter.documentId !== documentId || props.comment.commentId !== threadId || props.comment.fileId !== fileId || editingCommentId.value !== comment.commentId || currentCommentText.value !== draft) return outcome;
|
|
13011
13014
|
if (!outcome?.ok) {
|
|
13012
13015
|
commentSaveFailure.value = commentSaveFailureMessage(outcome);
|
|
13013
13016
|
return outcome;
|
|
@@ -13146,7 +13149,7 @@ var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ re
|
|
|
13146
13149
|
"config",
|
|
13147
13150
|
"comment"
|
|
13148
13151
|
])]),
|
|
13149
|
-
commentSaveFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("p", _hoisted_4$
|
|
13152
|
+
commentSaveFailure.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("p", _hoisted_4$12, require__plugin_vue_export_helper.toDisplayString(commentSaveFailure.value), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13150
13153
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_5$8, [require__plugin_vue_export_helper.createElementVNode("button", {
|
|
13151
13154
|
class: "sd-button reply-btn-cancel",
|
|
13152
13155
|
onClick: require__plugin_vue_export_helper.withModifiers(handleCancel, ["stop", "prevent"])
|
|
@@ -13327,7 +13330,7 @@ var CommentDialog_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ re
|
|
|
13327
13330
|
});
|
|
13328
13331
|
//#endregion
|
|
13329
13332
|
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13330
|
-
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-
|
|
13333
|
+
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-919d450b"]]);
|
|
13331
13334
|
//#endregion
|
|
13332
13335
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue?vue&type=script&setup=true&lang.ts
|
|
13333
13336
|
var _hoisted_1$25 = [
|
|
@@ -13483,8 +13486,14 @@ var ReviewDirectoryListItem_default = /* @__PURE__ */ require__plugin_vue_export
|
|
|
13483
13486
|
//#endregion
|
|
13484
13487
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue?vue&type=script&setup=true&lang.ts
|
|
13485
13488
|
var _hoisted_1$24 = ["aria-busy"];
|
|
13486
|
-
var _hoisted_2$18 = {
|
|
13489
|
+
var _hoisted_2$18 = {
|
|
13490
|
+
key: 0,
|
|
13491
|
+
class: "review-analysis",
|
|
13492
|
+
role: "status",
|
|
13493
|
+
"data-testid": "review-analysis-progress"
|
|
13494
|
+
};
|
|
13487
13495
|
var _hoisted_3$15 = { key: 1 };
|
|
13496
|
+
var _hoisted_4$11 = { key: 2 };
|
|
13488
13497
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
13489
13498
|
var commentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require__plugin_vue_export_helper.defineComponent({
|
|
13490
13499
|
__name: "commentsList",
|
|
@@ -13506,7 +13515,12 @@ var commentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ req
|
|
|
13506
13515
|
const rovingIndex = require__plugin_vue_export_helper.ref(0);
|
|
13507
13516
|
const isCommentsListVisible = require__plugin_vue_export_helper.toRef(commentsStore, "isCommentsListVisible");
|
|
13508
13517
|
const floatingCommentInstances = require__plugin_vue_export_helper.computed(() => commentsStore.getFloatingCommentInstances);
|
|
13509
|
-
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading } = storeToRefs(piniaCommentsStore);
|
|
13518
|
+
const { activeComment, activeFloatingCommentInstanceId, commentsList, reviewDirectoryList, isReviewDirectoryActive, isReviewDirectoryLoading, reviewAnalysisProgress } = storeToRefs(piniaCommentsStore);
|
|
13519
|
+
const reviewAnalysisLabel = require__plugin_vue_export_helper.computed(() => {
|
|
13520
|
+
const progress = reviewAnalysisProgress.value;
|
|
13521
|
+
if (!isReviewDirectoryActive.value || !isReviewDirectoryLoading.value || !progress) return null;
|
|
13522
|
+
return `Analysing changes… ${Math.min(progress.done, progress.total)} of ${progress.total}`;
|
|
13523
|
+
});
|
|
13510
13524
|
const groupedComments = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? commentsStore.getGroupedReviewDirectory : commentsStore.getGroupedComments);
|
|
13511
13525
|
const reviewRows = require__plugin_vue_export_helper.computed(() => isReviewDirectoryActive.value ? reviewDirectoryList.value : commentsList.value);
|
|
13512
13526
|
const commentAliases = (comment) => [
|
|
@@ -13619,45 +13633,53 @@ var commentsList_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ req
|
|
|
13619
13633
|
class: "comments-list",
|
|
13620
13634
|
role: "list",
|
|
13621
13635
|
"aria-busy": require__plugin_vue_export_helper.unref(isReviewDirectoryActive) && require__plugin_vue_export_helper.unref(isReviewDirectoryLoading) ? "true" : "false"
|
|
13622
|
-
}, [
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13636
|
+
}, [
|
|
13637
|
+
reviewAnalysisLabel.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_2$18, require__plugin_vue_export_helper.toDisplayString(reviewAnalysisLabel.value), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13638
|
+
__props.showMainComments ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$15, [(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(parentCommentDisplayItems.value, (item, index) => {
|
|
13639
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ReviewDirectoryListItem_default, {
|
|
13640
|
+
key: item.id,
|
|
13641
|
+
item,
|
|
13642
|
+
index,
|
|
13643
|
+
total: totalDisplayItems.value,
|
|
13644
|
+
"tab-index": index === rovingIndex.value ? 0 : -1,
|
|
13645
|
+
onFocusItem: _cache[0] || (_cache[0] = ($event) => rovingIndex.value = $event),
|
|
13646
|
+
onNavigate: focusDirectoryItem
|
|
13647
|
+
}, null, 8, [
|
|
13648
|
+
"item",
|
|
13649
|
+
"index",
|
|
13650
|
+
"total",
|
|
13651
|
+
"tab-index"
|
|
13652
|
+
]);
|
|
13653
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true),
|
|
13654
|
+
shouldShowResolvedComments.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$11, [_cache[2] || (_cache[2] = require__plugin_vue_export_helper.createElementVNode("div", { class: "comment-title" }, "Resolved", -1)), (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(resolvedCommentDisplayItems.value, (item, index) => {
|
|
13655
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(ReviewDirectoryListItem_default, {
|
|
13656
|
+
key: item.id,
|
|
13657
|
+
item,
|
|
13658
|
+
index: displayedMainCount.value + index,
|
|
13659
|
+
total: totalDisplayItems.value,
|
|
13660
|
+
"tab-index": displayedMainCount.value + index === rovingIndex.value ? 0 : -1,
|
|
13661
|
+
onFocusItem: _cache[1] || (_cache[1] = ($event) => rovingIndex.value = $event),
|
|
13662
|
+
onNavigate: focusDirectoryItem
|
|
13663
|
+
}, null, 8, [
|
|
13664
|
+
"item",
|
|
13665
|
+
"index",
|
|
13666
|
+
"total",
|
|
13667
|
+
"tab-index"
|
|
13668
|
+
]);
|
|
13669
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
13670
|
+
], 8, _hoisted_1$24);
|
|
13653
13671
|
};
|
|
13654
13672
|
}
|
|
13655
13673
|
});
|
|
13656
13674
|
//#endregion
|
|
13657
13675
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
13658
|
-
var commentsList_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(commentsList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-
|
|
13676
|
+
var commentsList_default = /* @__PURE__ */ require__plugin_vue_export_helper._plugin_vue_export_helper_default(commentsList_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-641eba1e"]]);
|
|
13659
13677
|
//#endregion
|
|
13660
13678
|
//#region src/components/CommentsLayer/commentsList/super-comments-list.ts
|
|
13679
|
+
var reviewAnalysisOf = (snapshot) => {
|
|
13680
|
+
const analysis = snapshot?.analysis;
|
|
13681
|
+
return analysis && typeof analysis.done === "number" && typeof analysis.total === "number" && analysis.total > 0 ? analysis : null;
|
|
13682
|
+
};
|
|
13661
13683
|
var isReviewDirectoryStore = (value) => require__plugin_vue_export_helper.isPlainObject(value) && typeof value.setReviewDirectoryFromV2 === "function" && typeof value.clearReviewDirectory === "function";
|
|
13662
13684
|
var readCommentsStore = (superdoc) => {
|
|
13663
13685
|
const store = superdoc?.["commentsStore"];
|
|
@@ -13715,9 +13737,16 @@ var SuperComments = class extends require_eventemitter3.import_eventemitter3.def
|
|
|
13715
13737
|
if (generation !== this.directoryGeneration) return;
|
|
13716
13738
|
if ((snapshot?.listStatus ?? snapshot?.status) !== "ready") {
|
|
13717
13739
|
const store = readCommentsStore(this.superdoc);
|
|
13718
|
-
if (store)
|
|
13740
|
+
if (store) {
|
|
13741
|
+
store.isReviewDirectoryLoading = true;
|
|
13742
|
+
if (family === "trackChanges") store.reviewAnalysisProgress = reviewAnalysisOf(snapshot);
|
|
13743
|
+
}
|
|
13719
13744
|
return;
|
|
13720
13745
|
}
|
|
13746
|
+
if (family === "trackChanges") {
|
|
13747
|
+
const store = readCommentsStore(this.superdoc);
|
|
13748
|
+
if (store) store.reviewAnalysisProgress = null;
|
|
13749
|
+
}
|
|
13721
13750
|
const items = Array.isArray(snapshot.items) ? snapshot.items : [];
|
|
13722
13751
|
if (this.directoryItemRefs[family] === items) {
|
|
13723
13752
|
const store = readCommentsStore(this.superdoc);
|
|
@@ -13776,6 +13805,7 @@ var SuperComments = class extends require_eventemitter3.import_eventemitter3.def
|
|
|
13776
13805
|
store.clearReviewDirectory();
|
|
13777
13806
|
store.isReviewDirectoryActive = false;
|
|
13778
13807
|
store.isReviewDirectoryLoading = false;
|
|
13808
|
+
store.reviewAnalysisProgress = null;
|
|
13779
13809
|
}
|
|
13780
13810
|
if (this.app) {
|
|
13781
13811
|
this.app.unmount();
|
|
@@ -16370,6 +16400,7 @@ function createReviewGeometryDelivery(deliver) {
|
|
|
16370
16400
|
payload.documentEpoch,
|
|
16371
16401
|
payload.paintEpoch,
|
|
16372
16402
|
payload.commitSequence,
|
|
16403
|
+
payload.generation,
|
|
16373
16404
|
payload.pageIndices,
|
|
16374
16405
|
payload.zoomScale,
|
|
16375
16406
|
payload.reviewGeometry
|
|
@@ -22325,6 +22356,9 @@ var SuperDoc_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require
|
|
|
22325
22356
|
onCommentsUpdate: onEditorCommentsUpdate,
|
|
22326
22357
|
onFontsResolved: onFontsResolvedFn,
|
|
22327
22358
|
onPageCountKnown: proxy.$superdoc.config.onPageCountKnown ?? null,
|
|
22359
|
+
onReviewAnalysisProgress: (progress) => {
|
|
22360
|
+
v2ReviewWindowController.noteAnalysisProgress?.(progress);
|
|
22361
|
+
},
|
|
22328
22362
|
onReviewWindowCommitted: (payload) => {
|
|
22329
22363
|
v2ReviewWindowController.onCommittedPagePaint?.({
|
|
22330
22364
|
...payload,
|
|
@@ -23410,7 +23444,7 @@ var SuperDoc_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require
|
|
|
23410
23444
|
ref_key: "rightSidebarRef",
|
|
23411
23445
|
ref: rightSidebarRef,
|
|
23412
23446
|
class: "superdoc__right-sidebar right-sidebar"
|
|
23413
|
-
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$9, [require__plugin_vue_export_helper.unref(hasInitializedLocations)
|
|
23447
|
+
}, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$9, [require__plugin_vue_export_helper.unref(hasInitializedLocations) ? (require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, { key: 0 }, require__plugin_vue_export_helper.renderList(require__plugin_vue_export_helper.unref(documentsWithConverations), (doc) => {
|
|
23414
23448
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(FloatingComments_default, {
|
|
23415
23449
|
parent: layers.value,
|
|
23416
23450
|
"current-document": doc
|
|
@@ -23431,7 +23465,7 @@ var SuperDoc_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ require
|
|
|
23431
23465
|
});
|
|
23432
23466
|
//#endregion
|
|
23433
23467
|
//#region src/SuperDoc.vue
|
|
23434
|
-
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-
|
|
23468
|
+
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-9bae9abb"]]);
|
|
23435
23469
|
//#endregion
|
|
23436
23470
|
//#region src/core/create-app.ts
|
|
23437
23471
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -44697,7 +44731,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
44697
44731
|
}
|
|
44698
44732
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
44699
44733
|
this.colorIndex = 0;
|
|
44700
|
-
this.version = "2.30.0-next.
|
|
44734
|
+
this.version = "2.30.0-next.19";
|
|
44701
44735
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
44702
44736
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
44703
44737
|
this.colors = this.config.colors ?? [];
|
|
@@ -45599,9 +45633,10 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45599
45633
|
const results = await Promise.allSettled(runtimes.map((runtime) => runtime.setUser?.(runtimeUserOf(next))));
|
|
45600
45634
|
const failure = results.find((result) => result.status === "rejected");
|
|
45601
45635
|
if (failure) {
|
|
45602
|
-
if (current) await Promise.allSettled(runtimes.filter((_, index) => results[index].status === "fulfilled").map((runtime) => runtime.setUser?.(runtimeUserOf(current))));
|
|
45636
|
+
if (current && !this.#destroyed) await Promise.allSettled(runtimes.filter((_, index) => results[index].status === "fulfilled").map((runtime) => runtime.setUser?.(runtimeUserOf(current))));
|
|
45603
45637
|
throw failure.reason;
|
|
45604
45638
|
}
|
|
45639
|
+
if (this.#destroyed) return;
|
|
45605
45640
|
const target = this.config.user ?? (this.config.user = {});
|
|
45606
45641
|
for (const key of Object.keys(target)) delete target[key];
|
|
45607
45642
|
Object.assign(target, next);
|
|
@@ -46773,7 +46808,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46773
46808
|
const result = await activeEditor.replaceFile(replacementSource);
|
|
46774
46809
|
const state = result && typeof result === "object" ? result.state : null;
|
|
46775
46810
|
const confirmed = state === null || state === "review-ready" || state === "editing-ready";
|
|
46776
|
-
if (confirmed) {
|
|
46811
|
+
if (confirmed && !this.#destroyed) {
|
|
46777
46812
|
this.#replaceActiveDocumentData(activeEditor, replacementSource);
|
|
46778
46813
|
this.emit("document-replaced", {
|
|
46779
46814
|
editor: activeEditor,
|