@stll/folio-core 0.74.0 → 0.76.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/clean-text.d.ts +4 -1
- package/dist/ai-edits/clean-text.js +21 -7
- package/dist/ai-edits/headless.d.ts +7 -3
- package/dist/ai-edits/headless.js +36 -21
- package/dist/ai-edits/note-references.d.ts +1 -1
- package/dist/ai-edits/note-references.js +1 -1
- package/dist/ai-edits/pending-suggestions.d.ts +9 -7
- package/dist/ai-edits/pending-suggestions.js +135 -90
- package/dist/ai-edits/pendingJoin.d.ts +5 -1
- package/dist/ai-edits/pendingJoin.js +6 -2
- package/dist/ai-edits/read.js +9 -3
- package/dist/ai-edits/retired-comment-receipts.d.ts +2 -2
- package/dist/ai-edits/retired-comment-receipts.js +3 -18
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +6 -10
- package/dist/ai-edits/tracked-batch-fidelity.js +3 -182
- package/dist/ai-edits/types.d.ts +9 -4
- package/dist/canonical/batchCommentReferences.js +2 -1
- package/dist/canonical/canonicalBatchReview.d.ts +4 -1
- package/dist/canonical/canonicalBatchReview.js +37 -22
- package/dist/canonical/canonicalComments.d.ts +6 -2
- package/dist/canonical/canonicalComments.js +16 -6
- package/dist/canonical/canonicalCompilerRefusal.d.ts +2 -4
- package/dist/canonical/canonicalCompilerRefusal.js +20 -14
- package/dist/canonical/canonicalPublicOperations.js +231 -79
- package/dist/canonical/canonicalRefusalGrounds.d.ts +4 -0
- package/dist/canonical/canonicalRefusalGrounds.js +56 -0
- package/dist/canonical/canonicalSession.d.ts +12 -6
- package/dist/canonical/canonicalSession.js +119 -122
- package/dist/canonical/canonicalTrackedBatchFidelity.js +3 -3
- package/dist/compare/inline-atoms.d.ts +35 -41
- package/dist/compare/inline-atoms.js +2 -465
- package/dist/compare/section-boundary-properties.d.ts +3 -30
- package/dist/compare/section-boundary-properties.js +4 -72
- package/dist/controller/canonicalClipboard.d.ts +1 -1
- package/dist/controller/canonicalClipboard.js +110 -55
- package/dist/controller/canonicalComposition.d.ts +1 -1
- package/dist/controller/canonicalComposition.js +5 -5
- package/dist/controller/canonicalContentControlValue.js +7 -7
- package/dist/controller/canonicalInput.d.ts +4 -2
- package/dist/controller/canonicalInput.js +33 -16
- package/dist/controller/canonicalReview.d.ts +21 -0
- package/dist/controller/canonicalReview.js +44 -9
- package/dist/controller/canonicalStoryEditor.d.ts +2 -3
- package/dist/controller/canonicalStoryEditor.js +43 -25
- package/dist/controller/canonicalStructure.d.ts +19 -3
- package/dist/controller/canonicalStructure.js +182 -58
- package/dist/controller/deferredDisplayListPainter.d.ts +8 -0
- package/dist/controller/deferredDisplayListPainter.js +34 -0
- package/dist/controller/folioEditor.js +4 -2
- package/dist/controller/fontReadiness.js +50 -23
- package/dist/controller/headerFooterEditorManager.js +3 -17
- package/dist/controller/hiddenEditorApi.d.ts +24 -3
- package/dist/controller/hiddenEditorApi.js +2 -0
- package/dist/controller/hiddenEditorManager.js +135 -207
- package/dist/controller/layoutPipeline.d.ts +4 -86
- package/dist/controller/layoutPipeline.js +8 -727
- package/dist/controller/layoutPipelineExecution.d.ts +94 -0
- package/dist/controller/layoutPipelineExecution.js +730 -0
- package/dist/controller/noteEditorManager.js +3 -16
- package/dist/docx/blockContentParser.d.ts +1 -3
- package/dist/docx/blockContentParser.js +3 -10
- package/dist/docx/bulletMarkers.d.ts +8 -0
- package/dist/docx/bulletMarkers.js +9 -1
- package/dist/docx/canonicalSave.d.ts +4 -3
- package/dist/docx/canonicalSave.js +4 -3
- 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/listMarkerComputation.d.ts +24 -17
- package/dist/docx/listMarkerComputation.js +31 -60
- package/dist/docx/listModelNormalization.js +8 -15
- package/dist/docx/rezip.d.ts +16 -3
- package/dist/docx/rezip.js +35 -9
- package/dist/docx/selectiveSave.js +13 -5
- package/dist/docx/server/templatePlan/apply.js +96 -7
- package/dist/docx/server/templatePlan/blocks.d.ts +70 -3
- package/dist/docx/server/templatePlan/blocks.js +272 -10
- package/dist/docx/server/templatePlan/builders.d.ts +52 -2
- package/dist/docx/server/templatePlan/builders.js +224 -5
- 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 +46 -2
- package/dist/docx/server/templatePlan/inspect.js +39 -52
- package/dist/docx/server/templatePlan/labels.d.ts +7 -2
- package/dist/docx/server/templatePlan/labels.js +120 -23
- package/dist/docx/server/templatePlan/plan.d.ts +24 -3
- package/dist/docx/server/templatePlan/plan.js +54 -15
- package/dist/docx/server/templatePlan/planShape.js +76 -22
- package/dist/docx/server/templatePlan/revisions.d.ts +46 -0
- package/dist/docx/server/templatePlan/revisions.js +407 -0
- package/dist/docx/server/templatePlan/story.d.ts +23 -1
- package/dist/docx/server/templatePlan/story.js +60 -2
- package/dist/docx/server/templatePlan/types.d.ts +354 -16
- package/dist/docx/server/templatePlan/verify.js +164 -14
- package/dist/docx/server/templatePlan/xml.d.ts +3 -0
- package/dist/docx/server/templatePlan/xml.js +4 -1
- package/dist/i18n/messages/ar.gen.js +1 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +17 -0
- package/dist/i18n/messages/catalogs.gen.js +17 -0
- package/dist/i18n/messages/cs.gen.js +1 -0
- package/dist/i18n/messages/de.gen.js +1 -0
- package/dist/i18n/messages/en.gen.js +1 -0
- package/dist/i18n/messages/es.gen.js +1 -0
- package/dist/i18n/messages/et.gen.js +1 -0
- package/dist/i18n/messages/fr.gen.js +1 -0
- package/dist/i18n/messages/he.gen.js +1 -0
- package/dist/i18n/messages/hi.gen.js +1 -0
- package/dist/i18n/messages/hu.gen.js +1 -0
- package/dist/i18n/messages/lt.gen.js +1 -0
- package/dist/i18n/messages/lv.gen.js +1 -0
- package/dist/i18n/messages/messages.gen.d.ts +1 -0
- package/dist/i18n/messages/pl.gen.js +1 -0
- package/dist/i18n/messages/pt-BR.gen.js +1 -0
- package/dist/i18n/messages/sk.gen.js +1 -0
- package/dist/i18n/messages/tr.gen.js +1 -0
- package/dist/i18n/messages/zh-CN.gen.js +1 -0
- package/dist/internal/revisionResolutionStep.d.ts +2 -31
- package/dist/internal/revisionResolutionStep.js +2 -171
- package/dist/layout-bridge/convert/toFlowBlocks.js +0 -12
- package/dist/layout-bridge/convert/topLevelConversion.js +1 -10
- 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/commands/tableCellMergeResolution.d.ts +1 -11
- package/dist/prosemirror/commands/tableCellMergeResolution.js +3 -154
- package/dist/prosemirror/extensions/features/ImagePasteExtension.js +1 -1
- 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/listMarker.d.ts +1 -6
- package/dist/prosemirror/listMarker.js +4 -56
- 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 +2 -5
- package/dist/prosemirror/replacedAnnotations.js +1 -10
- 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/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 +40 -69
- package/dist/types/canonicalCapabilities.js +51 -65
- package/dist/types/canonicalComments.d.ts +2 -2
- package/dist/types/canonicalSections.d.ts +2 -2
- package/dist/utils/clipboard.d.ts +2 -28
- package/dist/utils/clipboard.js +1 -96
- package/dist/utils/clipboardFiles.d.ts +27 -0
- package/dist/utils/clipboardFiles.js +98 -0
- package/dist/utils/rulerControl.d.ts +1 -0
- package/dist/utils/rulerControl.js +2 -1
- package/package.json +2 -2
- package/dist/internal/headlessRevisionResolutionGuard.d.ts +0 -3
- package/dist/internal/headlessRevisionResolutionGuard.js +0 -18
|
@@ -1,234 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
export declare function addCommentMark(commentId: number): Command;
|
|
9
|
-
/**
|
|
10
|
-
* Remove a comment mark by ID from the entire document.
|
|
11
|
-
*/
|
|
12
|
-
export declare function removeCommentMark(commentId: number): Command;
|
|
13
|
-
type ResolveMode = "accept" | "reject";
|
|
14
|
-
export type ParagraphBoundaryChange = {
|
|
15
|
-
from: number;
|
|
16
|
-
to: number;
|
|
17
|
-
type: "insertion" | "deletion";
|
|
18
|
-
author?: string;
|
|
19
|
-
date?: string;
|
|
20
|
-
revisionId?: number;
|
|
21
|
-
};
|
|
22
|
-
export declare function findParagraphBoundaryChangeAtPosition(state: EditorState, pos: number): ParagraphBoundaryChange | null;
|
|
23
|
-
/**
|
|
24
|
-
* What the content-control locks say about resolving the tracked changes
|
|
25
|
-
* between `from` and `to` (only those of `revisionIds`, when given): `null`
|
|
26
|
-
* when they allow it or there is nothing there to resolve. A revision whose
|
|
27
|
-
* resolution would change a content-locked control's content, or remove a
|
|
28
|
-
* control locked against removal, stays pending.
|
|
29
|
-
*/
|
|
30
|
-
export declare const changeResolutionLockViolation: (state: EditorState, { from, to, mode, revisionIds }: {
|
|
31
|
-
from: number;
|
|
32
|
-
to: number;
|
|
33
|
-
mode: "accept" | "reject";
|
|
34
|
-
revisionIds?: readonly number[];
|
|
35
|
-
}) => LockedControlViolation | null;
|
|
36
|
-
/** {@link changeResolutionLockViolation} for the revisions `revisionIds`, wherever they are. */
|
|
37
|
-
export declare const revisionResolutionLockViolation: (state: EditorState, revisionIds: number | readonly number[], mode: "accept" | "reject") => LockedControlViolation | null;
|
|
38
|
-
/**
|
|
39
|
-
* Accept a tracked change at the given range.
|
|
40
|
-
* - Insertion: remove mark, keep text
|
|
41
|
-
* - Deletion: remove mark AND text
|
|
42
|
-
*/
|
|
43
|
-
export declare function acceptChange(from: number, to: number): Command;
|
|
44
|
-
/**
|
|
45
|
-
* Reject a tracked change at the given range.
|
|
46
|
-
* - Insertion: remove mark AND text
|
|
47
|
-
* - Deletion: remove mark, keep text
|
|
48
|
-
*/
|
|
49
|
-
export declare function rejectChange(from: number, to: number): Command;
|
|
50
|
-
/**
|
|
51
|
-
* Accept all tracked changes in the document. Returns `false` while pending
|
|
52
|
-
* suggestions are present because this command cannot restage them.
|
|
53
|
-
*/
|
|
54
|
-
export declare function acceptAllChanges(): Command;
|
|
55
|
-
/**
|
|
56
|
-
* Reject all tracked changes in the document.
|
|
57
|
-
*/
|
|
58
|
-
export declare function rejectAllChanges(): Command;
|
|
59
|
-
/**
|
|
60
|
-
* The revisions of `state` that a content control's lock keeps from being
|
|
61
|
-
* resolved in `mode`, each with the lock's verdict: see
|
|
62
|
-
* {@link changeResolutionLockViolation}. Empty without a locked control.
|
|
63
|
-
*/
|
|
64
|
-
export declare const lockHeldRevisions: (state: EditorState, mode: "accept" | "reject") => Map<number, LockedControlViolation>;
|
|
65
|
-
/** Every revision id one sidebar entry stands for. */
|
|
66
|
-
export declare const trackedChangeEntryRevisionIds: (entry: TrackedChangeEntry) => number[];
|
|
67
|
-
/**
|
|
68
|
-
* Resolve a complete state synchronously for a headless reader or writer.
|
|
69
|
-
*
|
|
70
|
-
* Uses the same single-step resolver as the interactive editor command.
|
|
71
|
-
*/
|
|
72
|
-
export declare function resolveAllChangesInHeadlessState(state: EditorState, mode: ResolveMode): EditorState;
|
|
73
|
-
/** The review transaction, or null when its content cannot be resolved. */
|
|
74
|
-
export declare const projectAllChangesInHeadlessState: (state: EditorState, mode: ResolveMode) => EditorState | null;
|
|
75
|
-
/**
|
|
76
|
-
* Resolve a story and retain its position map for callers addressing the tracked source.
|
|
77
|
-
*/
|
|
78
|
-
export declare const resolveAllChangesInHeadlessStateWithMapping: (state: EditorState, mode: ResolveMode) => {
|
|
79
|
-
state: EditorState;
|
|
80
|
-
mapping: Mapping;
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Find the document range covered by all revision carriers with any of the
|
|
84
|
-
* given ids. Returns null when none are present (already accepted/rejected, or
|
|
85
|
-
* never existed). A replace operation typically passes two ids; standalone
|
|
86
|
-
* text, formatting, paragraph, section, and table revisions pass a single id.
|
|
87
|
-
*/
|
|
88
|
-
export declare function findAIEditRevisionRange(state: EditorState, revisionIds: number | readonly number[]): {
|
|
89
|
-
from: number;
|
|
90
|
-
to: number;
|
|
91
|
-
} | null;
|
|
92
|
-
/**
|
|
93
|
-
* Accept the tracked-change marks belonging to an AI-edit operation.
|
|
94
|
-
* Pass a single revisionId for inserts, standalone deletions, or formatting changes; or the
|
|
95
|
-
* full id list for a replace (one id per side). Returns false when
|
|
96
|
-
* none of the ids match anything in the doc.
|
|
97
|
-
*/
|
|
98
|
-
export declare function acceptAIEditRevision(revisionIds: number | readonly number[]): Command;
|
|
99
|
-
/**
|
|
100
|
-
* Reject the tracked-change marks belonging to an AI-edit operation.
|
|
101
|
-
* See {@link acceptAIEditRevision} for the id semantics.
|
|
102
|
-
*/
|
|
103
|
-
export declare function rejectAIEditRevision(revisionIds: number | readonly number[]): Command;
|
|
104
|
-
/** The ids of the comments a pending suggestion proposes. */
|
|
105
|
-
export declare function suggestionCommentIds(state: EditorState, suggestionId: string): number[];
|
|
106
|
-
export type SuggestionKind = "insertion" | "deletion" | "formatting" | "insertBlock" | "insertTable" | "insertRow" | "deleteRow" | "insertColumn" | "deleteColumn" | "comment";
|
|
107
|
-
/**
|
|
108
|
-
* How a suggestion is applied when accepted:
|
|
109
|
-
* - `"tracked"` — converts to a normal OOXML tracked change (`w:ins`/`w:del`,
|
|
110
|
-
* paragraph-mark `w:ins`, row/cell `w:ins`/`w:del`);
|
|
111
|
-
* - `"direct"` — no OOXML tracked representation exists (a whole inserted
|
|
112
|
-
* table), so accepting applies it directly; a suggestion that only
|
|
113
|
-
* proposes a comment is accepted as an ordinary comment;
|
|
114
|
-
* - `"mixed"` — a heterogeneous group (one `suggestionId` spanning a whole
|
|
115
|
-
* inserted table AND other edits) whose parts apply both ways. Accept still
|
|
116
|
-
* resolves the whole group in one transaction; this flag lets the host
|
|
117
|
-
* message that some parts landed directly.
|
|
118
|
-
*/
|
|
119
|
-
export type SuggestionAppliedAs = "tracked" | "direct" | "mixed";
|
|
120
|
-
export type FolioSuggestion = {
|
|
121
|
-
suggestionId: string;
|
|
122
|
-
/** Contiguous document ranges the suggestion covers, in document order. */
|
|
123
|
-
ranges: readonly {
|
|
124
|
-
from: number;
|
|
125
|
-
to: number;
|
|
126
|
-
}[];
|
|
127
|
-
/** Which kinds of change the suggestion contains (deduped, in a stable order). */
|
|
128
|
-
kinds: readonly SuggestionKind[];
|
|
129
|
-
/** How accepting this suggestion applies it (see {@link SuggestionAppliedAs}). */
|
|
130
|
-
appliedAs: SuggestionAppliedAs;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* List every suggestion in the document for host consumption: its id, the
|
|
134
|
-
* contiguous ranges it covers, which kinds of change it contains, and how
|
|
135
|
-
* accepting it applies (tracked vs direct).
|
|
136
|
-
*/
|
|
137
|
-
export declare function getSuggestions(state: EditorState): FolioSuggestion[];
|
|
138
|
-
/** Physical revision IDs of every pending suggestion, in one document walk. */
|
|
139
|
-
export declare const pendingSuggestionRevisionIds: (state: EditorState) => ReadonlySet<number>;
|
|
140
|
-
/** The first owning suggestion for each physical revision, in source order. */
|
|
141
|
-
export declare const suggestionOwnersByRevision: (state: EditorState) => ReadonlyMap<number, string>;
|
|
142
|
-
/** The suggestion a revision belongs to, or `null` for an ordinary tracked change. */
|
|
143
|
-
export declare function suggestionIdOfRevision(state: EditorState, revisionId: number): string | null;
|
|
144
|
-
/**
|
|
145
|
-
* The document range covering every mark belonging to `suggestionId`, plus the
|
|
146
|
-
* revision ids those marks carry. Returns null when the suggestion is absent
|
|
147
|
-
* (already accepted/rejected, or never existed).
|
|
148
|
-
*/
|
|
149
|
-
export declare function findSuggestionRange(state: EditorState, suggestionId: string): {
|
|
150
|
-
from: number;
|
|
151
|
-
to: number;
|
|
152
|
-
revisionIds: number[];
|
|
153
|
-
} | null;
|
|
154
|
-
export type AcceptSuggestionOptions = {
|
|
155
|
-
author: string;
|
|
156
|
-
/**
|
|
157
|
-
* Date stamped on the resulting user tracked change (serialized as `w:date`);
|
|
158
|
-
* defaults to now. A malformed / non-parseable value is normalized to now, and
|
|
159
|
-
* a valid value is canonicalized to ISO 8601, so an invalid date can never be
|
|
160
|
-
* written into the document.
|
|
161
|
-
*/
|
|
162
|
-
date?: string;
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Accept one suggestion: convert its inline marks and block/table node
|
|
166
|
-
* revisions into normal tracked changes authored by `author`, keeping revision
|
|
167
|
-
* ids. A whole inserted table (which OOXML cannot track) is applied directly;
|
|
168
|
-
* everything else becomes a tracked change. See {@link getSuggestions} for the
|
|
169
|
-
* per-suggestion `appliedAs`.
|
|
170
|
-
*/
|
|
171
|
-
export declare function acceptSuggestion(suggestionId: string, options: AcceptSuggestionOptions): Command;
|
|
172
|
-
/** Accept every suggestion in the document. */
|
|
173
|
-
export declare function acceptAllSuggestions(options: AcceptSuggestionOptions): Command;
|
|
174
|
-
/**
|
|
175
|
-
* Reject one suggestion: inverse-apply it in a single transaction. Runs BOTH
|
|
176
|
-
* phases so a heterogeneous group (one `suggestionId` spanning whole-node
|
|
177
|
-
* inserts AND other edits) is fully resolved:
|
|
178
|
-
* 1. inline marks and suggested `trIns`/`trDel`/`cellMarker` revisions are
|
|
179
|
-
* inverse-applied through {@link resolveChange} (delete suggested-inserted
|
|
180
|
-
* text/rows/cells, drop suggested deletions/formatting);
|
|
181
|
-
* 2. any remaining whole-node inserts (paragraph/table) are then deleted,
|
|
182
|
-
* mapped through the accumulated transaction so positions stay valid.
|
|
183
|
-
*
|
|
184
|
-
* A paragraph whole-node insert carries inline marks with the same revision id,
|
|
185
|
-
* so phase 1 empties its text and phase 2 removes the now-empty node; a whole
|
|
186
|
-
* inserted table has no matching revision, so only phase 2 removes it.
|
|
187
|
-
*/
|
|
188
|
-
export declare function rejectSuggestion(suggestionId: string): Command;
|
|
189
|
-
/** Reject every suggestion in the document. */
|
|
190
|
-
export declare function rejectAllSuggestions(): Command;
|
|
191
|
-
/**
|
|
192
|
-
* The story with every pending suggestion rejected: what a save writes, what a
|
|
193
|
-
* read of the saved package shows and what rejecting every change starts from.
|
|
194
|
-
*
|
|
195
|
-
* One rejection resolves each suggestion's revisions against a story the
|
|
196
|
-
* others still stand in. Where a paragraph break it takes out joins into, or
|
|
197
|
-
* is displaced onto, another rejected suggestion's paragraph, that suggestion
|
|
198
|
-
* is left holding a break of its own; the rejection runs again until no
|
|
199
|
-
* suggestion is left, so the story never keeps a rejected break.
|
|
200
|
-
*/
|
|
201
|
-
export declare const rejectEverySuggestion: (state: EditorState) => EditorState;
|
|
202
|
-
/** {@link rejectEverySuggestion}, with where each position of `state` ends. */
|
|
203
|
-
export declare const rejectEverySuggestionMapped: (state: EditorState) => {
|
|
204
|
-
state: EditorState;
|
|
205
|
-
mapping: Mapping;
|
|
206
|
-
};
|
|
207
|
-
type ChangeRange = {
|
|
208
|
-
from: number;
|
|
209
|
-
to: number;
|
|
210
|
-
type: "insertion" | "deletion";
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Find the tracked change mark range at a given cursor position.
|
|
214
|
-
* If the cursor is inside a tracked change, returns the full extent
|
|
215
|
-
* of that mark (expanding to cover all adjacent nodes with the same
|
|
216
|
-
* revision ID). If from !== to (range selection), returns {from, to}.
|
|
217
|
-
*/
|
|
218
|
-
export declare function findChangeAtPosition(state: EditorState, from: number, to: number): {
|
|
219
|
-
from: number;
|
|
220
|
-
to: number;
|
|
221
|
-
};
|
|
222
|
-
/**
|
|
223
|
-
* Find the next tracked change after the given position. Returns the full
|
|
224
|
-
* range of the change (including adjacent text nodes that share the same
|
|
225
|
-
* insertion/deletion mark instance), not just the first text node.
|
|
226
|
-
*/
|
|
227
|
-
export declare function findNextChange(state: EditorState, startPos: number): ChangeRange | null;
|
|
228
|
-
/**
|
|
229
|
-
* Find the previous tracked change before the given position. Returns the
|
|
230
|
-
* full range of the change (including adjacent text nodes that share the
|
|
231
|
-
* same insertion/deletion mark instance), not just the last text node.
|
|
232
|
-
*/
|
|
233
|
-
export declare function findPreviousChange(state: EditorState, startPos: number): ChangeRange | null;
|
|
234
|
-
export {};
|
|
1
|
+
/** Compatibility exports for the deep comments command path. */
|
|
2
|
+
import { ParagraphBoundaryChange, addCommentMark, findChangeAtPosition, findNextChange, findParagraphBoundaryChangeAtPosition, findPreviousChange, removeCommentMark, trackedChangeEntryRevisionIds } from "../projectionReview.js";
|
|
3
|
+
import { isPPrMarkAttr, paragraphMarkWasAdded } from "../revisionCarriers.js";
|
|
4
|
+
import { TableRowRevisionAttr, findAIEditRevisionRange, isTableCellRevisionAttr, isTableRowRevisionAttr } from "../revisionRangeQueries.js";
|
|
5
|
+
import { FolioSuggestion, SuggestionAppliedAs, SuggestionKind, collectSuggestions, findSuggestionRange, getSuggestions, isSuggestionMark, mergeSegments, pendingSuggestionRevisionIds, readStructuralSuggestion, readSuggestedMarker, readSuggestedParagraphMark, readSuggestedParagraphPropertyChange, suggestedCommentOf, suggestionCommentIds, suggestionIdOfMarkRecord, suggestionIdOfRevision, suggestionOwnersByRevision } from "../suggestionQueries.js";
|
|
6
|
+
export { type FolioSuggestion, type ParagraphBoundaryChange, type SuggestionAppliedAs, type SuggestionKind, type TableRowRevisionAttr, addCommentMark, collectSuggestions, findAIEditRevisionRange, findChangeAtPosition, findNextChange, findParagraphBoundaryChangeAtPosition, findPreviousChange, findSuggestionRange, getSuggestions, isPPrMarkAttr, isSuggestionMark, isTableCellRevisionAttr, isTableRowRevisionAttr, mergeSegments, paragraphMarkWasAdded, pendingSuggestionRevisionIds, readStructuralSuggestion, readSuggestedMarker, readSuggestedParagraphMark, readSuggestedParagraphPropertyChange, removeCommentMark, suggestedCommentOf, suggestionCommentIds, suggestionIdOfMarkRecord, suggestionIdOfRevision, suggestionOwnersByRevision, trackedChangeEntryRevisionIds };
|