superdoc 2.29.0-next.3 → 2.29.0

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.
Files changed (175) hide show
  1. package/dist/chunks/{FindReplaceSurface-BKVHzhQ4.es.js → FindReplaceSurface-B_5ggdWg.es.js} +1 -1
  2. package/dist/chunks/{FindReplaceSurface-BNDrJ6VS.cjs → FindReplaceSurface-fVHxPXtn.cjs} +1 -1
  3. package/dist/chunks/{PasswordPromptSurface-6mF6Azda.es.js → PasswordPromptSurface-CZqhDQQ1.es.js} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-BNkaztaP.cjs → PasswordPromptSurface-x8GNmMJT.cjs} +1 -1
  5. package/dist/chunks/{PdfViewer-D4lVeOJu.es.js → PdfViewer-CW09MNrB.es.js} +70 -105
  6. package/dist/chunks/{PdfViewer-boENOZdF.cjs → PdfViewer-CkrAHpC-.cjs} +74 -109
  7. package/dist/chunks/{_plugin-vue_export-helper-6MBoygIY.cjs → _plugin-vue_export-helper-BkbCxNeT.cjs} +31 -7
  8. package/dist/chunks/{_plugin-vue_export-helper-CsJQtMvr.es.js → _plugin-vue_export-helper-DRPRMkeA.es.js} +20 -8
  9. package/dist/chunks/{constants-DpXuDx_g.cjs → constants-BeeNZoQp.cjs} +1 -1
  10. package/dist/chunks/{constants-B6VBlmKp.es.js → constants-BvNs_ybI.es.js} +1 -1
  11. package/dist/chunks/{create-super-doc-ui-BFt8agAI.es.js → create-super-doc-ui-Dc8dQAMc.es.js} +89 -137
  12. package/dist/chunks/{create-super-doc-ui-BAGOnYGM.cjs → create-super-doc-ui-L60GhVAX.cjs} +211 -259
  13. package/dist/collaboration-upgrade-engine.cjs +1 -1
  14. package/dist/collaboration-upgrade-engine.es.js +1 -1
  15. package/dist/document-api/src/capabilities/html-markdown-support.d.ts +4 -6
  16. package/dist/document-api/src/comments/comments.d.ts +2 -0
  17. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  18. package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
  19. package/dist/document-api/src/contract/operation-registry.d.ts +10 -9
  20. package/dist/document-api/src/index.d.ts +8 -7
  21. package/dist/document-api/src/insert/insert.d.ts +2 -2
  22. package/dist/document-api/src/replace/replace.d.ts +3 -2
  23. package/dist/document-api/src/types/address.d.ts +3 -0
  24. package/dist/document-api/src/types/temporary-mutation.d.ts +5 -1
  25. package/dist/document-api/src/write/write.d.ts +12 -6
  26. package/dist/public/ui-react.cjs +1 -1
  27. package/dist/public/ui-react.es.js +1 -1
  28. package/dist/public/ui-vue.cjs +1 -1
  29. package/dist/public/ui-vue.es.js +1 -1
  30. package/dist/public/ui.cjs +1 -1
  31. package/dist/public/ui.es.js +1 -1
  32. package/dist/style.css +1 -1
  33. package/dist/style.layered.css +1 -1
  34. package/dist/superdoc/src/SuperDoc.vue.d.ts +132 -58
  35. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +28 -13
  36. package/dist/superdoc/src/components/CommentsLayer/collect-removed-comment-ids.d.ts +11 -1
  37. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +19 -2
  38. package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +1 -1
  39. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +23 -20
  40. package/dist/superdoc/src/components/CommentsLayer/floating-comment-positioning.d.ts +24 -23
  41. package/dist/superdoc/src/components/CommentsLayer/helpers.d.ts +1 -4
  42. package/dist/superdoc/src/components/CommentsLayer/tracked-change-threading.d.ts +16 -2
  43. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +28 -13
  44. package/dist/superdoc/src/components/PdfViewer/PdfViewer.vue.d.ts +132 -45
  45. package/dist/superdoc/src/components/PdfViewer/PdfViewerDocument.vue.d.ts +62 -16
  46. package/dist/superdoc/src/components/PdfViewer/PdfViewerPage.vue.d.ts +77 -17
  47. package/dist/superdoc/src/components/PdfViewer/pdf-viewer-types.d.ts +45 -0
  48. package/dist/superdoc/src/components/Whiteboard/WhiteboardLayer.vue.d.ts +80 -16
  49. package/dist/superdoc/src/components/Whiteboard/WhiteboardPage.vue.d.ts +48 -13
  50. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -15
  51. package/dist/superdoc/src/components/Whiteboard/whiteboard-types.d.ts +13 -0
  52. package/dist/superdoc/src/components/surfaces/focusable-selector.d.ts +1 -5
  53. package/dist/superdoc/src/components/surfaces/watermark-surface-runtime.d.ts +7 -7
  54. package/dist/superdoc/src/composables/find-shortcut-owner.d.ts +16 -9
  55. package/dist/superdoc/src/composables/replace-continuation.d.ts +11 -15
  56. package/dist/superdoc/src/composables/use-comment-small-screen.d.ts +11 -7
  57. package/dist/superdoc/src/composables/use-compact-comment-popover.d.ts +44 -18
  58. package/dist/superdoc/src/composables/use-document.d.ts +1210 -30
  59. package/dist/superdoc/src/composables/use-field.d.ts +88 -25
  60. package/dist/superdoc/src/composables/use-find-replace.d.ts +13 -3
  61. package/dist/superdoc/src/composables/use-password-prompt.d.ts +23 -24
  62. package/dist/superdoc/src/composables/use-viewport-fit.d.ts +62 -26
  63. package/dist/superdoc/src/composables/useUiFontFamily.d.ts +3 -11
  64. package/dist/superdoc/src/core/SuperDoc.d.ts +4 -4
  65. package/dist/superdoc/src/core/collaboration/collaboration-comments.d.ts +9 -4
  66. package/dist/superdoc/src/core/collaboration/helpers.d.ts +20 -3
  67. package/dist/superdoc/src/core/collaboration/permissions.d.ts +15 -10
  68. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +4 -3
  69. package/dist/superdoc/src/core/collaboration/v2-awareness-bridge.d.ts +2 -1
  70. package/dist/superdoc/src/core/config/merge-comments-config.d.ts +1 -5
  71. package/dist/superdoc/src/core/config/merge-defined.d.ts +3 -8
  72. package/dist/superdoc/src/core/config/normalize-hyperlinks-config.d.ts +7 -12
  73. package/dist/superdoc/src/core/config/normalize-surfaces-config.d.ts +9 -12
  74. package/dist/superdoc/src/core/config/normalize-ui-config.d.ts +1 -12
  75. package/dist/superdoc/src/core/create-app.d.ts +13 -24
  76. package/dist/superdoc/src/core/editor-runtime/conformance/fake-v2-runtime.d.ts +2 -1
  77. package/dist/superdoc/src/core/editor-runtime/editor-runtime-registry.d.ts +2 -1
  78. package/dist/superdoc/src/core/editor-runtime/index.d.ts +1 -1
  79. package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -1
  80. package/dist/superdoc/src/core/editor-runtime/v2/v2-session-shortcut-routes.d.ts +1 -1
  81. package/dist/superdoc/src/core/helpers/export.d.ts +3 -2
  82. package/dist/superdoc/src/core/helpers/file.d.ts +8 -45
  83. package/dist/superdoc/src/core/helpers/normalize-track-changes-config.d.ts +6 -60
  84. package/dist/superdoc/src/core/pdf/helpers/constants.d.ts +2 -2
  85. package/dist/superdoc/src/core/pdf/helpers/floor.d.ts +1 -1
  86. package/dist/superdoc/src/core/pdf/helpers/range.d.ts +1 -1
  87. package/dist/superdoc/src/core/pdf/helpers/read-file.d.ts +1 -1
  88. package/dist/superdoc/src/core/pdf/pdf-adapter.d.ts +28 -61
  89. package/dist/superdoc/src/core/superdoc-ui-owner.d.ts +1 -1
  90. package/dist/superdoc/src/core/surface-manager.d.ts +21 -83
  91. package/dist/superdoc/src/core/types/index.d.ts +41 -23
  92. package/dist/superdoc/src/core/v2-integration/browser-peer-runtime.d.ts +5 -3
  93. package/dist/superdoc/src/core/v2-integration/cdn-engine-loader.d.ts +3 -13
  94. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +64 -59
  95. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +10 -10
  96. package/dist/superdoc/src/core/whiteboard/Whiteboard.d.ts +22 -208
  97. package/dist/superdoc/src/core/whiteboard/WhiteboardPage.d.ts +163 -189
  98. package/dist/superdoc/src/core/whiteboard/helpers/createTextarea.d.ts +14 -1
  99. package/dist/superdoc/src/core/whiteboard/helpers/flattenPoints.d.ts +1 -1
  100. package/dist/superdoc/src/core/whiteboard/helpers/getRandomId.d.ts +1 -1
  101. package/dist/superdoc/src/helpers/comment-focus.d.ts +21 -4
  102. package/dist/superdoc/src/helpers/deprecation.d.ts +5 -11
  103. package/dist/superdoc/src/helpers/interaction-trace.d.ts +7 -24
  104. package/dist/superdoc/src/helpers/mark-raw-component.d.ts +1 -0
  105. package/dist/superdoc/src/helpers/object-guards.d.ts +2 -5
  106. package/dist/superdoc/src/helpers/selection-source.d.ts +1 -1
  107. package/dist/superdoc/src/helpers/use-selection.d.ts +35 -15
  108. package/dist/superdoc/src/helpers/v2-author-required-rejection.d.ts +8 -11
  109. package/dist/superdoc/src/helpers/v2-bulk-decision-event.d.ts +9 -7
  110. package/dist/superdoc/src/helpers/v2-keyboard-edit-rejection.d.ts +8 -7
  111. package/dist/superdoc/src/helpers/v2-mutation-exception.d.ts +12 -8
  112. package/dist/superdoc/src/helpers/v2-review-target.d.ts +11 -1
  113. package/dist/superdoc/src/helpers/v2-selection-sync.d.ts +40 -14
  114. package/dist/superdoc/src/helpers/v2-typing-mutation-event.d.ts +14 -5
  115. package/dist/superdoc/src/icons.d.ts +11 -19
  116. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +6 -15
  117. package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +6 -4
  118. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
  119. package/dist/superdoc/src/internal/toolbar/built-in/ButtonGroup.vue.d.ts +4 -24
  120. package/dist/superdoc/src/internal/toolbar/built-in/FontFamilyCombobox.vue.d.ts +34 -0
  121. package/dist/superdoc/src/internal/toolbar/built-in/FontSizeCombobox.vue.d.ts +34 -0
  122. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +1 -1
  123. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +25 -15
  124. package/dist/superdoc/src/internal/toolbar/built-in/Toolbar.vue.d.ts +9 -3
  125. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +12 -14
  126. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +1 -11
  127. package/dist/superdoc/src/internal/toolbar/built-in/color-dropdown-helpers.d.ts +9 -19
  128. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +14 -45
  129. package/dist/superdoc/src/internal/toolbar/built-in/default-items.d.ts +34 -17
  130. package/dist/superdoc/src/internal/toolbar/built-in/font-options.d.ts +15 -1
  131. package/dist/superdoc/src/internal/toolbar/built-in/font-typeahead.d.ts +37 -7
  132. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +10 -4
  133. package/dist/superdoc/src/internal/toolbar/built-in/general.d.ts +12 -1
  134. package/dist/superdoc/src/internal/toolbar/built-in/helpers.d.ts +9 -4
  135. package/dist/superdoc/src/internal/toolbar/built-in/list-style-buttons.d.ts +2 -2
  136. package/dist/superdoc/src/internal/toolbar/built-in/page-number-feedback.d.ts +4 -5
  137. package/dist/superdoc/src/internal/toolbar/built-in/scroll-helpers.d.ts +3 -4
  138. package/dist/superdoc/src/internal/toolbar/built-in/toolbar-focus-helpers.d.ts +10 -2
  139. package/dist/superdoc/src/internal/toolbar/built-in/toolbarIcons.d.ts +78 -145
  140. package/dist/superdoc/src/internal/toolbar/built-in/toolbarTexts.d.ts +61 -61
  141. package/dist/superdoc/src/internal/toolbar/built-in/url-safety.d.ts +11 -3
  142. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +110 -48
  143. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +11 -30
  144. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +4 -3
  145. package/dist/superdoc/src/internal/toolbar/image-upload.d.ts +29 -39
  146. package/dist/superdoc/src/internal/toolbar/toolbar-item-aliases.d.ts +1 -1
  147. package/dist/superdoc/src/public/browser-document-api.d.ts +5 -4
  148. package/dist/superdoc/src/public/index.d.cts +26 -0
  149. package/dist/superdoc/src/public/index.d.ts +13 -0
  150. package/dist/superdoc/src/public/ui/commands.d.ts +14 -13
  151. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -1
  152. package/dist/superdoc/src/public/ui/entity-at.d.ts +2 -1
  153. package/dist/superdoc/src/public/ui/format-painter-helpers.d.ts +2 -8
  154. package/dist/superdoc/src/public/ui/style-match-patch.d.ts +2 -2
  155. package/dist/superdoc/src/public/ui/types.d.ts +1 -1
  156. package/dist/superdoc/src/stores/comments-store.d.ts +231 -105
  157. package/dist/superdoc/src/stores/helpers/comment-document-scope.d.ts +22 -0
  158. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +30 -0
  159. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +40 -0
  160. package/dist/superdoc/src/stores/helpers/floating-comment-instances.d.ts +48 -13
  161. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +17 -0
  162. package/dist/superdoc/src/stores/helpers/tracked-change-compaction.d.ts +16 -0
  163. package/dist/superdoc/src/stores/helpers/tracked-change-decision.d.ts +45 -0
  164. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +19 -0
  165. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +0 -4
  166. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +21 -24
  167. package/dist/superdoc/src/stores/superdoc-store.d.ts +694 -316
  168. package/dist/superdoc.cjs +1804 -2782
  169. package/dist/superdoc.es.js +1720 -2699
  170. package/dist-cdn/style.layered.css +1 -1
  171. package/dist-cdn/superdoc.min.css +1 -1
  172. package/dist-cdn/superdoc.min.js +42 -42
  173. package/package.json +3 -2
  174. package/dist/superdoc/src/internal/toolbar/index.d.ts +0 -10
  175. package/dist/superdoc/src/main.d.ts +0 -1
