superdoc 2.28.0-next.9 → 2.29.0-next.1

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 (94) hide show
  1. package/dist/chunks/{FindReplaceSurface-8V8AjgR4.cjs → FindReplaceSurface-BRs3JrCq.cjs} +1 -1
  2. package/dist/chunks/{FindReplaceSurface-RUiTFDt3.es.js → FindReplaceSurface-Dm043CZP.es.js} +1 -1
  3. package/dist/chunks/{PasswordPromptSurface-B5DHV6qr.cjs → PasswordPromptSurface-BpqP4pUa.cjs} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-BDpxqdzp.es.js → PasswordPromptSurface-DGjmN7A-.es.js} +1 -1
  5. package/dist/chunks/{PdfViewer-DjdsIh6n.es.js → PdfViewer-D4lVeOJu.es.js} +4 -3
  6. package/dist/chunks/{PdfViewer-omriDChK.cjs → PdfViewer-boENOZdF.cjs} +4 -3
  7. package/dist/chunks/{_plugin-vue_export-helper-BUdjGKyl.cjs → _plugin-vue_export-helper-6MBoygIY.cjs} +9 -0
  8. package/dist/chunks/{_plugin-vue_export-helper-7ZiLY07t.es.js → _plugin-vue_export-helper-CsJQtMvr.es.js} +4 -1
  9. package/dist/chunks/{create-super-doc-ui-B4c55pFy.cjs → create-super-doc-ui-0OA8hCNb.cjs} +390 -44
  10. package/dist/chunks/{create-super-doc-ui-C4Ka5Ph3.es.js → create-super-doc-ui-Duf65d0b.es.js} +357 -41
  11. package/dist/chunks/is-finite-number-BEXgTRgc.cjs +11 -0
  12. package/dist/chunks/is-finite-number-BpL4F38c.es.js +6 -0
  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 +3 -3
  16. package/dist/document-api/src/contract/operation-definitions.d.ts +2 -2
  17. package/dist/document-api/src/index.d.ts +1 -1
  18. package/dist/document-api/src/lists/lists.d.ts +79 -79
  19. package/dist/document-api/src/lists/lists.types.d.ts +1 -0
  20. package/dist/document-api/src/sections/sections.types.d.ts +5 -1
  21. package/dist/document-api/src/types/clipboard.d.ts +5 -1
  22. package/dist/document-api/src/types/receipt.d.ts +2 -1
  23. package/dist/document-api/src/write/write.d.ts +10 -9
  24. package/dist/layout-engine/contracts/src/index.d.ts +5 -1
  25. package/dist/layout-engine/contracts/src/run-helpers.d.ts +1 -0
  26. package/dist/layout-engine/layout-bridge/src/index.d.ts +1 -0
  27. package/dist/layout-engine/layout-bridge/src/place-inline-drawings.d.ts +9 -0
  28. package/dist/layout-engine/layout-engine/src/layout-drawing.d.ts +2 -1
  29. package/dist/layout-engine/layout-engine/src/paginator.d.ts +1 -0
  30. package/dist/layout-engine/painters/dom/src/page-content.d.ts +1 -1
  31. package/dist/layout-engine/painters/dom/src/persistent-page-surface.d.ts +2 -0
  32. package/dist/layout-engine/style-engine/src/ooxml/index.d.ts +1 -1
  33. package/dist/public/ui-react.cjs +1 -1
  34. package/dist/public/ui-react.es.js +1 -1
  35. package/dist/public/ui-vue.cjs +1 -1
  36. package/dist/public/ui-vue.es.js +1 -1
  37. package/dist/public/ui.cjs +3 -2
  38. package/dist/public/ui.es.js +3 -2
  39. package/dist/shared/font-system/src/resolver.d.ts +3 -3
  40. package/dist/style.css +1 -1
  41. package/dist/style.layered.css +1 -1
  42. package/dist/superdoc/src/SuperDoc.vue.d.ts +5 -3
  43. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +1670 -24
  44. package/dist/superdoc/src/components/CommentsLayer/CommentHeader.vue.d.ts +2 -2
  45. package/dist/superdoc/src/components/CommentsLayer/CommentInput.vue.d.ts +2 -2
  46. package/dist/superdoc/src/components/CommentsLayer/FloatingComments.vue.d.ts +24 -0
  47. package/dist/superdoc/src/components/CommentsLayer/PdfCommentsLayer.vue.d.ts +4 -0
  48. package/dist/superdoc/src/components/general/Avatar.vue.d.ts +7 -0
  49. package/dist/superdoc/src/components/surfaces/SurfaceDialog.vue.d.ts +27 -9
  50. package/dist/superdoc/src/components/surfaces/SurfaceExternalMount.vue.d.ts +53 -16
  51. package/dist/superdoc/src/composables/use-high-contrast-mode.d.ts +8 -4
  52. package/dist/superdoc/src/composables/use-link-popover.d.ts +3 -3
  53. package/dist/superdoc/src/composables/use-superdoc-instance.d.ts +10 -0
  54. package/dist/superdoc/src/core/SuperDoc.d.ts +2 -6
  55. package/dist/superdoc/src/core/collaboration/helpers.d.ts +0 -5
  56. package/dist/superdoc/src/core/collaboration/permissions.d.ts +1 -0
  57. package/dist/superdoc/src/core/collaboration/resolve-v2-collaboration-target.d.ts +2 -1
  58. package/dist/superdoc/src/core/create-app.d.ts +2 -6
  59. package/dist/superdoc/src/core/editor-runtime/types.d.ts +2 -0
  60. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +2 -0
  61. package/dist/superdoc/src/core/types/index.d.ts +10 -4
  62. package/dist/superdoc/src/core/v2-integration/internal-vue-runtime.d.ts +1 -0
  63. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +104 -84
  64. package/dist/superdoc/src/helpers/is-finite-number.d.ts +1 -0
  65. package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +2 -0
  66. package/dist/superdoc/src/internal/diagnostics/diagnostic-dedupe.d.ts +2 -2
  67. package/dist/superdoc/src/internal/diagnostics/translate-diagnostic.d.ts +5 -0
  68. package/dist/superdoc/src/internal/toolbar/built-in/AIWriter.vue.d.ts +2 -2
  69. package/dist/superdoc/src/internal/toolbar/built-in/LinkInput.vue.d.ts +181 -36
  70. package/dist/superdoc/src/internal/toolbar/built-in/LinkedStyle.vue.d.ts +39 -10
  71. package/dist/superdoc/src/internal/toolbar/built-in/PageNumberMenu.vue.d.ts +133 -22
  72. package/dist/superdoc/src/internal/toolbar/built-in/SdTooltip.vue.d.ts +62 -23
  73. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +101 -16
  74. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButtonIcon.vue.d.ts +31 -10
  75. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarComboBox.vue.d.ts +82 -11
  76. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarDropdown.vue.d.ts +122 -33
  77. package/dist/superdoc/src/internal/toolbar/built-in/constants.d.ts +0 -48
  78. package/dist/superdoc/src/internal/toolbar/built-in/use-toolbar-item.d.ts +0 -1
  79. package/dist/superdoc/src/internal/toolbar/built-in-toolbar.d.ts +4 -1
  80. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +16 -0
  81. package/dist/superdoc/src/public/ui/types.d.ts +39 -1
  82. package/dist/superdoc/src/public/ui.d.cts +12 -0
  83. package/dist/superdoc/src/public/ui.d.ts +1 -1
  84. package/dist/superdoc/src/stores/comments-store.d.ts +158 -125
  85. package/dist/superdoc/src/stores/superdoc-store.d.ts +475 -376
  86. package/dist/superdoc.cjs +561 -1843
  87. package/dist/superdoc.es.js +766 -13144
  88. package/dist-cdn/style.layered.css +1 -1
  89. package/dist-cdn/superdoc.min.css +1 -1
  90. package/dist-cdn/superdoc.min.js +42 -42
  91. package/package.json +4 -3
  92. package/dist/superdoc/src/core/collaboration/collaboration.d.ts +0 -18
  93. package/dist/superdoc/src/helpers/group-changes.d.ts +0 -1
  94. package/dist/superdoc/src/internal/toolbar/built-in/OverflowMenu.vue.d.ts +0 -104
