superdoc 2.29.0 → 2.30.0-next.19

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 (138) hide show
  1. package/README.md +127 -25
  2. package/dist/chunks/{FindReplaceSurface-B_5ggdWg.es.js → FindReplaceSurface-BEnRLpD9.es.js} +1 -1
  3. package/dist/chunks/{FindReplaceSurface-fVHxPXtn.cjs → FindReplaceSurface-DWXgWgg7.cjs} +1 -1
  4. package/dist/chunks/{PasswordPromptSurface-CZqhDQQ1.es.js → PasswordPromptSurface-DjV1JgjD.es.js} +1 -1
  5. package/dist/chunks/{PasswordPromptSurface-x8GNmMJT.cjs → PasswordPromptSurface-VFPnQOML.cjs} +1 -1
  6. package/dist/chunks/{PdfViewer-CW09MNrB.es.js → PdfViewer-C2r-K8zC.es.js} +1 -1
  7. package/dist/chunks/{PdfViewer-CkrAHpC-.cjs → PdfViewer-DYTbPVUr.cjs} +1 -1
  8. package/dist/chunks/{_plugin-vue_export-helper-BkbCxNeT.cjs → _plugin-vue_export-helper-BzM2_tVU.cjs} +9 -0
  9. package/dist/chunks/{_plugin-vue_export-helper-DRPRMkeA.es.js → _plugin-vue_export-helper-CmkaJDnr.es.js} +4 -1
  10. package/dist/chunks/{create-super-doc-ui-L60GhVAX.cjs → create-super-doc-ui-D7uBUZfs.cjs} +14347 -13625
  11. package/dist/chunks/{create-super-doc-ui-Dc8dQAMc.es.js → create-super-doc-ui-_t6kMzLs.es.js} +14076 -13360
  12. package/dist/collaboration-upgrade-engine.cjs +1 -1
  13. package/dist/collaboration-upgrade-engine.es.js +1 -1
  14. package/dist/document-api/src/changes/changes.d.ts +26 -0
  15. package/dist/document-api/src/changes/changes.types.d.ts +156 -0
  16. package/dist/document-api/src/comments/comment-create-attribution.d.ts +4 -0
  17. package/dist/document-api/src/comments/comments.types.d.ts +4 -0
  18. package/dist/document-api/src/content-controls/content-controls.types.d.ts +1 -0
  19. package/dist/document-api/src/contract/command-catalog.d.ts +1 -1
  20. package/dist/document-api/src/contract/operation-definitions.d.ts +76 -8
  21. package/dist/document-api/src/contract/operation-registry.d.ts +2 -2
  22. package/dist/document-api/src/contract/schemas.d.ts +7 -1
  23. package/dist/document-api/src/create/create.d.ts +0 -4
  24. package/dist/document-api/src/diff/diff.types.d.ts +6 -6
  25. package/dist/document-api/src/header-footers/header-footers.d.ts +1 -3
  26. package/dist/document-api/src/index.d.ts +13 -1
  27. package/dist/document-api/src/inline-semantics/token-sets.d.ts +0 -2
  28. package/dist/document-api/src/insert/insert.d.ts +0 -1
  29. package/dist/document-api/src/paragraphs/paragraphs.d.ts +8 -3
  30. package/dist/document-api/src/paragraphs/paragraphs.types.d.ts +49 -5
  31. package/dist/document-api/src/tables/data/table-preset-appearance.generated.d.ts +2 -0
  32. package/dist/document-api/src/tables/table-style-presets.d.ts +73 -0
  33. package/dist/document-api/src/tables/tables.d.ts +4 -1
  34. package/dist/document-api/src/types/sd-props.d.ts +7 -0
  35. package/dist/document-api/src/types/table-operations.types.d.ts +12 -15
  36. package/dist/layout-engine/contracts/src/index.d.ts +4 -1
  37. package/dist/layout-engine/contracts/src/table-cell-vector-overlay.d.ts +2 -0
  38. package/dist/layout-engine/dom-contract/src/data-attrs.d.ts +4 -0
  39. package/dist/layout-engine/layout-bridge/src/coupled-footnote-pagination.d.ts +1 -0
  40. package/dist/layout-engine/layout-bridge/src/footnote-page-certificate.d.ts +1 -0
  41. package/dist/layout-engine/layout-bridge/src/footnote-page-planner.d.ts +5 -0
  42. package/dist/layout-engine/layout-bridge/src/incrementalLayout.d.ts +1 -0
  43. package/dist/layout-engine/layout-engine/src/footnote-page-flow.d.ts +3 -0
  44. package/dist/layout-engine/layout-engine/src/index.d.ts +7 -0
  45. package/dist/layout-engine/layout-engine/src/layout-paragraph.d.ts +5 -0
  46. package/dist/layout-engine/layout-engine/src/layout-table.d.ts +3 -1
  47. package/dist/layout-engine/layout-engine/src/layout-utils.d.ts +0 -4
  48. package/dist/layout-engine/layout-engine/src/paginator.d.ts +4 -0
  49. package/dist/layout-engine/painters/dom/src/index.d.ts +2 -0
  50. package/dist/layout-engine/painters/dom/src/paragraph/list-marker.d.ts +1 -1
  51. package/dist/layout-engine/painters/dom/src/paragraph/renderParagraphContent.d.ts +1 -1
  52. package/dist/layout-engine/painters/dom/src/styles.d.ts +0 -10
  53. package/dist/layout-engine/painters/dom/src/svg-utils.d.ts +1 -13
  54. package/dist/public/ui-react.cjs +1 -1
  55. package/dist/public/ui-react.es.js +1 -1
  56. package/dist/public/ui-vue.cjs +1 -1
  57. package/dist/public/ui-vue.es.js +1 -1
  58. package/dist/public/ui.cjs +1 -1
  59. package/dist/public/ui.es.js +1 -1
  60. package/dist/shared/common/Telemetry.d.ts +50 -0
  61. package/dist/shared/common/event-types.d.ts +13 -0
  62. package/dist/shared/font-system/src/bundled-face-names.d.ts +1 -0
  63. package/dist/shared/font-system/src/resolver.d.ts +1 -0
  64. package/dist/style.css +1 -1
  65. package/dist/style.layered.css +1 -1
  66. package/dist/superdoc/src/components/CommentsLayer/CommentDialog.vue.d.ts +17 -33
  67. package/dist/superdoc/src/components/CommentsLayer/collect-tracked-change-thread.d.ts +6 -4
  68. package/dist/superdoc/src/components/CommentsLayer/comment-params.d.ts +84 -0
  69. package/dist/superdoc/src/components/CommentsLayer/use-comment.d.ts +15 -95
  70. package/dist/superdoc/src/components/Whiteboard/use-whiteboard.d.ts +30 -9
  71. package/dist/superdoc/src/composables/use-comment-sidebar.d.ts +6 -0
  72. package/dist/superdoc/src/composables/use-document.d.ts +51 -99
  73. package/dist/superdoc/src/core/SuperDoc.d.ts +12 -3
  74. package/dist/superdoc/src/core/collaboration/cdn-collaboration-comment-map.d.ts +1 -0
  75. package/dist/superdoc/src/core/collaboration/collaboration-comment-map.d.ts +2 -0
  76. package/dist/superdoc/src/core/collaboration/helpers.d.ts +1 -1
  77. package/dist/superdoc/src/core/config/normalize-interaction-config.d.ts +10 -1
  78. package/dist/superdoc/src/core/document-open-telemetry.d.ts +1 -1
  79. package/dist/superdoc/src/core/editor-runtime/types.d.ts +4 -0
  80. package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
  81. package/dist/superdoc/src/core/types/index.d.ts +110 -42
  82. package/dist/superdoc/src/core/v2-integration/v2-integration.d.ts +6 -0
  83. package/dist/superdoc/src/helpers/deprecation.d.ts +12 -3
  84. package/dist/superdoc/src/helpers/object-guards.d.ts +1 -0
  85. package/dist/superdoc/src/helpers/v2-review-geometry-delivery.d.ts +22 -0
  86. package/dist/superdoc/src/internal/toolbar/built-in/ToolbarButton.vue.d.ts +1 -0
  87. package/dist/superdoc/src/public/content-control-ref.d.ts +12 -0
  88. package/dist/superdoc/src/public/index.d.cts +20 -0
  89. package/dist/superdoc/src/public/index.d.ts +4 -1
  90. package/dist/superdoc/src/public/ui/async-read-cache.d.ts +32 -0
  91. package/dist/superdoc/src/public/ui/block-commands.d.ts +39 -0
  92. package/dist/superdoc/src/public/ui/command-results.d.ts +39 -0
  93. package/dist/superdoc/src/public/ui/commands.d.ts +5 -1
  94. package/dist/superdoc/src/public/ui/content-controls-handle.d.ts +31 -0
  95. package/dist/superdoc/src/public/ui/create-super-doc-ui.d.ts +1 -17
  96. package/dist/superdoc/src/public/ui/document-change-records.d.ts +7 -0
  97. package/dist/superdoc/src/public/ui/entity-rows.d.ts +14 -0
  98. package/dist/superdoc/src/public/ui/font-options.d.ts +7 -0
  99. package/dist/superdoc/src/public/ui/format-painter-paragraph.d.ts +7 -0
  100. package/dist/superdoc/src/public/ui/format-painter-state.d.ts +29 -0
  101. package/dist/superdoc/src/public/ui/heavy-read-gate.d.ts +41 -0
  102. package/dist/superdoc/src/public/ui/heavy-read-policy.d.ts +11 -0
  103. package/dist/superdoc/src/public/ui/host-events.d.ts +3 -0
  104. package/dist/superdoc/src/public/ui/inline-values.d.ts +80 -0
  105. package/dist/superdoc/src/public/ui/loose-record.d.ts +4 -0
  106. package/dist/superdoc/src/public/ui/reasons.d.ts +1 -0
  107. package/dist/superdoc/src/public/ui/search-handle.d.ts +24 -0
  108. package/dist/superdoc/src/public/ui/selection-targets.d.ts +53 -0
  109. package/dist/superdoc/src/public/ui/shared-tracked-changes-catalog.d.ts +16 -0
  110. package/dist/superdoc/src/public/ui/styles-handle.d.ts +54 -0
  111. package/dist/superdoc/src/public/ui/tracked-change-ids.d.ts +51 -0
  112. package/dist/superdoc/src/public/ui/types.d.ts +31 -2
  113. package/dist/superdoc/src/public/ui/ui-bench-timing.d.ts +9 -0
  114. package/dist/superdoc/src/public/ui.d.cts +18 -0
  115. package/dist/superdoc/src/public/ui.d.ts +1 -1
  116. package/dist/superdoc/src/stores/comments-store.d.ts +23052 -537
  117. package/dist/superdoc/src/stores/helpers/comment-grouping.d.ts +1 -1
  118. package/dist/superdoc/src/stores/helpers/comment-identity.d.ts +10 -10
  119. package/dist/superdoc/src/stores/helpers/pending-selection-snapshot.d.ts +3 -3
  120. package/dist/superdoc/src/stores/helpers/review-presentation.d.ts +91 -0
  121. package/dist/superdoc/src/stores/helpers/tracked-change-identity.d.ts +4 -2
  122. package/dist/superdoc/src/stores/helpers/tracked-change-row-values.d.ts +1 -8
  123. package/dist/superdoc/src/stores/helpers/tracked-change-thread-index.d.ts +1 -1
  124. package/dist/superdoc/src/stores/helpers/v2-review-adapters.d.ts +148 -0
  125. package/dist/superdoc/src/stores/superdoc-store.d.ts +12 -2895
  126. package/dist/superdoc.cjs +1000 -566
  127. package/dist/superdoc.es.js +1000 -566
  128. package/dist/word-layout/src/marker-utils.d.ts +0 -5
  129. package/dist/word-layout/src/unit-conversions.d.ts +0 -1
  130. package/dist-cdn/style.layered.css +1 -1
  131. package/dist-cdn/superdoc.min.css +1 -1
  132. package/dist-cdn/superdoc.min.js +38 -42
  133. package/package.json +12 -3
  134. package/dist/document-api/src/diff/index.d.ts +0 -3
  135. package/dist/document-api/src/write/locator.d.ts +0 -24
  136. package/dist/layout-engine/painters/dom/src/features/feature-registry.d.ts +0 -41
  137. package/dist/superdoc/src/internal/toolbar/built-in/format-negation.d.ts +0 -11
  138. package/dist/word-layout/src/tab-layout.d.ts +0 -193
