superdoc 2.4.0-next.1 → 2.4.0-next.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/chunks/{FindReplaceSurface-Dx0llWqP.cjs → FindReplaceSurface-9VkPw_-X.cjs} +2 -3
  2. package/dist/chunks/{FindReplaceSurface-BEW-1NhM.es.js → FindReplaceSurface-BuvaIrQ5.es.js} +2 -3
  3. package/dist/chunks/{PasswordPromptSurface-BUUVC2ee.cjs → PasswordPromptSurface-Bu5xHm91.cjs} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-BA6HHqEa.es.js → PasswordPromptSurface-Bz9_sKhX.es.js} +1 -1
  5. package/dist/chunks/{PdfViewer-CNOtyS-I.es.js → PdfViewer-CdVGB6Fe.es.js} +2 -2
  6. package/dist/chunks/{PdfViewer-qpvzwYMz.cjs → PdfViewer-D4eD2dV1.cjs} +2 -2
  7. package/dist/chunks/{create-super-doc-ui-DXdWuTzm.cjs → create-super-doc-ui-ByvmsAAG.cjs} +343 -90
  8. package/dist/chunks/{create-super-doc-ui-D4kk9AjM.es.js → create-super-doc-ui-DBXOhHdW.es.js} +338 -91
  9. package/dist/collaboration-upgrade-engine.cjs +1 -1
  10. package/dist/collaboration-upgrade-engine.es.js +1 -1
  11. package/dist/document-api/src/types/track-changes.types.d.ts +1 -3
  12. package/dist/public/ui-react.cjs +1 -1
  13. package/dist/public/ui-react.es.js +1 -1
  14. package/dist/public/ui.cjs +1 -1
  15. package/dist/public/ui.es.js +1 -1
  16. package/dist/style.css +128 -128
  17. package/dist/style.layered.css +128 -128
  18. package/dist/superdoc/src/core/types/index.d.ts +125 -5
  19. package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +1 -0
  20. package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +1 -1
  21. package/dist/superdoc/src/internal/toolbar/compatibility-catalog.d.ts +1 -1
  22. package/dist/superdoc/src/public/index.d.cts +8 -0
  23. package/dist/superdoc/src/public/index.d.ts +4 -0
  24. package/dist/superdoc/src/public/ui/types.d.ts +25 -1
  25. package/dist/superdoc/src/stores/comments-store.d.ts +100 -22
  26. package/dist/superdoc/src/stores/superdoc-store.d.ts +300 -66
  27. package/dist/superdoc.cjs +594 -75
  28. package/dist/superdoc.es.js +594 -75
  29. package/dist-cdn/style.layered.css +1 -1
  30. package/dist-cdn/superdoc.min.css +1 -1
  31. package/dist-cdn/superdoc.min.js +37 -37
  32. package/package.json +2 -2
  33. /package/dist/chunks/{_plugin-vue_export-helper-BTwbGDKw.cjs → _plugin-vue_export-helper-CZ1Nl59K.cjs} +0 -0
  34. /package/dist/chunks/{_plugin-vue_export-helper-CInC0bKI.es.js → _plugin-vue_export-helper-DSMAhhwD.es.js} +0 -0
  35. /package/dist/chunks/{constants-CY3R3_kF.es.js → constants-BfH0br5u.es.js} +0 -0
  36. /package/dist/chunks/{constants-sbCZ2O_A.cjs → constants-D7TNtyJd.cjs} +0 -0