@@ -78,17 +78,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
78
78
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
79
79
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
80
80
  getCommentPosition: (commentOrId: Object | string) => Object | null;
81
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
82
- separator?: string | undefined;
83
- trim?: boolean | undefined;
84
- }) => string | null;
85
- getCommentAnchorData: (commentOrId: Object | string, options?: {
86
- separator?: string | undefined;
87
- trim?: boolean | undefined;
88
- }) => {
89
- position: Object;
90
- anchoredText: string | null;
91
- } | null;
92
81
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
93
82
  key: string | null;
94
83
  entry: any;
@@ -112,30 +101,49 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
112
101
  };
113
102
  hasOverlapId: (id: any) => any;
114
103
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
115
- selection: Object;
116
- documentId: string;
117
- parentCommentId: string;
118
- }) => Object;
104
+ selection?: Object | undefined;
105
+ documentId?: string | null | undefined;
106
+ parentCommentId?: string | null | undefined;
107
+ }) => ReturnType<typeof useComment>;
119
108
  showAddComment: (superdoc: any, targetClientY?: null) => any;
120
109
  addComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
121
110
  superdoc: any;
122
111
  comment: any;
123
112
  skipEditorUpdate?: boolean | undefined;
124
113
  broadcastChanges?: boolean | undefined;
