superdoc 2.28.0-next.17 → 2.28.0-next.18

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.
@@ -107,17 +107,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
107
107
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
108
108
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
109
109
  getCommentPosition: (commentOrId: Object | string) => Object | null;
110
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
111
- separator?: string | undefined;
112
- trim?: boolean | undefined;
113
- }) => string | null;
114
- getCommentAnchorData: (commentOrId: Object | string, options?: {
115
- separator?: string | undefined;
116
- trim?: boolean | undefined;
117
- }) => {
118
- position: Object;
119
- anchoredText: string | null;
120
- } | null;
121
110
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
122
111
  key: string | null;
123
112
  entry: any;
@@ -187,7 +176,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
187
176
  superdoc: Object;
188
177
  params: Object;
189
178
  }) => void;
190
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
179
+ syncResolvedCommentsWithDocument: () => number;
191
180
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
192
181
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
193
182
  peekInstantSidebarAlignment: () => null;
@@ -356,17 +345,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
356
345
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
357
346
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
358
347
  getCommentPosition: (commentOrId: Object | string) => Object | null;
359
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
360
- separator?: string | undefined;
361
- trim?: boolean | undefined;
362
- }) => string | null;
363
- getCommentAnchorData: (commentOrId: Object | string, options?: {
364
- separator?: string | undefined;
365
- trim?: boolean | undefined;
366
- }) => {
367
- position: Object;
368
- anchoredText: string | null;
369
- } | null;
370
348
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
371
349
  key: string | null;
372
350
  entry: any;
@@ -436,7 +414,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
436
414
  superdoc: Object;
437
415
  params: Object;
438
416
  }) => void;
439
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
417
+ syncResolvedCommentsWithDocument: () => number;
440
418
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
441
419
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
442
420
  peekInstantSidebarAlignment: () => null;
@@ -605,17 +583,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
605
583
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
606
584
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
607
585
  getCommentPosition: (commentOrId: Object | string) => Object | null;
608
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
609
- separator?: string | undefined;
610
- trim?: boolean | undefined;
611
- }) => string | null;
612
- getCommentAnchorData: (commentOrId: Object | string, options?: {
613
- separator?: string | undefined;
614
- trim?: boolean | undefined;
615
- }) => {
616
- position: Object;
617
- anchoredText: string | null;
618
- } | null;
619
586
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
620
587
  key: string | null;
621
588
  entry: any;
@@ -685,7 +652,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
685
652
  superdoc: Object;
686
653
  params: Object;
687
654
  }) => void;
688
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
655
+ syncResolvedCommentsWithDocument: () => number;
689
656
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
690
657
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
691
658
  peekInstantSidebarAlignment: () => null;
@@ -774,7 +741,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
774
741
  liveAnchorKeys?: null | undefined;
775
742
  }) => any;
776
743
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
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">>;
744
+ }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "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">>;
778
745
  documents: Ref<StoreDocument[], StoreDocument[]>;
779
746
  documentBounds: Ref<unknown[], unknown[]>;
780
747
  pages: Record<string, PageEntry[]>;
@@ -885,17 +852,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
885
852
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
886
853
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
887
854
  getCommentPosition: (commentOrId: Object | string) => Object | null;
888
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
889
- separator?: string | undefined;
890
- trim?: boolean | undefined;
891
- }) => string | null;
892
- getCommentAnchorData: (commentOrId: Object | string, options?: {
893
- separator?: string | undefined;
894
- trim?: boolean | undefined;
895
- }) => {
896
- position: Object;
897
- anchoredText: string | null;
898
- } | null;
899
855
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
900
856
  key: string | null;
901
857
  entry: any;
@@ -965,7 +921,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
965
921
  superdoc: Object;
966
922
  params: Object;
967
923
  }) => void;
968
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
924
+ syncResolvedCommentsWithDocument: () => number;
969
925
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
970
926
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
971
927
  peekInstantSidebarAlignment: () => null;
@@ -1134,17 +1090,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1134
1090
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
1135
1091
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
1136
1092
  getCommentPosition: (commentOrId: Object | string) => Object | null;
