@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.
- package/dist/ai-edits/headless.d.ts +8 -5
- package/dist/ai-edits/headless.js +49 -26
- package/dist/ai-edits/pending-suggestions.d.ts +9 -0
- package/dist/ai-edits/pending-suggestions.js +13 -3
- package/dist/ai-edits/read.js +33 -4
- package/dist/ai-edits/table-geometry.js +12 -4
- package/dist/ai-edits/types.d.ts +9 -4
- package/dist/canonical/batchCommentReferences.js +2 -1
- package/dist/canonical/canonicalBatchReview.js +5 -8
- package/dist/canonical/canonicalComments.js +8 -2
- package/dist/canonical/canonicalCompilerRefusal.d.ts +2 -4
- package/dist/canonical/canonicalCompilerRefusal.js +20 -14
- package/dist/canonical/canonicalInlineProjection.d.ts +2 -2
- package/dist/canonical/canonicalInlineProjection.js +2 -2
- package/dist/canonical/canonicalProjectionBlocks.d.ts +10 -1
- package/dist/canonical/canonicalPublicOperations.js +214 -107
- package/dist/canonical/canonicalSeedContent.d.ts +18 -3
- package/dist/canonical/canonicalSeedContent.js +28 -15
- package/dist/canonical/canonicalSession.d.ts +22 -12
- package/dist/canonical/canonicalSession.js +181 -187
- package/dist/controller/canonicalClipboard.d.ts +3 -2
- package/dist/controller/canonicalClipboard.js +377 -58
- package/dist/controller/canonicalComposition.js +67 -14
- package/dist/controller/canonicalContentControlValue.js +7 -7
- package/dist/controller/canonicalReview.d.ts +21 -0
- package/dist/controller/canonicalReview.js +44 -9
- package/dist/controller/canonicalStoryEditor.js +2 -0
- package/dist/controller/canonicalStructure.d.ts +1 -2
- package/dist/controller/canonicalStructure.js +51 -24
- package/dist/controller/fontReadiness.js +50 -23
- package/dist/controller/hiddenEditorManager.js +7 -20
- package/dist/docx/bulletMarkers.d.ts +8 -0
- package/dist/docx/bulletMarkers.js +9 -1
- package/dist/docx/canonicalSessionInput.js +25 -11
- package/dist/docx/ensureParaIds.d.ts +31 -0
- package/dist/docx/ensureParaIds.js +57 -32
- package/dist/docx/ensureUniqueControlIds.d.ts +13 -0
- package/dist/docx/ensureUniqueControlIds.js +47 -29
- package/dist/docx/ensureUniqueRevisionIds.d.ts +13 -0
- package/dist/docx/ensureUniqueRevisionIds.js +52 -29
- package/dist/docx/importedIdCollisions.js +29 -4
- package/dist/docx/server/templatePlan/apply.js +108 -9
- package/dist/docx/server/templatePlan/blocks.d.ts +77 -5
- package/dist/docx/server/templatePlan/blocks.js +281 -14
- package/dist/docx/server/templatePlan/builders.d.ts +22 -1
- package/dist/docx/server/templatePlan/builders.js +37 -3
- package/dist/docx/server/templatePlan/effects.d.ts +27 -0
- package/dist/docx/server/templatePlan/effects.js +188 -0
- package/dist/docx/server/templatePlan/emit.d.ts +4 -1
- package/dist/docx/server/templatePlan/emit.js +152 -8
- package/dist/docx/server/templatePlan/inspect.js +21 -1
- package/dist/docx/server/templatePlan/labels.js +16 -1
- package/dist/docx/server/templatePlan/plan.d.ts +35 -3
- package/dist/docx/server/templatePlan/plan.js +197 -20
- package/dist/docx/server/templatePlan/planShape.js +58 -22
- package/dist/docx/server/templatePlan/revisions.d.ts +101 -0
- package/dist/docx/server/templatePlan/revisions.js +681 -0
- package/dist/docx/server/templatePlan/story.d.ts +61 -2
- package/dist/docx/server/templatePlan/story.js +175 -13
- package/dist/docx/server/templatePlan/types.d.ts +313 -1
- package/dist/docx/server/templatePlan/verify.js +175 -12
- package/dist/docx/server/templatePlan/xml.d.ts +3 -0
- package/dist/docx/server/templatePlan/xml.js +4 -1
- package/dist/docx/settingsHeaderFooterUpdate.d.ts +1 -1
- package/dist/docx/tableGridXml.d.ts +3 -7
- package/dist/docx/tableGridXml.js +5 -13
- package/dist/layout-bridge/convert/footnoteLayout.js +34 -8
- package/dist/prosemirror/canonicalMarkupDocument.d.ts +20 -0
- package/dist/prosemirror/canonicalMarkupDocument.js +73 -0
- package/dist/prosemirror/canonicalTableCommands.d.ts +1 -1
- package/dist/prosemirror/canonicalTableCommands.js +1 -3
- package/dist/prosemirror/commands/comments.d.ts +6 -234
- package/dist/prosemirror/commands/comments.js +5 -2464
- package/dist/prosemirror/commands/index.d.ts +4 -2
- package/dist/prosemirror/commands/index.js +4 -2
- package/dist/prosemirror/conversion/markupViewSource.d.ts +17 -0
- package/dist/prosemirror/conversion/markupViewSource.js +11 -0
- package/dist/prosemirror/conversion/toProseDoc.d.ts +3 -0
- package/dist/prosemirror/conversion/toProseDoc.js +31 -14
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +6 -8
- package/dist/prosemirror/hyperlinkRemoval.d.ts +11 -8
- package/dist/prosemirror/hyperlinkRemoval.js +24 -15
- package/dist/prosemirror/independentMarkupProjection.d.ts +27 -0
- package/dist/prosemirror/independentMarkupProjection.js +147 -0
- package/dist/prosemirror/markupViewNotes.d.ts +1 -1
- package/dist/prosemirror/markupViewNotes.js +24 -27
- package/dist/prosemirror/markupViewPositionMap.d.ts +16 -0
- package/dist/prosemirror/markupViewPositionMap.js +316 -0
- package/dist/prosemirror/markupViewProjection.d.ts +3 -46
- package/dist/prosemirror/markupViewProjection.js +90 -17
- package/dist/prosemirror/paraIds.d.ts +1 -14
- package/dist/prosemirror/paraIds.js +1 -14
- package/dist/prosemirror/paragraphMarkJoin.d.ts +0 -16
- package/dist/prosemirror/paragraphMarkJoin.js +3 -46
- package/dist/prosemirror/projectionReview.d.ts +49 -0
- package/dist/prosemirror/projectionReview.js +292 -0
- package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +1 -13
- package/dist/prosemirror/rebaseParagraphRunFormatting.js +1 -16
- package/dist/prosemirror/replacedAnnotations.d.ts +6 -83
- package/dist/prosemirror/replacedAnnotations.js +11 -203
- package/dist/prosemirror/revisionCarriers.d.ts +9 -1
- package/dist/prosemirror/revisionCarriers.js +15 -1
- package/dist/prosemirror/revisionRangeQueries.d.ts +32 -0
- package/dist/prosemirror/revisionRangeQueries.js +76 -0
- package/dist/prosemirror/runFormattingMarkNames.d.ts +1 -1
- package/dist/prosemirror/runFormattingMarkNames.js +1 -1
- package/dist/prosemirror/styles/styleResolver.d.ts +1 -0
- package/dist/prosemirror/styles/styleResolver.js +4 -1
- package/dist/prosemirror/suggestionQueries.d.ts +114 -0
- package/dist/prosemirror/suggestionQueries.js +320 -0
- package/dist/prosemirror/tableGridMutation.d.ts +1 -16
- package/dist/prosemirror/tableGridMutation.js +1 -78
- package/dist/prosemirror/tableRowRevisionOwnership.d.ts +18 -0
- package/dist/prosemirror/tableRowRevisionOwnership.js +7 -0
- package/dist/prosemirror/utils/extractTrackedChanges.js +14 -4
- package/dist/server.d.ts +2 -2
- package/dist/types/canonicalCapabilities.d.ts +4 -35
- package/dist/types/canonicalCapabilities.js +4 -33
- package/package.json +2 -2
- package/dist/internal/headlessRevisionResolutionGuard.d.ts +0 -3
- package/dist/internal/headlessRevisionResolutionGuard.js +0 -18
- package/dist/internal/revisionResolutionEdits.d.ts +0 -11
- package/dist/internal/revisionResolutionEdits.js +0 -18
- package/dist/internal/revisionResolutionInline.d.ts +0 -24
- package/dist/internal/revisionResolutionInline.js +0 -302
- package/dist/internal/revisionResolutionStep.d.ts +0 -32
- package/dist/internal/revisionResolutionStep.js +0 -282
- package/dist/internal/revisionResolutionTracking.d.ts +0 -9
- package/dist/internal/revisionResolutionTracking.js +0 -124
- package/dist/internal/wholeStoryRevisionResolution.d.ts +0 -56
- package/dist/internal/wholeStoryRevisionResolution.js +0 -783
- package/dist/prosemirror/commands/resolveAllTableChanges.d.ts +0 -38
- package/dist/prosemirror/commands/resolveAllTableChanges.js +0 -642
- package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.d.ts +0 -13
- package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.js +0 -45
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +0 -18
- package/dist/prosemirror/commands/tableCellMergeResolution.js +0 -207
- package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +0 -60
- package/dist/prosemirror/commands/tableMergeFoldDecisions.js +0 -78
- package/dist/prosemirror/rejoinRunCarriers.d.ts +0 -42
- package/dist/prosemirror/rejoinRunCarriers.js +0 -65
- package/dist/prosemirror/runPropertyChangeResolution.d.ts +0 -15
- 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[]) =>
|
|
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) =>
|
|
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[]) =>
|
|
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 =
|
|
5
|
-
|
|
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 =
|
|
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 !==
|
|
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
|
|
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 !==
|
|
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
|
|
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 !==
|
|
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
|
|
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
|
|
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
|
-
|
|
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>;
|