@@ -843,6 +843,111 @@ export type LinkPopoverResolution = {
843
843
  * default popover.
844
844
  */
845
845
  export type LinkPopoverResolver = (ctx: LinkPopoverContext) => LinkPopoverResolution | null | undefined;
846
+ /**
847
+ * Canonical presentation settings for the built-in comments UI.
848
+ *
849
+ * Presentation only, and deliberately not the whole of `modules.comments`.
850
+ * That block also carries `readOnly` and `allowResolve`, which resolve through
851
+ * `interaction.comments`, and `permissionResolver`, which is read off
852
+ * `modules.comments` or the top-level `Config`. All three are stripped from
853
+ * this bag: policy outlives the built-in UI, so an application drawing its own
854
+ * comment surface still has to honor it. See the fields themselves, which are
855
+ * rejected by name with the spelling that applies to each.
856
+ *
857
+ * Open on purpose, for the same reason `modules.comments` is: the runtime
858
+ * merges this bag over that block and spreads the result through the comments
859
+ * store, which accepts pass-through keys. Closing it would reject working
860
+ * configurations, which is a worse failure than the missing autocomplete it
861
+ * would buy. The named fields are the ones the shell reads.
862
+ */
863
+ export type CommentsConfig = {
864
+ /** How comments present themselves as the surface narrows. */
865
+ displayMode?: 'auto' | 'sidebar' | 'inline';
866
+ /** CSS selector for an explicit width measurement target in `auto` mode. */
867
+ compactMeasurementSelector?: string;
868
+ /** Fixed compact-mode breakpoint override, in pixels. */
869
+ compactBreakpointPx?: number;
870
+ /** Comment highlight colors (internal/external and active overrides). */
871
+ highlightColors?: {
872
+ /** Base highlight color for internal comments. */
873
+ internal?: string;
874
+ /** Base highlight color for external comments. */
875
+ external?: string;
876
+ /** Active highlight color override for internal comments. */
877
+ activeInternal?: string;
878
+ /** Active highlight color override for external comments. */
879
+ activeExternal?: string;
880
+ };
881
+ /** Comment highlight opacity, active and inactive. */
882
+ highlightOpacity?: {
883
+ /** Opacity for the active comment highlight. */
884
+ active?: number;
885
+ /** Opacity for inactive comment highlights. */
886
+ inactive?: number;
887
+ };
888
+ /** Highlight color used while hovering a comment. */
889
+ highlightHoverColor?: string;
890
+ /** Tracked-change highlight colors. */
891
+ trackChangeHighlightColors?: TrackChangeHighlightColors;
892
+ /** Active tracked-change highlight colors (defaults to the above). */
893
+ trackChangeActiveHighlightColors?: TrackChangeHighlightColors;
894
+ /**
895
+ * Policy, not presentation. `normalizeUiConfig` strips all three from this
896
+ * bag before anything reads it, so accepting them here would advertise a
897
+ * setting that is silently discarded.
898
+ *
899
+ * `readOnly` and `allowResolve` belong on `interaction.comments`, where they
900
+ * resolve and keep applying to an application drawing its own comment
901
+ * surface.
902
+ *
903
+ * `permissionResolver` is collaboration wiring rather than policy, and has
904
+ * no `ui` spelling at all. `pickResolver` takes the first of
905
+ * `modules.comments.permissionResolver` and the top-level
906
+ * `Config.permissionResolver`, in that order, so either works and the
907
+ * comments-scoped one wins.
908
+ */
909
+ readOnly?: never;
910
+ allowResolve?: never;
911
+ permissionResolver?: never;
912
+ } & Record<string, unknown>;
913
+ /** Border and background colors for one tracked-change highlight state. */
914
+ export interface TrackChangeHighlightColors {
915
+ /** Border color for inserted text. */
916
+ insertBorder?: string;
917
+ /** Background color for inserted text. */
918
+ insertBackground?: string;
919
+ /** Border color for deleted text. */
920
+ deleteBorder?: string;
921
+ /** Background color for deleted text. */
922
+ deleteBackground?: string;
923
+ /** Border color for a format change. */
924
+ formatBorder?: string;
925
+ }
926
+ /**
927
+ * Canonical configuration for the chrome drawn around content controls.
928
+ *
929
+ * `chrome` is the whole option bag this surface has. `'default'` and `'none'`
930
+ * are the only values the painter and the v2 host accept; anything else is
931
+ * coerced back to `'default'`.
932
+ */
933
+ export interface ContentControlsConfig {
934
+ /** Whether SuperDoc draws its own chrome around each content control. */
935
+ chrome?: 'default' | 'none';
936
+ }
937
+ /**
938
+ * Canonical configuration for the built-in link popover.
939
+ *
940
+ * `popoverResolver` supersedes `modules.links.popoverResolver`, which stays
941
+ * supported for all of v2. Setting both keeps the canonical one; the legacy
942
+ * spelling only applies when the canonical one is absent.
943
+ */
944
+ export interface LinkPopoverConfig {
945
+ /**
946
+ * Called when a user clicks a link, to decide which popover to show.
947
+ * Returning `null` or `undefined` falls back to the built-in popover.
948
+ */
949
+ popoverResolver?: LinkPopoverResolver;
950
+ }
846
951
  /** Context object passed to context menu callbacks (showWhen, render, action, menuProvider). */
847
952
  export interface ContextMenuContext {
848
953
  /** The editor instance. */
@@ -1650,6 +1755,17 @@ export interface FindReplaceConfig {
1650
1755
  width?: number | string;
1651
1756
  maxWidth?: number | string;
1652
1757
  maxHeight?: number | string;
1758
+ /**
1759
+ * Focus the find input when the surface opens. Defaults to `true`; set
1760
+ * `false` to leave focus wherever the user had it.
1761
+ *
1762
+ * Honored but undeclared until #1094: `useFindReplace` spreads this whole
1763
+ * bag into the surface request, and `SurfaceManager` applies it last, over
1764
+ * the `modules.surfaces.floating` defaults.
1765
+ */
1766
+ autoFocus?: boolean;
1767
+ /** Close the surface on a pointer press outside it. Defaults to `false`. */
1768
+ closeOnOutsidePointerDown?: boolean;
1653
1769
  };
1654
1770
  }
1655
1771
  /**
@@ -2654,7 +2770,7 @@ export interface UIConfig {
2654
2770
  showTableOfContentsButton?: boolean;
2655
2771
  };
2656
2772
  /** Built-in comments UI. Enabled by default. */
2657
- comments?: boolean | Record<string, unknown>;
2773
+ comments?: boolean | CommentsConfig;
2658
2774
  /** Built-in right-click and slash context menu. Enabled by default. */
2659
2775
  contextMenu?: boolean | ContextMenuConfig;
2660
2776
  /**
@@ -2662,16 +2778,20 @@ export interface UIConfig {
2662
2778
  * SuperDoc intercept Cmd+F / Ctrl+F; `editor.ui.search` stays available to
2663
2779
  * custom UI either way.
2664
2780
  */
2665
- search?: boolean | Record<string, unknown>;
2666
- /** Built-in popover shown when a link is selected. Disabled by default. */
2667
- linkPopover?: boolean | Record<string, unknown>;
2781
+ search?: boolean | FindReplaceConfig;
2782
+ /**
2783
+ * Built-in popover shown when a link is clicked. It renders by default;
2784
+ * pass `false` (or `ui: false`) to suppress it. Supplying a
2785
+ * {@link LinkPopoverConfig.popoverResolver} replaces it with your own UI.
2786
+ */
2787
+ linkPopover?: boolean | LinkPopoverConfig;
2668
2788
  /** Built-in ruler. Disabled by default. */
2669
2789
  ruler?: boolean | {
2670
2790
  /** Element or selector to render the ruler into. */
2671
2791
  container?: string | HTMLElement;
2672
2792
  };
2673
2793
  /** Built-in chrome drawn around content controls. Enabled by default. */
2674
- contentControls?: boolean | Record<string, unknown>;
2794
+ contentControls?: boolean | ContentControlsConfig;
2675
2795
  }
