@stll/folio-core 0.52.0 → 0.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/ai-edits/apply.d.ts +26 -1
- package/dist/ai-edits/apply.js +1779 -141
- package/dist/ai-edits/batch-claims.d.ts +145 -0
- package/dist/ai-edits/batch-claims.js +275 -0
- package/dist/ai-edits/blockRange.js +9 -3
- package/dist/ai-edits/character-boundaries.d.ts +43 -0
- package/dist/ai-edits/character-boundaries.js +95 -0
- package/dist/ai-edits/clean-text.d.ts +33 -3
- package/dist/ai-edits/clean-text.js +52 -6
- package/dist/ai-edits/comment-lifecycle.d.ts +18 -0
- package/dist/ai-edits/comment-lifecycle.js +52 -0
- package/dist/ai-edits/headless.d.ts +91 -7
- package/dist/ai-edits/headless.js +520 -51
- package/dist/ai-edits/index.d.ts +2 -1
- package/dist/ai-edits/index.js +2 -1
- package/dist/ai-edits/minimal-replacement.d.ts +21 -6
- package/dist/ai-edits/minimal-replacement.js +134 -15
- package/dist/ai-edits/newListNumbering.d.ts +23 -0
- package/dist/ai-edits/newListNumbering.js +94 -0
- package/dist/ai-edits/note-references.d.ts +96 -0
- package/dist/ai-edits/note-references.js +139 -0
- package/dist/ai-edits/pending-suggestions.d.ts +79 -0
- package/dist/ai-edits/pending-suggestions.js +306 -0
- package/dist/ai-edits/read.d.ts +6 -4
- package/dist/ai-edits/read.js +113 -50
- package/dist/ai-edits/result-validation.d.ts +29 -0
- package/dist/ai-edits/result-validation.js +164 -0
- package/dist/ai-edits/revisionStretches.d.ts +17 -0
- package/dist/ai-edits/revisionStretches.js +80 -0
- package/dist/ai-edits/snapshot.d.ts +36 -3
- package/dist/ai-edits/snapshot.js +180 -25
- package/dist/ai-edits/table-cell-mutations.d.ts +4 -2
- package/dist/ai-edits/table-cell-mutations.js +6 -2
- package/dist/ai-edits/table-geometry.d.ts +1 -1
- package/dist/ai-edits/table-row-column-mutations.d.ts +44 -17
- package/dist/ai-edits/table-row-column-mutations.js +86 -34
- package/dist/ai-edits/types.d.ts +155 -16
- package/dist/compare/compare.d.ts +1 -1
- package/dist/compare/compare.js +65 -16
- package/dist/compare/content-alignment.d.ts +5 -1
- package/dist/compare/content-alignment.js +52 -34
- package/dist/compare/content-types.d.ts +7 -0
- package/dist/compare/content.d.ts +4 -1
- package/dist/compare/content.js +6 -1
- package/dist/compare/formatting.js +2 -1
- package/dist/compare/inline-atoms.d.ts +21 -4
- package/dist/compare/inline-atoms.js +138 -16
- package/dist/compare/inline-provenance.js +1 -1
- package/dist/compare/plan.js +10 -5
- package/dist/compare/scenario.js +14 -3
- package/dist/compare/section-boundary-properties.js +1 -1
- package/dist/compare/types.d.ts +4 -2
- package/dist/compare/types.js +2 -1
- package/dist/compare/verification.d.ts +1 -1
- package/dist/compare/verification.js +15 -3
- package/dist/controller/committedLayoutDiff.d.ts +25 -0
- package/dist/controller/committedLayoutDiff.js +71 -0
- package/dist/controller/contentControlWidgetController.d.ts +1 -1
- package/dist/controller/folioEditor.d.ts +1 -1
- package/dist/controller/fontReadiness.d.ts +70 -3
- package/dist/controller/fontReadiness.js +100 -10
- package/dist/controller/headerFooterEditorManager.js +6 -1
- package/dist/controller/layoutPipeline.d.ts +12 -10
- package/dist/controller/layoutPipeline.js +65 -11
- package/dist/controller/layoutRunOptions.d.ts +24 -0
- package/dist/controller/layoutRunOptions.js +17 -0
- package/dist/controller/layoutScheduler.d.ts +19 -14
- package/dist/controller/layoutScheduler.js +15 -12
- package/dist/controller/layoutSession.d.ts +26 -2
- package/dist/controller/layoutSession.js +1 -1
- package/dist/controller/noteEditorManager.js +8 -3
- package/dist/document-operations.d.ts +11 -2
- package/dist/document-operations.js +230 -21
- package/dist/docx/altChunk.d.ts +8 -0
- package/dist/docx/altChunk.js +17 -0
- package/dist/docx/archiveInflation.d.ts +127 -0
- package/dist/docx/archiveInflation.js +181 -0
- package/dist/docx/attributeRemainder.d.ts +1 -1
- package/dist/docx/blockContentParser.d.ts +64 -1
- package/dist/docx/blockContentParser.js +17 -4
- package/dist/docx/blockCustomXmlShell.d.ts +7 -0
- package/dist/docx/blockCustomXmlShell.js +14 -0
- package/dist/docx/blockPlainText.js +7 -0
- package/dist/docx/commentAnchorIndex.js +1 -1
- package/dist/docx/commentRangeIntegrity.js +8 -3
- package/dist/docx/commentReferenceNormalization.js +1 -1
- package/dist/docx/commentReplyMarkers.js +20 -1
- package/dist/docx/compatibility.d.ts +1 -1
- package/dist/docx/compatibility.js +34 -13
- package/dist/docx/containerChildren.gen.d.ts +1 -1
- package/dist/docx/containerChildren.gen.js +1 -0
- package/dist/docx/documentParser.js +12 -12
- package/dist/docx/drawingIdNormalization.d.ts +3 -1
- package/dist/docx/drawingIdNormalization.js +6 -1
- package/dist/docx/ensureParaIds.js +119 -97
- package/dist/docx/footnoteParser.js +8 -4
- package/dist/docx/headerFooterParser.js +3 -3
- package/dist/docx/headerFooterReferenceNormalization.d.ts +20 -1
- package/dist/docx/headerFooterReferenceNormalization.js +52 -27
- package/dist/docx/hyperlinkParser.d.ts +1 -1
- package/dist/docx/index.d.ts +1 -1
- package/dist/docx/listNumberingInstances.d.ts +59 -0
- package/dist/docx/listNumberingInstances.js +249 -0
- package/dist/docx/metadataPrivacy.js +24 -1
- package/dist/docx/normalizeBaseDirection.js +2 -1
- package/dist/docx/noteReferenceMark.d.ts +15 -0
- package/dist/docx/noteReferenceMark.js +48 -0
- package/dist/docx/opaqueCarrier.d.ts +7 -0
- package/dist/docx/opaqueCarrier.js +38 -0
- package/dist/docx/packageParts.js +4 -1
- package/dist/docx/paragraphParser.js +96 -27
- package/dist/docx/paragraphPropertySource.d.ts +4 -2
- package/dist/docx/paragraphPropertySource.js +10 -2
- package/dist/docx/paragraphTraversal.js +1 -0
- package/dist/docx/parseWarningMessage.js +4 -1
- package/dist/docx/parser.js +175 -22
- package/dist/docx/rezip.js +31 -7
- package/dist/docx/sdtProperties.js +1 -1
- package/dist/docx/sdtPropertiesPatch.js +3 -0
- package/dist/docx/selectiveSave.js +16 -9
- package/dist/docx/selectiveXmlPatch.d.ts +3 -1
- package/dist/docx/selectiveXmlPatch.js +186 -39
- package/dist/docx/serializer/blockCustomXmlSerializer.d.ts +5 -0
- package/dist/docx/serializer/blockCustomXmlSerializer.js +4 -0
- package/dist/docx/serializer/documentSerializer.js +2 -0
- package/dist/docx/serializer/headerFooterSerializer.js +2 -0
- package/dist/docx/serializer/noteSerializer.js +3 -1
- package/dist/docx/serializer/paragraphSerializer.js +33 -9
- package/dist/docx/serializer/tableSerializer.js +25 -38
- package/dist/docx/server/boundedArchive.d.ts +8 -13
- package/dist/docx/server/boundedArchive.js +70 -59
- package/dist/docx/server/createBilingualDocument.js +3 -3
- package/dist/docx/server/extractDocxText.d.ts +8 -2
- package/dist/docx/server/extractDocxText.js +2 -2
- package/dist/docx/server/validateDocxConformance.d.ts +1 -1
- package/dist/docx/server/validateDocxConformance.js +1 -0
- package/dist/docx/tableParser.d.ts +157 -1
- package/dist/docx/tableParser.js +89 -10
- package/dist/docx/textBoxParser.js +1 -1
- package/dist/docx/unzip.d.ts +20 -2
- package/dist/docx/unzip.js +136 -25
- package/dist/docx/wordprocessingPrefixes.d.ts +78 -0
- package/dist/docx/wordprocessingPrefixes.js +286 -0
- package/dist/fonts/embeddedFonts.js +1 -1
- package/dist/i18n/messages/catalogs.gen.d.ts +170 -34
- package/dist/i18n/messages/catalogs.gen.js +187 -51
- package/dist/i18n/messages/messages.gen.d.ts +10 -2
- package/dist/internal/compare/inline-presentation.d.ts +2 -1
- package/dist/internal/compare/inline-presentation.js +11 -10
- package/dist/internal/headlessRevisionResolutionGuard.d.ts +2 -8
- package/dist/internal/headlessRevisionResolutionGuard.js +2 -11
- package/dist/internal/indexedPositionMap.d.ts +11 -0
- package/dist/internal/indexedPositionMap.js +42 -0
- package/dist/internal/pageBreakRunSourceDescendantIndex.js +2 -1
- package/dist/internal/revisionResolutionEdits.d.ts +13 -0
- package/dist/internal/revisionResolutionEdits.js +19 -0
- package/dist/internal/revisionResolutionInline.d.ts +24 -0
- package/dist/internal/{headlessRevisionResolution.js → revisionResolutionInline.js} +61 -43
- package/dist/internal/revisionResolutionStep.d.ts +34 -0
- package/dist/internal/revisionResolutionStep.js +282 -0
- package/dist/internal/revisionResolutionTracking.d.ts +11 -0
- package/dist/internal/revisionResolutionTracking.js +124 -0
- package/dist/internal/wholeStoryRevisionResolution.d.ts +56 -0
- package/dist/internal/wholeStoryRevisionResolution.js +600 -0
- package/dist/layout-bridge/convert/markupViewFlow.d.ts +20 -0
- package/dist/layout-bridge/convert/markupViewFlow.js +123 -0
- package/dist/layout-bridge/convert/tableConversion.js +1 -1
- package/dist/layout-bridge/convert/toFlowBlocks.js +10 -1
- package/dist/layout-engine/layoutInstrumentation.d.ts +9 -1
- package/dist/layout-engine/layoutInstrumentation.js +4 -1
- package/dist/layout-engine/measure/cache.d.ts +18 -1
- package/dist/layout-engine/measure/cache.js +31 -1
- package/dist/layout-engine/measure/font-metrics.worker.js +3 -7
- package/dist/layout-engine/measure/measureContainer.js +7 -47
- package/dist/layout-engine/measure/measureHelpers.d.ts +6 -1
- package/dist/layout-engine/measure/measureHelpers.js +22 -2
- package/dist/layout-engine/measure/measureParagraph.js +2 -2
- package/dist/layout-engine/measure/measureWorker.js +2 -3
- package/dist/layout-engine/measure/measureWorkerProtocol.d.ts +6 -7
- package/dist/layout-engine/measure/measureWorkerProtocol.js +1 -2
- package/dist/layout-engine/measure/paragraphMeasureShared.d.ts +12 -1
- package/dist/layout-engine/measure/paragraphMeasureShared.js +14 -1
- package/dist/layout-engine/types.d.ts +6 -0
- package/dist/layout-painter/renderPage.js +1 -0
- package/dist/layout-painter/renderParagraph.js +1 -1
- package/dist/managers/ContextMenuManager.js +5 -2
- package/dist/managers/types.d.ts +3 -0
- package/dist/markdown/escape.d.ts +2 -2
- package/dist/markdown/escape.js +4 -5
- package/dist/markdown/fromMarkdown.js +2 -1
- package/dist/markdown/internals.d.ts +11 -1
- package/dist/markdown/internals.js +24 -3
- package/dist/markdown/renderBlock.js +121 -25
- package/dist/markdown/renderParagraph.d.ts +13 -1
- package/dist/markdown/renderParagraph.js +85 -38
- package/dist/markdown/renderRuns.d.ts +10 -1
- package/dist/markdown/renderRuns.js +323 -69
- package/dist/markdown/renderTable.js +24 -12
- package/dist/markdown/trailers.js +2 -2
- package/dist/markdown/types.d.ts +29 -7
- package/dist/paged-layout/incrementalMeasure.d.ts +1 -2
- package/dist/paged-layout/incrementalMeasure.js +1 -9
- package/dist/paged-layout/transactionDirtyRange.d.ts +1 -3
- package/dist/paged-layout/transactionDirtyRange.js +29 -41
- package/dist/panel-layout.d.ts +83 -0
- package/dist/panel-layout.js +96 -0
- package/dist/prosemirror/anchoredTextBoxes.d.ts +37 -0
- package/dist/prosemirror/anchoredTextBoxes.js +156 -0
- package/dist/prosemirror/attrs/index.d.ts +6 -2
- package/dist/prosemirror/attrs/index.js +172 -1
- package/dist/prosemirror/clearRunColor.d.ts +6 -0
- package/dist/prosemirror/clearRunColor.js +46 -0
- package/dist/prosemirror/commands/comments.d.ts +7 -8
- package/dist/prosemirror/commands/comments.js +281 -212
- package/dist/prosemirror/commands/contentControls.d.ts +1 -1
- package/dist/prosemirror/commands/formatPainter.d.ts +1 -1
- package/dist/prosemirror/commands/formatPainter.js +1 -1
- package/dist/prosemirror/commands/formatting.d.ts +1 -1
- package/dist/prosemirror/commands/hyperlink.js +2 -1
- package/dist/prosemirror/commands/index.d.ts +2 -2
- package/dist/prosemirror/commands/index.js +2 -2
- package/dist/prosemirror/commands/paragraph.d.ts +7 -1
- package/dist/prosemirror/commands/paragraph.js +9 -1
- package/dist/prosemirror/commands/paragraphBookmarkJoin.d.ts +13 -0
- package/dist/prosemirror/commands/paragraphBookmarkJoin.js +22 -0
- package/dist/prosemirror/commands/pastePlainText.d.ts +1 -1
- package/dist/prosemirror/commands/propertyChangeScope.d.ts +3 -2
- package/dist/prosemirror/commands/propertyChangeScope.js +24 -3
- package/dist/prosemirror/commands/resolveAllTableChanges.d.ts +40 -0
- package/dist/prosemirror/commands/resolveAllTableChanges.js +620 -0
- package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.d.ts +15 -0
- package/dist/prosemirror/commands/resolveNodePropertyChangeAttrs.js +46 -0
- package/dist/prosemirror/commands/resolveParagraphProperties.d.ts +16 -0
- package/dist/prosemirror/commands/resolveParagraphProperties.js +73 -0
- package/dist/prosemirror/commands/sectionBreak.js +2 -1
- package/dist/prosemirror/commands/tableCellMergeResolution.d.ts +15 -2
- package/dist/prosemirror/commands/tableCellMergeResolution.js +23 -7
- package/dist/prosemirror/containerFinalParagraph.d.ts +11 -5
- package/dist/prosemirror/containerFinalParagraph.js +7 -6
- package/dist/prosemirror/contentControlRevisions.d.ts +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +2 -13
- package/dist/prosemirror/conversion/fromProseDoc.js +177 -605
- package/dist/prosemirror/conversion/toProseDoc.d.ts +4 -11
- package/dist/prosemirror/conversion/toProseDoc.js +70 -154
- package/dist/prosemirror/documentSchema.d.ts +8 -0
- package/dist/prosemirror/documentSchema.js +18 -0
- package/dist/prosemirror/emptyFieldResultRuns.d.ts +18 -0
- package/dist/prosemirror/emptyFieldResultRuns.js +33 -0
- package/dist/prosemirror/extensions/ExtensionManager.d.ts +1 -1
- package/dist/prosemirror/extensions/ExtensionManager.js +3 -1
- package/dist/prosemirror/extensions/StarterKit.js +5 -1
- package/dist/prosemirror/extensions/core/DocExtension.js +1 -1
- package/dist/prosemirror/extensions/core/ParagraphExtension.js +116 -63
- package/dist/prosemirror/extensions/features/BaseKeymapExtension.js +4 -1
- package/dist/prosemirror/extensions/features/EmptyParagraphFormatExtension.js +24 -3
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.d.ts +20 -0
- package/dist/prosemirror/extensions/features/JoinedRunStyleExtension.js +43 -0
- package/dist/prosemirror/extensions/features/ListExtension.js +167 -128
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.d.ts +19 -2
- package/dist/prosemirror/extensions/features/ParaIdAllocatorExtension.js +33 -20
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.d.ts +31 -2
- package/dist/prosemirror/extensions/features/ParagraphChangeTrackerExtension.js +270 -99
- package/dist/prosemirror/extensions/features/PasteCleanupExtension.js +3 -2
- package/dist/prosemirror/extensions/features/pasteCleanup.js +2 -1
- package/dist/prosemirror/extensions/features/pastedHeadingStyles.js +1 -1
- package/dist/prosemirror/extensions/features/pastedHtmlLists.d.ts +12 -0
- package/dist/prosemirror/extensions/features/pastedHtmlLists.js +124 -0
- package/dist/prosemirror/extensions/marks/FootnoteRefExtension.js +33 -11
- package/dist/prosemirror/extensions/marks/HyperlinkExtension.js +8 -4
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.d.ts +21 -18
- package/dist/prosemirror/extensions/marks/RunIdentityExtension.js +37 -17
- package/dist/prosemirror/extensions/marks/StrikeExtension.js +2 -2
- package/dist/prosemirror/extensions/marks/SubscriptExtension.js +2 -2
- package/dist/prosemirror/extensions/marks/SuperscriptExtension.js +2 -2
- package/dist/prosemirror/extensions/marks/TextColorExtension.js +4 -3
- package/dist/prosemirror/extensions/marks/markUtils.d.ts +15 -8
- package/dist/prosemirror/extensions/marks/markUtils.js +25 -10
- package/dist/prosemirror/extensions/marks/noteReferenceDeletion.d.ts +12 -0
- package/dist/prosemirror/extensions/marks/noteReferenceDeletion.js +46 -0
- package/dist/prosemirror/extensions/nodes/BlockCustomXmlExtension.d.ts +6 -0
- package/dist/prosemirror/extensions/nodes/BlockCustomXmlExtension.js +52 -0
- package/dist/prosemirror/extensions/nodes/CommentReferenceExtension.js +2 -2
- package/dist/prosemirror/extensions/nodes/FieldExtension.d.ts +3 -3
- package/dist/prosemirror/extensions/nodes/FieldExtension.js +50 -15
- package/dist/prosemirror/extensions/nodes/HardBreakExtension.js +5 -3
- package/dist/prosemirror/extensions/nodes/PreservedBlockExtension.js +4 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +121 -226
- package/dist/prosemirror/extensions/types.d.ts +11 -1
- package/dist/prosemirror/findReplaceSelection.js +1 -1
- package/dist/prosemirror/hyperlinkRemoval.d.ts +9 -0
- package/dist/prosemirror/hyperlinkRemoval.js +129 -0
- package/dist/prosemirror/index.d.ts +5 -3
- package/dist/prosemirror/index.js +5 -3
- package/dist/prosemirror/indexedNodeLookup.d.ts +17 -0
- package/dist/prosemirror/indexedNodeLookup.js +103 -0
- package/dist/prosemirror/listAutoformatMarkers.d.ts +19 -0
- package/dist/prosemirror/listAutoformatMarkers.js +98 -0
- package/dist/prosemirror/listInstanceReferences.d.ts +12 -0
- package/dist/prosemirror/listInstanceReferences.js +72 -0
- package/dist/prosemirror/listLabels.d.ts +24 -0
- package/dist/prosemirror/listLabels.js +111 -0
- package/dist/prosemirror/listNumbering.d.ts +92 -0
- package/dist/prosemirror/listNumbering.js +330 -0
- package/dist/prosemirror/listRendering.d.ts +27 -0
- package/dist/prosemirror/listRendering.js +27 -0
- package/dist/prosemirror/listRenderingAttrs.d.ts +11 -2
- package/dist/prosemirror/listRenderingAttrs.js +8 -1
- package/dist/prosemirror/markupViewNotes.d.ts +8 -0
- package/dist/prosemirror/markupViewNotes.js +49 -0
- package/dist/prosemirror/markupViewProjection.d.ts +97 -0
- package/dist/prosemirror/markupViewProjection.js +88 -0
- package/dist/prosemirror/noteReferenceReview.d.ts +77 -0
- package/dist/prosemirror/noteReferenceReview.js +332 -0
- package/dist/prosemirror/numberingAttr.d.ts +9 -1
- package/dist/prosemirror/numberingAttr.js +9 -1
- package/dist/prosemirror/outlineLevelAttr.js +1 -1
- package/dist/prosemirror/paragraphIndentation.d.ts +10 -1
- package/dist/prosemirror/paragraphIndentation.js +32 -7
- package/dist/prosemirror/paragraphMarkJoin.d.ts +21 -0
- package/dist/prosemirror/paragraphMarkJoin.js +26 -0
- package/dist/prosemirror/paragraphPropertyCarry.d.ts +64 -0
- package/dist/prosemirror/paragraphPropertyCarry.js +158 -0
- package/dist/prosemirror/plugins/createDocScanPlugin.d.ts +1 -1
- package/dist/prosemirror/plugins/documentNumbering.d.ts +27 -1
- package/dist/prosemirror/plugins/documentNumbering.js +97 -11
- package/dist/prosemirror/plugins/documentStyleState.d.ts +26 -0
- package/dist/prosemirror/plugins/documentStyleState.js +32 -0
- package/dist/prosemirror/plugins/documentStyles.d.ts +3 -13
- package/dist/prosemirror/plugins/documentStyles.js +67 -17
- package/dist/prosemirror/plugins/index.d.ts +2 -1
- package/dist/prosemirror/plugins/index.js +2 -1
- package/dist/prosemirror/plugins/paragraphStyleResolution.d.ts +15 -0
- package/dist/prosemirror/plugins/paragraphStyleResolution.js +230 -0
- package/dist/prosemirror/plugins/suggestionMode.d.ts +27 -3
- package/dist/prosemirror/plugins/suggestionMode.js +490 -63
- package/dist/prosemirror/plugins/templateDirectives.d.ts +1 -1
- package/dist/prosemirror/plugins/transactionInvariants.d.ts +32 -0
- package/dist/prosemirror/plugins/transactionInvariants.js +86 -0
- package/dist/prosemirror/positionSweep.d.ts +24 -0
- package/dist/prosemirror/positionSweep.js +222 -0
- package/dist/prosemirror/rebaseParagraphRunFormatting.d.ts +23 -3
- package/dist/prosemirror/rebaseParagraphRunFormatting.js +39 -13
- package/dist/prosemirror/rebaseParagraphRuns.d.ts +36 -0
- package/dist/prosemirror/rebaseParagraphRuns.js +99 -0
- package/dist/prosemirror/rejoinRunCarriers.d.ts +1 -1
- package/dist/prosemirror/replacedAnnotations.d.ts +33 -1
- package/dist/prosemirror/replacedAnnotations.js +170 -1
- package/dist/prosemirror/runFormattingFromMarks.d.ts +18 -0
- package/dist/prosemirror/runFormattingFromMarks.js +567 -0
- package/dist/prosemirror/runFormattingInlineCarriers.d.ts +1 -1
- package/dist/prosemirror/runFormattingReconciliation.js +10 -9
- package/dist/prosemirror/schema/index.d.ts +2 -2
- package/dist/prosemirror/schema/index.js +3 -0
- package/dist/prosemirror/schema/nodes.d.ts +44 -11
- package/dist/prosemirror/sectionMarkEdits.d.ts +20 -0
- package/dist/prosemirror/sectionMarkEdits.js +59 -0
- package/dist/prosemirror/storyListNumbering.d.ts +17 -0
- package/dist/prosemirror/storyListNumbering.js +102 -0
- package/dist/prosemirror/styles/paragraphStyleCascade.d.ts +59 -0
- package/dist/prosemirror/styles/paragraphStyleCascade.js +145 -0
- package/dist/prosemirror/styles/resolvedStyleAttrs.d.ts +21 -2
- package/dist/prosemirror/styles/resolvedStyleAttrs.js +38 -1
- package/dist/prosemirror/styles/tableStyleRegions.d.ts +31 -0
- package/dist/prosemirror/styles/tableStyleRegions.js +55 -0
- package/dist/prosemirror/tableCellPaste.d.ts +74 -0
- package/dist/prosemirror/tableCellPaste.js +525 -0
- package/dist/prosemirror/tableGridMutation.d.ts +87 -2
- package/dist/prosemirror/tableGridMutation.js +255 -2
- package/dist/prosemirror/tableRunIn.d.ts +51 -0
- package/dist/prosemirror/tableRunIn.js +165 -0
- package/dist/prosemirror/textInput.js +11 -2
- package/dist/prosemirror/trackedRevisionPath.d.ts +17 -0
- package/dist/prosemirror/trackedRevisionPath.js +32 -0
- package/dist/prosemirror/validation.js +5 -1
- package/dist/redline.js +93 -9
- package/dist/render-dom/BodySelectionOverlay.d.ts +4 -1
- package/dist/render-dom/BodySelectionOverlay.js +3 -2
- package/dist/server.d.ts +2 -2
- package/dist/utils/findReplace.js +2 -2
- package/dist/utils/mergeDocumentContent.js +1 -1
- package/dist/utils/noteReferenceLabels.d.ts +36 -0
- package/dist/utils/noteReferenceLabels.js +32 -0
- package/dist/utils/replaceText.js +1 -1
- package/dist/version-comparison.d.ts +1 -0
- package/dist/version-comparison.js +1 -0
- package/package.json +6 -5
- package/dist/internal/headlessRevisionResolution.d.ts +0 -23
|
@@ -1,29 +1,38 @@
|
|
|
1
1
|
import { sameStatedParagraphNumbering as sameStatedParagraphNumbering$1 } from "../../docx/numberingReference.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { getProseParagraphPropertySourceToken, markParagraphPropertySourceTransfers } from "../../docx/paragraphPropertySource.js";
|
|
3
|
+
import { RevisionResolutionStep } from "../../internal/revisionResolutionStep.js";
|
|
4
|
+
import { finalRevisionParagraphRanges } from "../../internal/revisionResolutionTracking.js";
|
|
5
|
+
import { deleteTextBoxesAnchoredAt, droppedTextBoxAnchorIds, moveTextBoxesPastNextParagraph } from "../anchoredTextBoxes.js";
|
|
6
|
+
import { expectFieldAttrs, expectParagraphAttrs, expectRunPropertyChangeMarkAttrs, expectTrackedChangeMarkAttrs } from "../attrs/index.js";
|
|
6
7
|
import { addedBreakCarrierBefore, finalParagraphsOf, paragraphEndsItsContainer } from "../containerFinalParagraph.js";
|
|
7
8
|
import { enclosingRevisionIds, resolutionRemovesControl, withoutResolvedEnclosures } from "../contentControlRevisions.js";
|
|
8
|
-
import {
|
|
9
|
+
import { resolveEmptyFieldResultRuns } from "../emptyFieldResultRuns.js";
|
|
10
|
+
import { JOINED_RUNS_RESTYLED_META } from "../extensions/features/JoinedRunStyleExtension.js";
|
|
9
11
|
import { markChangedParagraphRanges, markStructuralChange, markTrackedSectionEndpointRemoval } from "../extensions/features/ParagraphChangeTrackerExtension.js";
|
|
10
12
|
import "../extensions/nodes/SdtExtension.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
+
import { resolveStateStory } from "../markupViewProjection.js";
|
|
14
|
+
import { joinAtParagraphMark } from "../paragraphMarkJoin.js";
|
|
15
|
+
import { getDocumentNumbering } from "../plugins/documentNumbering.js";
|
|
16
|
+
import { getDocumentStyleResolver } from "../plugins/documentStyleState.js";
|
|
17
|
+
import { rebaseParagraphRuns, setParagraphAttrsWithRebasedRunFormatting } from "../rebaseParagraphRunFormatting.js";
|
|
13
18
|
import { rejoinRunsAt } from "../rejoinRunCarriers.js";
|
|
14
|
-
import { getFolioNodeRevisionCarriers, nodePropertyRevisionSites
|
|
19
|
+
import { getFolioNodeRevisionCarriers, nodePropertyRevisionSites } from "../revisionCarriers.js";
|
|
15
20
|
import { RUN_FORMATTING_MARK_NAMES } from "../runFormattingMarkNames.js";
|
|
16
21
|
import { reconstructRejectedRunFormattingMarks } from "../runPropertyChangeResolution.js";
|
|
17
|
-
import { paragraphRunStyleContextAt } from "../runStyleFormatting.js";
|
|
22
|
+
import { paragraphRunStyleContext, paragraphRunStyleContextAt } from "../runStyleFormatting.js";
|
|
18
23
|
import { getTableCellMergeChange } from "../tableCellMergeRevision.js";
|
|
19
24
|
import { isTableCellRetainedInReviewView } from "../tableCellRevisionVisibility.js";
|
|
20
|
-
import { reconcileTableGridAfterColumnRemoval } from "../tableGridMutation.js";
|
|
25
|
+
import { markRowEmptiedInBatch, reconcileTableGridAfterColumnRemoval, removeRowsWithoutCellsAfterBatch, removeTableRow } from "../tableGridMutation.js";
|
|
26
|
+
import { runInCellPending, runParagraphIntoTable } from "../tableRunIn.js";
|
|
21
27
|
import { holdsNoContent } from "../zeroWidthAnchors.js";
|
|
22
|
-
import {
|
|
28
|
+
import { inlineBookmarksForParagraphJoin } from "./paragraphBookmarkJoin.js";
|
|
29
|
+
import { hasSerializableParagraphPropertyChange, paragraphPropertiesSnapshot } from "./propertyChangeScope.js";
|
|
30
|
+
import { resolveNodePropertyChangeAttrs } from "./resolveNodePropertyChangeAttrs.js";
|
|
31
|
+
import { resolveParagraphChangeAttrs } from "./resolveParagraphProperties.js";
|
|
23
32
|
import { hasMatchingCollapsedTableCellMerge, resolveCollapsedTableCellMerge, resolveVisibleTableCellMerge } from "./tableCellMergeResolution.js";
|
|
24
33
|
import { panic } from "better-result";
|
|
25
34
|
import { PARAGRAPH_MARK_CHANGE_KINDS, REVIEW_CARRIERS } from "@stll/docx-core/model";
|
|
26
|
-
import { TableMap
|
|
35
|
+
import { TableMap } from "prosemirror-tables";
|
|
27
36
|
import { Mapping } from "prosemirror-transform";
|
|
28
37
|
//#region src/prosemirror/commands/comments.ts
|
|
29
38
|
/**
|
|
@@ -74,17 +83,6 @@ const revisionLayerOf = (mark) => {
|
|
|
74
83
|
};
|
|
75
84
|
};
|
|
76
85
|
const revisionLayerRemovesContent = (layer, mode) => mode === "accept" ? layer.type === "deletion" || layer.type === "moveFrom" : layer.type === "insertion" || layer.type === "moveTo";
|
|
77
|
-
const containsNestedRevision = (doc) => {
|
|
78
|
-
let found = false;
|
|
79
|
-
doc.descendants((node) => {
|
|
80
|
-
if (found) return false;
|
|
81
|
-
for (const mark of node.marks) if ((mark.type.name === "insertion" || mark.type.name === "deletion") && (expectTrackedChangeMarkAttrs(mark)._docxRevisionAncestors?.length ?? 0) > 0) {
|
|
82
|
-
found = true;
|
|
83
|
-
return false;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
return found;
|
|
87
|
-
};
|
|
88
86
|
/**
|
|
89
87
|
* Resolve a tracked change: accept or reject.
|
|
90
88
|
* - Accept: keep insertions (remove mark), delete deletions (remove text)
|
|
@@ -97,19 +95,20 @@ const containsNestedRevision = (doc) => {
|
|
|
97
95
|
* the operation matches every revision mark or property-change entry in the
|
|
98
96
|
* range (the bulk accept-all/reject-all path).
|
|
99
97
|
*/
|
|
100
|
-
function resolveChange(from, to, mode, revisionIds
|
|
98
|
+
function resolveChange(from, to, mode, revisionIds) {
|
|
101
99
|
return (state, dispatch) => {
|
|
102
100
|
const insertionType = state.schema.marks["insertion"];
|
|
103
101
|
const deletionType = state.schema.marks["deletion"];
|
|
104
102
|
const styleResolver = getDocumentStyleResolver(state);
|
|
103
|
+
const numbering = getDocumentNumbering(state);
|
|
105
104
|
const keepType = mode === "accept" ? insertionType : deletionType;
|
|
106
105
|
const removeType = mode === "accept" ? deletionType : insertionType;
|
|
107
106
|
const revisionSet = revisionIds === void 0 ? null : new Set(revisionIds);
|
|
108
107
|
const removeKeptMarksInBulk = revisionSet === null && keepType !== void 0;
|
|
109
|
-
const canBulkInlineResolution = execution === "headless-bulk-inline" && revisionSet === null && from === 0 && to === state.doc.content.size && stateAllowsHeadlessRevisionResolution(state) && !containsNestedRevision(state.doc);
|
|
110
108
|
const matchesRevision = (mark) => revisionSet === null || typeof mark.attrs["revisionId"] === "number" && revisionSet.has(mark.attrs["revisionId"]);
|
|
111
109
|
if (dispatch) {
|
|
112
110
|
const tr = state.tr;
|
|
111
|
+
tr.setMeta(JOINED_RUNS_RESTYLED_META, true);
|
|
113
112
|
const deleteRanges = [];
|
|
114
113
|
/** Where resolved inline content began and ended, in `state.doc`. */
|
|
115
114
|
const resolvedBoundaries = [];
|
|
@@ -122,51 +121,14 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
122
121
|
if (node.type.name === "paragraph") {
|
|
123
122
|
const op = collectPPrMarkOp(node, pos, from, to, mode, revisionSet);
|
|
124
123
|
if (op) pPrMarkOps.push(op);
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
if (rejection === null) remaining = propertyChanges.filter((change) => !matchesPropertyChange(change));
|
|
134
|
-
else if (rejection.type === "unchanged") remaining = propertyChanges;
|
|
135
|
-
else remaining = rejection.remaining;
|
|
136
|
-
nextAttrs = {
|
|
137
|
-
...node.attrs,
|
|
138
|
-
_propertyChanges: remaining.length > 0 ? remaining : null
|
|
139
|
-
};
|
|
140
|
-
if (rejection?.type === "restore-previous") {
|
|
141
|
-
const inheritedAlignment = expectParagraphAttrs(node).alignmentFromStyle;
|
|
142
|
-
let previousFormattingFromStyle;
|
|
143
|
-
if (styleResolver) previousFormattingFromStyle = styleResolver.resolveParagraphStyle(rejection.previousFormatting?.styleId).paragraphFormatting;
|
|
144
|
-
else if (inheritedAlignment !== void 0) previousFormattingFromStyle = { alignment: inheritedAlignment };
|
|
145
|
-
Object.assign(nextAttrs, paragraphRejectAttrPatch(rejection.previousFormatting, previousFormattingFromStyle));
|
|
146
|
-
const restoredFormatting = paragraphRejectOriginalFormatting(rejection.previousFormatting, node.attrs["_originalFormatting"]);
|
|
147
|
-
nextAttrs["_originalFormatting"] = restoredFormatting;
|
|
148
|
-
if (styleResolver) nextAttrs["defaultTextFormatting"] = resolveParagraphDefaultTextFormatting(rejection.previousFormatting?.styleId, restoredFormatting ?? void 0, styleResolver) ?? null;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
const sectionProperties = node.attrs["_sectionProperties"];
|
|
153
|
-
const sectionChanges = sectionProperties?.propertyChanges;
|
|
154
|
-
if (sectionProperties && Array.isArray(sectionChanges) && sectionChanges.length > 0 && boundaryCovered) {
|
|
155
|
-
const matches = sectionChanges.filter((c) => revisionSet === null || c.info && revisionSet.has(c.info.id));
|
|
156
|
-
if (matches.length > 0) {
|
|
157
|
-
const remaining = sectionChanges.filter((c) => revisionSet !== null && (!c.info || !revisionSet.has(c.info.id)));
|
|
158
|
-
let restored = { ...sectionProperties };
|
|
159
|
-
if (mode === "reject") for (const change of matches.toReversed()) restored = sectionRejectProperties({
|
|
160
|
-
live: restored,
|
|
161
|
-
previousProperties: change.previousProperties,
|
|
162
|
-
previousReferences: change.previousReferences
|
|
163
|
-
});
|
|
164
|
-
delete restored.propertyChanges;
|
|
165
|
-
if (remaining.length > 0) restored.propertyChanges = remaining;
|
|
166
|
-
nextAttrs = nextAttrs ?? { ...node.attrs };
|
|
167
|
-
nextAttrs["_sectionProperties"] = restored;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
124
|
+
const nextAttrs = resolveParagraphChangeAttrs({
|
|
125
|
+
node,
|
|
126
|
+
boundaryCovered: rangeCoversParagraphBoundary(from, to, pos, node),
|
|
127
|
+
mode,
|
|
128
|
+
revisionSet,
|
|
129
|
+
styleResolver,
|
|
130
|
+
numbering
|
|
131
|
+
});
|
|
170
132
|
if (nextAttrs) if (nextAttrs["styleId"] !== node.attrs["styleId"] && styleResolver) setParagraphAttrsWithRebasedRunFormatting({
|
|
171
133
|
nextAttrs,
|
|
172
134
|
paragraphPosition: pos,
|
|
@@ -189,7 +151,12 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
189
151
|
const nodeAttrSites = nodePropertyRevisionSites(node.type.name).filter((site) => site.resolution === "node-attrs");
|
|
190
152
|
if (nodeAttrSites.length > 0) {
|
|
191
153
|
if (rangeCoversNode(from, to, pos, node)) for (const site of nodeAttrSites) {
|
|
192
|
-
const nextAttrs = resolveNodePropertyChangeAttrs(
|
|
154
|
+
const nextAttrs = resolveNodePropertyChangeAttrs({
|
|
155
|
+
node: tr.doc.nodeAt(pos) ?? node,
|
|
156
|
+
site,
|
|
157
|
+
mode,
|
|
158
|
+
revisionSet
|
|
159
|
+
});
|
|
193
160
|
if (nextAttrs) {
|
|
194
161
|
tr.setNodeMarkup(pos, void 0, nextAttrs);
|
|
195
162
|
markStructuralChange(tr);
|
|
@@ -198,7 +165,6 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
198
165
|
return true;
|
|
199
166
|
}
|
|
200
167
|
if (!node.isInline) return true;
|
|
201
|
-
if (canBulkInlineResolution) return true;
|
|
202
168
|
const nodeEnd = pos + node.nodeSize;
|
|
203
169
|
const rangeFrom = Math.max(from, pos);
|
|
204
170
|
const rangeTo = Math.min(to, nodeEnd);
|
|
@@ -272,82 +238,25 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
272
238
|
}
|
|
273
239
|
return true;
|
|
274
240
|
});
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
else {
|
|
284
|
-
if (removeKeptMarksInBulk) tr.removeMark(from, to, keepType);
|
|
285
|
-
let rangesToDelete = deleteRanges;
|
|
286
|
-
if (revisionSet === null) {
|
|
287
|
-
const coalescedDeleteRanges = [];
|
|
288
|
-
for (const range of deleteRanges) {
|
|
289
|
-
const previous = coalescedDeleteRanges.at(-1);
|
|
290
|
-
if (previous && range.from <= previous.to) {
|
|
291
|
-
previous.to = Math.max(previous.to, range.to);
|
|
292
|
-
continue;
|
|
293
|
-
}
|
|
294
|
-
coalescedDeleteRanges.push({
|
|
295
|
-
from: range.from,
|
|
296
|
-
to: range.to
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
rangesToDelete = coalescedDeleteRanges;
|
|
300
|
-
}
|
|
301
|
-
for (const range of rangesToDelete.toReversed()) tr.delete(range.from, range.to);
|
|
302
|
-
}
|
|
303
|
-
pPrMarkOps.sort((a, b) => b.paragraphPos - a.paragraphPos);
|
|
304
|
-
for (const op of pPrMarkOps) {
|
|
305
|
-
const mappedPos = tr.mapping.map(op.paragraphPos);
|
|
306
|
-
const paragraph = tr.doc.nodeAt(mappedPos);
|
|
307
|
-
if (!paragraph || paragraph.type.name !== "paragraph") continue;
|
|
308
|
-
if (op.action === "clear") {
|
|
309
|
-
tr.setNodeAttribute(mappedPos, "pPrMark", null);
|
|
310
|
-
continue;
|
|
311
|
-
}
|
|
312
|
-
const joinPos = mappedPos + paragraph.nodeSize;
|
|
313
|
-
const nextNode = joinPos < tr.doc.content.size ? tr.doc.nodeAt(joinPos) : null;
|
|
314
|
-
if (!(nextNode?.type.name === paragraph.type.name)) {
|
|
315
|
-
const resolved = tr.doc.resolve(mappedPos);
|
|
316
|
-
const endsItsContainer = paragraphEndsItsContainer(resolved, paragraph.type.name);
|
|
317
|
-
const canGo = op.markWasAdded || !endsItsContainer;
|
|
318
|
-
if (holdsNoContent(paragraph) && canGo && resolved.parent.childCount > 1) {
|
|
319
|
-
if (ownsSectionEndpoint(paragraph)) {
|
|
320
|
-
removedSectionEndpointCount++;
|
|
321
|
-
removedSectionReferences.push(...sectionReferencesOf(paragraph));
|
|
322
|
-
}
|
|
323
|
-
tr.delete(mappedPos, mappedPos + paragraph.nodeSize);
|
|
241
|
+
if (removeKeptMarksInBulk) tr.removeMark(from, to, keepType);
|
|
242
|
+
let rangesToDelete = deleteRanges;
|
|
243
|
+
if (revisionSet === null) {
|
|
244
|
+
const coalescedDeleteRanges = [];
|
|
245
|
+
for (const range of deleteRanges) {
|
|
246
|
+
const previous = coalescedDeleteRanges.at(-1);
|
|
247
|
+
if (previous && range.from <= previous.to) {
|
|
248
|
+
previous.to = Math.max(previous.to, range.to);
|
|
324
249
|
continue;
|
|
325
250
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
const emptyFirstParagraph = holdsNoContent(paragraph);
|
|
330
|
-
const joinedAttrs = {
|
|
331
|
-
...(emptyFirstParagraph ? nextNode : paragraph).attrs,
|
|
332
|
-
pPrMark: nextNode.attrs["pPrMark"],
|
|
333
|
-
_sectionProperties: nextNode.attrs["_sectionProperties"]
|
|
334
|
-
};
|
|
335
|
-
try {
|
|
336
|
-
if (emptyFirstParagraph) joinProseParagraphsWithRightPropertySource({
|
|
337
|
-
attrs: joinedAttrs,
|
|
338
|
-
pos: joinPos,
|
|
339
|
-
transaction: tr
|
|
251
|
+
coalescedDeleteRanges.push({
|
|
252
|
+
from: range.from,
|
|
253
|
+
to: range.to
|
|
340
254
|
});
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
tr.setNodeMarkup(mappedPos, void 0, joinedAttrs);
|
|
344
|
-
}
|
|
345
|
-
if (ownsSectionEndpoint(paragraph)) {
|
|
346
|
-
removedSectionEndpointCount++;
|
|
347
|
-
removedSectionReferences.push(...sectionReferencesOf(paragraph));
|
|
348
|
-
}
|
|
349
|
-
} catch {}
|
|
255
|
+
}
|
|
256
|
+
rangesToDelete = coalescedDeleteRanges;
|
|
350
257
|
}
|
|
258
|
+
for (const range of rangesToDelete.toReversed()) tr.delete(range.from, range.to);
|
|
259
|
+
if (deleteTextBoxesAnchoredAt(tr, droppedTextBoxAnchorIds(state.doc, tr.doc))) markStructuralChange(tr);
|
|
351
260
|
tableRowStructuralOps.sort((left, right) => right.rowPos - left.rowPos);
|
|
352
261
|
let resolvedTableRowStructure = false;
|
|
353
262
|
for (const op of tableRowStructuralOps) {
|
|
@@ -372,6 +281,7 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
372
281
|
tableCellStructuralOps.sort((left, right) => right.cellPos - left.cellPos);
|
|
373
282
|
let resolvedTableCellStructure = false;
|
|
374
283
|
let failedTableCellMergeResolution = false;
|
|
284
|
+
const emptiedTables = { pending: false };
|
|
375
285
|
for (const op of tableCellStructuralOps) {
|
|
376
286
|
const mappedPos = tr.mapping.map(op.cellPos);
|
|
377
287
|
const cell = tr.doc.nodeAt(mappedPos);
|
|
@@ -390,21 +300,117 @@ function resolveChange(from, to, mode, revisionIds, execution = "legacy") {
|
|
|
390
300
|
resolvedTableCellStructure = true;
|
|
391
301
|
continue;
|
|
392
302
|
}
|
|
393
|
-
deleteTableCellAt(tr, mappedPos);
|
|
303
|
+
deleteTableCellAt(tr, mappedPos, emptiedTables);
|
|
394
304
|
resolvedTableCellStructure = true;
|
|
395
305
|
}
|
|
396
306
|
if (failedTableCellMergeResolution) return false;
|
|
307
|
+
removeRowsWithoutCellsAfterBatch(tr, emptiedTables);
|
|
397
308
|
if (resolvedTableCellStructure) markStructuralChange(tr);
|
|
398
|
-
|
|
309
|
+
pPrMarkOps.sort((a, b) => b.paragraphPos - a.paragraphPos);
|
|
310
|
+
const pendingTables = [];
|
|
311
|
+
state.doc.descendants((node, position) => {
|
|
312
|
+
if (node.type.spec["tableRole"] === "table" && runInCellPending(node)) pendingTables.push(position);
|
|
313
|
+
return !node.isTextblock;
|
|
314
|
+
});
|
|
315
|
+
const joinSeams = [];
|
|
316
|
+
for (const op of pPrMarkOps) {
|
|
317
|
+
const mappedPos = tr.mapping.map(op.paragraphPos);
|
|
318
|
+
const paragraph = tr.doc.nodeAt(mappedPos);
|
|
319
|
+
if (!paragraph || paragraph.type.name !== "paragraph") continue;
|
|
320
|
+
if (op.action === "clear") {
|
|
321
|
+
tr.setNodeAttribute(mappedPos, "pPrMark", null);
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
if (moveTextBoxesPastNextParagraph(tr, mappedPos)) markStructuralChange(tr);
|
|
325
|
+
const joinPos = mappedPos + paragraph.nodeSize;
|
|
326
|
+
let nextPos = joinPos;
|
|
327
|
+
const boundaries = [];
|
|
328
|
+
while (nextPos < tr.doc.content.size) {
|
|
329
|
+
const boundary = tr.doc.nodeAt(nextPos);
|
|
330
|
+
if (boundary?.type.name !== "blockBookmarkBoundary") break;
|
|
331
|
+
boundaries.push(boundary);
|
|
332
|
+
nextPos += boundary.nodeSize;
|
|
333
|
+
}
|
|
334
|
+
const nextNode = nextPos < tr.doc.content.size ? tr.doc.nodeAt(nextPos) : null;
|
|
335
|
+
const joinable = nextNode?.type.name === paragraph.type.name;
|
|
336
|
+
const ranIn = nextNode?.type.spec["tableRole"] === "table" && boundaries.length === 0 && !pendingTables.some((position) => tr.mapping.map(position) === nextPos) ? runParagraphIntoTable({
|
|
337
|
+
tr,
|
|
338
|
+
paragraphPos: mappedPos,
|
|
339
|
+
styleResolver
|
|
340
|
+
}) : null;
|
|
341
|
+
if (ranIn) {
|
|
342
|
+
tr.setMeta(JOINED_RUNS_RESTYLED_META, true);
|
|
343
|
+
markParagraphPropertySourceTransfers(tr, [ranIn.transfer]);
|
|
344
|
+
continue;
|
|
345
|
+
}
|
|
346
|
+
if (!joinable) {
|
|
347
|
+
const resolved = tr.doc.resolve(mappedPos);
|
|
348
|
+
const endsItsContainer = paragraphEndsItsContainer(resolved, paragraph.type.name);
|
|
349
|
+
const canGo = op.markWasAdded || !endsItsContainer;
|
|
350
|
+
if (holdsNoContent(paragraph) && canGo && resolved.parent.childCount > 1) {
|
|
351
|
+
if (ownsSectionEndpoint(paragraph)) {
|
|
352
|
+
removedSectionEndpointCount++;
|
|
353
|
+
removedSectionReferences.push(...sectionReferencesOf(paragraph));
|
|
354
|
+
}
|
|
355
|
+
tr.delete(mappedPos, mappedPos + paragraph.nodeSize);
|
|
356
|
+
continue;
|
|
357
|
+
}
|
|
358
|
+
tr.setNodeAttribute(mappedPos, "pPrMark", null);
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
try {
|
|
362
|
+
if (boundaries.length > 0) {
|
|
363
|
+
const leftToken = getProseParagraphPropertySourceToken(paragraph);
|
|
364
|
+
const rightToken = getProseParagraphPropertySourceToken(nextNode);
|
|
365
|
+
const inlineBookmarks = inlineBookmarksForParagraphJoin({
|
|
366
|
+
first: paragraph,
|
|
367
|
+
boundaries,
|
|
368
|
+
second: nextNode
|
|
369
|
+
});
|
|
370
|
+
if (!inlineBookmarks) continue;
|
|
371
|
+
tr.replaceWith(joinPos - 1, nextPos + 1, inlineBookmarks);
|
|
372
|
+
tr.setNodeMarkup(mappedPos, void 0, nextNode.attrs);
|
|
373
|
+
markParagraphPropertySourceTransfers(tr, [{
|
|
374
|
+
displacedToken: typeof leftToken === "string" ? leftToken : null,
|
|
375
|
+
selectedToken: typeof rightToken === "string" ? rightToken : null
|
|
376
|
+
}]);
|
|
377
|
+
if (styleResolver && paragraph.content.size > 0) rebaseParagraphRuns({
|
|
378
|
+
previousContext: paragraphRunStyleContext(paragraph, styleResolver),
|
|
379
|
+
paragraphPosition: mappedPos,
|
|
380
|
+
range: {
|
|
381
|
+
from: 0,
|
|
382
|
+
to: paragraph.content.size
|
|
383
|
+
},
|
|
384
|
+
styleResolver,
|
|
385
|
+
tr
|
|
386
|
+
});
|
|
387
|
+
} else joinAtParagraphMark({
|
|
388
|
+
tr,
|
|
389
|
+
paragraphPos: mappedPos,
|
|
390
|
+
paragraph,
|
|
391
|
+
next: nextNode,
|
|
392
|
+
styleResolver
|
|
393
|
+
});
|
|
394
|
+
joinSeams.push({
|
|
395
|
+
position: mappedPos + 1 + paragraph.content.size,
|
|
396
|
+
step: tr.steps.length
|
|
397
|
+
});
|
|
398
|
+
if (ownsSectionEndpoint(paragraph)) {
|
|
399
|
+
removedSectionEndpointCount++;
|
|
400
|
+
removedSectionReferences.push(...sectionReferencesOf(paragraph));
|
|
401
|
+
}
|
|
402
|
+
} catch {}
|
|
403
|
+
}
|
|
399
404
|
if (removedSectionEndpointCount > 0) markTrackedSectionEndpointRemoval(tr, {
|
|
400
405
|
sourceDoc: state.doc,
|
|
401
406
|
removedEndpointCount: removedSectionEndpointCount,
|
|
402
407
|
removedReferences: removedSectionReferences
|
|
403
408
|
});
|
|
404
409
|
if (!terminalTableDeletionIsPending(tr)) resolveTerminalTableReviewCarrier(tr, mode);
|
|
410
|
+
const seams = new Set(joinSeams.map(({ position, step }) => tr.mapping.slice(step).map(position)));
|
|
405
411
|
rejoinRunsAt({
|
|
406
412
|
tr,
|
|
407
|
-
boundaries: resolvedBoundaries.map((position) => tr.mapping.map(position)),
|
|
413
|
+
boundaries: resolvedBoundaries.map((position) => tr.mapping.map(position)).filter((position) => !seams.has(position)),
|
|
408
414
|
styleResolver
|
|
409
415
|
});
|
|
410
416
|
if (tr.steps.length > 0) dispatch(tr);
|
|
@@ -452,6 +458,35 @@ const resolveRunPropertyChange = ({ tr, node, from, to, mark, mode, revisionSet,
|
|
|
452
458
|
tr.removeMark(from, to, mark);
|
|
453
459
|
const remaining = changes.filter((change) => revisionSet !== null && !revisionSet.has(change.info.id));
|
|
454
460
|
if (remaining.length > 0) tr.addMark(from, to, mark.type.create({ changes: remaining }));
|
|
461
|
+
const emptyRuns = node.type.name === "field" || node.type.name === "structuredField" ? expectFieldAttrs(node)._docxEmptyResultRuns : void 0;
|
|
462
|
+
const resolvedRuns = emptyRuns ? resolveEmptyFieldResultRuns({
|
|
463
|
+
runs: emptyRuns,
|
|
464
|
+
mode,
|
|
465
|
+
revisionIds: revisionSet
|
|
466
|
+
}) : null;
|
|
467
|
+
if (resolvedRuns) {
|
|
468
|
+
const current = tr.doc.nodeAt(from);
|
|
469
|
+
if (!current) panic("A resolved field has no node at its position");
|
|
470
|
+
tr.setNodeMarkup(from, void 0, {
|
|
471
|
+
...current.attrs,
|
|
472
|
+
_docxEmptyResultRuns: resolvedRuns.runs
|
|
473
|
+
});
|
|
474
|
+
if (resolvedRuns.visibleFormattingChanged) {
|
|
475
|
+
const styleContext = paragraphRunStyleContextAt({
|
|
476
|
+
doc: tr.doc,
|
|
477
|
+
pos: from,
|
|
478
|
+
styleResolver
|
|
479
|
+
});
|
|
480
|
+
for (const currentMark of node.marks) if (RUN_FORMATTING_MARK_NAMES.has(currentMark.type.name)) tr.removeMark(from, to, currentMark.type);
|
|
481
|
+
for (const nextMark of reconstructRejectedRunFormattingMarks({
|
|
482
|
+
node,
|
|
483
|
+
paragraphContext: styleContext,
|
|
484
|
+
previousFormatting: resolvedRuns.visibleFormatting,
|
|
485
|
+
styleResolver
|
|
486
|
+
})) tr.addMark(from, to, nextMark);
|
|
487
|
+
}
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
455
490
|
if (mode === "accept") return;
|
|
456
491
|
const previousFormatting = matches.at(0)?.previousFormatting;
|
|
457
492
|
const styleContext = paragraphRunStyleContextAt({
|
|
@@ -554,7 +589,8 @@ function isTableCellRevisionAttr(value) {
|
|
|
554
589
|
const info = value.info;
|
|
555
590
|
return typeof info === "object" && info !== null && "revisionId" in info && typeof info.revisionId === "number";
|
|
556
591
|
}
|
|
557
|
-
|
|
592
|
+
/** Record rows for a final sweep after every cell revision has resolved. */
|
|
593
|
+
function deleteTableCellAt(tr, cellPos, emptied) {
|
|
558
594
|
const cell = tr.doc.nodeAt(cellPos);
|
|
559
595
|
if (!cell || cell.type.name !== "tableCell" && cell.type.name !== "tableHeader") return;
|
|
560
596
|
const resolved = tr.doc.resolve(cellPos);
|
|
@@ -566,7 +602,13 @@ function deleteTableCellAt(tr, cellPos) {
|
|
|
566
602
|
const tablePosition = resolved.before(tableDepth);
|
|
567
603
|
const cellOffset = cellPos - resolved.start(tableDepth);
|
|
568
604
|
const removedColumn = TableMap.get(table).findCell(cellOffset).left;
|
|
569
|
-
|
|
605
|
+
const spansDown = Number(cell.attrs["rowspan"]) > 1;
|
|
606
|
+
if (row.childCount > 1 || spansDown) {
|
|
607
|
+
if (row.childCount === 1) markRowEmptiedInBatch({
|
|
608
|
+
tr,
|
|
609
|
+
rowPosition: resolved.start() - 1,
|
|
610
|
+
emptied
|
|
611
|
+
});
|
|
570
612
|
tr.delete(cellPos, cellPos + cell.nodeSize);
|
|
571
613
|
reconcileTableGridAfterColumnRemoval({
|
|
572
614
|
tr,
|
|
@@ -594,15 +636,10 @@ function deleteTableRowAt(tr, rowPos) {
|
|
|
594
636
|
if (table.type.spec["tableRole"] !== "table") return;
|
|
595
637
|
const rowIndex = resolved.index();
|
|
596
638
|
if (table.childCount > 1) {
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
map,
|
|
639
|
+
removeTableRow(tr, {
|
|
640
|
+
map: TableMap.get(table),
|
|
600
641
|
table,
|
|
601
|
-
tableStart: resolved.start()
|
|
602
|
-
left: 0,
|
|
603
|
-
top: rowIndex,
|
|
604
|
-
right: map.width,
|
|
605
|
-
bottom: rowIndex + 1
|
|
642
|
+
tableStart: resolved.start()
|
|
606
643
|
}, rowIndex);
|
|
607
644
|
return;
|
|
608
645
|
}
|
|
@@ -640,48 +677,6 @@ function rangeCoversParagraphBoundary(from, to, pos, node) {
|
|
|
640
677
|
function rangeCoversNode(from, to, pos, node) {
|
|
641
678
|
return from <= pos && to >= pos + node.nodeSize;
|
|
642
679
|
}
|
|
643
|
-
/**
|
|
644
|
-
* The attrs a reject restores for each property revision the shared node-attr
|
|
645
|
-
* pass owns. Total over those kinds, so a revision the model gains either
|
|
646
|
-
* declares a different resolution or states here what rejecting it restores.
|
|
647
|
-
*
|
|
648
|
-
* Each patch narrows the stored set to the property set its own element
|
|
649
|
-
* carries. The casts are the ProseMirror attrs boundary: attrs are untyped,
|
|
650
|
-
* and a record reached through the site filed under a kind is the one that
|
|
651
|
-
* kind's parser and converter wrote.
|
|
652
|
-
*/
|
|
653
|
-
const NODE_ATTRS_REJECT_PATCHES = {
|
|
654
|
-
tablePropertyChange: (previousFormatting) => tableRejectAttrPatch(previousFormatting),
|
|
655
|
-
tablePropertyExceptionChange: (previousFormatting) => tablePropertyExceptionsRejectAttrPatch(previousFormatting),
|
|
656
|
-
tableRowPropertyChange: (previousFormatting) => tableRowRejectAttrPatch(previousFormatting),
|
|
657
|
-
tableCellPropertyChange: (previousFormatting, node) => tableCellRejectAttrPatch(previousFormatting, node.attrs["_originalFormatting"])
|
|
658
|
-
};
|
|
659
|
-
/**
|
|
660
|
-
* Resolve the tracked property-change records one site carries on a node.
|
|
661
|
-
* Accept keeps the live formatting and clears the matched records; reject
|
|
662
|
-
* additionally restores the stored previous formatting wholesale (the change
|
|
663
|
-
* element stores the complete old property set — see propertyChangeScope.ts).
|
|
664
|
-
* Returns the next attrs, or `null` when no record matches.
|
|
665
|
-
*/
|
|
666
|
-
function resolveNodePropertyChangeAttrs(node, site, mode, revisionSet) {
|
|
667
|
-
const changes = propertyRevisionRecords(node, site);
|
|
668
|
-
if (changes.length === 0) return null;
|
|
669
|
-
const matches = changes.filter((change) => {
|
|
670
|
-
const metadata = propertyRevisionMetadata(change.info);
|
|
671
|
-
return revisionSet === null || metadata !== null && revisionSet.has(metadata.id);
|
|
672
|
-
});
|
|
673
|
-
if (matches.length === 0) return null;
|
|
674
|
-
const remaining = revisionSet === null ? [] : changes.filter((change) => !matches.includes(change));
|
|
675
|
-
const nextAttrs = {
|
|
676
|
-
...node.attrs,
|
|
677
|
-
[site.attr]: remaining.length > 0 ? remaining : null
|
|
678
|
-
};
|
|
679
|
-
if (mode === "reject") {
|
|
680
|
-
const rejectPatch = NODE_ATTRS_REJECT_PATCHES[site.kind];
|
|
681
|
-
for (const change of matches.toReversed()) Object.assign(nextAttrs, rejectPatch(change.previousFormatting, node));
|
|
682
|
-
}
|
|
683
|
-
return nextAttrs;
|
|
684
|
-
}
|
|
685
680
|
function isPPrMarkAttr(value) {
|
|
686
681
|
if (typeof value !== "object" || value === null) return false;
|
|
687
682
|
const kind = value.kind;
|
|
@@ -765,41 +760,68 @@ function acceptChange(from, to) {
|
|
|
765
760
|
function rejectChange(from, to) {
|
|
766
761
|
return resolveChange(from, to, "reject");
|
|
767
762
|
}
|
|
763
|
+
const resolveAllChanges = (mode) => (state, dispatch) => {
|
|
764
|
+
if (!dispatch) return true;
|
|
765
|
+
const result = resolveStateStory(state, mode);
|
|
766
|
+
if (result.failed) return false;
|
|
767
|
+
if (result.resolved.eq(state.doc)) return true;
|
|
768
|
+
const tr = state.tr.step(new RevisionResolutionStep({
|
|
769
|
+
beforeDoc: state.doc,
|
|
770
|
+
afterDoc: result.resolved,
|
|
771
|
+
steps: result.steps,
|
|
772
|
+
positionMap: result.positionMap
|
|
773
|
+
}));
|
|
774
|
+
markChangedParagraphRanges(tr, {
|
|
775
|
+
ranges: finalRevisionParagraphRanges(result),
|
|
776
|
+
mappingFrom: tr.steps.length,
|
|
777
|
+
replacesStepMapAt: 0
|
|
778
|
+
});
|
|
779
|
+
markParagraphPropertySourceTransfers(tr, result.transfers);
|
|
780
|
+
if (result.structural) markStructuralChange(tr);
|
|
781
|
+
if (result.removedEndpointCount > 0) markTrackedSectionEndpointRemoval(tr, {
|
|
782
|
+
sourceDoc: state.doc,
|
|
783
|
+
removedEndpointCount: result.removedEndpointCount,
|
|
784
|
+
removedReferences: result.removedReferences
|
|
785
|
+
});
|
|
786
|
+
dispatch(tr);
|
|
787
|
+
return true;
|
|
788
|
+
};
|
|
768
789
|
/**
|
|
769
|
-
* Accept all tracked changes in the document.
|
|
790
|
+
* Accept all tracked changes in the document. Returns `false` while pending
|
|
791
|
+
* suggestions are present because this command cannot restage them.
|
|
770
792
|
*/
|
|
771
793
|
function acceptAllChanges() {
|
|
772
|
-
|
|
794
|
+
const resolve = resolveAllChanges("accept");
|
|
795
|
+
return (state, dispatch) => {
|
|
796
|
+
if (getSuggestions(state).length > 0) return false;
|
|
797
|
+
return resolve(state, dispatch);
|
|
798
|
+
};
|
|
773
799
|
}
|
|
774
800
|
/**
|
|
775
801
|
* Reject all tracked changes in the document.
|
|
776
802
|
*/
|
|
777
803
|
function rejectAllChanges() {
|
|
778
|
-
return (
|
|
804
|
+
return resolveAllChanges("reject");
|
|
779
805
|
}
|
|
780
806
|
/**
|
|
781
807
|
* Resolve a complete state synchronously for a headless reader or writer.
|
|
782
808
|
*
|
|
783
|
-
*
|
|
784
|
-
* it is deliberately not an editor command and must not be transported or
|
|
785
|
-
* mapped through concurrent edits.
|
|
809
|
+
* Uses the same single-step resolver as the interactive editor command.
|
|
786
810
|
*/
|
|
787
811
|
function resolveAllChangesInHeadlessState(state, mode) {
|
|
788
812
|
let resolvedState = state;
|
|
789
|
-
|
|
813
|
+
resolveAllChanges(mode)(state, (transaction) => {
|
|
790
814
|
resolvedState = state.apply(transaction);
|
|
791
815
|
});
|
|
792
816
|
return resolvedState;
|
|
793
817
|
}
|
|
794
818
|
/**
|
|
795
|
-
* Resolve
|
|
796
|
-
* the reviewed document back to the tracked source. The bulk resolver is
|
|
797
|
-
* faster, but deliberately replaces inline content without retaining mapping.
|
|
819
|
+
* Resolve a story and retain its position map for callers addressing the tracked source.
|
|
798
820
|
*/
|
|
799
821
|
const resolveAllChangesInHeadlessStateWithMapping = (state, mode) => {
|
|
800
822
|
let resolvedState = state;
|
|
801
823
|
let mapping = new Mapping();
|
|
802
|
-
|
|
824
|
+
resolveAllChanges(mode)(state, (transaction) => {
|
|
803
825
|
resolvedState = state.apply(transaction);
|
|
804
826
|
mapping = transaction.mapping;
|
|
805
827
|
});
|
|
@@ -933,6 +955,18 @@ const readSuggestedParagraphPropertyChange = (change) => {
|
|
|
933
955
|
revisionId: change.info.id
|
|
934
956
|
};
|
|
935
957
|
};
|
|
958
|
+
const readSuggestedParagraphMark = (node) => {
|
|
959
|
+
if (node.type.name !== "paragraph") return null;
|
|
960
|
+
const mark = node.attrs["pPrMark"];
|
|
961
|
+
if (!isPPrMarkAttr(mark)) return null;
|
|
962
|
+
const { info } = mark;
|
|
963
|
+
if (!("provenance" in info) || info.provenance !== "suggested" || !("suggestionId" in info) || typeof info.suggestionId !== "string") return null;
|
|
964
|
+
return {
|
|
965
|
+
suggestionId: info.suggestionId,
|
|
966
|
+
revisionId: info.id,
|
|
967
|
+
kind: paragraphMarkWasAdded(mark.kind) ? "insertion" : "deletion"
|
|
968
|
+
};
|
|
969
|
+
};
|
|
936
970
|
const readStructuralSuggestion = (node) => {
|
|
937
971
|
const attrs = node.attrs;
|
|
938
972
|
const name = node.type.name;
|
|
@@ -1006,6 +1040,16 @@ const collectSuggestions = (state) => {
|
|
|
1006
1040
|
entry.revisionIds.add(structural.revisionId);
|
|
1007
1041
|
}
|
|
1008
1042
|
if (node.type.name === "paragraph") {
|
|
1043
|
+
const paragraphMark = readSuggestedParagraphMark(node);
|
|
1044
|
+
if (paragraphMark) {
|
|
1045
|
+
const entry = entryFor(paragraphMark.suggestionId);
|
|
1046
|
+
entry.segments.push({
|
|
1047
|
+
from: pos,
|
|
1048
|
+
to: pos + node.nodeSize
|
|
1049
|
+
});
|
|
1050
|
+
entry.kinds.add(paragraphMark.kind);
|
|
1051
|
+
entry.revisionIds.add(paragraphMark.revisionId);
|
|
1052
|
+
}
|
|
1009
1053
|
const propertyChanges = expectParagraphAttrs(node)._propertyChanges;
|
|
1010
1054
|
if (Array.isArray(propertyChanges)) for (const change of propertyChanges) {
|
|
1011
1055
|
const suggested = readSuggestedParagraphPropertyChange(change);
|
|
@@ -1087,6 +1131,11 @@ function getSuggestions(state) {
|
|
|
1087
1131
|
});
|
|
1088
1132
|
return suggestions.toSorted((a, b) => (a.ranges[0]?.from ?? 0) - (b.ranges[0]?.from ?? 0));
|
|
1089
1133
|
}
|
|
1134
|
+
/** The suggestion a revision belongs to, or `null` for an ordinary tracked change. */
|
|
1135
|
+
function suggestionIdOfRevision(state, revisionId) {
|
|
1136
|
+
for (const [suggestionId, entry] of collectSuggestions(state)) if (entry.revisionIds.has(revisionId)) return suggestionId;
|
|
1137
|
+
return null;
|
|
1138
|
+
}
|
|
1090
1139
|
/**
|
|
1091
1140
|
* The document range covering every mark belonging to `suggestionId`, plus the
|
|
1092
1141
|
* revision ids those marks carry. Returns null when the suggestion is absent
|
|
@@ -1319,7 +1368,10 @@ const shiftAddedParagraphBreakBefore = ({ tr, paragraphPosition, mark, fallbackA
|
|
|
1319
1368
|
const paragraph = tr.doc.nodeAt(paragraphPosition);
|
|
1320
1369
|
if (!paragraph || paragraph.type.name !== "paragraph") return false;
|
|
1321
1370
|
const resolved = tr.doc.resolve(paragraphPosition);
|
|
1322
|
-
const carrier = addedBreakCarrierBefore(
|
|
1371
|
+
const carrier = addedBreakCarrierBefore({
|
|
1372
|
+
at: resolved,
|
|
1373
|
+
paragraphTypeName: paragraph.type.name
|
|
1374
|
+
});
|
|
1323
1375
|
if (!carrier) return false;
|
|
1324
1376
|
const path = [{
|
|
1325
1377
|
node: paragraph,
|
|
@@ -1482,6 +1534,23 @@ const acceptSuggestions = (matchesSuggestion, options) => {
|
|
|
1482
1534
|
...nextAttrs ?? node.attrs,
|
|
1483
1535
|
_propertyChanges: propertyChanges
|
|
1484
1536
|
};
|
|
1537
|
+
const paragraphMark = readSuggestedParagraphMark(node);
|
|
1538
|
+
if (paragraphMark && matchesSuggestion(paragraphMark.suggestionId)) {
|
|
1539
|
+
const mark = node.attrs["pPrMark"];
|
|
1540
|
+
if (isPPrMarkAttr(mark)) nextAttrs = {
|
|
1541
|
+
...nextAttrs ?? node.attrs,
|
|
1542
|
+
pPrMark: {
|
|
1543
|
+
...mark,
|
|
1544
|
+
info: {
|
|
1545
|
+
...mark.info,
|
|
1546
|
+
author: options.author,
|
|
1547
|
+
date,
|
|
1548
|
+
provenance: "user",
|
|
1549
|
+
suggestionId: null
|
|
1550
|
+
}
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1485
1554
|
if (nextAttrs) {
|
|
1486
1555
|
tr.setNodeMarkup(pos, void 0, nextAttrs);
|
|
1487
1556
|
changed = true;
|
|
@@ -1809,4 +1878,4 @@ function findPreviousChange(state, startPos) {
|
|
|
1809
1878
|
return result.value;
|
|
1810
1879
|
}
|
|
1811
1880
|
//#endregion
|
|
1812
|
-
export { acceptAIEditRevision, acceptAllChanges, acceptAllSuggestions, acceptChange, acceptSuggestion, addCommentMark, findAIEditRevisionRange, findChangeAtPosition, findNextChange, findParagraphBoundaryChangeAtPosition, findPreviousChange, findSuggestionRange, getSuggestions, rejectAIEditRevision, rejectAllChanges, rejectAllSuggestions, rejectChange, rejectSuggestion, removeCommentMark, resolveAllChangesInHeadlessState, resolveAllChangesInHeadlessStateWithMapping };
|
|
1881
|
+
export { acceptAIEditRevision, acceptAllChanges, acceptAllSuggestions, acceptChange, acceptSuggestion, addCommentMark, findAIEditRevisionRange, findChangeAtPosition, findNextChange, findParagraphBoundaryChangeAtPosition, findPreviousChange, findSuggestionRange, getSuggestions, rejectAIEditRevision, rejectAllChanges, rejectAllSuggestions, rejectChange, rejectSuggestion, removeCommentMark, resolveAllChangesInHeadlessState, resolveAllChangesInHeadlessStateWithMapping, suggestionIdOfRevision };
|