@@ -11,15 +11,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
11
11
  readonly CHANGE_ACCEPTED: "change-accepted";
12
12
  readonly CHANGE_REJECTED: "change-rejected";
13
13
  };
14
- isDebugging: boolean;
15
- hasInitializedComments: import('vue').Ref<boolean, boolean>;
16
14
  hasSyncedCollaborationComments: import('vue').Ref<boolean, boolean>;
17
15
  editingCommentId: import('vue').Ref<null, null>;
18
16
  activeComment: import('vue').Ref<null, null>;
19
17
  activeFloatingCommentInstanceId: import('vue').Ref<null, null>;
20
- commentDialogs: import('vue').Ref<never[], never[]>;
21
- overlappingComments: import('vue').Ref<never[], never[]>;
22
- overlappedIds: Set<never>;
23
18
  suppressInternalExternal: import('vue').Ref<boolean, boolean>;
24
19
  pendingComment: import('vue').Ref<null, null>;
25
20
  currentCommentText: import('vue').Ref<string, string>;
@@ -37,8 +32,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
37
32
  isCommentHighlighted: import('vue').Ref<boolean, boolean>;
38
33
  floatingCommentsOffset: import('vue').Ref<number, number>;
39
34
  committedReviewPresentations: import('vue').ShallowRef<{}, {}>;