1137
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
1138
- separator?: string | undefined;
1139
- trim?: boolean | undefined;
1140
- }) => string | null;
1141
- getCommentAnchorData: (commentOrId: Object | string, options?: {
1142
- separator?: string | undefined;
1143
- trim?: boolean | undefined;
1144
- }) => {
1145
- position: Object;
1146
- anchoredText: string | null;
1147
- } | null;
1148
1093
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
1149
1094
  key: string | null;
1150
1095
  entry: any;
@@ -1214,7 +1159,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1214
1159
  superdoc: Object;
1215
1160
  params: Object;
1216
1161
  }) => void;
1217
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
1162
+ syncResolvedCommentsWithDocument: () => number;
1218
1163
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
1219
1164
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
1220
1165
  peekInstantSidebarAlignment: () => null;
@@ -1383,17 +1328,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1383
1328
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
1384
1329
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
1385
1330
  getCommentPosition: (commentOrId: Object | string) => Object | null;
1386
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
1387
- separator?: string | undefined;
1388
- trim?: boolean | undefined;
1389
- }) => string | null;
1390
- getCommentAnchorData: (commentOrId: Object | string, options?: {
1391
- separator?: string | undefined;
1392
- trim?: boolean | undefined;
1393
- }) => {
1394
- position: Object;
1395
- anchoredText: string | null;
1396
- } | null;
1397
1331
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
1398
1332
  key: string | null;
1399
1333
  entry: any;
@@ -1463,7 +1397,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1463
1397
  superdoc: Object;
1464
1398
  params: Object;
1465
1399
  }) => void;
1466
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
1400
+ syncResolvedCommentsWithDocument: () => number;
1467
1401
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
1468
1402
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
1469
1403
  peekInstantSidebarAlignment: () => null;
@@ -1552,7 +1486,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1552
1486
  liveAnchorKeys?: null | undefined;
1553
1487
  }) => any;
1554
1488
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
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">>;
1489
+ }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "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">>;
1556
1490
  documents: Ref<StoreDocument[], StoreDocument[]>;
1557
1491
  documentBounds: Ref<unknown[], unknown[]>;
1558
1492
  pages: Record<string, PageEntry[]>;
@@ -1663,17 +1597,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1663
1597
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
1664
1598
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
1665
1599
  getCommentPosition: (commentOrId: Object | string) => Object | null;
1666
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
1667
- separator?: string | undefined;
1668
- trim?: boolean | undefined;
1669
- }) => string | null;
1670
- getCommentAnchorData: (commentOrId: Object | string, options?: {
1671
- separator?: string | undefined;
1672
- trim?: boolean | undefined;
1673
- }) => {
1674
- position: Object;
1675
- anchoredText: string | null;
1676
- } | null;
1677
1600
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
1678
1601
  key: string | null;
1679
1602
  entry: any;
@@ -1743,7 +1666,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1743
1666
  superdoc: Object;
1744
1667
  params: Object;
1745
1668
  }) => void;
1746
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
1669
+ syncResolvedCommentsWithDocument: () => number;
1747
1670
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
1748
1671
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
1749
1672
  peekInstantSidebarAlignment: () => null;
@@ -1912,17 +1835,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1912
1835
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
1913
1836
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
1914
1837
  getCommentPosition: (commentOrId: Object | string) => Object | null;
1915
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
1916
- separator?: string | undefined;
1917
- trim?: boolean | undefined;
1918
- }) => string | null;
1919
- getCommentAnchorData: (commentOrId: Object | string, options?: {
1920
- separator?: string | undefined;
1921
- trim?: boolean | undefined;
1922
- }) => {
1923
- position: Object;
1924
- anchoredText: string | null;
1925
- } | null;
1926
1838
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
1927
1839
  key: string | null;
1928
1840
  entry: any;
@@ -1992,7 +1904,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
1992
1904
  superdoc: Object;
1993
1905
  params: Object;
1994
1906
  }) => void;
1995
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
1907
+ syncResolvedCommentsWithDocument: () => number;
1996
1908
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
1997
1909
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
1998
1910
  peekInstantSidebarAlignment: () => null;