2676
2796
  /**
2677
2797
  * What the user is permitted to do, as distinct from what SuperDoc draws.
@@ -9,6 +9,7 @@
9
9
  * one authoritative catalog after render instead of issuing one read per id.
10
10
  */
11
11
  export function getV2TrackedChangeMutationImpact(event: any): {
12
+ allResolved?: any;
12
13
  upsertIds: Set<any>;
13
14
  removedIds: Set<any>;
14
15
  remappedPairs: {
@@ -12,7 +12,7 @@ export function createV2ReviewMutationReconciler({ getContext, reconcile, hydrat
12
12
  onReconciled: any;
13
13
  }): {
14
14
  enqueue: (impact: any) => void;
15
- enqueueAfterPaint(impact: any, waitForPaint: any): void;
15
+ enqueueAfterPaint(impact: any, waitForPaint: any): Promise<any>;
16
16
  onRender: (supersedesInFlight?: boolean) => void;
17
17
  reset(): void;
18
18
  getPendingIds(): Set<any>;
@@ -36,7 +36,7 @@ export interface BuiltInToolbarItemEntry {
36
36
  * docs present them; it is documentation-only.
37
37
  *
38
38
  * Every documented `Available buttons` entry from
39
- * `apps/docs/editor/built-in-ui/toolbar.mdx` appears here exactly once, plus the
39
+ * the built-in UI documentation appears here exactly once, plus the
40
40
  * `customButtons` shell concept.
41
41
  */
42
42
  export declare const BUILT_IN_TOOLBAR_CATALOG: readonly BuiltInToolbarItemEntry[];
@@ -9,10 +9,12 @@ import type { BorrowedSuperDocUI as __Cjs_BorrowedSuperDocUI } from './index.js'
9
9
  import type { CanPerformPermissionParams as __Cjs_CanPerformPermissionParams } from './index.js' with { "resolution-mode": "import" };
10
10
  import type { CollaborationConfig as __Cjs_CollaborationConfig } from './index.js' with { "resolution-mode": "import" };
11
11
  import type { CommentAddress as __Cjs_CommentAddress } from './index.js' with { "resolution-mode": "import" };
12
+ import type { CommentsConfig as __Cjs_CommentsConfig } from './index.js' with { "resolution-mode": "import" };
12
13
  import type { CommentsType as __Cjs_CommentsType } from './index.js' with { "resolution-mode": "import" };
13
14
  import type { Config as __Cjs_Config } from './index.js' with { "resolution-mode": "import" };
14
15
  import type { ContentControlActiveChangePayload as __Cjs_ContentControlActiveChangePayload } from './index.js' with { "resolution-mode": "import" };
15
16
  import type { ContentControlClickPayload as __Cjs_ContentControlClickPayload } from './index.js' with { "resolution-mode": "import" };
17
+ import type { ContentControlsConfig as __Cjs_ContentControlsConfig } from './index.js' with { "resolution-mode": "import" };
16
18
  import type { ContextMenuConfig as __Cjs_ContextMenuConfig } from './index.js' with { "resolution-mode": "import" };
17
19
  import type { ContextMenuContext as __Cjs_ContextMenuContext } from './index.js' with { "resolution-mode": "import" };
18
20
  import type { ContextMenuItem as __Cjs_ContextMenuItem } from './index.js' with { "resolution-mode": "import" };
@@ -49,6 +51,7 @@ import type { LayoutFragment as __Cjs_LayoutFragment } from './index.js' with {
49
51
  import type { LayoutMetrics as __Cjs_LayoutMetrics } from './index.js' with { "resolution-mode": "import" };
50
52
  import type { LayoutMode as __Cjs_LayoutMode } from './index.js' with { "resolution-mode": "import" };
51
53
  import type { LayoutPage as __Cjs_LayoutPage } from './index.js' with { "resolution-mode": "import" };
54
+ import type { LinkPopoverConfig as __Cjs_LinkPopoverConfig } from './index.js' with { "resolution-mode": "import" };
52
55
  import type { LinkPopoverContext as __Cjs_LinkPopoverContext } from './index.js' with { "resolution-mode": "import" };
53
56
  import type { LinkPopoverResolution as __Cjs_LinkPopoverResolution } from './index.js' with { "resolution-mode": "import" };
54
57
  import type { LinkPopoverResolver as __Cjs_LinkPopoverResolver } from './index.js' with { "resolution-mode": "import" };
@@ -164,6 +167,7 @@ import type { TextAddress as __Cjs_TextAddress } from './index.js' with { "resol
164
167
  import type { TextSegment as __Cjs_TextSegment } from './index.js' with { "resolution-mode": "import" };
165
168
  import type { TextTarget as __Cjs_TextTarget } from './index.js' with { "resolution-mode": "import" };
166
169
  import type { TrackChangeAuthor as __Cjs_TrackChangeAuthor } from './index.js' with { "resolution-mode": "import" };
170
+ import type { TrackChangeHighlightColors as __Cjs_TrackChangeHighlightColors } from './index.js' with { "resolution-mode": "import" };
167
171
  import type { TrackChangesAuthorColorsConfig as __Cjs_TrackChangesAuthorColorsConfig } from './index.js' with { "resolution-mode": "import" };
168
172
  import type { TrackChangesModuleConfig as __Cjs_TrackChangesModuleConfig } from './index.js' with { "resolution-mode": "import" };
169
173
  import type { TrackChangesSemanticColorsConfig as __Cjs_TrackChangesSemanticColorsConfig } from './index.js' with { "resolution-mode": "import" };
@@ -188,11 +192,13 @@ export declare const buildTheme: typeof import('./index.js', { with: { "resoluti
188
192
  export type { __Cjs_CanPerformPermissionParams as CanPerformPermissionParams };
189
193
  export type { __Cjs_CollaborationConfig as CollaborationConfig };
190
194
  export type { __Cjs_CommentAddress as CommentAddress };
195
+ export type { __Cjs_CommentsConfig as CommentsConfig };
191
196
  export type { __Cjs_CommentsType as CommentsType };
192
197
  export declare const compareVersions: typeof import('./index.js', { with: { "resolution-mode": "import" } }).compareVersions;
193
198
  export type { __Cjs_Config as Config };
194
199
  export type { __Cjs_ContentControlActiveChangePayload as ContentControlActiveChangePayload };
195
200
  export type { __Cjs_ContentControlClickPayload as ContentControlClickPayload };
201
+ export type { __Cjs_ContentControlsConfig as ContentControlsConfig };
196
202
  export type { __Cjs_ContextMenuConfig as ContextMenuConfig };
197
203
  export type { __Cjs_ContextMenuContext as ContextMenuContext };
198
204
  export type { __Cjs_ContextMenuItem as ContextMenuItem };
@@ -234,6 +240,7 @@ export type { __Cjs_LayoutFragment as LayoutFragment };
234
240
  export type { __Cjs_LayoutMetrics as LayoutMetrics };
235
241
  export type { __Cjs_LayoutMode as LayoutMode };
236
242
  export type { __Cjs_LayoutPage as LayoutPage };
243
+ export type { __Cjs_LinkPopoverConfig as LinkPopoverConfig };
237
244
  export type { __Cjs_LinkPopoverContext as LinkPopoverContext };
238
245
  export type { __Cjs_LinkPopoverResolution as LinkPopoverResolution };
239
246
  export type { __Cjs_LinkPopoverResolver as LinkPopoverResolver };
@@ -351,6 +358,7 @@ export type { __Cjs_TextAddress as TextAddress };
351
358
  export type { __Cjs_TextSegment as TextSegment };
352
359
  export type { __Cjs_TextTarget as TextTarget };
353
360
  export type { __Cjs_TrackChangeAuthor as TrackChangeAuthor };
361
+ export type { __Cjs_TrackChangeHighlightColors as TrackChangeHighlightColors };
354
362
  export type { __Cjs_TrackChangesAuthorColorsConfig as TrackChangesAuthorColorsConfig };
355
363
  export type { __Cjs_TrackChangesModuleConfig as TrackChangesModuleConfig };
356
364
  export type { __Cjs_TrackChangesSemanticColorsConfig as TrackChangesSemanticColorsConfig };
@@ -72,6 +72,10 @@ export type { SuperDocLayoutEngineOptions as LayoutEngineOptions } from '../core
72
72
  export type { FlowBlock, FlowMode, Layout, Fragment as LayoutFragment, Page as LayoutPage } from '../../../layout-engine/contracts/src/index.js';
73
73
  export type { LayoutMetrics } from '../../../layout-engine/layout-bridge/src/index.js';
74
74
  export type { LayoutMode } from '../../../layout-engine/painters/dom/src/index.js';
75
+ export type { CommentsConfig } from '../core/types/index.js';
76
+ export type { TrackChangeHighlightColors } from '../core/types/index.js';
77
+ export type { ContentControlsConfig } from '../core/types/index.js';
78
+ export type { LinkPopoverConfig } from '../core/types/index.js';
75
79
  export type { LinkPopoverContext } from '../core/types/index.js';
76
80
  export type { LinkPopoverResolution } from '../core/types/index.js';
77
81
  export type { LinkPopoverResolver } from '../core/types/index.js';
@@ -837,7 +837,19 @@ export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
837
837
  list(query?: CommentsListQuery): readonly CommentInfo[];
838
838
  /** Resolve a single comment by id from the best-known loaded state. */
839
839
  getById(commentId: string): CommentInfo | null;
840
- /** Create a comment from a frozen selection capture. */
840
+ /**
841
+ * Create a comment from a frozen selection capture.
842
+ *
843
+ * A capture carrying neither `target` nor `selectionTarget` fails closed with
844
+ * the same `NO_SELECTION` receipt {@link createFromSelection} mints for an
845
+ * empty selection, because both describe the same user-visible mistake:
846
+ * commenting with nothing selected. A capture that *has* a target which no
847
+ * longer resolves is a different failure, and keeps the Document API's own
848
+ * receipt so the reason stays specific.
849
+ *
850
+ * `capturedAt` is provenance for the consumer, not an expiry. A capture stays
851
+ * usable while its target resolves; elapsed time alone never invalidates it.
852
+ */
841
853
  createFromCapture(capture: CommentAnchorCapture, input: {
842
854
  text: string;
843
855
  }): WorkflowReceipt;
@@ -853,6 +865,18 @@ export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
853
865
  reply(commentId: string, input: {
854
866
  text: string;
855
867
  }): WorkflowReceipt;
868
+ /**
869
+ * Replace a comment's body text through the Document API
870
+ * (`comments.patch({ commentId, text })`).
871
+ *
872
+ * Gated by the comments `readOnly` policy like every other comment write.
873
+ * `allowResolve` is deliberately NOT consulted: that policy forbids only the
874
+ * resolve/reopen transition, and an application that may not resolve threads
875
+ * can still let an author correct their own wording.
876
+ */
877
+ edit(commentId: string, input: {
878
+ text: string;
879
+ }): WorkflowReceipt;
856
880
  /** Mark a comment resolved. */
857
881
  resolve(commentId: string): WorkflowReceipt;
858
882
  /** Reopen a resolved comment. */
@@ -157,7 +157,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
157
157
  retainedTrackedChangeIds?: Iterable<string>;
158
158
  }) => void;
159
159
  clearEditorCommentPositions: () => void;
160
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState }: {
160
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
161
161
  superdoc: Object;
162
162
  params: Object;
163
163
  }) => void;
@@ -185,10 +185,17 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
185
185
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
186
186
  setV2CommentsAdapter: (adapter: any) => void;
187
187
  getV2CommentsAdapter: (superdoc: any) => any;
188
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId }?: {}) => Promise<any>;
189
- applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, patch, }?: {}) => any;
190
- reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs }?: {
188
+ hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, isCurrent, signal, hydrationGeneration, }?: {
189
+ trackedChangesListMode?: string | undefined;
190
+ }) => Promise<any>;
191
+ applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
192
+ supersedeV2ReviewHydration: ({ commentsAdapter, trackedChangesAdapter }?: {}) => {
193
+ commentsGeneration: any;
194
+ trackedChangesGeneration: any;
195
+ };
196
+ reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
191
197
  preparedInputs?: null | undefined;
