superdoc 2.4.0-next.21 → 2.4.0-next.22

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 (43) hide show
  1. package/dist/chunks/{create-super-doc-ui-CFsY0uxw.es.js → create-super-doc-ui-CmOSA_lN.es.js} +252 -657
  2. package/dist/chunks/{create-super-doc-ui-jSJQis_0.cjs → create-super-doc-ui-CqGmoMMA.cjs} +251 -662
  3. package/dist/collaboration-upgrade-engine.cjs +1 -1
  4. package/dist/collaboration-upgrade-engine.es.js +1 -1
  5. package/dist/document-api/src/citations/citations.types.d.ts +9 -0
  6. package/dist/document-api/src/types/receipt.d.ts +9 -5
  7. package/dist/layout-engine/contracts/src/index.d.ts +73 -1
  8. package/dist/layout-engine/contracts/src/inline-box.d.ts +19 -0
  9. package/dist/layout-engine/contracts/src/paragraph-visible-text.d.ts +19 -0
  10. package/dist/layout-engine/layout-bridge/src/inline-box-key.d.ts +3 -0
  11. package/dist/layout-engine/layout-bridge/src/run-visual-marks.d.ts +2 -0
  12. package/dist/layout-engine/layout-bridge/src/text-measurement.d.ts +0 -12
  13. package/dist/layout-engine/painters/dom/src/runs/inline-box.d.ts +8 -0
  14. package/dist/public/ui-react.cjs +1 -1
  15. package/dist/public/ui-react.es.js +1 -1
  16. package/dist/public/ui.cjs +1 -1
  17. package/dist/public/ui.es.js +1 -1
  18. package/dist/style.css +93 -92
  19. package/dist/style.layered.css +93 -92
  20. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +2 -0
  21. package/dist/superdoc/src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue.d.ts +16 -0
  22. package/dist/superdoc/src/components/CommentsLayer/commentsList/commentsList.vue.d.ts +3 -1
  23. package/dist/superdoc/src/components/CommentsLayer/commentsList/super-comments-list.d.ts +12 -0
  24. package/dist/superdoc/src/core/SuperDoc.d.ts +6 -7
  25. package/dist/superdoc/src/core/extensions/index.d.ts +1 -1
  26. package/dist/superdoc/src/core/extensions/types.d.ts +63 -5
  27. package/dist/superdoc/src/core/types/index.d.ts +19 -0
  28. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +3 -3
  29. package/dist/superdoc/src/helpers/v2-review-mutation-impact.d.ts +3 -5
  30. package/dist/superdoc/src/public/index.d.cts +6 -0
  31. package/dist/superdoc/src/public/index.d.ts +3 -0
  32. package/dist/superdoc/src/public/ui/types.d.ts +5 -5
  33. package/dist/superdoc/src/stores/comments-store.d.ts +81 -78
  34. package/dist/superdoc/src/stores/superdoc-store.d.ts +243 -234
  35. package/dist/superdoc.cjs +660 -857
  36. package/dist/superdoc.es.js +648 -846
  37. package/dist-cdn/style.layered.css +1 -1
  38. package/dist-cdn/superdoc.min.css +1 -1
  39. package/dist-cdn/superdoc.min.js +36 -36
  40. package/package.json +2 -2
  41. package/dist/superdoc/src/helpers/v2-remote-review-hydration.d.ts +0 -12
  42. package/dist/superdoc/src/helpers/v2-review-mutation-reconciler.d.ts +0 -19
  43. package/dist/superdoc/src/helpers/v2-typing-review-hydration.d.ts +0 -16
@@ -105,15 +105,17 @@ export interface SuperDocSelectionTarget {
105
105
  start: SuperDocSelectionPoint;
106
106
  end: SuperDocSelectionPoint;
107
107
  story?: SuperDocStoryLocator;
108
+ /** Coordinate space for text endpoint offsets. Omitted means `visible`. */
109
+ coordinateSpace?: 'visible' | 'tracked';
108
110
  }
109
- /** Locations an extension anchor can be created from. */
111
+ /** Visible-coordinate locations an extension anchor can be created from. */
110
112
  export type SuperDocAnchorTarget = SuperDocSelectionTarget | SuperDocTextTarget | SuperDocTextAddress;
111
113
  /** Lifecycle status of a {@link SuperDocAnchor}. */
112
114
  export type SuperDocAnchorStatus = 'active' | 'stale' | 'disposed' | 'pending';