@@ -23,7 +23,7 @@ type CommittedReviewPresentation = {
23
23
  resolved: readonly CommentId[];
24
24
  };
25
25
  };
26
- type CommittedReviewPresentations = Readonly<Record<string, CommittedReviewPresentation>>;
26
+ type CommittedReviewPresentations = Readonly<Record<string, CommittedReviewPresentation | undefined>>;
27
27
  export declare const groupComments: <Comment extends GroupableComment>(source: readonly Comment[], isVisible: (comment: Comment) => boolean) => GroupedComments<Comment>;
28
28
  export declare const groupCommittedComments: <Comment extends GroupableComment>(comments: readonly Comment[], presentations: CommittedReviewPresentations, isVisible: (comment: Comment) => boolean) => GroupedComments<Comment>;
29
29
  export declare const hasOpenTrackedChange: ({ parentComments }: GroupedComments<GroupableComment>) => boolean;
@@ -23,18 +23,18 @@ type PositionMatch = {
23
23
  key: null;
24
24
  entry: null;
25
25
  };
26
- type CommentIdentitySources = {
27
- getComments: () => CommentIdentityRow[];
28
- getReviewDirectory: () => CommentIdentityRow[];
26
+ type CommentIdentitySources<Row extends CommentIdentityRow> = {
27
+ getComments: () => Row[];
28
+ getReviewDirectory: () => Row[];
29
29
  getPositions: () => CommentPositions | null | undefined;
30
30
  };
31
- type CommentReference = CommentIdentityRow | string | number | null | undefined;
31
+ type CommentReference<Row extends CommentIdentityRow> = Row | string | number | null | undefined;
32
32
  export declare const trackedChangeThreadParentIdForComment: (comment: CommentIdentityRow | null | undefined) => unknown;
33
- export declare const createCommentIdentity: ({ getComments, getReviewDirectory, getPositions }: CommentIdentitySources) => {
34
- getComment: (id: unknown) => CommentIdentityRow | null;
35
- getThreadParent: (comment: CommentIdentityRow | null | undefined) => CommentIdentityRow | null | undefined;
36
- getCommentPositionKey: (commentOrId: CommentIdentityRow | string | null | undefined) => unknown;
37
- getCommentAliasIds: (commentOrId: CommentReference) => string[];
38
- resolveCommentPositionEntry: (commentOrId: CommentReference, preferredId?: unknown) => PositionMatch;
33
+ export declare const createCommentIdentity: <Row extends CommentIdentityRow>({ getComments, getReviewDirectory, getPositions, }: CommentIdentitySources<Row>) => {
34
+ getComment: (id: unknown) => Row | null;
35
+ getThreadParent: (comment: Row | null | undefined) => Row | null | undefined;
36
+ getCommentPositionKey: (commentOrId: Row | string | null | undefined) => unknown;
37
+ getCommentAliasIds: (commentOrId: CommentReference<Row>) => string[];
38
+ resolveCommentPositionEntry: (commentOrId: CommentReference<Row>, preferredId?: unknown) => PositionMatch;
39
39
  };
40
40
  export {};
@@ -1,11 +1,11 @@
1
- export type PendingSelectionHost = {
1
+ export type PendingSelectionHost<Snapshot = unknown> = {
2
2
  activeEditor?: {
3
3
  options?: {
4
4
  documentId?: unknown;
5
5
  } | null;
6
6
  doc?: {
7
7
  selection?: {
8
- current?: () => unknown;
8
+ current?: () => Snapshot | PromiseLike<Snapshot>;
9
9
  } | null;
10
10
  } | null;
11
11
  } | null;
@@ -14,4 +14,4 @@ export type PendingActiveSelection = {
14
14
  source?: unknown;
15
15
  documentId?: unknown;
16
16
  } | null | undefined;
17
- export declare const getPendingSelectionSnapshot: (superdoc: PendingSelectionHost, activeSelection: PendingActiveSelection) => unknown;
17
+ export declare const getPendingSelectionSnapshot: <Snapshot>(superdoc: PendingSelectionHost<Snapshot>, activeSelection: PendingActiveSelection) => Snapshot | Promise<Snapshot | null> | null;
@@ -0,0 +1,91 @@
1
+ type CommentId = string | number;
2
+ export type ReviewCoordinate = {
3
+ documentEpoch: string;
4
+ mountId: string;
5
+ commitSequence: number;
6
+ reviewVersion: number;
7
+ };
8
+ export type ReviewPositionEntry = {
9
+ pageIndex?: number | null;
10
+ bounds?: {
11
+ top?: number;
12
+ bottom?: number;
13
+ } | null;
14
+ };
15
+ export type ReviewInstance = {
16
+ id: string;
17
+ rowId: string;
18
+ threadId: string;
19
+ pageIndex: number | null;
20
+ positionKey: string | null;
21
+ positionEntry: ReviewPositionEntry | null;
22
+ anchorTop: number;
23
+ anchorBottom: number;
24
+ top: number;
25
+ height: number;
26
+ provisional?: boolean;
27
+ isPrimary: boolean;
28
+ isOffscreenReviewCard: boolean;
29
+ mount: boolean;
30
+ };
31
+ export type DecisionContinuityRequest = ReviewCoordinate & {
32
+ removedInstanceId: string;
33
+ removedRowVersion: number;
34
+ targetInstanceId: string;
35
+ targetRowVersion: number;
36
+ top: number;
37
+ };
38
+ export type ViewportRange = {
39
+ top: number;
40
+ bottom: number;
41
+ };
42
+ export type ReviewViewport = ViewportRange & {
43
+ width: number;
44
+ scale: number;
45
+ stageOffsetX: number;
46
+ stageOffsetY: number;
47
+ };
48
+ export type ReviewContextInput = {
49
+ decisionContinuity: DecisionContinuityRequest | null;
50
+ activeThreadId: string | null;
51
+ activeInstanceId: string | null;
52
+ editingRowId: string | null;
53
+ retainedThreadIds: string[];
54
+ visibility: {
55
+ comments: boolean;
56
+ trackedChanges: boolean;
57
+ };
58
+ viewport: ReviewViewport;
59
+ pending: {
60
+ anchorTop: number | null;
61
+ height: number;
62
+ } | null;
63
+ measurements: {
64
+ instanceId: string;
65
+ rowVersion: number;
66
+ height: number;
67
+ fontRevision?: number;
68
+ }[];
69
+ };
70
+ export type CommittedReviewPresentation = {
71
+ catalogVersion?: number;
72
+ epoch: string;
73
+ baseVersion: number;
74
+ version: number;
75
+ unchanged: boolean;
76
+ fontRevision?: number;
77
+ coordinate: ReviewCoordinate;
78
+ instances: ReviewInstance[];
79
+ rowVersions: Record<string, number | undefined>;
80
+ groupOrder: {
81
+ open: readonly CommentId[];
82
+ resolved: readonly CommentId[];
83
+ };
84
+ readPaintOrigin?: () => {
85
+ left: number;
86
+ top: number;
87
+ } | null;
88
+ readFontRevision?: () => number;
89
+ updateContext: (input: ReviewContextInput, readViewport?: () => ReviewViewport | null) => void;
90
+ };
91
+ export {};
@@ -1,9 +1,11 @@
1
- import { BodyStoryLocator } from '../../../../document-api/src/index.js';
2
1
  type TrackedChangeAnchorParts = {
3
2
  storyKey: string;
4
3
  rawId: string;
5
4
  };
6
- export declare const BODY_TRACKED_CHANGE_STORY: BodyStoryLocator;
5
+ export declare const BODY_TRACKED_CHANGE_STORY: {
6
+ kind: "story";
7
+ storyType: "body";
8
+ };
7
9
  export declare const normalizeCommentId: (id: unknown) => string | null;
8
10
  export declare const makeTrackedChangeAnchorKey: ({ storyKey, rawId }: TrackedChangeAnchorParts) => string;
9
11
  export declare const isBodyTrackedChangeComment: (comment: unknown) => boolean;
@@ -1,16 +1,9 @@
1
1
  import { TrackChangeCustomAttribute } from '../../../../document-api/src/index.js';
2
+ import { TrackedChangeRowImagePreview } from '../../components/CommentsLayer/comment-params.js';
2
3
  type TrackedChangeDetailLine = {
3
4
  excerpt: string;
4
5
  label: string;
5
6
  };
6
- type TrackedChangeRowImagePreview = {
7
- src: string;
8
- contentType?: string;
9
- role?: string;
10
- width?: number;
11
- height?: number;
12
- alt: string;
13
- };
14
7
  export declare const shallowEqual: (a: unknown, b: unknown) => boolean;
15
8
  export declare const normalizeTrackedChangeDetailLines: (lines: unknown) => TrackedChangeDetailLine[] | null;
16
9
  export declare const trackedChangeDetailLinesEqual: (a: unknown, b: unknown) => boolean;
@@ -20,6 +20,6 @@ export declare const trackedChangeRowSideGroup: (comment: {
20
20
  semanticColorKey?: string | null;
21
21
  }) => TrackedChangeSideGroup | null;
22
22
  export declare const buildTrackedChangeThreadOwnerIndex: <Comment extends TrackedChangeThreadOwnerFields>(allComments: ReadonlyArray<Comment>) => Map<Comment, Comment>;
23
- export declare const buildTrackedChangeThreadIndex: <Comment extends TrackedChangeThreadFields>(allComments: ReadonlyArray<Comment>, previous?: ReadonlyMap<CommentId, ReadonlyArray<Comment>>) => Map<CommentId, ReadonlyArray<Comment>>;
23
+ export declare const buildTrackedChangeThreadIndex: <Comment extends TrackedChangeThreadFields>(allComments: ReadonlyArray<Comment>, previous?: ReadonlyMap<Comment["commentId"], ReadonlyArray<Comment>>) => Map<Comment["commentId"], ReadonlyArray<Comment>>;
24
24
  export declare const buildTrackedChangeDecisionLinkIndex: <Comment extends TrackedChangeLinkFields>(allComments: ReadonlyArray<Comment>, previous?: ReadonlyMap<string, ReadonlyArray<Comment>>) => Map<string, ReadonlyArray<Comment>>;
25
25
  export {};
@@ -0,0 +1,148 @@
1
+ import { SelectionInfo } from '../../../../document-api/src/index.js';
2
+ import { CommentInputParams } from '../../components/CommentsLayer/comment-params.js';
3
+ import { StoryLocator } from '../../core/types/index.js';
4
+ import { TrackedChangeDecisionOutcome } from './tracked-change-decision.js';
5
+ export type V2CommentMention = {
6
+ id?: string | null;
7
+ name?: string | null;
8
+ email?: string | null;
9
+ };
10
+ export type V2CommentMutationOutcome = {
11
+ ok: boolean;
12
+ items?: unknown[];
13
+ reason?: string;
14
+ code?: string;
15
+ detail?: unknown;
16
+ committed?: boolean;
17
+ complete?: boolean;
18
+ visibleWindowSource?: string;
19
+ threadLifecycle?: {
20
+ commentId: string;
21
+ status: 'open' | 'resolved';
22
+ };
23
+ removedCommentIds?: string[];
24
+ createdCommentId?: string;
25
+ mutationPath?: string;
26
+ };
27
+ export type V2CommentsCapabilityState = {
28
+ canWrite?: boolean;
29
+ reason?: string | null;
30
+ };
31
+ export type V2CommentSelectionCapture = {
32
+ ok: boolean;
33
+ target?: unknown;
34
+ reason?: string;
35
+ detail?: unknown;
36
+ };
37
+ export type V2ReviewCatalogSeedResult = {
38
+ ok: boolean;
39
+ reason?: string;
40
+ };
41
+ export type V2VisibleReviewComments = {
42
+ ok: boolean;
43
+ items?: unknown[];
44
+ unresolvedIds?: string[];
45
+ reason?: string;
46
+ };
47
+ export type V2ReviewAdapterDocumentId = string | number | null;
48
+ export type V2CommentInputOptions = {
49
+ fileId: V2ReviewAdapterDocumentId;
50
+ fileType: string | null;
51
+ };
52
+ export interface V2CommentsAdapter {
53
+ documentId?: V2ReviewAdapterDocumentId;
54
+ setActiveComment(commentId: string | null): Promise<V2CommentMutationOutcome>;
55
+ commitPendingComment(input: {
56
+ text: string;
57
+ target?: unknown;
58
+ mentions?: readonly V2CommentMention[];
59
+ }): Promise<V2CommentMutationOutcome>;
60
+ reply(input: {
61
+ parentCommentId: string;
62
+ text: string;
63
+ mentions?: readonly V2CommentMention[];
64
+ }): Promise<V2CommentMutationOutcome>;
65
+ edit(input: {
66
+ commentId: string;
67
+ text: string;
68
+ }): Promise<V2CommentMutationOutcome>;
69
+ resolve(input: {
70
+ commentId: string;
71
+ }): Promise<V2CommentMutationOutcome>;
72
+ reopen(input: {
73
+ commentId: string;
74
+ }): Promise<V2CommentMutationOutcome>;
75
+ delete(input: {
76
+ commentId: string;
77
+ }): Promise<V2CommentMutationOutcome>;
78
+ mapV2CommentToUseCommentInput(item: unknown, options: V2CommentInputOptions): CommentInputParams | null;
79
+ getCapabilityState?(command?: string | null): V2CommentsCapabilityState | null | undefined;
80
+ captureCurrentSelection?(options?: {
81
+ beforeReady?: (snapshot: SelectionInfo) => void | Promise<void>;
82
+ }): Promise<V2CommentSelectionCapture>;
83
+ isPendingCommentCreation?(commentId: string | undefined): boolean;
84
+ seedReviewCatalog?(items: unknown[], metadata?: {
85
+ sourceCoverageRevision?: string;
86
+ evaluatedRevision?: string;
87
+ }): V2ReviewCatalogSeedResult;
88
+ selectVisibleReviewComments?(): V2VisibleReviewComments | PromiseLike<V2VisibleReviewComments>;
89
+ }
90
+ export type V2TrackedChangeDecisionResult = TrackedChangeDecisionOutcome & {
91
+ ok: boolean;
92
+ reason?: string;
93
+ detail?: unknown;
94
+ documentId?: string | null;
95
+ };
96
+ export type V2TrackedChangeCommentParams = {
97
+ event?: string | null;
98
+ changeId?: string | number | null;
99
+ documentId?: V2ReviewAdapterDocumentId;
100
+ trackedChangeText?: string | null;
101
+ trackedChangeType?: string | null;
102
+ trackedChangeDisplayType?: string | null;
103
+ semanticColorKey?: string | null;
104
+ semanticColor?: string | null;
105
+ deletedText?: string | null;
106
+ trackedChangeLabel?: string | null;
107
+ trackedChangeDetailLines?: unknown;
108
+ trackedChangeImagePreview?: unknown;
109
+ customAttributes?: unknown;
110
+ authorId?: string | null;
111
+ authorEmail?: string | null;
112
+ authorImage?: string | null;
113
+ author?: string | null;
114
+ date?: number;
115
+ importedAuthor?: CommentInputParams['importedAuthor'];
116
+ importedId?: string | number | null;
117
+ coords?: NonNullable<CommentInputParams['selection']>['selectionBounds'];
118
+ trackedChangeStory?: StoryLocator | null;
119
+ trackedChangeStoryKind?: string | null;
120
+ trackedChangeStoryLabel?: string;
121
+ trackedChangeAnchorKey?: string | null;
122
+ trackedChangeCanonicalId?: string | null;
123
+ trackedChangePositionAliases?: unknown;
124
+ resolvedById?: string | null;
125
+ resolvedByEmail?: string | null;
126
+ resolvedByName?: string | null;
127
+ decision?: 'accept' | 'reject' | null;
128
+ reason?: string;
129
+ };
130
+ export interface V2TrackedChangesAdapter {
131
+ documentId?: V2ReviewAdapterDocumentId;
132
+ accept(target: unknown): Promise<V2TrackedChangeDecisionResult>;
133
+ reject(target: unknown): Promise<V2TrackedChangeDecisionResult>;
134
+ mapV2TrackedChangeToCommentParams(item: unknown): V2TrackedChangeCommentParams | null;
135
+ clearActiveTrackedChangeTargetIfMatches?(decidedId: string): unknown;
136
+ }
137
+ type MethodKeys<Adapter> = Exclude<keyof Adapter, 'documentId'>;
138
+ export type RequiredMethodKeys<Adapter> = {
139
+ [Member in MethodKeys<Adapter>]-?: undefined extends Adapter[Member] ? never : Member;
140
+ }[MethodKeys<Adapter>];
141
+ export type OptionalMethodKeys<Adapter> = Exclude<MethodKeys<Adapter>, RequiredMethodKeys<Adapter>>;
142
+ export declare const COMMENTS_ADAPTER_METHODS: readonly ["setActiveComment", "commitPendingComment", "reply", "edit", "resolve", "reopen", "delete", "mapV2CommentToUseCommentInput"];
143
+ export declare const COMMENTS_ADAPTER_OPTIONAL_METHODS: readonly ["getCapabilityState", "captureCurrentSelection", "isPendingCommentCreation", "seedReviewCatalog", "selectVisibleReviewComments"];
144
+ export declare const TRACKED_CHANGES_ADAPTER_METHODS: readonly ["accept", "reject", "mapV2TrackedChangeToCommentParams"];
145
+ export declare const TRACKED_CHANGES_ADAPTER_OPTIONAL_METHODS: readonly ["clearActiveTrackedChangeTargetIfMatches"];
146
+ export declare function isV2CommentsAdapter(value: unknown): value is V2CommentsAdapter;
147
+ export declare function isV2TrackedChangesAdapter(value: unknown): value is V2TrackedChangesAdapter;
148
+ export {};