198
+ pruneStale?: boolean | undefined;
192
199
  }) => any;
193
200
  isV2EditorActive: (superdoc: any) => boolean;
194
201
  replyCommentV2: ({ superdoc, parentCommentId, text }?: {}) => Promise<any>;
@@ -198,10 +205,12 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
198
205
  v2TrackedChangesAdapter: import('vue').ShallowRef<null, null>;
199
206
  setV2TrackedChangesAdapter: (adapter: any) => void;
200
207
  getV2TrackedChangesAdapter: (superdoc: any) => any;
201
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, }?: {
208
+ getV2TrackedChangeRowCount: (documentId?: null) => number;
209
+ hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
202
210
  trackedChangesListMode?: string | undefined;
211
+ reconciliationBatchSize?: number | undefined;
203
212
  }) => Promise<any>;
204
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, }?: {
213
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
205
214
  upsertIds?: never[] | undefined;
206
215
  removedIds?: never[] | undefined;
207
216
  }) => Promise<{
@@ -210,14 +219,27 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
210
219
  items?: undefined;
211
220
  resolvedIds?: undefined;
212
221
  unresolvedIds?: undefined;
222
+ allResolved?: undefined;
223
+ removedRows?: undefined;
213
224
  failures?: undefined;
214
225
  } | {
215
226
  ok: boolean;
216
227
  items: never[];
217
228
  resolvedIds: never[];
218
229
  unresolvedIds: never[];
230
+ allResolved: boolean;
231
+ removedRows: any;
219
232
  reason?: undefined;
220
233
  failures?: undefined;
234
+ } | {
235
+ ok: boolean;
236
+ items: never[];
237
+ resolvedIds: never[];
238
+ unresolvedIds: never[];
239
+ reason?: undefined;
240
+ allResolved?: undefined;
241
+ removedRows?: undefined;
242
+ failures?: undefined;
221
243
  } | {
222
244
  ok: boolean;
223
245
  items: any[];
@@ -225,10 +247,14 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
225
247
  unresolvedIds: (string | null)[];
226
248
  failures: any[];
227
249
  reason?: undefined;
250
+ allResolved?: undefined;
251
+ removedRows?: undefined;
228
252
  }>;
