@stll/folio-core 0.73.0 → 0.75.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 +5 -2
- package/dist/ai-edits/headless.js +20 -14
- 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 +134 -88
- package/dist/ai-edits/pendingJoin.d.ts +5 -1
- package/dist/ai-edits/pendingJoin.js +12 -3
- package/dist/ai-edits/result-validation.js +1 -1
- 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/snapshot.js +1 -1
- package/dist/ai-edits/table-cell-mutations.js +1 -1
- package/dist/ai-edits/tracked-batch-fidelity.d.ts +6 -10
- package/dist/ai-edits/tracked-batch-fidelity.js +3 -182
- package/dist/canonical/canonicalBatchReview.d.ts +4 -1
- package/dist/canonical/canonicalBatchReview.js +32 -14
- package/dist/canonical/canonicalComments.d.ts +6 -2
- package/dist/canonical/canonicalComments.js +8 -4
- 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 +6 -28
- package/dist/canonical/canonicalProjectionBlocks.d.ts +4 -4
- package/dist/canonical/canonicalPublicOperations.js +99 -36
- package/dist/canonical/canonicalRefusalGrounds.d.ts +4 -0
- package/dist/canonical/canonicalRefusalGrounds.js +56 -0
- package/dist/canonical/canonicalSelection.js +1 -1
- package/dist/canonical/canonicalSession.d.ts +12 -6
- package/dist/canonical/canonicalSession.js +129 -141
- 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/autocompleteSuggestion.js +1 -1
- package/dist/controller/canonicalClipboard.js +45 -44
- package/dist/controller/canonicalComposition.d.ts +1 -1
- package/dist/controller/canonicalComposition.js +6 -6
- package/dist/controller/canonicalInput.d.ts +4 -2
- package/dist/controller/canonicalInput.js +34 -17
- package/dist/controller/canonicalPresence.js +1 -1
- package/dist/controller/canonicalRoomAuthority.js +1 -1
- package/dist/controller/canonicalRoomWire.js +1 -1
- package/dist/controller/canonicalStoryEditor.d.ts +2 -3
- package/dist/controller/canonicalStoryEditor.js +43 -25
- package/dist/controller/canonicalStructure.d.ts +19 -2
- package/dist/controller/canonicalStructure.js +140 -43
- package/dist/controller/canonicalTabRoom.js +1 -1
- package/dist/controller/canonicalYjsRoom.js +1 -1
- 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/headerFooterEditorManager.js +3 -17
- package/dist/controller/hiddenEditorApi.d.ts +24 -3
- package/dist/controller/hiddenEditorApi.js +4 -17
- package/dist/controller/hiddenEditorManager.js +136 -197
- 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/document-operations.js +1 -1
- package/dist/docx/blockContentParser.d.ts +1 -3
- package/dist/docx/blockContentParser.js +3 -10
- package/dist/docx/canonicalSave.d.ts +4 -3
- package/dist/docx/canonicalSave.js +4 -3
- 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/listMarkerComputation.d.ts +24 -17
- package/dist/docx/listMarkerComputation.js +31 -60
- package/dist/docx/listModelNormalization.js +8 -15
- package/dist/docx/modelValidation.js +1 -1
- package/dist/docx/parser.js +1 -1
- package/dist/docx/reviewResolutionProvenance.js +1 -1
- package/dist/docx/rezip.d.ts +16 -3
- package/dist/docx/rezip.js +36 -10
- package/dist/docx/selectiveSave.js +13 -5
- package/dist/docx/serializer/borderSerializer.js +1 -1
- package/dist/docx/serializer/commentSerializer.js +1 -1
- package/dist/docx/serializer/documentSerializer.js +1 -1
- package/dist/docx/serializer/paragraphSerializer.js +3 -3
- package/dist/docx/serializer/runSerializer.js +1 -1
- package/dist/docx/serializer/sectionPropertiesSerializer.js +1 -1
- package/dist/docx/serializer/tableSerializer.js +1 -1
- package/dist/docx/serializer/textFormattingSerializer.js +1 -1
- package/dist/docx/serializer/trackedChangeAttributes.js +1 -1
- package/dist/docx/server/templatePlan/apply.js +107 -14
- package/dist/docx/server/templatePlan/blocks.d.ts +16 -1
- package/dist/docx/server/templatePlan/blocks.js +93 -7
- package/dist/docx/server/templatePlan/builders.d.ts +37 -2
- package/dist/docx/server/templatePlan/builders.js +196 -5
- package/dist/docx/server/templatePlan/emit.d.ts +2 -0
- package/dist/docx/server/templatePlan/emit.js +2 -0
- package/dist/docx/server/templatePlan/inspect.js +81 -61
- package/dist/docx/server/templatePlan/labels.d.ts +16 -2
- package/dist/docx/server/templatePlan/labels.js +131 -20
- package/dist/docx/server/templatePlan/plan.d.ts +15 -1
- package/dist/docx/server/templatePlan/plan.js +62 -13
- package/dist/docx/server/templatePlan/planShape.js +52 -4
- package/dist/docx/server/templatePlan/story.d.ts +8 -0
- package/dist/docx/server/templatePlan/story.js +11 -1
- package/dist/docx/server/templatePlan/types.d.ts +176 -18
- package/dist/docx/server/templatePlan/types.js +1 -0
- package/dist/docx/server/templatePlan/verify.js +60 -11
- package/dist/docx/server/templatePlan/xml.d.ts +5 -0
- package/dist/docx/server/templatePlan/xml.js +7 -1
- package/dist/docx/storyBlockReplay.js +1 -1
- package/dist/docx/xmlParser.js +1 -1
- 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/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/i18n/messages.d.ts +3 -2
- package/dist/i18n/messages.js +4 -16
- 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/paragraphFormattingSerialization.js +1 -1
- package/dist/internal/starterKitExtensions.d.ts +20 -0
- package/dist/internal/starterKitExtensions.js +123 -0
- package/dist/internal/wholeStoryRevisionResolution.js +2 -2
- package/dist/layout-bridge/convert/toFlowBlocks.js +0 -12
- package/dist/layout-bridge/convert/topLevelConversion.js +1 -10
- package/dist/prosemirror/attrs/index.js +1 -1
- package/dist/prosemirror/canonicalSelectionRange.js +1 -1
- package/dist/prosemirror/canonicalTableCommands.js +1 -1
- package/dist/prosemirror/commands/comments.js +3 -3
- package/dist/prosemirror/commands/contentControls.js +1 -1
- package/dist/prosemirror/commands/pastePlainText.js +2 -3
- package/dist/prosemirror/commands/replaceRangeText.js +1 -1
- package/dist/prosemirror/commentRecords.js +2 -2
- 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/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 +2 -2
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ImagePasteExtension.js +1 -1
- package/dist/prosemirror/extensions/features/ListExtension.js +7 -2
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +1 -1
- package/dist/prosemirror/extensions/index.d.ts +2 -1
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +8 -3
- package/dist/prosemirror/extensions/nodes/TableExtension.js +7 -40
- package/dist/prosemirror/hyperlinkRemoval.js +7 -2
- package/dist/prosemirror/index.d.ts +2 -2
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/keptRangeBoundaries.js +1 -1
- package/dist/prosemirror/listMarker.d.ts +1 -6
- package/dist/prosemirror/listMarker.js +4 -56
- package/dist/prosemirror/listNumbering.js +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/pastedCommentCopies.js +1 -1
- package/dist/prosemirror/plugins/documentNumbering.js +1 -1
- package/dist/prosemirror/plugins/documentStyles.js +1 -1
- package/dist/prosemirror/replacedAnnotations.js +1 -1
- package/dist/prosemirror/suggestionCommands.d.ts +47 -0
- package/dist/prosemirror/suggestionCommands.js +31 -0
- package/dist/prosemirror/tableCellPaste.js +1 -1
- package/dist/prosemirror/tableRunIn.js +1 -1
- package/dist/prosemirror/textInput.js +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/types/canonicalCapabilities.d.ts +42 -93
- package/dist/types/canonicalCapabilities.js +53 -91
- 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/ai-edits/apply.d.ts +0 -94
- package/dist/ai-edits/apply.js +0 -6637
- 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/document-operations-apply.d.ts +0 -15
- package/dist/document-operations-apply.js +0 -280
- package/dist/prosemirror/extensions/core/HistoryExtension.d.ts +0 -12
- package/dist/prosemirror/extensions/core/HistoryExtension.js +0 -114
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +0 -23
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +0 -270
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +0 -51
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +0 -411
- 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
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import { withoutLostCommentThreads } from "../ai-edits/comment-lifecycle.js";
|
|
2
2
|
import { visitCommentMarkers } from "../docx/commentAnchorIndex.js";
|
|
3
3
|
import { isSeparatorEndnote, isSeparatorFootnote } from "../docx/footnoteParser.js";
|
|
4
|
-
import {
|
|
5
|
-
import { addTrackedDeletionMark } from "./addTrackedDeletionMark.js";
|
|
6
|
-
import { expectFootnoteRefMarkAttrs, expectParagraphAttrs } from "./attrs/index.js";
|
|
7
|
-
import { rejectAIEditRevision } from "./commands/comments.js";
|
|
8
|
-
import { proseDocToBlocks } from "./conversion/fromProseDoc.js";
|
|
9
|
-
import { footnoteToProseDoc } from "./conversion/toProseDoc.js";
|
|
10
|
-
import { createDocumentNumberingPlugin } from "./plugins/documentNumbering.js";
|
|
11
|
-
import { createDocumentStylesPlugin } from "./plugins/documentStyles.js";
|
|
12
|
-
import { mintRevisionId } from "./plugins/revisionIds.js";
|
|
13
|
-
import { schema, singletonManager } from "./schema/index.js";
|
|
14
|
-
import { Transform } from "prosemirror-transform";
|
|
4
|
+
import { expectFootnoteRefMarkAttrs } from "./attrs/index.js";
|
|
15
5
|
import { setDocumentBodyComments } from "@stll/docx-core/model";
|
|
16
|
-
import { EditorState } from "prosemirror-state";
|
|
17
6
|
// src/prosemirror/noteReferenceReview.ts
|
|
18
7
|
const noteKey = (kind, id) => `${kind}:${id}`;
|
|
19
8
|
/**
|
|
@@ -34,236 +23,6 @@ const noteReferenceStates = (doc) => {
|
|
|
34
23
|
});
|
|
35
24
|
return states;
|
|
36
25
|
};
|
|
37
|
-
/** The notes whose reference a change took from pending deletion back to live. */
|
|
38
|
-
const noteReferencesRestored = (before, after) => {
|
|
39
|
-
const was = noteReferenceStates(before);
|
|
40
|
-
return [...noteReferenceStates(after)].flatMap(([key, state]) => state === "live" && was.get(key) === "deleted" ? [key] : []);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* The revisions that deleted a note along with its reference: its text and
|
|
44
|
-
* its paragraph marks, deleted by the reference deletion's author at its
|
|
45
|
-
* date. A deletion in the note made some other time is a change of its own,
|
|
46
|
-
* which resolving the reference leaves alone.
|
|
47
|
-
*/
|
|
48
|
-
const noteDeletionRevisions = (doc, reference) => {
|
|
49
|
-
const author = String(reference.attrs["author"] ?? "");
|
|
50
|
-
const date = String(reference.attrs["date"] ?? "");
|
|
51
|
-
const ids = /* @__PURE__ */ new Set();
|
|
52
|
-
doc.descendants((node) => {
|
|
53
|
-
if (node.type.name === "paragraph") {
|
|
54
|
-
const mark = expectParagraphAttrs(node).pPrMark;
|
|
55
|
-
if (mark?.kind === "del" && mark.info.author === author && mark.info.date === date) ids.add(mark.info.id);
|
|
56
|
-
}
|
|
57
|
-
for (const mark of node.marks) if (mark.type.name === "deletion" && String(mark.attrs["author"] ?? "") === author && String(mark.attrs["date"] ?? "") === date) {
|
|
58
|
-
const id = mark.attrs["revisionId"];
|
|
59
|
-
if (typeof id === "number") ids.add(id);
|
|
60
|
-
}
|
|
61
|
-
return true;
|
|
62
|
-
});
|
|
63
|
-
return [...ids];
|
|
64
|
-
};
|
|
65
|
-
const restoredNote = (note, document, reference) => {
|
|
66
|
-
const { styles, theme, numbering } = document.package;
|
|
67
|
-
const doc = footnoteToProseDoc(note.content, {
|
|
68
|
-
...styles !== void 0 && { styles },
|
|
69
|
-
...theme !== void 0 && { theme },
|
|
70
|
-
...numbering !== void 0 && { numbering }
|
|
71
|
-
});
|
|
72
|
-
const revisions = noteDeletionRevisions(doc, reference);
|
|
73
|
-
if (revisions.length === 0) return note;
|
|
74
|
-
let state = EditorState.create({
|
|
75
|
-
schema,
|
|
76
|
-
doc,
|
|
77
|
-
plugins: [
|
|
78
|
-
createDocumentNumberingPlugin(numbering),
|
|
79
|
-
...pluginsForHeadlessRevisionResolution(singletonManager.getPlugins()),
|
|
80
|
-
createDocumentStylesPlugin(styles)
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
rejectAIEditRevision(revisions)(state, (transaction) => {
|
|
84
|
-
state = state.apply(transaction);
|
|
85
|
-
});
|
|
86
|
-
if (state.doc.eq(doc)) return note;
|
|
87
|
-
return {
|
|
88
|
-
...note,
|
|
89
|
-
content: proseDocToBlocks(state.doc, note.content, styles)
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* The document with the named notes' deletions that went with their
|
|
94
|
-
* reference rejected: the notes whose reference's deletion was rejected get
|
|
95
|
-
* their text back. `before` is the body that still had those deletions.
|
|
96
|
-
*/
|
|
97
|
-
const restoreNotes = (document, keys, before) => {
|
|
98
|
-
const deletions = referenceDeletions(before);
|
|
99
|
-
const wanted = new Set([...keys].filter((key) => deletions.has(key)));
|
|
100
|
-
if (wanted.size === 0) return document;
|
|
101
|
-
const restore = (kind, notes) => {
|
|
102
|
-
if (!notes?.some((note) => wanted.has(noteKey(kind, note.id)))) return notes;
|
|
103
|
-
return notes.map((note) => {
|
|
104
|
-
const reference = deletions.get(noteKey(kind, note.id));
|
|
105
|
-
return reference ? restoredNote(note, document, reference) : note;
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
const footnotes = restore("footnote", document.package.footnotes);
|
|
109
|
-
const endnotes = restore("endnote", document.package.endnotes);
|
|
110
|
-
if (footnotes === document.package.footnotes && endnotes === document.package.endnotes) return document;
|
|
111
|
-
return {
|
|
112
|
-
...document,
|
|
113
|
-
package: {
|
|
114
|
-
...document.package,
|
|
115
|
-
...footnotes !== void 0 && { footnotes },
|
|
116
|
-
...endnotes !== void 0 && { endnotes }
|
|
117
|
-
}
|
|
118
|
-
};
|
|
119
|
-
};
|
|
120
|
-
/** The deletion each pending-deleted note reference carries. */
|
|
121
|
-
const referenceDeletions = (doc) => {
|
|
122
|
-
const deletions = /* @__PURE__ */ new Map();
|
|
123
|
-
doc.descendants((node) => {
|
|
124
|
-
if (!node.isText) return true;
|
|
125
|
-
const reference = node.marks.find((mark) => mark.type.name === "footnoteRef");
|
|
126
|
-
const deletion = node.marks.find((mark) => mark.type.name === "deletion");
|
|
127
|
-
if (reference && deletion) {
|
|
128
|
-
const { id, noteType } = expectFootnoteRefMarkAttrs(reference);
|
|
129
|
-
deletions.set(noteKey(noteType === "endnote" ? "endnote" : "footnote", Number(id)), deletion);
|
|
130
|
-
}
|
|
131
|
-
return false;
|
|
132
|
-
});
|
|
133
|
-
return deletions;
|
|
134
|
-
};
|
|
135
|
-
/**
|
|
136
|
-
* Delete a note's text and its paragraph marks along with its reference: by
|
|
137
|
-
* the reference deletion's author at its date, so resolving the reference
|
|
138
|
-
* resolves them too (see {@link noteDeletionRevisions}).
|
|
139
|
-
*/
|
|
140
|
-
const deleteNoteWithReference = (transform, reference) => {
|
|
141
|
-
const doc = transform.doc;
|
|
142
|
-
const markInfo = {
|
|
143
|
-
id: mintRevisionId(),
|
|
144
|
-
author: String(reference.attrs["author"] ?? ""),
|
|
145
|
-
date: String(reference.attrs["date"] ?? "")
|
|
146
|
-
};
|
|
147
|
-
const { utcDate, initials } = reference.attrs;
|
|
148
|
-
const deletion = (doc.type.schema.marks["deletion"] ?? reference.type).create({
|
|
149
|
-
revisionId: mintRevisionId(),
|
|
150
|
-
author: markInfo.author,
|
|
151
|
-
date: markInfo.date,
|
|
152
|
-
...utcDate != null && { utcDate },
|
|
153
|
-
...initials != null && { initials }
|
|
154
|
-
});
|
|
155
|
-
doc.descendants((node, position) => {
|
|
156
|
-
if (node.type.name === "paragraph" && expectParagraphAttrs(node).pPrMark == null) transform.setNodeAttribute(position, "pPrMark", {
|
|
157
|
-
kind: "del",
|
|
158
|
-
info: markInfo
|
|
159
|
-
});
|
|
160
|
-
if (node.isInline && !deletion.type.isInSet(node.marks)) addTrackedDeletionMark({
|
|
161
|
-
insertionPolicy: "preserve-pending",
|
|
162
|
-
tr: transform,
|
|
163
|
-
from: position,
|
|
164
|
-
to: position + node.nodeSize,
|
|
165
|
-
mark: deletion
|
|
166
|
-
});
|
|
167
|
-
return !node.isInline;
|
|
168
|
-
});
|
|
169
|
-
return transform;
|
|
170
|
-
};
|
|
171
|
-
/**
|
|
172
|
-
* A note whose reference was deleted: its text and its paragraph marks are
|
|
173
|
-
* deleted too, by the reference's author at the reference's date.
|
|
174
|
-
*/
|
|
175
|
-
const deletedNote = (note, document, reference) => {
|
|
176
|
-
const { styles, theme, numbering } = document.package;
|
|
177
|
-
const doc = footnoteToProseDoc(note.content, {
|
|
178
|
-
...styles !== void 0 && { styles },
|
|
179
|
-
...theme !== void 0 && { theme },
|
|
180
|
-
...numbering !== void 0 && { numbering }
|
|
181
|
-
});
|
|
182
|
-
const transform = deleteNoteWithReference(new Transform(doc), reference);
|
|
183
|
-
if (!transform.docChanged) return note;
|
|
184
|
-
return {
|
|
185
|
-
...note,
|
|
186
|
-
content: proseDocToBlocks(transform.doc, note.content, styles)
|
|
187
|
-
};
|
|
188
|
-
};
|
|
189
|
-
const editNotes = (document, edits) => {
|
|
190
|
-
if (edits.size === 0) return document;
|
|
191
|
-
const edit = (kind, notes) => {
|
|
192
|
-
if (!notes?.some((note) => edits.has(noteKey(kind, note.id)))) return notes;
|
|
193
|
-
return notes.map((note) => edits.get(noteKey(kind, note.id))?.(note) ?? note);
|
|
194
|
-
};
|
|
195
|
-
const footnotes = edit("footnote", document.package.footnotes);
|
|
196
|
-
const endnotes = edit("endnote", document.package.endnotes);
|
|
197
|
-
if (footnotes === document.package.footnotes && endnotes === document.package.endnotes) return document;
|
|
198
|
-
return {
|
|
199
|
-
...document,
|
|
200
|
-
package: {
|
|
201
|
-
...document.package,
|
|
202
|
-
...footnotes !== void 0 && { footnotes },
|
|
203
|
-
...endnotes !== void 0 && { endnotes }
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
};
|
|
207
|
-
const createNoteReferenceFollower = () => {
|
|
208
|
-
let base = null;
|
|
209
|
-
const replaced = /* @__PURE__ */ new Map();
|
|
210
|
-
const pending = /* @__PURE__ */ new Map();
|
|
211
|
-
const recorded = (key, edit) => (note) => {
|
|
212
|
-
const result = edit(note);
|
|
213
|
-
if (result !== note) pending.set(key, {
|
|
214
|
-
from: note,
|
|
215
|
-
to: result
|
|
216
|
-
});
|
|
217
|
-
return result;
|
|
218
|
-
};
|
|
219
|
-
return {
|
|
220
|
-
noteBase: (before) => {
|
|
221
|
-
base ??= before;
|
|
222
|
-
},
|
|
223
|
-
reconcile: (document, body) => {
|
|
224
|
-
const before = base;
|
|
225
|
-
base = null;
|
|
226
|
-
if (!before) return document;
|
|
227
|
-
const was = noteReferenceStates(before);
|
|
228
|
-
const now = noteReferenceStates(body);
|
|
229
|
-
const deletions = referenceDeletions(body);
|
|
230
|
-
const rejected = referenceDeletions(before);
|
|
231
|
-
const edits = /* @__PURE__ */ new Map();
|
|
232
|
-
for (const [key, state] of now) {
|
|
233
|
-
const previous = was.get(key);
|
|
234
|
-
const rejectedDeletion = rejected.get(key);
|
|
235
|
-
if (state === "live" && previous === "deleted" && rejectedDeletion) edits.set(key, recorded(key, (note) => {
|
|
236
|
-
const restored = restoredNote(note, document, rejectedDeletion);
|
|
237
|
-
if (restored !== note) replaced.set(key, {
|
|
238
|
-
restored,
|
|
239
|
-
previous: note
|
|
240
|
-
});
|
|
241
|
-
return restored;
|
|
242
|
-
}));
|
|
243
|
-
const reference = deletions.get(key);
|
|
244
|
-
if (state === "deleted" && previous === "live" && reference) edits.set(key, recorded(key, (note) => {
|
|
245
|
-
const earlier = replaced.get(key);
|
|
246
|
-
replaced.delete(key);
|
|
247
|
-
return earlier?.restored === note ? earlier.previous : deletedNote(note, document, reference);
|
|
248
|
-
}));
|
|
249
|
-
}
|
|
250
|
-
return editNotes(document, edits);
|
|
251
|
-
},
|
|
252
|
-
withPending: (document) => {
|
|
253
|
-
const edits = /* @__PURE__ */ new Map();
|
|
254
|
-
for (const [key, { from, to }] of pending) edits.set(key, (note) => {
|
|
255
|
-
if (note !== from) pending.delete(key);
|
|
256
|
-
return note === from ? to : note;
|
|
257
|
-
});
|
|
258
|
-
return editNotes(document, edits);
|
|
259
|
-
},
|
|
260
|
-
reset: () => {
|
|
261
|
-
base = null;
|
|
262
|
-
replaced.clear();
|
|
263
|
-
pending.clear();
|
|
264
|
-
}
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
26
|
/** The notes model content refers to, live or pending deletion. */
|
|
268
27
|
const noteKeysReferencedIn = (content) => {
|
|
269
28
|
const keys = /* @__PURE__ */ new Set();
|
|
@@ -358,4 +117,4 @@ const withoutUnreferencedNotes = (document, heldUnreferenced) => {
|
|
|
358
117
|
}
|
|
359
118
|
};
|
|
360
119
|
};
|
|
361
|
-
export {
|
|
120
|
+
export { heldUnreferencedNotes, noteKeysReferencedIn, noteReferenceStates, referencedNotes, withoutUnreferencedNotes };
|
|
@@ -6,8 +6,8 @@ import "./extensions/nodes/RangeAnchorExtension.js";
|
|
|
6
6
|
import { mapPlacedRanges } from "./pastePlacement.js";
|
|
7
7
|
import { forEachAnnotationIdInDoc } from "./plugins/revisionIds.js";
|
|
8
8
|
import { readRangeAnchorAttrs } from "./rangeAnchorAttrs.js";
|
|
9
|
-
import { Fragment, Slice } from "prosemirror-model";
|
|
10
9
|
import { MAX_REVISION_ID } from "@stll/docx-core/model";
|
|
10
|
+
import { Fragment, Slice } from "prosemirror-model";
|
|
11
11
|
// src/prosemirror/pastedCommentCopies.ts
|
|
12
12
|
/**
|
|
13
13
|
* One range per comment id, for a paste or a drop into a ProseMirror session.
|
|
@@ -2,8 +2,8 @@ import { getCachedNumberingMap } from "../../docx/numberingParser.js";
|
|
|
2
2
|
import { completeNumberingForDoc, paragraphListReferences } from "../listInstanceReferences.js";
|
|
3
3
|
import { createPluginKeyOwner } from "../pluginKeyOwner.js";
|
|
4
4
|
import { panic } from "better-result";
|
|
5
|
-
import { AddMarkStep, DocAttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from "prosemirror-transform";
|
|
6
5
|
import { Plugin } from "prosemirror-state";
|
|
6
|
+
import { AddMarkStep, DocAttrStep, RemoveMarkStep, ReplaceAroundStep, ReplaceStep } from "prosemirror-transform";
|
|
7
7
|
// src/prosemirror/plugins/documentNumbering.ts
|
|
8
8
|
/** Document-scoped numbering definitions for list-editing commands. */
|
|
9
9
|
const documentNumberingKey = createPluginKeyOwner("documentNumbering");
|
|
@@ -4,9 +4,9 @@ import { StyleResolver, createStyleResolver } from "../styles/styleResolver.js";
|
|
|
4
4
|
import { getDocumentNumbering } from "./documentNumbering.js";
|
|
5
5
|
import { documentStylesKey, getDocumentBuiltInStyles, getDocumentStyleDefinitions, getDocumentStyleResolver } from "./documentStyleState.js";
|
|
6
6
|
import { resolveEditedParagraphStyles } from "./paragraphStyleResolution.js";
|
|
7
|
+
import { Plugin } from "prosemirror-state";
|
|
7
8
|
import { Mark } from "prosemirror-model";
|
|
8
9
|
import { Mapping, ReplaceStep } from "prosemirror-transform";
|
|
9
|
-
import { Plugin } from "prosemirror-state";
|
|
10
10
|
import { isHistoryTransaction } from "prosemirror-history";
|
|
11
11
|
// src/prosemirror/plugins/documentStyles.ts
|
|
12
12
|
/**
|
|
@@ -12,8 +12,8 @@ import { readMoveRangeBoundaryAttrs } from "./moveRangeBoundaryAttrs.js";
|
|
|
12
12
|
import { readRangeAnchorAttrs } from "./rangeAnchorAttrs.js";
|
|
13
13
|
import { isZeroWidthAnchor } from "./zeroWidthAnchors.js";
|
|
14
14
|
import { panic } from "better-result";
|
|
15
|
-
import { Fragment, Mark } from "prosemirror-model";
|
|
16
15
|
import { isCommentExhausted, withoutCommentThreads } from "@stll/docx-core/ops";
|
|
16
|
+
import { Fragment, Mark } from "prosemirror-model";
|
|
17
17
|
// src/prosemirror/replacedAnnotations.ts
|
|
18
18
|
/**
|
|
19
19
|
* What survives when an edit replaces a span of inline content.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { EditorState, Transaction } from "prosemirror-state";
|
|
2
|
+
import { Slice } from "prosemirror-model";
|
|
3
|
+
import { EditorView } from "prosemirror-view";
|
|
4
|
+
export declare const SUGGESTION_META = "suggestionModeApplied";
|
|
5
|
+
export declare const SUGGESTION_BYPASS_META = "suggestionModeBypass";
|
|
6
|
+
/** Text typed before list autoformat rules get to see it. */
|
|
7
|
+
export declare const SUGGESTED_TEXT_INPUT_META = "suggestionModeTextInput";
|
|
8
|
+
export type SuggestionMode = {
|
|
9
|
+
active: boolean;
|
|
10
|
+
author: string;
|
|
11
|
+
};
|
|
12
|
+
export type SuggestedRangeDeletion = {
|
|
13
|
+
state: EditorState;
|
|
14
|
+
tr: Transaction;
|
|
15
|
+
from: number;
|
|
16
|
+
to: number;
|
|
17
|
+
};
|
|
18
|
+
type SuggestionModeState = SuggestionMode & {
|
|
19
|
+
commands: {
|
|
20
|
+
paste: (view: EditorView, slice: Slice, mode: SuggestionMode) => boolean;
|
|
21
|
+
deleteRange: (range: SuggestedRangeDeletion) => boolean;
|
|
22
|
+
deleteSelection: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const suggestionModeKey: Readonly<{
|
|
26
|
+
key: string;
|
|
27
|
+
createKey: () => import("prosemirror-state").PluginKey<SuggestionModeState>;
|
|
28
|
+
owns: (plugin: import("prosemirror-state").Plugin<SuggestionModeState>) => boolean;
|
|
29
|
+
get: (state: EditorState) => import("prosemirror-state").Plugin<SuggestionModeState> | undefined;
|
|
30
|
+
getState: (state: EditorState) => SuggestionModeState | undefined;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const isSuggestionModeActive: (state: EditorState) => boolean;
|
|
33
|
+
export type SuggestionMarkAttrs = {
|
|
34
|
+
revisionId: number;
|
|
35
|
+
author: string;
|
|
36
|
+
date: string;
|
|
37
|
+
};
|
|
38
|
+
export declare const makeMarkAttrs: ({ author }: SuggestionMode) => SuggestionMarkAttrs;
|
|
39
|
+
export declare const makeRevisionInfo: (state: EditorState) => {
|
|
40
|
+
id: number;
|
|
41
|
+
author: string;
|
|
42
|
+
date: string;
|
|
43
|
+
} | null;
|
|
44
|
+
export declare const pasteAsSuggestion: (view: EditorView, slice: Slice) => boolean;
|
|
45
|
+
export declare const suggestRangeDeletion: (range: SuggestedRangeDeletion) => boolean;
|
|
46
|
+
export declare const deleteSelectionAsSuggestion: (state: EditorState, dispatch: (tr: Transaction) => void) => boolean;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { createPluginKeyOwner } from "./pluginKeyOwner.js";
|
|
2
|
+
import { mintRevisionId } from "./plugins/revisionIds.js";
|
|
3
|
+
// src/prosemirror/suggestionCommands.ts
|
|
4
|
+
const SUGGESTION_META = "suggestionModeApplied";
|
|
5
|
+
const SUGGESTION_BYPASS_META = "suggestionModeBypass";
|
|
6
|
+
/** Text typed before list autoformat rules get to see it. */
|
|
7
|
+
const SUGGESTED_TEXT_INPUT_META = "suggestionModeTextInput";
|
|
8
|
+
const suggestionModeKey = createPluginKeyOwner("suggestionMode");
|
|
9
|
+
const isSuggestionModeActive = (state) => suggestionModeKey.getState(state)?.active ?? false;
|
|
10
|
+
const makeMarkAttrs = ({ author }) => ({
|
|
11
|
+
revisionId: mintRevisionId(),
|
|
12
|
+
author,
|
|
13
|
+
date: (/* @__PURE__ */ new Date()).toISOString()
|
|
14
|
+
});
|
|
15
|
+
const makeRevisionInfo = (state) => {
|
|
16
|
+
const mode = suggestionModeKey.getState(state);
|
|
17
|
+
if (!mode?.active) return null;
|
|
18
|
+
const { revisionId, author, date } = makeMarkAttrs(mode);
|
|
19
|
+
return {
|
|
20
|
+
id: revisionId,
|
|
21
|
+
author,
|
|
22
|
+
date
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const pasteAsSuggestion = (view, slice) => {
|
|
26
|
+
const mode = suggestionModeKey.getState(view.state);
|
|
27
|
+
return mode?.active ? mode.commands.paste(view, slice, mode) : false;
|
|
28
|
+
};
|
|
29
|
+
const suggestRangeDeletion = (range) => suggestionModeKey.getState(range.state)?.commands.deleteRange(range) ?? false;
|
|
30
|
+
const deleteSelectionAsSuggestion = (state, dispatch) => suggestionModeKey.getState(state)?.commands.deleteSelection(state, dispatch) ?? false;
|
|
31
|
+
export { SUGGESTED_TEXT_INPUT_META, SUGGESTION_BYPASS_META, SUGGESTION_META, deleteSelectionAsSuggestion, isSuggestionModeActive, makeMarkAttrs, makeRevisionInfo, pasteAsSuggestion, suggestRangeDeletion, suggestionModeKey };
|
|
@@ -2,8 +2,8 @@ import { decodeTableCellParagraphSourcePayload, transportTableCellsWithParagraph
|
|
|
2
2
|
import { maxOf } from "../utils/extremes.js";
|
|
3
3
|
import { expectTableAttrs, mergeTableAttrs } from "./attrs/index.js";
|
|
4
4
|
import { setPastedRepeats } from "./pastePlacement.js";
|
|
5
|
-
import { Fragment, Slice } from "prosemirror-model";
|
|
6
5
|
import { CellSelection, TableMap, cellAround, tableNodeTypes } from "prosemirror-tables";
|
|
6
|
+
import { Fragment, Slice } from "prosemirror-model";
|
|
7
7
|
import { Transform } from "prosemirror-transform";
|
|
8
8
|
// src/prosemirror/tableCellPaste.ts
|
|
9
9
|
/**
|
|
@@ -7,9 +7,9 @@ import { rebaseParagraphRuns } from "./rebaseParagraphRunFormatting.js";
|
|
|
7
7
|
import { paragraphRunStyleContext } from "./runStyleFormatting.js";
|
|
8
8
|
import { trackedRevisionPathOf } from "./trackedRevisionPath.js";
|
|
9
9
|
import { paragraphContentOf } from "./zeroWidthAnchors.js";
|
|
10
|
+
import { paragraphMarkOutcome } from "@stll/docx-core/ops";
|
|
10
11
|
import { Fragment, Slice } from "prosemirror-model";
|
|
11
12
|
import { ReplaceAroundStep, ReplaceStep, StepMap } from "prosemirror-transform";
|
|
12
|
-
import { paragraphMarkOutcome } from "@stll/docx-core/ops";
|
|
13
13
|
// src/prosemirror/tableRunIn.ts
|
|
14
14
|
/**
|
|
15
15
|
* A paragraph whose mark goes, right before a table.
|
|
@@ -2,8 +2,8 @@ import { adoptNativeSelection, isCompositionKeyDown } from "./nativeSelection.js
|
|
|
2
2
|
import { createPluginKeyOwner } from "./pluginKeyOwner.js";
|
|
3
3
|
import { RUN_FORMATTING_MARK_NAMES } from "./runFormattingMarkNames.js";
|
|
4
4
|
import { isZeroWidthAnchor } from "./zeroWidthAnchors.js";
|
|
5
|
-
import { Mapping } from "prosemirror-transform";
|
|
6
5
|
import { AllSelection, Plugin, Selection, TextSelection } from "prosemirror-state";
|
|
6
|
+
import { Mapping } from "prosemirror-transform";
|
|
7
7
|
// src/prosemirror/textInput.ts
|
|
8
8
|
const LOCKED_CONTROL_LOCKS = /* @__PURE__ */ new Set(["contentLocked", "sdtContentLocked"]);
|
|
9
9
|
const isLockedControl = (node) => node?.type.name === "sdt" && LOCKED_CONTROL_LOCKS.has(node.attrs["lock"]);
|
package/dist/server.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ import { FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_E
|
|
|
36
36
|
import { applyTemplatePlan } from "./docx/server/templatePlan/apply.js";
|
|
37
37
|
import { analyzeDocxBlocks } from "./docx/server/templatePlan/blocks.js";
|
|
38
38
|
import { inspectDocxTemplate } from "./docx/server/templatePlan/inspect.js";
|
|
39
|
-
import { ApplyTemplatePlanArgs, ApplyTemplatePlanOptions, ApplyTemplatePlanResult, DocxBlock, DocxBlockManifest, DocxBlockNumbering, DocxNote, DocxTableCell, DocxTemplateBookmark, DocxTemplateField, DocxTemplateInspection, DocxTemplateNumbering, DocxTemplateNumberingLevel, DocxTemplateSection, DocxTemplateStyle, TEMPLATE_PLAN_ERROR_CODES, TemplatePlan, TemplatePlanBlockResult, TemplatePlanError, TemplatePlanErrorCode, TemplatePlanFieldLeftover, TemplatePlanHighlight, TemplatePlanIssue, TemplatePlanItem, TemplatePlanMerge, TemplatePlanNestedParagraph, TemplatePlanNoteCounts, TemplatePlanNumbering, TemplatePlanNumberingPatch, TemplatePlanOmitReason, TemplatePlanReference, TemplatePlanReferenceResult, TemplatePlanReport, TemplatePlanSourceItem, TemplatePlanSpanCounts, VerifyTemplatePlanOutputArgs } from "./docx/server/templatePlan/types.js";
|
|
39
|
+
import { ApplyTemplatePlanArgs, ApplyTemplatePlanOptions, ApplyTemplatePlanResult, DocxBlock, DocxBlockManifest, DocxBlockNumbering, DocxCompat, DocxNote, DocxSection, DocxTableCell, DocxTemplateBookmark, DocxTemplateField, DocxTemplateInspection, DocxTemplateNumbering, DocxTemplateNumberingLevel, DocxTemplateSection, DocxTemplateStyle, TEMPLATE_PLAN_ERROR_CODES, TemplatePlan, TemplatePlanBlockResult, TemplatePlanError, TemplatePlanErrorCode, TemplatePlanFieldLeftover, TemplatePlanHighlight, TemplatePlanIssue, TemplatePlanItem, TemplatePlanMerge, TemplatePlanNestedParagraph, TemplatePlanNoteCounts, TemplatePlanNumbering, TemplatePlanNumberingPatch, TemplatePlanOmitReason, TemplatePlanReference, TemplatePlanReferenceResult, TemplatePlanReport, TemplatePlanSection, TemplatePlanSectionPage, TemplatePlanSourceItem, TemplatePlanSpanCounts, VerifyTemplatePlanOutputArgs } from "./docx/server/templatePlan/types.js";
|
|
40
40
|
import { verifyTemplatePlanOutput } from "./docx/server/templatePlan/verify.js";
|
|
41
41
|
import { FOLIO_DOCX_CONFORMANCE_CHECKS, FOLIO_DOCX_CONFORMANCE_ISSUE_CODES, FOLIO_DOCX_CONFORMANCE_PROFILE, FOLIO_DOCX_CONFORMANCE_REPORT_VERSION, FolioDocxConformanceCheck, FolioDocxConformanceCheckId, FolioDocxConformanceCheckStatus, FolioDocxConformanceIssue, FolioDocxConformanceIssueCode, FolioDocxConformanceReport, FolioDocxConformanceStatus, ValidateDocxConformanceOptions, validateDocxConformance } from "./docx/server/validateDocxConformance.js";
|
|
42
42
|
import { GenerateRedlineDocxOptions, GenerateRedlineDocxResourceImportError, GenerateRedlineDocxResult, GenerateRedlineReferenceWarning, GenerateRedlineUnprocessedStory, InvalidGenerateRedlineDocxOptionsError, generateRedlineDocx } from "./redline.js";
|
|
@@ -46,4 +46,4 @@ import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocumentPreset, Do
|
|
|
46
46
|
import { DeriveBlockIdInput, FolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, isFolioBlockId, isSequentialFolioBlockId } from "./types/block-id.js";
|
|
47
47
|
import { CreateEmptyDocumentOptions, createEmptyDocument } from "./utils/createDocument.js";
|
|
48
48
|
import { FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, FolioBlockDiff, FolioBlockProperty, FolioCompareDocxVersionsOptions, FolioDocumentMetadataValue, FolioFormatProperty, FolioMetadataDiff, FolioStoryDiff, FolioVersionBlockHandle, FolioVersionChangeProperty, FolioVersionComparisonPrivacyTransform, FolioVersionComparisonScope, FolioVersionDiff, FolioVersionDiffPrivacyOptions, FolioVersionDiffPrivacyReport, FolioVersionDiffSegment, FolioVersionDiffSummaryCounts, InvalidFolioVersionComparisonOptionsError, applyFolioVersionDiffPrivacy, compareDocxVersions, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope } from "./version-comparison.js";
|
|
49
|
-
export { type ApplyDocxXmlPatchProposalArgs, type ApplyFolioAIEditsToBufferOptions, type ApplyFolioAIEditsToBufferResult, type ApplyTemplatePlanArgs, type ApplyTemplatePlanOptions, type ApplyTemplatePlanResult, BILINGUAL_TABLE_LAYOUTS, type BilingualBorders, type BilingualParagraphRef, type BilingualRow, type BilingualRowKind, type BilingualTableLayout, type BilingualTableParagraphRef, type ChangeListFormatOptions, type CreateBilingualDocumentOptions, type CreateBilingualDocumentResult, type CreateBilingualDocxOptions, type CreateBilingualDocxResult, type CreateCommentReplyInput, type CreateEmptyDocumentOptions, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, type DeriveBlockIdInput, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, DocxArchiveError, type DocxArchiveOptions, type DocxBlock, type DocxBlockManifest, type DocxBlockNumbering, type DocxNote, type DocxParagraphSource, type DocxTableCell, type DocxTableRowKind, type DocxTableRowPosition, type DocxTemplateBookmark, type DocxTemplateField, type DocxTemplateInspection, type DocxTemplateNumbering, type DocxTemplateNumberingLevel, type DocxTemplateSection, type DocxTemplateStyle, EnsureParaIdsError, type EnsureParaIdsOptions, type EnsureParaIdsResult, type EvaluateDocxXmlPatchProposalArgs, type ExtractDocumentStyleSetOptions, type ExtractDocxTextOptions, type ExtractedDocxParagraph, type ExtractedDocxTableCell, type ExtractedDocxTableCellParagraph, type ExtractedDocxText, FOLIO_DOCUMENT_METADATA_PROPERTIES, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_BATCH_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_KEYS_BY_TYPE, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_DOCUMENT_PRIVACY_TRANSFORMS, FOLIO_DOCX_CONFORMANCE_CHECKS, FOLIO_DOCX_CONFORMANCE_ISSUE_CODES, FOLIO_DOCX_CONFORMANCE_PROFILE, FOLIO_DOCX_CONFORMANCE_REPORT_VERSION, FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_ERROR_CODES, FOLIO_DOCX_PACKAGE_INSPECTION_VERSION, FOLIO_DOCX_XML_PATCH_APPLICATION_PROFILE, FOLIO_DOCX_XML_PATCH_APPLICATION_VERSION, FOLIO_DOCX_XML_PATCH_PROPOSAL_DEFAULTS, FOLIO_DOCX_XML_PATCH_PROPOSAL_ISSUE_CODES, FOLIO_DOCX_XML_PATCH_PROPOSAL_PROFILE, FOLIO_DOCX_XML_PATCH_PROPOSAL_VERSION, FOLIO_EXISTING_REVISION_POLICIES, FOLIO_HIGHLIGHT_COLOR_VALUES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_LIST_NUMBER_FORMAT_VALUES, FOLIO_PAGE_BREAK_CLEAR_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_RESOLVED_REVIEWED_VIEWS, FOLIO_REVIEWED_VIEWS, FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIComment, type FolioAIDiagnosticBlock, type FolioAIEditApplyMode, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphBlock, type FolioAIParagraphSpacing, type FolioAITextRangeHandle, type FolioAbsorbedBlock, type FolioApplyDocumentOperationsOptions, type FolioApplyDocumentOperationsToStoryOptions, type FolioApplyOperationsOptions, type FolioBlockDiff, type FolioBlockId, type FolioBlockProperty, type FolioCompareDocxVersionsOptions, type FolioContentParagraphKind, type FolioDocumentMetadataProperty, type FolioDocumentMetadataValue, type FolioDocumentNavigationTarget, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationBatchInput, type FolioDocumentOperationBatchPrecondition, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationQueuedOperation, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocumentOutline, type FolioDocumentOutlineEntry, FolioDocumentPrivacyArchiveError, type FolioDocumentPrivacyOptions, type FolioDocumentPrivacyReport, type FolioDocumentPrivacyTransform, type FolioDocumentSection, type FolioDocumentSectionHandle, type FolioDocumentSectionReadResult, type FolioDocumentStory, type FolioDocumentStoryHandle, FolioDocumentStoryNotFoundError, type FolioDocxConformanceCheck, type FolioDocxConformanceCheckId, type FolioDocxConformanceCheckStatus, type FolioDocxConformanceIssue, type FolioDocxConformanceIssueCode, type FolioDocxConformanceReport, type FolioDocxConformanceStatus, type FolioDocxInspectedXmlPart, type FolioDocxPackageInspection, FolioDocxPackageInspectionError, type FolioDocxPackageInspectionErrorCode, type FolioDocxPackageInspectionLimits, type FolioDocxPackagePart, type FolioDocxPackagePartKind, type FolioDocxPreparedXmlReplacement, FolioDocxReviewer, type FolioDocxReviewerOptions, type FolioDocxXmlPatchApplication, FolioDocxXmlPatchApplicationError, type FolioDocxXmlPatchApplicationReceipt, type FolioDocxXmlPatchProposal, type FolioDocxXmlPatchProposalEvaluation, type FolioDocxXmlPatchProposalIssue, type FolioDocxXmlPatchProposalIssueCode, type FolioDocxXmlPatchProposalLimits, type FolioDocxXmlReplacement, type FolioEditableDocumentStoryHandle, type FolioFormatProperty, type FolioMetadataDiff, type FolioReadReviewedStoryOptions, type FolioResolveReviewedStoryOptions, type FolioResolvedReviewedView, type FolioReviewChange, type FolioReviewChangeFilter, type FolioReviewChangeKind, type FolioReviewComment, type FolioReviewCommentFilter, type FolioReviewCommentReply, type FolioReviewReplyInput, type FolioReviewResolution, type FolioReviewResolutionSkip, type FolioReviewedStory, type FolioReviewedView, type FolioReviewerRepackReason, type FolioReviewerSaveOptions, type FolioReviewerSaveResult, type FolioRevisionStamp, FolioRoomJournalError, type FolioStoryDiff, type FolioVersionBlockHandle, type FolioVersionChangeProperty, type FolioVersionComparisonPrivacyTransform, type FolioVersionComparisonScope, type FolioVersionDiff, type FolioVersionDiffPrivacyOptions, type FolioVersionDiffPrivacyReport, type FolioVersionDiffSegment, type FolioVersionDiffSummaryCounts, type GenerateRedlineDocxOptions, GenerateRedlineDocxResourceImportError, type GenerateRedlineDocxResult, type GenerateRedlineReferenceWarning, type GenerateRedlineUnprocessedStory, HEADING_LEVELS, type HeadingLevel, type InspectDocxPackageOptions, InvalidBilingualDocumentOptionsError, InvalidFolioDocumentOperationBatchError, InvalidFolioDocumentPrivacyOptionsError, InvalidFolioDocxXmlPatchProposalError, InvalidFolioDocxXmlPatchProposalOptionsError, InvalidFolioReportBuilderOptionsError, InvalidFolioVersionComparisonOptionsError, InvalidGenerateRedlineDocxOptionsError, type ParseOptions, type RewriteDocxMetadataPrivacyResult, STELLA_STYLE_SET_NAME, TEMPLATE_PLAN_ERROR_CODES, type TableCellSpec, type TemplatePlan, type TemplatePlanBlockResult, TemplatePlanError, type TemplatePlanErrorCode, type TemplatePlanFieldLeftover, type TemplatePlanHighlight, type TemplatePlanIssue, type TemplatePlanItem, type TemplatePlanMerge, type TemplatePlanNestedParagraph, type TemplatePlanNoteCounts, type TemplatePlanNumbering, type TemplatePlanNumberingPatch, type TemplatePlanOmitReason, type TemplatePlanReference, type TemplatePlanReferenceResult, type TemplatePlanReport, type TemplatePlanSourceItem, type TemplatePlanSpanCounts, UnsupportedFolioDocumentOperationVersionError, UnsupportedFolioDocxXmlPatchApplicationProfileError, UnsupportedFolioReviewedViewError, type ValidateDocxConformanceOptions, type VerifyTemplatePlanOutputArgs, analyzeDocxBlocks, applyDocxXmlPatchProposal, applyFolioAIEditsToBuffer, applyFolioVersionDiffPrivacy, applyTemplatePlan, assertSupportedFolioDocumentOperationVersion, bookmark, changeListFormat, compareDocxVersions, createBilingualDocument, createBilingualDocx, createDocx, createEmptyDocument, createFolioAITextRangeHandle, createStellaStyleDocumentPreset, createStellaStyleSet, createTableOfContentsField, deriveBlockId, docxToMarkdown, endnote, ensureParaIds, evaluateDocxXmlPatchProposal, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractDocxText, generateRedlineDocx, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioDocumentOperationRemovedBlockIds, getFolioDocumentOutline, getFolioParaIdFromBlockId, getTrackedFolioDocumentOperationRemovedBlockIds, hashFolioAIBlockText, heading, hyperlink, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxPackage, inspectDocxTemplate, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isFolioDocumentPrivacyTransform, isFolioResolvedReviewedView, isFolioReviewedView, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope, isSequentialFolioBlockId, isSupportedFolioDocumentOperationVersion, normalizeFolioAIBlockText, pageBreak, paragraph, parseDocx, parseFolioDocumentOperationBatch, parseFolioDocxXmlPatchProposal, readBilingualDocument, readBilingualDocx, readFolioDocumentSection, replyToComment, rewriteDocxMetadataPrivacy, run, table, validateDocxConformance, verifyTemplatePlanOutput };
|
|
49
|
+
export { type ApplyDocxXmlPatchProposalArgs, type ApplyFolioAIEditsToBufferOptions, type ApplyFolioAIEditsToBufferResult, type ApplyTemplatePlanArgs, type ApplyTemplatePlanOptions, type ApplyTemplatePlanResult, BILINGUAL_TABLE_LAYOUTS, type BilingualBorders, type BilingualParagraphRef, type BilingualRow, type BilingualRowKind, type BilingualTableLayout, type BilingualTableParagraphRef, type ChangeListFormatOptions, type CreateBilingualDocumentOptions, type CreateBilingualDocumentResult, type CreateBilingualDocxOptions, type CreateBilingualDocxResult, type CreateCommentReplyInput, type CreateEmptyDocumentOptions, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, type DeriveBlockIdInput, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, DocxArchiveError, type DocxArchiveOptions, type DocxBlock, type DocxBlockManifest, type DocxBlockNumbering, type DocxCompat, type DocxNote, type DocxParagraphSource, type DocxSection, type DocxTableCell, type DocxTableRowKind, type DocxTableRowPosition, type DocxTemplateBookmark, type DocxTemplateField, type DocxTemplateInspection, type DocxTemplateNumbering, type DocxTemplateNumberingLevel, type DocxTemplateSection, type DocxTemplateStyle, EnsureParaIdsError, type EnsureParaIdsOptions, type EnsureParaIdsResult, type EvaluateDocxXmlPatchProposalArgs, type ExtractDocumentStyleSetOptions, type ExtractDocxTextOptions, type ExtractedDocxParagraph, type ExtractedDocxTableCell, type ExtractedDocxTableCellParagraph, type ExtractedDocxText, FOLIO_DOCUMENT_METADATA_PROPERTIES, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_BATCH_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_KEYS_BY_TYPE, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_DOCUMENT_PRIVACY_TRANSFORMS, FOLIO_DOCX_CONFORMANCE_CHECKS, FOLIO_DOCX_CONFORMANCE_ISSUE_CODES, FOLIO_DOCX_CONFORMANCE_PROFILE, FOLIO_DOCX_CONFORMANCE_REPORT_VERSION, FOLIO_DOCX_PACKAGE_INSPECTION_DEFAULTS, FOLIO_DOCX_PACKAGE_INSPECTION_ERROR_CODES, FOLIO_DOCX_PACKAGE_INSPECTION_VERSION, FOLIO_DOCX_XML_PATCH_APPLICATION_PROFILE, FOLIO_DOCX_XML_PATCH_APPLICATION_VERSION, FOLIO_DOCX_XML_PATCH_PROPOSAL_DEFAULTS, FOLIO_DOCX_XML_PATCH_PROPOSAL_ISSUE_CODES, FOLIO_DOCX_XML_PATCH_PROPOSAL_PROFILE, FOLIO_DOCX_XML_PATCH_PROPOSAL_VERSION, FOLIO_EXISTING_REVISION_POLICIES, FOLIO_HIGHLIGHT_COLOR_VALUES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_LIST_NUMBER_FORMAT_VALUES, FOLIO_PAGE_BREAK_CLEAR_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_RESOLVED_REVIEWED_VIEWS, FOLIO_REVIEWED_VIEWS, FOLIO_VERSION_COMPARISON_PRIVACY_TRANSFORMS, FOLIO_VERSION_COMPARISON_SCOPES, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIComment, type FolioAIDiagnosticBlock, type FolioAIEditApplyMode, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphBlock, type FolioAIParagraphSpacing, type FolioAITextRangeHandle, type FolioAbsorbedBlock, type FolioApplyDocumentOperationsOptions, type FolioApplyDocumentOperationsToStoryOptions, type FolioApplyOperationsOptions, type FolioBlockDiff, type FolioBlockId, type FolioBlockProperty, type FolioCompareDocxVersionsOptions, type FolioContentParagraphKind, type FolioDocumentMetadataProperty, type FolioDocumentMetadataValue, type FolioDocumentNavigationTarget, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationBatchInput, type FolioDocumentOperationBatchPrecondition, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationQueuedOperation, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocumentOutline, type FolioDocumentOutlineEntry, FolioDocumentPrivacyArchiveError, type FolioDocumentPrivacyOptions, type FolioDocumentPrivacyReport, type FolioDocumentPrivacyTransform, type FolioDocumentSection, type FolioDocumentSectionHandle, type FolioDocumentSectionReadResult, type FolioDocumentStory, type FolioDocumentStoryHandle, FolioDocumentStoryNotFoundError, type FolioDocxConformanceCheck, type FolioDocxConformanceCheckId, type FolioDocxConformanceCheckStatus, type FolioDocxConformanceIssue, type FolioDocxConformanceIssueCode, type FolioDocxConformanceReport, type FolioDocxConformanceStatus, type FolioDocxInspectedXmlPart, type FolioDocxPackageInspection, FolioDocxPackageInspectionError, type FolioDocxPackageInspectionErrorCode, type FolioDocxPackageInspectionLimits, type FolioDocxPackagePart, type FolioDocxPackagePartKind, type FolioDocxPreparedXmlReplacement, FolioDocxReviewer, type FolioDocxReviewerOptions, type FolioDocxXmlPatchApplication, FolioDocxXmlPatchApplicationError, type FolioDocxXmlPatchApplicationReceipt, type FolioDocxXmlPatchProposal, type FolioDocxXmlPatchProposalEvaluation, type FolioDocxXmlPatchProposalIssue, type FolioDocxXmlPatchProposalIssueCode, type FolioDocxXmlPatchProposalLimits, type FolioDocxXmlReplacement, type FolioEditableDocumentStoryHandle, type FolioFormatProperty, type FolioMetadataDiff, type FolioReadReviewedStoryOptions, type FolioResolveReviewedStoryOptions, type FolioResolvedReviewedView, type FolioReviewChange, type FolioReviewChangeFilter, type FolioReviewChangeKind, type FolioReviewComment, type FolioReviewCommentFilter, type FolioReviewCommentReply, type FolioReviewReplyInput, type FolioReviewResolution, type FolioReviewResolutionSkip, type FolioReviewedStory, type FolioReviewedView, type FolioReviewerRepackReason, type FolioReviewerSaveOptions, type FolioReviewerSaveResult, type FolioRevisionStamp, FolioRoomJournalError, type FolioStoryDiff, type FolioVersionBlockHandle, type FolioVersionChangeProperty, type FolioVersionComparisonPrivacyTransform, type FolioVersionComparisonScope, type FolioVersionDiff, type FolioVersionDiffPrivacyOptions, type FolioVersionDiffPrivacyReport, type FolioVersionDiffSegment, type FolioVersionDiffSummaryCounts, type GenerateRedlineDocxOptions, GenerateRedlineDocxResourceImportError, type GenerateRedlineDocxResult, type GenerateRedlineReferenceWarning, type GenerateRedlineUnprocessedStory, HEADING_LEVELS, type HeadingLevel, type InspectDocxPackageOptions, InvalidBilingualDocumentOptionsError, InvalidFolioDocumentOperationBatchError, InvalidFolioDocumentPrivacyOptionsError, InvalidFolioDocxXmlPatchProposalError, InvalidFolioDocxXmlPatchProposalOptionsError, InvalidFolioReportBuilderOptionsError, InvalidFolioVersionComparisonOptionsError, InvalidGenerateRedlineDocxOptionsError, type ParseOptions, type RewriteDocxMetadataPrivacyResult, STELLA_STYLE_SET_NAME, TEMPLATE_PLAN_ERROR_CODES, type TableCellSpec, type TemplatePlan, type TemplatePlanBlockResult, TemplatePlanError, type TemplatePlanErrorCode, type TemplatePlanFieldLeftover, type TemplatePlanHighlight, type TemplatePlanIssue, type TemplatePlanItem, type TemplatePlanMerge, type TemplatePlanNestedParagraph, type TemplatePlanNoteCounts, type TemplatePlanNumbering, type TemplatePlanNumberingPatch, type TemplatePlanOmitReason, type TemplatePlanReference, type TemplatePlanReferenceResult, type TemplatePlanReport, type TemplatePlanSection, type TemplatePlanSectionPage, type TemplatePlanSourceItem, type TemplatePlanSpanCounts, UnsupportedFolioDocumentOperationVersionError, UnsupportedFolioDocxXmlPatchApplicationProfileError, UnsupportedFolioReviewedViewError, type ValidateDocxConformanceOptions, type VerifyTemplatePlanOutputArgs, analyzeDocxBlocks, applyDocxXmlPatchProposal, applyFolioAIEditsToBuffer, applyFolioVersionDiffPrivacy, applyTemplatePlan, assertSupportedFolioDocumentOperationVersion, bookmark, changeListFormat, compareDocxVersions, createBilingualDocument, createBilingualDocx, createDocx, createEmptyDocument, createFolioAITextRangeHandle, createStellaStyleDocumentPreset, createStellaStyleSet, createTableOfContentsField, deriveBlockId, docxToMarkdown, endnote, ensureParaIds, evaluateDocxXmlPatchProposal, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractDocxText, generateRedlineDocx, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioDocumentOperationRemovedBlockIds, getFolioDocumentOutline, getFolioParaIdFromBlockId, getTrackedFolioDocumentOperationRemovedBlockIds, hashFolioAIBlockText, heading, hyperlink, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxPackage, inspectDocxTemplate, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isFolioDocumentPrivacyTransform, isFolioResolvedReviewedView, isFolioReviewedView, isFolioVersionComparisonPrivacyTransform, isFolioVersionComparisonScope, isSequentialFolioBlockId, isSupportedFolioDocumentOperationVersion, normalizeFolioAIBlockText, pageBreak, paragraph, parseDocx, parseFolioDocumentOperationBatch, parseFolioDocxXmlPatchProposal, readBilingualDocument, readBilingualDocx, readFolioDocumentSection, replyToComment, rewriteDocxMetadataPrivacy, run, table, validateDocxConformance, verifyTemplatePlanOutput };
|