@@ -2161,17 +2073,6 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
2161
2073
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
2162
2074
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
2163
2075
  getCommentPosition: (commentOrId: Object | string) => Object | null;
2164
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
2165
- separator?: string | undefined;
2166
- trim?: boolean | undefined;
2167
- }) => string | null;
2168
- getCommentAnchorData: (commentOrId: Object | string, options?: {
2169
- separator?: string | undefined;
2170
- trim?: boolean | undefined;
2171
- }) => {
2172
- position: Object;
2173
- anchoredText: string | null;
2174
- } | null;
2175
2076
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
2176
2077
  key: string | null;
2177
2078
  entry: any;
@@ -2241,7 +2142,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
2241
2142
  superdoc: Object;
2242
2143
  params: Object;
2243
2144
  }) => void;
2244
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
2145
+ syncResolvedCommentsWithDocument: () => number;
2245
2146
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
2246
2147
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
2247
2148
  peekInstantSidebarAlignment: () => null;
@@ -2330,7 +2231,7 @@ export declare const useSuperdocStore: import('pinia').StoreDefinition<"superdoc
2330
2231
  liveAnchorKeys?: null | undefined;
2331
2232
  }) => any;
2332
2233
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
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">>;
2234
+ }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "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">>;
2334
2235
  documents: Ref<StoreDocument[], StoreDocument[]>;
2335
2236
  documentBounds: Ref<unknown[], unknown[]>;
2336
2237
  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-CXdsObDZ.cjs");