40
- sortedConversations: import('vue').Ref<never[], never[]>;
41
- visibleConversations: import('vue').Ref<never[], never[]>;
42
35
  skipSelectionUpdate: import('vue').Ref<boolean, boolean>;
43
36
  isFloatingCommentsReady: import('vue').Ref<boolean, boolean>;
44
37
  instantSidebarAlignmentTargetY: import('vue').Ref<null, null>;
@@ -60,30 +53,46 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
60
53
  resolvedComments: any[];
61
54
  }>;
62
55
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
63
- getCommentsByPosition: import('vue').ComputedRef<{
64
- parentComments: any[];
65
- resolvedComments: any[];
66
- }>;
67
56
  getFloatingComments: import('vue').ComputedRef<any[]>;
68
57
  getFloatingCommentInstances: import('vue').ComputedRef<{
69
- id: any;
70
- threadId: any;
58
+ id: string;
59
+ threadId: string | null;
71
60
  comment: any;
72
- positionKey: any;
73
- pageIndex: any;
61
+ positionKey: string | null;
62
+ positionEntry: {
63
+ pageIndex?: number | null;
64
+ rects?: readonly ({
65
+ pageIndex?: number | null;
66
+ left?: number;
67
+ top?: number;
68
+ right?: number;
69
+ bottom?: number;
70
+ } | null | undefined)[] | null;
71
+ bounds?: Partial<{
72
+ left: number;
73
+ top: number;
74
+ right: number;
75
+ bottom: number;
76
+ width: number;
77
+ height: number;
78
+ }> | null;
79
+ } | null;
80
+ pageIndex: number | null;
74
81
  isPrimary: boolean;
75
- positionEntry: any;
76
82
  }[]>;
