superdoc 2.5.1 → 2.6.0-next.10
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/layout-engine/contracts/src/index.d.ts +5 -1
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +10 -0
- package/dist/layout-engine/layout-bridge/src/cache.d.ts +4 -1
- package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +6 -1
- package/dist/layout-engine/layout-engine/src/footnote-anchor-index.d.ts +1 -0
- package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +7 -0
- package/dist/layout-engine/painters/dom/src/paragraph/indentation.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/renderer.d.ts +6 -8
- package/dist/style.css +178 -136
- package/dist/style.layered.css +178 -136
- package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +2 -2
- package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +1 -1
- package/dist/superdoc/src/core/SuperDoc.d.ts +1 -0
- package/dist/superdoc/src/core/types/index.d.ts +46 -13
- package/dist/superdoc/src/stores/comments-store.d.ts +62 -5
- package/dist/superdoc/src/stores/superdoc-store.d.ts +186 -15
- package/dist/superdoc.cjs +261 -60
- package/dist/superdoc.es.js +261 -60
- 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 +12 -11
|
@@ -21,7 +21,7 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
21
21
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
|
|
22
22
|
commentDialogElement: HTMLDivElement;
|
|
23
23
|
commentInput: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {
|
|
24
|
-
focus: () => void;
|
|
24
|
+
focus: (options: any) => void;
|
|
25
25
|
$emit: (event: "focus", ...args: any[]) => void;
|
|
26
26
|
config: Record<string, any>;
|
|
27
27
|
users: unknown[];
|
|
@@ -45,7 +45,7 @@ declare const _default: import('vue').DefineComponent<{}, {
|
|
|
45
45
|
M: {};
|
|
46
46
|
Defaults: {};
|
|
47
47
|
}, Readonly<{}> & Readonly<{}>, {
|
|
48
|
-
focus: () => void;
|
|
48
|
+
focus: (options: any) => void;
|
|
49
49
|
$emit: (event: "focus", ...args: any[]) => void;
|
|
50
50
|
config: Record<string, any>;
|
|
51
51
|
users: unknown[];
|
|
@@ -542,6 +542,7 @@ export declare class SuperDoc extends EventEmitter<SuperDocEventMap> {
|
|
|
542
542
|
* Story-aware navigation is currently supported for bookmark and tracked
|
|
543
543
|
* change targets. Block and comment targets are body-only.
|
|
544
544
|
*
|
|
545
|
+
* @deprecated Use the target-specific navigation APIs on `superdoc.ui`. This method will be removed in v3.
|
|
545
546
|
* @returns Whether the target was found and navigated to.
|
|
546
547
|
*/
|
|
547
548
|
navigateTo(target: NavigableAddress): Promise<boolean>;
|
|
@@ -3730,30 +3730,63 @@ export interface ProofingError {
|
|
|
3730
3730
|
cause?: unknown;
|
|
3731
3731
|
}
|
|
3732
3732
|
export interface ProofingConfig {
|
|
3733
|
-
/**
|
|
3733
|
+
/**
|
|
3734
|
+
* Enables proofing. A provider is also required before SuperDoc runs checks.
|
|
3735
|
+
* @defaultValue false
|
|
3736
|
+
*/
|
|
3734
3737
|
enabled?: boolean;
|
|
3735
|
-
/**
|
|
3738
|
+
/**
|
|
3739
|
+
* Checks the text segments SuperDoc supplies and returns spelling, grammar,
|
|
3740
|
+
* or style issues.
|
|
3741
|
+
* @defaultValue null
|
|
3742
|
+
*/
|
|
3736
3743
|
provider?: ProofingProvider | null;
|
|
3737
|
-
/**
|
|
3744
|
+
/**
|
|
3745
|
+
* Fallback language passed to the provider when a text segment has no
|
|
3746
|
+
* resolved language.
|
|
3747
|
+
* @defaultValue null
|
|
3748
|
+
*/
|
|
3738
3749
|
defaultLanguage?: string | null;
|
|
3739
|
-
/**
|
|
3750
|
+
/**
|
|
3751
|
+
* Delay in milliseconds between an edit and the next proofing check. Values
|
|
3752
|
+
* at or below 0 run without a delay.
|
|
3753
|
+
* @defaultValue 500
|
|
3754
|
+
*/
|
|
3740
3755
|
debounceMs?: number;
|
|
3741
|
-
/**
|
|
3756
|
+
/** Suggestion limit passed to the provider. The provider decides how to apply it. */
|
|
3742
3757
|
maxSuggestions?: number;
|
|
3743
|
-
/** Prioritize checking visible pages first
|
|
3758
|
+
/** Prioritize checking visible pages first. */
|
|
3744
3759
|
visibleFirst?: boolean;
|
|
3745
|
-
/**
|
|
3760
|
+
/**
|
|
3761
|
+
* Shows Ignore in the proofing context menu. Ignored words remain suppressed
|
|
3762
|
+
* for this editor session.
|
|
3763
|
+
* @defaultValue true
|
|
3764
|
+
*/
|
|
3746
3765
|
allowIgnoreWord?: boolean;
|
|
3747
|
-
/**
|
|
3766
|
+
/**
|
|
3767
|
+
* Words whose proofing issues SuperDoc suppresses. Matching is
|
|
3768
|
+
* case-insensitive after Unicode normalization.
|
|
3769
|
+
* @defaultValue []
|
|
3770
|
+
*/
|
|
3748
3771
|
ignoredWords?: string[];
|
|
3749
|
-
/**
|
|
3772
|
+
/**
|
|
3773
|
+
* Maximum provider call time in milliseconds. Non-positive or non-finite
|
|
3774
|
+
* values use the default.
|
|
3775
|
+
* @defaultValue 10000
|
|
3776
|
+
*/
|
|
3750
3777
|
timeoutMs?: number;
|
|
3751
|
-
/**
|
|
3778
|
+
/** Maximum concurrent provider requests. */
|
|
3752
3779
|
maxConcurrentRequests?: number;
|
|
3753
|
-
/**
|
|
3780
|
+
/** Maximum segments per provider call. */
|
|
3754
3781
|
maxSegmentsPerBatch?: number;
|
|
3755
|
-
/**
|
|
3782
|
+
/**
|
|
3783
|
+
* Runs when a provider check fails or times out.
|
|
3784
|
+
* @param error - The failure kind, message, affected segment IDs, and cause.
|
|
3785
|
+
*/
|
|
3756
3786
|
onProofingError?: (error: ProofingError) => void;
|
|
3757
|
-
/**
|
|
3787
|
+
/**
|
|
3788
|
+
* Runs when the proofing lifecycle status changes.
|
|
3789
|
+
* @param status - The current proofing status.
|
|
3790
|
+
*/
|
|
3758
3791
|
onStatusChange?: (status: ProofingStatus) => void;
|
|
3759
3792
|
}
|
|
@@ -23,6 +23,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
23
23
|
suppressInternalExternal: import('vue').Ref<boolean, boolean>;
|
|
24
24
|
pendingComment: import('vue').Ref<null, null>;
|
|
25
25
|
currentCommentText: import('vue').Ref<string, string>;
|
|
26
|
+
currentCommentMentions: import('vue').Ref<never[], never[]>;
|
|
26
27
|
commentsList: import('vue').Ref<never[], never[]>;
|
|
27
28
|
reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
|
|
28
29
|
isCommentsListVisible: import('vue').Ref<boolean, boolean>;
|
|
@@ -210,8 +211,26 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
210
211
|
preparedInputs?: null | undefined;
|
|
211
212
|
pruneStale?: boolean | undefined;
|
|
212
213
|
}) => any;
|
|
214
|
+
announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
|
|
215
|
+
ok: boolean;
|
|
216
|
+
reason: string;
|
|
217
|
+
detail?: undefined;
|
|
218
|
+
comment?: undefined;
|
|
219
|
+
} | {
|
|
220
|
+
ok: boolean;
|
|
221
|
+
reason: string;
|
|
222
|
+
detail: any;
|
|
223
|
+
comment?: undefined;
|
|
224
|
+
} | {
|
|
225
|
+
ok: boolean;
|
|
226
|
+
comment: any;
|
|
227
|
+
reason?: undefined;
|
|
228
|
+
detail?: undefined;
|
|
229
|
+
}>;
|
|
213
230
|
isV2EditorActive: (superdoc: any) => boolean;
|
|
214
|
-
replyCommentV2: ({ superdoc, parentCommentId, text }?: {
|
|
231
|
+
replyCommentV2: ({ superdoc, parentCommentId, text, mentions }?: {
|
|
232
|
+
mentions?: never[] | undefined;
|
|
233
|
+
}) => Promise<any>;
|
|
215
234
|
editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
|
|
216
235
|
resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
217
236
|
reopenCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
@@ -258,7 +277,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
258
277
|
liveAnchorKeys?: null | undefined;
|
|
259
278
|
}) => any;
|
|
260
279
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
261
|
-
}, "suppressInternalExternal" | "activeComment" | "activeFloatingCommentInstanceId" | "floatingCommentsOffset" | "pendingComment" | "currentCommentText" | "isDebugging" | "editingCommentId" | "editorCommentPositions" | "isCommentHighlighted" | "v2CommentsAdapter" | "COMMENT_EVENTS" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "hasInitializedLocations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2TrackedChangesAdapter">, Pick<{
|
|
280
|
+
}, "suppressInternalExternal" | "activeComment" | "activeFloatingCommentInstanceId" | "floatingCommentsOffset" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "isDebugging" | "editingCommentId" | "editorCommentPositions" | "isCommentHighlighted" | "v2CommentsAdapter" | "COMMENT_EVENTS" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "hasInitializedLocations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2TrackedChangesAdapter">, Pick<{
|
|
262
281
|
COMMENT_EVENTS: {
|
|
263
282
|
readonly RESOLVED: "resolved";
|
|
264
283
|
readonly NEW: "new";
|
|
@@ -283,6 +302,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
283
302
|
suppressInternalExternal: import('vue').Ref<boolean, boolean>;
|
|
284
303
|
pendingComment: import('vue').Ref<null, null>;
|
|
285
304
|
currentCommentText: import('vue').Ref<string, string>;
|
|
305
|
+
currentCommentMentions: import('vue').Ref<never[], never[]>;
|
|
286
306
|
commentsList: import('vue').Ref<never[], never[]>;
|
|
287
307
|
reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
|
|
288
308
|
isCommentsListVisible: import('vue').Ref<boolean, boolean>;
|
|
@@ -470,8 +490,26 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
470
490
|
preparedInputs?: null | undefined;
|
|
471
491
|
pruneStale?: boolean | undefined;
|
|
472
492
|
}) => any;
|
|
493
|
+
announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
|
|
494
|
+
ok: boolean;
|
|
495
|
+
reason: string;
|
|
496
|
+
detail?: undefined;
|
|
497
|
+
comment?: undefined;
|
|
498
|
+
} | {
|
|
499
|
+
ok: boolean;
|
|
500
|
+
reason: string;
|
|
501
|
+
detail: any;
|
|
502
|
+
comment?: undefined;
|
|
503
|
+
} | {
|
|
504
|
+
ok: boolean;
|
|
505
|
+
comment: any;
|
|
506
|
+
reason?: undefined;
|
|
507
|
+
detail?: undefined;
|
|
508
|
+
}>;
|
|
473
509
|
isV2EditorActive: (superdoc: any) => boolean;
|
|
474
|
-
replyCommentV2: ({ superdoc, parentCommentId, text }?: {
|
|
510
|
+
replyCommentV2: ({ superdoc, parentCommentId, text, mentions }?: {
|
|
511
|
+
mentions?: never[] | undefined;
|
|
512
|
+
}) => Promise<any>;
|
|
475
513
|
editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
|
|
476
514
|
resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
477
515
|
reopenCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
@@ -543,6 +581,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
543
581
|
suppressInternalExternal: import('vue').Ref<boolean, boolean>;
|
|
544
582
|
pendingComment: import('vue').Ref<null, null>;
|
|
545
583
|
currentCommentText: import('vue').Ref<string, string>;
|
|
584
|
+
currentCommentMentions: import('vue').Ref<never[], never[]>;
|
|
546
585
|
commentsList: import('vue').Ref<never[], never[]>;
|
|
547
586
|
reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
|
|
548
587
|
isCommentsListVisible: import('vue').Ref<boolean, boolean>;
|
|
@@ -730,8 +769,26 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
730
769
|
preparedInputs?: null | undefined;
|
|
731
770
|
pruneStale?: boolean | undefined;
|
|
732
771
|
}) => any;
|
|
772
|
+
announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
|
|
773
|
+
ok: boolean;
|
|
774
|
+
reason: string;
|
|
775
|
+
detail?: undefined;
|
|
776
|
+
comment?: undefined;
|
|
777
|
+
} | {
|
|
778
|
+
ok: boolean;
|
|
779
|
+
reason: string;
|
|
780
|
+
detail: any;
|
|
781
|
+
comment?: undefined;
|
|
782
|
+
} | {
|
|
783
|
+
ok: boolean;
|
|
784
|
+
comment: any;
|
|
785
|
+
reason?: undefined;
|
|
786
|
+
detail?: undefined;
|
|
787
|
+
}>;
|
|
733
788
|
isV2EditorActive: (superdoc: any) => boolean;
|
|
734
|
-
replyCommentV2: ({ superdoc, parentCommentId, text }?: {
|
|
789
|
+
replyCommentV2: ({ superdoc, parentCommentId, text, mentions }?: {
|
|
790
|
+
mentions?: never[] | undefined;
|
|
791
|
+
}) => Promise<any>;
|
|
735
792
|
editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
|
|
736
793
|
resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
737
794
|
reopenCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
|
|
@@ -778,4 +835,4 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
778
835
|
liveAnchorKeys?: null | undefined;
|
|
779
836
|
}) => any;
|
|
780
837
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
781
|
-
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "cancelImportedTrackedChangeBootstrap" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "refreshTrackedChangeCommentsByIds" | "syncResolvedCommentsWithDocument" | "syncTrackedChangePositionsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "syncTrackedChangeComments" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|
|
838
|
+
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "cancelImportedTrackedChangeBootstrap" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "refreshTrackedChangeCommentsByIds" | "syncResolvedCommentsWithDocument" | "syncTrackedChangePositionsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "syncTrackedChangeComments" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|