229
- reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, }?: {
253
+ reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: {
230
254
  pruneStale?: boolean | undefined;
231
255
  preparedParams?: null | undefined;
256
+ liveIds?: null | undefined;
257
+ liveAnchorKeys?: null | undefined;
232
258
  }) => any;
233
259
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
234
260
  }, "suppressInternalExternal" | "activeComment" | "activeFloatingCommentInstanceId" | "floatingCommentsOffset" | "pendingComment" | "currentCommentText" | "isDebugging" | "editingCommentId" | "editorCommentPositions" | "isCommentHighlighted" | "v2CommentsAdapter" | "COMMENT_EVENTS" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "commentsList" | "isCommentsListVisible" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "hasInitializedLocations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2TrackedChangesAdapter">, Pick<{
@@ -390,7 +416,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
390
416
  retainedTrackedChangeIds?: Iterable<string>;
391
417
  }) => void;
392
418
  clearEditorCommentPositions: () => void;
393
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState }: {
419
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
394
420
  superdoc: Object;
395
421
  params: Object;
396
422
  }) => void;
@@ -418,10 +444,17 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
418
444
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
419
445
  setV2CommentsAdapter: (adapter: any) => void;
420
446
  getV2CommentsAdapter: (superdoc: any) => any;
421
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId }?: {}) => Promise<any>;
422
- applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, patch, }?: {}) => any;
423
- reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs }?: {
447
+ hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, isCurrent, signal, hydrationGeneration, }?: {
448
+ trackedChangesListMode?: string | undefined;
449
+ }) => Promise<any>;
450
+ applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
451
+ supersedeV2ReviewHydration: ({ commentsAdapter, trackedChangesAdapter }?: {}) => {
452
+ commentsGeneration: any;
453
+ trackedChangesGeneration: any;
454
+ };
455
+ reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
424
456
  preparedInputs?: null | undefined;