77
- getCommentAliasIds: (commentOrId: any) => (string | null)[];
83
+ getCommentAliasIds: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined) => string[];
78
84
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
79
- getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
85
+ getCommentPositionKey: (commentOrId: import('./helpers/comment-identity.js').CommentIdentityRow | string | null | undefined) => unknown;
80
86
  getCommentPosition: (commentOrId: Object | string) => Object | null;
81
- resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
82
- key: string | null;
83
- entry: any;
87
+ resolveCommentPositionEntry: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined, preferredId?: unknown) => {
88
+ key: string;
89
+ entry: import('./helpers/comment-identity.js').CommentPositionEntry;
90
+ } | {
91
+ key: null;
92
+ entry: null;
84
93
  };
85
- getCommentDocumentId: (comment: any) => string | null;
86
- belongsToDocument: (comment: any, activeDocumentId: any, options?: {}) => any;
94
+ getCommentDocumentId: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment) => string | null;
95
+ belongsToDocument: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment, activeDocumentId: string | null | undefined, options?: import('./helpers/comment-document-scope.js').BelongsToDocumentOptions) => boolean;
87
96
  viewingVisibility: {
88
97
  documentMode: string;
89
98
  commentsVisible: boolean;
@@ -93,13 +102,8 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
93
102
  shouldRenderReviewInViewing: import('vue').ComputedRef<boolean>;
94
103
  init: (config?: Object) => void;
95
104
  setViewingVisibility: ({ documentMode, commentsVisible, trackChangesVisible }?: {}) => void;
96
- getComment: (id: string) => Record<string, unknown> | null | undefined;
105
+ getComment: (id: unknown) => import('./helpers/comment-identity.js').CommentIdentityRow | null;
97
106
  setActiveComment: (superdoc: Object | undefined | null, id: string | undefined | null) => void;
98
- getCommentLocation: (selection: any, parent: any) => {
99
- top: any;
100
- left: any;
101
- };
102
- hasOverlapId: (id: any) => any;
103
107
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
104
108
  selection?: Object | undefined;
105
109
  documentId?: string | null | undefined;
@@ -188,11 +192,45 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
188
192
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
189
193
  setV2CommentsAdapter: (adapter: any) => void;
190
194
  getV2CommentsAdapter: (superdoc: any) => any;
191
- applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
195
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => {
196
+ ok: boolean;
197
+ geometryOnly: boolean;
198
+ commentItems?: undefined;
199
+ trackedItems?: undefined;
200
+ reason?: undefined;
201
+ detail?: undefined;
202
+ } | {
203
+ ok: boolean;
204
+ commentItems: any;
205
+ trackedItems: any;
206
+ geometryOnly?: undefined;
207
+ reason?: undefined;
208
+ detail?: undefined;
209
+ } | {
210
+ ok: boolean;
211
+ reason: any;
212
+ geometryOnly?: undefined;
213
+ commentItems?: undefined;
214
+ trackedItems?: undefined;
215
+ detail?: undefined;
216
+ } | {
217
+ ok: boolean;
218
+ reason: string;
219
+ detail: any;
220
+ geometryOnly?: undefined;
221
+ commentItems?: undefined;
222
+ trackedItems?: undefined;
223
+ };
192
224
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
193
225
  preparedInputs?: null | undefined;
194
226
  pruneStale?: boolean | undefined;
195
- }) => any;
227
+ }) => {
228
+ added: null;
229
+ dropped: string;
230
+ } | {
231
+ added: any;
232
+ dropped?: undefined;
233
+ };
196
234
  announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
197
235
  ok: boolean;
198
236
  reason: string;
@@ -226,7 +264,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
226
264
  kind: "trackedChange";
227
265
  trackedChangeId: string;
228
266
  story?: unknown;
229
- side?: "source" | "destination";
267
+ side?: import('./helpers/tracked-change-thread-index.js').TrackedChangeSideGroup;
230
268
  } | undefined;
231
269
  }) => Promise<any>;
232
270
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
@@ -255,7 +293,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
255
293
  resolvedIds: never[];
256
294
  unresolvedIds: never[];
257
295
  allResolved: boolean;
258
- removedRows: any;
296
+ removedRows: number;
259
297
  reason?: undefined;
260
298
  removedIds?: undefined;
