@docx-editor.dev/core 2.19.1 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/dist/automation.cjs +1 -1
  2. package/dist/automation.d.ts +10 -9
  3. package/dist/automation.js +1 -1
  4. package/dist/binding.cjs +1 -1
  5. package/dist/binding.d.ts +8 -9
  6. package/dist/binding.js +1 -1
  7. package/dist/chunk-2H4ABRMB.cjs +20 -0
  8. package/dist/{chunk-NIVIC7PA.cjs → chunk-2HQXLL5L.cjs} +1 -1
  9. package/dist/chunk-3EZO3O6I.js +4 -0
  10. package/dist/{chunk-GWW5FOLJ.cjs → chunk-44SIVFJT.cjs} +5 -5
  11. package/dist/chunk-6UCDHGXI.js +1 -0
  12. package/dist/chunk-7VMVDRRU.js +2 -0
  13. package/dist/{chunk-2QU7QTM7.js → chunk-CAIWEQLC.js} +1 -1
  14. package/dist/{chunk-3JKOZBQ3.cjs → chunk-CEXC2VHI.cjs} +1 -1
  15. package/dist/chunk-CF3JR35B.js +11 -0
  16. package/dist/chunk-D2V4YBWJ.cjs +2 -0
  17. package/dist/chunk-DGSJZMAE.cjs +11 -0
  18. package/dist/chunk-EHBPYFRE.js +20 -0
  19. package/dist/chunk-GSEUM6AI.cjs +1 -0
  20. package/dist/chunk-H6WDEAOJ.js +18 -0
  21. package/dist/chunk-I6LSEDUL.cjs +18 -0
  22. package/dist/{chunk-3SU7UWCR.js → chunk-IW35GWJN.js} +1 -1
  23. package/dist/{chunk-BJQDNKEX.js → chunk-JRBGCIR2.js} +4 -4
  24. package/dist/chunk-K5HIOS6J.cjs +3 -0
  25. package/dist/chunk-KLQXP27K.js +3 -0
  26. package/dist/{chunk-RDKPMNN6.cjs → chunk-MZFFU66H.cjs} +1 -1
  27. package/dist/{chunk-TSDGKNV7.js → chunk-MZPNLIP3.js} +1 -1
  28. package/dist/{chunk-JWHXOJEU.cjs → chunk-OA6LFCTG.cjs} +2 -2
  29. package/dist/{chunk-BUNY5MRX.js → chunk-OHVJYJOA.js} +1 -1
  30. package/dist/{chunk-UOE4WKL7.js → chunk-P4TGGDK3.js} +1 -1
  31. package/dist/{chunk-7VO6BLKV.cjs → chunk-PIBYJZIH.cjs} +1 -1
  32. package/dist/{chunk-76F73CY6.cjs → chunk-WTILOUPG.cjs} +1 -1
  33. package/dist/collaboration/replication.cjs +1 -1
  34. package/dist/collaboration/replication.d.ts +3 -3
  35. package/dist/collaboration/replication.js +1 -1
  36. package/dist/collaboration.d.ts +3 -3
  37. package/dist/contracts/document.d.ts +2 -2
  38. package/dist/contracts/editor.d.ts +8 -9
  39. package/dist/contracts/modules.d.ts +5 -7
  40. package/dist/contracts/types.d.ts +1 -562
  41. package/dist/{custom-node-writes-BqIv94ei.d.ts → custom-node-writes-piokwVR5.d.ts} +2 -2
  42. package/dist/{document-protection-BL5zp8cU.d.ts → document-protection-C6RvCHx-.d.ts} +1 -1
  43. package/dist/{editor-WXbTSXx1.d.ts → editor-BgtcHulQ.d.ts} +19 -14
  44. package/dist/editor.cjs +1 -1
  45. package/dist/editor.css +1 -1
  46. package/dist/editor.d.ts +25 -27
  47. package/dist/editor.js +1 -1
  48. package/dist/export.cjs +2 -2
  49. package/dist/export.d.ts +12 -13
  50. package/dist/export.js +1 -1
  51. package/dist/{font-resolver-BSrKnTeR.d.ts → font-resolver-Bv2Z25-J.d.ts} +1 -1
  52. package/dist/{headless-document-view-C4ttQJ5H.d.ts → headless-document-view-DHKMN_3Y.d.ts} +2 -2
  53. package/dist/image-resources-C51LuAAu.d.ts +210 -0
  54. package/dist/{index-C3As-Xxp.d.ts → index-3lr8xXF8.d.ts} +14 -15
  55. package/dist/index.cjs +1 -1
  56. package/dist/index.d.ts +17 -18
  57. package/dist/index.js +1 -1
  58. package/dist/{layout-shaping-Dqu3JW3p.d.ts → layout-shaping-CKBUSaS7.d.ts} +1 -1
  59. package/dist/layout.cjs +1 -1
  60. package/dist/layout.d.ts +48 -19
  61. package/dist/layout.js +1 -1
  62. package/dist/{tree-package-fragment-1pdDnhZ_.d.ts → note-lifecycle-D4AOFCAt.d.ts} +142 -141
  63. package/dist/{note-properties-RjYgbmXe.d.ts → note-properties-CcXUgqr8.d.ts} +2 -2
  64. package/dist/{omml-equation-hcP9AUFX.d.ts → omml-equation-C5P6Ym3v.d.ts} +1 -1
  65. package/dist/output.cjs +1 -1
  66. package/dist/output.d.ts +7 -7
  67. package/dist/output.js +1 -1
  68. package/dist/{protocol-OdRd17KZ.d.ts → protocol-CsawNZkt.d.ts} +14 -4
  69. package/dist/{review-paragraph-order--jLHXIcd.d.ts → review-paragraph-order-BCIqjopY.d.ts} +2 -3
  70. package/dist/{revision-projection-BIHO_qvw.d.ts → revision-projection-BcRnC4Yj.d.ts} +1 -1
  71. package/dist/{semantic-cell-selection-lCYAVCCF.d.ts → semantic-cell-selection-R9wrenwR.d.ts} +4 -4
  72. package/dist/{semantic-interaction-0vQXcMZk.d.ts → semantic-interaction-B7beVwH7.d.ts} +1 -1
  73. package/dist/{semantic-paint-BSan4pBk.d.ts → semantic-paint-CLvHwf8y.d.ts} +2 -2
  74. package/dist/{semantic-records-ZcYuB4-H.d.ts → semantic-records-CbXwnS80.d.ts} +5 -4
  75. package/dist/store.cjs +1 -1
  76. package/dist/store.d.ts +13 -14
  77. package/dist/store.js +1 -1
  78. package/dist/{tree-session-contract-Cgn6fQ-M.d.ts → tree-session-contract-DTQxw2zL.d.ts} +5 -5
  79. package/dist/{tree-op-types-DbdM7fJV.d.ts → types-barrel-CEOy-Jv0.d.ts} +961 -210
  80. package/package.json +2 -2
  81. package/dist/chunk-5BI4SIHO.cjs +0 -1
  82. package/dist/chunk-6ESSCMXL.js +0 -2
  83. package/dist/chunk-6W4DIR4X.cjs +0 -2
  84. package/dist/chunk-AKQRKR2H.js +0 -1
  85. package/dist/chunk-FBWBSHC4.cjs +0 -11
  86. package/dist/chunk-IA7WTZHI.js +0 -11
  87. package/dist/chunk-IXGUCLER.js +0 -20
  88. package/dist/chunk-NDPLQG4Y.cjs +0 -18
  89. package/dist/chunk-NLGUL6QL.js +0 -3
  90. package/dist/chunk-OWUSDS3L.cjs +0 -20
  91. package/dist/chunk-TUCDPXBD.js +0 -18
  92. package/dist/chunk-VSCPFHTD.cjs +0 -3
  93. package/dist/chunk-ZUGTEKLM.js +0 -4
  94. package/dist/review-items-CJz-kAW8.d.ts +0 -370