125
- }) => void;
114
+ }) => {
115
+ ok: boolean;
116
+ reason?: string;
117
+ detail?: string;
118
+ code?: string;
119
+ } | Promise<{
120
+ ok: boolean;
121
+ reason?: string;
122
+ detail?: string;
123
+ code?: string;
124
+ }>;
126
125
  addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
127
126
  superdoc: any;
128
127
  comment: any;
129
128
  skipEditorUpdate?: boolean | undefined;
130
129
  broadcastChanges?: boolean | undefined;
131
- }) => void;
130
+ }) => {
131
+ ok: boolean;
132
+ reason?: string;
133
+ detail?: string;
134
+ code?: string;
135
+ } | Promise<{
136
+ ok: boolean;
137
+ reason?: string;
138
+ detail?: string;
139
+ code?: string;
140
+ }>;
132
141
  cancelComment: (superdoc: any) => void;
133
142
  deleteComment: ({ commentId: commentIdToDelete, superdoc }: {
134
143
  commentId: any;
135
144
  superdoc: any;
136
145
  }) => Promise<any>;
137
146
  removePendingComment: (superdoc: any) => void;
138
- cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
139
147
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
140
148
  setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
141
149
  commentItems?: never[] | undefined;
@@ -150,42 +158,33 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
150
158
  reason?: undefined;
151
159
  };
152
160
  clearReviewDirectory: () => void;
153
- processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
154
- comments: any[];
155
- documentId: string;
156
- replacedFile?: boolean | undefined;
157
- }) => void;
158
- translateCommentsForExport: () => any[];
159
161
  handleEditorLocationsUpdate: (allCommentPositions: Object, options?: {
160
162
  retainMissingTrackedChangeGeometry?: boolean;
161
163
  retainedTrackedChangeIds?: Iterable<string>;
162
164
  }) => void;
163
165
  clearEditorCommentPositions: () => void;
164
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
166
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
165
167
  superdoc: Object;
166
168
  params: Object;
167
169
  }) => void;