261
299
  } | {
@@ -275,9 +313,13 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
275
313
  previousPreparedPresentation?: null | undefined;
276
314
  liveIds?: null | undefined;
277
315
  liveAnchorKeys?: null | undefined;
278
- }) => any;
316
+ }) => {
317
+ liveIds: Set<any>;
318
+ liveAnchorKeys: Set<any>;
319
+ appliedCount: number;
320
+ } | undefined;
279
321
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
280
- }, "COMMENT_EVENTS" | "isDebugging" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "editingCommentId" | "activeComment" | "activeFloatingCommentInstanceId" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "suppressInternalExternal" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "editorCommentPositions" | "hasInitializedLocations" | "isCommentHighlighted" | "floatingCommentsOffset" | "committedReviewPresentations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2CommentsAdapter" | "v2TrackedChangesAdapter">, Pick<{
322
+ }, "COMMENT_EVENTS" | "hasSyncedCollaborationComments" | "editingCommentId" | "activeComment" | "activeFloatingCommentInstanceId" | "suppressInternalExternal" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "editorCommentPositions" | "hasInitializedLocations" | "isCommentHighlighted" | "floatingCommentsOffset" | "committedReviewPresentations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2CommentsAdapter" | "v2TrackedChangesAdapter">, Pick<{
281
323
  COMMENT_EVENTS: {
282
324
  readonly RESOLVED: "resolved";
283
325
  readonly NEW: "new";
@@ -290,15 +332,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
290
332
  readonly CHANGE_ACCEPTED: "change-accepted";
291
333
  readonly CHANGE_REJECTED: "change-rejected";
292
334
  };
293
- isDebugging: boolean;
294
- hasInitializedComments: import('vue').Ref<boolean, boolean>;
295
335
  hasSyncedCollaborationComments: import('vue').Ref<boolean, boolean>;
296
336
  editingCommentId: import('vue').Ref<null, null>;
297
337
  activeComment: import('vue').Ref<null, null>;
298
338
  activeFloatingCommentInstanceId: import('vue').Ref<null, null>;
299
- commentDialogs: import('vue').Ref<never[], never[]>;
300
- overlappingComments: import('vue').Ref<never[], never[]>;
301
- overlappedIds: Set<never>;
302
339
  suppressInternalExternal: import('vue').Ref<boolean, boolean>;
303
340
  pendingComment: import('vue').Ref<null, null>;
304
341
  currentCommentText: import('vue').Ref<string, string>;
@@ -316,8 +353,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
316
353
  isCommentHighlighted: import('vue').Ref<boolean, boolean>;
317
354
  floatingCommentsOffset: import('vue').Ref<number, number>;
318
355
  committedReviewPresentations: import('vue').ShallowRef<{}, {}>;
319
- sortedConversations: import('vue').Ref<never[], never[]>;
320
- visibleConversations: import('vue').Ref<never[], never[]>;
321
356
  skipSelectionUpdate: import('vue').Ref<boolean, boolean>;
322
357
  isFloatingCommentsReady: import('vue').Ref<boolean, boolean>;
323
358
  instantSidebarAlignmentTargetY: import('vue').Ref<null, null>;
@@ -339,30 +374,46 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
339
374
  resolvedComments: any[];
340
375
  }>;
341
376
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
342
- getCommentsByPosition: import('vue').ComputedRef<{
343
- parentComments: any[];
344
- resolvedComments: any[];
345
- }>;
346
377
  getFloatingComments: import('vue').ComputedRef<any[]>;
347
378
  getFloatingCommentInstances: import('vue').ComputedRef<{
348
- id: any;
349
- threadId: any;
379
+ id: string;
380
+ threadId: string | null;
350
381
  comment: any;
351
- positionKey: any;
352
- pageIndex: any;
382
+ positionKey: string | null;
383
+ positionEntry: {
384
+ pageIndex?: number | null;
385
+ rects?: readonly ({
386
+ pageIndex?: number | null;
387
+ left?: number;
388
+ top?: number;
389
+ right?: number;
390
+ bottom?: number;
391
+ } | null | undefined)[] | null;
392
+ bounds?: Partial<{
393
+ left: number;
394
+ top: number;
395
+ right: number;
396
+ bottom: number;
397
+ width: number;
398
+ height: number;
399
+ }> | null;
400
+ } | null;
401
+ pageIndex: number | null;
353
402
  isPrimary: boolean;
354
- positionEntry: any;
355
403
  }[]>;
356
- getCommentAliasIds: (commentOrId: any) => (string | null)[];
404
+ getCommentAliasIds: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined) => string[];
357
405
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
358
- getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
406
+ getCommentPositionKey: (commentOrId: import('./helpers/comment-identity.js').CommentIdentityRow | string | null | undefined) => unknown;
359
407
  getCommentPosition: (commentOrId: Object | string) => Object | null;
360
- resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
361
- key: string | null;
362
- entry: any;
408
+ resolveCommentPositionEntry: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined, preferredId?: unknown) => {
409
+ key: string;
410
+ entry: import('./helpers/comment-identity.js').CommentPositionEntry;
411
+ } | {
412
+ key: null;
413
+ entry: null;
363
414
  };
