superdoc 2.28.0-next.13 → 2.28.0-next.15
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-B6Va_J_0.es.js → create-super-doc-ui-BRahDsch.es.js} +70 -0
- package/dist/chunks/{create-super-doc-ui-8dttPeGi.cjs → create-super-doc-ui-CFlvn2wr.cjs} +70 -0
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/types/clipboard.d.ts +5 -1
- package/dist/layout-engine/contracts/src/index.d.ts +2 -1
- package/dist/layout-engine/contracts/src/run-helpers.d.ts +1 -0
- package/dist/layout-engine/layout-bridge/src/marker-run-key.d.ts +2 -0
- package/dist/layout-engine/layout-engine/src/paginator.d.ts +1 -0
- package/dist/layout-engine/style-engine/src/ooxml/index.d.ts +1 -1
- 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/public/ui/types.d.ts +19 -1
- package/dist/superdoc/src/public/ui.d.cts +4 -0
- package/dist/superdoc/src/public/ui.d.ts +1 -1
- package/dist/superdoc/src/stores/comments-store.d.ts +4 -7
- package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -21
- package/dist/superdoc.cjs +7 -284
- package/dist/superdoc.es.js +7 -284
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
|
@@ -154,12 +154,11 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
154
154
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
155
155
|
}) => void;
|
|
156
156
|
clearEditorCommentPositions: () => void;
|
|
157
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
157
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
158
158
|
superdoc: Object;
|
|
159
159
|
params: Object;
|
|
160
160
|
}) => void;
|
|
161
161
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
162
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
163
162
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
164
163
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
165
164
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -404,12 +403,11 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
404
403
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
405
404
|
}) => void;
|
|
406
405
|
clearEditorCommentPositions: () => void;
|
|
407
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
406
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
408
407
|
superdoc: Object;
|
|
409
408
|
params: Object;
|
|
410
409
|
}) => void;
|
|
411
410
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
412
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
413
411
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
414
412
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
415
413
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -654,12 +652,11 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
654
652
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
655
653
|
}) => void;
|
|
656
654
|
clearEditorCommentPositions: () => void;
|
|
657
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
655
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
658
656
|
superdoc: Object;
|
|
659
657
|
params: Object;
|
|
660
658
|
}) => void;
|
|
661
659
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
662
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
663
660
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
664
661
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
665
662
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -748,4 +745,4 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
|
|
|
748
745
|
liveAnchorKeys?: null | undefined;
|
|
749
746
|
}) => any;
|
|
750
747
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
751
|
-
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "
|
|
748
|
+
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "dropCommentsFromMutationImpact" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|
|
@@ -183,12 +183,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
183
183
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
184
184
|
}) => void;
|
|
185
185
|
clearEditorCommentPositions: () => void;
|
|
186
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
186
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
187
187
|
superdoc: Object;
|
|
188
188
|
params: Object;
|
|
189
189
|
}) => void;
|
|
190
190
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
191
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
192
191
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
193
192
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
194
193
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -433,12 +432,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
433
432
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
434
433
|
}) => void;
|
|
435
434
|
clearEditorCommentPositions: () => void;
|
|
436
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
435
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
437
436
|
superdoc: Object;
|
|
438
437
|
params: Object;
|
|
439
438
|
}) => void;
|
|
440
439
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
441
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
442
440
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
443
441
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
444
442
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -683,12 +681,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
683
681
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
684
682
|
}) => void;
|
|
685
683
|
clearEditorCommentPositions: () => void;
|
|
686
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
684
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
687
685
|
superdoc: Object;
|
|
688
686
|
params: Object;
|
|
689
687
|
}) => void;
|
|
690
688
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
691
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
692
689
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
693
690
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
694
691
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -777,7 +774,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
777
774
|
liveAnchorKeys?: null | undefined;
|
|
778
775
|
}) => any;
|
|
779
776
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
780
|
-
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "
|
|
777
|
+
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "dropCommentsFromMutationImpact" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|
|
781
778
|
documents: Ref<StoreDocument[], StoreDocument[]>;
|
|
782
779
|
documentBounds: Ref<unknown[], unknown[]>;
|
|
783
780
|
pages: Record<string, PageEntry[]>;
|
|
@@ -964,12 +961,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
964
961
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
965
962
|
}) => void;
|
|
966
963
|
clearEditorCommentPositions: () => void;
|
|
967
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
964
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
968
965
|
superdoc: Object;
|
|
969
966
|
params: Object;
|
|
970
967
|
}) => void;
|
|
971
968
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
972
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
973
969
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
974
970
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
975
971
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -1214,12 +1210,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
1214
1210
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
1215
1211
|
}) => void;
|
|
1216
1212
|
clearEditorCommentPositions: () => void;
|
|
1217
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
1213
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
1218
1214
|
superdoc: Object;
|
|
1219
1215
|
params: Object;
|
|
1220
1216
|
}) => void;
|
|
1221
1217
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
1222
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
1223
1218
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
1224
1219
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
1225
1220
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -1464,12 +1459,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
1464
1459
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
1465
1460
|
}) => void;
|
|
1466
1461
|
clearEditorCommentPositions: () => void;
|
|
1467
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
1462
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
1468
1463
|
superdoc: Object;
|
|
1469
1464
|
params: Object;
|
|
1470
1465
|
}) => void;
|
|
1471
1466
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
1472
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
1473
1467
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
1474
1468
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
1475
1469
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -1558,7 +1552,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
1558
1552
|
liveAnchorKeys?: null | undefined;
|
|
1559
1553
|
}) => any;
|
|
1560
1554
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
1561
|
-
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "
|
|
1555
|
+
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "dropCommentsFromMutationImpact" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|
|
1562
1556
|
documents: Ref<StoreDocument[], StoreDocument[]>;
|
|
1563
1557
|
documentBounds: Ref<unknown[], unknown[]>;
|
|
1564
1558
|
pages: Record<string, PageEntry[]>;
|
|
@@ -1745,12 +1739,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
1745
1739
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
1746
1740
|
}) => void;
|
|
1747
1741
|
clearEditorCommentPositions: () => void;
|
|
1748
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
1742
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
1749
1743
|
superdoc: Object;
|
|
1750
1744
|
params: Object;
|
|
1751
1745
|
}) => void;
|
|
1752
1746
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
1753
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
1754
1747
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
1755
1748
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
1756
1749
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -1995,12 +1988,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
1995
1988
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
1996
1989
|
}) => void;
|
|
1997
1990
|
clearEditorCommentPositions: () => void;
|
|
1998
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
1991
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
1999
1992
|
superdoc: Object;
|
|
2000
1993
|
params: Object;
|
|
2001
1994
|
}) => void;
|
|
2002
1995
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
2003
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
2004
1996
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
2005
1997
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
2006
1998
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -2245,12 +2237,11 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
2245
2237
|
retainedTrackedChangeIds?: Iterable<string>;
|
|
2246
2238
|
}) => void;
|
|
2247
2239
|
clearEditorCommentPositions: () => void;
|
|
2248
|
-
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges,
|
|
2240
|
+
handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
|
|
2249
2241
|
superdoc: Object;
|
|
2250
2242
|
params: Object;
|
|
2251
2243
|
}) => void;
|
|
2252
2244
|
syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
|
|
2253
|
-
syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
|
|
2254
2245
|
setActiveFloatingCommentInstance: (instanceId?: null) => void;
|
|
2255
2246
|
requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
|
|
2256
2247
|
peekInstantSidebarAlignment: () => null;
|
|
@@ -2339,7 +2330,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
|
|
|
2339
2330
|
liveAnchorKeys?: null | undefined;
|
|
2340
2331
|
}) => any;
|
|
2341
2332
|
remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
|
|
2342
|
-
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "
|
|
2333
|
+
}, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "syncResolvedCommentsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "dropCommentsFromMutationImpact" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
|
|
2343
2334
|
documents: Ref<StoreDocument[], StoreDocument[]>;
|
|
2344
2335
|
documentBounds: Ref<unknown[], unknown[]>;
|
|
2345
2336
|
pages: Record<string, PageEntry[]>;
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-CFlvn2wr.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-BUdjGKyl.cjs");
|
|
@@ -260,7 +260,7 @@ var v_click_outside_default = {
|
|
|
260
260
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
261
261
|
function getSuperdocVersion() {
|
|
262
262
|
try {
|
|
263
|
-
return "2.28.0-next.
|
|
263
|
+
return "2.28.0-next.15";
|
|
264
264
|
} catch {
|
|
265
265
|
return "unknown";
|
|
266
266
|
}
|
|
@@ -7403,11 +7403,6 @@ var buildTrackedChangeDecisionLinkIndex = (allComments, previous = /* @__PURE__
|
|
|
7403
7403
|
};
|
|
7404
7404
|
//#endregion
|
|
7405
7405
|
//#region src/stores/comments-store.js
|
|
7406
|
-
var trackChangesHelpers = {
|
|
7407
|
-
getTrackChanges: () => [],
|
|
7408
|
-
enumerateStructuralRowChanges: () => []
|
|
7409
|
-
};
|
|
7410
|
-
var getTrackedChangeIndex = () => null;
|
|
7411
7406
|
var makeTrackedChangeAnchorKey = ({ storyKey, rawId }) => `tc::${storyKey}::${rawId}`;
|
|
7412
7407
|
var COMMENT_DRAFT_BR_TAG = /<br(?:\s[^>]*)?\s*\/?>/gi;
|
|
7413
7408
|
var COMMENT_DRAFT_BLOCK_BOUNDARY = /(?:<\/(?:p|div|li|blockquote|pre|h[1-6])\s*>\s*)+(?:<(?:p|div|li|blockquote|pre|h[1-6])(?:\s[^>]*)?\s*\/?>)+/gi;
|
|
@@ -7967,72 +7962,6 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
7967
7962
|
return source === DOCUMENT_EDITOR_SELECTION_SOURCE;
|
|
7968
7963
|
};
|
|
7969
7964
|
const isTrackedChangeThread = (comment) => Boolean(comment?.trackedChange) || Boolean(trackedChangeThreadParentIdForComment$1(comment));
|
|
7970
|
-
const syncTrackedChangePositionsWithDocument = ({ documentId, editor } = {}) => {
|
|
7971
|
-
if (!editor?.state) return 0;
|
|
7972
|
-
if (!commentsList.value?.length) return 0;
|
|
7973
|
-
const currentPositions = editorCommentPositions.value || {};
|
|
7974
|
-
if (!Object.keys(currentPositions).length) return 0;
|
|
7975
|
-
const resolveExistingPositionKey = (aliasIds) => aliasIds.find((key) => currentPositions[key] !== void 0) ?? null;
|
|
7976
|
-
const candidateRootPositionKeys = /* @__PURE__ */ new Set();
|
|
7977
|
-
const rootAliasesByPositionKey = /* @__PURE__ */ new Map();
|
|
7978
|
-
commentsList.value.forEach((comment) => {
|
|
7979
|
-
if (!comment?.trackedChange) return;
|
|
7980
|
-
if (documentId) {
|
|
7981
|
-
const resolvedDocumentId = comment?.fileId ?? null;
|
|
7982
|
-
if (resolvedDocumentId && resolvedDocumentId !== documentId) return;
|
|
7983
|
-
}
|
|
7984
|
-
const aliasIds = getCommentAliasIds(comment);
|
|
7985
|
-
const normalizedPositionKey = resolveExistingPositionKey(aliasIds);
|
|
7986
|
-
if (!normalizedPositionKey) return;
|
|
7987
|
-
candidateRootPositionKeys.add(normalizedPositionKey);
|
|
7988
|
-
rootAliasesByPositionKey.set(normalizedPositionKey, new Set(aliasIds));
|
|
7989
|
-
});
|
|
7990
|
-
if (!candidateRootPositionKeys.size) return 0;
|
|
7991
|
-
const trackedIds = new Set(trackChangesHelpers.getTrackChanges(editor.state).map(({ mark }) => mark?.attrs?.id).filter((id) => id !== void 0 && id !== null).map((id) => String(id)));
|
|
7992
|
-
const trackedChangeIndex = typeof getTrackedChangeIndex === "function" ? getTrackedChangeIndex(editor) : null;
|
|
7993
|
-
let liveAnchorKeySource = [];
|
|
7994
|
-
try {
|
|
7995
|
-
liveAnchorKeySource = trackedChangeIndex?.getAll?.() ?? [];
|
|
7996
|
-
} catch {}
|
|
7997
|
-
const liveAnchorKeys = new Set(liveAnchorKeySource.map((snapshot) => snapshot?.anchorKey).filter((anchorKey) => typeof anchorKey === "string" && anchorKey.length > 0));
|
|
7998
|
-
const staleRootPositionKeys = new Set(Array.from(candidateRootPositionKeys).filter((positionKey) => {
|
|
7999
|
-
const aliases = rootAliasesByPositionKey.get(positionKey) ?? /* @__PURE__ */ new Set([positionKey]);
|
|
8000
|
-
if (Array.from(aliases).some((alias) => liveAnchorKeys.has(alias))) return false;
|
|
8001
|
-
return !Array.from(aliases).some((alias) => trackedIds.has(alias));
|
|
8002
|
-
}));
|
|
8003
|
-
if (!staleRootPositionKeys.size) return 0;
|
|
8004
|
-
const staleRootAliasIds = /* @__PURE__ */ new Set();
|
|
8005
|
-
staleRootPositionKeys.forEach((positionKey) => {
|
|
8006
|
-
(rootAliasesByPositionKey.get(positionKey) ?? /* @__PURE__ */ new Set([positionKey])).forEach((alias) => staleRootAliasIds.add(alias));
|
|
8007
|
-
});
|
|
8008
|
-
const stalePositionKeys = new Set(staleRootPositionKeys);
|
|
8009
|
-
commentsList.value.forEach((comment) => {
|
|
8010
|
-
const aliasIds = getCommentAliasIds(comment);
|
|
8011
|
-
const normalizedPositionKey = resolveExistingPositionKey(aliasIds);
|
|
8012
|
-
if (!normalizedPositionKey) return;
|
|
8013
|
-
if ([
|
|
8014
|
-
trackedChangeThreadParentIdForComment$1(comment),
|
|
8015
|
-
comment?.threadingParentCommentId,
|
|
8016
|
-
comment?.parentCommentId
|
|
8017
|
-
].map((id) => normalizeCommentId(id)).filter(Boolean).some((id) => staleRootAliasIds.has(id))) stalePositionKeys.add(normalizedPositionKey);
|
|
8018
|
-
});
|
|
8019
|
-
const nextPositions = { ...currentPositions };
|
|
8020
|
-
stalePositionKeys.forEach((key) => {
|
|
8021
|
-
delete nextPositions[key];
|
|
8022
|
-
});
|
|
8023
|
-
editorCommentPositions.value = nextPositions;
|
|
8024
|
-
if (activeComment.value !== void 0 && activeComment.value !== null) {
|
|
8025
|
-
const activeCommentModel = getComment(activeComment.value);
|
|
8026
|
-
const activeAliases = new Set(getCommentAliasIds(activeCommentModel ?? activeComment.value));
|
|
8027
|
-
const activeParentKeys = [
|
|
8028
|
-
trackedChangeThreadParentIdForComment$1(activeCommentModel),
|
|
8029
|
-
activeCommentModel?.threadingParentCommentId,
|
|
8030
|
-
activeCommentModel?.parentCommentId
|
|
8031
|
-
].map((id) => normalizeCommentId(id)).filter(Boolean);
|
|
8032
|
-
if (Array.from(activeAliases).some((id) => staleRootAliasIds.has(id)) || activeParentKeys.some((id) => staleRootAliasIds.has(id))) clearActiveCommentSelection();
|
|
8033
|
-
}
|
|
8034
|
-
return stalePositionKeys.size;
|
|
8035
|
-
};
|
|
8036
7965
|
const collectStandardCommentDocumentState = (editor) => {
|
|
8037
7966
|
const doc = editor?.state?.doc;
|
|
8038
7967
|
if (!doc || typeof doc.descendants !== "function") return null;
|
|
@@ -8214,7 +8143,7 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8214
8143
|
* @param {Object} param0.params The tracked change params
|
|
8215
8144
|
* @returns {void}
|
|
8216
8145
|
*/
|
|
8217
|
-
const handleTrackedChangeUpdate = ({ superdoc, params, broadcastChanges = true,
|
|
8146
|
+
const handleTrackedChangeUpdate = ({ superdoc, params, broadcastChanges = true, trackedChangeIdentityIndex = null }) => {
|
|
8218
8147
|
const span = startInteractionSpan("store.trackedChanges.handleUpdate", "store-reconciliation", {
|
|
8219
8148
|
event: params?.event ?? null,
|
|
8220
8149
|
changeId: params?.changeId ?? null,
|
|
@@ -8231,26 +8160,6 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
8231
8160
|
const normalizedCustomAttributes = hasCustomAttributes ? normalizeTrackedChangeCustomAttributes(customAttributes) : void 0;
|
|
8232
8161
|
const normalizedImportedId = hasImportedId ? importedId != null ? String(importedId) : null : void 0;
|
|
8233
8162
|
const normalizedDocumentId = documentId != null ? String(documentId) : null;
|
|
8234
|
-
if (!(trackedChangeDisplayType === "tableInsert" || trackedChangeDisplayType === "tableDelete") && normalizedChangeId) {
|
|
8235
|
-
const effectiveDocumentId = normalizedDocumentId ?? (superdoc?.activeEditor?.options?.documentId != null ? String(superdoc.activeEditor.options.documentId) : null);
|
|
8236
|
-
const docEditor = effectiveDocumentId ? superdocStore.getDocument(effectiveDocumentId)?.getEditor?.() : null;
|
|
8237
|
-
const docState = documentState !== void 0 ? documentState : docEditor?.state ?? superdoc?.activeEditor?.state ?? null;
|
|
8238
|
-
if (docState) {
|
|
8239
|
-
const { ranges: tableRanges, ids: structuralIds } = computeTrackedTableSummaryForState(docState);
|
|
8240
|
-
const ranges = trackChangesHelpers.getTrackChanges(docState, normalizedChangeId);
|
|
8241
|
-
const inRange = tableRanges.length > 0 && ranges.length > 0 && isInlineRangeInsideTrackedTable(ranges, tableRanges);
|
|
8242
|
-
const isStructuralRowIdEcho = ranges.length === 0 && structuralIds.has(normalizedChangeId);
|
|
8243
|
-
if (inRange || isStructuralRowIdEcho) {
|
|
8244
|
-
pruneSuppressedInlineTableComments({
|
|
8245
|
-
suppressedIds: /* @__PURE__ */ new Set([normalizedChangeId]),
|
|
8246
|
-
activeDocumentId: effectiveDocumentId,
|
|
8247
|
-
superdoc,
|
|
8248
|
-
broadcastChanges
|
|
8249
|
-
});
|
|
8250
|
-
return;
|
|
8251
|
-
}
|
|
8252
|
-
}
|
|
8253
|
-
}
|
|
8254
8163
|
const hasStoryMetadata = trackedChangeStory !== void 0 || trackedChangeStoryKind !== void 0 || trackedChangeStoryLabel !== void 0 || trackedChangeAnchorKey !== void 0;
|
|
8255
8164
|
const normalizedTrackedChangeStory = hasStoryMetadata ? trackedChangeStory ?? null : BODY_TRACKED_CHANGE_STORY;
|
|
8256
8165
|
const normalizedTrackedChangeStoryKind = hasStoryMetadata ? trackedChangeStoryKind ?? null : "body";
|
|
@@ -10086,53 +9995,6 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
10086
9995
|
const activeCommentId = activeComment.value != null ? String(activeComment.value) : null;
|
|
10087
9996
|
if (activeCommentId && removedAliasIds.has(activeCommentId)) clearActiveCommentSelection();
|
|
10088
9997
|
}
|
|
10089
|
-
/**
|
|
10090
|
-
* Remove inline tracked-change comments whose change id is subsumed by a
|
|
10091
|
-
* tracked whole-table change. Mirrors the deletion-event emission of
|
|
10092
|
-
* `pruneStaleTrackedChangeComments` but is keyed on an explicit suppressed-id
|
|
10093
|
-
* set rather than mark liveness (the mark is still live; only the review item
|
|
10094
|
-
* is unwanted). Also clears the active-comment selection if it pointed at a
|
|
10095
|
-
* now-suppressed change, so no stale active-on-click dialog can reference it.
|
|
10096
|
-
*
|
|
10097
|
-
* @param {{ suppressedIds: Set<string>, activeDocumentId: string, superdoc: any, broadcastChanges?: boolean }} input
|
|
10098
|
-
*/
|
|
10099
|
-
const pruneSuppressedInlineTableComments = ({ suppressedIds, activeDocumentId, superdoc = null, broadcastChanges = true }) => {
|
|
10100
|
-
if (!(suppressedIds instanceof Set) || !suppressedIds.size || !activeDocumentId) return;
|
|
10101
|
-
const removedComments = [];
|
|
10102
|
-
commentsList.value = commentsList.value.filter((comment) => {
|
|
10103
|
-
if (!comment?.trackedChange) return true;
|
|
10104
|
-
if (!isBodyTrackedChangeComment(comment)) return true;
|
|
10105
|
-
if (isStructuralTableBubble(comment)) return true;
|
|
10106
|
-
if (!belongsToTrackedChangeSyncDocument(comment, activeDocumentId)) return true;
|
|
10107
|
-
const commentId = comment.commentId != null ? String(comment.commentId) : null;
|
|
10108
|
-
const importedId = comment.importedId != null ? String(comment.importedId) : null;
|
|
10109
|
-
if (!(commentId && suppressedIds.has(commentId) || importedId && suppressedIds.has(importedId))) return true;
|
|
10110
|
-
removedComments.push(comment);
|
|
10111
|
-
return false;
|
|
10112
|
-
});
|
|
10113
|
-
if (!removedComments.length) return;
|
|
10114
|
-
const removedIds = /* @__PURE__ */ new Set();
|
|
10115
|
-
removedComments.forEach((comment) => {
|
|
10116
|
-
if (comment.commentId != null) removedIds.add(String(comment.commentId));
|
|
10117
|
-
if (comment.importedId != null) removedIds.add(String(comment.importedId));
|
|
10118
|
-
const payload = getCommentEventPayload(comment);
|
|
10119
|
-
const event = {
|
|
10120
|
-
type: COMMENT_EVENTS.DELETED,
|
|
10121
|
-
comment: payload,
|
|
10122
|
-
changes: [{
|
|
10123
|
-
key: "deleted",
|
|
10124
|
-
commentId: payload.commentId,
|
|
10125
|
-
fileId: payload.fileId
|
|
10126
|
-
}]
|
|
10127
|
-
};
|
|
10128
|
-
if (broadcastChanges) {
|
|
10129
|
-
syncCommentsToClients(superdoc, event);
|
|
10130
|
-
superdoc?.emit?.("comments-update", event);
|
|
10131
|
-
}
|
|
10132
|
-
});
|
|
10133
|
-
const activeCommentId = activeComment.value != null ? String(activeComment.value) : null;
|
|
10134
|
-
if (activeCommentId && removedIds.has(activeCommentId)) clearActiveCommentSelection();
|
|
10135
|
-
};
|
|
10136
9998
|
const getCommentDocumentId = (comment) => {
|
|
10137
9999
|
if (!comment) return null;
|
|
10138
10000
|
if (comment.fileId != null) return String(comment.fileId);
|
|
@@ -11050,150 +10912,12 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
11050
10912
|
const clearEditorCommentPositions = () => {
|
|
11051
10913
|
editorCommentPositions.value = {};
|
|
11052
10914
|
};
|
|
11053
|
-
/**
|
|
11054
|
-
* Identify the single structural (whole-table) bubble for a tracked table so
|
|
11055
|
-
* it is NEVER suppressed by the table-subsume filter below. The structural
|
|
11056
|
-
* bubble is the parent "Added table" / "Deleted table" change; its public
|
|
11057
|
-
* id is `word:structural:<id>` (or a bare structural fallback) and its display
|
|
11058
|
-
* type is `tableInsert` / `tableDelete`.
|
|
11059
|
-
*
|
|
11060
|
-
* @param {Object} comment
|
|
11061
|
-
* @returns {boolean}
|
|
11062
|
-
*/
|
|
11063
|
-
const isStructuralTableBubble = (comment) => {
|
|
11064
|
-
if (!comment?.trackedChange) return false;
|
|
11065
|
-
const displayType = comment?.trackedChangeDisplayType;
|
|
11066
|
-
if (displayType === "tableInsert" || displayType === "tableDelete") return true;
|
|
11067
|
-
return [
|
|
11068
|
-
comment?.commentId,
|
|
11069
|
-
comment?.importedId,
|
|
11070
|
-
comment?.trackedChangeAnchorKey
|
|
11071
|
-
].map((id) => id != null ? String(id) : "").filter(Boolean).some((id) => id.includes("word:structural:"));
|
|
11072
|
-
};
|
|
11073
|
-
/**
|
|
11074
|
-
* Compute the decidable whole-table tracked-change ranges for a comment's
|
|
11075
|
-
* document, memoized per editor state so the filter does not re-enumerate the
|
|
11076
|
-
* document once per comment. Returns `[]` when the document has no tracked
|
|
11077
|
-
* whole-table change (the common case), so non-tracked tables and inline-only
|
|
11078
|
-
* tracked changes are never affected.
|
|
11079
|
-
*
|
|
11080
|
-
* @param {string | null | undefined} fileId
|
|
11081
|
-
* @returns {Array<{ from: number, to: number }>}
|
|
11082
|
-
*/
|
|
11083
|
-
const trackedTableSummaryCache = /* @__PURE__ */ new WeakMap();
|
|
11084
|
-
/**
|
|
11085
|
-
* Single source of truth for the decidable whole-table tracked changes in an
|
|
11086
|
-
* editor state, enumerated and memoized ONCE per state. Returns:
|
|
11087
|
-
* - `ranges`: each tracked whole-table's `{ from, to }` document span. Used to
|
|
11088
|
-
* test whether an inline tracked change falls inside a tracked table.
|
|
11089
|
-
* - `ids`: every change id associated with those tables (the change's public
|
|
11090
|
-
* id / revisionId / revisionGroupId / sourceId plus each row's trackChange
|
|
11091
|
-
* id / sourceId). Text typed inside a tracked-inserted row inherits that
|
|
11092
|
-
* row's revision id, so such an inline change reports a changeId that is one
|
|
11093
|
-
* of these — it must be subsumed by the structural bubble, not get its own
|
|
11094
|
-
* review item.
|
|
11095
|
-
*
|
|
11096
|
-
* @param {object | null | undefined} state
|
|
11097
|
-
* @returns {{ ranges: Array<{ from: number, to: number }>, ids: Set<string> }}
|
|
11098
|
-
*/
|
|
11099
|
-
const computeTrackedTableSummaryForState = (state) => {
|
|
11100
|
-
if (!state) return {
|
|
11101
|
-
ranges: [],
|
|
11102
|
-
ids: /* @__PURE__ */ new Set()
|
|
11103
|
-
};
|
|
11104
|
-
const cached = trackedTableSummaryCache.get(state);
|
|
11105
|
-
if (cached) return cached;
|
|
11106
|
-
const ranges = [];
|
|
11107
|
-
const ids = /* @__PURE__ */ new Set();
|
|
11108
|
-
const add = (value) => {
|
|
11109
|
-
if (value != null && value !== "") ids.add(String(value));
|
|
11110
|
-
};
|
|
11111
|
-
const enumerate = trackChangesHelpers?.enumerateStructuralRowChanges;
|
|
11112
|
-
if (typeof enumerate === "function") {
|
|
11113
|
-
let structuralChanges = [];
|
|
11114
|
-
try {
|
|
11115
|
-
structuralChanges = enumerate(state) ?? [];
|
|
11116
|
-
} catch {
|
|
11117
|
-
structuralChanges = [];
|
|
11118
|
-
}
|
|
11119
|
-
for (const change of structuralChanges) {
|
|
11120
|
-
if (!change?.decidable || !change?.wholeTable) continue;
|
|
11121
|
-
const from = Number(change.tableFrom);
|
|
11122
|
-
const to = Number(change.tableTo);
|
|
11123
|
-
if (Number.isFinite(from) && Number.isFinite(to)) ranges.push({
|
|
11124
|
-
from,
|
|
11125
|
-
to
|
|
11126
|
-
});
|
|
11127
|
-
add(change.id);
|
|
11128
|
-
add(change.revisionId);
|
|
11129
|
-
add(change.revisionGroupId);
|
|
11130
|
-
add(change.sourceId);
|
|
11131
|
-
for (const row of change.rows || []) {
|
|
11132
|
-
const tc = row?.node?.attrs?.trackChange;
|
|
11133
|
-
add(tc?.id);
|
|
11134
|
-
add(tc?.sourceId);
|
|
11135
|
-
}
|
|
11136
|
-
}
|
|
11137
|
-
}
|
|
11138
|
-
const summary = {
|
|
11139
|
-
ranges,
|
|
11140
|
-
ids
|
|
11141
|
-
};
|
|
11142
|
-
trackedTableSummaryCache.set(state, summary);
|
|
11143
|
-
return summary;
|
|
11144
|
-
};
|
|
11145
|
-
const getTrackedTableRangesForDocument = (fileId) => {
|
|
11146
|
-
const editor = superdocStore.getDocument(fileId)?.getEditor?.();
|
|
11147
|
-
return computeTrackedTableSummaryForState(editor?.state).ranges;
|
|
11148
|
-
};
|
|
11149
|
-
/**
|
|
11150
|
-
* True when every `{ from, to }` range of an inline tracked change is wholly
|
|
11151
|
-
* contained within some decidable whole-table tracked-change range. Such an
|
|
11152
|
-
* inline change is subsumed by the structural "Inserted/Deleted table" review
|
|
11153
|
-
* item and must NOT become an independent review item (no comment object →
|
|
11154
|
-
* no floating bubble and no active-on-click dialog). The underlying
|
|
11155
|
-
* trackInsert/trackDelete mark (the green highlight) is untouched — only the
|
|
11156
|
-
* review-item comment is suppressed.
|
|
11157
|
-
*
|
|
11158
|
-
* @param {Array<{ from?: number, to?: number }>} changeRanges
|
|
11159
|
-
* @param {Array<{ from: number, to: number }>} tableRanges
|
|
11160
|
-
* @returns {boolean}
|
|
11161
|
-
*/
|
|
11162
|
-
const isInlineRangeInsideTrackedTable = (changeRanges, tableRanges) => {
|
|
11163
|
-
if (!tableRanges?.length || !changeRanges?.length) return false;
|
|
11164
|
-
return changeRanges.every((seg) => {
|
|
11165
|
-
const start = Number(seg?.from);
|
|
11166
|
-
const end = Number(seg?.to);
|
|
11167
|
-
if (!Number.isFinite(start) || !Number.isFinite(end)) return false;
|
|
11168
|
-
return tableRanges.some((table) => start >= table.from && end <= table.to);
|
|
11169
|
-
});
|
|
11170
|
-
};
|
|
11171
|
-
/**
|
|
11172
|
-
* Suppress an inline tracked-change bubble whose document range falls within a
|
|
11173
|
-
* tracked whole-table change's range, so only the structural "Added table"
|
|
11174
|
-
* / "Deleted table" bubble shows for that table (matching Word / Google Docs).
|
|
11175
|
-
* The structural bubble itself, real user comments, and inline tracked changes
|
|
11176
|
-
* inside a NON-tracked table are never suppressed.
|
|
11177
|
-
*
|
|
11178
|
-
* @param {Object} comment
|
|
11179
|
-
* @returns {boolean} True when the bubble must NOT render.
|
|
11180
|
-
*/
|
|
11181
|
-
const isInlineTrackedChangeInsideTrackedTable = (comment) => {
|
|
11182
|
-
if (!comment?.trackedChange) return false;
|
|
11183
|
-
if (isStructuralTableBubble(comment)) return false;
|
|
11184
|
-
const ranges = getTrackedTableRangesForDocument(comment?.fileId);
|
|
11185
|
-
if (!ranges.length) return false;
|
|
11186
|
-
const entry = resolveCommentPositionEntry(comment).entry;
|
|
11187
|
-
const range = getCommentPositionRange(entry);
|
|
11188
|
-
if (!range) return false;
|
|
11189
|
-
return ranges.some((table) => range.start >= table.from && range.end <= table.to);
|
|
11190
|
-
};
|
|
11191
10915
|
const getFloatingComments = require__plugin_vue_export_helper.computed(() => {
|
|
11192
10916
|
return getGroupedComments.value?.parentComments.filter((c) => !c.resolvedTime).filter((c) => {
|
|
11193
10917
|
if (!isEditorBackedComment(c)) return true;
|
|
11194
10918
|
if (isTrackedChangeThread(c)) return true;
|
|
11195
10919
|
return Boolean(resolveCommentPositionEntry(c).entry);
|
|
11196
|
-
})
|
|
10920
|
+
});
|
|
11197
10921
|
});
|
|
11198
10922
|
const getFloatingCommentInstances = require__plugin_vue_export_helper.computed(() => {
|
|
11199
10923
|
return getFloatingComments.value.flatMap((comment) => {
|
|
@@ -11313,7 +11037,6 @@ var useCommentsStore = defineStore("comments", () => {
|
|
|
11313
11037
|
clearEditorCommentPositions,
|
|
11314
11038
|
handleTrackedChangeUpdate,
|
|
11315
11039
|
syncResolvedCommentsWithDocument,
|
|
11316
|
-
syncTrackedChangePositionsWithDocument,
|
|
11317
11040
|
setActiveFloatingCommentInstance,
|
|
11318
11041
|
requestInstantSidebarAlignment,
|
|
11319
11042
|
peekInstantSidebarAlignment,
|
|
@@ -21334,7 +21057,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
21334
21057
|
}
|
|
21335
21058
|
});
|
|
21336
21059
|
const { getConfig, documentsWithConverations, commentsList, pendingComment, activeComment, skipSelectionUpdate, commentsByDocument, isCommentsListVisible, isFloatingCommentsReady, generalCommentIds, hasSyncedCollaborationComments, editorCommentPositions, hasInitializedLocations, isCommentHighlighted, hasOpenTrackedChanges } = storeToRefs(commentsStore);
|
|
21337
|
-
const { showAddComment, handleEditorLocationsUpdate, handleTrackedChangeUpdate,
|
|
21060
|
+
const { showAddComment, handleEditorLocationsUpdate, handleTrackedChangeUpdate, addComment, addHydratedComment, getComment, resolveCommentPositionEntry, belongsToDocument, COMMENT_EVENTS, requestInstantSidebarAlignment, peekInstantSidebarAlignment, clearInstantSidebarAlignment } = commentsStore;
|
|
21338
21061
|
const { proxy } = require__plugin_vue_export_helper.getCurrentInstance();
|
|
21339
21062
|
commentsStore.proxy = proxy;
|
|
21340
21063
|
const documentOpenTelemetry = createDocumentOpenTelemetry(proxy.$superdoc.config);
|
|
@@ -23903,7 +23626,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
23903
23626
|
], 46, _hoisted_1$17);
|
|
23904
23627
|
};
|
|
23905
23628
|
}
|
|
23906
|
-
}, [["__scopeId", "data-v-
|
|
23629
|
+
}, [["__scopeId", "data-v-9c1ff6d7"]]);
|
|
23907
23630
|
//#endregion
|
|
23908
23631
|
//#region src/core/create-app.js
|
|
23909
23632
|
var PINIA_DEVTOOLS_SETUP_EVENT = "devtools-plugin:setup";
|
|
@@ -45635,7 +45358,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
45635
45358
|
}
|
|
45636
45359
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
45637
45360
|
this.colorIndex = 0;
|
|
45638
|
-
this.version = "2.28.0-next.
|
|
45361
|
+
this.version = "2.28.0-next.15";
|
|
45639
45362
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
45640
45363
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
45641
45364
|
this.colors = this.config.colors ?? [];
|