@stll/folio-core 0.75.0 → 0.77.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 (143) hide show
  1. package/dist/ai-edits/headless.d.ts +8 -5
  2. package/dist/ai-edits/headless.js +49 -26
  3. package/dist/ai-edits/pending-suggestions.d.ts +9 -0
  4. package/dist/ai-edits/pending-suggestions.js +13 -3
  5. package/dist/ai-edits/read.js +33 -4
  6. package/dist/ai-edits/table-geometry.js +12 -4
  7. package/dist/ai-edits/types.d.ts +9 -4
  8. package/dist/canonical/batchCommentReferences.js +2 -1
  9. package/dist/canonical/canonicalBatchReview.js +5 -8
  10. package/dist/canonical/canonicalComments.js +8 -2
  11. package/dist/canonical/canonicalCompilerRefusal.d.ts +2 -4
  12. package/dist/canonical/canonicalCompilerRefusal.js +20 -14
  13. package/dist/canonical/canonicalInlineProjection.d.ts +2 -2
  14. package/dist/canonical/canonicalInlineProjection.js +2 -2
  15. package/dist/canonical/canonicalProjectionBlocks.d.ts +10 -1
  16. package/dist/canonical/canonicalPublicOperations.js +214 -107
  17. package/dist/canonical/canonicalSeedContent.d.ts +18 -3
  18. package/dist/canonical/canonicalSeedContent.js +28 -15
  19. package/dist/canonical/canonicalSession.d.ts +22 -12
  20. package/dist/canonical/canonicalSession.js +181 -187
  21. package/dist/controller/canonicalClipboard.d.ts +3 -2
  22. package/dist/controller/canonicalClipboard.js +377 -58
  23. package/dist/controller/canonicalComposition.js +67 -14
  24. package/dist/controller/canonicalContentControlValue.js +7 -7
  25. package/dist/controller/canonicalReview.d.ts +21 -0
  26. package/dist/controller/canonicalReview.js +44 -9
  27. package/dist/controller/canonicalStoryEditor.js +2 -0
  28. package/dist/controller/canonicalStructure.d.ts +1 -2
  29. package/dist/controller/canonicalStructure.js +51 -24
  30. package/dist/controller/fontReadiness.js +50 -23
  31. package/dist/controller/hiddenEditorManager.js +7 -20
  32. package/dist/docx/bulletMarkers.d.ts +8 -0
  33. package/dist/docx/bulletMarkers.js +9 -1
  34. package/dist/docx/canonicalSessionInput.js +25 -11
  35. package/dist/docx/ensureParaIds.d.ts +31 -0
  36. package/dist/docx/ensureParaIds.js +57 -32
  37. package/dist/docx/ensureUniqueControlIds.d.ts +13 -0
  38. package/dist/docx/ensureUniqueControlIds.js +47 -29
  39. package/dist/docx/ensureUniqueRevisionIds.d.ts +13 -0
  40. package/dist/docx/ensureUniqueRevisionIds.js +52 -29
  41. package/dist/docx/importedIdCollisions.js +29 -4
  42. package/dist/docx/server/templatePlan/apply.js +108 -9
  43. package/dist/docx/server/templatePlan/blocks.d.ts +77 -5
  44. package/dist/docx/server/templatePlan/blocks.js +281 -14
  45. package/dist/docx/server/templatePlan/builders.d.ts +22 -1
  46. package/dist/docx/server/templatePlan/builders.js +37 -3
  47. package/dist/docx/server/templatePlan/effects.d.ts +27 -0
  48. package/dist/docx/server/templatePlan/effects.js +188 -0
  49. package/dist/docx/server/templatePlan/emit.d.ts +4 -1
  50. package/dist/docx/server/templatePlan/emit.js +152 -8
  51. package/dist/docx/server/templatePlan/inspect.js +21 -1
  52. package/dist/docx/server/templatePlan/labels.js +16 -1
  53. package/dist/docx/server/templatePlan/plan.d.ts +35 -3
  54. package/dist/docx/server/templatePlan/plan.js +197 -20
  55. package/dist/docx/server/templatePlan/planShape.js +58 -22
  56. package/dist/docx/server/templatePlan/revisions.d.ts +101 -0
  57. package/dist/docx/server/templatePlan/revisions.js +681 -0
  58. package/dist/docx/server/templatePlan/story.d.ts +61 -2
  59. package/dist/docx/server/templatePlan/story.js +175 -13
  60. package/dist/docx/server/templatePlan/types.d.ts +313 -1
  61. package/dist/docx/server/templatePlan/verify.js +175 -12
  62. package/dist/docx/server/templatePlan/xml.d.ts +3 -0
  63. package/dist/docx/server/templatePlan/xml.js +4 -1
  64. package/dist/docx/settingsHeaderFooterUpdate.d.ts +1 -1
  65. package/dist/docx/tableGridXml.d.ts +3 -7
  66. package/dist/docx/tableGridXml.js +5 -13
  67. package/dist/layout-bridge/convert/footnoteLayout.js +34 -8
  68. package/dist/prosemirror/canonicalMarkupDocument.d.ts +20 -0
  69. package/dist/prosemirror/canonicalMarkupDocument.js +73 -0
  70. package/dist/prosemirror/canonicalTableCommands.d.ts +1 -1
  71. package/dist/prosemirror/canonicalTableCommands.js +1 -3
  72. package/dist/prosemirror/commands/comments.d.ts +6 -234
  73. package/dist/prosemirror/commands/comments.js +5 -2464
  74. package/dist/prosemirror/commands/index.d.ts +4 -2
  75. package/dist/prosemirror/commands/index.js +4 -2
  76. package/dist/prosemirror/conversion/markupViewSource.d.ts +17 -0
  77. package/dist/prosemirror/conversion/markupViewSource.js +11 -0
  78. package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -0
  79. package/dist/prosemirror/conversion/toProseDoc.js +31 -14
  80. package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +6 -8
  81. package/dist/prosemirror/hyperlinkRemoval.d.ts +11 -8
  82. package/dist/prosemirror/hyperlinkRemoval.js +24 -15
  83. package/dist/prosemirror/independentMarkupProjection.d.ts +27 -0
  84. package/dist/prosemirror/independentMarkupProjection.js +147 -0
  85. package/dist/prosemirror/markupViewNotes.d.ts +1 -1
  86. package/dist/prosemirror/markupViewNotes.js +24 -27
  87. package/dist/prosemirror/markupViewPositionMap.d.ts +16 -0
  88. package/dist/prosemirror/markupViewPositionMap.js +316 -0
  89. package/dist/prosemirror/markupViewProjection.d.ts +3 -46
  90. package/dist/prosemirror/markupViewProjection.js +90 -17
  91. package/dist/prosemirror/paraIds.d.ts +1 -14
  92. package/dist/prosemirror/paraIds.js +1 -14
  93. package/dist/prosemirror/paragraphMarkJoin.d.ts +0 -16
  94. package/dist/prosemirror/paragraphMarkJoin.js +3 -46
  95. package/dist/prosemirror/projectionReview.d.ts +49 -0
  96. package/dist/prosemirror/projectionReview.js +292 -0
  97. package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +1 -13
  98. package/dist/prosemirror/rebaseParagraphRunFormatting.js +1 -16
  99. package/dist/prosemirror/replacedAnnotations.d.ts +6 -83
  100. package/dist/prosemirror/replacedAnnotations.js +11 -203
  101. package/dist/prosemirror/revisionCarriers.d.ts +9 -1
  102. package/dist/prosemirror/revisionCarriers.js +15 -1
  103. package/dist/prosemirror/revisionRangeQueries.d.ts +32 -0
  104. package/dist/prosemirror/revisionRangeQueries.js +76 -0
  105. package/dist/prosemirror/runFormattingMarkNames.d.ts +1 -1
  106. package/dist/prosemirror/runFormattingMarkNames.js +1 -1
  107. package/dist/prosemirror/styles/styleResolver.d.ts +1 -0
  108. package/dist/prosemirror/styles/styleResolver.js +4 -1
  109. package/dist/prosemirror/suggestionQueries.d.ts +114 -0
  110. package/dist/prosemirror/suggestionQueries.js +320 -0
  111. package/dist/prosemirror/tableGridMutation.d.ts +1 -16
  112. package/dist/prosemirror/tableGridMutation.js +1 -78
  113. package/dist/prosemirror/tableRowRevisionOwnership.d.ts +18 -0
  114. package/dist/prosemirror/tableRowRevisionOwnership.js +7 -0
  115. package/dist/prosemirror/utils/extractTrackedChanges.js +14 -4
  116. package/dist/server.d.ts +2 -2
  117. package/dist/types/canonicalCapabilities.d.ts +4 -35
  118. package/dist/types/canonicalCapabilities.js +4 -33
  119. package/package.json +2 -2
  120. package/dist/internal/headlessRevisionResolutionGuard.d.ts +0 -3
  121. package/dist/internal/headlessRevisionResolutionGuard.js +0 -18
  122. package/dist/internal/revisionResolutionEdits.d.ts +0 -11
  123. package/dist/internal/revisionResolutionEdits.js +0 -18
  124. package/dist/internal/revisionResolutionInline.d.ts +0 -24
  125. package/dist/internal/revisionResolutionInline.js +0 -302
  126. package/dist/internal/revisionResolutionStep.d.ts +0 -32
  127. package/dist/internal/revisionResolutionStep.js +0 -282
  128. package/dist/internal/revisionResolutionTracking.d.ts +0 -9
  129. package/dist/internal/revisionResolutionTracking.js +0 -124
  130. package/dist/internal/wholeStoryRevisionResolution.d.ts +0 -56
  131. package/dist/internal/wholeStoryRevisionResolution.js +0 -783
  132. package/dist/prosemirror/commands/resolveAllTableChanges.d.ts +0 -38
  133. package/dist/prosemirror/commands/resolveAllTableChanges.js +0 -642
  134. package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.d.ts +0 -13
  135. package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.js +0 -45
  136. package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -18
  137. package/dist/prosemirror/commands/tableCellMergeResolution.js +0 -207
  138. package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +0 -60
  139. package/dist/prosemirror/commands/tableMergeFoldDecisions.js +0 -78
  140. package/dist/prosemirror/rejoinRunCarriers.d.ts +0 -42
  141. package/dist/prosemirror/rejoinRunCarriers.js +0 -65
  142. package/dist/prosemirror/runPropertyChangeResolution.d.ts +0 -15
  143. package/dist/prosemirror/runPropertyChangeResolution.js +0 -34