364
- getCommentDocumentId: (comment: any) => string | null;
365
- belongsToDocument: (comment: any, activeDocumentId: any, options?: {}) => any;
415
+ getCommentDocumentId: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment) => string | null;
416
+ belongsToDocument: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment, activeDocumentId: string | null | undefined, options?: import('./helpers/comment-document-scope.js').BelongsToDocumentOptions) => boolean;
366
417
  viewingVisibility: {
367
418
  documentMode: string;
368
419
  commentsVisible: boolean;
@@ -372,13 +423,8 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
372
423
  shouldRenderReviewInViewing: import('vue').ComputedRef<boolean>;
373
424
  init: (config?: Object) => void;
374
425
  setViewingVisibility: ({ documentMode, commentsVisible, trackChangesVisible }?: {}) => void;
375
- getComment: (id: string) => Record<string, unknown> | null | undefined;
426
+ getComment: (id: unknown) => import('./helpers/comment-identity.js').CommentIdentityRow | null;
376
427
  setActiveComment: (superdoc: Object | undefined | null, id: string | undefined | null) => void;
377
- getCommentLocation: (selection: any, parent: any) => {
378
- top: any;
379
- left: any;
380
- };
381
- hasOverlapId: (id: any) => any;
382
428
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
383
429
  selection?: Object | undefined;
384
430
  documentId?: string | null | undefined;
@@ -467,11 +513,45 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
467
513
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
468
514
  setV2CommentsAdapter: (adapter: any) => void;
469
515
  getV2CommentsAdapter: (superdoc: any) => any;
470
- applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
516
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => {
517
+ ok: boolean;
518
+ geometryOnly: boolean;
519
+ commentItems?: undefined;
520
+ trackedItems?: undefined;
521
+ reason?: undefined;
522
+ detail?: undefined;
523
+ } | {
524
+ ok: boolean;
525
+ commentItems: any;
526
+ trackedItems: any;
527
+ geometryOnly?: undefined;
528
+ reason?: undefined;
529
+ detail?: undefined;
530
+ } | {
531
+ ok: boolean;
532
+ reason: any;
533
+ geometryOnly?: undefined;
534
+ commentItems?: undefined;
535
+ trackedItems?: undefined;
536
+ detail?: undefined;
537
+ } | {
538
+ ok: boolean;
539
+ reason: string;
540
+ detail: any;
541
+ geometryOnly?: undefined;
542
+ commentItems?: undefined;
543
+ trackedItems?: undefined;
544
+ };
471
545
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
472
546
  preparedInputs?: null | undefined;
473
547
  pruneStale?: boolean | undefined;
474
- }) => any;
548
+ }) => {
549
+ added: null;
550
+ dropped: string;
551
+ } | {
552
+ added: any;
553
+ dropped?: undefined;
554
+ };
475
555
  announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
476
556
  ok: boolean;
477
557
  reason: string;
@@ -505,7 +585,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
505
585
  kind: "trackedChange";
506
586
  trackedChangeId: string;
507
587
  story?: unknown;
508
- side?: "source" | "destination";
588
+ side?: import('./helpers/tracked-change-thread-index.js').TrackedChangeSideGroup;
509
589
  } | undefined;
510
590
  }) => Promise<any>;
511
591
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
@@ -534,7 +614,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
534
614
  resolvedIds: never[];
535
615
  unresolvedIds: never[];
536
616
  allResolved: boolean;
537
- removedRows: any;
617
+ removedRows: number;
538
618
  reason?: undefined;
539
619
  removedIds?: undefined;
540
620
  } | {
@@ -554,9 +634,13 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
554
634
  previousPreparedPresentation?: null | undefined;
555
635
  liveIds?: null | undefined;
556
636
  liveAnchorKeys?: null | undefined;
557
- }) => any;
637
+ }) => {
638
+ liveIds: Set<any>;
639
+ liveAnchorKeys: Set<any>;
640
+ appliedCount: number;
641
+ } | undefined;
558
642
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
559
- }, "getConfig" | "documentsWithConverations" | "getGroupedComments" | "getGroupedReviewDirectory" | "hasOpenTrackedChanges" | "getCommentsByPosition" | "getFloatingComments" | "getFloatingCommentInstances" | "isViewingMode" | "shouldRenderReviewInViewing">, Pick<{
643
+ }, "getConfig" | "documentsWithConverations" | "getGroupedComments" | "getGroupedReviewDirectory" | "hasOpenTrackedChanges" | "getFloatingComments" | "getFloatingCommentInstances" | "isViewingMode" | "shouldRenderReviewInViewing">, Pick<{
560
644
  COMMENT_EVENTS: {
561
645
  readonly RESOLVED: "resolved";
562
646
  readonly NEW: "new";
@@ -569,15 +653,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
569
653
  readonly CHANGE_ACCEPTED: "change-accepted";
570
654
  readonly CHANGE_REJECTED: "change-rejected";
571
655
  };
572
- isDebugging: boolean;
573
- hasInitializedComments: import('vue').Ref<boolean, boolean>;
574
656
  hasSyncedCollaborationComments: import('vue').Ref<boolean, boolean>;
575
657
  editingCommentId: import('vue').Ref<null, null>;
576
658
  activeComment: import('vue').Ref<null, null>;
577
659
  activeFloatingCommentInstanceId: import('vue').Ref<null, null>;
578
- commentDialogs: import('vue').Ref<never[], never[]>;
579
- overlappingComments: import('vue').Ref<never[], never[]>;
580
- overlappedIds: Set<never>;
581
660
  suppressInternalExternal: import('vue').Ref<boolean, boolean>;
582
661
  pendingComment: import('vue').Ref<null, null>;
583
662
  currentCommentText: import('vue').Ref<string, string>;
@@ -595,8 +674,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
595
674
  isCommentHighlighted: import('vue').Ref<boolean, boolean>;
596
675
  floatingCommentsOffset: import('vue').Ref<number, number>;
597
676
  committedReviewPresentations: import('vue').ShallowRef<{}, {}>;
598
- sortedConversations: import('vue').Ref<never[], never[]>;
599
- visibleConversations: import('vue').Ref<never[], never[]>;
600
677
  skipSelectionUpdate: import('vue').Ref<boolean, boolean>;
601
678
  isFloatingCommentsReady: import('vue').Ref<boolean, boolean>;
602
679
  instantSidebarAlignmentTargetY: import('vue').Ref<null, null>;
@@ -618,30 +695,46 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
618
695
  resolvedComments: any[];
619
696
  }>;