4
+ const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-DOnTWcx7.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");
@@ -258,7 +258,7 @@ var v_click_outside_default = {
258
258
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
259
259
  function getSuperdocVersion() {
260
260
  try {
261
- return "2.28.0-next.17";
261
+ return "2.28.0-next.18";
262
262
  } catch {
263
263
  return "unknown";
264
264
  }
@@ -7940,17 +7940,6 @@ var useCommentsStore = defineStore("comments", () => {
7940
7940
  comment.resolvedByName = null;
7941
7941
  comment.trackedChangeDecision = null;
7942
7942
  };
7943
- const restoreResolvedMetadata = (comment) => {
7944
- if (!comment) return false;
7945
- const snapshot = trackedChangeResolutionSnapshots.get(comment);
7946
- if (!snapshot) return false;
7947
- comment.resolvedTime = snapshot.resolvedTime ?? Date.now();
7948
- comment.resolvedById = snapshot.resolvedById ?? null;
7949
- comment.resolvedByEmail = snapshot.resolvedByEmail ?? null;
7950
- comment.resolvedByName = snapshot.resolvedByName ?? null;
7951
- comment.trackedChangeDecision = snapshot.trackedChangeDecision ?? null;
7952
- return true;
7953
- };
7954
7943
  const getCommentEventPayload = (comment) => typeof comment?.getValues === "function" ? comment.getValues() : { ...comment };
7955
7944
  /**
7956
7945
  * Check if a comment originated from the document editor (or has no explicit source).
@@ -7965,63 +7954,14 @@ var useCommentsStore = defineStore("comments", () => {
7965
7954
  return source === DOCUMENT_EDITOR_SELECTION_SOURCE;
7966
7955
  };
7967
7956
  const isTrackedChangeThread = (comment) => Boolean(comment?.trackedChange) || Boolean(trackedChangeThreadParentIdForComment$1(comment));
7968
- const collectStandardCommentDocumentState = (editor) => {
7969
- const doc = editor?.state?.doc;
7970
- if (!doc || typeof doc.descendants !== "function") return null;
7971
- const liveMarkIds = /* @__PURE__ */ new Set();
7972
- const resolvedAnchorIds = /* @__PURE__ */ new Set();
7973
- doc.descendants((node) => {
7974
- node.marks?.filter((mark) => mark?.type?.name === "commentMark").forEach((mark) => {
7975
- [mark.attrs?.commentId, mark.attrs?.importedId].map((id) => normalizeCommentId(id)).filter(Boolean).forEach((id) => liveMarkIds.add(id));
7976
- });
7977
- const typeName = node.type?.name;
7978
- if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd") return;
7979
- const anchorId = normalizeCommentId(node.attrs?.["w:id"]);
7980
- if (anchorId) resolvedAnchorIds.add(anchorId);
7981
- });
7982
- return {
7983
- liveMarkIds,
7984
- resolvedAnchorIds
7985
- };
7986
- };
7987
- /**
7988
- * Fall back to a live editor when the caller has none (the store watchers).
7989
- * `editorCommentPositions` refreshes asynchronously, so a positions-based
7990
- * decision taken mid-undo/redo can act on STALE keys — e.g. clearing the
7991
- * resolved metadata that the redo restore just wrote back. The document
7992
- * itself is the source of truth; prefer it whenever an editor is reachable.
7993
- */
7994
- const getFallbackCommentsEditor = () => {
7995
- const docs = superdocStore.documents;
7996
- if (!Array.isArray(docs)) return null;
7997
- for (const doc of docs) {
7998
- const editor = typeof doc?.getEditor === "function" ? doc.getEditor() : null;
7999
- if (editor?.state?.doc) return editor;
8000
- }
8001
- return null;
8002
- };
8003
- const syncResolvedCommentsWithDocument = ({ editor } = {}) => {
7957
+ const syncResolvedCommentsWithDocument = () => {
8004
7958
  if (v2CommentsAdapter.value) return 0;
8005
- const effectiveEditor = editor ?? getFallbackCommentsEditor();
8006
- const documentState = collectStandardCommentDocumentState(effectiveEditor);
8007
7959
  const docPositions = editorCommentPositions.value || {};
8008
7960
  const activeKeys = new Set(Object.keys(docPositions));
8009
- if (!documentState && !activeKeys.size) return 0;
7961
+ if (!activeKeys.size) return 0;
8010
7962
  let changed = 0;
8011
7963
  commentsList.value.forEach((comment) => {
8012
7964
  if (!isEditorBackedComment(comment) || isTrackedChangeThread(comment)) return;
8013
- if (documentState) {
8014
- const aliasIds = getCommentAliasIds(comment);
8015
- const hasLiveMark = aliasIds.some((id) => documentState.liveMarkIds.has(id));
8016
- const hasResolvedAnchor = aliasIds.some((id) => documentState.resolvedAnchorIds.has(id));
8017
- if (hasLiveMark && comment.resolvedTime != null) {
8018
- clearResolvedMetadata(comment);
8019
- changed += 1;
8020
- return;
8021
- }
8022
- if (!hasLiveMark && hasResolvedAnchor && comment.resolvedTime == null && restoreResolvedMetadata(comment)) changed += 1;
8023
- return;
8024
- }
8025
7965
  const { key } = resolveCommentPositionEntry(comment);
8026
7966
  if (!key) return;
8027
7967
  if (activeKeys.has(String(key)) && comment.resolvedTime != null) {
@@ -8039,23 +7979,6 @@ var useCommentsStore = defineStore("comments", () => {
8039
7979
  syncResolvedCommentsWithDocument();
8040
7980
  }, { deep: false });
8041
7981
  /**
8042
- * Normalize a position object to a consistent { start, end } format.
8043
- * Handles different editor position schemas (start/end, pos/to, from/to).
8044
- *
8045
- * @param {Object | null | undefined} position The position object
8046
- * @returns {{ start: number, end: number } | null} The normalized range or null
8047
- */
8048
- const getCommentPositionRange = (position) => {
8049
- if (!position) return null;
8050
- const start = position.start ?? position.pos ?? position.from;
8051
- const end = position.end ?? position.to ?? start;
8052
- if (!Number.isFinite(start) || !Number.isFinite(end)) return null;
8053
- return {
8054
- start,
8055
- end
8056
- };
8057
- };
8058
- /**
8059
7982
  * Get the editor position data for a comment.
8060
7983
  *
8061
7984
  * @param {Object | string} commentOrId The comment object or comment ID
@@ -8064,44 +7987,6 @@ var useCommentsStore = defineStore("comments", () => {
8064
7987
  const getCommentPosition = (commentOrId) => {
8065
7988
  return resolveCommentPositionEntry(commentOrId).entry ?? null;
8066
7989
  };
8067
- /**
8068
- * Get the text that a comment is anchored to in the document.
8069
- *
8070
- * @param {Object | string} commentOrId The comment object or comment ID
8071
- * @param {Object} [options] Options for text extraction
8072
- * @param {string} [options.separator=' '] Separator for textBetween when crossing nodes
8073
- * @param {boolean} [options.trim=true] Whether to trim whitespace from the result
8074
- * @returns {string | null} The anchored text or null if unavailable
8075
- */
8076
- const getCommentAnchoredText = (commentOrId, options = {}) => {
8077
- const comment = typeof commentOrId === "object" ? commentOrId : getComment(commentOrId);
8078
- if (!comment) return null;
8079
- const position = resolveCommentPositionEntry(commentOrId).entry ?? null;
8080
- const range = getCommentPositionRange(position);
8081
- if (!range) return null;
8082
- const docNode = (superdocStore.getDocument(comment.fileId)?.getEditor?.())?.state?.doc;
8083
- if (!docNode?.textBetween) return null;
8084
- const separator = options.separator ?? " ";
8085
- const text = docNode.textBetween(range.start, range.end, separator, separator);
8086
- return options.trim === false ? text : text?.trim();
8087
- };
8088
- /**
8089
- * Get both position and anchored text data for a comment.
8090
- *
8091
- * @param {Object | string} commentOrId The comment object or comment ID
8092
- * @param {Object} [options] Options passed to getCommentAnchoredText
8093
- * @param {string} [options.separator=' '] Separator for textBetween when crossing nodes
8094
- * @param {boolean} [options.trim=true] Whether to trim whitespace from the result
8095
- * @returns {{ position: Object, anchoredText: string | null } | null} The anchor data or null
8096
- */
8097
- const getCommentAnchorData = (commentOrId, options = {}) => {
8098
- const position = getCommentPosition(commentOrId);
8099
- if (!position) return null;
8100
- return {
8101
- position,
8102
- anchoredText: getCommentAnchoredText(commentOrId, options)
8103
- };
8104
- };
8105
7990
  const isThreadVisible = (comment) => {
8106
7991
  if (!isViewingMode.value) return true;
8107
7992
  const parent = getThreadParent(comment);
@@ -11019,8 +10904,6 @@ var useCommentsStore = defineStore("comments", () => {
11019
10904
  getTrackedChangeThread,
11020
10905
  getCommentPositionKey,
11021
10906
  getCommentPosition,
11022
- getCommentAnchoredText,
11023
- getCommentAnchorData,
11024
10907
  resolveCommentPositionEntry,
11025
10908
  getCommentDocumentId,
11026
10909
  belongsToDocument,
@@ -45398,7 +45281,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
45398
45281
  }
45399
45282
  this.userColorMap = /* @__PURE__ */ new Map();
45400
45283
  this.colorIndex = 0;
45401
- this.version = "2.28.0-next.17";
45284
+ this.version = "2.28.0-next.18";
45402
45285
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45403
45286
  this.superdocId = config.superdocId || require_uuid.v4();
45404
45287
  this.colors = this.config.colors ?? [];
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM$2 } from "./chunks/rolldown-runtime-0pSA04fp.es.js";
2
2
  import { t as blank_default } from "./chunks/blank-docx-DzQccOlW.es.js";
3
- import { _ as closeInteractionHistory, a as registerFirstPartyCommandMutation, b as isWorkflowRecordingEnabled, c as applyV2CommentInvalidationFromMutation, d as isPlainObject$1, f as createImageFilePicker, g as DOM_CLASS_NAMES, h as isSyntheticTrackedChangeCommentLaneItem, i as readFirstPartyPageNumbers, l as getV2TrackedChangeMutationImpact, n as executeFirstPartyCommandAsync, o as isRecord, p as resolveImageSrc, r as executeFirstPartyShortcutAsync, t as createSuperDocUI, u as mutationCommittedEventChangedDocument, v as createInteractionHistory, x as recordInteraction, y as getWorkflowRecording } from "./chunks/create-super-doc-ui-CAfcpwSS.es.js";
3
+ import { _ as closeInteractionHistory, a as registerFirstPartyCommandMutation, b as isWorkflowRecordingEnabled, c as applyV2CommentInvalidationFromMutation, d as isPlainObject$1, f as createImageFilePicker, g as DOM_CLASS_NAMES, h as isSyntheticTrackedChangeCommentLaneItem, i as readFirstPartyPageNumbers, l as getV2TrackedChangeMutationImpact, n as executeFirstPartyCommandAsync, o as isRecord, p as resolveImageSrc, r as executeFirstPartyShortcutAsync, t as createSuperDocUI, u as mutationCommittedEventChangedDocument, v as createInteractionHistory, x as recordInteraction, y as getWorkflowRecording } from "./chunks/create-super-doc-ui-gI3fiM_P.es.js";
4
4
  import { t as import_eventemitter3 } from "./chunks/eventemitter3-DEIiXiH2.es.js";
5
5
  import { t as v4 } from "./chunks/uuid-H0Xcmmhy.es.js";
6
6
  import { $ as vModelText, A as onActivated, B as renderSlot, C as isRef$1, D as normalizeClass, E as nextTick, F as openBlock, G as toRaw$2, H as resolveDynamicComponent, I as provide$1, J as unref, K as toRef, L as reactive, M as onDeactivated, N as onMounted, O as normalizeProps, P as onScopeDispose$1, Q as vModelSelect, R as ref, S as isReactive$1, T as mergeProps, U as shallowRef$1, V as resolveDirective, W as toDisplayString, X as useSlots, Y as useAttrs, Z as vModelCheckbox, _ as getCurrentInstance, a as computed$1, b as hasInjectionContext, c as createCommentVNode, d as createStaticVNode, et as watch$1, f as createTextVNode, g as effectScope, h as defineComponent, i as Transition, it as withModifiers, j as onBeforeUnmount, k as normalizeStyle, l as createElementBlock, m as defineAsyncComponent, n as Fragment, nt as withDirectives, o as createApp, p as createVNode, q as toRefs, r as Teleport, rt as withKeys, s as createBlock, t as _plugin_vue_export_helper_default, tt as withCtx, u as createElementVNode, v as getCurrentScope, w as markRaw, x as inject$1, y as h, z as renderList } from "./chunks/_plugin-vue_export-helper-7ZiLY07t.es.js";
@@ -256,7 +256,7 @@ var v_click_outside_default = {
256
256
  var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
257
257
  function getSuperdocVersion() {
258
258
  try {
259
- return "2.28.0-next.17";
259
+ return "2.28.0-next.18";
260
260
  } catch {
261
261
  return "unknown";
262
262
  }
@@ -7938,17 +7938,6 @@ var useCommentsStore = defineStore("comments", () => {
7938
7938
  comment.resolvedByName = null;
7939
7939
  comment.trackedChangeDecision = null;
7940
7940
  };
7941
- const restoreResolvedMetadata = (comment) => {
7942
- if (!comment) return false;
7943
- const snapshot = trackedChangeResolutionSnapshots.get(comment);
7944
- if (!snapshot) return false;
7945
- comment.resolvedTime = snapshot.resolvedTime ?? Date.now();
7946
- comment.resolvedById = snapshot.resolvedById ?? null;
7947
- comment.resolvedByEmail = snapshot.resolvedByEmail ?? null;
7948
- comment.resolvedByName = snapshot.resolvedByName ?? null;
7949
- comment.trackedChangeDecision = snapshot.trackedChangeDecision ?? null;
7950
- return true;
7951
- };
7952
7941
  const getCommentEventPayload = (comment) => typeof comment?.getValues === "function" ? comment.getValues() : { ...comment };
7953
7942
  /**
7954
7943
  * Check if a comment originated from the document editor (or has no explicit source).
@@ -7963,63 +7952,14 @@ var useCommentsStore = defineStore("comments", () => {
7963
7952
  return source === DOCUMENT_EDITOR_SELECTION_SOURCE;
7964
7953
  };
7965
7954
  const isTrackedChangeThread = (comment) => Boolean(comment?.trackedChange) || Boolean(trackedChangeThreadParentIdForComment$1(comment));
7966
- const collectStandardCommentDocumentState = (editor) => {
7967
- const doc = editor?.state?.doc;
7968
- if (!doc || typeof doc.descendants !== "function") return null;
7969
- const liveMarkIds = /* @__PURE__ */ new Set();
7970
- const resolvedAnchorIds = /* @__PURE__ */ new Set();
7971
- doc.descendants((node) => {
7972
- node.marks?.filter((mark) => mark?.type?.name === "commentMark").forEach((mark) => {
7973
- [mark.attrs?.commentId, mark.attrs?.importedId].map((id) => normalizeCommentId(id)).filter(Boolean).forEach((id) => liveMarkIds.add(id));
7974
- });
7975
- const typeName = node.type?.name;
7976
- if (typeName !== "commentRangeStart" && typeName !== "commentRangeEnd") return;
7977
- const anchorId = normalizeCommentId(node.attrs?.["w:id"]);
7978
- if (anchorId) resolvedAnchorIds.add(anchorId);
7979
- });
7980
- return {
7981
- liveMarkIds,
7982
- resolvedAnchorIds
7983
- };
7984
- };
7985
- /**
7986
- * Fall back to a live editor when the caller has none (the store watchers).
7987
- * `editorCommentPositions` refreshes asynchronously, so a positions-based
7988
- * decision taken mid-undo/redo can act on STALE keys — e.g. clearing the
7989
- * resolved metadata that the redo restore just wrote back. The document
7990
- * itself is the source of truth; prefer it whenever an editor is reachable.
7991
- */
7992
- const getFallbackCommentsEditor = () => {
7993
- const docs = superdocStore.documents;
7994
- if (!Array.isArray(docs)) return null;
7995
- for (const doc of docs) {
7996
- const editor = typeof doc?.getEditor === "function" ? doc.getEditor() : null;
7997
- if (editor?.state?.doc) return editor;
7998
- }
7999
- return null;
8000
- };
8001
- const syncResolvedCommentsWithDocument = ({ editor } = {}) => {
7955
+ const syncResolvedCommentsWithDocument = () => {
8002
7956
  if (v2CommentsAdapter.value) return 0;
8003
- const effectiveEditor = editor ?? getFallbackCommentsEditor();
8004
- const documentState = collectStandardCommentDocumentState(effectiveEditor);
8005
7957
  const docPositions = editorCommentPositions.value || {};
8006
7958
  const activeKeys = new Set(Object.keys(docPositions));
8007
- if (!documentState && !activeKeys.size) return 0;
7959
+ if (!activeKeys.size) return 0;
8008
7960
  let changed = 0;
8009
7961
  commentsList.value.forEach((comment) => {
8010
7962
  if (!isEditorBackedComment(comment) || isTrackedChangeThread(comment)) return;
8011
- if (documentState) {
8012
- const aliasIds = getCommentAliasIds(comment);
8013
- const hasLiveMark = aliasIds.some((id) => documentState.liveMarkIds.has(id));
8014
- const hasResolvedAnchor = aliasIds.some((id) => documentState.resolvedAnchorIds.has(id));
8015
- if (hasLiveMark && comment.resolvedTime != null) {
8016
- clearResolvedMetadata(comment);
8017
- changed += 1;
8018
- return;
8019
- }
8020
- if (!hasLiveMark && hasResolvedAnchor && comment.resolvedTime == null && restoreResolvedMetadata(comment)) changed += 1;
8021
- return;
8022
- }
8023
7963
  const { key } = resolveCommentPositionEntry(comment);
8024
7964
  if (!key) return;
8025
7965
  if (activeKeys.has(String(key)) && comment.resolvedTime != null) {
@@ -8037,23 +7977,6 @@ var useCommentsStore = defineStore("comments", () => {
8037
7977
  syncResolvedCommentsWithDocument();
8038
7978
  }, { deep: false });
8039
7979
  /**
8040
- * Normalize a position object to a consistent { start, end } format.
8041
- * Handles different editor position schemas (start/end, pos/to, from/to).
8042
- *
8043
- * @param {Object | null | undefined} position The position object
8044
- * @returns {{ start: number, end: number } | null} The normalized range or null
8045
- */
8046
- const getCommentPositionRange = (position) => {
8047
- if (!position) return null;
8048
- const start = position.start ?? position.pos ?? position.from;
8049
- const end = position.end ?? position.to ?? start;
8050
- if (!Number.isFinite(start) || !Number.isFinite(end)) return null;
8051
- return {
8052
- start,
8053
- end
8054
- };
8055
- };
8056
- /**
8057
7980
  * Get the editor position data for a comment.
8058
7981
  *
8059
7982
  * @param {Object | string} commentOrId The comment object or comment ID
@@ -8062,44 +7985,6 @@ var useCommentsStore = defineStore("comments", () => {
8062
7985
  const getCommentPosition = (commentOrId) => {
8063
7986
  return resolveCommentPositionEntry(commentOrId).entry ?? null;
8064
7987
  };
8065
- /**
8066
- * Get the text that a comment is anchored to in the document.
8067
- *
8068
- * @param {Object | string} commentOrId The comment object or comment ID
8069
- * @param {Object} [options] Options for text extraction
8070
- * @param {string} [options.separator=' '] Separator for textBetween when crossing nodes
8071
- * @param {boolean} [options.trim=true] Whether to trim whitespace from the result
8072
- * @returns {string | null} The anchored text or null if unavailable
8073
- */
8074
- const getCommentAnchoredText = (commentOrId, options = {}) => {
8075
- const comment = typeof commentOrId === "object" ? commentOrId : getComment(commentOrId);
8076
- if (!comment) return null;
8077
- const position = resolveCommentPositionEntry(commentOrId).entry ?? null;
8078
- const range = getCommentPositionRange(position);
8079
- if (!range) return null;
8080
- const docNode = (superdocStore.getDocument(comment.fileId)?.getEditor?.())?.state?.doc;
8081
- if (!docNode?.textBetween) return null;
8082
- const separator = options.separator ?? " ";
8083
- const text = docNode.textBetween(range.start, range.end, separator, separator);
8084
- return options.trim === false ? text : text?.trim();
8085
- };
8086
- /**
8087
- * Get both position and anchored text data for a comment.
8088
- *
8089
- * @param {Object | string} commentOrId The comment object or comment ID
8090
- * @param {Object} [options] Options passed to getCommentAnchoredText
8091
- * @param {string} [options.separator=' '] Separator for textBetween when crossing nodes
8092
- * @param {boolean} [options.trim=true] Whether to trim whitespace from the result
8093
- * @returns {{ position: Object, anchoredText: string | null } | null} The anchor data or null
8094
- */
8095
- const getCommentAnchorData = (commentOrId, options = {}) => {
8096
- const position = getCommentPosition(commentOrId);
8097
- if (!position) return null;
8098
- return {
8099
- position,
8100
- anchoredText: getCommentAnchoredText(commentOrId, options)
8101
- };
8102
- };
8103
7988
  const isThreadVisible = (comment) => {
8104
7989
  if (!isViewingMode.value) return true;
8105
7990
  const parent = getThreadParent(comment);
@@ -11017,8 +10902,6 @@ var useCommentsStore = defineStore("comments", () => {
11017
10902
  getTrackedChangeThread,
11018
10903
  getCommentPositionKey,
11019
10904
  getCommentPosition,
11020
- getCommentAnchoredText,
11021
- getCommentAnchorData,
11022
10905
  resolveCommentPositionEntry,
11023
10906
  getCommentDocumentId,
11024
10907
  belongsToDocument,
@@ -45326,7 +45209,7 @@ var SuperDoc = class extends import_eventemitter3.default {
45326
45209
  }
45327
45210
  this.userColorMap = /* @__PURE__ */ new Map();
45328
45211
  this.colorIndex = 0;
45329
- this.version = "2.28.0-next.17";
45212
+ this.version = "2.28.0-next.18";
45330
45213
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
45331
45214
  this.superdocId = config.superdocId || v4();
45332
45215
  this.colors = this.config.colors ?? [];