113
115
  /**
114
- * A session-stable location handle. The runtime remaps anchors as it observes
115
- * Document API receipts; an anchor that cannot be remapped safely fails closed
116
- * to `stale` and never silently points at the wrong range.
116
+ * A session-stable location handle. The runtime rebases anchors from
117
+ * block-local Document API receipt data; an anchor that cannot be rebased
118
+ * safely fails closed to `stale` and never silently points at the wrong range.
117
119
  */
118
120
  export interface SuperDocAnchor {
119
121
  readonly id: string;
@@ -171,7 +173,7 @@ export interface SuperDocDecorationProvider {
171
173
  id: string;
172
174
  provide(context: SuperDocDecorationContext): SuperDocDecoration[];
173
175
  }
174
- export type SuperDocMutationOrigin = 'local' | 'history' | 'extension';
176
+ export type SuperDocMutationOrigin = 'local' | 'history' | 'extension' | 'remote';
175
177
  export type SuperDocMutationAffect = 'text' | 'block' | 'comment' | 'trackedChange' | 'bookmark';
176
178
  /** Synchronous filter applied before a mutation handler runs. */
177
179
  export interface SuperDocMutationFilter {
@@ -390,6 +392,50 @@ export interface SuperDocVisualOptions {
390
392
  */
391
393
  scope?: 'text' | 'block';
392
394
  }
395
+ /**
396
+ * Layout-affecting inline-box values in non-negative integer CSS pixels.
397
+ * Padding, gaps, and borders participate in wrapping and pagination.
398
+ */
399
+ export interface SuperDocInlineBoxLayout {
400
+ paddingInline?: number | {
401
+ start: number;
402
+ end: number;
403
+ };
404
+ paddingBlock?: number | {
405
+ start: number;
406
+ end: number;
407
+ };
408
+ /** Logical spacing outside the range, paid once at each boundary. */
409
+ gapBefore?: number;
410
+ gapAfter?: number;
411
+ /** Border width consumes layout space. */
412
+ borderWidth?: number;
413
+ }
414
+ /** Paint-only appearance for a layout-aware inline box. */
415
+ export interface SuperDocInlineBoxAppearance {
416
+ backgroundColor?: string;
417
+ borderColor?: string;
418
+ borderStyle?: 'solid' | 'dashed' | 'dotted';
419
+ borderRadius?: number;
420
+ color?: string;
421
+ }
422
+ /**
423
+ * Options for {@link SuperDocVisualApi.inlineBox}. Inline boxes are
424
+ * render-only and byte-neutral. They currently support LTR visible-text
425
+ * targets only; unsupported directions and overlapping boxes fail closed.
426
+ */
427
+ export interface SuperDocInlineBoxOptions {
428
+ layout?: SuperDocInlineBoxLayout;
429
+ appearance?: SuperDocInlineBoxAppearance;
430
+ /** Additive paint-only class. It must not alter geometry. */
431
+ className?: string;
432
+ /** Sanitized data attributes stamped on the painted text leaves. */
433
+ data?: SuperDocDecorationData;
434
+ /** Paint-only cursor. */
435
+ cursor?: 'default' | 'pointer' | 'text' | 'help';
436
+ /** Wrapped ranges clone their box edges on every line. */
437
+ wrap?: 'clone';
438
+ }
393
439
  /**
394
440
  * The easy, beginner-facing visual authoring layer exposed as `ctx.visuals`.
395
441
  * Backed by the same render-only decoration runtime as
@@ -400,6 +446,13 @@ export interface SuperDocVisualOptions {
400
446
  * const risks = ctx.visuals.highlight('risks', { className: 'acme-risk' });
401
447
  * const result = await ctx.doc.query.match({ select: { type: 'text', pattern: /risk/i } });
402
448
  * risks.replace(result.items.map((item) => item.target));
449
+ *
450
+ * const pills = ctx.visuals.inlineBox('citations', {
451
+ * layout: { paddingInline: 4, paddingBlock: 2, borderWidth: 1 },
452
+ * appearance: { backgroundColor: '#eef4ff', borderColor: '#8aa8d8', borderRadius: 8 },
453
+ * cursor: 'pointer',
454
+ * });
455
+ * pills.replace(citationTargets);
403
456
  * ```
404
457
  */
405
458
  export interface SuperDocVisualApi {
@@ -407,6 +460,11 @@ export interface SuperDocVisualApi {
407
460
  highlight(id: string, options?: SuperDocVisualOptions): SuperDocVisualHandle;
408
461
  /** Create a neutral class/data visual layer (synonym of highlight). */
409
462
  decorate(id: string, options?: SuperDocVisualOptions): SuperDocVisualHandle;
463
+ /**
464
+ * Create a layout-aware box over anchored visible text. Local typing,
465
+ * undo, and redo rebase its anchors; dispose the returned handle on cleanup.
466
+ */
467
+ inlineBox(id: string, options?: SuperDocInlineBoxOptions): SuperDocVisualHandle;
410
468
  }
411
469
  /** Advanced escape-hatch generic event surface. */
412
470
  export interface SuperDocExtensionEventApi {
@@ -3195,6 +3195,19 @@ export interface SurfacesConfig {
3195
3195
  autoFocus?: boolean;
3196
3196
  };
3197
3197
  }
3198
+ /**
3199
+ * Browser worker asset URLs for deployments where application code and built
3200
+ * SuperDoc assets are served from different origins. Each URL must resolve to
3201
+ * a same-origin module worker served by the embedding application.
3202
+ */
3203
+ interface V2WorkerUrlsConfig {
3204
+ /** Main document worker used by non-collaborative v2 documents. */
3205
+ document?: string | URL;
3206
+ /** Collaboration-capable document worker used by v2 collaboration rooms. */
3207
+ collaboration?: string | URL;
3208
+ /** Isolated review-index worker used for comments and tracked changes. */
3209
+ reviewIndex?: string | URL;
3210
+ }
3198
3211
  export interface Config {
3199
3212
  /** The ID of the SuperDoc. */
3200
3213
  superdocId?: string;
@@ -3561,6 +3574,12 @@ export interface Config {
3561
3574
  * toolbar shows the baseline and documents render with system fonts.
3562
3575
  */
3563
3576
  fonts?: FontsConfig;
3577
+ /**
3578
+ * Optional same-origin URLs for v2's browser worker assets. Configure these
3579
+ * when the application and SuperDoc bundle are served from different origins.
3580
+ * Omitted entries keep SuperDoc's bundled worker URLs.
3581
+ */
3582
+ workerUrls?: V2WorkerUrlsConfig;
3564
3583
  /**
3565
3584
  * Opt-in toggle for the layout engine. Auto-disabled when web layout is
3566
3585
  * requested without `layoutEngineOptions.flowMode === 'semantic'`; the
@@ -55,7 +55,7 @@ export function hasRealV2Integration(integration: SuperDocV2Integration | null |
55
55
  * @property {unknown} EditorComponent Vue component that boots the V2 DOCX editor.
56
56
  * @property {unknown} [RulerComponent] Optional Vue component for the V2 ruler.
57
57
  * @property {(...args: unknown[]) => unknown} [createGeometryPublisher] Factory for the V2 geometry publisher.
58
- * @property {(...args: unknown[]) => unknown} [createReviewHydrationController] Factory for the V2 review-row hydration controller.
58
+ * @property {(...args: unknown[]) => unknown} [createReviewWindowController] Factory for the committed V2 review-window controller.
59
59
  * @property {(value: unknown) => boolean} [isSyntheticTrackedChangeCommentLaneItem] Predicate for synthetic tracked-change comment-lane items.
60
60
  * @property {(value: unknown) => boolean} [isV2SyntheticTrackedChangeRow] Predicate for synthesized V2 tracked-change rows.
61
61
  */
@@ -83,9 +83,9 @@ export type SuperDocV2Integration = {
83
83
  */
84
84
  createGeometryPublisher?: ((...args: unknown[]) => unknown) | undefined;
85
85
  /**
86
- * Factory for the V2 review-row hydration controller.
86
+ * Factory for the committed V2 review-window controller.
87
87
  */
88
- createReviewHydrationController?: ((...args: unknown[]) => unknown) | undefined;
88
+ createReviewWindowController?: ((...args: unknown[]) => unknown) | undefined;
89
89
  /**
90
90
  * Predicate for synthetic tracked-change comment-lane items.
91
91
  */
@@ -2,11 +2,9 @@
2
2
  * Classify the tracked-change identities carried by a v2 mutation event.
3
3
  *
4
4
  * Receipt entities are the durable invalidation contract between the document
5
- * kernel and derived review UI. Consumers can refresh `upsertIds` narrowly via
6
- * `trackChanges.get(...)`, drop `removedIds` immediately, and leave a bounded
7
- * full-list reconciliation as background verification. History results are
8
- * different: undo/redo can restore many identities at once, so consumers use
9
- * one authoritative catalog after render instead of issuing one read per id.
5
+ * kernel and derived review UI. Consumers apply removals/remaps locally; the
6
+ * next committed window supplies surviving or restored rows. History follows
7
+ * the same bounded path and never enumerates invisible review identities.
10
8
  */
11
9
  export function getV2TrackedChangeMutationImpact(event: any): {
12
10
  allResolved?: any;
@@ -122,6 +122,9 @@ import type { SuperDocFontsApi as __Cjs_SuperDocFontsApi } from './index.js' wit
122
122
  import type { SuperDocGuardedDoc as __Cjs_SuperDocGuardedDoc } from './index.js' with { "resolution-mode": "import" };
123
123
  import type { SuperDocGuardedDocQuery as __Cjs_SuperDocGuardedDocQuery } from './index.js' with { "resolution-mode": "import" };
124
124
  import type { SuperDocGuardedDocSelection as __Cjs_SuperDocGuardedDocSelection } from './index.js' with { "resolution-mode": "import" };
125
+ import type { SuperDocInlineBoxAppearance as __Cjs_SuperDocInlineBoxAppearance } from './index.js' with { "resolution-mode": "import" };
126
+ import type { SuperDocInlineBoxLayout as __Cjs_SuperDocInlineBoxLayout } from './index.js' with { "resolution-mode": "import" };
127
+ import type { SuperDocInlineBoxOptions as __Cjs_SuperDocInlineBoxOptions } from './index.js' with { "resolution-mode": "import" };
125
128
  import type { SuperDocLayoutEngineOptions as __Cjs_SuperDocLayoutEngineOptions } from './index.js' with { "resolution-mode": "import" };
126
129
  import type { SuperDocLockedPayload as __Cjs_SuperDocLockedPayload } from './index.js' with { "resolution-mode": "import" };
127
130
  import type { SuperDocMeasurementUnit as __Cjs_SuperDocMeasurementUnit } from './index.js' with { "resolution-mode": "import" };
@@ -320,6 +323,9 @@ export type { __Cjs_SuperDocFontsApi as SuperDocFontsApi };
320
323
  export type { __Cjs_SuperDocGuardedDoc as SuperDocGuardedDoc };
321
324
  export type { __Cjs_SuperDocGuardedDocQuery as SuperDocGuardedDocQuery };
322
325
  export type { __Cjs_SuperDocGuardedDocSelection as SuperDocGuardedDocSelection };
326
+ export type { __Cjs_SuperDocInlineBoxAppearance as SuperDocInlineBoxAppearance };
327
+ export type { __Cjs_SuperDocInlineBoxLayout as SuperDocInlineBoxLayout };
328
+ export type { __Cjs_SuperDocInlineBoxOptions as SuperDocInlineBoxOptions };
323
329
  export type { __Cjs_SuperDocLayoutEngineOptions as SuperDocLayoutEngineOptions };
324
330
  export type { __Cjs_SuperDocLockedPayload as SuperDocLockedPayload };
325
331
  export type { __Cjs_SuperDocMeasurementUnit as SuperDocMeasurementUnit };
@@ -165,6 +165,9 @@ export type { SuperDocExtensionStorage } from '../core/extensions/index.js';
165
165
  export type { SuperDocGuardedDoc } from '../core/extensions/index.js';
166
166
  export type { SuperDocGuardedDocQuery } from '../core/extensions/index.js';
167
167
  export type { SuperDocGuardedDocSelection } from '../core/extensions/index.js';
168
+ export type { SuperDocInlineBoxAppearance } from '../core/extensions/index.js';
169
+ export type { SuperDocInlineBoxLayout } from '../core/extensions/index.js';
170
+ export type { SuperDocInlineBoxOptions } from '../core/extensions/index.js';
168
171
  export type { SuperDocMutationAffect } from '../core/extensions/index.js';
169
172
  export type { SuperDocMutationEvent } from '../core/extensions/index.js';
170
173
  export type { SuperDocMutationFilter } from '../core/extensions/index.js';
@@ -356,14 +356,14 @@ export interface ContextMenuItem {
356
356
  invoke(): CommandExecutionResult;
357
357
  }
358
358
  export interface ViewportEntityHit {
359
- type: string;
359
+ type: 'trackedChange' | 'comment' | 'contentControl' | 'citation' | (string & {});
360
360
  id: string;
361
361
  tag?: string;
362
362
  scope?: 'block' | 'inline';
363
363
  /**
364
364
  * Painted story locator for a tracked-change hit. Meaningful only for
365
- * `type: 'trackedChange'`; absent for body-only content and for comment /
366
- * content-control hits. Lets point hit-testing disambiguate a tracked-change
365
+ * `type: 'trackedChange'`; absent for body-only content and for comment,
366
+ * content-control, and citation hits. Lets point hit-testing disambiguate a tracked-change
367
367
  * id that repeats across stories (body, footnote, header/footer, textbox) by
368
368
  * resolving to the occurrence actually under the point.
369
369
  */
@@ -831,7 +831,7 @@ export type CommentAnchorCapture = {
831
831
  };
832
832
  /** Comments handle. */
833
833
  export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
834
- /** Read the current comments snapshot. */
834
+ /** Read the passive page-window snapshot without starting a document-wide read. Observers receive the complete directory separately. */
835
835
  getSnapshot(): CommentsSlice;
836
836
  /** List comments through the best-known controller/Document API state. */
837
837
  list(query?: CommentsListQuery): readonly CommentInfo[];
@@ -905,7 +905,7 @@ export interface CommentsHandle extends SnapshotSubscribable<CommentsSlice> {
905
905
  }
906
906
  /** Track-changes handle. */
907
907
  export interface TrackChangesHandle extends SnapshotSubscribable<TrackChangesSlice> {
908
- /** Read the current track-changes snapshot. */
908
+ /** Read the passive page-window snapshot without starting a document-wide read. Observers receive the complete directory separately. */
909
909
  getSnapshot(): TrackChangesSlice;
910
910
  /** List tracked changes through the best-known controller state. */
911
911
  list(): readonly TrackChangesItem[];
@@ -24,7 +24,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
24
24
  pendingComment: import('vue').Ref<null, null>;
25
25
  currentCommentText: import('vue').Ref<string, string>;
26
26
  commentsList: import('vue').Ref<never[], never[]>;
27
+ reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
27
28
  isCommentsListVisible: import('vue').Ref<boolean, boolean>;
29
+ isReviewDirectoryActive: import('vue').Ref<boolean, boolean>;
30
+ isReviewDirectoryLoading: import('vue').Ref<boolean, boolean>;
28
31
  generalCommentIds: import('vue').Ref<never[], never[]>;
29
32
  editorCommentIds: import('vue').Ref<never[], never[]>;
30
33
  commentsParentElement: import('vue').Ref<null, null>;
@@ -50,6 +53,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
50
53
  parentComments: any[];
51
54
  resolvedComments: any[];
52
55
  }>;
56
+ getGroupedReviewDirectory: import('vue').ComputedRef<{
57
+ parentComments: any[];
58
+ resolvedComments: any[];
59
+ }>;
53
60
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
54
61
  getCommentsByPosition: import('vue').ComputedRef<{
55
62
  parentComments: any[];
@@ -146,6 +153,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
146
153
  removePendingComment: (superdoc: any) => void;
147
154
  cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
148
155
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
156
+ setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
157
+ commentItems?: never[] | undefined;
158
+ trackedChangeItems?: never[] | undefined;
159
+ }) => {
160
+ ok: boolean;
161
+ reason: string;
162
+ count?: undefined;
163
+ } | {
164
+ ok: boolean;
165
+ count: number;
166
+ reason?: undefined;
167
+ };
168
+ clearReviewDirectory: () => void;
149
169
  processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
150
170
  comments: any[];
151
171
  documentId: string;
@@ -185,14 +205,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
185
205
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
186
206
  setV2CommentsAdapter: (adapter: any) => void;
187
207
  getV2CommentsAdapter: (superdoc: any) => any;
188
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, commentIds, 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
- };
208
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
196
209
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
197
210
  preparedInputs?: null | undefined;
198
211
  pruneStale?: boolean | undefined;
@@ -206,13 +219,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
206
219
  setV2TrackedChangesAdapter: (adapter: any) => void;
207
220
  getV2TrackedChangesAdapter: (superdoc: any) => any;
208
221
  getV2TrackedChangeRowCount: (documentId?: null) => number;
209
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
210
- trackedChangesListMode?: string | undefined;
211
- reconciliationBatchSize?: number | undefined;
212
- }) => Promise<any>;
213
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
222
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, remappedPairs, allResolved, }?: {
214
223
  upsertIds?: never[] | undefined;
215
224
  removedIds?: never[] | undefined;
225
+ remappedPairs?: never[] | undefined;
216
226
  }) => Promise<{
217
227
  ok: boolean;
218
228
  reason: string;
@@ -221,7 +231,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
221
231
  unresolvedIds?: undefined;
222
232
  allResolved?: undefined;
223
233
  removedRows?: undefined;
224
- failures?: undefined;
234
+ removedIds?: undefined;
225
235
  } | {
226
236
  ok: boolean;
227
237
  items: never[];
@@ -230,22 +240,13 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
230
240
  allResolved: boolean;
231
241
  removedRows: any;
232
242
  reason?: undefined;
233
- failures?: undefined;
243
+ removedIds?: undefined;
234
244
  } | {
235
245
  ok: boolean;
236
246
  items: never[];
237
247
  resolvedIds: never[];
238
- unresolvedIds: never[];
239
- reason?: undefined;
240
- allResolved?: undefined;
241
- removedRows?: undefined;
242
- failures?: undefined;
243
- } | {
244
- ok: boolean;
245
- items: any[];
246
- resolvedIds: (string | null)[];
247
248
  unresolvedIds: (string | null)[];
248
- failures: any[];
249
+ removedIds: (string | null)[];
249
250
  reason?: undefined;
250
251
  allResolved?: undefined;
251
252
  removedRows?: undefined;
@@ -257,7 +258,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
257
258
  liveAnchorKeys?: null | undefined;
258
259
  }) => any;
259
260
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
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<{
261
+ }, "suppressInternalExternal" | "activeComment" | "activeFloatingCommentInstanceId" | "floatingCommentsOffset" | "pendingComment" | "currentCommentText" | "isDebugging" | "editingCommentId" | "editorCommentPositions" | "isCommentHighlighted" | "v2CommentsAdapter" | "COMMENT_EVENTS" | "hasInitializedComments" | "hasSyncedCollaborationComments" | "commentDialogs" | "overlappingComments" | "overlappedIds" | "commentsList" | "reviewDirectoryList" | "isCommentsListVisible" | "isReviewDirectoryActive" | "isReviewDirectoryLoading" | "generalCommentIds" | "editorCommentIds" | "commentsParentElement" | "hasInitializedLocations" | "sortedConversations" | "visibleConversations" | "skipSelectionUpdate" | "isFloatingCommentsReady" | "instantSidebarAlignmentTargetY" | "instantSidebarAlignmentThreadId" | "instantSidebarAlignmentInstanceId" | "viewingVisibility" | "v2TrackedChangesAdapter">, Pick<{
261
262
  COMMENT_EVENTS: {
262
263
  readonly RESOLVED: "resolved";
263
264
  readonly NEW: "new";
@@ -283,7 +284,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
283
284
  pendingComment: import('vue').Ref<null, null>;
284
285
  currentCommentText: import('vue').Ref<string, string>;
285
286
  commentsList: import('vue').Ref<never[], never[]>;
287
+ reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
286
288
  isCommentsListVisible: import('vue').Ref<boolean, boolean>;
289
+ isReviewDirectoryActive: import('vue').Ref<boolean, boolean>;
290
+ isReviewDirectoryLoading: import('vue').Ref<boolean, boolean>;
287
291
  generalCommentIds: import('vue').Ref<never[], never[]>;
288
292
  editorCommentIds: import('vue').Ref<never[], never[]>;
289
293
  commentsParentElement: import('vue').Ref<null, null>;
@@ -309,6 +313,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
309
313
  parentComments: any[];
310
314
  resolvedComments: any[];
311
315
  }>;
316
+ getGroupedReviewDirectory: import('vue').ComputedRef<{
317
+ parentComments: any[];
318
+ resolvedComments: any[];
319
+ }>;
312
320
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
313
321
  getCommentsByPosition: import('vue').ComputedRef<{
314
322
  parentComments: any[];
@@ -405,6 +413,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
405
413
  removePendingComment: (superdoc: any) => void;
406
414
  cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
407
415
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
416
+ setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
417
+ commentItems?: never[] | undefined;
418
+ trackedChangeItems?: never[] | undefined;
419
+ }) => {
420
+ ok: boolean;
421
+ reason: string;
422
+ count?: undefined;
423
+ } | {
424
+ ok: boolean;
425
+ count: number;
426
+ reason?: undefined;
427
+ };
428
+ clearReviewDirectory: () => void;
408
429
  processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
409
430
  comments: any[];
410
431
  documentId: string;
@@ -444,14 +465,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
444
465
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
445
466
  setV2CommentsAdapter: (adapter: any) => void;
446
467
  getV2CommentsAdapter: (superdoc: any) => any;
447
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, commentIds, 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
- };
468
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
455
469
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
456
470
  preparedInputs?: null | undefined;