457
+ pruneStale?: boolean | undefined;
425
458
  }) => any;
426
459
  isV2EditorActive: (superdoc: any) => boolean;
427
460
  replyCommentV2: ({ superdoc, parentCommentId, text }?: {}) => Promise<any>;
@@ -431,10 +464,12 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
431
464
  v2TrackedChangesAdapter: import('vue').ShallowRef<null, null>;
432
465
  setV2TrackedChangesAdapter: (adapter: any) => void;
433
466
  getV2TrackedChangesAdapter: (superdoc: any) => any;
434
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, }?: {
467
+ getV2TrackedChangeRowCount: (documentId?: null) => number;
468
+ hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
435
469
  trackedChangesListMode?: string | undefined;
470
+ reconciliationBatchSize?: number | undefined;
436
471
  }) => Promise<any>;
437
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, }?: {
472
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
438
473
  upsertIds?: never[] | undefined;
439
474
  removedIds?: never[] | undefined;
440
475
  }) => Promise<{
@@ -443,14 +478,27 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
443
478
  items?: undefined;
444
479
  resolvedIds?: undefined;
445
480
  unresolvedIds?: undefined;
481
+ allResolved?: undefined;
482
+ removedRows?: undefined;
446
483
  failures?: undefined;
447
484
  } | {
448
485
  ok: boolean;
449
486
  items: never[];
450
487
  resolvedIds: never[];
451
488
  unresolvedIds: never[];
489
+ allResolved: boolean;
490
+ removedRows: any;
452
491
  reason?: undefined;
453
492
  failures?: undefined;
493
+ } | {
494
+ ok: boolean;
495
+ items: never[];
496
+ resolvedIds: never[];
497
+ unresolvedIds: never[];
498
+ reason?: undefined;
499
+ allResolved?: undefined;
500
+ removedRows?: undefined;
501
+ failures?: undefined;
454
502
  } | {
455
503
  ok: boolean;
456
504
  items: any[];
@@ -458,10 +506,14 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
458
506
  unresolvedIds: (string | null)[];
459
507
  failures: any[];
460
508
  reason?: undefined;
509
+ allResolved?: undefined;
510
+ removedRows?: undefined;
461
511
  }>;