620
697
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
621
- getCommentsByPosition: import('vue').ComputedRef<{
622
- parentComments: any[];
623
- resolvedComments: any[];
624
- }>;
625
698
  getFloatingComments: import('vue').ComputedRef<any[]>;
626
699
  getFloatingCommentInstances: import('vue').ComputedRef<{
627
- id: any;
628
- threadId: any;
700
+ id: string;
701
+ threadId: string | null;
629
702
  comment: any;
630
- positionKey: any;
631
- pageIndex: any;
703
+ positionKey: string | null;
704
+ positionEntry: {
705
+ pageIndex?: number | null;
706
+ rects?: readonly ({
707
+ pageIndex?: number | null;
708
+ left?: number;
709
+ top?: number;
710
+ right?: number;
711
+ bottom?: number;
712
+ } | null | undefined)[] | null;
713
+ bounds?: Partial<{
714
+ left: number;
715
+ top: number;
716
+ right: number;
717
+ bottom: number;
718
+ width: number;
719
+ height: number;
720
+ }> | null;
721
+ } | null;
722
+ pageIndex: number | null;
632
723
  isPrimary: boolean;
633
- positionEntry: any;
634
724
  }[]>;
635
- getCommentAliasIds: (commentOrId: any) => (string | null)[];
725
+ getCommentAliasIds: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined) => string[];
636
726
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
637
- getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
727
+ getCommentPositionKey: (commentOrId: import('./helpers/comment-identity.js').CommentIdentityRow | string | null | undefined) => unknown;
638
728
  getCommentPosition: (commentOrId: Object | string) => Object | null;
639
- resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
640
- key: string | null;
641
- entry: any;
729
+ resolveCommentPositionEntry: (commentOrId: string | number | import('./helpers/comment-identity.js').CommentIdentityRow | null | undefined, preferredId?: unknown) => {
730
+ key: string;
731
+ entry: import('./helpers/comment-identity.js').CommentPositionEntry;
732
+ } | {
733
+ key: null;
734
+ entry: null;
642
735
  };
643
- getCommentDocumentId: (comment: any) => string | null;
644
- belongsToDocument: (comment: any, activeDocumentId: any, options?: {}) => any;
736
+ getCommentDocumentId: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment) => string | null;
737
+ belongsToDocument: (comment: import('./helpers/comment-document-scope.js').DocumentScopedComment, activeDocumentId: string | null | undefined, options?: import('./helpers/comment-document-scope.js').BelongsToDocumentOptions) => boolean;
645
738
  viewingVisibility: {
646
739
  documentMode: string;
647
740
  commentsVisible: boolean;
@@ -651,13 +744,8 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
651
744
  shouldRenderReviewInViewing: import('vue').ComputedRef<boolean>;
652
745
  init: (config?: Object) => void;
653
746
  setViewingVisibility: ({ documentMode, commentsVisible, trackChangesVisible }?: {}) => void;
654
- getComment: (id: string) => Record<string, unknown> | null | undefined;
747
+ getComment: (id: unknown) => import('./helpers/comment-identity.js').CommentIdentityRow | null;
655
748
  setActiveComment: (superdoc: Object | undefined | null, id: string | undefined | null) => void;
656
- getCommentLocation: (selection: any, parent: any) => {
657
- top: any;
658
- left: any;
659
- };
660
- hasOverlapId: (id: any) => any;
661
749
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
662
750
  selection?: Object | undefined;
663
751
  documentId?: string | null | undefined;
@@ -746,11 +834,45 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
746
834
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
747
835
  setV2CommentsAdapter: (adapter: any) => void;
748
836
  getV2CommentsAdapter: (superdoc: any) => any;
749
- applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
837
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, preparedReview, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => {
838
+ ok: boolean;
839
+ geometryOnly: boolean;
840
+ commentItems?: undefined;
841
+ trackedItems?: undefined;
842
+ reason?: undefined;
843
+ detail?: undefined;
844
+ } | {
845
+ ok: boolean;
846
+ commentItems: any;
847
+ trackedItems: any;
848
+ geometryOnly?: undefined;
849
+ reason?: undefined;
850
+ detail?: undefined;
851
+ } | {
852
+ ok: boolean;
853
+ reason: any;
854
+ geometryOnly?: undefined;
855
+ commentItems?: undefined;
856
+ trackedItems?: undefined;
857
+ detail?: undefined;
858
+ } | {
859
+ ok: boolean;
860
+ reason: string;
861
+ detail: any;
862
+ geometryOnly?: undefined;
863
+ commentItems?: undefined;
864
+ trackedItems?: undefined;
865
+ };
750
866
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
751
867
  preparedInputs?: null | undefined;
752
868
  pruneStale?: boolean | undefined;
753
- }) => any;
869
+ }) => {
870
+ added: null;
871
+ dropped: string;
872
+ } | {
873
+ added: any;
874
+ dropped?: undefined;
875
+ };
754
876
  announceV2CommentCreated: ({ superdoc, commentId }?: {}) => Promise<{
755
877
  ok: boolean;
756
878
  reason: string;
@@ -784,7 +906,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
784
906
  kind: "trackedChange";
785
907
  trackedChangeId: string;
786
908
  story?: unknown;
787
- side?: "source" | "destination";
909
+ side?: import('./helpers/tracked-change-thread-index.js').TrackedChangeSideGroup;
788
910
  } | undefined;
789
911
  }) => Promise<any>;
790
912
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
@@ -813,7 +935,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
813
935
  resolvedIds: never[];
814
936
  unresolvedIds: never[];
815
937
  allResolved: boolean;
816
- removedRows: any;
938
+ removedRows: number;
817
939
  reason?: undefined;
818
940
  removedIds?: undefined;