457
471
  pruneStale?: boolean | undefined;
@@ -465,13 +479,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
465
479
  setV2TrackedChangesAdapter: (adapter: any) => void;
466
480
  getV2TrackedChangesAdapter: (superdoc: any) => any;
467
481
  getV2TrackedChangeRowCount: (documentId?: null) => number;
468
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
469
- trackedChangesListMode?: string | undefined;
470
- reconciliationBatchSize?: number | undefined;
471
- }) => Promise<any>;
472
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
482
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, remappedPairs, allResolved, }?: {
473
483
  upsertIds?: never[] | undefined;
474
484
  removedIds?: never[] | undefined;
485
+ remappedPairs?: never[] | undefined;
475
486
  }) => Promise<{
476
487
  ok: boolean;
477
488
  reason: string;
@@ -480,7 +491,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
480
491
  unresolvedIds?: undefined;
481
492
  allResolved?: undefined;
482
493
  removedRows?: undefined;
483
- failures?: undefined;
494
+ removedIds?: undefined;
484
495
  } | {
485
496
  ok: boolean;
486
497
  items: never[];
@@ -489,22 +500,13 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
489
500
  allResolved: boolean;
490
501
  removedRows: any;
491
502
  reason?: undefined;
492
- failures?: undefined;
503
+ removedIds?: undefined;
493
504
  } | {
494
505
  ok: boolean;
495
506
  items: never[];
496
507
  resolvedIds: never[];
497
- unresolvedIds: never[];
498
- reason?: undefined;
499
- allResolved?: undefined;
500
- removedRows?: undefined;
501
- failures?: undefined;
502
- } | {
503
- ok: boolean;
504
- items: any[];
505
- resolvedIds: (string | null)[];
506
508
  unresolvedIds: (string | null)[];
507
- failures: any[];
509
+ removedIds: (string | null)[];
508
510
  reason?: undefined;
509
511
  allResolved?: undefined;
510
512
  removedRows?: undefined;
@@ -516,7 +518,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
516
518
  liveAnchorKeys?: null | undefined;
517
519
  }) => any;