@@ -1,11 +1,26 @@
1
1
  import { document_d_exports } from "../types/document.js";
2
2
  import { OpStory } from "@stll/docx-core/ops";
3
+ /**
4
+ * What makes a story one the session cannot hold:
5
+ *
6
+ * - `comments`: the comments and their anchors are not a valid set, as
7
+ * `commentDocumentIssue` judges them;
8
+ * - `emptyStory`: a story holds no block;
9
+ * - `content`: a block or inline item no document operation writes, such as
10
+ * unstructured field characters or text holding a tab or a line feed. The
11
+ * reader keeps loose field markup as preserved XML, so only a document
12
+ * built by hand holds one.
13
+ */
14
+ export type CanonicalSeedIssue = {
15
+ kind: "comments" | "emptyStory" | "content";
16
+ message: string;
17
+ };
3
18
  /**
4
19
  * Why the session cannot hold these stories of `document`, or `null`: the
5
20
  * first block it cannot hold, else the first paragraph whose content it
6
21
  * cannot hold, in each story in turn.
7
22
  */
8
- export declare const unsupportedSeedReason: (document: document_d_exports.Document, stories?: OpStory[]) => string | null;
23
+ export declare const unsupportedSeedReason: (document: document_d_exports.Document, stories?: OpStory[]) => CanonicalSeedIssue | null;
9
24
  /** The blocks of a story an edit replaced, and the ones it put in their place. */