462
- reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, }?: {
512
+ reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: {
463
513
  pruneStale?: boolean | undefined;
464
514
  preparedParams?: null | undefined;
515
+ liveIds?: null | undefined;
516
+ liveAnchorKeys?: null | undefined;
465
517
  }) => any;
466
518
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
467
519
  }, "getConfig" | "documentsWithConverations" | "getGroupedComments" | "hasOpenTrackedChanges" | "getCommentsByPosition" | "getFloatingComments" | "getFloatingCommentInstances" | "isViewingMode" | "shouldRenderReviewInViewing">, Pick<{
@@ -623,7 +675,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
623
675
  retainedTrackedChangeIds?: Iterable<string>;
624
676
  }) => void;
625
677
  clearEditorCommentPositions: () => void;
626
- handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState }: {
678
+ handleTrackedChangeUpdate: ({ superdoc, params, broadcastChanges, documentState, trackedChangeIdentityIndex, }: {
627
679
  superdoc: Object;
628
680
  params: Object;
629
681
  }) => void;
@@ -651,10 +703,17 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
651
703
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
652
704
  setV2CommentsAdapter: (adapter: any) => void;
653
705
  getV2CommentsAdapter: (superdoc: any) => any;
654
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId }?: {}) => Promise<any>;
655
- applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, patch, }?: {}) => any;
656
- reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs }?: {
706
+ hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, isCurrent, signal, hydrationGeneration, }?: {
707
+ trackedChangesListMode?: string | undefined;
708
+ }) => Promise<any>;
709
+ applyReviewSnapshotFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
710
+ supersedeV2ReviewHydration: ({ commentsAdapter, trackedChangesAdapter }?: {}) => {
711
+ commentsGeneration: any;
712
+ trackedChangesGeneration: any;
713
+ };
714
+ reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
657
715
  preparedInputs?: null | undefined;