518
520
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
519
- }, "getConfig" | "documentsWithConverations" | "getGroupedComments" | "hasOpenTrackedChanges" | "getCommentsByPosition" | "getFloatingComments" | "getFloatingCommentInstances" | "isViewingMode" | "shouldRenderReviewInViewing">, Pick<{
521
+ }, "getConfig" | "documentsWithConverations" | "getGroupedComments" | "getGroupedReviewDirectory" | "hasOpenTrackedChanges" | "getCommentsByPosition" | "getFloatingComments" | "getFloatingCommentInstances" | "isViewingMode" | "shouldRenderReviewInViewing">, Pick<{
520
522
  COMMENT_EVENTS: {
521
523
  readonly RESOLVED: "resolved";
522
524
  readonly NEW: "new";
@@ -542,7 +544,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
542
544
  pendingComment: import('vue').Ref<null, null>;
543
545
  currentCommentText: import('vue').Ref<string, string>;
544
546
  commentsList: import('vue').Ref<never[], never[]>;
547
+ reviewDirectoryList: import('vue').ShallowRef<never[], never[]>;
545
548
  isCommentsListVisible: import('vue').Ref<boolean, boolean>;
549
+ isReviewDirectoryActive: import('vue').Ref<boolean, boolean>;
550
+ isReviewDirectoryLoading: import('vue').Ref<boolean, boolean>;
546
551
  generalCommentIds: import('vue').Ref<never[], never[]>;
547
552
  editorCommentIds: import('vue').Ref<never[], never[]>;
548
553
  commentsParentElement: import('vue').Ref<null, null>;
@@ -568,6 +573,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
568
573
  parentComments: any[];
569
574
  resolvedComments: any[];
570
575
  }>;
576
+ getGroupedReviewDirectory: import('vue').ComputedRef<{
577
+ parentComments: any[];
578
+ resolvedComments: any[];
579
+ }>;
571
580
  hasOpenTrackedChanges: import('vue').ComputedRef<boolean>;
572
581
  getCommentsByPosition: import('vue').ComputedRef<{
573
582
  parentComments: any[];
@@ -664,6 +673,19 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
664
673
  removePendingComment: (superdoc: any) => void;
665
674
  cancelImportedTrackedChangeBootstrap: (documentId: string | null | undefined) => number;
666
675
  removeCommentsForDocument: (documentId: string | null | undefined) => void;
676
+ setReviewDirectoryFromV2: ({ superdoc, commentItems, trackedChangeItems }?: {
677
+ commentItems?: never[] | undefined;
678
+ trackedChangeItems?: never[] | undefined;
679
+ }) => {
680
+ ok: boolean;
681
+ reason: string;
682
+ count?: undefined;
683
+ } | {
684
+ ok: boolean;
685
+ count: number;
686
+ reason?: undefined;
687
+ };
688
+ clearReviewDirectory: () => void;
667
689
  processLoadedDocxComments: ({ superdoc, editor, comments, documentId, replacedFile }: {
668
690
  comments: any[];
669
691
  documentId: string;
@@ -703,14 +725,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
703
725
  v2CommentsAdapter: import('vue').ShallowRef<null, null>;
704
726
  setV2CommentsAdapter: (adapter: any) => void;
705
727
  getV2CommentsAdapter: (superdoc: any) => any;
706
- hydrateCommentsFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, commentIds, 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
- };
728
+ applyReviewWindowFromV2: ({ superdoc, commentsAdapter, trackedChangesAdapter, documentId, commentItems, trackedChangeItems, requestedCommentIds, requestedTrackedChangeIds, unresolvedCommentIds, trackedList, sourceCoverageRevision, evaluatedRevision, patch, }?: {}) => any;
714
729
  reconcileCommentsFromV2: ({ superdoc, adapter, documentId, items, preparedInputs, pruneStale, hydrationGeneration, }?: {
715
730
  preparedInputs?: null | undefined;
716
731
  pruneStale?: boolean | undefined;
@@ -724,13 +739,10 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
724
739
  setV2TrackedChangesAdapter: (adapter: any) => void;
725
740
  getV2TrackedChangesAdapter: (superdoc: any) => any;
726
741
  getV2TrackedChangeRowCount: (documentId?: null) => number;
727
- hydrateTrackedChangesFromV2: ({ superdoc, adapter, documentId, trackedChangesListMode, refreshReason, blocking, isCurrent, targetIds, reconciliationBatchSize, signal, hydrationGeneration, }?: {
728
- trackedChangesListMode?: string | undefined;
729
- reconciliationBatchSize?: number | undefined;
730
- }) => Promise<any>;
731
- reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, allResolved, }?: {
742
+ reconcileTrackedChangeMutationFromV2: ({ superdoc, adapter, documentId, upsertIds, removedIds, remappedPairs, allResolved, }?: {
732
743
  upsertIds?: never[] | undefined;
733
744
  removedIds?: never[] | undefined;
745
+ remappedPairs?: never[] | undefined;
734
746
  }) => Promise<{
735
747
  ok: boolean;
736
748
  reason: string;
@@ -739,7 +751,7 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
739
751
  unresolvedIds?: undefined;
740
752
  allResolved?: undefined;
741
753
  removedRows?: undefined;
742
- failures?: undefined;
754
+ removedIds?: undefined;
743
755
  } | {
744
756
  ok: boolean;
745
757
  items: never[];
@@ -748,22 +760,13 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
748
760
  allResolved: boolean;
749
761
  removedRows: any;
750
762
  reason?: undefined;
751
- failures?: undefined;
763
+ removedIds?: undefined;
752
764
  } | {
753
765
  ok: boolean;
754
766
  items: never[];
755
767
  resolvedIds: never[];
756
- unresolvedIds: never[];
757
- reason?: undefined;
758
- allResolved?: undefined;
759
- removedRows?: undefined;
760
- failures?: undefined;
761
- } | {
762
- ok: boolean;
763
- items: any[];
764
- resolvedIds: (string | null)[];
765
768
  unresolvedIds: (string | null)[];
766
- failures: any[];
769
+ removedIds: (string | null)[];
767
770
  reason?: undefined;
768
771
  allResolved?: undefined;
769
772
  removedRows?: undefined;
@@ -775,4 +778,4 @@ export const useCommentsStore: import('pinia').StoreDefinition<"comments", Pick<
775
778
  liveAnchorKeys?: null | undefined;
776
779
  }) => any;
777
780
  remapTrackedChangeIdentities: (pairs?: any[], { documentId }?: {}) => void;
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">>;
781
+ }, "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" | "isV2EditorActive" | "replyCommentV2" | "editCommentV2" | "resolveCommentV2" | "reopenCommentV2" | "setV2TrackedChangesAdapter" | "getV2TrackedChangesAdapter" | "getV2TrackedChangeRowCount" | "reconcileTrackedChangeMutationFromV2" | "reconcileTrackedChangesFromV2" | "remapTrackedChangeIdentities">>;