10
25
  export declare const changedWindow: (before: readonly document_d_exports.BlockContent[], after: readonly document_d_exports.BlockContent[]) => {
11
26
  removed: readonly document_d_exports.BlockContent[];
@@ -27,10 +42,10 @@ type UnsupportedEditOptions = {
27
42
  * and the stories are the ones `previous` had and each story's replaced
28
43
  * blocks carried the anchors its new blocks carry, it stays as it was.
29
44
  */
30
- export declare const unsupportedEditReason: ({ previous, document, stories }: UnsupportedEditOptions) => string | null;
45
+ export declare const unsupportedEditReason: ({ previous, document, stories }: UnsupportedEditOptions) => CanonicalSeedIssue | null;
31
46
  /**
32
47
  * The same verdict from one walk of every story, judging nothing once: the
33
48
  * reference the block judgments above must equal.
34
49
  */
35
- export declare const unsupportedSeedReasonWholeDocument: (document: document_d_exports.Document, stories?: OpStory[]) => string | null;
50
+ export declare const unsupportedSeedReasonWholeDocument: (document: document_d_exports.Document, stories?: OpStory[]) => CanonicalSeedIssue | null;
36
51
  export {};
@@ -1,8 +1,22 @@
1
1
  import { canonicalInlineSourceIssue } from "./canonicalInlineProjection.js";
2
2
  import { OP_STORIES, commentAnchorSequence, commentDocumentIssue, documentStories, findStoryBody } from "@stll/docx-core/ops";
3
3
  // src/canonical/canonicalSeedContent.ts
4
- const STRUCTURE_ISSUE = "Canonical sessions currently require paragraphs, tables and supported inline atoms.";
5
- const REVIEW_CARRIER_ISSUE = "Canonical sessions currently require plain paragraphs and supported inline atoms.";
4
+ const STRUCTURE_ISSUE = {
5
+ kind: "content",
6
+ message: "Canonical sessions currently require paragraphs, tables and supported inline atoms."
7
+ };
8
+ const EMPTY_STORY_ISSUE = {
9
+ kind: "emptyStory",
10
+ message: "Canonical sessions require a nonempty paragraph story."
11
+ };
12
+ const contentIssue = (message) => message === null ? null : {
13
+ kind: "content",
14
+ message
15
+ };
16
+ const commentIssueOf = (message) => message === void 0 ? null : {
17
+ kind: "comments",
18
+ message
19
+ };
6
20
  /** Range markers may open or close between blocks; they hold no text. */
7
21
  const BETWEEN_BLOCK_MARKERS = /* @__PURE__ */ new Set([
8
22
  "commentRangeStart",
@@ -40,7 +54,7 @@ const issuesIn = (block) => {
40
54
  const structure = collect([block]);
41
55
  let paragraph = null;
42
56
  for (const candidate of paragraphs) {
43
- paragraph = candidate.reviewCarrier === void 0 ? canonicalInlineSourceIssue(candidate.content) : REVIEW_CARRIER_ISSUE;
57
+ paragraph = contentIssue(canonicalInlineSourceIssue(candidate.content));
44
58
  if (paragraph !== null) break;
45
59
  }
46
60
  return {
@@ -63,8 +77,8 @@ const issuesOf = (block) => {
63
77
  * cannot hold, in each story in turn.
64
78
  */
65
79
  const unsupportedSeedReason = (document, stories = documentStories(document)) => {
66
- const commentIssue = commentDocumentIssue(document, "all");
67
- if (commentIssue !== void 0) return commentIssue;
80
+ const commentIssue = commentIssueOf(commentDocumentIssue(document, "all"));
81
+ if (commentIssue !== null) return commentIssue;
68
82
  for (const story of stories) {
69
83
  const body = findStoryBody(document, story);
70
84
  if (story !== OP_STORIES.MAIN && (story.kind === "footnote" || story.kind === "endnote")) {
@@ -72,7 +86,7 @@ const unsupportedSeedReason = (document, stories = documentStories(document)) =>
72
86
  if (note?.noteType !== void 0 && note.noteType !== "normal") continue;
73
87
  }
74
88
  const content = body?.content;
75
- if (!content || content.length === 0) return "Canonical sessions require a nonempty paragraph story.";
89
+ if (!content || content.length === 0) return EMPTY_STORY_ISSUE;
76
90
  const issues = content.map(issuesOf);
77
91
  const structure = issues.find((issue) => issue.structure !== null);
78
92
  if (structure !== void 0) return structure.structure;
@@ -115,12 +129,12 @@ const unsupportedEditReason = ({ previous, document, stories }) => {
115
129
  ...changedWindow(findStoryBody(previous, story)?.content ?? [], findStoryBody(document, story)?.content ?? [])
116
130
  }));
117
131
  if (!(document.package.document.comments === previous.package.document.comments && documentStories(document).length === documentStories(previous).length && windows.every(({ removed, added }) => sameSequence(commentAnchorSequence(removed), commentAnchorSequence(added))))) {
118
- const commentIssue = commentDocumentIssue(document, "all");
119
- if (commentIssue !== void 0) return commentIssue;
132
+ const commentIssue = commentIssueOf(commentDocumentIssue(document, "all"));
133
+ if (commentIssue !== null) return commentIssue;
120
134
  }
121
135
  for (const { story, content, added } of windows) {
122
136
  if (skippedNote(document, story)) continue;
123
- if (!content || content.length === 0) return "Canonical sessions require a nonempty paragraph story.";
137
+ if (!content || content.length === 0) return EMPTY_STORY_ISSUE;
124
138
  const issues = added.map(issuesOf);
125
139
  const structure = issues.find((issue) => issue.structure !== null);
126
140
  if (structure !== void 0) return structure.structure;
@@ -134,8 +148,8 @@ const unsupportedEditReason = ({ previous, document, stories }) => {
134
148
  * reference the block judgments above must equal.
135
149
  */
136
150
  const unsupportedSeedReasonWholeDocument = (document, stories = documentStories(document)) => {
137
- const commentIssue = commentDocumentIssue(document, "all");
138
- if (commentIssue !== void 0) return commentIssue;
151
+ const commentIssue = commentIssueOf(commentDocumentIssue(document, "all"));
152
+ if (commentIssue !== null) return commentIssue;
139
153
  for (const story of stories) {
140
154
  const body = findStoryBody(document, story);
141
155
  if (story !== OP_STORIES.MAIN && (story.kind === "footnote" || story.kind === "endnote")) {
@@ -143,7 +157,7 @@ const unsupportedSeedReasonWholeDocument = (document, stories = documentStories(
143
157
  if (note?.noteType !== void 0 && note.noteType !== "normal") continue;
144
158
  }
145
159
  const content = body?.content;
146
- if (!content || content.length === 0) return "Canonical sessions require a nonempty paragraph story.";
160
+ if (!content || content.length === 0) return EMPTY_STORY_ISSUE;
147
161
  const paragraphs = [];
148
162
  const collect = (blocks) => {
149
163
  for (const block of blocks) {
@@ -158,7 +172,7 @@ const unsupportedSeedReasonWholeDocument = (document, stories = documentStories(
158
172
  if (issue !== null) return issue;
159
173
  continue;
160
174
  }
161
- if (block.type !== "table") return "Canonical sessions currently require paragraphs, tables and supported inline atoms.";
175
+ if (block.type !== "table") return STRUCTURE_ISSUE;
162
176
  for (const row of block.rows) for (const cell of row.cells) {
163
177
  const issue = collect(cell.content);
164
178
  if (issue !== null) return issue;
@@ -169,8 +183,7 @@ const unsupportedSeedReasonWholeDocument = (document, stories = documentStories(
169
183
  const blockIssue = collect(content);
170
184
  if (blockIssue !== null) return blockIssue;
171
185
  for (const paragraph of paragraphs) {
172
- if (paragraph.reviewCarrier !== void 0) return "Canonical sessions currently require plain paragraphs and supported inline atoms.";
173
- const issue = canonicalInlineSourceIssue(paragraph.content);
186
+ const issue = contentIssue(canonicalInlineSourceIssue(paragraph.content));
174
187
  if (issue !== null) return issue;
175
188
  }
176
189
  }
@@ -112,13 +112,21 @@ declare class CanonicalProjection {
112
112
  * the state it was given is the projection without comparing every node.
113
113
  */
114
114
  heldAs(doc: Node): CanonicalProjection;
115
+ /**
116
+ * A paragraph's address, its text and gaps aligned on the first address:
117
+ * refused when its source and its editor node do not align.
118
+ */
115
119
  private addressOf;
120
+ /** {@link addressOf}, none for a paragraph it refuses. */
121
+ private alignedAddressOf;
116
122
  /**
117
123
  * The paragraph whose content holds `position`, its ends included: a
118
124
  * story paragraph, or one in a text box the story draws, which the
119
125
  * projection lists after its host as the story's own.
120
126
  */
121
127
  private paragraphAround;
128
+ /** Where {@link paragraphAround}'s paragraph stands. */
129
+ private slotAround;
122
130
  addressAt(position: number, edge?: CanonicalAddressEdge): Result<TextPosition, CanonicalSessionError>;
123
131
  /**
124
132
  * The source gaps a selection from `from` to `to` replaces between. Its
@@ -140,6 +148,7 @@ declare class CanonicalProjection {
140
148
  selectionAt(state: Pick<EditorState, "doc" | "selection">): Result<CanonicalSelection, CanonicalSessionError>;
141
149
  /** The first paragraph the projection addresses, in document order. */
142
150
  get firstParagraph(): ParagraphAddress | undefined;
151
+ /** A paragraph's address; none for one the projection cannot align. */
143
152
  paragraph(blockId: string): ParagraphAddress | undefined;
144
153
  /** The paragraph whose node starts at `before`. */
145
154
  paragraphStartingAt(before: number): ParagraphAddress | undefined;
@@ -165,8 +174,14 @@ type ProjectStoryOptions = {
165
174
  caches?: StoryProjectionCaches;
166
175
  /** A projection of the story whose top-level blocks this one may keep. */
167
176
  previous?: CanonicalProjection;
177
+ /**
178
+ * Align each paragraph's source with its node when the paragraph is first
179
+ * addressed, not now, unless it holds comments: for a session opening a
180
+ * story, which addresses few of its paragraphs before an edit.
181
+ */
182
+ deferInline?: boolean;
168
183
  };
169
- declare const project: ({ document, styles, story, caches, previous }: ProjectStoryOptions) => Result<CanonicalProjection, CanonicalSessionError>;
184
+ declare const project: ({ document, styles, story, caches, previous, deferInline }: ProjectStoryOptions) => Result<CanonicalProjection, CanonicalSessionError>;
170
185
  /** Input intent, never projection-step adjacency, determines the journal partition. */
171
186
  export type CanonicalInputSemantic = "typing" | "deleteBackward" | "deleteForward" | "paste" | "composition" | "replacement" | "structure";
172
187
  export type CanonicalCommit = {
@@ -320,16 +335,6 @@ declare class CanonicalSession {
320
335
  getCommittedComments(): document_d_exports.Comment[];
321
336
  setMode(mode: CanonicalSessionMode): void;
322
337
  hasStyle(styleId: string): boolean;
323
- /** How a replacement in the current mode removes the words it changes. */
324
- /**
325
- * A replacement cut into pieces at the comment boundaries it keeps, within
326
- * one paragraph: the last piece takes the text, the others are cleared, and
327
- * each is compiled after the ones behind it, so no earlier address moves.
328
- * The caret follows the new text, moved back by what the pieces before it
329
- * cleared.
330
- */
331
- private compileReplacementPieces;
332
- private replacementRemoval;
333
338
  private advanceBlockId;
334
339
  private freshBlockId;
335
340
  /**
@@ -468,12 +473,17 @@ declare class CanonicalSession {
468
473
  * revisions as ordinary tracked changes by `author`, keeping their ids, as
469
474
  * the editor does: the change then waits for review like any other. Its
470
475
  * comments stay as ordinary comments.
476
+ *
477
+ * With `story`, only the suggestion's part in that story resolves: its
478
+ * revisions there and the comments it anchors there. Its records in other
479
+ * stories stay pending, and resolve later the same way or whole.
471
480
  */
472
- prepareSuggestion(state: EditorState, { suggestionId, resolution, author, date }: {
481
+ prepareSuggestion(state: EditorState, { suggestionId, resolution, author, date, story: only }: {
473
482
  suggestionId: string;
474
483
  resolution: "accept" | "reject";
475
484
  author: string;
476
485
  date: string;
486
+ story?: OpStory;
477
487
  }): Result<CanonicalCommit, CanonicalSessionError>;
478
488
  projectStory(story: OpStory): Result<CanonicalProjection, CanonicalSessionError>;
479
489
  prepareOperations(state: EditorState, ops: readonly DocumentOp[]): Result<CanonicalCommit, CanonicalSessionError>;