819
941
  } | {
@@ -833,6 +955,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
833
955
  previousPreparedPresentation?: null | undefined;
834
956
  liveIds?: null | undefined;
835
957
  liveAnchorKeys?: null | undefined;
836
- }) => any;
958
+ }) => {
959
+ liveIds: Set<any>;
960
+ liveAnchorKeys: Set<any>;
961
+ appliedCount: number;
962
+ } | undefined;
837
963
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
838
- }, "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">>;
964
+ }, "resolveCommentPositionEntry" | "getCommentAliasIds" | "getCommentPositionKey" | "belongsToDocument" | "getComment" | "getTrackedChangeThread" | "getCommentPosition" | "getCommentDocumentId" | "init" | "setViewingVisibility" | "setActiveComment" | "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">>;
@@ -0,0 +1,22 @@
1
+ export type DocumentScopedComment = {
2
+ fileId?: unknown;
3
+ documentId?: unknown;
4
+ selection?: {
5
+ documentId?: unknown;
6
+ } | null;
7
+ } | null | undefined;
8
+ type OpenDocument = {
9
+ id?: unknown;
10
+ } | null | undefined;
11
+ export type OpenDocumentsSource = OpenDocument[] | {
12
+ value?: OpenDocument[] | null;
13
+ } | null | undefined;
14
+ export type BelongsToDocumentOptions = {
15
+ allowSingleDocumentMismatch?: boolean;
16
+ };
17
+ export declare const getCommentDocumentId: (comment: DocumentScopedComment) => string | null;
18
+ export declare const createCommentDocumentScope: (readOpenDocuments: () => OpenDocumentsSource) => {
19
+ belongsToDocument: (comment: DocumentScopedComment, activeDocumentId: string | null | undefined, options?: BelongsToDocumentOptions) => boolean;
20
+ belongsToTrackedChangeSyncDocument: (comment: DocumentScopedComment, activeDocumentId: string | null | undefined) => boolean;
21
+ };
22
+ export {};
@@ -0,0 +1,30 @@
1
+ type CommentId = string | number;
2
+ export type GroupableComment = {
3
+ commentId: CommentId;
4
+ fileId?: CommentId | null;
5
+ parentCommentId?: CommentId | null;
6
+ threadingParentCommentId?: CommentId | null;
7
+ trackedChange?: boolean;
8
+ trackedChangeCanonicalId?: CommentId | null;
9
+ trackedChangeSide?: string | null;
10
+ trackedChangeParentId?: CommentId | null;
11
+ trackedChangeThreadParentId?: CommentId | null;
12
+ semanticColorKey?: string | null;
13
+ createdTime?: number | null;
14
+ resolvedTime?: number | null;
15
+ };
16
+ type GroupedComments<Comment> = {
17
+ parentComments: Comment[];
18
+ resolvedComments: Comment[];
19
+ };
20
+ type CommittedReviewPresentation = {
21
+ groupOrder: {
22
+ open: readonly CommentId[];
23
+ resolved: readonly CommentId[];
24
+ };
25
+ };
26
+ type CommittedReviewPresentations = Readonly<Record<string, CommittedReviewPresentation>>;
27
+ export declare const groupComments: <Comment extends GroupableComment>(source: readonly Comment[], isVisible: (comment: Comment) => boolean) => GroupedComments<Comment>;
28
+ export declare const groupCommittedComments: <Comment extends GroupableComment>(comments: readonly Comment[], presentations: CommittedReviewPresentations, isVisible: (comment: Comment) => boolean) => GroupedComments<Comment>;
29
+ export declare const hasOpenTrackedChange: ({ parentComments }: GroupedComments<GroupableComment>) => boolean;
30
+ export {};
@@ -0,0 +1,40 @@
1
+ export type CommentIdentityRow = Record<string, unknown>;
2
+ type PositionBounds = {
3
+ left?: number;
4
+ right?: number;
5
+ top?: number;
6
+ bottom?: number;
7
+ };
8
+ export type CommentPositionEntry = {
9
+ key?: unknown;
10
+ threadId?: unknown;
11
+ kind?: string;
12
+ storyKey?: string;
13
+ pageIndex?: number | null;
14
+ start?: number;
15
+ end?: number;
16
+ bounds?: PositionBounds | null;
17
+ } | null;
18
+ export type CommentPositions = Record<string, CommentPositionEntry | undefined>;
19
+ type PositionMatch = {
20
+ key: string;
21
+ entry: CommentPositionEntry;
22
+ } | {
23
+ key: null;
24
+ entry: null;
25
+ };
26
+ type CommentIdentitySources = {
27
+ getComments: () => CommentIdentityRow[];
28
+ getReviewDirectory: () => CommentIdentityRow[];
29
+ getPositions: () => CommentPositions | null | undefined;
30
+ };
31
+ type CommentReference = CommentIdentityRow | string | number | null | undefined;
32
+ export declare const trackedChangeThreadParentIdForComment: (comment: CommentIdentityRow | null | undefined) => unknown;
33
+ export declare const createCommentIdentity: ({ getComments, getReviewDirectory, getPositions }: CommentIdentitySources) => {
34
+ getComment: (id: unknown) => CommentIdentityRow | null;
35
+ getThreadParent: (comment: CommentIdentityRow | null | undefined) => CommentIdentityRow | null | undefined;
36
+ getCommentPositionKey: (commentOrId: CommentIdentityRow | string | null | undefined) => unknown;
37
+ getCommentAliasIds: (commentOrId: CommentReference) => string[];
38
+ resolveCommentPositionEntry: (commentOrId: CommentReference, preferredId?: unknown) => PositionMatch;
39
+ };
40
+ export {};