168
- refreshTrackedChangeCommentsByIds: ({ superdoc, editor, changeIds, broadcastChanges }: {
169
- superdoc: any;
170
- editor: any;
171
- changeIds: any;
172
- broadcastChanges?: boolean | undefined;
173
- }) => void;
174
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
175
- syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
170
+ syncResolvedCommentsWithDocument: () => number;
176
171
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
177
172
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
178
173
  peekInstantSidebarAlignment: () => null;
179
174
  clearInstantSidebarAlignment: () => void;
180
- syncTrackedChangeComments: ({ superdoc, editor, broadcastChanges }: {
181
- superdoc: any;
182
- editor: any;
183
- broadcastChanges?: boolean | undefined;
184
- }) => void;
185
175
  decideTrackedChangeFromSidebar: ({ superdoc, comment, decision }: {
186
176
  superdoc: Object;
187
- editor: Object;
188
- }) => void;
177
+ comment: Object;
178
+ decision: string;
179
+ }) => {
180
+ ok: boolean;
181
+ success?: boolean;
182
+ reason?: string;
183
+ } | Promise<{
184
+ ok: boolean;
185
+ success?: boolean;
186
+ reason?: string;
187
+ }>;
189
188
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
190
189
  setV2CommentsAdapter: (adapter: any) => void;
191
190
  getV2CommentsAdapter: (superdoc: any) => any;
@@ -216,7 +215,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
216
215
  };
217
216
  isV2EditorActive: (superdoc: any) => boolean;
218
217
  replyCommentV2: ({ superdoc, parentCommentId, text, mentions, trackedChangeTarget }?: {
219
- mentions?: never[] | undefined;
218
+ superdoc?: Object | undefined;
219
+ parentCommentId?: string | null | undefined;
220
+ text?: string | undefined;
221
+ mentions?: {
222
+ name?: string | null;
223
+ email?: string | null;
224
+ }[] | undefined;
225
+ trackedChangeTarget?: {
226
+ kind: "trackedChange";
227
+ trackedChangeId: string;
228
+ story?: unknown;
229
+ side?: "source" | "destination";
230
+ } | undefined;
220
231
  }) => Promise<any>;
221
232
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
222
233
  resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
@@ -266,7 +277,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
266
277
  liveAnchorKeys?: null | undefined;
267
278
  }) => any;
268
279
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
269
- }, "suppressInternalExternal" | "activeComment" | "activeFloatingCommentInstanceId" | "floatingCommentsOffset" | "pendingComment" | "currentCommentText" | "currentCommentMentions" | "isDebugging" | "editingCommentId" | "editorCommentPositions" | "isCommentHighlighted" | "v2CommentsAdapter" | "COMMENT_EVENTS" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "hasInitializedLocations" | "committedReviewPresentations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2TrackedChangesAdapter">, Pick<{
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<{
270
281
  COMMENT_EVENTS: {
271
282
  readonly RESOLVED: "resolved";
272
283
  readonly NEW: "new";
@@ -346,17 +357,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
346
357
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
347
358
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
348
359
  getCommentPosition: (commentOrId: Object | string) => Object | null;
349
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
350
- separator?: string | undefined;
351
- trim?: boolean | undefined;
352
- }) => string | null;
353
- getCommentAnchorData: (commentOrId: Object | string, options?: {
354
- separator?: string | undefined;
355
- trim?: boolean | undefined;
356
- }) => {
357
- position: Object;
358
- anchoredText: string | null;
359
- } | null;
360
360
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
361
361
  key: string | null;
362
362
  entry: any;
@@ -380,30 +380,49 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
380
380
  };
381
381
  hasOverlapId: (id: any) => any;
382
382
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
383
- selection: Object;
384
- documentId: string;
385
- parentCommentId: string;
386
- }) => Object;
383
+ selection?: Object | undefined;
384
+ documentId?: string | null | undefined;
385
+ parentCommentId?: string | null | undefined;
386
+ }) => ReturnType<typeof useComment>;
387
387
  showAddComment: (superdoc: any, targetClientY?: null) => any;