716
+ pruneStale?: boolean | undefined;
658
717
  }) => any;
659
718
  isV2EditorActive: (superdoc: any) => boolean;
660
719
  replyCommentV2: ({ superdoc, parentCommentId, text }?: {}) => Promise<any>;
@@ -664,10 +723,12 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
664
723
  v2TrackedChangesAdapter: import('vue').ShallowRef<null, null>;
665
724
  setV2TrackedChangesAdapter: (adapter: any) => void;
666
725
  getV2TrackedChangesAdapter: (superdoc: any) => any;
667
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, }?: {
726
+ getV2TrackedChangeRowCount: (documentId?: null) => number;
727
+ hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
668
728
  trackedChangesListMode?: string | undefined;
729
+ reconciliationBatchSize?: number | undefined;
669
730
  }) => Promise<any>;
670
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, }?: {
731
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
671
732
  upsertIds?: never[] | undefined;
672
733
  removedIds?: never[] | undefined;
673
734
  }) => Promise<{
@@ -676,6 +737,17 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
676
737
  items?: undefined;
677
738
  resolvedIds?: undefined;
678
739
  unresolvedIds?: undefined;
740
+ allResolved?: undefined;
741
+ removedRows?: undefined;
742
+ failures?: undefined;
743
+ } | {
744
+ ok: boolean;
745
+ items: never[];
746
+ resolvedIds: never[];
747
+ unresolvedIds: never[];
748
+ allResolved: boolean;
749
+ removedRows: any;
750
+ reason?: undefined;
679
751
  failures?: undefined;
680
752
  } | {
681
753
  ok: boolean;
@@ -683,6 +755,8 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
683
755
  resolvedIds: never[];
684
756
  unresolvedIds: never[];
685
757
  reason?: undefined;
758
+ allResolved?: undefined;
759
+ removedRows?: undefined;
686
760
  failures?: undefined;
687
761
  } | {
688
762
  ok: boolean;
@@ -691,10 +765,14 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
691
765
  unresolvedIds: (string | null)[];
692
766
  failures: any[];
693
767
  reason?: undefined;
768
+ allResolved?: undefined;
769
+ removedRows?: undefined;
694
770
  }>;
695
- reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, }?: {
771
+ reconcileTrackedChangesFromV2: ({ superdoc, adapter, documentId, items, pruneStale, preparedParams, liveIds: suppliedLiveIds, liveAnchorKeys: suppliedLiveAnchorKeys, hydrationGeneration, }?: {
696
772
  pruneStale?: boolean | undefined;
697
773
  preparedParams?: null | undefined;
774
+ liveIds?: null | undefined;
775
+ liveAnchorKeys?: null | undefined;
698
776
  }) => any;
699
777
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
700
- }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "cancelImportedTrackedChangeBootstrap" | "removeCommentsForDocument" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "refreshTrackedChangeCommentsByIds" | "syncResolvedCommentsWithDocument" | "syncTrackedChangePositionsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "syncTrackedChangeComments" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "hydrateCommentsFromV2" | "applyReviewSnapshotFromV2" | "reconcileCommentsFromV2" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "hydrateTrackedChangesFromV2" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;
778
+ }, "getCommentAliasIds" | "getTrackedChangeThread" | "getCommentPositionKey" | "getCommentPosition" | "getCommentAnchoredText" | "getCommentAnchorData" | "resolveCommentPositionEntry" | "getCommentDocumentId" | "belongsToDocument" | "init" | "setViewingVisibility" | "getComment" | "setActiveComment" | "getCommentLocation" | "hasOverlapId" | "getPendingComment" | "showAddComment" | "addComment" | "addHydratedComment" | "cancelComment" | "deleteComment" | "removePendingComment" | "cancelImportedTrackedChangeBootstrap" | "removeCommentsForDocument" | "processLoadedDocxComments" | "translateCommentsForExport" | "handleEditorLocationsUpdate" | "clearEditorCommentPositions" | "handleTrackedChangeUpdate" | "refreshTrackedChangeCommentsByIds" | "syncResolvedCommentsWithDocument" | "syncTrackedChangePositionsWithDocument" | "setActiveFloatingCommentInstance" | "requestInstantSidebarAlignment" | "peekInstantSidebarAlignment" | "clearInstantSidebarAlignment" | "syncTrackedChangeComments" | "decideTrackedChangeFromSidebar" | "setV2CommentsAdapter" | "getV2CommentsAdapter" | "hydrateCommentsFromV2" | "applyReviewSnapshotFromV2" | "supersedeV2ReviewHydration" | "reconcileCommentsFromV2" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "hydrateTrackedChangesFromV2" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;