@stll/folio-core 0.56.0 → 0.58.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/apply.js +122 -22
- package/dist/ai-edits/batch-claims.d.ts +3 -1
- package/dist/ai-edits/batch-claims.js +25 -1
- package/dist/ai-edits/table-row-column-mutations.js +17 -3
- package/dist/ai-suggestions/apply.js +20 -1
- package/dist/compare/inline-atoms.js +40 -16
- package/dist/compare/inline-provenance.js +12 -5
- package/dist/compat/eigenpal.d.ts +2 -1
- package/dist/compat/eigenpal.js +2 -1
- package/dist/controller/canonicalClipboard.d.ts +3 -1
- package/dist/controller/canonicalClipboard.js +31 -13
- package/dist/controller/canonicalComments.d.ts +41 -0
- package/dist/controller/canonicalComments.js +152 -0
- package/dist/controller/canonicalComposition.d.ts +17 -4
- package/dist/controller/canonicalComposition.js +125 -20
- package/dist/controller/canonicalInlineProjection.d.ts +6 -1
- package/dist/controller/canonicalInlineProjection.js +86 -3
- package/dist/controller/canonicalInput.d.ts +1 -1
- package/dist/controller/canonicalInput.js +14 -4
- package/dist/controller/canonicalInputTimer.d.ts +10 -1
- package/dist/controller/canonicalInputTimer.js +24 -1
- package/dist/controller/canonicalPublicOperations.d.ts +2 -2
- package/dist/controller/canonicalPublicOperations.js +107 -15
- package/dist/controller/canonicalSelection.d.ts +18 -0
- package/dist/controller/canonicalSelection.js +41 -0
- package/dist/controller/canonicalSession.d.ts +4 -1
- package/dist/controller/canonicalSession.js +106 -36
- package/dist/controller/canonicalStoryEditor.d.ts +3 -1
- package/dist/controller/canonicalStoryEditor.js +21 -1
- package/dist/controller/canonicalStructure.js +8 -3
- package/dist/controller/folioEditor.js +13 -0
- package/dist/controller/headerFooterEditorManager.d.ts +1 -1
- package/dist/controller/headerFooterEditorManager.js +25 -11
- package/dist/controller/hiddenEditorApi.d.ts +13 -2
- package/dist/controller/hiddenEditorApi.js +5 -1
- package/dist/controller/hiddenEditorManager.d.ts +3 -1
- package/dist/controller/hiddenEditorManager.js +167 -14
- package/dist/controller/noteEditorManager.d.ts +1 -1
- package/dist/controller/noteEditorManager.js +28 -13
- package/dist/docx/builtInStyles.js +13 -6
- package/dist/docx/containerChildren.gen.d.ts +3 -1
- package/dist/docx/containerChildren.gen.js +33 -1
- package/dist/docx/fieldParser.js +14 -2
- package/dist/docx/hyperlinkParser.d.ts +1 -1
- package/dist/docx/hyperlinkParser.js +20 -1
- package/dist/docx/inlineWrapperContent.d.ts +4 -4
- package/dist/docx/inlineWrapperContent.js +4 -4
- package/dist/docx/linkedSdtPreservation.d.ts +10 -0
- package/dist/docx/linkedSdtPreservation.js +37 -0
- package/dist/docx/listRendering.d.ts +18 -0
- package/dist/{prosemirror/conversion/listRenderingDefinition.js → docx/listRendering.js} +17 -3
- package/dist/docx/paragraphParser.js +88 -67
- package/dist/docx/paragraphPropertySource.d.ts +22 -1
- package/dist/docx/paragraphPropertySource.js +107 -1
- package/dist/docx/preservedRunContent.js +2 -1
- package/dist/docx/relsParser.js +26 -2
- package/dist/docx/rezip.js +9 -6
- package/dist/docx/selectiveSave.js +10 -8
- package/dist/docx/serializer/commentSerializer.d.ts +4 -1
- package/dist/docx/serializer/commentSerializer.js +7 -3
- package/dist/docx/serializer/paragraphSerializer.js +207 -94
- package/dist/docx/server/materializeYjsDocx.js +15 -7
- package/dist/docx/server/migrateYjsAttrSchema.js +17 -5
- package/dist/i18n/messages/ar.gen.js +4 -0
- package/dist/i18n/messages/catalogs.gen.d.ts +68 -0
- package/dist/i18n/messages/catalogs.gen.js +68 -0
- package/dist/i18n/messages/cs.gen.js +4 -0
- package/dist/i18n/messages/de.gen.js +4 -0
- package/dist/i18n/messages/en.gen.js +4 -0
- package/dist/i18n/messages/es.gen.js +4 -0
- package/dist/i18n/messages/et.gen.js +4 -0
- package/dist/i18n/messages/fr.gen.js +4 -0
- package/dist/i18n/messages/he.gen.js +4 -0
- package/dist/i18n/messages/hi.gen.js +4 -0
- package/dist/i18n/messages/hu.gen.js +4 -0
- package/dist/i18n/messages/lt.gen.js +4 -0
- package/dist/i18n/messages/lv.gen.js +4 -0
- package/dist/i18n/messages/messages.gen.d.ts +4 -0
- package/dist/i18n/messages/pl.gen.js +4 -0
- package/dist/i18n/messages/pt-BR.gen.js +4 -0
- package/dist/i18n/messages/sk.gen.js +4 -0
- package/dist/i18n/messages/tr.gen.js +4 -0
- package/dist/i18n/messages/zh-CN.gen.js +4 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/internal/revisionResolutionInline.js +25 -3
- package/dist/markdown/internals.js +7 -0
- package/dist/markdown/renderParagraph.js +11 -12
- package/dist/markdown/renderRuns.js +3 -13
- package/dist/markdown/types.d.ts +3 -0
- package/dist/panel-layout.d.ts +11 -9
- package/dist/panel-layout.js +13 -9
- package/dist/prosemirror/addTrackedDeletionMark.d.ts +18 -0
- package/dist/prosemirror/addTrackedDeletionMark.js +87 -0
- package/dist/prosemirror/attrs/index.js +9 -0
- package/dist/prosemirror/commands/comments.js +60 -35
- package/dist/prosemirror/commands/propertyChangeScope.js +3 -6
- package/dist/prosemirror/commands/resolveParagraphProperties.js +22 -13
- package/dist/prosemirror/commentOps.js +15 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +8 -1
- package/dist/prosemirror/conversion/fromProseDoc.js +150 -30
- package/dist/prosemirror/conversion/toProseDoc.js +128 -40
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +22 -5
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +74 -25
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +11 -0
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +22 -14
- package/dist/prosemirror/extensions/marks/markUtils.js +8 -7
- package/dist/prosemirror/extensions/marks/noteReferenceDeletion.js +5 -2
- package/dist/prosemirror/extensions/nodes/ImageExtension.js +8 -1
- package/dist/prosemirror/fieldRepresentation.d.ts +8 -0
- package/dist/prosemirror/fieldRepresentation.js +18 -0
- package/dist/prosemirror/hyperlinkRemoval.d.ts +13 -1
- package/dist/prosemirror/hyperlinkRemoval.js +28 -9
- package/dist/prosemirror/imagePictureNames.d.ts +12 -0
- package/dist/prosemirror/imagePictureNames.js +20 -0
- package/dist/prosemirror/listNumbering.js +11 -5
- package/dist/prosemirror/noteReferenceOccurrenceId.d.ts +5 -0
- package/dist/prosemirror/noteReferenceOccurrenceId.js +5 -0
- package/dist/prosemirror/noteReferenceOccurrences.d.ts +21 -0
- package/dist/prosemirror/noteReferenceOccurrences.js +185 -0
- package/dist/prosemirror/noteReferenceReview.js +14 -1
- package/dist/prosemirror/paragraphFormattingProvenance.js +1 -0
- package/dist/prosemirror/plugins/documentStyles.d.ts +4 -1
- package/dist/prosemirror/plugins/documentStyles.js +17 -10
- package/dist/prosemirror/plugins/suggestionMode.js +47 -49
- package/dist/prosemirror/preservedXmlReview.d.ts +6 -0
- package/dist/prosemirror/preservedXmlReview.js +35 -0
- package/dist/prosemirror/runFormattingFromMarks.js +2 -2
- package/dist/prosemirror/runFormattingReconciliation.js +5 -4
- package/dist/prosemirror/runPropertyChangeResolution.d.ts +8 -1
- package/dist/prosemirror/runPropertyChangeResolution.js +24 -2
- package/dist/prosemirror/runStyleFormatting.d.ts +74 -2
- package/dist/prosemirror/runStyleFormatting.js +20 -1
- package/dist/prosemirror/schema/marks.d.ts +1 -0
- package/dist/prosemirror/schema/nodes.d.ts +3 -0
- package/dist/prosemirror/styles/paragraphStyleCascade.js +4 -1
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +15 -15
- package/dist/prosemirror/styles/resolvedStyleAttrs.js +69 -28
- package/dist/prosemirror/styles/styleResolver.d.ts +4 -1
- package/dist/prosemirror/styles/styleResolver.js +32 -11
- package/dist/prosemirror/textInput.d.ts +5 -1
- package/dist/prosemirror/textInput.js +3 -3
- package/dist/prosemirror/trackedRevisionPath.d.ts +5 -1
- package/dist/prosemirror/trackedRevisionPath.js +39 -1
- package/dist/prosemirror/validation.js +3 -5
- package/dist/prosemirror/yjsDocumentMetadata.d.ts +9 -3
- package/dist/prosemirror/yjsDocumentMetadata.js +37 -8
- package/dist/types/canonicalCapabilities.d.ts +18 -18
- package/dist/types/canonicalCapabilities.js +18 -18
- package/dist/types/canonicalComments.d.ts +51 -0
- package/dist/types/canonicalComments.js +0 -0
- package/dist/types/canonicalSections.d.ts +12 -0
- package/dist/types/canonicalSections.js +0 -0
- package/dist/utils/headingCollector.js +45 -4
- package/dist/utils/outlineDepth.d.ts +9 -0
- package/dist/utils/outlineDepth.js +9 -0
- package/package.json +2 -2
- package/dist/prosemirror/conversion/listRenderingDefinition.d.ts +0 -6
package/dist/ai-edits/apply.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { paragraphNumberingReference, paragraphNumberingReferenceId } from "../docx/numberingReference.js";
|
|
2
2
|
import { formattingEquals } from "../docx/runConsolidator.js";
|
|
3
3
|
import { isStyleSourcedParagraphNumbering } from "../internal/paragraphFormattingSerialization.js";
|
|
4
|
+
import { addTrackedDeletionMark } from "../prosemirror/addTrackedDeletionMark.js";
|
|
4
5
|
import { deleteTextBoxesAnchoredAt, droppedTextBoxAnchorIds, endOfParagraphWithItsTextBoxes, gatherTextBoxesAfterParagraph, textBoxAnchorIdOf, textBoxAnchorIdsBetween } from "../prosemirror/anchoredTextBoxes.js";
|
|
5
|
-
import { expectParagraphAttrs, expectRunPropertyChangeMarkAttrs, expectTableRowAttrs } from "../prosemirror/attrs/index.js";
|
|
6
|
+
import { expectParagraphAttrs, expectRunPropertyChangeMarkAttrs, expectTableRowAttrs, mergeParagraphAttrs } from "../prosemirror/attrs/index.js";
|
|
6
7
|
import { hasSerializableParagraphPropertyChange, paragraphPropertiesSnapshot } from "../prosemirror/commands/propertyChangeScope.js";
|
|
7
8
|
import { resolveParagraphChangeAttrs } from "../prosemirror/commands/resolveParagraphProperties.js";
|
|
8
9
|
import { addedBreakCarrierBefore, finalParagraphsOf, paragraphEndsItsContainer } from "../prosemirror/containerFinalParagraph.js";
|
|
@@ -29,12 +30,12 @@ import { RUN_FORMATTING_MARK_NAMES } from "../prosemirror/runFormattingMarkNames
|
|
|
29
30
|
import { readAuthoredRunFormatting, reconcileRunFormattingMarks } from "../prosemirror/runFormattingReconciliation.js";
|
|
30
31
|
import { paragraphRunStyleContext, paragraphRunStyleContextAt, resolveParagraphBodyRunFormatting } from "../prosemirror/runStyleFormatting.js";
|
|
31
32
|
import { sectionPropertiesOf } from "../prosemirror/sectionCarrier.js";
|
|
32
|
-
import { listAttrsFromNumbering, listLevelAttrPatch } from "../prosemirror/styles/resolvedStyleAttrs.js";
|
|
33
|
+
import { listAttrsFromNumbering, listLevelAttrPatch, listLevelIndentRemovalPatch } from "../prosemirror/styles/resolvedStyleAttrs.js";
|
|
33
34
|
import { removeRowsWithoutCellsAfterBatch } from "../prosemirror/tableGridMutation.js";
|
|
34
35
|
import { isZeroWidthAnchor } from "../prosemirror/zeroWidthAnchors.js";
|
|
35
36
|
import { getFolioParaIdFromBlockId } from "../types/block-id.js";
|
|
36
37
|
import { CANONICAL_GAP } from "../types/canonicalCapabilities.js";
|
|
37
|
-
import { BatchClaims } from "./batch-claims.js";
|
|
38
|
+
import { BatchClaims, compareBatchTieOrder } from "./batch-claims.js";
|
|
38
39
|
import { stripBlockIdentityAttrs } from "./block-identity.js";
|
|
39
40
|
import { describeCharacterSplit } from "./character-boundaries.js";
|
|
40
41
|
import { buildCleanBlockText, resolveCleanTextRange } from "./clean-text.js";
|
|
@@ -186,7 +187,7 @@ const paragraphPropertiesPatch = ({ node, properties, resolvedFormattingFromStyl
|
|
|
186
187
|
const resolvedIndentationFromStyle = paragraphIndentationFromFormatting(resolvedFormattingFromStyle);
|
|
187
188
|
const resolvedSpacingFromStyle = paragraphSpacingFromFormatting(resolvedFormattingFromStyle);
|
|
188
189
|
const patch = {};
|
|
189
|
-
let originalFormatting = attrs._originalFormatting
|
|
190
|
+
let originalFormatting = withDirectParagraphIndentation(attrs._originalFormatting, currentDirectIndentation);
|
|
190
191
|
let originalFormattingChanged = false;
|
|
191
192
|
const nextStyleId = properties.styleId;
|
|
192
193
|
const styleChanged = nextStyleId !== void 0 && (attrs.styleId ?? null) !== nextStyleId;
|
|
@@ -226,11 +227,18 @@ const paragraphPropertiesPatch = ({ node, properties, resolvedFormattingFromStyl
|
|
|
226
227
|
}
|
|
227
228
|
const numPrFromStyle = styleChanged ? readParagraphNumberingAttr(patch["numPrFromStyle"]) : attrs.numPrFromStyle;
|
|
228
229
|
if (properties.numbering !== void 0) if (properties.numbering === null) {
|
|
230
|
+
Object.assign(patch, listLevelIndentRemovalPatch(mergeParagraphAttrs(node, {
|
|
231
|
+
...attrs,
|
|
232
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(resolvedFormattingFromStyle)
|
|
233
|
+
}), numbering));
|
|
229
234
|
patch["numPr"] = removedNumberingAttr(numPrFromStyle);
|
|
230
235
|
Object.assign(patch, CLEARED_LIST_RENDERING_ATTRS);
|
|
231
236
|
} else {
|
|
232
237
|
const listReference = concreteListReference(properties.numbering);
|
|
233
|
-
Object.assign(patch, listLevelAttrPatch(
|
|
238
|
+
Object.assign(patch, listLevelAttrPatch(mergeParagraphAttrs(node, {
|
|
239
|
+
...attrs,
|
|
240
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(resolvedFormattingFromStyle)
|
|
241
|
+
}), {
|
|
234
242
|
numId: listReference.numId,
|
|
235
243
|
ilvl: listReference.level
|
|
236
244
|
}, numbering));
|
|
@@ -240,6 +248,10 @@ const paragraphPropertiesPatch = ({ node, properties, resolvedFormattingFromStyl
|
|
|
240
248
|
}
|
|
241
249
|
}
|
|
242
250
|
else if (properties.listLevel !== void 0) if (properties.listLevel === null) {
|
|
251
|
+
Object.assign(patch, listLevelIndentRemovalPatch(mergeParagraphAttrs(node, {
|
|
252
|
+
...attrs,
|
|
253
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(resolvedFormattingFromStyle)
|
|
254
|
+
}), numbering));
|
|
243
255
|
patch["numPr"] = removedNumberingAttr(numPrFromStyle);
|
|
244
256
|
Object.assign(patch, CLEARED_LIST_RENDERING_ATTRS);
|
|
245
257
|
} else {
|
|
@@ -250,7 +262,10 @@ const paragraphPropertiesPatch = ({ node, properties, resolvedFormattingFromStyl
|
|
|
250
262
|
ilvl: properties.listLevel
|
|
251
263
|
});
|
|
252
264
|
Object.assign(patch, CLEARED_LIST_RENDERING_ATTRS);
|
|
253
|
-
} else Object.assign(patch, listLevelAttrPatch(
|
|
265
|
+
} else Object.assign(patch, listLevelAttrPatch(mergeParagraphAttrs(node, {
|
|
266
|
+
...attrs,
|
|
267
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(resolvedFormattingFromStyle)
|
|
268
|
+
}), {
|
|
254
269
|
numId,
|
|
255
270
|
ilvl: properties.listLevel
|
|
256
271
|
}, numbering));
|
|
@@ -282,6 +297,28 @@ const paragraphPropertiesPatch = ({ node, properties, resolvedFormattingFromStyl
|
|
|
282
297
|
originalFormattingChanged = true;
|
|
283
298
|
}
|
|
284
299
|
if (originalFormattingChanged) patch["_originalFormatting"] = originalFormatting && Object.keys(originalFormatting).length > 0 ? originalFormatting : null;
|
|
300
|
+
if (styleChanged || properties.numbering !== void 0 || properties.listLevel !== void 0 || properties.indentation !== void 0) {
|
|
301
|
+
const nextNumbering = patch["numPr"] === void 0 ? attrs.numPr : readParagraphNumberingAttr(patch["numPr"]);
|
|
302
|
+
if (nextNumbering?.kind === "reference") {
|
|
303
|
+
const direct = properties.indentation === void 0 ? currentDirectIndentation : properties.indentation ?? void 0;
|
|
304
|
+
Object.assign(patch, listLevelAttrPatch(mergeParagraphAttrs(node, {
|
|
305
|
+
numPr: nextNumbering,
|
|
306
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(resolvedFormattingFromStyle),
|
|
307
|
+
numPrFromStyle: numPrFromStyle ?? void 0,
|
|
308
|
+
listImplicitChildLevelAdvances: attrs.listImplicitChildLevelAdvances,
|
|
309
|
+
_originalFormatting: withDirectParagraphIndentation(originalFormatting, direct),
|
|
310
|
+
_resolvedFormatting: withDirectParagraphIndentation(styleChanged ? styleResolvedParagraphFormatting(resolvedFormattingFromStyle) : attrs._resolvedFormatting, resolvedIndentationFromStyle),
|
|
311
|
+
indentLeft: direct?.indentLeft ?? resolvedFormattingFromStyle?.indentLeft ?? void 0,
|
|
312
|
+
indentRight: direct?.indentRight ?? resolvedFormattingFromStyle?.indentRight ?? void 0,
|
|
313
|
+
indentFirstLine: direct?.indentFirstLine ?? resolvedFormattingFromStyle?.indentFirstLine ?? void 0,
|
|
314
|
+
hangingIndent: direct?.hangingIndent ?? resolvedFormattingFromStyle?.hangingIndent ?? false
|
|
315
|
+
}), {
|
|
316
|
+
numId: nextNumbering.numId,
|
|
317
|
+
ilvl: nextNumbering.ilvl ?? 0
|
|
318
|
+
}, numbering));
|
|
319
|
+
patch["numPr"] = nextNumbering;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
285
322
|
return Object.keys(patch).length > 0 ? patch : null;
|
|
286
323
|
};
|
|
287
324
|
const REVISION_MARK_NAMES = /* @__PURE__ */ new Set(["insertion", "deletion"]);
|
|
@@ -2008,10 +2045,17 @@ const buildInsertedParagraphs = ({ item, schema, formattingFromStyle, mode, auth
|
|
|
2008
2045
|
const listLevel = operation.listLevel;
|
|
2009
2046
|
if (formatsParagraph) {
|
|
2010
2047
|
if (explicitNumbering === null) {
|
|
2048
|
+
Object.assign(attrs, listLevelIndentRemovalPatch(mergeParagraphAttrs(schema.node("paragraph"), {
|
|
2049
|
+
...operation.inheritFormatting === false ? {} : expectParagraphAttrs(item.blockNode),
|
|
2050
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle)
|
|
2051
|
+
}), numbering));
|
|
2011
2052
|
attrs["numPr"] = removedNumberingAttr(readParagraphNumberingAttr(attrs["numPrFromStyle"]));
|
|
2012
2053
|
Object.assign(attrs, CLEARED_LIST_RENDERING_ATTRS);
|
|
2013
2054
|
} else if (explicitNumbering !== void 0) {
|
|
2014
|
-
Object.assign(attrs, listLevelAttrPatch(
|
|
2055
|
+
Object.assign(attrs, listLevelAttrPatch(mergeParagraphAttrs(schema.node("paragraph"), {
|
|
2056
|
+
...operation.inheritFormatting === false ? {} : expectParagraphAttrs(item.blockNode),
|
|
2057
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle)
|
|
2058
|
+
}), {
|
|
2015
2059
|
numId: explicitNumbering.numId,
|
|
2016
2060
|
ilvl: explicitNumbering.level
|
|
2017
2061
|
}, numbering));
|
|
@@ -2020,6 +2064,10 @@ const buildInsertedParagraphs = ({ item, schema, formattingFromStyle, mode, auth
|
|
|
2020
2064
|
attrs["numPrFromStyle"] = null;
|
|
2021
2065
|
}
|
|
2022
2066
|
} else if (listLevel === null) {
|
|
2067
|
+
Object.assign(attrs, listLevelIndentRemovalPatch(mergeParagraphAttrs(schema.node("paragraph"), {
|
|
2068
|
+
...operation.inheritFormatting === false ? {} : expectParagraphAttrs(item.blockNode),
|
|
2069
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle)
|
|
2070
|
+
}), numbering));
|
|
2023
2071
|
attrs["numPr"] = removedNumberingAttr(readParagraphNumberingAttr(attrs["numPrFromStyle"]));
|
|
2024
2072
|
Object.assign(attrs, CLEARED_LIST_RENDERING_ATTRS);
|
|
2025
2073
|
} else if (typeof listLevel === "number") {
|
|
@@ -2030,7 +2078,10 @@ const buildInsertedParagraphs = ({ item, schema, formattingFromStyle, mode, auth
|
|
|
2030
2078
|
ilvl: listLevel
|
|
2031
2079
|
});
|
|
2032
2080
|
Object.assign(attrs, CLEARED_LIST_RENDERING_ATTRS);
|
|
2033
|
-
} else Object.assign(attrs, listLevelAttrPatch(
|
|
2081
|
+
} else Object.assign(attrs, listLevelAttrPatch(mergeParagraphAttrs(schema.node("paragraph"), {
|
|
2082
|
+
...operation.inheritFormatting === false ? {} : expectParagraphAttrs(item.blockNode),
|
|
2083
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle)
|
|
2084
|
+
}), {
|
|
2034
2085
|
numId,
|
|
2035
2086
|
ilvl: listLevel
|
|
2036
2087
|
}, numbering));
|
|
@@ -2082,7 +2133,7 @@ const buildInsertedParagraphs = ({ item, schema, formattingFromStyle, mode, auth
|
|
|
2082
2133
|
else originalFormatting.alignment = directAlignment;
|
|
2083
2134
|
}
|
|
2084
2135
|
if (operation.spacing !== void 0) originalFormatting = withDirectParagraphSpacing(originalFormatting, directSpacing);
|
|
2085
|
-
|
|
2136
|
+
originalFormatting = withDirectParagraphIndentation(originalFormatting, directIndentation);
|
|
2086
2137
|
if (operation.styleId !== void 0 || operation.spacing !== void 0) Object.assign(attrs, paragraphSpacingAttrPatch({
|
|
2087
2138
|
direct: directSpacing,
|
|
2088
2139
|
inherited: paragraphSpacingFromFormatting(formattingFromStyle)
|
|
@@ -2092,6 +2143,25 @@ const buildInsertedParagraphs = ({ item, schema, formattingFromStyle, mode, auth
|
|
|
2092
2143
|
inherited: paragraphIndentationFromFormatting(formattingFromStyle)
|
|
2093
2144
|
}));
|
|
2094
2145
|
attrs["_originalFormatting"] = originalFormatting && Object.keys(originalFormatting).length > 0 ? originalFormatting : null;
|
|
2146
|
+
const finalNumbering = readParagraphNumberingAttr(attrs["numPr"]);
|
|
2147
|
+
if (finalNumbering?.kind === "reference") {
|
|
2148
|
+
Object.assign(attrs, listLevelAttrPatch(mergeParagraphAttrs(schema.node("paragraph"), {
|
|
2149
|
+
numPr: finalNumbering,
|
|
2150
|
+
_styleResolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle),
|
|
2151
|
+
numPrFromStyle: readParagraphNumberingAttr(attrs["numPrFromStyle"]) ?? void 0,
|
|
2152
|
+
listImplicitChildLevelAdvances: operation.inheritFormatting === false ? void 0 : expectParagraphAttrs(item.blockNode).listImplicitChildLevelAdvances,
|
|
2153
|
+
_originalFormatting: originalFormatting,
|
|
2154
|
+
_resolvedFormatting: styleResolvedParagraphFormatting(formattingFromStyle),
|
|
2155
|
+
indentLeft: directIndentation?.indentLeft ?? formattingFromStyle?.indentLeft ?? void 0,
|
|
2156
|
+
indentRight: directIndentation?.indentRight ?? formattingFromStyle?.indentRight ?? void 0,
|
|
2157
|
+
indentFirstLine: directIndentation?.indentFirstLine ?? formattingFromStyle?.indentFirstLine ?? void 0,
|
|
2158
|
+
hangingIndent: directIndentation?.hangingIndent ?? formattingFromStyle?.hangingIndent ?? false
|
|
2159
|
+
}), {
|
|
2160
|
+
numId: finalNumbering.numId,
|
|
2161
|
+
ilvl: finalNumbering.ilvl ?? 0
|
|
2162
|
+
}, numbering));
|
|
2163
|
+
attrs["numPr"] = finalNumbering;
|
|
2164
|
+
}
|
|
2095
2165
|
}
|
|
2096
2166
|
if (formatsParagraph && operation.styleId !== void 0 && formattingFromStyle?.numPr?.kind === "reference" && operation.numbering === void 0 && operation.listLevel === void 0) {
|
|
2097
2167
|
const { numId, ilvl = 0 } = formattingFromStyle.numPr;
|
|
@@ -2417,7 +2487,7 @@ const applyFolioAIEditOperationsInternal = ({ view, snapshot, operations: reques
|
|
|
2417
2487
|
if (leftCellShape.tablePosition !== rightCellShape.tablePosition) return rightCellShape.tablePosition - leftCellShape.tablePosition;
|
|
2418
2488
|
if (leftCellShape.rectangle.bottom !== rightCellShape.rectangle.bottom) return rightCellShape.rectangle.bottom - leftCellShape.rectangle.bottom;
|
|
2419
2489
|
if (leftCellShape.rectangle.right !== rightCellShape.rectangle.right) return rightCellShape.rectangle.right - leftCellShape.rectangle.right;
|
|
2420
|
-
return
|
|
2490
|
+
return compareBatchTieOrder(left.originalIndex, right.originalIndex);
|
|
2421
2491
|
}
|
|
2422
2492
|
const leftColumn = left.tableColumnInsertion ?? left.tableColumnDeletion;
|
|
2423
2493
|
const rightColumn = right.tableColumnInsertion ?? right.tableColumnDeletion;
|
|
@@ -2428,10 +2498,10 @@ const applyFolioAIEditOperationsInternal = ({ view, snapshot, operations: reques
|
|
|
2428
2498
|
if (leftColumn.columnIndex !== rightColumn.columnIndex) return rightColumn.columnIndex - leftColumn.columnIndex;
|
|
2429
2499
|
const leftIsInsertion = left.tableColumnInsertion !== void 0;
|
|
2430
2500
|
if (leftIsInsertion !== (right.tableColumnInsertion !== void 0)) return leftIsInsertion ? -1 : 1;
|
|
2431
|
-
return
|
|
2501
|
+
return compareBatchTieOrder(left.originalIndex, right.originalIndex);
|
|
2432
2502
|
}
|
|
2433
2503
|
if (left.from !== right.from) return right.from - left.from;
|
|
2434
|
-
return
|
|
2504
|
+
return compareBatchTieOrder(left.originalIndex, right.originalIndex);
|
|
2435
2505
|
});
|
|
2436
2506
|
for (let executionIndex = 0; executionIndex < executionOrder.length; executionIndex++) {
|
|
2437
2507
|
const item = executionOrder[executionIndex];
|
|
@@ -3186,9 +3256,21 @@ const applyFolioAIEditOperationsInternal = ({ view, snapshot, operations: reques
|
|
|
3186
3256
|
...isPairedMove(item.operation.moveId) && { moveKind: "moveFrom" },
|
|
3187
3257
|
...trackedRevisionExtras
|
|
3188
3258
|
});
|
|
3189
|
-
|
|
3259
|
+
addTrackedDeletionMark({
|
|
3260
|
+
insertionPolicy: "preserve-pending",
|
|
3261
|
+
tr,
|
|
3262
|
+
from: item.from,
|
|
3263
|
+
to: item.to,
|
|
3264
|
+
mark: deletionMark
|
|
3265
|
+
});
|
|
3190
3266
|
const atomRanges = undeletedContentAtomRanges(tr, item.blockFrom);
|
|
3191
|
-
for (const { from, to } of atomRanges)
|
|
3267
|
+
for (const { from, to } of atomRanges) addTrackedDeletionMark({
|
|
3268
|
+
insertionPolicy: "preserve-pending",
|
|
3269
|
+
tr,
|
|
3270
|
+
from,
|
|
3271
|
+
to,
|
|
3272
|
+
mark: deletionMark
|
|
3273
|
+
});
|
|
3192
3274
|
for (const anchorId of textBoxAnchorIdsBetween(tr.doc, tr.mapping.map(item.blockFrom), tr.mapping.map(item.blockTo))) deletedTextBoxAnchorIds.add(anchorId);
|
|
3193
3275
|
encloseWholeControls({
|
|
3194
3276
|
tr,
|
|
@@ -3481,12 +3563,18 @@ const applyFolioAIEditOperationsInternal = ({ view, snapshot, operations: reques
|
|
|
3481
3563
|
appliedRevisionIds = [revisionIdMark];
|
|
3482
3564
|
if (item.to > item.from && deletionType) {
|
|
3483
3565
|
const revisionIdSeparator = operationRevisionSeed++;
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3566
|
+
addTrackedDeletionMark({
|
|
3567
|
+
insertionPolicy: "preserve-pending",
|
|
3568
|
+
tr,
|
|
3569
|
+
from: item.from,
|
|
3570
|
+
to: item.to,
|
|
3571
|
+
mark: deletionType.create({
|
|
3572
|
+
revisionId: revisionIdSeparator,
|
|
3573
|
+
author,
|
|
3574
|
+
date,
|
|
3575
|
+
...trackedRevisionExtras
|
|
3576
|
+
})
|
|
3577
|
+
});
|
|
3490
3578
|
appliedRevisionIds.push(revisionIdSeparator);
|
|
3491
3579
|
}
|
|
3492
3580
|
tr = tr.split(item.from);
|
|
@@ -3982,7 +4070,13 @@ const applyTextReplacement = ({ tr, item, mode, author, date, revisionIdDelete,
|
|
|
3982
4070
|
if (commentMark) nextTr = nextTr.addMark(inserted.start, inserted.end, commentMark);
|
|
3983
4071
|
}
|
|
3984
4072
|
if (item.to > item.from && deletionType) {
|
|
3985
|
-
|
|
4073
|
+
addTrackedDeletionMark({
|
|
4074
|
+
insertionPolicy: "preserve-pending",
|
|
4075
|
+
tr: nextTr,
|
|
4076
|
+
from: item.from,
|
|
4077
|
+
to: item.to,
|
|
4078
|
+
mark: deletionType.create(delAttrs)
|
|
4079
|
+
});
|
|
3986
4080
|
if (commentMark && replacement.length === 0) nextTr = nextTr.addMark(item.from, item.to, commentMark);
|
|
3987
4081
|
}
|
|
3988
4082
|
return nextTr;
|
|
@@ -4474,7 +4568,13 @@ const applyMinimalTrackedReplacement = ({ tr, item, noteReferences, replacement,
|
|
|
4474
4568
|
removedFrom = first.from;
|
|
4475
4569
|
marks = addCarriedMarks(inheritedReplacementMarks(doc, styleSource.from, styleSource.to), surveyReplacedAnnotations(doc, first.from, last.to).carried);
|
|
4476
4570
|
for (const piece of change.pieces) {
|
|
4477
|
-
|
|
4571
|
+
addTrackedDeletionMark({
|
|
4572
|
+
insertionPolicy: "preserve-pending",
|
|
4573
|
+
tr: nextTr,
|
|
4574
|
+
from: piece.from,
|
|
4575
|
+
to: piece.to,
|
|
4576
|
+
mark: deletion
|
|
4577
|
+
});
|
|
4478
4578
|
if (commentMark) nextTr = nextTr.addMark(piece.from, piece.to, commentMark);
|
|
4479
4579
|
}
|
|
4480
4580
|
}
|
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
* Positions are the ones the batch resolved against. A block is keyed by the
|
|
22
22
|
* position before its node.
|
|
23
23
|
*/
|
|
24
|
+
/** Equal snapshot coordinates execute in reverse input order. */
|
|
25
|
+
declare const compareBatchTieOrder: (leftIndex: number, rightIndex: number) => number;
|
|
24
26
|
type PositionRange = {
|
|
25
27
|
from: number;
|
|
26
28
|
to: number;
|
|
@@ -142,4 +144,4 @@ declare class BatchClaims {
|
|
|
142
144
|
add(operationId: string, claim: BatchClaim): void;
|
|
143
145
|
}
|
|
144
146
|
//#endregion
|
|
145
|
-
export { BatchClaim, BatchClaims };
|
|
147
|
+
export { BatchClaim, BatchClaims, compareBatchTieOrder };
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
//#region src/ai-edits/batch-claims.ts
|
|
2
|
+
/**
|
|
3
|
+
* Which operations of one batch may not share their targets.
|
|
4
|
+
*
|
|
5
|
+
* A batch resolves every operation against the document as it was read and
|
|
6
|
+
* applies them from the end of the document backwards, so an operation never
|
|
7
|
+
* moves the positions an earlier-placed one resolved to. That holds only while
|
|
8
|
+
* the operations' targets are disjoint. Two operations on the same stretch of
|
|
9
|
+
* text, or an operation inside a paragraph another one deletes, rewrites,
|
|
10
|
+
* splits or merges away, are applied against coordinates the first one has
|
|
11
|
+
* already invalidated — and the second then edits whatever now sits there,
|
|
12
|
+
* which can be a paragraph neither operation named.
|
|
13
|
+
*
|
|
14
|
+
* Each operation therefore states what it claims before anything is applied,
|
|
15
|
+
* and the later of two operations whose claims conflict is refused
|
|
16
|
+
* (`overlappingOperation`). The caller re-reads the document after the batch
|
|
17
|
+
* and sends the refused operation again against the result. What remains
|
|
18
|
+
* applies exactly as the same operations applied one at a time, from the end
|
|
19
|
+
* of the document backwards, would.
|
|
20
|
+
*
|
|
21
|
+
* Positions are the ones the batch resolved against. A block is keyed by the
|
|
22
|
+
* position before its node.
|
|
23
|
+
*/
|
|
24
|
+
/** Equal snapshot coordinates execute in reverse input order. */
|
|
25
|
+
const compareBatchTieOrder = (leftIndex, rightIndex) => rightIndex - leftIndex;
|
|
2
26
|
const blockRolesOf = (claim) => {
|
|
3
27
|
switch (claim.type) {
|
|
4
28
|
case "text":
|
|
@@ -272,4 +296,4 @@ var BatchClaims = class {
|
|
|
272
296
|
}
|
|
273
297
|
};
|
|
274
298
|
//#endregion
|
|
275
|
-
export { BatchClaims };
|
|
299
|
+
export { BatchClaims, compareBatchTieOrder };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { addTrackedDeletionMark } from "../prosemirror/addTrackedDeletionMark.js";
|
|
1
2
|
import { markStructuralChange } from "../prosemirror/extensions/features/ParagraphChangeTrackerExtension.js";
|
|
2
3
|
import { markRowsEmptiedInBatch, reconcileTableGridAfterColumnInsertion, reconcileTableGridAfterColumnRemoval, removeRowsWithoutCells, removeTableRow } from "../prosemirror/tableGridMutation.js";
|
|
3
4
|
import { stripBlockIdentityAttrs } from "./block-identity.js";
|
|
@@ -130,7 +131,7 @@ const markTableRowContent = ({ tr, rowPosition, kind, revision }) => {
|
|
|
130
131
|
if (!node.isInline) return true;
|
|
131
132
|
if (node.marks.some(isTrackedChangeMark)) {
|
|
132
133
|
wholeRowMarkable = false;
|
|
133
|
-
if (kind === "insertion"
|
|
134
|
+
if (kind === "insertion") return false;
|
|
134
135
|
}
|
|
135
136
|
const from = contentFrom + offset;
|
|
136
137
|
markable.push({
|
|
@@ -140,10 +141,23 @@ const markTableRowContent = ({ tr, rowPosition, kind, revision }) => {
|
|
|
140
141
|
return false;
|
|
141
142
|
});
|
|
142
143
|
if (wholeRowMarkable) {
|
|
143
|
-
|
|
144
|
+
if (kind === "deletion") addTrackedDeletionMark({
|
|
145
|
+
insertionPolicy: "preserve-pending",
|
|
146
|
+
tr,
|
|
147
|
+
from: contentFrom,
|
|
148
|
+
to: rowPosition + row.nodeSize - 1,
|
|
149
|
+
mark
|
|
150
|
+
});
|
|
151
|
+
else tr.addMark(contentFrom, rowPosition + row.nodeSize - 1, mark);
|
|
144
152
|
return;
|
|
145
153
|
}
|
|
146
|
-
for (const range of markable)
|
|
154
|
+
for (const range of markable) if (kind === "deletion") addTrackedDeletionMark({
|
|
155
|
+
insertionPolicy: "preserve-pending",
|
|
156
|
+
tr,
|
|
157
|
+
...range,
|
|
158
|
+
mark
|
|
159
|
+
});
|
|
160
|
+
else tr.addMark(range.from, range.to, mark);
|
|
147
161
|
};
|
|
148
162
|
const isTrackedChangeMark = (mark) => mark.type.name === "insertion" || mark.type.name === "deletion";
|
|
149
163
|
const isRowSpanningCell = (node) => {
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { addTrackedDeletionMark } from "../prosemirror/addTrackedDeletionMark.js";
|
|
1
2
|
import { mintRevisionId, seedRevisionIdsFromDoc } from "../prosemirror/plugins/revisionIds.js";
|
|
2
3
|
import { resolveSuggestionAnchor } from "./conflict.js";
|
|
3
4
|
//#region src/ai-suggestions/apply.ts
|
|
5
|
+
/**
|
|
6
|
+
* Apply AI suggestions to the document.
|
|
7
|
+
*
|
|
8
|
+
* Two modes:
|
|
9
|
+
* - "direct": replace text in place.
|
|
10
|
+
* - "tracked-changes": insertion + deletion marks, attributed to the
|
|
11
|
+
* configured author. Reuses the editor's existing tracked-change
|
|
12
|
+
* schema and resolution commands.
|
|
13
|
+
*
|
|
14
|
+
* Apply is always preceded by anchor resolution; stale suggestions are
|
|
15
|
+
* skipped and reported back to the caller.
|
|
16
|
+
*/
|
|
4
17
|
function applySuggestions(options) {
|
|
5
18
|
const { view, suggestions, mode, author } = options;
|
|
6
19
|
const applied = [];
|
|
@@ -51,7 +64,13 @@ function applySuggestions(options) {
|
|
|
51
64
|
tr.insertText(suggestion.suggestedText, to, to);
|
|
52
65
|
tr.addMark(to, to + suggestion.suggestedText.length, insertionType.create(attrs));
|
|
53
66
|
}
|
|
54
|
-
if (to > from)
|
|
67
|
+
if (to > from) addTrackedDeletionMark({
|
|
68
|
+
insertionPolicy: "preserve-pending",
|
|
69
|
+
tr,
|
|
70
|
+
from,
|
|
71
|
+
to,
|
|
72
|
+
mark: deletionType.create(attrs)
|
|
73
|
+
});
|
|
55
74
|
applied.push(suggestion.id);
|
|
56
75
|
}
|
|
57
76
|
}
|
|
@@ -2,7 +2,9 @@ import { buildCleanBlockText } from "../ai-edits/clean-text.js";
|
|
|
2
2
|
import { noteReferenceOf } from "../ai-edits/note-references.js";
|
|
3
3
|
import { collectNoteReferenceLabels, sourceDocumentOf } from "../ai-edits/snapshot.js";
|
|
4
4
|
import { drawingXmlWithoutIdentity } from "../docx/drawingIdNormalization.js";
|
|
5
|
+
import { addTrackedDeletionMark } from "../prosemirror/addTrackedDeletionMark.js";
|
|
5
6
|
import { resolveAllChangesInHeadlessStateWithMapping } from "../prosemirror/commands/comments.js";
|
|
7
|
+
import { mintNoteReferenceOccurrenceId } from "../prosemirror/noteReferenceOccurrences.js";
|
|
6
8
|
import { runFormattingInlineAtomResultText } from "../prosemirror/runFormattingInlineCarriers.js";
|
|
7
9
|
import { canonicalJson } from "../utils/canonicalJson.js";
|
|
8
10
|
import { prepareTargetInlineAtom } from "./inline-atom-resources.js";
|
|
@@ -618,11 +620,17 @@ const matchInlineAtoms = ({ state, targetSnapshot, revisionStamp, originalRevisi
|
|
|
618
620
|
const to = transaction.mapping.map(action.to, -1);
|
|
619
621
|
if (from >= to) return { status: "unalignable" };
|
|
620
622
|
if (action.textDisposition === "inserted") transaction.delete(from, to);
|
|
621
|
-
else
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
623
|
+
else addTrackedDeletionMark({
|
|
624
|
+
insertionPolicy: "preserve-pending",
|
|
625
|
+
tr: transaction,
|
|
626
|
+
from,
|
|
627
|
+
to,
|
|
628
|
+
mark: deletionType.create({
|
|
629
|
+
revisionId: nextRevisionId++,
|
|
630
|
+
author,
|
|
631
|
+
date: revisionStamp.date
|
|
632
|
+
})
|
|
633
|
+
});
|
|
626
634
|
const at = transaction.mapping.map(action.from, -1);
|
|
627
635
|
transaction.insert(at, action.node.mark(insertionType.create({
|
|
628
636
|
revisionId: nextRevisionId++,
|
|
@@ -638,7 +646,11 @@ const matchInlineAtoms = ({ state, targetSnapshot, revisionStamp, originalRevisi
|
|
|
638
646
|
const written = transaction.doc.nodeAt(from);
|
|
639
647
|
const noteMark = action.node.marks.find(({ type }) => type.name === "footnoteRef");
|
|
640
648
|
if (from >= to || !written?.isText || !noteMark) return { status: "unalignable" };
|
|
641
|
-
|
|
649
|
+
const restoredNoteMark = noteMark.type.create({
|
|
650
|
+
...noteMark.attrs,
|
|
651
|
+
occurrenceId: mintNoteReferenceOccurrenceId()
|
|
652
|
+
});
|
|
653
|
+
transaction.replaceWith(from, to, state.schema.text(action.node.text ?? "", restoredNoteMark.addToSet(written.marks)));
|
|
642
654
|
if (action.targetBlockId) changedTargetBlockIds.add(action.targetBlockId);
|
|
643
655
|
continue;
|
|
644
656
|
}
|
|
@@ -648,11 +660,17 @@ const matchInlineAtoms = ({ state, targetSnapshot, revisionStamp, originalRevisi
|
|
|
648
660
|
const node = transaction.doc.nodeAt(from);
|
|
649
661
|
if (!node || node.nodeSize !== to - from || node.type.name !== "field") return { status: "unalignable" };
|
|
650
662
|
if (action.atomDisposition === "inserted") transaction.delete(from, to);
|
|
651
|
-
else
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
663
|
+
else addTrackedDeletionMark({
|
|
664
|
+
insertionPolicy: "preserve-pending",
|
|
665
|
+
tr: transaction,
|
|
666
|
+
from,
|
|
667
|
+
to,
|
|
668
|
+
mark: deletionType.create({
|
|
669
|
+
revisionId: nextRevisionId++,
|
|
670
|
+
author,
|
|
671
|
+
date: revisionStamp.date
|
|
672
|
+
})
|
|
673
|
+
});
|
|
656
674
|
const at = transaction.mapping.map(action.from, -1);
|
|
657
675
|
transaction.insert(at, state.schema.text(action.text, insertionType.create({
|
|
658
676
|
revisionId: nextRevisionId++,
|
|
@@ -675,11 +693,17 @@ const matchInlineAtoms = ({ state, targetSnapshot, revisionStamp, originalRevisi
|
|
|
675
693
|
continue;
|
|
676
694
|
}
|
|
677
695
|
if (node.marks.some(({ type }) => type === deletionType)) return { status: "unalignable" };
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
696
|
+
addTrackedDeletionMark({
|
|
697
|
+
insertionPolicy: "preserve-pending",
|
|
698
|
+
tr: transaction,
|
|
699
|
+
from,
|
|
700
|
+
to,
|
|
701
|
+
mark: deletionType.create({
|
|
702
|
+
revisionId: nextRevisionId++,
|
|
703
|
+
author,
|
|
704
|
+
date: revisionStamp.date
|
|
705
|
+
})
|
|
706
|
+
});
|
|
683
707
|
if (action.targetBlockId) changedTargetBlockIds.add(action.targetBlockId);
|
|
684
708
|
}
|
|
685
709
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { sourceDocumentOf, styleResolverOf } from "../ai-edits/snapshot.js";
|
|
2
|
+
import { addTrackedDeletionMark } from "../prosemirror/addTrackedDeletionMark.js";
|
|
2
3
|
import { expectHyperlinkMarkAttrs, expectRunPropertyChangeMarkAttrs, expectTableCellAttrs } from "../prosemirror/attrs/index.js";
|
|
3
4
|
import { getDocumentStyleResolver } from "../prosemirror/plugins/documentStyleState.js";
|
|
4
5
|
import { applyMarksToRunFormattingRepresentation, expandRunFormattingCarrier, runFormattingCarrierReviewText } from "../prosemirror/runFormattingInlineCarriers.js";
|
|
@@ -252,11 +253,17 @@ const matchInlineProvenance = ({ state, targetSnapshot, revisionStamp, originalR
|
|
|
252
253
|
date: revisionStamp.date
|
|
253
254
|
}).addToSet(marks);
|
|
254
255
|
const text = state.doc.textBetween(change.live.from, change.live.to);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
addTrackedDeletionMark({
|
|
257
|
+
insertionPolicy: "preserve-pending",
|
|
258
|
+
tr: transaction,
|
|
259
|
+
from: change.live.from,
|
|
260
|
+
to: change.live.to,
|
|
261
|
+
mark: deletionType.create({
|
|
262
|
+
revisionId: nextRevisionId++,
|
|
263
|
+
author,
|
|
264
|
+
date: revisionStamp.date
|
|
265
|
+
})
|
|
266
|
+
});
|
|
260
267
|
transaction.insert(change.live.to, state.schema.text(text, marks));
|
|
261
268
|
changedTargetBlockIds.add(change.targetBlockId);
|
|
262
269
|
continue;
|
|
@@ -17,6 +17,7 @@ import { MAX_COMPARE_OPERATIONS, compareDocx } from "../compare/compare.js";
|
|
|
17
17
|
import { DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DocumentPreset, DocumentStyleSet } from "../style-sets/types.js";
|
|
18
18
|
import { CreateEmptyDocumentOptions, createEmptyDocument } from "../utils/createDocument.js";
|
|
19
19
|
import { mergeDocumentContent } from "../utils/mergeDocumentContent.js";
|
|
20
|
+
import { DEFAULT_OUTLINE_DEPTH, OutlineDepth, filterHeadingsByDepth } from "../utils/outlineDepth.js";
|
|
20
21
|
import { DocumentStyleCatalog, DocumentStyleCatalogEntry, ExtractDocumentStyleSetOptions, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, inspectDocumentStyles, inspectDocumentStylesFromDocx } from "../style-sets/extract.js";
|
|
21
22
|
import { STELLA_STYLE_SET_NAME, createStellaStyleDocumentPreset, createStellaStyleSet } from "../style-sets/stellaStyle.js";
|
|
22
23
|
import { DocumentPropertiesOptions, createDocx } from "../docx/rezip.js";
|
|
@@ -41,4 +42,4 @@ import { FOLIO_YJS_ATTR_SCHEMA_VERSION, FolioYjsAttrSchemaVersion, FolioYjsAttrS
|
|
|
41
42
|
import { DOCX_CONFORMANCE_CLASSES } from "../index.js";
|
|
42
43
|
type Document = document_d_exports.Document;
|
|
43
44
|
type DocxConformanceClass = document_d_exports.DocxConformanceClass;
|
|
44
|
-
export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyFolioDocumentOperationsOptions, type ApplyResult, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, type CompareChange, type CompareChangeLocation, type CompareCompatibility, type CompareContentOptions, CompareDocxApplyError, type CompareDocxError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, type CompareDocxOptions, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, type CompareFolioRequirement, type CompareResult, type CompareRevisionFormat, type CompareUnsupportedPart, type CompareUnsupportedReason, type CompareVerification, type CompareVerificationCause, type CompareVerificationFailure, type CompareVerificationInvariant, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxCompatibilityContext, type DocxCompatibilityIssue, type DocxCompatibilityLocation, type DocxCompatibilityPart, type DocxConformanceClass, type DocxDrawingClassification, type DrawingSafetyClass, type EmbeddedFont, type EmbeddedFontParts, type ExtractDocumentStyleSetOptions, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, type FinalParagraphMarkRevision, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIBlockTableLocation, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyOutcome, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphSpacing, type FolioAISignatureParty, type FolioBlockId, type FolioContentBlock, type FolioContentBlockProperty, type FolioContentComparison, type FolioContentComparisonError, type FolioContentComparisonEvent, type FolioContentComparisonLimit, FolioContentComparisonLimitError, type FolioContentContainerPathEntry, type FolioContentFormatRange, type FolioContentFormattingChange, type FolioContentIdStability, type FolioContentInlineBooleanProperty, type FolioContentInlineComparisonResult, type FolioContentInlineFormatting, type FolioContentInlineFormattingPatch, FolioContentInlinePresentationProjectionError, type FolioContentLineSpacingRule, type FolioContentParagraphAlignment, type FolioContentParagraphFormattingPatch, type FolioContentParagraphKind, type FolioContentParagraphSpacing, type FolioContentRun, type FolioContentSnapshot, type FolioContentStructuralChange, type FolioContentTableLocation, type FolioContentTextSegment, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocxCompatibilityHost, type FolioDocxCompatibilityProfile, type FolioRevisionStamp, type FolioWordDiffOptions, type FolioYjsAttrSchemaVersion, FolioYjsAttrSchemaVersionError, type ImageMeta, type ImageRef, type InspectDocxCompatibilityOptions, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, type MarkdownOptions, type MarkdownResult, type PositionalText, type ResolvedAnchor, STELLA_STYLE_SET_NAME, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, type WordDiffGranularity, type WordDiffNormalization, type WordDiffOptions, type WordDiffSegment, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
|
|
45
|
+
export { type AIBarStatus, type AIChatMode, type AICitation, type AICitationRange, type AICitationSource, type AIGenerateInput, type AISuggestion, type AISuggestionApplyMode, type AISuggestionPreset, type AISuggestionSeverity, type AISuggestionStatus, type AcceptAutocompleteResult, type AnonymizationMatch, type AnonymizationTerm, type ApplyFolioDocumentOperationsOptions, type ApplyResult, type AutocompleteSuggestionPluginOptions, type AutocompleteSuggestionState, type AutocompleteSuggestionStatus, type AutocompleteTriggerCheck, type AutocompleteTriggerOptions, type AutocompleteTriggerSkipReason, type BlockRect, COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, type CompareChange, type CompareChangeLocation, type CompareCompatibility, type CompareContentOptions, CompareDocxApplyError, type CompareDocxError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, type CompareDocxOptions, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, type CompareFolioRequirement, type CompareResult, type CompareRevisionFormat, type CompareUnsupportedPart, type CompareUnsupportedReason, type CompareVerification, type CompareVerificationCause, type CompareVerificationFailure, type CompareVerificationInvariant, type CreateEmptyDocumentOptions, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DEFAULT_OUTLINE_DEPTH, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, type DeriveBlockIdInput, type DirectiveKind, type DirectiveRange, type Document, type DocumentPreset, type DocumentPropertiesOptions, type DocumentStyleCatalog, type DocumentStyleCatalogEntry, type DocumentStyleSet, type DocxCompatibility, type DocxCompatibilityContext, type DocxCompatibilityIssue, type DocxCompatibilityLocation, type DocxCompatibilityPart, type DocxConformanceClass, type DocxDrawingClassification, type DrawingSafetyClass, type EmbeddedFont, type EmbeddedFontParts, type ExtractDocumentStyleSetOptions, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, type FinalParagraphMarkRevision, type FolioAIBlock, type FolioAIBlockAnchor, type FolioAIBlockKind, type FolioAIBlockPreviewRun, type FolioAIBlockStructuralBoundary, type FolioAIBlockTableLocation, type FolioAIComment, type FolioAIEditAppliedOperation, type FolioAIEditApplyMode, type FolioAIEditApplyOutcome, type FolioAIEditApplyResult, type FolioAIEditNormalization, type FolioAIEditNormalizationCode, type FolioAIEditOperation, type FolioAIEditPrecondition, type FolioAIEditReviewMeta, type FolioAIEditSeverity, type FolioAIEditSkipReason, type FolioAIEditSkippedOperation, type FolioAIEditSnapshot, type FolioAIInlineBooleanProperty, type FolioAIInlineFormatting, type FolioAIInlineFormattingPatch, type FolioAIParagraphSpacing, type FolioAISignatureParty, type FolioBlockId, type FolioContentBlock, type FolioContentBlockProperty, type FolioContentComparison, type FolioContentComparisonError, type FolioContentComparisonEvent, type FolioContentComparisonLimit, FolioContentComparisonLimitError, type FolioContentContainerPathEntry, type FolioContentFormatRange, type FolioContentFormattingChange, type FolioContentIdStability, type FolioContentInlineBooleanProperty, type FolioContentInlineComparisonResult, type FolioContentInlineFormatting, type FolioContentInlineFormattingPatch, FolioContentInlinePresentationProjectionError, type FolioContentLineSpacingRule, type FolioContentParagraphAlignment, type FolioContentParagraphFormattingPatch, type FolioContentParagraphKind, type FolioContentParagraphSpacing, type FolioContentRun, type FolioContentSnapshot, type FolioContentStructuralChange, type FolioContentTableLocation, type FolioContentTextSegment, type FolioDocumentOperation, type FolioDocumentOperationAffectedTarget, type FolioDocumentOperationBatch, type FolioDocumentOperationCapabilities, type FolioDocumentOperationIssue, type FolioDocumentOperationMode, type FolioDocumentOperationPrecondition, type FolioDocumentOperationReceipt, type FolioDocumentOperationRecovery, type FolioDocumentOperationResult, type FolioDocumentOperationResultBase, type FolioDocumentOperationStatus, type FolioDocumentOperationStory, type FolioDocumentOperationType, type FolioDocumentOperationUndoFailureReason, type FolioDocumentOperationUndoHandle, type FolioDocumentOperationUndoResult, type FolioDocxCompatibilityHost, type FolioDocxCompatibilityProfile, type FolioRevisionStamp, type FolioWordDiffOptions, type FolioYjsAttrSchemaVersion, FolioYjsAttrSchemaVersionError, type ImageMeta, type ImageRef, type InspectDocxCompatibilityOptions, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, type MarkdownOptions, type MarkdownResult, type OutlineDepth, type PositionalText, type ResolvedAnchor, STELLA_STYLE_SET_NAME, type TemplatePreviewHiddenRange, type TemplatePreviewSpan, type TemplatePreviewValue, type TemplatePreviewValues, type TemplateSlashMenuKeyAction, type TemplateSlashMenuState, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, type WordDiffGranularity, type WordDiffNormalization, type WordDiffOptions, type WordDiffSegment, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, filterHeadingsByDepth, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
|
package/dist/compat/eigenpal.js
CHANGED
|
@@ -34,4 +34,5 @@ import { currentFolioBlockId, deriveBlockId, getFolioParaIdFromBlockId, isFolioB
|
|
|
34
34
|
import { createEmptyDocument } from "../utils/createDocument.js";
|
|
35
35
|
import { getGoogleFontsEnabled, setEmbeddedFontFamilyMap, setGoogleFontsEnabled } from "../utils/fontResolver.js";
|
|
36
36
|
import { mergeDocumentContent } from "../utils/mergeDocumentContent.js";
|
|
37
|
-
|
|
37
|
+
import { DEFAULT_OUTLINE_DEPTH, filterHeadingsByDepth } from "../utils/outlineDepth.js";
|
|
38
|
+
export { COMPARE_REVISION_FORMATS, COMPARE_UNSUPPORTED_REASONS, COMPARE_VERIFICATION_CAUSES, COMPARE_VERIFICATION_INVARIANTS, CompareDocxApplyError, CompareDocxFinalParagraphMarkError, CompareDocxOperationLimitError, CompareDocxParseError, CompareDocxRoundTripError, CompareDocxSerializeError, DEFAULT_AI_SUGGESTION_PRESETS, DEFAULT_AUTOCOMPLETE_DEAD_ZONE_NODES, DEFAULT_OUTLINE_DEPTH, DOCUMENT_PRESET_VERSION, DOCUMENT_STYLE_SET_VERSION, DOCX_CONFORMANCE_CLASSES, DRAWING_SAFETY_CLASSES, FOLIO_CONTENT_COMPARISON_LIMITS, FOLIO_DOCUMENT_OPERATION_BATCH_MODES, FOLIO_DOCUMENT_OPERATION_CONTRACT_VERSION, FOLIO_DOCUMENT_OPERATION_MODES, FOLIO_DOCUMENT_OPERATION_MODES_BY_TYPE, FOLIO_DOCUMENT_OPERATION_PRECONDITIONS, FOLIO_DOCUMENT_OPERATION_STORIES, FOLIO_DOCUMENT_OPERATION_TYPES, FOLIO_LINE_SPACING_RULE_VALUES, FOLIO_PARAGRAPH_ALIGNMENT_VALUES, FOLIO_YJS_ATTR_SCHEMA_VERSION, FolioContentComparisonLimitError, FolioContentInlinePresentationProjectionError, FolioYjsAttrSchemaVersionError, InvalidCompareDocxOptionsError, InvalidFolioContentComparisonError, InvalidFolioDocumentOperationBatchError, MAX_COMPARE_OPERATIONS, STELLA_STYLE_SET_NAME, UnsupportedFolioDocumentOperationVersionError, WORD_DIFF_GRANULARITIES, acceptAutocompleteSuggestion, acceptAutocompleteWord, anonymizationDecorationsKey, appendAutocompleteToken, applyFolioAIEditOperations, applyFolioDocumentOperations, applySuggestions, assertSupportedFolioDocumentOperationVersion, autocompleteSuggestionKey, autocompleteSuggestionPlugin, buildEmbeddedFontFamilyMap, buildPositionalText, clearAutocompleteSuggestion, clearTemplateSlashMenu, compareContent, compareDocx, consumeTemplateSlashQuery, createAICitationDecorationsPlugin, createDocx, createEmptyDocument, createFolioAIEditSnapshot, createStellaStyleDocumentPreset, createStellaStyleSet, currentFolioBlockId, deriveBlockId, diffWordSegments, extractDocumentStyleSet, extractDocumentStyleSetFromDocx, extractEmbeddedFonts, filterHeadingsByDepth, finishAutocompleteSuggestion, fromMarkdown, getAnonymizationMatches, getAutocompleteSuggestion, getEmbeddedFontFaces, getFolioCaretViewportRect, getFolioDocumentOperationCapabilities, getFolioDocumentOperationIssues, getFolioDocumentOperationReceipts, getFolioParaIdFromBlockId, getFolioSelectionViewportRect, getGoogleFontsEnabled, getTemplateDirectives, getTemplateSlashMenu, hashFolioAIBlockText, inspectDocumentStyles, inspectDocumentStylesFromDocx, inspectDocxCompatibility, isFolioAIContentBlock, isFolioBlockId, isFolioDocumentOperationModeSupported, isSequentialFolioBlockId, isSuggestionStale, isSupportedFolioDocumentOperationVersion, mergeDocumentContent, normalizeFolioAIBlockText, parseFolioDocumentOperationBatch, resetTemplateSlashQuery, resolveSuggestionAnchor, scanDirectives, scopeEmbeddedFontFamily, scrollFolioPositionIntoView, setAICitationsMeta, setAISuggestionsMeta, setActiveCitationMeta, setAnonymizationTermsMeta, setEmbeddedFontFamilyMap, setFocusedSuggestionMeta, setGoogleFontsEnabled, setTemplatePreviewValues, shouldTriggerAutocomplete, startAutocompleteSuggestion, templateSlashMenuKey, toMarkdown, toMarkdownResult };
|
|
@@ -4,6 +4,8 @@ import { Slice } from "prosemirror-model";
|
|
|
4
4
|
import { EditorState } from "prosemirror-state";
|
|
5
5
|
import { Result } from "better-result";
|
|
6
6
|
//#region src/controller/canonicalClipboard.d.ts
|
|
7
|
+
/** Imported comments and notes require copying their source story parts. */
|
|
8
|
+
declare const canonicalClipboardStoryPartRefusal: (paragraph: document_d_exports.Paragraph) => CanonicalSessionError | undefined;
|
|
7
9
|
/** Clipboard slices are input payloads; their paragraph identities and private captures are not owners. */
|
|
8
10
|
type PrepareCanonicalPasteOptions = {
|
|
9
11
|
session: CanonicalSession;
|
|
@@ -20,4 +22,4 @@ type PrepareCanonicalPasteOptions = {
|
|
|
20
22
|
};
|
|
21
23
|
declare const prepareCanonicalPaste: ({ session, state, slice, plain, moveTarget, pasteTarget, sourceDocument, moveSource }: PrepareCanonicalPasteOptions) => Result<CanonicalCommit, CanonicalSessionError>;
|
|
22
24
|
//#endregion
|
|
23
|
-
export { prepareCanonicalPaste };
|
|
25
|
+
export { canonicalClipboardStoryPartRefusal, prepareCanonicalPaste };
|