388
388
  addComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
389
389
  superdoc: any;
390
390
  comment: any;
391
391
  skipEditorUpdate?: boolean | undefined;
392
392
  broadcastChanges?: boolean | undefined;
393
- }) => void;
393
+ }) => {
394
+ ok: boolean;
395
+ reason?: string;
396
+ detail?: string;
397
+ code?: string;
398
+ } | Promise<{
399
+ ok: boolean;
400
+ reason?: string;
401
+ detail?: string;
402
+ code?: string;
403
+ }>;
394
404
  addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
395
405
  superdoc: any;
396
406
  comment: any;
397
407
  skipEditorUpdate?: boolean | undefined;
398
408
  broadcastChanges?: boolean | undefined;
399
- }) => void;
409
+ }) => {
410
+ ok: boolean;
411
+ reason?: string;
412
+ detail?: string;
413
+ code?: string;
414
+ } | Promise<{
415
+ ok: boolean;
416
+ reason?: string;
417
+ detail?: string;
418
+ code?: string;
419
+ }>;
400
420
  cancelComment: (superdoc: any) => void;
401
421
  deleteComment: ({ commentId: commentIdToDelete, superdoc }: {
402
422
  commentId: any;
403
423
  superdoc: any;
404
424
  }) => Promise<any>;
405
425
  removePendingComment: (superdoc: any) => void;
406
- cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
407
426
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
408
427
  setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
409
428
  commentItems?: never[] | undefined;
@@ -418,42 +437,33 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
418
437
  reason?: undefined;
419
438
  };
420
439
  clearReviewDirectory: () => void;
421
- processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
422
- comments: any[];
423
- documentId: string;
424
- replacedFile?: boolean | undefined;
425
- }) => void;
426
- translateCommentsForExport: () => any[];
427
440
  handleEditorLocationsUpdate: (allCommentPositions: Object, options?: {
428
441
  retainMissingTrackedChangeGeometry?: boolean;
429
442
  retainedTrackedChangeIds?: Iterable<string>;
430
443
  }) => void;
431
444
  clearEditorCommentPositions: () => void;
432
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
445
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
433
446
  superdoc: Object;
434
447
  params: Object;
435
448
  }) => void;
436
- refreshTrackedChangeCommentsByIds: ({ superdoc, editor, changeIds, broadcastChanges }: {
437
- superdoc: any;
438
- editor: any;
439
- changeIds: any;
440
- broadcastChanges?: boolean | undefined;
441
- }) => void;
442
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
443
- syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
449
+ syncResolvedCommentsWithDocument: () => number;
444
450
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
445
451
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
446
452
  peekInstantSidebarAlignment: () => null;
447
453
  clearInstantSidebarAlignment: () => void;
448
- syncTrackedChangeComments: ({ superdoc, editor, broadcastChanges }: {
449
- superdoc: any;
450
- editor: any;
451
- broadcastChanges?: boolean | undefined;
452
- }) => void;
453
454
  decideTrackedChangeFromSidebar: ({ superdoc, comment, decision }: {
454
455
  superdoc: Object;
455
- editor: Object;
456
- }) => void;
456
+ comment: Object;
457
+ decision: string;
458
+ }) => {
459
+ ok: boolean;
460
+ success?: boolean;
461
+ reason?: string;
462
+ } | Promise<{
463
+ ok: boolean;
464
+ success?: boolean;
465
+ reason?: string;
466
+ }>;
457
467
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
458
468
  setV2CommentsAdapter: (adapter: any) => void;
459
469
  getV2CommentsAdapter: (superdoc: any) => any;
@@ -484,7 +494,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
484
494
  };
485
495
  isV2EditorActive: (superdoc: any) => boolean;
