@stll/folio-core 0.72.0 → 0.74.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/README.md +12 -6
- package/dist/ai-edits/applyTypes.d.ts +85 -0
- package/dist/ai-edits/applyTypes.js +24 -0
- package/dist/ai-edits/clean-text.d.ts +7 -1
- package/dist/ai-edits/clean-text.js +23 -2
- package/dist/ai-edits/finalSectionReview.d.ts +1 -1
- package/dist/ai-edits/headless.d.ts +29 -147
- package/dist/ai-edits/headless.js +215 -1639
- package/dist/ai-edits/index.d.ts +3 -3
- package/dist/ai-edits/index.js +2 -3
- package/dist/ai-edits/pending-suggestions.d.ts +14 -4
- package/dist/ai-edits/pending-suggestions.js +183 -90
- package/dist/ai-edits/pendingJoin.js +6 -1
- package/dist/ai-edits/retired-comment-receipts.d.ts +1 -1
- package/dist/ai-edits/snapshot.js +9 -4
- package/dist/ai-edits/table-cell-mutations.d.ts +1 -1
- package/dist/ai-edits/table-cell-mutations.js +2 -2
- package/dist/ai-edits/table-geometry.d.ts +1 -1
- package/dist/ai-edits/table-geometry.js +1 -1
- package/dist/ai-edits/table-row-column-mutations.d.ts +1 -1
- package/dist/ai-edits/table-row-column-mutations.js +1 -1
- package/dist/ai-edits/tableNodes.d.ts +38 -0
- package/dist/ai-edits/tableNodes.js +86 -0
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +1 -1
- package/dist/ai-edits/tracked-batch-fidelity.js +1 -1
- package/dist/ai-edits/undefinedReferences.d.ts +7 -0
- package/dist/canonical/batchCommentReferences.js +1 -0
- package/dist/canonical/canonicalInlineGaps.d.ts +56 -0
- package/dist/canonical/canonicalInlineGaps.js +118 -0
- package/dist/canonical/canonicalInlineProjection.d.ts +4 -13
- package/dist/canonical/canonicalInlineProjection.js +5 -27
- package/dist/canonical/canonicalProjectionBlocks.d.ts +4 -4
- package/dist/canonical/canonicalPublicOperations.js +282 -75
- package/dist/canonical/canonicalSelection.js +1 -1
- package/dist/canonical/canonicalSession.d.ts +9 -1
- package/dist/canonical/canonicalSession.js +106 -33
- package/dist/compare/compare.d.ts +1 -1
- package/dist/compare/inline-atoms-model.d.ts +1 -1
- package/dist/compare/inline-atoms.d.ts +2 -2
- package/dist/compare/inline-provenance-model.d.ts +1 -1
- package/dist/compare/inline-provenance.d.ts +2 -2
- package/dist/compat/eigenpal.d.ts +3 -3
- package/dist/compat/eigenpal.js +2 -3
- package/dist/controller/autocompleteSuggestion.js +1 -1
- package/dist/controller/canonicalClipboard.d.ts +13 -3
- package/dist/controller/canonicalClipboard.js +186 -50
- package/dist/controller/canonicalClipboardResources.d.ts +9 -1
- package/dist/controller/canonicalClipboardResources.js +22 -2
- package/dist/controller/canonicalComposition.js +1 -1
- package/dist/controller/canonicalInput.js +1 -1
- package/dist/controller/canonicalPresence.js +1 -1
- package/dist/controller/canonicalReview.d.ts +1 -1
- package/dist/controller/canonicalReview.js +1 -1
- package/dist/controller/canonicalRoomAuthority.js +1 -1
- package/dist/controller/canonicalRoomWire.js +1 -1
- package/dist/controller/canonicalStructure.js +1 -1
- package/dist/controller/canonicalTabRoom.js +1 -1
- package/dist/controller/canonicalWatermark.d.ts +10 -0
- package/dist/controller/canonicalWatermark.js +37 -0
- package/dist/controller/canonicalYjsRoom.js +1 -1
- package/dist/controller/hiddenEditorApi.d.ts +1 -1
- package/dist/controller/hiddenEditorApi.js +2 -17
- package/dist/controller/hiddenEditorManager.d.ts +4 -3
- package/dist/controller/hiddenEditorManager.js +79 -23
- package/dist/document-operations.d.ts +1 -14
- package/dist/document-operations.js +1 -278
- package/dist/docx/canonicalSave.d.ts +1 -1
- package/dist/docx/canonicalSave.js +1 -1
- package/dist/docx/canonicalSessionInput.js +1 -1
- package/dist/docx/containerChildren.js +1 -1
- package/dist/docx/createDocx.d.ts +4 -0
- package/dist/docx/createDocx.js +6 -0
- package/dist/docx/paragraphParser.js +2 -2
- package/dist/docx/paragraphPropertySource.d.ts +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/reviewResolutionProvenance.d.ts +3 -2
- package/dist/docx/reviewResolutionProvenance.js +31 -8
- package/dist/docx/revisionIdNormalization.js +30 -7
- package/dist/docx/rezip.d.ts +1 -1
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/serializer/tableSerializer.js +4 -36
- package/dist/docx/server/templatePlan/apply.d.ts +15 -0
- package/dist/docx/server/templatePlan/apply.js +658 -0
- package/dist/docx/server/templatePlan/blocks.d.ts +97 -0
- package/dist/docx/server/templatePlan/blocks.js +355 -0
- package/dist/docx/server/templatePlan/builders.d.ts +72 -0
- package/dist/docx/server/templatePlan/builders.js +237 -0
- package/dist/docx/server/templatePlan/emit.d.ts +118 -0
- package/dist/docx/server/templatePlan/emit.js +466 -0
- package/dist/docx/server/templatePlan/emphasis.d.ts +62 -0
- package/dist/docx/server/templatePlan/emphasis.js +173 -0
- package/dist/docx/server/templatePlan/inspect.d.ts +22 -0
- package/dist/docx/server/templatePlan/inspect.js +230 -0
- package/dist/docx/server/templatePlan/labels.d.ts +45 -0
- package/dist/docx/server/templatePlan/labels.js +155 -0
- package/dist/docx/server/templatePlan/package.d.ts +34 -0
- package/dist/docx/server/templatePlan/package.js +99 -0
- package/dist/docx/server/templatePlan/plan.d.ts +145 -0
- package/dist/docx/server/templatePlan/plan.js +875 -0
- package/dist/docx/server/templatePlan/planShape.d.ts +9 -0
- package/dist/docx/server/templatePlan/planShape.js +180 -0
- package/dist/docx/server/templatePlan/resources.d.ts +41 -0
- package/dist/docx/server/templatePlan/resources.js +136 -0
- package/dist/docx/server/templatePlan/story.d.ts +128 -0
- package/dist/docx/server/templatePlan/story.js +440 -0
- package/dist/docx/server/templatePlan/types.d.ts +442 -0
- package/dist/docx/server/templatePlan/types.js +29 -0
- package/dist/docx/server/templatePlan/verify.d.ts +40 -0
- package/dist/docx/server/templatePlan/verify.js +976 -0
- package/dist/docx/server/templatePlan/xml.d.ts +74 -0
- package/dist/docx/server/templatePlan/xml.js +125 -0
- package/dist/docx/settingsHeaderFooterUpdate.d.ts +9 -0
- package/dist/docx/settingsHeaderFooterUpdate.js +45 -10
- package/dist/docx/structuralXmlPatch.js +9 -1
- package/dist/docx/tableGridXml.d.ts +30 -0
- package/dist/docx/tableGridXml.js +54 -0
- package/dist/docx/tableParser.js +7 -0
- package/dist/i18n/loadMessages.d.ts +5 -0
- package/dist/i18n/loadMessages.js +46 -0
- package/dist/i18n/locales.d.ts +3 -0
- package/dist/i18n/locales.js +17 -0
- package/dist/i18n/messages.d.ts +3 -2
- package/dist/i18n/messages.js +4 -16
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -3
- package/dist/internal/clipboardTransformPlugin.d.ts +3 -0
- package/dist/internal/clipboardTransformPlugin.js +13 -0
- package/dist/internal/extensionRuntime.d.ts +7 -0
- package/dist/internal/extensionRuntime.js +28 -0
- package/dist/internal/starterKitExtensions.d.ts +20 -0
- package/dist/internal/starterKitExtensions.js +123 -0
- package/dist/internal/wholeStoryRevisionResolution.js +1 -1
- package/dist/managers/ContextMenuManager.js +2 -1
- package/dist/managers/editorShortcuts.d.ts +1 -1
- package/dist/prosemirror/anchoredTextBoxes.d.ts +1 -1
- package/dist/prosemirror/attrs/index.js +1 -1
- package/dist/prosemirror/canonicalCommands.d.ts +1 -1
- package/dist/prosemirror/canonicalSelectionRange.d.ts +1 -1
- package/dist/prosemirror/canonicalSelectionRange.js +1 -1
- package/dist/prosemirror/canonicalTableCommands.js +3 -3
- package/dist/prosemirror/commands/comments.js +4 -4
- package/dist/prosemirror/commands/contentControls.d.ts +1 -1
- package/dist/prosemirror/commands/contentControls.js +1 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +1 -1
- package/dist/prosemirror/commands/formatting.d.ts +1 -1
- package/dist/prosemirror/commands/pastePlainText.d.ts +1 -1
- package/dist/prosemirror/commands/pastePlainText.js +2 -3
- package/dist/prosemirror/commands/replaceRangeText.js +1 -1
- package/dist/prosemirror/commands/sectionBreak.js +1 -1
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +1 -1
- package/dist/prosemirror/commands/tableMergeFoldDecisions.d.ts +1 -1
- package/dist/prosemirror/commentRecords.d.ts +1 -1
- package/dist/prosemirror/commentRecords.js +2 -2
- package/dist/prosemirror/contentControlRevisions.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +0 -5
- package/dist/prosemirror/conversion/fromProseDoc.js +2 -9
- package/dist/prosemirror/conversion/index.d.ts +2 -2
- package/dist/prosemirror/conversion/index.js +2 -2
- package/dist/prosemirror/documentStructureCounts.d.ts +24 -0
- package/dist/prosemirror/documentStructureCounts.js +76 -0
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +1 -1
- package/dist/prosemirror/extensions/ExtensionManager.js +4 -22
- package/dist/prosemirror/extensions/StarterKit.d.ts +4 -27
- package/dist/prosemirror/extensions/StarterKit.js +29 -115
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +1 -1
- package/dist/prosemirror/extensions/core/historyCommands.d.ts +16 -0
- package/dist/prosemirror/extensions/core/historyCommands.js +19 -0
- package/dist/prosemirror/extensions/features/AutoBidiDetectionExtension.js +1 -1
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ListExtension.js +7 -2
- package/dist/prosemirror/extensions/features/pastedCellSections.d.ts +1 -1
- package/dist/prosemirror/extensions/index.d.ts +2 -1
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +8 -3
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +8 -41
- package/dist/prosemirror/extensions/types.d.ts +1 -1
- package/dist/prosemirror/findReplaceSelection.d.ts +1 -1
- package/dist/prosemirror/hyperlinkRemoval.d.ts +1 -1
- package/dist/prosemirror/hyperlinkRemoval.js +7 -2
- package/dist/prosemirror/index.d.ts +3 -3
- package/dist/prosemirror/index.js +3 -3
- package/dist/prosemirror/insertionGaps.d.ts +1 -1
- package/dist/prosemirror/keptRangeBoundaries.d.ts +1 -1
- package/dist/prosemirror/keptRangeBoundaries.js +1 -1
- package/dist/prosemirror/listNumbering.d.ts +1 -1
- package/dist/prosemirror/listNumbering.js +1 -1
- package/dist/prosemirror/lockedControls.d.ts +1 -1
- package/dist/prosemirror/markupViewProjection.d.ts +1 -1
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +1 -1
- package/dist/prosemirror/noteReferenceOccurrences.js +1 -1
- package/dist/prosemirror/noteReferenceReview.d.ts +2 -56
- package/dist/prosemirror/noteReferenceReview.js +2 -243
- package/dist/prosemirror/{extensions/features/ParaIdAllocatorExtension.d.ts → paraIds.d.ts} +13 -23
- package/dist/prosemirror/paraIds.js +152 -0
- package/dist/prosemirror/paragraphChangeTrackerMeta.d.ts +97 -0
- package/dist/prosemirror/paragraphChangeTrackerMeta.js +87 -0
- package/dist/prosemirror/paragraphMarkJoin.d.ts +1 -1
- package/dist/prosemirror/paragraphPropertyCarry.d.ts +1 -1
- package/dist/prosemirror/pastedCommentCopies.d.ts +1 -1
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +1 -1
- package/dist/prosemirror/plugins/documentNumbering.d.ts +1 -1
- package/dist/prosemirror/plugins/documentNumbering.js +1 -1
- package/dist/prosemirror/plugins/documentStyles.js +1 -1
- package/dist/prosemirror/plugins/templateDirectives.d.ts +1 -1
- package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +1 -1
- package/dist/prosemirror/rebaseParagraphRuns.d.ts +1 -1
- package/dist/prosemirror/rejoinRunCarriers.d.ts +1 -1
- package/dist/prosemirror/replacedAnnotations.d.ts +1 -1
- package/dist/prosemirror/replacedAnnotations.js +17 -2
- package/dist/prosemirror/revisionCarriers.d.ts +1 -1
- package/dist/prosemirror/runFormattingInlineCarriers.d.ts +1 -1
- package/dist/prosemirror/sectionMarkEdits.d.ts +1 -1
- package/dist/prosemirror/selectionBounds.d.ts +10 -0
- package/dist/prosemirror/selectionBounds.js +22 -0
- package/dist/prosemirror/storyListNumbering.d.ts +1 -1
- package/dist/prosemirror/suggestionCommands.d.ts +47 -0
- package/dist/prosemirror/suggestionCommands.js +31 -0
- package/dist/prosemirror/tableCellPaste.d.ts +1 -1
- package/dist/prosemirror/tableCellPaste.js +1 -1
- package/dist/prosemirror/tableGridMutation.d.ts +1 -1
- package/dist/prosemirror/tableRunIn.js +1 -1
- package/dist/prosemirror/textInput.d.ts +1 -1
- package/dist/prosemirror/textInput.js +1 -1
- package/dist/server.d.ts +7 -2
- package/dist/server.js +6 -1
- package/dist/types/canonicalCapabilities.d.ts +13 -92
- package/dist/types/canonicalCapabilities.js +11 -85
- package/package.json +4 -4
- package/dist/ai-edits/apply.d.ts +0 -202
- package/dist/ai-edits/apply.js +0 -6759
- package/dist/ai-edits/note-story-inventory.d.ts +0 -5
- package/dist/ai-edits/note-story-inventory.js +0 -10
- package/dist/ai-edits/revisionStretches.d.ts +0 -32
- package/dist/ai-edits/revisionStretches.js +0 -147
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -18
- package/dist/prosemirror/extensions/core/HistoryExtension.js +0 -122
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +0 -408
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +0 -135
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +0 -566
- package/dist/prosemirror/plugins/suggestionMode.d.ts +0 -92
- package/dist/prosemirror/plugins/suggestionMode.js +0 -1515
- package/dist/prosemirror/tablePositionedBookmarks.d.ts +0 -8
- package/dist/prosemirror/tablePositionedBookmarks.js +0 -80
package/dist/ai-edits/apply.d.ts
DELETED
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
import { NumberingIdsInUse } from "../docx/numberingIds.js";
|
|
2
|
-
import { FolioTableTemplates, TableStructureRevision } from "./table-template.js";
|
|
3
|
-
import { FolioAIEditApplyMode, FolioAIEditApplyResult, FolioAIEditOperation, FolioAIEditSnapshot, FolioAIResolvedEditOperation, FolioAISignatureParty } from "./types.js";
|
|
4
|
-
import { FolioUndefinedReferencePolicy } from "./undefinedReferences.js";
|
|
5
|
-
import { WordDiffGranularity } from "./word-diff.js";
|
|
6
|
-
import { Node, Schema } from "prosemirror-model";
|
|
7
|
-
import { EditorState, Transaction } from "prosemirror-state";
|
|
8
|
-
/**
|
|
9
|
-
* The only editor surface the apply logic touches: a current `state`
|
|
10
|
-
* and a `dispatch` that swaps in the next one. A live `EditorView`
|
|
11
|
-
* satisfies this structurally, and so does a headless seam
|
|
12
|
-
* (`{ state, dispatch: (tr) => { state = state.apply(tr); } }`) — the
|
|
13
|
-
* apply path never reaches for anything DOM-bound on the view, which is
|
|
14
|
-
* what lets the same operation applier drive both the React editor and
|
|
15
|
-
* the server-side reviewer in `./headless`.
|
|
16
|
-
*/
|
|
17
|
-
export type FolioAIEditView = {
|
|
18
|
-
state: EditorState;
|
|
19
|
-
dispatch: (transaction: Transaction) => void;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Fixed revision provenance, for callers whose output must be reproducible.
|
|
23
|
-
* Both halves of the stamp travel together because either one left to the
|
|
24
|
-
* ambient clock (`new Date()` for the date, the shared bounded allocator for
|
|
25
|
-
* the ids) makes the produced package differ between two runs over the same
|
|
26
|
-
* inputs. `idSeed` starts a contiguous range the batch allocates from, so it
|
|
27
|
-
* must sit above every revision id the target document already carries.
|
|
28
|
-
*/
|
|
29
|
-
export type FolioRevisionStamp = {
|
|
30
|
-
/** ISO-8601 date stamped on every `w:ins` / `w:del` this batch produces. */
|
|
31
|
-
date: string;
|
|
32
|
-
/** First revision id the batch may allocate. */
|
|
33
|
-
idSeed: number;
|
|
34
|
-
};
|
|
35
|
-
type ApplyFolioAIEditOperationsOptions = {
|
|
36
|
-
view: FolioAIEditView;
|
|
37
|
-
snapshot: FolioAIEditSnapshot;
|
|
38
|
-
operations: readonly FolioAIEditOperation[];
|
|
39
|
-
mode?: FolioAIEditApplyMode;
|
|
40
|
-
author?: string;
|
|
41
|
-
/** Optional author initials (w:initials) stamped alongside the author. */
|
|
42
|
-
initials?: string;
|
|
43
|
-
createCommentId?: (text: string) => number;
|
|
44
|
-
/** Omit to stamp revisions from the wall clock and the shared id cursor. */
|
|
45
|
-
revisionStamp?: FolioRevisionStamp;
|
|
46
|
-
/** How a replacement's redline is cut. */
|
|
47
|
-
wordDiff?: FolioWordDiffOptions;
|
|
48
|
-
/**
|
|
49
|
-
* Tables and rows an `insertTable` / `insertTableRow` operation should place
|
|
50
|
-
* verbatim, by operation id.
|
|
51
|
-
*
|
|
52
|
-
* The operations describe their content as cell texts, which is what a
|
|
53
|
-
* caller writing a table from nothing has. A caller copying one it already
|
|
54
|
-
* holds — a comparison placing the target document's table — has the whole
|
|
55
|
-
* thing: `w:tblPr`, the `w:tblGrid` widths, `w:trPr`, `w:tcPr` with its
|
|
56
|
-
* spans and merges, and cell paragraphs with their own properties. Rebuilt
|
|
57
|
-
* from text, none of that survives. Kept out of the operation payload
|
|
58
|
-
* because it is a document node rather than JSON: the serialized contract
|
|
59
|
-
* still describes a table by its cell texts.
|
|
60
|
-
*/
|
|
61
|
-
tableTemplates?: FolioTableTemplates;
|
|
62
|
-
/** What a replacement does with a background the text it replaces carries. */
|
|
63
|
-
replacementBackground?: FolioReplacementBackground;
|
|
64
|
-
/** Policy for undefined style and numbering references; see FolioUndefinedReferencePolicy. */
|
|
65
|
-
undefinedReferences: FolioUndefinedReferencePolicy;
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Options of a caller that holds every story of the package. Numbering ids
|
|
69
|
-
* are package-wide while a story's state completes its numbering from its own
|
|
70
|
-
* paragraphs, so the caller names the ids the other stories define and a list
|
|
71
|
-
* the batch starts takes none of them.
|
|
72
|
-
*/
|
|
73
|
-
type ApplyFolioAIEditOperationsInPackageOptions = ApplyFolioAIEditOperationsOptions & {
|
|
74
|
-
numberingIdsElsewhere: NumberingIdsInUse;
|
|
75
|
-
refuseCrossAuthorRevisions?: boolean;
|
|
76
|
-
};
|
|
77
|
-
/**
|
|
78
|
-
* How an apply batch cuts the redline for a replacement. Word-level by
|
|
79
|
-
* default; character granularity marks the changed letters inside a token,
|
|
80
|
-
* which reads well for a reference or a date. Normalization is deliberately
|
|
81
|
-
* absent: a batch that leaves a difference unmarked does not accept back to
|
|
82
|
-
* the text the caller asked for.
|
|
83
|
-
*/
|
|
84
|
-
export type FolioWordDiffOptions = {
|
|
85
|
-
granularity?: WordDiffGranularity;
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* What a replacement does with a highlight or `w:shd` the text it replaces
|
|
89
|
-
* carries.
|
|
90
|
-
*
|
|
91
|
-
* `clear` is the authoring default: text typed over a highlighted placeholder
|
|
92
|
-
* is new text, and keeping the marker that said "fill this in" would carry it
|
|
93
|
-
* into the finished document. `keep` is for a caller that states the
|
|
94
|
-
* replacement's own run properties rather than letting it inherit them — a
|
|
95
|
-
* comparison reproducing a revised document holds the properties that document
|
|
96
|
-
* has, and clearing them first records a run-property change it takes straight
|
|
97
|
-
* back, which reaches the reader as a revision whose before and after are the
|
|
98
|
-
* same.
|
|
99
|
-
*/
|
|
100
|
-
export type FolioReplacementBackground = "clear" | "keep";
|
|
101
|
-
/**
|
|
102
|
-
* An apply result plus where the batch left the revision-id counter.
|
|
103
|
-
*
|
|
104
|
-
* A caller writing several batches into one package — a comparison walking
|
|
105
|
-
* the main story, then each header, footer and note — has to give every batch
|
|
106
|
-
* a seed above the last id the previous one used, or two stories claim the
|
|
107
|
-
* same `w:id` and a consumer resolving one revision resolves the other with
|
|
108
|
-
* it. The batch is the only thing that knows how many ids it took, so it says
|
|
109
|
-
* so rather than making the caller guess a stride.
|
|
110
|
-
*/
|
|
111
|
-
export type FolioAIEditApplyOutcome = FolioAIEditApplyResult & {
|
|
112
|
-
/** The held transaction was refused when its final geometry exposed a protected break. */
|
|
113
|
-
heldRevisionConflict?: true;
|
|
114
|
-
/**
|
|
115
|
-
* First revision id a following batch may allocate: one past the last id
|
|
116
|
-
* this batch used, or the seed it started from when it allocated none.
|
|
117
|
-
*/
|
|
118
|
-
nextRevisionId: number;
|
|
119
|
-
};
|
|
120
|
-
/**
|
|
121
|
-
* Operation types applied in `"suggested"` mode. Every produced revision — an
|
|
122
|
-
* inline mark, a whole-node `_suggestedInsert` marker, or a suggested
|
|
123
|
-
* `trIns`/`trDel`/`cellMarker` — is stripped from serialized DOCX until
|
|
124
|
-
* accepted. Cell merge/split (not row/column ops) and comment ops stay
|
|
125
|
-
* `unsupportedMode`.
|
|
126
|
-
*/
|
|
127
|
-
export declare const SUGGESTED_SUPPORTED_OPERATION_TYPES: ReadonlySet<FolioAIResolvedEditOperation["type"]>;
|
|
128
|
-
type BuildTableNodeOptions = {
|
|
129
|
-
schema: Schema;
|
|
130
|
-
rows: readonly (readonly string[])[];
|
|
131
|
-
/** Present in tracked mode: every row is stamped as an insertion. */
|
|
132
|
-
revision?: TableStructureRevision;
|
|
133
|
-
};
|
|
134
|
-
/**
|
|
135
|
-
* A plain table from a grid of cell texts, `null` when the schema has no
|
|
136
|
-
* tables. In tracked mode every row carries `trIns` and every run inside it
|
|
137
|
-
* carries `w:ins`, which is how the format says "this table is new": there is
|
|
138
|
-
* no whole-table insertion element, only rows that were inserted, and a
|
|
139
|
-
* consumer that reads only run-level revisions keeps the text of a rejected
|
|
140
|
-
* insertion when the row marker stands alone.
|
|
141
|
-
*/
|
|
142
|
-
export declare const buildTableNode: ({ schema, rows, revision }: BuildTableNodeOptions) => Node | null;
|
|
143
|
-
type BuildSignatureTableNodeOptions = {
|
|
144
|
-
schema: Schema;
|
|
145
|
-
parties: readonly FolioAISignatureParty[];
|
|
146
|
-
};
|
|
147
|
-
/**
|
|
148
|
-
* Build a borderless PM table mirroring docx-core's
|
|
149
|
-
* `signatureTable` helper: one row, one cell per party, each cell
|
|
150
|
-
* containing party name (bold), two spacer paragraphs, a signature
|
|
151
|
-
* rule, then optional signatory and italic title lines.
|
|
152
|
-
*
|
|
153
|
-
* Returns `null` when the editor schema is missing one of the
|
|
154
|
-
* required node types — callers should surface the op as a skip
|
|
155
|
-
* rather than crashing.
|
|
156
|
-
*/
|
|
157
|
-
export declare const buildSignatureTableNode: ({ schema, parties }: BuildSignatureTableNodeOptions) => Node | null;
|
|
158
|
-
export declare const applyFolioAIEditOperations: (options: ApplyFolioAIEditOperationsOptions) => FolioAIEditApplyOutcome;
|
|
159
|
-
/** {@link applyFolioAIEditOperations} for a caller holding every story. Internal. */
|
|
160
|
-
export declare const applyFolioAIEditOperationsInPackage: (options: ApplyFolioAIEditOperationsInPackageOptions) => FolioAIEditApplyOutcome;
|
|
161
|
-
export declare const previewFolioAIEditOperations: (options: ApplyFolioAIEditOperationsOptions) => FolioAIEditApplyOutcome;
|
|
162
|
-
/**
|
|
163
|
-
* A preview together with the document it would leave and the provisional
|
|
164
|
-
* comment ids it placed, for a caller that checks the result before reporting
|
|
165
|
-
* it. Internal: not re-exported from the package entry points.
|
|
166
|
-
*/
|
|
167
|
-
export declare const previewFolioAIEditOperationsWithResult: (options: ApplyFolioAIEditOperationsInPackageOptions, wordDiffMode?: "coarse" | "bounded") => {
|
|
168
|
-
outcome: FolioAIEditApplyOutcome;
|
|
169
|
-
doc: Node;
|
|
170
|
-
commentIds: readonly number[];
|
|
171
|
-
};
|
|
172
|
-
type InsertCleanTextOptions = {
|
|
173
|
-
tr: Transaction;
|
|
174
|
-
from: number;
|
|
175
|
-
to: number;
|
|
176
|
-
text: string;
|
|
177
|
-
/**
|
|
178
|
-
* The span this insertion stands in for, when the two together are a
|
|
179
|
-
* replacement the tracked-changes path splits into a deletion and an
|
|
180
|
-
* insertion. The insertion carries that span's marks, so accepting the
|
|
181
|
-
* change leaves the link and the comment on the new text. Its anchors are
|
|
182
|
-
* left alone: a tracked deletion removes nothing.
|
|
183
|
-
*/
|
|
184
|
-
standsInFor?: {
|
|
185
|
-
from: number;
|
|
186
|
-
to: number;
|
|
187
|
-
};
|
|
188
|
-
/**
|
|
189
|
-
* The span stood in for stays, as a tracked deletion: a comment on it then
|
|
190
|
-
* goes on the insertion only where the insertion continues its range.
|
|
191
|
-
*/
|
|
192
|
-
keepsReplacedText?: boolean;
|
|
193
|
-
};
|
|
194
|
-
type InsertedCleanText = {
|
|
195
|
-
transaction: Transaction;
|
|
196
|
-
/** Start of the inserted text, past any anchor restored before it. */
|
|
197
|
-
start: number;
|
|
198
|
-
/** End of the inserted text, before any anchor restored after it. */
|
|
199
|
-
end: number;
|
|
200
|
-
};
|
|
201
|
-
export declare const insertCleanText: ({ tr, from, to, text, standsInFor, keepsReplacedText }: InsertCleanTextOptions) => InsertedCleanText;
|
|
202
|
-
export type { FolioUndefinedReferencePolicy };
|