@@ -1,370 +0,0 @@
1
- import { e as OoxmlElement, O as OoxmlPart, b as OoxmlPackage, R as RevisionAddress } from './tree-op-types-DbdM7fJV.js';
2
-
3
- /** The `w15` namespace: `commentsExtended.xml` — thread parent and resolved state. */
4
- declare const W15_NAMESPACE_URI = "http://schemas.microsoft.com/office/word/2012/wordml";
5
- /** A position in one story: a paragraph node id plus a UTF-16 offset inside it. */
6
- interface CommentPosition {
7
- readonly paragraphId: string;
8
- readonly offset: number;
9
- }
10
- /**
11
- * Where a comment is anchored, as a range.
12
- *
13
- * `orphaned` records that the file did not give this comment a usable range — a reference with
14
- * no range markers, or a start with no end. The comment is still listed, marked orphaned,
15
- * rather than dropped: a reviewer's remark disappearing silently is worse than one that says
16
- * it lost its text.
17
- */
18
- interface CommentAnchor {
19
- readonly commentId: string;
20
- /** Canonical name of the part the range lives in, so a header comment is attributable. */
21
- readonly partName: string;
22
- readonly start: CommentPosition;
23
- readonly end: CommentPosition;
24
- readonly orphaned: boolean;
25
- }
26
- /** One comment as authored in `word/comments.xml`. */
27
- interface CommentRecord {
28
- readonly id: string;
29
- readonly author: string;
30
- readonly initials?: string;
31
- readonly date?: string;
32
- /** Body paragraphs, as tree nodes, so the surface renders measured text rather than a string. */
33
- readonly blocks: readonly OoxmlElement[];
34
- /** `w14:paraId` of the last body paragraph — the key thread state is stored under. */
35
- readonly paraId?: string;
36
- /** `@w16cid:parentId` — the `w:id` of the comment this replies to, when the file names it. */
37
- readonly parentCommentId?: string;
38
- }
39
- /** Thread state for one comment, read from `commentsExtended.xml`. */
40
- interface CommentThreadState {
41
- /** `@w15:paraIdParent` — the comment this one replies to, absent for a top-level comment. */
42
- readonly parentParaId?: string;
43
- readonly done: boolean;
44
- }
45
- /**
46
- * Every comment anchor in one story, in document order.
47
- *
48
- * Overlapping and nested ranges are supported because each anchor is resolved independently —
49
- * Word produces both, and a model that assumed ranges nest cleanly would mis-anchor them.
50
- *
51
- * A start with no matching end anchors to the end of its own paragraph and is reported orphaned
52
- * rather than guessed at: extending it to the next end marker would attach a reviewer's remark
53
- * to text they never saw.
54
- */
55
- declare function commentAnchorsOfStory(part: OoxmlPart): CommentAnchor[];
56
- /**
57
- * The comments in `word/comments.xml`, in authored order.
58
- *
59
- * Every value here comes from a file an attacker fully controls, so nothing is interpreted:
60
- * author, initials and date are carried verbatim for a surface that will set them as TEXT.
61
- */
62
- declare function commentsOfPart(part: OoxmlPart): CommentRecord[];
63
- /**
64
- * Thread state by `w14:paraId`, from `commentsExtended.xml`.
65
- *
66
- * The part being PRESENT is not evidence of threading. `issue-68-large-comments-suggestions.docx`
67
- * ships it with 212 entries carrying `@w15:done` and not one `@w15:paraIdParent`, so it records
68
- * resolved state for a flat list. Absent parent means top-level, and that is a fact about the
69
- * file rather than a default this code chose.
70
- */
71
- declare function threadStateOfPart(part: OoxmlPart): Map<string, CommentThreadState>;
72
- /**
73
- * Whether the package holds any `w:comment` record — the cheap gate before a reap.
74
- *
75
- * Overflow cannot prove the package is comment-free, so it returns true and the reap still
76
- * runs rather than skipping cleanup.
77
- */
78
- declare function hasAnyComment(pkg: OoxmlPackage): boolean;
79
-
80
- /** A position in the model offset space of one story. */
81
- interface ReviewPosition {
82
- readonly paragraphId: string;
83
- readonly offset: number;
84
- }
85
- /** Where an item is anchored: a range in one story. */
86
- interface ReviewRange {
87
- readonly partName: string;
88
- readonly start: ReviewPosition;
89
- readonly end: ReviewPosition;
90
- }
91
- /**
92
- * What kind of decision a revision card represents.
93
- *
94
- * Wider than the four content wrappers, because a reviewer has to be shown every pending
95
- * decision, including the ones that decorate no characters. A card the surface cannot show is
96
- * a change the reviewer never learns about — and `acceptAllRevisions` refuses if ANY revision
97
- * in the document is one the engine cannot resolve, so an invisible one makes Accept All fail
98
- * for a reason nothing on screen explains.
99
- */
100
- type ReviewRevisionKind = 'insert' | 'delete'
101
- /**
102
- * A deletion and an insertion that are one edit: text typed over a selection.
103
- *
104
- * Word shows these as a single `Replaced "x" with "y"` card, and resolving one half
105
- * without the other is never what the reviewer meant — accepting the deletion alone
106
- * leaves the replacement text unproposed, rejecting it alone leaves both.
107
- */
108
- | 'replace' | 'moveFrom' | 'moveTo'
109
- /** `w:rPrChange` / `w:pPrChange` — the words are unchanged, their formatting is not. */
110
- | 'format'
111
- /** `w:pPr/w:rPr/w:ins|w:del` — a paragraph split or merge. */
112
- | 'paragraphMark'
113
- /** A row, cell, section or grid revision. Supported row revisions are resolvable. */
114
- | 'structural';
115
- /**
116
- * One tracked change as a review card.
117
- *
118
- * Keyed per DECISION rather than per site: a revision spanning three ranges is one card, because
119
- * accepting it accepts all three.
120
- */
121
- interface ReviewRevisionItem {
122
- readonly kind: 'revision';
123
- /** Stable across renders and unique per DECISION, not per site. */
124
- readonly id: string;
125
- /** The payload `acceptRevision` / `rejectRevision` take. */
126
- readonly address: RevisionAddress;
127
- /**
128
- * EVERY address this decision covers, `address` first.
129
- *
130
- * More than one only for a replacement, whose halves a foreign editor may have written
131
- * as two independent revisions. Accept and reject walk all of them in one transaction:
132
- * resolving one half and leaving the other is a state no reviewer asked for.
133
- */
134
- readonly addresses: readonly RevisionAddress[];
135
- /** The words a replacement removes. Empty for every other kind. */
136
- readonly replacedText: string;
137
- readonly revisionKind: ReviewRevisionKind;
138
- /** OOXML property-change element, used to resolve independently numbered formatting kinds. */
139
- readonly formattingKind?: string;
140
- /** Changed direct formatting values, ready for localized review summaries. */
141
- readonly formattingChanges?: readonly {
142
- readonly property: 'bold' | 'italic' | 'underline' | 'strike' | 'fontFamily' | 'fontSize' | 'color' | 'alignment' | 'leftIndent' | 'rightIndent' | 'firstLineIndent' | 'hangingIndent' | 'spaceBefore' | 'spaceAfter';
143
- /** New direct value; null means inherit. Sizes and distances are in points. */
144
- readonly value: string | null;
145
- }[];
146
- /** Newly applied proofing language codes in a tracked formatting change. */
147
- readonly formattingLanguages?: readonly string[];
148
- /**
149
- * WHICH decision a `paragraphMark` records, absent for every other kind.
150
- *
151
- * `EG_ParaRPrTrackChanges` is `ins? del? moveFrom? moveTo?`, and the four say opposite
152
- * things about one break. Without this a card called a deleted break an inserted one, which
153
- * is the reverse of what Accept on that card does.
154
- */
155
- readonly markDirection?: 'insert' | 'delete' | 'moveFrom' | 'moveTo';
156
- readonly author: string;
157
- readonly date?: string;
158
- /** Text the revision covers, for the card summary. Empty for changes with no characters. */
159
- readonly text: string;
160
- /** Every site this decision touches, in document order. */
161
- readonly ranges: readonly ReviewRange[];
162
- /**
163
- * How deeply this change is NESTED inside other changes, 0 for an unenclosed one.
164
- *
165
- * `w:ins` wrapping `w:del` is content one reviewer added and another struck. Both stay
166
- * pending, so both are cards, over one identical range — and a range then cannot say which
167
- * change a caret is in. Word treats the innermost as the operative one, so it wins the caret
168
- * and the change enclosing it stays listed and reachable.
169
- */
170
- readonly nesting: number;
171
- /**
172
- * How many leading `ranges` are the STRUCK half of a replacement.
173
- *
174
- * A replacement's card is one decision but its ranges are two colours — red over what is
175
- * going, green over what takes its place. ABSENT when the halves do not split at a single
176
- * point, which is what a file recording both under one revision id can produce; a surface
177
- * then has no basis for two colours and should paint one neutral band rather than guess.
178
- */
179
- readonly replacedRangeCount?: number;
180
- /**
181
- * True when the engine cannot resolve this kind, so accept and reject must not be offered.
182
- *
183
- * Derived by the DERIVATION rather than from a caller-supplied predicate: the refusal list
184
- * is internal, and a surface asked to compute it would have to guess. A card that offers a
185
- * button the engine will refuse is worse than one that explains why it cannot.
186
- */
187
- readonly readOnly: boolean;
188
- /** The other half of a move, or the other side of a delete/insert replacement. */
189
- readonly pairedWith?: string;
190
- /**
191
- * Comments answering this change, in document order.
192
- *
193
- * A reply to a tracked change IS a comment: `w:ins` and `w:del` carry no body, so the text
194
- * is written as a comment over the revision's own range and the range is what links them.
195
- */
196
- readonly replyIds: readonly string[];
197
- }
198
- /**
199
- * One comment as a review card. A reply carries `parentId`; OOXML gives replies no separate
200
- * element, so threads are reconstructed from that link.
201
- */
202
- interface ReviewCommentItem {
203
- readonly kind: 'comment';
204
- readonly id: string;
205
- readonly comment: CommentRecord;
206
- readonly range: ReviewRange | null;
207
- readonly resolved: boolean;
208
- /** The comment this replies to, absent for a top-level comment. */
209
- readonly parentId?: string;
210
- /** The REVISION this comment answers, when it covers exactly that change's characters. */
211
- readonly parentRevisionId?: string;
212
- /** Replies to this comment, in document order. Empty for a reply or a childless comment. */
213
- readonly replyIds: readonly string[];
214
- /** True when the file gave this comment no usable range. */
215
- readonly orphaned: boolean;
216
- }
217
- /**
218
- * A card contributed by a recognized custom node (`defineCustomNode` with a `reviewCard`
219
- * hook), anchored at the node's range.
220
- *
221
- * Informational, never resolvable: there is nothing to accept or reject, so the engine
222
- * refuses those verbs on it. `title` and `detail` are HOST-authored (the definition's hook
223
- * produced them), but `attrs` and `text` originate in a file an attacker controls — a
224
- * surface renders every one of these as text, never markup.
225
- */
226
- interface ReviewCustomItem {
227
- readonly kind: 'custom';
228
- /** The SDT node's stable id in the canonical tree. */
229
- readonly id: string;
230
- /** The definition's `name`. */
231
- readonly name: string;
232
- /** The raw `w:tag` the node was recognized from. Untrusted input. */
233
- readonly tag: string;
234
- /** Attrs decoded from the tag, after the definition's recognition hook. Untrusted input. */
235
- readonly attrs: Readonly<Record<string, string>>;
236
- /** The SDT's literal content text. Untrusted input. */
237
- readonly text: string;
238
- /**
239
- * The payload the node's control binds to, after the definition validated it.
240
- *
241
- * Undefined when the node carries none or the payload did not match — see the pro package's
242
- * `RecognizedCustomNode.data`, which this is carried from.
243
- */
244
- readonly data?: unknown;
245
- /**
246
- * Whether this node asked for a sidebar card.
247
- *
248
- * False for a definition with no `reviewCard`: the item exists so the chip's own surfaces can
249
- * read `attrs`, `text` and `data` off it, and the rail leaves it out. A surface listing cards
250
- * filters on this rather than on an empty `title`.
251
- */
252
- readonly carded: boolean;
253
- /** Card title, from the definition's `reviewCard` hook. Empty when `carded` is false. */
254
- readonly title: string;
255
- /** Card body, from the definition's `reviewCard` hook. */
256
- readonly detail?: string;
257
- /**
258
- * Glyph for this node in the collapsed rail, as an SVG path in a `0 -960 960 960` viewBox.
259
- *
260
- * A PATH rather than a rendered node because this item crosses core, which is DOM-free and
261
- * React-free — the same reason `title` and `detail` are strings. A host that wants arbitrary
262
- * markup overrides the `Markers` part's `icon` instead, which lives in the adapter where JSX
263
- * belongs. Absent falls back to the generic custom-node glyph.
264
- *
265
- * HOST-AUTHORED, never file data: it is interpolated into an SVG `d` attribute, and a path
266
- * taken from a document would be attacker-controlled markup.
267
- */
268
- readonly icon?: string;
269
- readonly range: ReviewRange | null;
270
- }
271
- /**
272
- * One pending decision in the review queue: a tracked change, a comment thread, or a pro
273
- * custom-node card. Discriminate on `kind`.
274
- *
275
- * The store's own derivation (`collectReviewItems`) only ever produces the first two; the
276
- * `kind: 'custom'` card is contributed by the pro review module, which recognizes the node.
277
- */
278
- type ReviewItem = ReviewRevisionItem | ReviewCommentItem | ReviewCustomItem;
279
- /** What the review queue derivation reads: one story part plus its comment parts. */
280
- interface ReviewModelInput {
281
- /** The story the ranges live in — the main document, a header, a note. */
282
- readonly storyPart: OoxmlPart;
283
- /**
284
- * Header/footer story parts, in section order. Their revisions and comment anchors join
285
- * the queue: a tracked change in a header is a pending decision like any other, and a
286
- * queue that only walked the body silently hid it from the rail AND from Accept All.
287
- */
288
- readonly furnitureParts?: readonly OoxmlPart[] | undefined;
289
- /** `word/comments.xml`, absent when the package has none. */
290
- readonly commentsPart?: OoxmlPart | undefined;
291
- /** `word/commentsExtended.xml`, absent when the package has none. */
292
- readonly commentsExtendedPart?: OoxmlPart | undefined;
293
- /**
294
- * Custom node definitions from the module registry, forwarded OPAQUELY.
295
- *
296
- * Core carries them the way the registry does — as unknowns — so the definition shape
297
- * stays a capability-package concern. The pro derivation narrows them and contributes
298
- * `kind: 'custom'` cards for definitions that opted in.
299
- */
300
- readonly customNodes?: readonly unknown[] | undefined;
301
- /**
302
- * Where a capability package reports a node it could not read. Supplied per editor, so a page
303
- * with two of them keeps their diagnostics apart.
304
- */
305
- readonly reportCustomNodeDiagnostic?: ((diagnostic: unknown) => void) | undefined;
306
- /**
307
- * The payload each of the story's controls binds to, keyed by the control's node id.
308
- *
309
- * Resolved by the ENGINE and handed over, because a payload lives in a customXml data part
310
- * and a derivation that only receives story parts has no way to reach one. Untrusted file
311
- * input on both members; a capability package validates it against whatever shape it
312
- * declared before handing it to a host.
313
- */
314
- readonly customNodePayloads?: ReadonlyMap<string, {
315
- readonly nodeId: string;
316
- readonly label: string;
317
- readonly data: string;
318
- }> | undefined;
319
- }
320
- /** The stable key a surface uses for the active item and for a React list. */
321
- declare function reviewItemKey(item: ReviewItem): string;
322
- /** Every range a decision touches. One card can cover several, in different paragraphs. */
323
- declare function reviewItemRanges(item: ReviewItem): readonly ReviewRange[];
324
- /** The first range of an item, in authored order, or null when it has none. */
325
- declare function firstReviewRange(item: ReviewItem): ReviewRange | null;
326
- /**
327
- * A single comparable number for document order.
328
- *
329
- * Paragraph index dominates offset, so a revision spanning paragraphs still sorts by where it
330
- * STARTS. An item with no resolvable range sorts last rather than to position zero, which is
331
- * where an orphan used to land — tearing an orphaned reply out of its own thread.
332
- */
333
- declare function reviewItemPositionRank(item: ReviewItem, order: ReadonlyMap<string, number>): number;
334
- /**
335
- * Every item covering a position, innermost first.
336
- *
337
- * Returning the whole stack rather than one winner is what lets a surface offer cycling, a
338
- * stacked card, or a "1 of 3" affordance. A comment wrapping a revision used to be unreachable
339
- * because only the tightest range was ever returned.
340
- */
341
- declare function reviewItemsAt(items: readonly ReviewItem[], position: ReviewPosition, order: ReadonlyMap<string, number>): ReviewItem[];
342
- /**
343
- * The item the caret is in, or null.
344
- *
345
- * A resolved comment never activates: a settled thread must not reopen itself as the reviewer
346
- * types near it.
347
- *
348
- * A REPLY resolves to the thread it belongs to. A reply is anchored over its parent's range,
349
- * so both cover the caret — and the reply, being newer, wins the innermost test. It is not a
350
- * card of its own (it renders inside its parent's), so the thread would have gone active with
351
- * nothing on screen showing it: the reply box vanished from a comment the moment somebody
352
- * replied to it.
353
- */
354
- declare function activeReviewItem(items: readonly ReviewItem[], position: ReviewPosition, order: ReadonlyMap<string, number>): ReviewItem | null;
355
- /**
356
- * Walk a reply up to the card that heads its thread. Guarded against a cyclic file.
357
- *
358
- * The head is not always a comment. A reply to a tracked change renders inside the REVISION's
359
- * card, so resolving it to itself opened an item nothing on screen was drawing — the reply box
360
- * vanished the moment somebody answered a change.
361
- *
362
- * EXPORTED because the paginated surface answers "which card is open" itself, against its own
363
- * dismissed-key state, rather than through {@link activeReviewItem}. Two copies of the
364
- * innermost-wins rule was survivable while a reply could only be a comment — the parent came
365
- * first in `comments.xml` order and won the tie by accident. It stopped being survivable the
366
- * moment a reply could answer a revision, which outranks it outright.
367
- */
368
- declare function reviewThreadRootOf(items: readonly ReviewItem[], comment: ReviewCommentItem): ReviewItem;
369
-
370
- export { type CommentRecord as C, type ReviewModelInput as R, W15_NAMESPACE_URI as W, type ReviewItem as a, type ReviewRevisionItem as b, type ReviewCommentItem as c, type ReviewCustomItem as d, type ReviewPosition as e, type ReviewRange as f, type ReviewRevisionKind as g, type CommentAnchor as h, type CommentPosition as i, type CommentThreadState as j, activeReviewItem as k, firstReviewRange as l, reviewItemPositionRank as m, reviewItemRanges as n, reviewItemsAt as o, reviewThreadRootOf as p, commentAnchorsOfStory as q, reviewItemKey as r, commentsOfPart as s, hasAnyComment as t, threadStateOfPart as u };