486
496
  replyCommentV2: ({ superdoc, parentCommentId, text, mentions, trackedChangeTarget }?: {
487
- mentions?: never[] | undefined;
497
+ superdoc?: Object | undefined;
498
+ parentCommentId?: string | null | undefined;
499
+ text?: string | undefined;
500
+ mentions?: {
501
+ name?: string | null;
502
+ email?: string | null;
503
+ }[] | undefined;
504
+ trackedChangeTarget?: {
505
+ kind: "trackedChange";
506
+ trackedChangeId: string;
507
+ story?: unknown;
508
+ side?: "source" | "destination";
509
+ } | undefined;
488
510
  }) => Promise<any>;
489
511
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
490
512
  resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
@@ -614,17 +636,6 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
614
636
  getTrackedChangeThread: (parentComment: any) => any[] | readonly never[];
615
637
  getCommentPositionKey: (commentOrId: Object | string | null | undefined) => string | null;
616
638
  getCommentPosition: (commentOrId: Object | string) => Object | null;
617
- getCommentAnchoredText: (commentOrId: Object | string, options?: {
618
- separator?: string | undefined;
619
- trim?: boolean | undefined;
620
- }) => string | null;
621
- getCommentAnchorData: (commentOrId: Object | string, options?: {
622
- separator?: string | undefined;
623
- trim?: boolean | undefined;
624
- }) => {
625
- position: Object;
626
- anchoredText: string | null;
627
- } | null;
628
639
  resolveCommentPositionEntry: (commentOrId: any, preferredId: any) => {
629
640
  key: string | null;
630
641
  entry: any;
@@ -648,30 +659,49 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
648
659
  };
649
660
  hasOverlapId: (id: any) => any;
650
661
  getPendingComment: ({ selection, documentId, parentCommentId, ...options }: {
651
- selection: Object;
652
- documentId: string;
653
- parentCommentId: string;
654
- }) => Object;
662
+ selection?: Object | undefined;
663
+ documentId?: string | null | undefined;
664
+ parentCommentId?: string | null | undefined;
665
+ }) => ReturnType<typeof useComment>;
655
666
  showAddComment: (superdoc: any, targetClientY?: null) => any;
656
667
  addComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
657
668
  superdoc: any;
658
669
  comment: any;
659
670
  skipEditorUpdate?: boolean | undefined;
660
671
  broadcastChanges?: boolean | undefined;
661
- }) => void;
672
+ }) => {
673
+ ok: boolean;
674
+ reason?: string;
675
+ detail?: string;
676
+ code?: string;
677
+ } | Promise<{
678
+ ok: boolean;
679
+ reason?: string;
680
+ detail?: string;
681
+ code?: string;
682
+ }>;
662
683
  addHydratedComment: ({ superdoc, comment, skipEditorUpdate, broadcastChanges }: {
663
684
  superdoc: any;
664
685
  comment: any;
665
686
  skipEditorUpdate?: boolean | undefined;
666
687
  broadcastChanges?: boolean | undefined;
667
- }) => void;
688
+ }) => {
689
+ ok: boolean;
690
+ reason?: string;
691
+ detail?: string;
692
+ code?: string;
693
+ } | Promise<{
694
+ ok: boolean;
695
+ reason?: string;
696
+ detail?: string;
697
+ code?: string;
698
+ }>;
668
699
  cancelComment: (superdoc: any) => void;
669
700
  deleteComment: ({ commentId: commentIdToDelete, superdoc }: {
670
701
  commentId: any;
671
702
  superdoc: any;
672
703
  }) => Promise<any>;
673
704
  removePendingComment: (superdoc: any) => void;
674
- cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
675
705
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
676
706
  setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
677
707
  commentItems?: never[] | undefined;
@@ -686,42 +716,33 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
686
716
  reason?: undefined;
687
717
  };
688
718
  clearReviewDirectory: () => void;
689
- processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
690
- comments: any[];
691
- documentId: string;
692
- replacedFile?: boolean | undefined;
693
- }) => void;
694
- translateCommentsForExport: () => any[];
695
719
  handleEditorLocationsUpdate: (allCommentPositions: Object, options?: {
696
720
  retainMissingTrackedChangeGeometry?: boolean;
697
721
  retainedTrackedChangeIds?: Iterable<string>;
698
722
  }) => void;
699
723
  clearEditorCommentPositions: () => void;
700
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
724
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, trackedChangeIdentityIndex, }: {
701
725
  superdoc: Object;
702
726
  params: Object;
703
727
  }) => void;
704
- refreshTrackedChangeCommentsByIds: ({ superdoc, editor, changeIds, broadcastChanges }: {
705
- superdoc: any;
706
- editor: any;
707
- changeIds: any;
708
- broadcastChanges?: boolean | undefined;
709
- }) => void;
710
- syncResolvedCommentsWithDocument: ({ editor }?: {}) => number;
711
- syncTrackedChangePositionsWithDocument: ({ documentId, editor }?: {}) => number;
728
+ syncResolvedCommentsWithDocument: () => number;
712
729
  setActiveFloatingCommentInstance: (instanceId?: null) => void;
713
730
  requestInstantSidebarAlignment: (targetY?: null, threadId?: null, instanceId?: null) => void;
714
731
  peekInstantSidebarAlignment: () => null;
715
732
  clearInstantSidebarAlignment: () => void;
716
- syncTrackedChangeComments: ({ superdoc, editor, broadcastChanges }: {
717
- superdoc: any;
718
- editor: any;
719
- broadcastChanges?: boolean | undefined;
720
- }) => void;
721
733
  decideTrackedChangeFromSidebar: ({ superdoc, comment, decision }: {
722
734
  superdoc: Object;
723
- editor: Object;
724
- }) => void;
735
+ comment: Object;
736
+ decision: string;
737
+ }) => {
738
+ ok: boolean;
739
+ success?: boolean;
740
+ reason?: string;
741
+ } | Promise<{
742
+ ok: boolean;
743
+ success?: boolean;
744
+ reason?: string;
745
+ }>;
725
746
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
726
747
  setV2CommentsAdapter: (adapter: any) => void;
727
748
  getV2CommentsAdapter: (superdoc: any) => any;
@@ -752,7 +773,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
752
773
  };
753
774
  isV2EditorActive: (superdoc: any) => boolean;
754
775
  replyCommentV2: ({ superdoc, parentCommentId, text, mentions, trackedChangeTarget }?: {
755
- mentions?: never[] | undefined;
776
+ superdoc?: Object | undefined;
777
+ parentCommentId?: string | null | undefined;
778
+ text?: string | undefined;
779
+ mentions?: {
780
+ name?: string | null;
781
+ email?: string | null;
782
+ }[] | undefined;
783
+ trackedChangeTarget?: {
784
+ kind: "trackedChange";
785
+ trackedChangeId: string;
786
+ story?: unknown;
787
+ side?: "source" | "destination";
788
+ } | undefined;
756
789
  }) => Promise<any>;
757
790
  editCommentV2: ({ superdoc, commentId, text }?: {}) => Promise<any>;
758
791
  resolveCommentV2: ({ superdoc, commentId }?: {}) => Promise<any>;
@@ -802,4 +835,4 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
802
835
  liveAnchorKeys?: null | undefined;
803
836
  }) => any;
804
837
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
805
- }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "cancelImportedTrackedChangeBootstrap" | "removeCommentsForDocument" | "setReviewDirectoryFromV2" | "clearReviewDirectory" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "refreshTrackedChangeCommentsByIds" | "syncResolvedCommentsWithDocument" | "syncTrackedChangePositionsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "syncTrackedChangeComments" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "applyReviewWindowFromV2" | "reconcileCommentsFromV2" | "announceV2CommentCreated" | "dropCommentsFromMutationImpact" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
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">>;